target
stringlengths
5
300
feat_repo_name
stringlengths
6
76
text
stringlengths
26
1.05M
node_modules/rc-calendar/es/date/DateInput.js
prodigalyijun/demo-by-antd
import React from 'react'; import ReactDOM from 'react-dom'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import moment from 'moment'; var DateInput = createReactClass({ propTypes: { prefixCls: PropTypes.string, timePicker: PropTypes.object, value: PropTypes.object, disabledTime: PropTypes.any, format: PropTypes.string, locale: PropTypes.object, disabledDate: PropTypes.func, onChange: PropTypes.func, onClear: PropTypes.func, placeholder: PropTypes.string, onSelect: PropTypes.func, selectedValue: PropTypes.object }, getInitialState: function getInitialState() { var selectedValue = this.props.selectedValue; return { str: selectedValue && selectedValue.format(this.props.format) || '', invalid: false }; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { // when popup show, click body will call this, bug! var selectedValue = nextProps.selectedValue; this.setState({ str: selectedValue && selectedValue.format(nextProps.format) || '', invalid: false }); }, onInputChange: function onInputChange(event) { var str = event.target.value; this.setState({ str: str }); var value = void 0; var _props = this.props, disabledDate = _props.disabledDate, format = _props.format, onChange = _props.onChange; if (str) { var parsed = moment(str, format, true); if (!parsed.isValid()) { this.setState({ invalid: true }); return; } value = this.props.value.clone(); value.year(parsed.year()).month(parsed.month()).date(parsed.date()).hour(parsed.hour()).minute(parsed.minute()).second(parsed.second()); if (value && (!disabledDate || !disabledDate(value))) { var originalValue = this.props.selectedValue; if (originalValue && value) { if (!originalValue.isSame(value)) { onChange(value); } } else if (originalValue !== value) { onChange(value); } } else { this.setState({ invalid: true }); return; } } else { onChange(null); } this.setState({ invalid: false }); }, onClear: function onClear() { this.setState({ str: '' }); this.props.onClear(null); }, getRootDOMNode: function getRootDOMNode() { return ReactDOM.findDOMNode(this); }, focus: function focus() { this.refs.dateInput.focus(); }, render: function render() { var props = this.props; var _state = this.state, invalid = _state.invalid, str = _state.str; var locale = props.locale, prefixCls = props.prefixCls, placeholder = props.placeholder; var invalidClass = invalid ? prefixCls + '-input-invalid' : ''; return React.createElement( 'div', { className: prefixCls + '-input-wrap' }, React.createElement( 'div', { className: prefixCls + '-date-input-wrap' }, React.createElement('input', { ref: 'dateInput', className: prefixCls + '-input ' + invalidClass, value: str, disabled: props.disabled, placeholder: placeholder, onChange: this.onInputChange }) ), props.showClear ? React.createElement('a', { className: prefixCls + '-clear-btn', role: 'button', title: locale.clear, onClick: this.onClear }) : null ); } }); export default DateInput;
ajax/libs/yui/3.6.0/event-custom-base/event-custom-base-debug.js
TerryMooreII/cdnjs
YUI.add('event-custom-base', function(Y) { /** * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom */ Y.Env.evt = { handles: {}, plugins: {} }; /** * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom * @submodule event-custom-base */ /** * Allows for the insertion of methods that are executed before or after * a specified method * @class Do * @static */ var DO_BEFORE = 0, DO_AFTER = 1, DO = { /** * Cache of objects touched by the utility * @property objs * @static * @deprecated Since 3.6.0. The `_yuiaop` property on the AOP'd object * replaces the role of this property, but is considered to be private, and * is only mentioned to provide a migration path. * * If you have a use case which warrants migration to the _yuiaop property, * please file a ticket to let us know what it's used for and we can see if * we need to expose hooks for that functionality more formally. */ objs: null, /** * <p>Execute the supplied method before the specified function. Wrapping * function may optionally return an instance of the following classes to * further alter runtime behavior:</p> * <dl> * <dt></code>Y.Do.Halt(message, returnValue)</code></dt> * <dd>Immediatly stop execution and return * <code>returnValue</code>. No other wrapping functions will be * executed.</dd> * <dt></code>Y.Do.AlterArgs(message, newArgArray)</code></dt> * <dd>Replace the arguments that the original function will be * called with.</dd> * <dt></code>Y.Do.Prevent(message)</code></dt> * <dd>Don't execute the wrapped function. Other before phase * wrappers will be executed.</dd> * </dl> * * @method before * @param fn {Function} the function to execute * @param obj the object hosting the method to displace * @param sFn {string} the name of the method to displace * @param c The execution context for fn * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * when the event fires. * @return {string} handle for the subscription * @static */ before: function(fn, obj, sFn, c) { // Y.log('Do before: ' + sFn, 'info', 'event'); var f = fn, a; if (c) { a = [fn, c].concat(Y.Array(arguments, 4, true)); f = Y.rbind.apply(Y, a); } return this._inject(DO_BEFORE, f, obj, sFn); }, /** * <p>Execute the supplied method after the specified function. Wrapping * function may optionally return an instance of the following classes to * further alter runtime behavior:</p> * <dl> * <dt></code>Y.Do.Halt(message, returnValue)</code></dt> * <dd>Immediatly stop execution and return * <code>returnValue</code>. No other wrapping functions will be * executed.</dd> * <dt></code>Y.Do.AlterReturn(message, returnValue)</code></dt> * <dd>Return <code>returnValue</code> instead of the wrapped * method's original return value. This can be further altered by * other after phase wrappers.</dd> * </dl> * * <p>The static properties <code>Y.Do.originalRetVal</code> and * <code>Y.Do.currentRetVal</code> will be populated for reference.</p> * * @method after * @param fn {Function} the function to execute * @param obj the object hosting the method to displace * @param sFn {string} the name of the method to displace * @param c The execution context for fn * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * @return {string} handle for the subscription * @static */ after: function(fn, obj, sFn, c) { var f = fn, a; if (c) { a = [fn, c].concat(Y.Array(arguments, 4, true)); f = Y.rbind.apply(Y, a); } return this._inject(DO_AFTER, f, obj, sFn); }, /** * Execute the supplied method before or after the specified function. * Used by <code>before</code> and <code>after</code>. * * @method _inject * @param when {string} before or after * @param fn {Function} the function to execute * @param obj the object hosting the method to displace * @param sFn {string} the name of the method to displace * @param c The execution context for fn * @return {string} handle for the subscription * @private * @static */ _inject: function(when, fn, obj, sFn) { // object id var id = Y.stamp(obj), o, sid; if (!obj._yuiaop) { // create a map entry for the obj if it doesn't exist, to hold overridden methods obj._yuiaop = {}; } o = obj._yuiaop; if (!o[sFn]) { // create a map entry for the method if it doesn't exist o[sFn] = new Y.Do.Method(obj, sFn); // re-route the method to our wrapper obj[sFn] = function() { return o[sFn].exec.apply(o[sFn], arguments); }; } // subscriber id sid = id + Y.stamp(fn) + sFn; // register the callback o[sFn].register(sid, fn, when); return new Y.EventHandle(o[sFn], sid); }, /** * Detach a before or after subscription. * * @method detach * @param handle {string} the subscription handle * @static */ detach: function(handle) { if (handle.detach) { handle.detach(); } }, _unload: function(e, me) { } }; Y.Do = DO; ////////////////////////////////////////////////////////////////////////// /** * Contains the return value from the wrapped method, accessible * by 'after' event listeners. * * @property originalRetVal * @static * @since 3.2.0 */ /** * Contains the current state of the return value, consumable by * 'after' event listeners, and updated if an after subscriber * changes the return value generated by the wrapped function. * * @property currentRetVal * @static * @since 3.2.0 */ ////////////////////////////////////////////////////////////////////////// /** * Wrapper for a displaced method with aop enabled * @class Do.Method * @constructor * @param obj The object to operate on * @param sFn The name of the method to displace */ DO.Method = function(obj, sFn) { this.obj = obj; this.methodName = sFn; this.method = obj[sFn]; this.before = {}; this.after = {}; }; /** * Register a aop subscriber * @method register * @param sid {string} the subscriber id * @param fn {Function} the function to execute * @param when {string} when to execute the function */ DO.Method.prototype.register = function (sid, fn, when) { if (when) { this.after[sid] = fn; } else { this.before[sid] = fn; } }; /** * Unregister a aop subscriber * @method delete * @param sid {string} the subscriber id * @param fn {Function} the function to execute * @param when {string} when to execute the function */ DO.Method.prototype._delete = function (sid) { // Y.log('Y.Do._delete: ' + sid, 'info', 'Event'); delete this.before[sid]; delete this.after[sid]; }; /** * <p>Execute the wrapped method. All arguments are passed into the wrapping * functions. If any of the before wrappers return an instance of * <code>Y.Do.Halt</code> or <code>Y.Do.Prevent</code>, neither the wrapped * function nor any after phase subscribers will be executed.</p> * * <p>The return value will be the return value of the wrapped function or one * provided by a wrapper function via an instance of <code>Y.Do.Halt</code> or * <code>Y.Do.AlterReturn</code>. * * @method exec * @param arg* {any} Arguments are passed to the wrapping and wrapped functions * @return {any} Return value of wrapped function unless overwritten (see above) */ DO.Method.prototype.exec = function () { var args = Y.Array(arguments, 0, true), i, ret, newRet, bf = this.before, af = this.after, prevented = false; // execute before for (i in bf) { if (bf.hasOwnProperty(i)) { ret = bf[i].apply(this.obj, args); if (ret) { switch (ret.constructor) { case DO.Halt: return ret.retVal; case DO.AlterArgs: args = ret.newArgs; break; case DO.Prevent: prevented = true; break; default: } } } } // execute method if (!prevented) { ret = this.method.apply(this.obj, args); } DO.originalRetVal = ret; DO.currentRetVal = ret; // execute after methods. for (i in af) { if (af.hasOwnProperty(i)) { newRet = af[i].apply(this.obj, args); // Stop processing if a Halt object is returned if (newRet && newRet.constructor == DO.Halt) { return newRet.retVal; // Check for a new return value } else if (newRet && newRet.constructor == DO.AlterReturn) { ret = newRet.newRetVal; // Update the static retval state DO.currentRetVal = ret; } } } return ret; }; ////////////////////////////////////////////////////////////////////////// /** * Return an AlterArgs object when you want to change the arguments that * were passed into the function. Useful for Do.before subscribers. An * example would be a service that scrubs out illegal characters prior to * executing the core business logic. * @class Do.AlterArgs * @constructor * @param msg {String} (optional) Explanation of the altered return value * @param newArgs {Array} Call parameters to be used for the original method * instead of the arguments originally passed in. */ DO.AlterArgs = function(msg, newArgs) { this.msg = msg; this.newArgs = newArgs; }; /** * Return an AlterReturn object when you want to change the result returned * from the core method to the caller. Useful for Do.after subscribers. * @class Do.AlterReturn * @constructor * @param msg {String} (optional) Explanation of the altered return value * @param newRetVal {any} Return value passed to code that invoked the wrapped * function. */ DO.AlterReturn = function(msg, newRetVal) { this.msg = msg; this.newRetVal = newRetVal; }; /** * Return a Halt object when you want to terminate the execution * of all subsequent subscribers as well as the wrapped method * if it has not exectued yet. Useful for Do.before subscribers. * @class Do.Halt * @constructor * @param msg {String} (optional) Explanation of why the termination was done * @param retVal {any} Return value passed to code that invoked the wrapped * function. */ DO.Halt = function(msg, retVal) { this.msg = msg; this.retVal = retVal; }; /** * Return a Prevent object when you want to prevent the wrapped function * from executing, but want the remaining listeners to execute. Useful * for Do.before subscribers. * @class Do.Prevent * @constructor * @param msg {String} (optional) Explanation of why the termination was done */ DO.Prevent = function(msg) { this.msg = msg; }; /** * Return an Error object when you want to terminate the execution * of all subsequent method calls. * @class Do.Error * @constructor * @param msg {String} (optional) Explanation of the altered return value * @param retVal {any} Return value passed to code that invoked the wrapped * function. * @deprecated use Y.Do.Halt or Y.Do.Prevent */ DO.Error = DO.Halt; ////////////////////////////////////////////////////////////////////////// // Y["Event"] && Y.Event.addListener(window, "unload", Y.Do._unload, Y.Do); /** * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom * @submodule event-custom-base */ // var onsubscribeType = "_event:onsub", var AFTER = 'after', CONFIGS = [ 'broadcast', 'monitored', 'bubbles', 'context', 'contextFn', 'currentTarget', 'defaultFn', 'defaultTargetOnly', 'details', 'emitFacade', 'fireOnce', 'async', 'host', 'preventable', 'preventedFn', 'queuable', 'silent', 'stoppedFn', 'target', 'type' ], YUI3_SIGNATURE = 9, YUI_LOG = 'yui:log'; /** * The CustomEvent class lets you define events for your application * that can be subscribed to by one or more independent component. * * @param {String} type The type of event, which is passed to the callback * when the event fires. * @param {object} o configuration object. * @class CustomEvent * @constructor */ Y.CustomEvent = function(type, o) { // if (arguments.length > 2) { // this.log('CustomEvent context and silent are now in the config', 'warn', 'Event'); // } o = o || {}; this.id = Y.stamp(this); /** * The type of event, returned to subscribers when the event fires * @property type * @type string */ this.type = type; /** * The context the the event will fire from by default. Defaults to the YUI * instance. * @property context * @type object */ this.context = Y; /** * Monitor when an event is attached or detached. * * @property monitored * @type boolean */ // this.monitored = false; this.logSystem = (type == YUI_LOG); /** * If 0, this event does not broadcast. If 1, the YUI instance is notified * every time this event fires. If 2, the YUI instance and the YUI global * (if event is enabled on the global) are notified every time this event * fires. * @property broadcast * @type int */ // this.broadcast = 0; /** * By default all custom events are logged in the debug build, set silent * to true to disable debug outpu for this event. * @property silent * @type boolean */ this.silent = this.logSystem; /** * Specifies whether this event should be queued when the host is actively * processing an event. This will effect exectution order of the callbacks * for the various events. * @property queuable * @type boolean * @default false */ // this.queuable = false; /** * The subscribers to this event * @property subscribers * @type Subscriber {} */ this.subscribers = {}; /** * 'After' subscribers * @property afters * @type Subscriber {} */ this.afters = {}; /** * This event has fired if true * * @property fired * @type boolean * @default false; */ // this.fired = false; /** * An array containing the arguments the custom event * was last fired with. * @property firedWith * @type Array */ // this.firedWith; /** * This event should only fire one time if true, and if * it has fired, any new subscribers should be notified * immediately. * * @property fireOnce * @type boolean * @default false; */ // this.fireOnce = false; /** * fireOnce listeners will fire syncronously unless async * is set to true * @property async * @type boolean * @default false */ //this.async = false; /** * Flag for stopPropagation that is modified during fire() * 1 means to stop propagation to bubble targets. 2 means * to also stop additional subscribers on this target. * @property stopped * @type int */ // this.stopped = 0; /** * Flag for preventDefault that is modified during fire(). * if it is not 0, the default behavior for this event * @property prevented * @type int */ // this.prevented = 0; /** * Specifies the host for this custom event. This is used * to enable event bubbling * @property host * @type EventTarget */ // this.host = null; /** * The default function to execute after event listeners * have fire, but only if the default action was not * prevented. * @property defaultFn * @type Function */ // this.defaultFn = null; /** * The function to execute if a subscriber calls * stopPropagation or stopImmediatePropagation * @property stoppedFn * @type Function */ // this.stoppedFn = null; /** * The function to execute if a subscriber calls * preventDefault * @property preventedFn * @type Function */ // this.preventedFn = null; /** * Specifies whether or not this event's default function * can be cancelled by a subscriber by executing preventDefault() * on the event facade * @property preventable * @type boolean * @default true */ this.preventable = true; /** * Specifies whether or not a subscriber can stop the event propagation * via stopPropagation(), stopImmediatePropagation(), or halt() * * Events can only bubble if emitFacade is true. * * @property bubbles * @type boolean * @default true */ this.bubbles = true; /** * Supports multiple options for listener signatures in order to * port YUI 2 apps. * @property signature * @type int * @default 9 */ this.signature = YUI3_SIGNATURE; this.subCount = 0; this.afterCount = 0; // this.hasSubscribers = false; // this.hasAfters = false; /** * If set to true, the custom event will deliver an EventFacade object * that is similar to a DOM event object. * @property emitFacade * @type boolean * @default false */ // this.emitFacade = false; this.applyConfig(o, true); // this.log("Creating " + this.type); }; Y.CustomEvent.prototype = { constructor: Y.CustomEvent, /** * Returns the number of subscribers for this event as the sum of the on() * subscribers and after() subscribers. * * @method hasSubs * @return Number */ hasSubs: function(when) { var s = this.subCount, a = this.afterCount, sib = this.sibling; if (sib) { s += sib.subCount; a += sib.afterCount; } if (when) { return (when == 'after') ? a : s; } return (s + a); }, /** * Monitor the event state for the subscribed event. The first parameter * is what should be monitored, the rest are the normal parameters when * subscribing to an event. * @method monitor * @param what {string} what to monitor ('detach', 'attach', 'publish'). * @return {EventHandle} return value from the monitor event subscription. */ monitor: function(what) { this.monitored = true; var type = this.id + '|' + this.type + '_' + what, args = Y.Array(arguments, 0, true); args[0] = type; return this.host.on.apply(this.host, args); }, /** * Get all of the subscribers to this event and any sibling event * @method getSubs * @return {Array} first item is the on subscribers, second the after. */ getSubs: function() { var s = Y.merge(this.subscribers), a = Y.merge(this.afters), sib = this.sibling; if (sib) { Y.mix(s, sib.subscribers); Y.mix(a, sib.afters); } return [s, a]; }, /** * Apply configuration properties. Only applies the CONFIG whitelist * @method applyConfig * @param o hash of properties to apply. * @param force {boolean} if true, properties that exist on the event * will be overwritten. */ applyConfig: function(o, force) { if (o) { Y.mix(this, o, force, CONFIGS); } }, /** * Create the Subscription for subscribing function, context, and bound * arguments. If this is a fireOnce event, the subscriber is immediately * notified. * * @method _on * @param fn {Function} Subscription callback * @param [context] {Object} Override `this` in the callback * @param [args] {Array} bound arguments that will be passed to the callback after the arguments generated by fire() * @param [when] {String} "after" to slot into after subscribers * @return {EventHandle} * @protected */ _on: function(fn, context, args, when) { if (!fn) { this.log('Invalid callback for CE: ' + this.type); } var s = new Y.Subscriber(fn, context, args, when); if (this.fireOnce && this.fired) { if (this.async) { setTimeout(Y.bind(this._notify, this, s, this.firedWith), 0); } else { this._notify(s, this.firedWith); } } if (when == AFTER) { this.afters[s.id] = s; this.afterCount++; } else { this.subscribers[s.id] = s; this.subCount++; } return new Y.EventHandle(this, s); }, /** * Listen for this event * @method subscribe * @param {Function} fn The function to execute. * @return {EventHandle} Unsubscribe handle. * @deprecated use on. */ subscribe: function(fn, context) { Y.log('ce.subscribe deprecated, use "on"', 'warn', 'deprecated'); var a = (arguments.length > 2) ? Y.Array(arguments, 2, true) : null; return this._on(fn, context, a, true); }, /** * Listen for this event * @method on * @param {Function} fn The function to execute. * @param {object} context optional execution context. * @param {mixed} arg* 0..n additional arguments to supply to the subscriber * when the event fires. * @return {EventHandle} An object with a detach method to detch the handler(s). */ on: function(fn, context) { var a = (arguments.length > 2) ? Y.Array(arguments, 2, true) : null; if (this.host) { this.host._monitor('attach', this.type, { args: arguments }); } return this._on(fn, context, a, true); }, /** * Listen for this event after the normal subscribers have been notified and * the default behavior has been applied. If a normal subscriber prevents the * default behavior, it also prevents after listeners from firing. * @method after * @param {Function} fn The function to execute. * @param {object} context optional execution context. * @param {mixed} arg* 0..n additional arguments to supply to the subscriber * when the event fires. * @return {EventHandle} handle Unsubscribe handle. */ after: function(fn, context) { var a = (arguments.length > 2) ? Y.Array(arguments, 2, true) : null; return this._on(fn, context, a, AFTER); }, /** * Detach listeners. * @method detach * @param {Function} fn The subscribed function to remove, if not supplied * all will be removed. * @param {Object} context The context object passed to subscribe. * @return {int} returns the number of subscribers unsubscribed. */ detach: function(fn, context) { // unsubscribe handle if (fn && fn.detach) { return fn.detach(); } var i, s, found = 0, subs = Y.merge(this.subscribers, this.afters); for (i in subs) { if (subs.hasOwnProperty(i)) { s = subs[i]; if (s && (!fn || fn === s.fn)) { this._delete(s); found++; } } } return found; }, /** * Detach listeners. * @method unsubscribe * @param {Function} fn The subscribed function to remove, if not supplied * all will be removed. * @param {Object} context The context object passed to subscribe. * @return {int|undefined} returns the number of subscribers unsubscribed. * @deprecated use detach. */ unsubscribe: function() { return this.detach.apply(this, arguments); }, /** * Notify a single subscriber * @method _notify * @param {Subscriber} s the subscriber. * @param {Array} args the arguments array to apply to the listener. * @protected */ _notify: function(s, args, ef) { this.log(this.type + '->' + 'sub: ' + s.id); var ret; ret = s.notify(args, this); if (false === ret || this.stopped > 1) { this.log(this.type + ' cancelled by subscriber'); return false; } return true; }, /** * Logger abstraction to centralize the application of the silent flag * @method log * @param {string} msg message to log. * @param {string} cat log category. */ log: function(msg, cat) { if (!this.silent) { Y.log(this.id + ': ' + msg, cat || 'info', 'event'); } }, /** * Notifies the subscribers. The callback functions will be executed * from the context specified when the event was created, and with the * following parameters: * <ul> * <li>The type of event</li> * <li>All of the arguments fire() was executed with as an array</li> * <li>The custom object (if any) that was passed into the subscribe() * method</li> * </ul> * @method fire * @param {Object*} arguments an arbitrary set of parameters to pass to * the handler. * @return {boolean} false if one of the subscribers returned false, * true otherwise. * */ fire: function() { if (this.fireOnce && this.fired) { this.log('fireOnce event: ' + this.type + ' already fired'); return true; } else { var args = Y.Array(arguments, 0, true); // this doesn't happen if the event isn't published // this.host._monitor('fire', this.type, args); this.fired = true; this.firedWith = args; if (this.emitFacade) { return this.fireComplex(args); } else { return this.fireSimple(args); } } }, /** * Set up for notifying subscribers of non-emitFacade events. * * @method fireSimple * @param args {Array} Arguments passed to fire() * @return Boolean false if a subscriber returned false * @protected */ fireSimple: function(args) { this.stopped = 0; this.prevented = 0; if (this.hasSubs()) { // this._procSubs(Y.merge(this.subscribers, this.afters), args); var subs = this.getSubs(); this._procSubs(subs[0], args); this._procSubs(subs[1], args); } this._broadcast(args); return this.stopped ? false : true; }, // Requires the event-custom-complex module for full funcitonality. fireComplex: function(args) { Y.log('Missing event-custom-complex needed to emit a facade for: ' + this.type); args[0] = args[0] || {}; return this.fireSimple(args); }, /** * Notifies a list of subscribers. * * @method _procSubs * @param subs {Array} List of subscribers * @param args {Array} Arguments passed to fire() * @param ef {} * @return Boolean false if a subscriber returns false or stops the event * propagation via e.stopPropagation(), * e.stopImmediatePropagation(), or e.halt() * @private */ _procSubs: function(subs, args, ef) { var s, i; for (i in subs) { if (subs.hasOwnProperty(i)) { s = subs[i]; if (s && s.fn) { if (false === this._notify(s, args, ef)) { this.stopped = 2; } if (this.stopped == 2) { return false; } } } } return true; }, /** * Notifies the YUI instance if the event is configured with broadcast = 1, * and both the YUI instance and Y.Global if configured with broadcast = 2. * * @method _broadcast * @param args {Array} Arguments sent to fire() * @private */ _broadcast: function(args) { if (!this.stopped && this.broadcast) { var a = Y.Array(args); a.unshift(this.type); if (this.host !== Y) { Y.fire.apply(Y, a); } if (this.broadcast == 2) { Y.Global.fire.apply(Y.Global, a); } } }, /** * Removes all listeners * @method unsubscribeAll * @return {int} The number of listeners unsubscribed. * @deprecated use detachAll. */ unsubscribeAll: function() { return this.detachAll.apply(this, arguments); }, /** * Removes all listeners * @method detachAll * @return {int} The number of listeners unsubscribed. */ detachAll: function() { return this.detach(); }, /** * Deletes the subscriber from the internal store of on() and after() * subscribers. * * @method _delete * @param subscriber object. * @private */ _delete: function(s) { if (s) { if (this.subscribers[s.id]) { delete this.subscribers[s.id]; this.subCount--; } if (this.afters[s.id]) { delete this.afters[s.id]; this.afterCount--; } } if (this.host) { this.host._monitor('detach', this.type, { ce: this, sub: s }); } if (s) { // delete s.fn; // delete s.context; s.deleted = true; } } }; /** * Stores the subscriber information to be used when the event fires. * @param {Function} fn The wrapped function to execute. * @param {Object} context The value of the keyword 'this' in the listener. * @param {Array} args* 0..n additional arguments to supply the listener. * * @class Subscriber * @constructor */ Y.Subscriber = function(fn, context, args) { /** * The callback that will be execute when the event fires * This is wrapped by Y.rbind if obj was supplied. * @property fn * @type Function */ this.fn = fn; /** * Optional 'this' keyword for the listener * @property context * @type Object */ this.context = context; /** * Unique subscriber id * @property id * @type String */ this.id = Y.stamp(this); /** * Additional arguments to propagate to the subscriber * @property args * @type Array */ this.args = args; /** * Custom events for a given fire transaction. * @property events * @type {EventTarget} */ // this.events = null; /** * This listener only reacts to the event once * @property once */ // this.once = false; }; Y.Subscriber.prototype = { constructor: Y.Subscriber, _notify: function(c, args, ce) { if (this.deleted && !this.postponed) { if (this.postponed) { delete this.fn; delete this.context; } else { delete this.postponed; return null; } } var a = this.args, ret; switch (ce.signature) { case 0: ret = this.fn.call(c, ce.type, args, c); break; case 1: ret = this.fn.call(c, args[0] || null, c); break; default: if (a || args) { args = args || []; a = (a) ? args.concat(a) : args; ret = this.fn.apply(c, a); } else { ret = this.fn.call(c); } } if (this.once) { ce._delete(this); } return ret; }, /** * Executes the subscriber. * @method notify * @param args {Array} Arguments array for the subscriber. * @param ce {CustomEvent} The custom event that sent the notification. */ notify: function(args, ce) { var c = this.context, ret = true; if (!c) { c = (ce.contextFn) ? ce.contextFn() : ce.context; } // only catch errors if we will not re-throw them. if (Y.config && Y.config.throwFail) { ret = this._notify(c, args, ce); } else { try { ret = this._notify(c, args, ce); } catch (e) { Y.error(this + ' failed: ' + e.message, e); } } return ret; }, /** * Returns true if the fn and obj match this objects properties. * Used by the unsubscribe method to match the right subscriber. * * @method contains * @param {Function} fn the function to execute. * @param {Object} context optional 'this' keyword for the listener. * @return {boolean} true if the supplied arguments match this * subscriber's signature. */ contains: function(fn, context) { if (context) { return ((this.fn == fn) && this.context == context); } else { return (this.fn == fn); } } }; /** * Return value from all subscribe operations * @class EventHandle * @constructor * @param {CustomEvent} evt the custom event. * @param {Subscriber} sub the subscriber. */ Y.EventHandle = function(evt, sub) { /** * The custom event * * @property evt * @type CustomEvent */ this.evt = evt; /** * The subscriber object * * @property sub * @type Subscriber */ this.sub = sub; }; Y.EventHandle.prototype = { batch: function(f, c) { f.call(c || this, this); if (Y.Lang.isArray(this.evt)) { Y.Array.each(this.evt, function(h) { h.batch.call(c || h, f); }); } }, /** * Detaches this subscriber * @method detach * @return {int} the number of detached listeners */ detach: function() { var evt = this.evt, detached = 0, i; if (evt) { // Y.log('EventHandle.detach: ' + this.sub, 'info', 'Event'); if (Y.Lang.isArray(evt)) { for (i = 0; i < evt.length; i++) { detached += evt[i].detach(); } } else { evt._delete(this.sub); detached = 1; } } return detached; }, /** * Monitor the event state for the subscribed event. The first parameter * is what should be monitored, the rest are the normal parameters when * subscribing to an event. * @method monitor * @param what {string} what to monitor ('attach', 'detach', 'publish'). * @return {EventHandle} return value from the monitor event subscription. */ monitor: function(what) { return this.evt.monitor.apply(this.evt, arguments); } }; /** * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom * @submodule event-custom-base */ /** * EventTarget provides the implementation for any object to * publish, subscribe and fire to custom events, and also * alows other EventTargets to target the object with events * sourced from the other object. * EventTarget is designed to be used with Y.augment to wrap * EventCustom in an interface that allows events to be listened to * and fired by name. This makes it possible for implementing code to * subscribe to an event that either has not been created yet, or will * not be created at all. * @class EventTarget * @param opts a configuration object * @config emitFacade {boolean} if true, all events will emit event * facade payloads by default (default false) * @config prefix {String} the prefix to apply to non-prefixed event names */ var L = Y.Lang, PREFIX_DELIMITER = ':', CATEGORY_DELIMITER = '|', AFTER_PREFIX = '~AFTER~', YArray = Y.Array, _wildType = Y.cached(function(type) { return type.replace(/(.*)(:)(.*)/, "*$2$3"); }), /** * If the instance has a prefix attribute and the * event type is not prefixed, the instance prefix is * applied to the supplied type. * @method _getType * @private */ _getType = Y.cached(function(type, pre) { if (!pre || !L.isString(type) || type.indexOf(PREFIX_DELIMITER) > -1) { return type; } return pre + PREFIX_DELIMITER + type; }), /** * Returns an array with the detach key (if provided), * and the prefixed event name from _getType * Y.on('detachcategory| menu:click', fn) * @method _parseType * @private */ _parseType = Y.cached(function(type, pre) { var t = type, detachcategory, after, i; if (!L.isString(t)) { return t; } i = t.indexOf(AFTER_PREFIX); if (i > -1) { after = true; t = t.substr(AFTER_PREFIX.length); // Y.log(t); } i = t.indexOf(CATEGORY_DELIMITER); if (i > -1) { detachcategory = t.substr(0, (i)); t = t.substr(i+1); if (t == '*') { t = null; } } // detach category, full type with instance prefix, is this an after listener, short type return [detachcategory, (pre) ? _getType(t, pre) : t, after, t]; }), ET = function(opts) { // Y.log('EventTarget constructor executed: ' + this._yuid); var o = (L.isObject(opts)) ? opts : {}; this._yuievt = this._yuievt || { id: Y.guid(), events: {}, targets: {}, config: o, chain: ('chain' in o) ? o.chain : Y.config.chain, bubbling: false, defaults: { context: o.context || this, host: this, emitFacade: o.emitFacade, fireOnce: o.fireOnce, queuable: o.queuable, monitored: o.monitored, broadcast: o.broadcast, defaultTargetOnly: o.defaultTargetOnly, bubbles: ('bubbles' in o) ? o.bubbles : true } }; }; ET.prototype = { constructor: ET, /** * Listen to a custom event hosted by this object one time. * This is the equivalent to <code>on</code> except the * listener is immediatelly detached when it is executed. * @method once * @param {String} type The name of the event * @param {Function} fn The callback to execute in response to the event * @param {Object} [context] Override `this` object in callback * @param {Any} [arg*] 0..n additional arguments to supply to the subscriber * @return {EventHandle} A subscription handle capable of detaching the * subscription */ once: function() { var handle = this.on.apply(this, arguments); handle.batch(function(hand) { if (hand.sub) { hand.sub.once = true; } }); return handle; }, /** * Listen to a custom event hosted by this object one time. * This is the equivalent to <code>after</code> except the * listener is immediatelly detached when it is executed. * @method onceAfter * @param {String} type The name of the event * @param {Function} fn The callback to execute in response to the event * @param {Object} [context] Override `this` object in callback * @param {Any} [arg*] 0..n additional arguments to supply to the subscriber * @return {EventHandle} A subscription handle capable of detaching that * subscription */ onceAfter: function() { var handle = this.after.apply(this, arguments); handle.batch(function(hand) { if (hand.sub) { hand.sub.once = true; } }); return handle; }, /** * Takes the type parameter passed to 'on' and parses out the * various pieces that could be included in the type. If the * event type is passed without a prefix, it will be expanded * to include the prefix one is supplied or the event target * is configured with a default prefix. * @method parseType * @param {String} type the type * @param {String} [pre=this._yuievt.config.prefix] the prefix * @since 3.3.0 * @return {Array} an array containing: * * the detach category, if supplied, * * the prefixed event type, * * whether or not this is an after listener, * * the supplied event type */ parseType: function(type, pre) { return _parseType(type, pre || this._yuievt.config.prefix); }, /** * Subscribe a callback function to a custom event fired by this object or * from an object that bubbles its events to this object. * * Callback functions for events published with `emitFacade = true` will * receive an `EventFacade` as the first argument (typically named "e"). * These callbacks can then call `e.preventDefault()` to disable the * behavior published to that event's `defaultFn`. See the `EventFacade` * API for all available properties and methods. Subscribers to * non-`emitFacade` events will receive the arguments passed to `fire()` * after the event name. * * To subscribe to multiple events at once, pass an object as the first * argument, where the key:value pairs correspond to the eventName:callback, * or pass an array of event names as the first argument to subscribe to * all listed events with the same callback. * * Returning `false` from a callback is supported as an alternative to * calling `e.preventDefault(); e.stopPropagation();`. However, it is * recommended to use the event methods whenever possible. * * @method on * @param {String} type The name of the event * @param {Function} fn The callback to execute in response to the event * @param {Object} [context] Override `this` object in callback * @param {Any} [arg*] 0..n additional arguments to supply to the subscriber * @return {EventHandle} A subscription handle capable of detaching that * subscription */ on: function(type, fn, context) { var parts = _parseType(type, this._yuievt.config.prefix), f, c, args, ret, ce, detachcategory, handle, store = Y.Env.evt.handles, after, adapt, shorttype, Node = Y.Node, n, domevent, isArr; // full name, args, detachcategory, after this._monitor('attach', parts[1], { args: arguments, category: parts[0], after: parts[2] }); if (L.isObject(type)) { if (L.isFunction(type)) { return Y.Do.before.apply(Y.Do, arguments); } f = fn; c = context; args = YArray(arguments, 0, true); ret = []; if (L.isArray(type)) { isArr = true; } after = type._after; delete type._after; Y.each(type, function(v, k) { if (L.isObject(v)) { f = v.fn || ((L.isFunction(v)) ? v : f); c = v.context || c; } var nv = (after) ? AFTER_PREFIX : ''; args[0] = nv + ((isArr) ? v : k); args[1] = f; args[2] = c; ret.push(this.on.apply(this, args)); }, this); return (this._yuievt.chain) ? this : new Y.EventHandle(ret); } detachcategory = parts[0]; after = parts[2]; shorttype = parts[3]; // extra redirection so we catch adaptor events too. take a look at this. if (Node && Y.instanceOf(this, Node) && (shorttype in Node.DOM_EVENTS)) { args = YArray(arguments, 0, true); args.splice(2, 0, Node.getDOMNode(this)); // Y.log("Node detected, redirecting with these args: " + args); return Y.on.apply(Y, args); } type = parts[1]; if (Y.instanceOf(this, YUI)) { adapt = Y.Env.evt.plugins[type]; args = YArray(arguments, 0, true); args[0] = shorttype; if (Node) { n = args[2]; if (Y.instanceOf(n, Y.NodeList)) { n = Y.NodeList.getDOMNodes(n); } else if (Y.instanceOf(n, Node)) { n = Node.getDOMNode(n); } domevent = (shorttype in Node.DOM_EVENTS); // Captures both DOM events and event plugins. if (domevent) { args[2] = n; } } // check for the existance of an event adaptor if (adapt) { Y.log('Using adaptor for ' + shorttype + ', ' + n, 'info', 'event'); handle = adapt.on.apply(Y, args); } else if ((!type) || domevent) { handle = Y.Event._attach(args); } } if (!handle) { ce = this._yuievt.events[type] || this.publish(type); handle = ce._on(fn, context, (arguments.length > 3) ? YArray(arguments, 3, true) : null, (after) ? 'after' : true); } if (detachcategory) { store[detachcategory] = store[detachcategory] || {}; store[detachcategory][type] = store[detachcategory][type] || []; store[detachcategory][type].push(handle); } return (this._yuievt.chain) ? this : handle; }, /** * subscribe to an event * @method subscribe * @deprecated use on */ subscribe: function() { Y.log('EventTarget subscribe() is deprecated, use on()', 'warn', 'deprecated'); return this.on.apply(this, arguments); }, /** * Detach one or more listeners the from the specified event * @method detach * @param type {string|Object} Either the handle to the subscriber or the * type of event. If the type * is not specified, it will attempt to remove * the listener from all hosted events. * @param fn {Function} The subscribed function to unsubscribe, if not * supplied, all subscribers will be removed. * @param context {Object} The custom object passed to subscribe. This is * optional, but if supplied will be used to * disambiguate multiple listeners that are the same * (e.g., you subscribe many object using a function * that lives on the prototype) * @return {EventTarget} the host */ detach: function(type, fn, context) { var evts = this._yuievt.events, i, Node = Y.Node, isNode = Node && (Y.instanceOf(this, Node)); // detachAll disabled on the Y instance. if (!type && (this !== Y)) { for (i in evts) { if (evts.hasOwnProperty(i)) { evts[i].detach(fn, context); } } if (isNode) { Y.Event.purgeElement(Node.getDOMNode(this)); } return this; } var parts = _parseType(type, this._yuievt.config.prefix), detachcategory = L.isArray(parts) ? parts[0] : null, shorttype = (parts) ? parts[3] : null, adapt, store = Y.Env.evt.handles, detachhost, cat, args, ce, keyDetacher = function(lcat, ltype, host) { var handles = lcat[ltype], ce, i; if (handles) { for (i = handles.length - 1; i >= 0; --i) { ce = handles[i].evt; if (ce.host === host || ce.el === host) { handles[i].detach(); } } } }; if (detachcategory) { cat = store[detachcategory]; type = parts[1]; detachhost = (isNode) ? Y.Node.getDOMNode(this) : this; if (cat) { if (type) { keyDetacher(cat, type, detachhost); } else { for (i in cat) { if (cat.hasOwnProperty(i)) { keyDetacher(cat, i, detachhost); } } } return this; } // If this is an event handle, use it to detach } else if (L.isObject(type) && type.detach) { type.detach(); return this; // extra redirection so we catch adaptor events too. take a look at this. } else if (isNode && ((!shorttype) || (shorttype in Node.DOM_EVENTS))) { args = YArray(arguments, 0, true); args[2] = Node.getDOMNode(this); Y.detach.apply(Y, args); return this; } adapt = Y.Env.evt.plugins[shorttype]; // The YUI instance handles DOM events and adaptors if (Y.instanceOf(this, YUI)) { args = YArray(arguments, 0, true); // use the adaptor specific detach code if if (adapt && adapt.detach) { adapt.detach.apply(Y, args); return this; // DOM event fork } else if (!type || (!adapt && Node && (type in Node.DOM_EVENTS))) { args[0] = type; Y.Event.detach.apply(Y.Event, args); return this; } } // ce = evts[type]; ce = evts[parts[1]]; if (ce) { ce.detach(fn, context); } return this; }, /** * detach a listener * @method unsubscribe * @deprecated use detach */ unsubscribe: function() { Y.log('EventTarget unsubscribe() is deprecated, use detach()', 'warn', 'deprecated'); return this.detach.apply(this, arguments); }, /** * Removes all listeners from the specified event. If the event type * is not specified, all listeners from all hosted custom events will * be removed. * @method detachAll * @param type {String} The type, or name of the event */ detachAll: function(type) { return this.detach(type); }, /** * Removes all listeners from the specified event. If the event type * is not specified, all listeners from all hosted custom events will * be removed. * @method unsubscribeAll * @param type {String} The type, or name of the event * @deprecated use detachAll */ unsubscribeAll: function() { Y.log('EventTarget unsubscribeAll() is deprecated, use detachAll()', 'warn', 'deprecated'); return this.detachAll.apply(this, arguments); }, /** * Creates a new custom event of the specified type. If a custom event * by that name already exists, it will not be re-created. In either * case the custom event is returned. * * @method publish * * @param type {String} the type, or name of the event * @param opts {object} optional config params. Valid properties are: * * <ul> * <li> * 'broadcast': whether or not the YUI instance and YUI global are notified when the event is fired (false) * </li> * <li> * 'bubbles': whether or not this event bubbles (true) * Events can only bubble if emitFacade is true. * </li> * <li> * 'context': the default execution context for the listeners (this) * </li> * <li> * 'defaultFn': the default function to execute when this event fires if preventDefault was not called * </li> * <li> * 'emitFacade': whether or not this event emits a facade (false) * </li> * <li> * 'prefix': the prefix for this targets events, e.g., 'menu' in 'menu:click' * </li> * <li> * 'fireOnce': if an event is configured to fire once, new subscribers after * the fire will be notified immediately. * </li> * <li> * 'async': fireOnce event listeners will fire synchronously if the event has already * fired unless async is true. * </li> * <li> * 'preventable': whether or not preventDefault() has an effect (true) * </li> * <li> * 'preventedFn': a function that is executed when preventDefault is called * </li> * <li> * 'queuable': whether or not this event can be queued during bubbling (false) * </li> * <li> * 'silent': if silent is true, debug messages are not provided for this event. * </li> * <li> * 'stoppedFn': a function that is executed when stopPropagation is called * </li> * * <li> * 'monitored': specifies whether or not this event should send notifications about * when the event has been attached, detached, or published. * </li> * <li> * 'type': the event type (valid option if not provided as the first parameter to publish) * </li> * </ul> * * @return {CustomEvent} the custom event * */ publish: function(type, opts) { var events, ce, ret, defaults, edata = this._yuievt, pre = edata.config.prefix; if (L.isObject(type)) { ret = {}; Y.each(type, function(v, k) { ret[k] = this.publish(k, v || opts); }, this); return ret; } type = (pre) ? _getType(type, pre) : type; this._monitor('publish', type, { args: arguments }); events = edata.events; ce = events[type]; if (ce) { // ce.log("publish applying new config to published event: '"+type+"' exists", 'info', 'event'); if (opts) { ce.applyConfig(opts, true); } } else { defaults = edata.defaults; // apply defaults ce = new Y.CustomEvent(type, (opts) ? Y.merge(defaults, opts) : defaults); events[type] = ce; } // make sure we turn the broadcast flag off if this // event was published as a result of bubbling // if (opts instanceof Y.CustomEvent) { // events[type].broadcast = false; // } return events[type]; }, /** * This is the entry point for the event monitoring system. * You can monitor 'attach', 'detach', 'fire', and 'publish'. * When configured, these events generate an event. click -> * click_attach, click_detach, click_publish -- these can * be subscribed to like other events to monitor the event * system. Inividual published events can have monitoring * turned on or off (publish can't be turned off before it * it published) by setting the events 'monitor' config. * * @method _monitor * @param what {String} 'attach', 'detach', 'fire', or 'publish' * @param type {String} Name of the event being monitored * @param o {Object} Information about the event interaction, such as * fire() args, subscription category, publish config * @private */ _monitor: function(what, type, o) { var monitorevt, ce = this.getEvent(type); if ((this._yuievt.config.monitored && (!ce || ce.monitored)) || (ce && ce.monitored)) { monitorevt = type + '_' + what; // Y.log('monitoring: ' + monitorevt); o.monitored = what; this.fire.call(this, monitorevt, o); } }, /** * Fire a custom event by name. The callback functions will be executed * from the context specified when the event was created, and with the * following parameters. * * If the custom event object hasn't been created, then the event hasn't * been published and it has no subscribers. For performance sake, we * immediate exit in this case. This means the event won't bubble, so * if the intention is that a bubble target be notified, the event must * be published on this object first. * * The first argument is the event type, and any additional arguments are * passed to the listeners as parameters. If the first of these is an * object literal, and the event is configured to emit an event facade, * that object is mixed into the event facade and the facade is provided * in place of the original object. * * @method fire * @param type {String|Object} The type of the event, or an object that contains * a 'type' property. * @param arguments {Object*} an arbitrary set of parameters to pass to * the handler. If the first of these is an object literal and the event is * configured to emit an event facade, the event facade will replace that * parameter after the properties the object literal contains are copied to * the event facade. * @return {EventTarget} the event host * */ fire: function(type) { var typeIncluded = L.isString(type), t = (typeIncluded) ? type : (type && type.type), ce, ret, pre = this._yuievt.config.prefix, ce2, args = (typeIncluded) ? YArray(arguments, 1, true) : arguments; t = (pre) ? _getType(t, pre) : t; this._monitor('fire', t, { args: args }); ce = this.getEvent(t, true); ce2 = this.getSibling(t, ce); if (ce2 && !ce) { ce = this.publish(t); } // this event has not been published or subscribed to if (!ce) { if (this._yuievt.hasTargets) { return this.bubble({ type: t }, args, this); } // otherwise there is nothing to be done ret = true; } else { ce.sibling = ce2; ret = ce.fire.apply(ce, args); } return (this._yuievt.chain) ? this : ret; }, getSibling: function(type, ce) { var ce2; // delegate to *:type events if there are subscribers if (type.indexOf(PREFIX_DELIMITER) > -1) { type = _wildType(type); // console.log(type); ce2 = this.getEvent(type, true); if (ce2) { // console.log("GOT ONE: " + type); ce2.applyConfig(ce); ce2.bubbles = false; ce2.broadcast = 0; // ret = ce2.fire.apply(ce2, a); } } return ce2; }, /** * Returns the custom event of the provided type has been created, a * falsy value otherwise * @method getEvent * @param type {String} the type, or name of the event * @param prefixed {String} if true, the type is prefixed already * @return {CustomEvent} the custom event or null */ getEvent: function(type, prefixed) { var pre, e; if (!prefixed) { pre = this._yuievt.config.prefix; type = (pre) ? _getType(type, pre) : type; } e = this._yuievt.events; return e[type] || null; }, /** * Subscribe to a custom event hosted by this object. The * supplied callback will execute after any listeners add * via the subscribe method, and after the default function, * if configured for the event, has executed. * * @method after * @param {String} type The name of the event * @param {Function} fn The callback to execute in response to the event * @param {Object} [context] Override `this` object in callback * @param {Any} [arg*] 0..n additional arguments to supply to the subscriber * @return {EventHandle} A subscription handle capable of detaching the * subscription */ after: function(type, fn) { var a = YArray(arguments, 0, true); switch (L.type(type)) { case 'function': return Y.Do.after.apply(Y.Do, arguments); case 'array': // YArray.each(a[0], function(v) { // v = AFTER_PREFIX + v; // }); // break; case 'object': a[0]._after = true; break; default: a[0] = AFTER_PREFIX + type; } return this.on.apply(this, a); }, /** * Executes the callback before a DOM event, custom event * or method. If the first argument is a function, it * is assumed the target is a method. For DOM and custom * events, this is an alias for Y.on. * * For DOM and custom events: * type, callback, context, 0-n arguments * * For methods: * callback, object (method host), methodName, context, 0-n arguments * * @method before * @return detach handle */ before: function() { return this.on.apply(this, arguments); } }; Y.EventTarget = ET; // make Y an event target Y.mix(Y, ET.prototype); ET.call(Y, { bubbles: false }); YUI.Env.globalEvents = YUI.Env.globalEvents || new ET(); /** * Hosts YUI page level events. This is where events bubble to * when the broadcast config is set to 2. This property is * only available if the custom event module is loaded. * @property Global * @type EventTarget * @for YUI */ Y.Global = YUI.Env.globalEvents; // @TODO implement a global namespace function on Y.Global? /** `Y.on()` can do many things: <ul> <li>Subscribe to custom events `publish`ed and `fire`d from Y</li> <li>Subscribe to custom events `publish`ed with `broadcast` 1 or 2 and `fire`d from any object in the YUI instance sandbox</li> <li>Subscribe to DOM events</li> <li>Subscribe to the execution of a method on any object, effectively treating that method as an event</li> </ul> For custom event subscriptions, pass the custom event name as the first argument and callback as the second. The `this` object in the callback will be `Y` unless an override is passed as the third argument. Y.on('io:complete', function () { Y.MyApp.updateStatus('Transaction complete'); }); To subscribe to DOM events, pass the name of a DOM event as the first argument and a CSS selector string as the third argument after the callback function. Alternately, the third argument can be a `Node`, `NodeList`, `HTMLElement`, array, or simply omitted (the default is the `window` object). Y.on('click', function (e) { e.preventDefault(); // proceed with ajax form submission var url = this.get('action'); ... }, '#my-form'); The `this` object in DOM event callbacks will be the `Node` targeted by the CSS selector or other identifier. `on()` subscribers for DOM events or custom events `publish`ed with a `defaultFn` can prevent the default behavior with `e.preventDefault()` from the event object passed as the first parameter to the subscription callback. To subscribe to the execution of an object method, pass arguments corresponding to the call signature for <a href="../classes/Do.html#methods_before">`Y.Do.before(...)`</a>. NOTE: The formal parameter list below is for events, not for function injection. See `Y.Do.before` for that signature. @method on @param {String} type DOM or custom event name @param {Function} fn The callback to execute in response to the event @param {Object} [context] Override `this` object in callback @param {Any} [arg*] 0..n additional arguments to supply to the subscriber @return {EventHandle} A subscription handle capable of detaching the subscription @see Do.before @for YUI **/ /** Listen for an event one time. Equivalent to `on()`, except that the listener is immediately detached when executed. See the <a href="#methods_on">`on()` method</a> for additional subscription options. @see on @method once @param {String} type DOM or custom event name @param {Function} fn The callback to execute in response to the event @param {Object} [context] Override `this` object in callback @param {Any} [arg*] 0..n additional arguments to supply to the subscriber @return {EventHandle} A subscription handle capable of detaching the subscription @for YUI **/ /** Listen for an event one time. Equivalent to `once()`, except, like `after()`, the subscription callback executes after all `on()` subscribers and the event's `defaultFn` (if configured) have executed. Like `after()` if any `on()` phase subscriber calls `e.preventDefault()`, neither the `defaultFn` nor the `after()` subscribers will execute. The listener is immediately detached when executed. See the <a href="#methods_on">`on()` method</a> for additional subscription options. @see once @method onceAfter @param {String} type The custom event name @param {Function} fn The callback to execute in response to the event @param {Object} [context] Override `this` object in callback @param {Any} [arg*] 0..n additional arguments to supply to the subscriber @return {EventHandle} A subscription handle capable of detaching the subscription @for YUI **/ /** Like `on()`, this method creates a subscription to a custom event or to the execution of a method on an object. For events, `after()` subscribers are executed after the event's `defaultFn` unless `e.preventDefault()` was called from an `on()` subscriber. See the <a href="#methods_on">`on()` method</a> for additional subscription options. NOTE: The subscription signature shown is for events, not for function injection. See <a href="../classes/Do.html#methods_after">`Y.Do.after`</a> for that signature. @see on @see Do.after @method after @param {String} type The custom event name @param {Function} fn The callback to execute in response to the event @param {Object} [context] Override `this` object in callback @param {Any} [args*] 0..n additional arguments to supply to the subscriber @return {EventHandle} A subscription handle capable of detaching the subscription @for YUI **/ }, '@VERSION@' ,{requires:['oop']});
src/components/mongodb/original/MongodbOriginal.js
fpoumian/react-devicon
import React from 'react' import PropTypes from 'prop-types' import SVGDeviconInline from '../../_base/SVGDeviconInline' import iconSVG from './MongodbOriginal.svg' /** MongodbOriginal */ function MongodbOriginal({ width, height, className }) { return ( <SVGDeviconInline className={'MongodbOriginal' + ' ' + className} iconSVG={iconSVG} width={width} height={height} /> ) } MongodbOriginal.propTypes = { className: PropTypes.string, width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), } export default MongodbOriginal
packages/material-ui-icons/src/PauseCircleFilled.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z" /> , 'PauseCircleFilled');
frontend/src/Settings/MediaManagement/RootFolder/RootFolder.js
lidarr/Lidarr
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import Card from 'Components/Card'; import Label from 'Components/Label'; import ConfirmModal from 'Components/Modal/ConfirmModal'; import { kinds } from 'Helpers/Props'; import EditRootFolderModalConnector from './EditRootFolderModalConnector'; import styles from './RootFolder.css'; class RootFolder extends Component { // // Lifecycle constructor(props, context) { super(props, context); this.state = { isEditRootFolderModalOpen: false, isDeleteRootFolderModalOpen: false }; } // // Listeners onEditRootFolderPress = () => { this.setState({ isEditRootFolderModalOpen: true }); } onEditRootFolderModalClose = () => { this.setState({ isEditRootFolderModalOpen: false }); } onDeleteRootFolderPress = () => { this.setState({ isEditRootFolderModalOpen: false, isDeleteRootFolderModalOpen: true }); } onDeleteRootFolderModalClose= () => { this.setState({ isDeleteRootFolderModalOpen: false }); } onConfirmDeleteRootFolder = () => { this.props.onConfirmDeleteRootFolder(this.props.id); } // // Render render() { const { id, name, path, qualityProfile, metadataProfile } = this.props; return ( <Card className={styles.rootFolder} overlayContent={true} onPress={this.onEditRootFolderPress} > <div className={styles.name}> {name} </div> <div className={styles.enabled}> <Label kind={kinds.SUCCESS}> {path} </Label> <Label kind={kinds.SUCCESS}> {qualityProfile.name} </Label> <Label kind={kinds.SUCCESS}> {metadataProfile.name} </Label> </div> <EditRootFolderModalConnector id={id} isOpen={this.state.isEditRootFolderModalOpen} onModalClose={this.onEditRootFolderModalClose} onDeleteRootFolderPress={this.onDeleteRootFolderPress} /> <ConfirmModal isOpen={this.state.isDeleteRootFolderModalOpen} kind={kinds.DANGER} title="Delete Root Folder" message={`Are you sure you want to delete the root folder '${name}'?`} confirmLabel="Delete" onConfirm={this.onConfirmDeleteRootFolder} onCancel={this.onDeleteRootFolderModalClose} /> </Card> ); } } RootFolder.propTypes = { id: PropTypes.number.isRequired, name: PropTypes.string.isRequired, path: PropTypes.string.isRequired, qualityProfile: PropTypes.object.isRequired, metadataProfile: PropTypes.object.isRequired, onConfirmDeleteRootFolder: PropTypes.func.isRequired }; export default RootFolder;
src/svg-icons/device/signal-cellular-off.js
mmrtnz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceSignalCellularOff = (props) => ( <SvgIcon {...props}> <path d="M21 1l-8.59 8.59L21 18.18V1zM4.77 4.5L3.5 5.77l6.36 6.36L1 21h17.73l2 2L22 21.73 4.77 4.5z"/> </SvgIcon> ); DeviceSignalCellularOff = pure(DeviceSignalCellularOff); DeviceSignalCellularOff.displayName = 'DeviceSignalCellularOff'; DeviceSignalCellularOff.muiName = 'SvgIcon'; export default DeviceSignalCellularOff;
src/svg-icons/content/block.js
ichiohta/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentBlock = (props) => ( <SvgIcon {...props}> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"/> </SvgIcon> ); ContentBlock = pure(ContentBlock); ContentBlock.displayName = 'ContentBlock'; ContentBlock.muiName = 'SvgIcon'; export default ContentBlock;
client/router.js
AlaMurkan-FIFA-Boyz-2017-Dremz2Lyf/Game-Manager-V2
import { Router, browserHistory } from 'react-router'; import React from 'react'; import Home from './components/home'; import App from './components/app'; const routeConfigs = { component: App, path: '/', indexRoute: { component: Home }, childRoutes: [ { path: 'play/:id', getComponent(location, cb) { System.import('./components/play_tournament').then(module => cb(null, module.default)).catch(err => cb(err, null)); } } ] }; const Routes = () => ( <Router history={browserHistory} routes={routeConfigs}/> ); export { Routes as default };
examples/05 Customize/Handles and Previews/index.js
hiddentao/react-dnd
import React from 'react'; import Container from './Container'; export default class CustomizeHandlesAndPreviews { render() { return ( <div> <p> <b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/05%20Customize/Handles%20and%20Previews'>Browse the Source</a></b> </p> <p> React DnD lets you choose the draggable node, as well as the drag preview node in your component's <code>render</code> function. You may also use an <a href='https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image'><code>Image</code></a> instance that you created programmatically once it has loaded. </p> <Container /> </div> ); } }
ajax/libs/material-ui/5.0.0-alpha.23/node/internal/svg-icons/MoreHoriz.js
cdnjs/cdnjs
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(require("react")); var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon")); /** * @ignore - internal component. */ var _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }), 'MoreHoriz'); exports.default = _default;
src/MusicPlayer.js
alickzhang/react-responsive-music-player
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import Progress from './components/Progress'; import './MusicPlayer.scss'; const formatTime = time => { /* eslint no-restricted-globals: off */ if (isNaN(time) || time === 0) { return ''; } const mins = Math.floor(time / 60); const secs = (time % 60).toFixed(); return `${mins < 10 ? '0' : ''}${mins}:${secs < 10 ? '0' : ''}${secs}`; }; const processArtistName = artistList => artistList.join(' / '); const getPlayModeClass = playMode => { if (playMode === 'loop') return 'refresh'; if (playMode === 'random') return 'random'; return 'repeat'; }; export default class MusicPlayer extends Component { static propTypes = { playlist: PropTypes.arrayOf( PropTypes.shape({ url: PropTypes.string, cover: PropTypes.string, title: PropTypes.string, artist: PropTypes.arrayOf(PropTypes.string) }) ).isRequired, mode: PropTypes.oneOf(['horizontal', 'vertical']), width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), autoplay: PropTypes.bool, progressColor: PropTypes.string, btnColor: PropTypes.string, style: PropTypes.object }; static defaultProps = { mode: 'horizontal', width: '100%', autoplay: false, progressColor: '#66cccc', btnColor: '#4a4a4a', style: {} }; constructor(props) { super(props); this.state = { activeMusicIndex: 0, leftTime: 0, play: props.autoplay || false, playMode: 'loop', progress: 0, volume: 1 }; this.modeList = ['loop', 'random', 'repeat']; this.audioContainer = React.createRef(); } componentDidMount() { this.audioContainer.current.addEventListener('timeupdate', this.updateProgress); this.audioContainer.current.addEventListener('ended', this.end); } componentWillUnmount() { this.audioContainer.current.removeEventListener('timeupdate', this.updateProgress); this.audioContainer.current.removeEventListener('ended', this.end); } updateProgress = () => { const { duration, currentTime } = this.audioContainer.current; const progress = currentTime / duration || 0; this.setState({ progress, leftTime: duration - currentTime }); }; end = () => { this.handleNext(); }; handleAdjustProgress = value => { const currentTime = this.audioContainer.current.duration * value; this.audioContainer.current.currentTime = currentTime; this.setState({ play: true, progress: value }, () => this.audioContainer.current.play()); }; handleAdjustVolume = value => { const volume = value < 0 ? 0 : value; this.audioContainer.current.volume = volume; this.setState({ volume }); }; handleToggle = () => { const { play } = this.state; if (play) { this.audioContainer.current.pause(); } else { this.audioContainer.current.play(); } this.setState(({ play }) => ({ play: !play })); }; handlePrev = () => { const { playlist } = this.props; const { playMode, activeMusicIndex } = this.state; if (playMode === 'repeat') { this.playMusic(activeMusicIndex); } else if (playMode === 'loop') { const total = playlist.length; const index = activeMusicIndex > 0 ? activeMusicIndex - 1 : total - 1; this.playMusic(index); } else if (playMode === 'random') { let randomIndex = Math.floor(Math.random() * playlist.length); while (randomIndex === activeMusicIndex) { randomIndex = Math.floor(Math.random() * playlist.length); } this.playMusic(randomIndex); } else { this.setState({ play: false }); } }; handleNext = () => { const { playlist } = this.props; const { playMode, activeMusicIndex } = this.state; if (playMode === 'repeat') { this.playMusic(activeMusicIndex); } else if (playMode === 'loop') { const total = playlist.length; const index = activeMusicIndex < total - 1 ? activeMusicIndex + 1 : 0; this.playMusic(index); } else if (playMode === 'random') { let randomIndex = Math.floor(Math.random() * playlist.length); while (randomIndex === activeMusicIndex) { randomIndex = Math.floor(Math.random() * playlist.length); } this.playMusic(randomIndex); } else { this.setState({ play: false }); } }; handleChangePlayMode = () => { const { playMode } = this.state; let index = this.modeList.indexOf(playMode); index = (index + 1) % this.modeList.length; this.setState({ playMode: this.modeList[index] }); }; playMusic = index => { this.setState({ activeMusicIndex: index, leftTime: 0, play: true, progress: 0 }, () => { this.audioContainer.current.currentTime = 0; this.audioContainer.current.play(); }); }; render() { const { playlist, mode, width, progressColor, btnColor, style } = this.props; const { play, progress, leftTime, volume, activeMusicIndex, playMode } = this.state; const activeMusic = playlist[activeMusicIndex]; const playModeClass = getPlayModeClass(playMode); const btnStyle = { color: btnColor }; return ( <div className={classNames('player', { vertical: mode === 'vertical' })} style={{ ...style, width: typeof width === 'string' ? width : `${width}px` }} > <audio autoPlay={play} preload="auto" ref={this.audioContainer} src={activeMusic.url}> <track kind="captions" /> </audio> <div className="player-control"> <div className="music-info"> <h2 className="title">{activeMusic.title}</h2> <h3 className="artist">{processArtistName(activeMusic.artist)}</h3> </div> <div className="time-and-volume"> <div className="time-remaining">-{formatTime(leftTime)}</div> <div className="volume-control"> <i className="volume-icon fa fa-volume-up" /> <div className="volume-bar"> <Progress percent={volume} onClick={this.handleAdjustVolume} /> </div> </div> </div> <Progress percent={progress} strokeColor={progressColor} onClick={this.handleAdjustProgress} /> <div className="controls"> <button type="button" className={`fa fa-${playModeClass}`} style={btnStyle} onClick={this.handleChangePlayMode} /> <button type="button" className="fa fa-step-backward" style={btnStyle} onClick={this.handlePrev} /> <button type="button" className={`fa fa-${play ? 'pause' : 'play'}`} style={btnStyle} onClick={this.handleToggle} /> <button type="button" className="fa fa-step-forward" style={btnStyle} onClick={this.handleNext} /> </div> </div> <div className="player-cover" style={{ backgroundImage: `url(${activeMusic.cover})` }} /> </div> ); } }
apps/chat_app/web/static/js/containers/Root.js
nemanja-m/ex-chat
import React, { Component } from 'react'; import { connect } from 'react-redux'; import ChatRoom from './ChatRoom'; import Signup from './Signup'; import Login from './Login'; import AuthenticationRoute from '../components/AuthenticationRoute'; import { ConnectedRouter } from 'react-router-redux'; import { connectToSocket } from '../actions/session' class Root extends Component { componentDidMount() { // Connect to Phoenix web socket. if (!this.props.socket) { this.props.connectToSocket(); } } render() { const { currentUser } = this.props; const authenticated = { visibility: 'AUTHENTICATED', currentUser }; const unauthenticated = { visibility: 'UNAUTHENTICATED', currentUser }; return ( <ConnectedRouter history={this.props.history}> <div> <AuthenticationRoute exact path="/" component={ChatRoom} {...authenticated} /> <AuthenticationRoute path="/signup" component={Signup} {...unauthenticated} /> <AuthenticationRoute path="/login" component={Login} {...unauthenticated} /> </div> </ConnectedRouter> ); } } const mapStateToProps = (state) => { return { currentUser: state.session.currentUser, socket: state.session.socket }; }; const mapDispatchToProps = (dispatch) => { return { connectToSocket: () => { dispatch(connectToSocket()); } }; }; export default connect( mapStateToProps, mapDispatchToProps )(Root);
src/renderers/dom/shared/DOMProperty.js
pze/react
/** * 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 DOMProperty * @typechecks static-only */ 'use strict'; var invariant = require('invariant'); function checkMask(value, bitmask) { return (value & bitmask) === bitmask; } var DOMPropertyInjection = { /** * Mapping from normalized, camelcased property names to a configuration that * specifies how the associated DOM property should be accessed or rendered. */ MUST_USE_ATTRIBUTE: 0x1, MUST_USE_PROPERTY: 0x2, HAS_SIDE_EFFECTS: 0x4, HAS_BOOLEAN_VALUE: 0x8, HAS_NUMERIC_VALUE: 0x10, HAS_POSITIVE_NUMERIC_VALUE: 0x20 | 0x10, HAS_OVERLOADED_BOOLEAN_VALUE: 0x40, /** * Inject some specialized knowledge about the DOM. This takes a config object * with the following properties: * * isCustomAttribute: function that given an attribute name will return true * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* * attributes where it's impossible to enumerate all of the possible * attribute names, * * Properties: object mapping DOM property name to one of the * DOMPropertyInjection constants or null. If your attribute isn't in here, * it won't get written to the DOM. * * DOMAttributeNames: object mapping React attribute name to the DOM * attribute name. Attribute names not specified use the **lowercase** * normalized name. * * DOMAttributeNamespaces: object mapping React attribute name to the DOM * attribute namespace URL. (Attribute names not specified use no namespace.) * * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. * Property names not specified use the normalized name. * * DOMMutationMethods: Properties that require special mutation methods. If * `value` is undefined, the mutation method should unset the property. * * @param {object} domPropertyConfig the config as described above. */ injectDOMPropertyConfig: function(domPropertyConfig) { var Injection = DOMPropertyInjection; var Properties = domPropertyConfig.Properties || {}; var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; if (domPropertyConfig.isCustomAttribute) { DOMProperty._isCustomAttributeFunctions.push( domPropertyConfig.isCustomAttribute ); } for (var propName in Properties) { invariant( !DOMProperty.properties.hasOwnProperty(propName), 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + '\'%s\' which has already been injected. You may be accidentally ' + 'injecting the same DOM property config twice, or you may be ' + 'injecting two configs that have conflicting property names.', propName ); var lowerCased = propName.toLowerCase(); var propConfig = Properties[propName]; var propertyInfo = { attributeName: lowerCased, attributeNamespace: null, propertyName: propName, mutationMethod: null, mustUseAttribute: checkMask(propConfig, Injection.MUST_USE_ATTRIBUTE), mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), hasSideEffects: checkMask(propConfig, Injection.HAS_SIDE_EFFECTS), hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE), }; invariant( !propertyInfo.mustUseAttribute || !propertyInfo.mustUseProperty, 'DOMProperty: Cannot require using both attribute and property: %s', propName ); invariant( propertyInfo.mustUseProperty || !propertyInfo.hasSideEffects, 'DOMProperty: Properties that have side effects must use property: %s', propName ); invariant( propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1, 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + 'numeric value, but not a combination: %s', propName ); if (__DEV__) { DOMProperty.getPossibleStandardName[lowerCased] = propName; } if (DOMAttributeNames.hasOwnProperty(propName)) { var attributeName = DOMAttributeNames[propName]; propertyInfo.attributeName = attributeName; if (__DEV__) { DOMProperty.getPossibleStandardName[attributeName] = propName; } } if (DOMAttributeNamespaces.hasOwnProperty(propName)) { propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; } if (DOMPropertyNames.hasOwnProperty(propName)) { propertyInfo.propertyName = DOMPropertyNames[propName]; } if (DOMMutationMethods.hasOwnProperty(propName)) { propertyInfo.mutationMethod = DOMMutationMethods[propName]; } DOMProperty.properties[propName] = propertyInfo; } }, }; var defaultValueCache = {}; /** * DOMProperty exports lookup objects that can be used like functions: * * > DOMProperty.isValid['id'] * true * > DOMProperty.isValid['foobar'] * undefined * * Although this may be confusing, it performs better in general. * * @see http://jsperf.com/key-exists * @see http://jsperf.com/key-missing */ var DOMProperty = { ID_ATTRIBUTE_NAME: 'data-reactid', /** * Map from property "standard name" to an object with info about how to set * the property in the DOM. Each object contains: * * attributeName: * Used when rendering markup or with `*Attribute()`. * attributeNamespace * propertyName: * Used on DOM node instances. (This includes properties that mutate due to * external factors.) * mutationMethod: * If non-null, used instead of the property or `setAttribute()` after * initial render. * mustUseAttribute: * Whether the property must be accessed and mutated using `*Attribute()`. * (This includes anything that fails `<propName> in <element>`.) * mustUseProperty: * Whether the property must be accessed and mutated as an object property. * hasSideEffects: * Whether or not setting a value causes side effects such as triggering * resources to be loaded or text selection changes. If true, we read from * the DOM before updating to ensure that the value is only set if it has * changed. * hasBooleanValue: * Whether the property should be removed when set to a falsey value. * hasNumericValue: * Whether the property must be numeric or parse as a numeric and should be * removed when set to a falsey value. * hasPositiveNumericValue: * Whether the property must be positive numeric or parse as a positive * numeric and should be removed when set to a falsey value. * hasOverloadedBooleanValue: * Whether the property can be used as a flag as well as with a value. * Removed when strictly equal to false; present without a value when * strictly equal to true; present with a value otherwise. */ properties: {}, /** * Mapping from lowercase property names to the properly cased version, used * to warn in the case of missing properties. Available only in __DEV__. * @type {Object} */ getPossibleStandardName: __DEV__ ? {} : null, /** * All of the isCustomAttribute() functions that have been injected. */ _isCustomAttributeFunctions: [], /** * Checks whether a property name is a custom attribute. * @method */ isCustomAttribute: function(attributeName) { for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; if (isCustomAttributeFn(attributeName)) { return true; } } return false; }, /** * Returns the default property value for a DOM property (i.e., not an * attribute). Most default values are '' or false, but not all. Worse yet, * some (in particular, `type`) vary depending on the type of element. * * TODO: Is it better to grab all the possible properties when creating an * element to avoid having to create the same element twice? */ getDefaultValueForProperty: function(nodeName, prop) { var nodeDefaults = defaultValueCache[nodeName]; var testElement; if (!nodeDefaults) { defaultValueCache[nodeName] = nodeDefaults = {}; } if (!(prop in nodeDefaults)) { testElement = document.createElement(nodeName); nodeDefaults[prop] = testElement[prop]; } return nodeDefaults[prop]; }, injection: DOMPropertyInjection, }; module.exports = DOMProperty;
examples/pinterest/app.js
pjuke/react-router
import React from 'react' import { createHistory, useBasename } from 'history' import { Router, Route, IndexRoute, Link } from 'react-router' const history = useBasename(createHistory)({ basename: '/pinterest' }) const PICTURES = [ { id: 0, src: 'http://placekitten.com/601/601' }, { id: 1, src: 'http://placekitten.com/610/610' }, { id: 2, src: 'http://placekitten.com/620/620' } ] var Modal = React.createClass({ styles: { position: 'fixed', top: '20%', right: '20%', bottom: '20%', left: '20%', padding: 20, boxShadow: '0px 0px 150px 130px rgba(0, 0, 0, 0.5)', overflow: 'auto', background: '#fff' }, render () { return ( <div style={this.styles}> <p><Link to={this.props.returnTo}>Back</Link></p> {this.props.children} </div> ) } }) var App = React.createClass({ componentWillReceiveProps (nextProps) { // if we changed routes... if (( nextProps.location.key !== this.props.location.key && nextProps.location.state && nextProps.location.state.modal )) { // save the old children (just like animation) this.previousChildren = this.props.children } }, render() { var { location } = this.props var isModal = ( location.state && location.state.modal && this.previousChildren ) return ( <div> <h1>Pinterest Style Routes</h1> <div> {isModal ? this.previousChildren : this.props.children } {isModal && ( <Modal isOpen={true} returnTo={location.state.returnTo}> {this.props.children} </Modal> )} </div> </div> ) } }) var Index = React.createClass({ render () { return ( <div> <p> The url `/pictures/:id` can be rendered anywhere in the app as a modal. Simply put `modal: true` in the `state` prop of links. </p> <p> Click on an item and see its rendered as a modal, then copy/paste the url into a different browser window (with a different session, like Chrome -> Firefox), and see that the image does not render inside the overlay. One URL, two session dependent screens :D </p> <div> {PICTURES.map(picture => ( <Link key={picture.id} to={`/pictures/${picture.id}`} state={{ modal: true, returnTo: this.props.location.pathname }}> <img style={{ margin: 10 }} src={picture.src} height="100" /> </Link> ))} </div> <p><Link to="/some/123/deep/456/route">Go to some deep route</Link></p> </div> ) } }) var Deep = React.createClass({ render () { return ( <div> <p>You can link from anywhere really deep too</p> <p>Params stick around: {this.props.params.one} {this.props.params.two}</p> <p> <Link to={`/pictures/0`} state={{ modal: true, returnTo: this.props.location.pathname}}> Link to picture with Modal </Link><br/> <Link to={`/pictures/0`}> Without modal </Link> </p> </div> ) } }) var Picture = React.createClass({ render() { return ( <div> <img src={PICTURES[this.props.params.id].src} style={{ height: '80%' }} /> </div> ) } }) React.render(( <Router history={history}> <Route path="/" component={App}> <IndexRoute component={Index}/> <Route path="/pictures/:id" component={Picture}/> <Route path="/some/:one/deep/:two/route" component={Deep}/> </Route> </Router> ), document.getElementById('example'))
quick-bench/src/setupTests.js
FredTingaud/quick-bench-front-end
import { configure } from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; configure({ adapter: new Adapter() });
src/routes/ForgotPassword/containers/ForgotPasswordContainer.js
Terrapin-Ticketing/althea
import { connect } from 'react-redux'; const mapDispatchToProps = require('../modules/forgotPassword'); /* This is a container component. Notice it does not contain any JSX, nor does it import React. This component is **only** responsible for wiring in the actions and state necessary to render a presentational component - in this case, the counter: */ import ForgotPassword from '../components/ForgotPassword'; /* Object of action creators (can also be function that returns object). Keys will be passed as props to presentational components. Here we are implementing our wrapper around increment; the component doesn't care */ const mapStateToProps = (state) => { return { }; }; /* Note: mapStateToProps is where you should use `reselect` to create selectors, ie: import { createSelector } from 'reselect' const counter = (state) => state.counter const tripleCount = createSelector(counter, (count) => count * 3) const mapStateToProps = (state) => ({ counter: tripleCount(state) }) Selectors can compute derived data, allowing Redux to store the minimal possible state. Selectors are efficient. A selector is not recomputed unless one of its arguments change. Selectors are composable. They can be used as input to other selectors. https://github.com/reactjs/reselect */ export default connect(mapStateToProps, mapDispatchToProps)(ForgotPassword);
packages/material-ui-icons/legacy/Battery80Outlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V9h10V5.33z" /><path d="M7 9v11.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V9H7z" /></React.Fragment> , 'Battery80Outlined');
stories/demos/basic.stories.js
jquense/react-big-calendar
import React from 'react' import moment from 'moment' import { Calendar, momentLocalizer } from '../../src' import Basic from './exampleCode/basic' export default { title: 'Examples', component: Calendar, parameters: { docs: { page: null, }, }, } const localizer = momentLocalizer(moment) export function Example1() { return <Basic localizer={localizer} /> } Example1.storyName = 'Basic Demo'
src/components/topic/related/related-as-cards.js
twreporter/twreporter-react
import { shortenString } from '../../../utils/string' import base from './base' import Image from '@twreporter/react-article-components/lib/components/img-with-placeholder' import mq from '../../../utils/media-query' import React from 'react' import styled from 'styled-components' const ImageBorder = styled.div` ${mq.tabletAndAbove` position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0 solid #ffffff; transition: border .1s ease; `} ` const ItemsContainer = styled(base.ItemsContainer)` ${mq.tabletAndAbove` padding: 0 5%; display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; `} ` const ItemLink = styled(base.ItemLink)` ${mq.tabletAndAbove` flex: 0 0 300px; width: 300px; margin: 0 10px 50px 10px; box-shadow: none; transition: top .1s ease, box-shadow .2s ease, transform .1s ease; display: ${props => (props.hide ? 'none' : 'flex')}; flex-direction: column; &::before { transition: border-width .1s ease-out; content: ""; width: 0; height: 0; top: -2px; left: -2px; position: absolute; z-index: 5; border-style: solid; border-width: 25px 25px 0 0; border-color: #fff transparent transparent; } :hover { &::before { border-width: 0; } transform: translateY(-5px); box-shadow: 0 5px 15px 0 rgba(0,0,0,.25); ${base.ItemMeta} { transform: translateY(0); } ${ImageBorder} { border: 5px solid #ffffff; } ${base.ItemImageSizing}, ${base.ItemMeta} { box-shadow: none; } } `} ` const ItemImageSizing = styled(base.ItemImageSizing)` ${mq.tabletAndAbove` width: 100%; height: 200px; flex: 0 0 200px; position: relative; box-shadow: 0 2px 5px 0 rgba(0,0,0,.1); transition: box-shadow .1s ease, transform .2s ease; `} ` const ItemMeta = styled(base.ItemMeta)` ${mq.tabletAndAbove` width: 100%; height: 222px; flex: 1 0 222px; position: relative; transform: translateY(5px); padding: 17px 12px 2.5em 20px; box-shadow: 0 2px 5px 0 rgba(0,0,0,.1); transition: box-shadow .1s ease, transform .2s ease; `} ` const Date = styled(base.ItemDate)` position: absolute; right: 15px; bottom: 18px; ` const textLimit = { desc: 59, } class Item extends base.Item { render() { const { linkTo, linkTarget, image, title, description, publishedDate, hide, } = this.props return ( <ItemLink to={linkTo} target={linkTarget} hide={ hide || undefined } /* passing hide={false} to react-router Link will cause warning */ > <ItemImageSizing> <Image alt={title} defaultImage={image} imageSet={[image]} objectFit="cover" /> <ImageBorder /> </ItemImageSizing> <ItemMeta> <base.ItemTitle>{title}</base.ItemTitle> <base.ItemDescription> {shortenString(description, textLimit.desc)} </base.ItemDescription> <Date>{publishedDate}</Date> </ItemMeta> </ItemLink> ) } } export default { ItemsContainer, Item, }
src/parser/warlock/demonology/modules/talents/InnerDemons.js
FaideWW/WoWAnalyzer
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import { formatThousands } from 'common/format'; import StatisticListBoxItem from 'interface/others/StatisticListBoxItem'; import DemoPets from '../pets/DemoPets'; import PETS from '../pets/PETS'; import { RANDOM_PET_GUIDS } from '../pets/CONSTANTS'; class InnerDemons extends Analyzer { static dependencies = { demoPets: DemoPets, }; constructor(...args) { super(...args); this.active = this.selectedCombatant.hasTalent(SPELLS.INNER_DEMONS_TALENT.id); } get damage() { const wildImps = this.demoPets.getPetDamage(PETS.WILD_IMP_INNER_DEMONS.guid); const otherPetsSummonedByID = this.demoPets.timeline.filter(pet => RANDOM_PET_GUIDS.includes(pet.guid) && pet.summonedBy === SPELLS.INNER_DEMONS_TALENT.id); const other = otherPetsSummonedByID .map(pet => this.demoPets.getPetDamage(pet.guid, pet.instance)) .reduce((total, current) => total + current, 0); return wildImps + other; } subStatistic() { const damage = this.damage; return ( <StatisticListBoxItem title={<><SpellLink id={SPELLS.INNER_DEMONS_TALENT.id} /> damage</>} value={formatThousands(damage)} valueTooltip={`${this.owner.formatItemDamageDone(damage)}<br /> Note that this only counts the direct damage from them, not Implosion damage (if used) from Wild Imps`} /> ); } } export default InnerDemons;
kcfinder/cache/base.js
yutuo/wp-kcfinder
/*! 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});/*! jQuery UI - v1.10.4 - 2014-02-09 * http://jqueryui.com * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ (function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,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,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),k=t.position.getScrollInfo(y),w=(e.collision||"flip").split(" "),D={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=h.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=h.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),D[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),a=i(D.at,p,g),v.left+=a[0],v.top+=a[1],this.each(function(){var n,h,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),x=u+f+s(this,"marginRight")+k.width,C=d+_+s(this,"marginBottom")+k.height,M=t.extend({},v),T=i(D.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?M.left-=u:"center"===e.my[0]&&(M.left-=u/2),"bottom"===e.my[1]?M.top-=d:"center"===e.my[1]&&(M.top-=d/2),M.left+=T[0],M.top+=T[1],t.support.offsetFractions||(M.left=l(M.left),M.top=l(M.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[w[i]]&&t.ui.position[w[i]][s](M,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:x,collisionHeight:C,offset:[a[0]+T[0],a[1]+T[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(h=function(t){var i=m.left-M.left,s=i+p-u,n=m.top-M.top,a=n+g-d,l={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:M.left,top:M.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(l.horizontal="center"),d>g&&g>r(n+a)&&(l.vertical="middle"),l.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-o-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-o-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-o-a,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",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,drag:null,start:null,stop:null},_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(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<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(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.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"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.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 e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_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(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,a,o,r,l,h,c,u,d,p=t(this).data("ui-draggable"),g=p.options,f=g.snapTolerance,m=i.offset.left,_=m+p.helperProportions.width,v=i.offset.top,b=v+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,l=r+p.snapElements[u].width,h=p.snapElements[u].top,c=h+p.snapElements[u].height,r-f>_||m>l+f||h-f>b||v>c+f||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==g.snapMode&&(s=f>=Math.abs(h-b),n=f>=Math.abs(c-v),a=f>=Math.abs(r-_),o=f>=Math.abs(l-m),s&&(i.position.top=p._convertPositionTo("relative",{top:h-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=s||n||a||o,"outer"!==g.snapMode&&(s=f>=Math.abs(h-v),n=f>=Math.abs(c-b),a=f>=Math.abs(r-m),o=f>=Math.abs(l-_),s&&(i.position.top=p._convertPositionTo("relative",{top:h,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||a||o||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],undefined):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,a,o=(t.positionAbs||t.position.absolute).left,r=(t.positionAbs||t.position.absolute).top,l=o+t.helperProportions.width,h=r+t.helperProportions.height,c=i.offset.left,u=i.offset.top,d=c+i.proportions().width,p=u+i.proportions().height;switch(s){case"fit":return o>=c&&d>=l&&r>=u&&p>=h;case"intersect":return o+t.helperProportions.width/2>c&&d>l-t.helperProportions.width/2&&r+t.helperProportions.height/2>u&&p>h-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,a=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(a,u,i.proportions().height)&&e(n,c,i.proportions().width);case"touch":return(r>=u&&p>=r||h>=u&&p>=h||u>r&&h>p)&&(o>=c&&d>=o||l>=c&&d>=l||c>o&&l>d);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,a=t.ui.ddmanager.droppables[e.options.scope]||[],o=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||e&&!a[s].accept.call(a[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue t}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=t.ui.intersect(e,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),a.length&&(s=t.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}})(jQuery);(function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),a="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,a;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,a),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(t(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),o.containment&&(s+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-a.left||0,d=e.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,a=s?0:c.sizeDiff.width,o={width:c.helper.width()-a,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(o,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,a=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),a&&(t.height=e.maxHeight),o&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),a&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,a=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:o,h=t.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,a,o=t(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,c=o._aspectRatio||e.shiftKey,u={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-u.left),c&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),c&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-u.left:o.offset.left-u.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-u.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=Math.abs(o.parentData.left)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,c&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,c&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,a=e.containerElement,o=t(e.helper),r=o.offset(),h=o.outerWidth()-e.sizeDiff.width,l=o.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(a[e]=i||null)}),e.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,a=e.originalPosition,o=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(o)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.top=a.top-u):/^(sw)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.left=a.left-c):(p-l>0?(e.size.height=p,e.position.top=a.top-u):(e.size.height=l,e.position.top=a.top+n.height-l),d-h>0?(e.size.width=d,e.position.left=a.left-c):(e.size.width=h,e.position.left=a.left+n.width-h))}})})(jQuery);(function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=e.pageX,l=e.pageY;return a>r&&(i=r,r=a,a=i),o>l&&(i=l,l=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:l-o}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?h=!(i.left>r||a>i.right||i.top>l||o>i.bottom):"fit"===n.tolerance&&(h=i.left>a&&r>i.right&&i.top>o&&l>i.bottom),h?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.4",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,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.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(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),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"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){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 e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].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(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[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")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),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(!e){for(this._trigger("beforeStop",t,this._uiHash()),s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(e){var t=0,i={},a={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",a.height=a.paddingTop=a.paddingBottom=a.borderTopWidth=a.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.10.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e(),content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),undefined):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,a=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:n=this.headers[(s+1)%a];break;case i.LEFT:case i.UP:n=this.headers[(s-1+a)%a];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:n=this.headers[0];break;case i.END:n=this.headers[a-1]}n&&(e(t.target).attr("tabIndex",-1),e(n).attr("tabIndex",0),n.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,a=this.options,s=a.heightStyle,n=this.element.parent(),r=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t);this.active=this._findActive(a.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(t){var i=e(this),a=i.attr("id"),s=i.next(),n=s.attr("id");a||(a=r+"-header-"+t,i.attr("id",a)),n||(n=r+"-panel-"+t,s.attr("id",n)),i.attr("aria-controls",n),s.attr("aria-labelledby",a)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(a.event),"fill"===s?(i=n.height(),this.element.siblings(":visible").each(function(){var t=e(this),a=t.css("position");"absolute"!==a&&"fixed"!==a&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(i=0,this.headers.next().each(function(){i=Math.max(i,e(this).css("height","").height())}).height(i))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,a=this.active,s=e(t.currentTarget),n=s[0]===a[0],r=n&&i.collapsible,o=r?e():s.next(),h=a.next(),d={oldHeader:a,oldPanel:h,newHeader:r?e():s,newPanel:o};t.preventDefault(),n&&!i.collapsible||this._trigger("beforeActivate",t,d)===!1||(i.active=r?!1:this.headers.index(s),this.active=n?e():s,this._toggle(d),a.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&a.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),n||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,a=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=a,this.options.animate?this._animate(i,a,t):(a.hide(),i.show(),this._toggleComplete(t)),a.attr({"aria-hidden":"true"}),a.prev().attr("aria-selected","false"),i.length&&a.length?a.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,s){var n,r,o,h=this,d=0,c=e.length&&(!t.length||e.index()<t.index()),l=this.options.animate||{},u=c&&l.down||l,v=function(){h._toggleComplete(s)};return"number"==typeof u&&(o=u),"string"==typeof u&&(r=u),r=r||u.easing||l.easing,o=o||u.duration||l.duration,t.length?e.length?(n=e.show().outerHeight(),t.animate(i,{duration:o,easing:r,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(a,{duration:o,easing:r,complete:v,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?d+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(n-t.outerHeight()-d),d=0)}}),undefined):t.animate(i,o,r,v):e.animate(a,o,r,v)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})})(jQuery);(function(e){e.widget("ui.autocomplete",{version:"1.10.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,undefined;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:s})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):undefined},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(e){var t,i="ui-button ui-widget ui-state-default ui-corner-all",n="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",s=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},a=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.10.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,s),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var n=this,o=this.options,r="checkbox"===this.type||"radio"===this.type,h=r?"":"ui-state-active";null===o.label&&(o.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){o.disabled||this===t&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){o.disabled||e(this).removeClass(h)}).bind("click"+this.eventNamespace,function(e){o.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),r&&this.element.bind("change"+this.eventNamespace,function(){n.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return o.disabled?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(o.disabled)return!1;e(this).addClass("ui-state-active"),n.buttonElement.attr("aria-pressed","true");var t=n.element[0];a(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return o.disabled?!1:(e(this).addClass("ui-state-active"),t=this,n.document.one("mouseup",function(){t=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return o.disabled?!1:(e(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(t){return o.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",o.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+n).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.element.prop("disabled",!!t),t&&this.buttonElement.removeClass("ui-state-focus"),undefined):(this._resetButton(),undefined)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?a(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var t=this.buttonElement.removeClass(n),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,a=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(a?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(a?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):o.push("ui-button-text-only"),t.addClass(o.join(" "))}}),e.widget("ui.buttonset",{version:"1.10.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function(e,t){function i(){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},e.extend(this._defaults,this.regional[""]),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){e.datepicker._isDisabledDatepicker(n.inline?t.parent()[0]:n.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))})}function s(t,i){e.extend(t,i);for(var a in i)null==i[a]&&(t[a]=i[a]);return t}e.extend(e.ui,{datepicker:{version:"1.10.4"}});var n,r="datepicker";e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return s(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var a,s,n;a=t.nodeName.toLowerCase(),s="div"===a||"span"===a,t.id||(this.uuid+=1,t.id="dp"+this.uuid),n=this._newInst(e(t),s),n.settings=e.extend({},i||{}),"input"===a?this._connectDatepicker(t,n):s&&this._inlineDatepicker(t,n)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var a=e(t);i.append=e([]),i.trigger=e([]),a.hasClass(this.markerClassName)||(this._attachments(a,i),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,r,i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var a,s,n,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[o?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),a=this._get(i,"showOn"),("focus"===a||"both"===a)&&t.focus(this._showDatepicker),("button"===a||"both"===a)&&(s=this._get(i,"buttonText"),n=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:n,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(n?e("<img/>").attr({src:n,alt:s,title:s}):s)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,a,s,n=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,a=0,s=0;e.length>s;s++)e[s].length>i&&(i=e[s].length,a=s);return a},n.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length)}},_inlineDatepicker:function(t,i){var a=e(t);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(i.dpDiv),e.data(t,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,a,n,o){var u,c,h,l,d,p=this._dialogInst;return p||(this.uuid+=1,u="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+u+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],r,p)),s(p.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,h=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+l,h/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(t){var i,a=e(t),s=e.data(t,r);a.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,r),"input"===i?(s.append.remove(),s.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&a.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,a,n){var r,o,u,c,h=this._getInst(i);return 2===arguments.length&&"string"==typeof a?"defaults"===a?e.extend({},e.datepicker._defaults):h?"all"===a?e.extend({},h.settings):this._get(h,a):null:(r=a||{},"string"==typeof a&&(r={},r[a]=n),h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),u=this._getMinMaxDate(h,"min"),c=this._getMinMaxDate(h,"max"),s(h.settings,r),null!==u&&r.dateFormat!==t&&r.minDate===t&&(h.settings.minDate=this._formatDate(h,u)),null!==c&&r.dateFormat!==t&&r.maxDate===t&&(h.settings.maxDate=this._formatDate(h,c)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h)),t)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,a,s,n=e.datepicker._getInst(t.target),r=!0,o=n.dpDiv.is(".ui-datepicker-rtl");if(n._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",n.dpDiv),s[0]&&e.datepicker._selectDay(t.target,n.selectedMonth,n.selectedYear,s[0]),i=e.datepicker._get(n,"onSelect"),i?(a=e.datepicker._formatDate(n),i.apply(n.input?n.input[0]:null,[a,n])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(i){var a,s,n=e.datepicker._getInst(i.target);return e.datepicker._get(n,"constrainInput")?(a=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">s||!a||a.indexOf(s)>-1):t},_doKeyUp:function(t){var i,a=e.datepicker._getInst(t.target);if(a.input.val()!==a.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,e.datepicker._getFormatConfig(a)),i&&(e.datepicker._setDateFromField(a),e.datepicker._updateAlternate(a),e.datepicker._updateDatepicker(a))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,a,n,r,o,u,c;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),a=e.datepicker._get(i,"beforeShow"),n=a?a.apply(t,[t,i]):{},n!==!1&&(s(i.settings,n),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return r|="fixed"===e(this).css("position"),!r}),o={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),o=e.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(u=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[u]?i.dpDiv.show(u,e.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,n=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,a=this._getNumberOfMonths(t),s=a[1],r=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),t.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,a){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,u=document.documentElement.clientWidth+(a?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=a&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=a&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>u&&u>s?Math.abs(i.left+s-u):0),i.top-=Math.min(i.top,i.top+n>c&&c>n?Math.abs(n+o):0),i},_findPos:function(t){for(var i,a=this._getInst(t),s=this._get(a,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,a,s,n,o=this._curInst;!o||t&&o!==e.data(t,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),a=this._get(o,"duration"),s=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),a,s):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?a:null,s),i||s(),this._datepickerShowing=!1,n=this._get(o,"onClose"),n&&n.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),a=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==a)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,a){var s=e(t),n=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(n,i+("M"===a?this._get(n,"showCurrentAtPos"):0),a),this._updateDatepicker(n))},_gotoToday:function(t){var i,a=e(t),s=this._getInst(a[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(a)},_selectMonthYear:function(t,i,a){var s=e(t),n=this._getInst(s[0]);n["selected"+("M"===a?"Month":"Year")]=n["draw"+("M"===a?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(n),this._adjustDate(s)},_selectDay:function(t,i,a,s){var n,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(n=this._getInst(r[0]),n.selectedDay=n.currentDay=e("a",s).html(),n.selectedMonth=n.currentMonth=i,n.selectedYear=n.currentYear=a,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var a,s=e(t),n=this._getInst(s[0]);i=null!=i?i:this._formatDate(n),n.input&&n.input.val(i),this._updateAlternate(n),a=this._get(n,"onSelect"),a?a.apply(n.input?n.input[0]:null,[i,n]):n.input&&n.input.trigger("change"),n.inline?this._updateDatepicker(n):(this._hideDatepicker(),this._lastInput=n.input[0],"object"!=typeof n.input[0]&&n.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,a,s,n=this._get(t,"altField");n&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),a=this._getDate(t),s=this.formatDate(i,a,this._getFormatConfig(t)),e(n).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(i,a,s){if(null==i||null==a)throw"Invalid arguments";if(a="object"==typeof a?""+a:a+"",""===a)return null;var n,r,o,u,c=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,p=(s?s.dayNames:null)||this._defaults.dayNames,g=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,m=(s?s.monthNames:null)||this._defaults.monthNames,f=-1,_=-1,v=-1,k=-1,y=!1,b=function(e){var t=i.length>n+1&&i.charAt(n+1)===e;return t&&n++,t},D=function(e){var t=b(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=RegExp("^\\d{1,"+i+"}"),n=a.substring(c).match(s);if(!n)throw"Missing number at position "+c;return c+=n[0].length,parseInt(n[0],10)},w=function(i,s,n){var r=-1,o=e.map(b(i)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,i){var s=i[1];return a.substr(c,s.length).toLowerCase()===s.toLowerCase()?(r=i[0],c+=s.length,!1):t}),-1!==r)return r+1;throw"Unknown name at position "+c},M=function(){if(a.charAt(c)!==i.charAt(n))throw"Unexpected literal at position "+c;c++};for(n=0;i.length>n;n++)if(y)"'"!==i.charAt(n)||b("'")?M():y=!1;else switch(i.charAt(n)){case"d":v=D("d");break;case"D":w("D",d,p);break;case"o":k=D("o");break;case"m":_=D("m");break;case"M":_=w("M",g,m);break;case"y":f=D("y");break;case"@":u=new Date(D("@")),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"!":u=new Date((D("!")-this._ticksTo1970)/1e4),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"'":b("'")?M():y=!0;break;default:M()}if(a.length>c&&(o=a.substr(c),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===f?f=(new Date).getFullYear():100>f&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(l>=f?0:-100)),k>-1)for(_=1,v=k;;){if(r=this._getDaysInMonth(f,_-1),r>=v)break;_++,v-=r}if(u=this._daylightSavingAdjust(new Date(f,_-1,v)),u.getFullYear()!==f||u.getMonth()+1!==_||u.getDate()!==v)throw"Invalid date";return u},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:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var a,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,n=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,u=function(t){var i=e.length>a+1&&e.charAt(a+1)===t;return i&&a++,i},c=function(e,t,i){var a=""+t;if(u(e))for(;i>a.length;)a="0"+a;return a},h=function(e,t,i,a){return u(e)?a[t]:i[t]},l="",d=!1;if(t)for(a=0;e.length>a;a++)if(d)"'"!==e.charAt(a)||u("'")?l+=e.charAt(a):d=!1;else switch(e.charAt(a)){case"d":l+=c("d",t.getDate(),2);break;case"D":l+=h("D",t.getDay(),s,n);break;case"o":l+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=c("m",t.getMonth()+1,2);break;case"M":l+=h("M",t.getMonth(),r,o);break;case"y":l+=u("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=1e4*t.getTime()+this._ticksTo1970;break;case"'":u("'")?l+="'":d=!0;break;default:l+=e.charAt(a)}return l},_possibleChars:function(e){var t,i="",a=!1,s=function(i){var a=e.length>t+1&&e.charAt(t+1)===i;return a&&t++,a};for(t=0;e.length>t;t++)if(a)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):a=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":a=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),a=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),n=s,r=this._getFormatConfig(e);try{n=this.parseDate(i,a,r)||s}catch(o){a=t?"":a}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=a?n.getDate():0,e.currentMonth=a?n.getMonth():0,e.currentYear=a?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,a){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},n=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(a){}for(var s=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,n=s.getFullYear(),r=s.getMonth(),o=s.getDate(),u=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=u.exec(i);c;){switch(c[2]||"d"){case"d":case"D":o+=parseInt(c[1],10);break;case"w":case"W":o+=7*parseInt(c[1],10);break;case"m":case"M":r+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r));break;case"y":case"Y":n+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r))}c=u.exec(i)}return new Date(n,r,o)},r=null==i||""===i?a:"string"==typeof i?n(i):"number"==typeof i?isNaN(i)?a:s(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?a:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var a=!t,s=e.selectedMonth,n=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&n===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(a?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),a="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(a,-i,"M")},next:function(){e.datepicker._adjustDate(a,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(a)},selectDay:function(){return e.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(a,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,a,s,n,r,o,u,c,h,l,d,p,g,m,f,_,v,k,y,b,D,w,M,C,x,I,N,T,A,E,S,Y,F,P,O,j,K,R,H=new Date,W=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),L=this._get(e,"isRTL"),U=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),z=this._get(e,"navigationAsDateFormat"),q=this._getNumberOfMonths(e),G=this._get(e,"showCurrentAtPos"),J=this._get(e,"stepMonths"),Q=1!==q[0]||1!==q[1],V=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(e,"min"),X=this._getMinMaxDate(e,"max"),Z=e.drawMonth-G,et=e.drawYear;if(0>Z&&(Z+=12,et--),X)for(t=this._daylightSavingAdjust(new Date(X.getFullYear(),X.getMonth()-q[0]*q[1]+1,X.getDate())),t=$&&$>t?$:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-J,1)),this._getFormatConfig(e)):i,a=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"e":"w")+"'>"+i+"</span></a>":B?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"e":"w")+"'>"+i+"</span></a>",s=this._get(e,"nextText"),s=z?this.formatDate(s,this._daylightSavingAdjust(new Date(et,Z+J,1)),this._getFormatConfig(e)):s,n=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"w":"e")+"'>"+s+"</span></a>":B?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"w":"e")+"'>"+s+"</span></a>",r=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?V:W,r=z?this.formatDate(r,o,this._getFormatConfig(e)):r,u=e.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(e,"closeText")+"</button>",c=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(L?u:"")+(this._isInRange(e,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(L?"":u)+"</div>":"",h=parseInt(this._get(e,"firstDay"),10),h=isNaN(h)?0:h,l=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),g=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),v=this._get(e,"selectOtherMonths"),k=this._getDefaultDate(e),y="",D=0;q[0]>D;D++){for(w="",this.maxRows=4,M=0;q[1]>M;M++){if(C=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),x=" ui-corner-all",I="",Q){if(I+="<div class='ui-datepicker-group",q[1]>1)switch(M){case 0:I+=" ui-datepicker-group-first",x=" ui-corner-"+(L?"right":"left");break;case q[1]-1:I+=" ui-datepicker-group-last",x=" ui-corner-"+(L?"left":"right");break;default:I+=" ui-datepicker-group-middle",x=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+x+"'>"+(/all|left/.test(x)&&0===D?L?n:a:"")+(/all|right/.test(x)&&0===D?L?a:n:"")+this._generateMonthYearHeader(e,Z,et,$,X,D>0||M>0,g,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",N=l?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",b=0;7>b;b++)T=(b+h)%7,N+="<th"+((b+h+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[T]+"'>"+p[T]+"</span></th>";for(I+=N+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),E=(this._getFirstDayOfMonth(et,Z)-h+7)%7,S=Math.ceil((E+A)/7),Y=Q?this.maxRows>S?this.maxRows:S:S,this.maxRows=Y,F=this._daylightSavingAdjust(new Date(et,Z,1-E)),P=0;Y>P;P++){for(I+="<tr>",O=l?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(F)+"</td>":"",b=0;7>b;b++)j=f?f.apply(e.input?e.input[0]:null,[F]):[!0,""],K=F.getMonth()!==Z,R=K&&!v||!j[0]||$&&$>F||X&&F>X,O+="<td class='"+((b+h+6)%7>=5?" ui-datepicker-week-end":"")+(K?" ui-datepicker-other-month":"")+(F.getTime()===C.getTime()&&Z===e.selectedMonth&&e._keyEvent||k.getTime()===F.getTime()&&k.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(K&&!_?"":" "+j[1]+(F.getTime()===V.getTime()?" "+this._currentClass:"")+(F.getTime()===W.getTime()?" ui-datepicker-today":""))+"'"+(K&&!_||!j[2]?"":" title='"+j[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+F.getMonth()+"' data-year='"+F.getFullYear()+"'")+">"+(K&&!_?"&#xa0;":R?"<span class='ui-state-default'>"+F.getDate()+"</span>":"<a class='ui-state-default"+(F.getTime()===W.getTime()?" ui-state-highlight":"")+(F.getTime()===V.getTime()?" ui-state-active":"")+(K?" ui-priority-secondary":"")+"' href='#'>"+F.getDate()+"</a>")+"</td>",F.setDate(F.getDate()+1),F=this._daylightSavingAdjust(F);I+=O+"</tr>"}Z++,Z>11&&(Z=0,et++),I+="</tbody></table>"+(Q?"</div>"+(q[0]>0&&M===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=I}y+=w}return y+=c,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,i,a,s,n,r,o){var u,c,h,l,d,p,g,m,f=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),k="<div class='ui-datepicker-title'>",y="";if(n||!f)y+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(u=a&&a.getFullYear()===i,c=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;12>h;h++)(!u||h>=a.getMonth())&&(!c||s.getMonth()>=h)&&(y+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"</option>");y+="</select>"}if(v||(k+=y+(!n&&f&&_?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",n||!_)k+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(l=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10); return isNaN(t)?d:t},g=p(l[0]),m=Math.max(g,p(l[1]||"")),g=a?Math.max(g,a.getFullYear()):g,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=g;g++)e.yearshtml+="<option value='"+g+"'"+(g===i?" selected='selected'":"")+">"+g+"</option>";e.yearshtml+="</select>",k+=e.yearshtml,e.yearshtml=null}return k+=this._get(e,"yearSuffix"),v&&(k+=(!n&&f&&_?"":"&#xa0;")+y),k+="</div>"},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),n=Math.min(e.selectedDay,this._getDaysInMonth(a,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,s,n)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return a&&s>a?a:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var s=this._getNumberOfMonths(e),n=this._daylightSavingAdjust(new Date(i,a+(0>t?t:s[0]*s[1]),1));return 0>t&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(e,n)},_isInRange:function(e,t){var i,a,s=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),r=null,o=null,u=this._get(e,"yearRange");return u&&(i=u.split(":"),a=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=a),i[1].match(/[+\-].*/)&&(o+=a)),(!s||t.getTime()>=s.getTime())&&(!n||t.getTime()<=n.getTime())&&(!r||t.getFullYear()>=r)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.4"})(jQuery);(function(e){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.10.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,a=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){a._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",e),i},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var e=this.element.find("[autofocus]");e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),undefined;if(t.keyCode===e.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),a=i.filter(":first"),s=i.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==a[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(s.focus(1),t.preventDefault()):(a.focus(1),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(e.each(i,function(i,a){var s,n;a=e.isFunction(a)?{click:a,text:i}:a,a=e.extend({type:"button"},a),s=a.click,a.click=function(){s.apply(t.element[0],arguments)},n={icons:a.icons,text:a.showText},delete a.icons,delete a.showText,e("<button></button>",a).button(n).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,a=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(a,s){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",a,t(s))},drag:function(e,a){i._trigger("drag",e,t(a))},stop:function(s,n){a.position=[n.position.left-i.document.scrollLeft(),n.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,t(n))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,a=this.options,s=a.resizable,n=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:r,start:function(a,s){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",a,t(s))},resize:function(e,a){i._trigger("resize",e,t(a))},stop:function(s,n){a.height=e(this).height(),a.width=e(this).width(),e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,t(n))}}).css("position",n)},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(a){var s=this,n=!1,r={};e.each(a,function(e,a){s._setOption(e,a),e in t&&(n=!0),e in i&&(r[e]=a)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(e,t){var i,a,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(a=s.is(":data(ui-resizable)"),a&&!t&&s.resizable("destroy"),a&&"string"==typeof t&&s.resizable("option","handles",t),a||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,a=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),a.minWidth>a.width&&(a.width=a.minWidth),e=this.uiDialog.css({height:"auto",width:a.width}).outerHeight(),t=Math.max(0,a.minHeight-e),i="number"==typeof a.maxHeight?Math.max(0,a.maxHeight-e):"none","auto"===a.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,a.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;e.ui.dialog.overlayInstances||this._delay(function(){e.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(a){t._allowInteraction(a)||(a.preventDefault(),e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),e.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(e.ui.dialog.overlayInstances--,e.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayInstances=0,e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t,i=this.options.position,a=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(a=i.split?i.split(" "):[i[0],i[1]],1===a.length&&(a[1]=a[0]),e.each(["left","top"],function(e,t){+a[e]===a[e]&&(s[e]=a[e],a[e]=t)}),i={my:a[0]+(0>s[0]?s[0]:"+"+s[0])+" "+a[1]+(0>s[1]?s[1]:"+"+s[1]),at:a.join(" ")}),i=e.extend({},e.ui.dialog.prototype.options.position,i)):i=e.ui.dialog.prototype.options.position,t=this.uiDialog.is(":visible"),t||this.uiDialog.show(),this.uiDialog.position(i),t||this.uiDialog.hide()}})})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);(function(t,e){t.widget("ui.progressbar",{version:"1.10.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t=t.cloneNode(!1),t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,a){var o,r=a.re.exec(i),l=r&&a.parse(r),h=a.space||"rgba";return l?(o=s[h](l),s[c[h].cache]=o[c[h].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,o,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,l],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),a=c[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],h=s[a],c=u[n.type]||{};null!==h&&(null===o?l[a]=h:(c.mod&&(h-o>c.mod/2?o+=c.mod:o-h>c.mod/2&&(o-=c.mod)),l[a]=i((h-o)*e+o,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-a)/h+360:n===r?60*(a-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[o]&&(this[o]=l(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[o]=d,n):h(d)},f(a,function(e,i){h.fn[e]||(h.fn[e]=function(n){var a,o=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=h(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",h=l.children?o.find("*").addBack():o;h=h.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),h=h.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.4",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),a=t.effects.createWrapper(l).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,m[p]=v?o:0,g||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:o+r),v&&(a.css(p,0),g||a.css(f,r+o)),a.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"effect"),h="hide"===l,c="show"===l,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||h?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,g,m)),h&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m).animate(a,g,m),d=h?2*d:d/2;h&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),h&&(n.css(d,0),n.css(p,a/2)),f[d]=h?a:0,f[p]=h?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),u[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var a,o,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(l=m.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=m.left+o*v,h=o-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),l="show"===r,h="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){h&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(e.times||5)+(l?1:0),c=e.duration/h,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;h>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===g||"both"===g)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===g||"both"===g)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getBaseline(m,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),h=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+l,g[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,n.animate(f,u,e.easing),s=1;h>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isNaN(s)?"-"+s:-s:s),u[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery);/* Uniform v2.1.2 Copyright © 2009 Josh Pyles / Pixelmatrix Design LLC http://pixelmatrixdesign.com Requires jQuery 1.3 or newer Much thanks to Thomas Reynolds and Buck Wilson for their help and advice on this. Disabling text selection is made possible by Mathias Bynens <http://mathiasbynens.be/> and his noSelect plugin. <https://github.com/mathiasbynens/jquery-noselect>, which is embedded. Also, thanks to David Kaneda and Eugene Bond for their contributions to the plugin. Tyler Akins has also rewritten chunks of the plugin, helped close many issues, and ensured version 2 got out the door. License: MIT License - http://www.opensource.org/licenses/mit-license.php Enjoy! */ /*global jQuery, document, navigator*/ (function (wind, $, undef) { "use strict"; /** * Use .prop() if jQuery supports it, otherwise fall back to .attr() * * @param jQuery $el jQuery'd element on which we're calling attr/prop * @param ... All other parameters are passed to jQuery's function * @return The result from jQuery */ function attrOrProp($el) { var args = Array.prototype.slice.call(arguments, 1); if ($el.prop) { // jQuery 1.6+ return $el.prop.apply($el, args); } // jQuery 1.5 and below return $el.attr.apply($el, args); } /** * For backwards compatibility with older jQuery libraries, only bind * one thing at a time. Also, this function adds our namespace to * events in one consistent location, shrinking the minified code. * * The properties on the events object are the names of the events * that we are supposed to add to. It can be a space separated list. * The namespace will be added automatically. * * @param jQuery $el * @param Object options Uniform options for this element * @param Object events Events to bind, properties are event names */ function bindMany($el, options, events) { var name, namespaced; for (name in events) { if (events.hasOwnProperty(name)) { namespaced = name.replace(/ |$/g, options.eventNamespace); $el.bind(namespaced, events[name]); } } } /** * Bind the hover, active, focus, and blur UI updates * * @param jQuery $el Original element * @param jQuery $target Target for the events (our div/span) * @param Object options Uniform options for the element $target */ function bindUi($el, $target, options) { bindMany($el, options, { focus: function () { $target.addClass(options.focusClass); }, blur: function () { $target.removeClass(options.focusClass); $target.removeClass(options.activeClass); }, mouseenter: function () { $target.addClass(options.hoverClass); }, mouseleave: function () { $target.removeClass(options.hoverClass); $target.removeClass(options.activeClass); }, "mousedown touchbegin": function () { if (!$el.is(":disabled")) { $target.addClass(options.activeClass); } }, "mouseup touchend": function () { $target.removeClass(options.activeClass); } }); } /** * Remove the hover, focus, active classes. * * @param jQuery $el Element with classes * @param Object options Uniform options for the element */ function classClearStandard($el, options) { $el.removeClass(options.hoverClass + " " + options.focusClass + " " + options.activeClass); } /** * Add or remove a class, depending on if it's "enabled" * * @param jQuery $el Element that has the class added/removed * @param String className Class or classes to add/remove * @param Boolean enabled True to add the class, false to remove */ function classUpdate($el, className, enabled) { if (enabled) { $el.addClass(className); } else { $el.removeClass(className); } } /** * Updating the "checked" property can be a little tricky. This * changed in jQuery 1.6 and now we can pass booleans to .prop(). * Prior to that, one either adds an attribute ("checked=checked") or * removes the attribute. * * @param jQuery $tag Our Uniform span/div * @param jQuery $el Original form element * @param Object options Uniform options for this element */ function classUpdateChecked($tag, $el, options) { setTimeout(function() { // sunhater@sunhater.com var c = "checked", isChecked = $el.is(":" + c); if ($el.prop) { // jQuery 1.6+ $el.prop(c, isChecked); } else { // jQuery 1.5 and below if (isChecked) { $el.attr(c, c); } else { $el.removeAttr(c); } } classUpdate($tag, options.checkedClass, isChecked); }, 1); } /** * Set or remove the "disabled" class for disabled elements, based on * if the element is detected to be disabled. * * @param jQuery $tag Our Uniform span/div * @param jQuery $el Original form element * @param Object options Uniform options for this element */ function classUpdateDisabled($tag, $el, options) { classUpdate($tag, options.disabledClass, $el.is(":disabled")); } /** * Wrap an element inside of a container or put the container next * to the element. See the code for examples of the different methods. * * Returns the container that was added to the HTML. * * @param jQuery $el Element to wrap * @param jQuery $container Add this new container around/near $el * @param String method One of "after", "before" or "wrap" * @return $container after it has been cloned for adding to $el */ function divSpanWrap($el, $container, method) { switch (method) { case "after": // Result: <element /> <container /> $el.after($container); return $el.next(); case "before": // Result: <container /> <element /> $el.before($container); return $el.prev(); case "wrap": // Result: <container> <element /> </container> $el.wrap($container); return $el.parent(); } return null; } /** * Create a div/span combo for uniforming an element * * @param jQuery $el Element to wrap * @param Object options Options for the element, set by the user * @param Object divSpanConfig Options for how we wrap the div/span * @return Object Contains the div and span as properties */ function divSpan($el, options, divSpanConfig) { var $div, $span, id; if (!divSpanConfig) { divSpanConfig = {}; } divSpanConfig = $.extend({ bind: {}, divClass: null, divWrap: "wrap", spanClass: null, spanHtml: null, spanWrap: "wrap" }, divSpanConfig); $div = $('<div />'); $span = $('<span />'); // Automatically hide this div/span if the element is hidden. // Do not hide if the element is hidden because a parent is hidden. if (options.autoHide && $el.is(':hidden') && $el.css('display') === 'none') { $div.hide(); } if (divSpanConfig.divClass) { $div.addClass(divSpanConfig.divClass); } if (options.wrapperClass) { $div.addClass(options.wrapperClass); } if (divSpanConfig.spanClass) { $span.addClass(divSpanConfig.spanClass); } id = attrOrProp($el, 'id'); if (options.useID && id) { attrOrProp($div, 'id', options.idPrefix + '-' + id); } if (divSpanConfig.spanHtml) { $span.html(divSpanConfig.spanHtml); } $div = divSpanWrap($el, $div, divSpanConfig.divWrap); $span = divSpanWrap($el, $span, divSpanConfig.spanWrap); classUpdateDisabled($div, $el, options); return { div: $div, span: $span }; } /** * Wrap an element with a span to apply a global wrapper class * * @param jQuery $el Element to wrap * @param object options * @return jQuery Wrapper element */ function wrapWithWrapperClass($el, options) { var $span; if (!options.wrapperClass) { return null; } $span = $('<span />').addClass(options.wrapperClass); $span = divSpanWrap($el, $span, "wrap"); return $span; } /** * Test if high contrast mode is enabled. * * In high contrast mode, background images can not be set and * they are always returned as 'none'. * * @return boolean True if in high contrast mode */ function highContrast() { var c, $div, el, rgb; // High contrast mode deals with white and black rgb = 'rgb(120,2,153)'; $div = $('<div style="width:0;height:0;color:' + rgb + '">'); $('body').append($div); el = $div.get(0); // $div.css() will get the style definition, not // the actually displaying style if (wind.getComputedStyle) { c = wind.getComputedStyle(el, '').color; } else { c = (el.currentStyle || el.style || {}).color; } $div.remove(); return c.replace(/ /g, '') !== rgb; } /** * Change text into safe HTML * * @param String text * @return String HTML version */ function htmlify(text) { if (!text) { return ""; } return $('<span />').text(text).html(); } /** * If not MSIE, return false. * If it is, return the version number. * * @return false|number */ function isMsie() { return navigator.cpuClass && !navigator.product; } /** * Return true if this version of IE allows styling * * @return boolean */ function isMsieSevenOrNewer() { if (wind.XMLHttpRequest !== undefined) { return true; } return false; } /** * Test if the element is a multiselect * * @param jQuery $el Element * @return boolean true/false */ function isMultiselect($el) { var elSize; if ($el[0].multiple) { return true; } elSize = attrOrProp($el, "size"); if (!elSize || elSize <= 1) { return false; } return true; } /** * Meaningless utility function. Used mostly for improving minification. * * @return false */ function returnFalse() { return false; } /** * noSelect plugin, very slightly modified * http://mths.be/noselect v1.0.3 * * @param jQuery $elem Element that we don't want to select * @param Object options Uniform options for the element */ function noSelect($elem, options) { var none = 'none'; bindMany($elem, options, { 'selectstart dragstart mousedown': returnFalse }); $elem.css({ MozUserSelect: none, msUserSelect: none, webkitUserSelect: none, userSelect: none }); } /** * Updates the filename tag based on the value of the real input * element. * * @param jQuery $el Actual form element * @param jQuery $filenameTag Span/div to update * @param Object options Uniform options for this element */ function setFilename($el, $filenameTag, options) { var filename = $el.val(); if (filename === "") { filename = options.fileDefaultHtml; } else { filename = filename.split(/[\/\\]+/); filename = filename[(filename.length - 1)]; } $filenameTag.text(filename); } /** * Function from jQuery to swap some CSS values, run a callback, * then restore the CSS. Modified to pass JSLint and handle undefined * values with 'use strict'. * * @param jQuery $el Element * @param object newCss CSS values to swap out * @param Function callback Function to run */ function swap($elements, newCss, callback) { var restore, item; restore = []; $elements.each(function () { var name; for (name in newCss) { if (Object.prototype.hasOwnProperty.call(newCss, name)) { restore.push({ el: this, name: name, old: this.style[name] }); this.style[name] = newCss[name]; } } }); callback(); while (restore.length) { item = restore.pop(); item.el.style[item.name] = item.old; } } /** * The browser doesn't provide sizes of elements that are not visible. * This will clone an element and add it to the DOM for calculations. * * @param jQuery $el * @param String method */ function sizingInvisible($el, callback) { var targets; // We wish to target ourselves and any parents as long as // they are not visible targets = $el.parents(); targets.push($el[0]); targets = targets.not(':visible'); swap(targets, { visibility: "hidden", display: "block", position: "absolute" }, callback); } /** * Standard way to unwrap the div/span combination from an element * * @param jQuery $el Element that we wish to preserve * @param Object options Uniform options for the element * @return Function This generated function will perform the given work */ function unwrapUnwrapUnbindFunction($el, options) { return function () { $el.unwrap().unwrap().unbind(options.eventNamespace); }; } var allowStyling = true, // False if IE6 or other unsupported browsers highContrastTest = false, // Was the high contrast test ran? uniformHandlers = [ // Objects that take care of "unification" { // Buttons match: function ($el) { return $el.is("a, button, :submit, :reset, input[type='button']"); }, apply: function ($el, options) { var $div, defaultSpanHtml, ds, getHtml, doingClickEvent; defaultSpanHtml = options.submitDefaultHtml; if ($el.is(":reset")) { defaultSpanHtml = options.resetDefaultHtml; } if ($el.is("a, button")) { // Use the HTML inside the tag getHtml = function () { return $el.html() || defaultSpanHtml; }; } else { // Use the value property of the element getHtml = function () { return htmlify(attrOrProp($el, "value")) || defaultSpanHtml; }; } ds = divSpan($el, options, { divClass: options.buttonClass, spanHtml: getHtml() }); $div = ds.div; bindUi($el, $div, options); doingClickEvent = false; bindMany($div, options, { "click touchend": function () { var ev, res, target, href; if (doingClickEvent) { return; } if ($el.is(':disabled')) { return; } doingClickEvent = true; if ($el[0].dispatchEvent) { ev = document.createEvent("MouseEvents"); ev.initEvent("click", true, true); res = $el[0].dispatchEvent(ev); if ($el.is('a') && res) { target = attrOrProp($el, 'target'); href = attrOrProp($el, 'href'); if (!target || target === '_self') { document.location.href = href; } else { wind.open(href, target); } } } else { $el.click(); } doingClickEvent = false; } }); noSelect($div, options); return { remove: function () { // Move $el out $div.after($el); // Remove div and span $div.remove(); // Unbind events $el.unbind(options.eventNamespace); return $el; }, update: function () { classClearStandard($div, options); classUpdateDisabled($div, $el, options); $el.detach(); ds.span.html(getHtml()).append($el); } }; } }, { // Checkboxes match: function ($el) { return $el.is(":checkbox"); }, apply: function ($el, options) { var ds, $div, $span; ds = divSpan($el, options, { divClass: options.checkboxClass }); $div = ds.div; $span = ds.span; // Add focus classes, toggling, active, etc. bindUi($el, $div, options); bindMany($el, options, { "click touchend": function () { classUpdateChecked($span, $el, options); } }); classUpdateChecked($span, $el, options); return { remove: unwrapUnwrapUnbindFunction($el, options), update: function () { classClearStandard($div, options); $span.removeClass(options.checkedClass); classUpdateChecked($span, $el, options); classUpdateDisabled($div, $el, options); } }; } }, { // File selection / uploads match: function ($el) { return $el.is(":file"); }, apply: function ($el, options) { var ds, $div, $filename, $button; // The "span" is the button ds = divSpan($el, options, { divClass: options.fileClass, spanClass: options.fileButtonClass, spanHtml: options.fileButtonHtml, spanWrap: "after" }); $div = ds.div; $button = ds.span; $filename = $("<span />").html(options.fileDefaultHtml); $filename.addClass(options.filenameClass); $filename = divSpanWrap($el, $filename, "after"); // Set the size if (!attrOrProp($el, "size")) { attrOrProp($el, "size", $div.width() / 10); } // Actions function filenameUpdate() { setFilename($el, $filename, options); } bindUi($el, $div, options); // Account for input saved across refreshes filenameUpdate(); // IE7 doesn't fire onChange until blur or second fire. if (isMsie()) { // IE considers browser chrome blocking I/O, so it // suspends tiemouts until after the file has // been selected. bindMany($el, options, { click: function () { $el.trigger("change"); setTimeout(filenameUpdate, 0); } }); } else { // All other browsers behave properly bindMany($el, options, { change: filenameUpdate }); } noSelect($filename, options); noSelect($button, options); return { remove: function () { // Remove filename and button $filename.remove(); $button.remove(); // Unwrap parent div, remove events return $el.unwrap().unbind(options.eventNamespace); }, update: function () { classClearStandard($div, options); setFilename($el, $filename, options); classUpdateDisabled($div, $el, options); } }; } }, { // Input fields (text) match: function ($el) { if ($el.is("input")) { var t = (" " + attrOrProp($el, "type") + " ").toLowerCase(), allowed = " color date datetime datetime-local email month number password search tel text time url week "; return allowed.indexOf(t) >= 0; } return false; }, apply: function ($el, options) { var elType, $wrapper; elType = attrOrProp($el, "type"); $el.addClass(options.inputClass); $wrapper = wrapWithWrapperClass($el, options); bindUi($el, $el, options); if (options.inputAddTypeAsClass) { $el.addClass(elType); } return { remove: function () { $el.removeClass(options.inputClass); if (options.inputAddTypeAsClass) { $el.removeClass(elType); } if ($wrapper) { $el.unwrap(); } }, update: returnFalse }; } }, { // Radio buttons match: function ($el) { return $el.is(":radio"); }, apply: function ($el, options) { var ds, $div, $span; ds = divSpan($el, options, { divClass: options.radioClass }); $div = ds.div; $span = ds.span; // Add classes for focus, handle active, checked bindUi($el, $div, options); bindMany($el, options, { "click touchend": function () { // Find all radios with the same name, then update // them with $.uniform.update() so the right // per-element options are used $.uniform.update($(':radio[name="' + attrOrProp($el, "name") + '"]')); } }); classUpdateChecked($span, $el, options); return { remove: unwrapUnwrapUnbindFunction($el, options), update: function () { classClearStandard($div, options); classUpdateChecked($span, $el, options); classUpdateDisabled($div, $el, options); } }; } }, { // Select lists, but do not style multiselects here match: function ($el) { if ($el.is("select") && !isMultiselect($el)) { return true; } return false; }, apply: function ($el, options) { var ds, $div, $span, origElemWidth; if (options.selectAutoWidth) { sizingInvisible($el, function () { origElemWidth = $el.width(); }); } ds = divSpan($el, options, { divClass: options.selectClass, spanHtml: ($el.find(":selected:first") || $el.find("option:first")).html(), spanWrap: "before" }); $div = ds.div; $span = ds.span; if (options.selectAutoWidth) { // Use the width of the select and adjust the // span and div accordingly sizingInvisible($el, function () { // Force "display: block" - related to bug #287 swap($([ $span[0], $div[0] ]), { display: "block" }, function () { var spanPad; spanPad = $span.outerWidth() - $span.width(); $div.width(origElemWidth + spanPad); $span.width(origElemWidth); }); }); } else { // Force the select to fill the size of the div $div.addClass('fixedWidth'); } // Take care of events bindUi($el, $div, options); bindMany($el, options, { change: function () { $span.html($el.find(":selected").html()); $div.removeClass(options.activeClass); }, "click touchend": function () { // IE7 and IE8 may not update the value right // until after click event - issue #238 var selHtml = $el.find(":selected").html(); if ($span.html() !== selHtml) { // Change was detected // Fire the change event on the select tag $el.trigger('change'); } }, keyup: function () { $span.html($el.find(":selected").html()); } }); noSelect($span, options); return { remove: function () { // Remove sibling span $span.remove(); // Unwrap parent div $el.unwrap().unbind(options.eventNamespace); return $el; }, update: function () { if (options.selectAutoWidth) { // Easier to remove and reapply formatting $.uniform.restore($el); $el.uniform(options); } else { classClearStandard($div, options); // Reset current selected text $span.html($el.find(":selected").html()); classUpdateDisabled($div, $el, options); } } }; } }, { // Select lists - multiselect lists only match: function ($el) { if ($el.is("select") && isMultiselect($el)) { return true; } return false; }, apply: function ($el, options) { var $wrapper; $el.addClass(options.selectMultiClass); $wrapper = wrapWithWrapperClass($el, options); bindUi($el, $el, options); return { remove: function () { $el.removeClass(options.selectMultiClass); if ($wrapper) { $el.unwrap(); } }, update: returnFalse }; } }, { // Textareas match: function ($el) { return $el.is("textarea"); }, apply: function ($el, options) { var $wrapper; $el.addClass(options.textareaClass); $wrapper = wrapWithWrapperClass($el, options); bindUi($el, $el, options); return { remove: function () { $el.removeClass(options.textareaClass); if ($wrapper) { $el.unwrap(); } }, update: returnFalse }; } } ]; // IE6 can't be styled - can't set opacity on select if (isMsie() && !isMsieSevenOrNewer()) { allowStyling = false; } $.uniform = { // Default options that can be overridden globally or when uniformed // globally: $.uniform.defaults.fileButtonHtml = "Pick A File"; // on uniform: $('input').uniform({fileButtonHtml: "Pick a File"}); defaults: { activeClass: "active", autoHide: true, buttonClass: "button", checkboxClass: "checker", checkedClass: "checked", disabledClass: "disabled", eventNamespace: ".uniform", fileButtonClass: "action", fileButtonHtml: "Choose File", fileClass: "uploader", fileDefaultHtml: "No file selected", filenameClass: "filename", focusClass: "focus", hoverClass: "hover", idPrefix: "uniform", inputAddTypeAsClass: true, inputClass: "uniform-input", radioClass: "radio", resetDefaultHtml: "Reset", resetSelector: false, // We'll use our own function when you don't specify one selectAutoWidth: true, selectClass: "selector", selectMultiClass: "uniform-multiselect", submitDefaultHtml: "Submit", // Only text allowed textareaClass: "uniform", useID: true, wrapperClass: null }, // All uniformed elements - DOM objects elements: [] }; $.fn.uniform = function (options) { var el = this; options = $.extend({}, $.uniform.defaults, options); // If we are in high contrast mode, do not allow styling if (!highContrastTest) { highContrastTest = true; if (highContrast()) { allowStyling = false; } } // Only uniform on browsers that work if (!allowStyling) { return this; } // Code for specifying a reset button if (options.resetSelector) { $(options.resetSelector).mouseup(function () { wind.setTimeout(function () { $.uniform.update(el); }, 10); }); } return this.each(function () { var $el = $(this), i, handler, callbacks; // Avoid uniforming elements already uniformed - just update if ($el.data("uniformed")) { $.uniform.update($el); return; } // See if we have any handler for this type of element for (i = 0; i < uniformHandlers.length; i = i + 1) { handler = uniformHandlers[i]; if (handler.match($el, options)) { callbacks = handler.apply($el, options); $el.data("uniformed", callbacks); // Store element in our global array $.uniform.elements.push($el.get(0)); return; } } // Could not style this element }); }; $.uniform.restore = $.fn.uniform.restore = function (elem) { if (elem === undef) { elem = $.uniform.elements; } $(elem).each(function () { var $el = $(this), index, elementData; elementData = $el.data("uniformed"); // Skip elements that are not uniformed if (!elementData) { return; } // Unbind events, remove additional markup that was added elementData.remove(); // Remove item from list of uniformed elements index = $.inArray(this, $.uniform.elements); if (index >= 0) { $.uniform.elements.splice(index, 1); } $el.removeData("uniformed"); }); }; $.uniform.update = $.fn.uniform.update = function (elem) { if (elem === undef) { elem = $.uniform.elements; } $(elem).each(function () { var $el = $(this), elementData; elementData = $el.data("uniformed"); // Skip elements that are not uniformed if (!elementData) { return; } elementData.update($el, elementData.options); }); }; }(this, jQuery));/** This file is part of KCFinder project * * @desc My jQuery UI & Uniform fixes * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ (function($) { $.fn.oldMenu = $.fn.menu; $.fn.menu = function(p1, p2, p3) { var ret = $(this).oldMenu(p1, p2, p3); $(this).each(function() { if (!$(this).hasClass('sh-menu')) { $(this).addClass('sh-menu') .children().first().addClass('ui-menu-item-first'); $(this).children().last().addClass('ui-menu-item-last'); $(this).find('.ui-menu').addClass('sh-menu').each(function() { $(this).children().first().addClass('ui-menu-item-first'); $(this).children().last().addClass('ui-menu-item-last'); }); } }); return ret; }; $.fn.oldUniform = $.fn.uniform; $.fn.uniform = function(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) { var ret = $(this).oldUniform(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); $(this).each(function() { var t = $(this); if (!t.hasClass('sh-uniform')) { t.addClass('sh-uniform'); // Fix upload filename width if (t.is('input[type="file"]')) { var f = t.parent().find('.filename'); f.css('width', f.innerWidth()); } // Add an icon into select boxes if (t.is('select') && !t.attr('multiple')) { var p = t.parent(), height = p.height(), width = p.outerWidth(), width2 = p.find('span').outerWidth(); $('<div></div>').addClass('ui-icon').css({ 'float': "right", marginTop: - parseInt((height / 2) + 8), marginRight: - parseInt((width - width2) / 2) - 7 }).appendTo(p); } } }); return ret; }; })(jQuery);/** This file is part of KCFinder project * * @desc Right Click jQuery Plugin * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ (function($) { $.fn.rightClick = function(func) { var events = "contextmenu rightclick"; $(this).each(function() { $(this).unbind(events).bind(events, function(e) { e.preventDefault(); $.clearSelection(); if ($.isFunction(func)) func(this, e); }); }); return $(this); }; })(jQuery);// @author Rich Adams <rich@richadams.me> // Implements a tap and hold functionality. If you click/tap and release, it will trigger a normal // click event. But if you click/tap and hold for 1s (default), it will trigger a taphold event instead. ;(function($) { // Default options var defaults = { duration: 1000, // ms clickHandler: null } // When start of a taphold event is triggered. function startHandler(event) { var $elem = jQuery(this); // Merge the defaults and any user defined settings. settings = jQuery.extend({}, defaults, event.data); // If object also has click handler, store it and unbind. Taphold will trigger the // click itself, rather than normal propagation. if (typeof $elem.data("events") != "undefined" && typeof $elem.data("events").click != "undefined") { // Find the one without a namespace defined. for (var c in $elem.data("events").click) { if ($elem.data("events").click[c].namespace == "") { var handler = $elem.data("events").click[c].handler $elem.data("taphold_click_handler", handler); $elem.unbind("click", handler); break; } } } // Otherwise, if a custom click handler was explicitly defined, then store it instead. else if (typeof settings.clickHandler == "function") { $elem.data("taphold_click_handler", settings.clickHandler); } // Reset the flags $elem.data("taphold_triggered", false); // If a hold was triggered $elem.data("taphold_clicked", false); // If a click was triggered $elem.data("taphold_cancelled", false); // If event has been cancelled. // Set the timer for the hold event. $elem.data("taphold_timer", setTimeout(function() { // If event hasn't been cancelled/clicked already, then go ahead and trigger the hold. if (!$elem.data("taphold_cancelled") && !$elem.data("taphold_clicked")) { // Trigger the hold event, and set the flag to say it's been triggered. $elem.trigger(jQuery.extend(event, jQuery.Event("taphold"))); $elem.data("taphold_triggered", true); } }, settings.duration)); } // When user ends a tap or click, decide what we should do. function stopHandler(event) { var $elem = jQuery(this); // If taphold has been cancelled, then we're done. if ($elem.data("taphold_cancelled")) { return; } // Clear the hold timer. If it hasn't already triggered, then it's too late anyway. clearTimeout($elem.data("taphold_timer")); // If hold wasn't triggered and not already clicked, then was a click event. if (!$elem.data("taphold_triggered") && !$elem.data("taphold_clicked")) { // If click handler, trigger it. if (typeof $elem.data("taphold_click_handler") == "function") { $elem.data("taphold_click_handler")(jQuery.extend(event, jQuery.Event("click"))); } // Set flag to say we've triggered the click event. $elem.data("taphold_clicked", true); } } // If a user prematurely leaves the boundary of the object we're working on. function leaveHandler(event) { // Cancel the event. $(this).data("taphold_cancelled", true); } // Determine if touch events are supported. var touchSupported = ("ontouchstart" in window) // Most browsers || ("onmsgesturechange" in window); // Microsoft var taphold = $.event.special.taphold = { setup: function(data) { $(this).bind((touchSupported ? "touchstart" : "mousedown"), data, startHandler) .bind((touchSupported ? "touchend" : "mouseup"), stopHandler) .bind((touchSupported ? "touchmove touchcancel" : "mouseleave"), leaveHandler); }, teardown: function(namespaces) { $(this).unbind((touchSupported ? "touchstart" : "mousedown"), startHandler) .unbind((touchSupported ? "touchend" : "mouseup"), stopHandler) .unbind((touchSupported ? "touchmove touchcancel" : "mouseleave"), leaveHandler); } }; })(jQuery);/** This file is part of KCFinder project * * @desc User Agent jQuery Plugin * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ (function($) { $.agent = {}; var agent = " " + navigator.userAgent, patterns = [ { expr: / [a-z]+\/[0-9a-z\.]+/ig, delim: "/" }, { expr: / [a-z]+:[0-9a-z\.]+/ig, delim: ":", keys: ["rv", "version"] }, { expr: / [a-z]+\s+[0-9a-z\.]+/ig, delim: /\s+/, keys: ["opera", "msie", "firefox", "android"] }, { expr: /[ \/\(]([a-z0-9_]+)[ ;\)\/]/ig, keys: "i386|i486|i586|i686|x86|x64|x86_64|intel|ppc|powerpc|windows|macintosh|darwin|unix|linux|sunos|android|iphone|ipad|ipod|amiga|amigaos|beos|wii|playstation|gentoo|fedora|slackware|ubuntu|archlinux|debian|mint|mageia|mandriva|freebsd|openbsd|netbsd|solaris|opensolaris|x11|mobile|phone".split('|'), sub: "platform" } ]; $.each(patterns, function(i, pattern) { var elements = agent.match(pattern.expr); if (elements === null) return; $.each(elements, function(j, ag) { ag = ag.replace(/^\s+/, "").toLowerCase(); var key = ag.replace(pattern.expr, "$1"), val = true; if (typeof pattern.delim != "undefined") { ag = ag.split(pattern.delim); key = ag[0]; val = ag[1]; } if (typeof pattern.keys != "undefined") { var exists = false, k = 0; for (; k < pattern.keys.length; k++) if (pattern.keys[k] == key) { exists = true; break; } if (!exists) return; } if (typeof pattern.sub != "undefined") { if (typeof $.agent[pattern.sub] != "object") $.agent[pattern.sub] = {}; if (typeof $.agent[pattern.sub][key] == "undefined") $.agent[pattern.sub][key] = val; } else if (typeof $.agent[key] == "undefined") $.agent[key] = val; }); }); if (!$.agent.platform) $.agent.platform = {}; // Check for mobile device $.mobile = false; var keys = "mobile|android|iphone|ipad|ipod|iemobile|phone".split('|'); a = $.agent; $.each([a, a.platform], function(i, p) { for (var j = 0; j < keys.length; j++) { if (p[keys[j]]) { $.mobile = true; return false; } } }); })(jQuery);/** This file is part of KCFinder project * * @desc Helper functions integrated in jQuery * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ (function($) { $.fn.selection = function(start, end) { var field = this.get(0); if (field.createTextRange) { var selRange = field.createTextRange(); selRange.collapse(true); selRange.moveStart('character', start); selRange.moveEnd('character', end-start); selRange.select(); } else if (field.setSelectionRange) { field.setSelectionRange(start, end); } else if (field.selectionStart) { field.selectionStart = start; field.selectionEnd = end; } field.focus(); }; $.fn.disableTextSelect = function() { return this.each(function() { if ($.agent.firefox) { // Firefox $(this).css('MozUserSelect', "none"); } else if ($.agent.msie) { // IE $(this).bind('selectstart', function() { return false; }); } else { //Opera, etc. $(this).mousedown(function() { return false; }); } }); }; $.fn.outerSpace = function(type, mbp) { var selector = this.get(0), r = 0, x; if (!mbp) mbp = "mbp"; if (/m/i.test(mbp)) { x = parseInt($(selector).css('margin-' + type)); if (x) r += x; } if (/b/i.test(mbp)) { x = parseInt($(selector).css('border-' + type + '-width')); if (x) r += x; } if (/p/i.test(mbp)) { x = parseInt($(selector).css('padding-' + type)); if (x) r += x; } return r; }; $.fn.outerLeftSpace = function(mbp) { return this.outerSpace('left', mbp); }; $.fn.outerTopSpace = function(mbp) { return this.outerSpace('top', mbp); }; $.fn.outerRightSpace = function(mbp) { return this.outerSpace('right', mbp); }; $.fn.outerBottomSpace = function(mbp) { return this.outerSpace('bottom', mbp); }; $.fn.outerHSpace = function(mbp) { return (this.outerLeftSpace(mbp) + this.outerRightSpace(mbp)); }; $.fn.outerVSpace = function(mbp) { return (this.outerTopSpace(mbp) + this.outerBottomSpace(mbp)); }; $.fn.fullscreen = function() { if (!$(this).get(0)) return var t = $(this).get(0), requestMethod = t.requestFullScreen || t.requestFullscreen || t.webkitRequestFullScreen || t.mozRequestFullScreen || t.msRequestFullscreen; if (requestMethod) requestMethod.call(t); else if (typeof window.ActiveXObject !== "undefined") { var wscript = new ActiveXObject("WScript.Shell"); if (wscript !== null) wscript.SendKeys("{F11}"); } }; $.fn.toggleFullscreen = function(doc) { if ($.isFullscreen(doc)) $.exitFullscreen(doc); else $(this).fullscreen(); }; $.exitFullscreen = function(doc) { var d = doc ? doc : document, requestMethod = d.cancelFullScreen || d.cancelFullscreen || d.webkitCancelFullScreen || d.mozCancelFullScreen || d.msExitFullscreen || d.exitFullscreen; if (requestMethod) requestMethod.call(d); else if (typeof window.ActiveXObject !== "undefined") { var wscript = new ActiveXObject("WScript.Shell"); if (wscript !== null) wscript.SendKeys("{F11}"); } }; $.isFullscreen = function(doc) { var d = doc ? doc : document; return (d.fullScreenElement && (d.fullScreenElement !== null)) || (d.fullscreenElement && (d.fullscreenElement !== null)) || (d.msFullscreenElement && (d.msFullscreenElement !== null)) || d.mozFullScreen || d.webkitIsFullScreen; }; $.clearSelection = function() { if (document.selection) document.selection.empty(); else if (window.getSelection) window.getSelection().removeAllRanges(); }; $.$ = { htmlValue: function(value) { return value .replace(/\&/g, "&amp;") .replace(/\"/g, "&quot;") .replace(/\'/g, "&#39;"); }, htmlData: function(value) { return value.toString() .replace(/\&/g, "&amp;") .replace(/\</g, "&lt;") .replace(/\>/g, "&gt;") .replace(/\ /g, "&nbsp;") .replace(/\"/g, "&quot;") .replace(/\'/g, "&#39;"); }, jsValue: function(value) { return value .replace(/\\/g, "\\\\") .replace(/\r?\n/, "\\\n") .replace(/\"/g, "\\\"") .replace(/\'/g, "\\'"); }, basename: function(path) { var expr = /^.*\/([^\/]+)\/?$/g; return expr.test(path) ? path.replace(expr, "$1") : path; }, dirname: function(path) { var expr = /^(.*)\/[^\/]+\/?$/g; return expr.test(path) ? path.replace(expr, "$1") : ''; }, inArray: function(needle, arr) { if (!$.isArray(arr)) return false; for (var i = 0; i < arr.length; i++) if (arr[i] == needle) return true; return false; }, getFileExtension: function(filename, toLower) { if (typeof toLower == 'undefined') toLower = true; if (/^.*\.[^\.]*$/.test(filename)) { var ext = filename.replace(/^.*\.([^\.]*)$/, "$1"); return toLower ? ext.toLowerCase(ext) : ext; } else return ""; }, escapeDirs: function(path) { var fullDirExpr = /^([a-z]+)\:\/\/([^\/^\:]+)(\:(\d+))?\/(.+)$/, prefix = ""; if (fullDirExpr.test(path)) { var port = path.replace(fullDirExpr, "$4"); prefix = path.replace(fullDirExpr, "$1://$2"); if (port.length) prefix += ":" + port; prefix += "/"; path = path.replace(fullDirExpr, "$5"); } var dirs = path.split('/'), escapePath = '', i = 0; for (; i < dirs.length; i++) escapePath += encodeURIComponent(dirs[i]) + '/'; return prefix + escapePath.substr(0, escapePath.length - 1); }, kuki: { prefix: '', duration: 356, domain: '', path: '', secure: false, set: function(name, value, duration, domain, path, secure) { name = this.prefix + name; if (duration == null) duration = this.duration; if (secure == null) secure = this.secure; if ((domain == null) && this.domain) domain = this.domain; if ((path == null) && this.path) path = this.path; secure = secure ? true : false; var date = new Date(); date.setTime(date.getTime() + (duration * 86400000)); var expires = date.toGMTString(); var str = name + '=' + value + '; expires=' + expires; if (domain != null) str += '; domain=' + domain; if (path != null) str += '; path=' + path; if (secure) str += '; secure'; return (document.cookie = str) ? true : false; }, get: function(name) { name = this.prefix + name; var nameEQ = name + '='; var kukis = document.cookie.split(';'); var kuki; for (var i = 0; i < kukis.length; i++) { kuki = kukis[i]; while (kuki.charAt(0) == ' ') kuki = kuki.substring(1, kuki.length); if (kuki.indexOf(nameEQ) == 0) return kuki.substring(nameEQ.length, kuki.length); } return null; }, del: function(name) { return this.set(name, '', -1); }, isSet: function(name) { return (this.get(name) != null); } } }; })(jQuery); /** This file is part of KCFinder project * * @desc Helper MD5 checksum function * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ (function($) { $.$.utf8encode = function(string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }; $.$.md5 = function(string) { string = $.$.utf8encode(string); var RotateLeft = function(lValue, iShiftBits) { return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits)); }, AddUnsigned = function(lX, lY) { var lX8 = (lX & 0x80000000), lY8 = (lY & 0x80000000), lX4 = (lX & 0x40000000), lY4 = (lY & 0x40000000), lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8); if (lX4 | lY4) return (lResult & 0x40000000) ? (lResult ^ 0xC0000000 ^ lX8 ^ lY8) : (lResult ^ 0x40000000 ^ lX8 ^ lY8); else return (lResult ^ lX8 ^ lY8); }, F = function(x, y, z) { return (x & y) | ((~x) & z); }, G = function(x, y, z) { return (x & z) | (y & (~z)); }, H = function(x, y, z) { return (x ^ y ^ z); }, I = function(x, y, z) { return (y ^ (x | (~z))); }, FF = function(a, b, c, d, x, s, ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }, GG = function(a, b, c, d, x, s, ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }, HH = function(a, b, c, d, x, s, ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }, II = function(a, b, c, d, x, s, ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }, ConvertToWordArray = function(string) { var lWordCount, lMessageLength = string.length, lNumberOfWords_temp1 = lMessageLength + 8, lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64, lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16, lWordArray = [lNumberOfWords - 1], lBytePosition = 0, lByteCount = 0; while (lByteCount < lMessageLength) { lWordCount = (lByteCount - (lByteCount % 4)) / 4; lBytePosition = (lByteCount % 4) * 8; lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition)); lByteCount++; } lWordCount = (lByteCount - (lByteCount % 4)) / 4; lBytePosition = (lByteCount % 4) * 8; lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition); lWordArray[lNumberOfWords - 2] = lMessageLength << 3; lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29; return lWordArray; }, WordToHex = function(lValue) { var lByte, lCount = 0, WordToHexValue = "", WordToHexValue_temp = ""; for (; lCount <= 3; lCount++) { lByte = (lValue >>> (lCount * 8)) & 255; WordToHexValue_temp = "0" + lByte.toString(16); WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2,2); } return WordToHexValue; }, AA, BB, CC, DD, k = 0, x = ConvertToWordArray(string), a = 0x67452301, b = 0xEFCDAB89, c = 0x98BADCFE, d = 0x10325476, S11 = 7, S12 = 12, S13 = 17, S14 = 22, S21 = 5, S22 = 9, S23 = 14, S24 = 20, S31 = 4, S32 = 11, S33 = 16, S34 = 23, S41 = 6, S42 = 10, S43 = 15, S44 = 21; for (; k < x.length; k += 16) { AA = a; BB = b; CC = c; DD = d; a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478); d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756); c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB); b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE); a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF); d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A); c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613); b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501); a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8); d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF); c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1); b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE); a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122); d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193); c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E); b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821); a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562); d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340); c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51); b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA); a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D); d = GG(d, a, b, c, x[k + 10], S22, 0x2441453); c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681); b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8); a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6); d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6); c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87); b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED); a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905); d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8); c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9); b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A); a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942); d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681); c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122); b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C); a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44); d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9); c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60); b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70); a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6); d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA); c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085); b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05); a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039); d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5); c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8); b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665); a = II(a, b, c, d, x[k + 0], S41, 0xF4292244); d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97); c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7); b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039); a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3); d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92); c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D); b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1); a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F); d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0); c = II(c, d, a, b, x[k + 6], S43, 0xA3014314); b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1); a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82); d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235); c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB); b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391); a = AddUnsigned(a, AA); b = AddUnsigned(b, BB); c = AddUnsigned(c, CC); d = AddUnsigned(d, DD); } return (WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d)).toLowerCase(); }; })(jQuery);/** This file is part of KCFinder project * * @desc Base JavaScript object properties * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ var _ = { opener: {}, support: {}, files: [], clipboard: [], labels: [], shows: [], orders: [], cms: "", scrollbarWidth: 20 }; /** This file is part of KCFinder project * * @desc Dialog boxes functionality * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.alert = function(text, field, options) { var close = !field ? function() {} : ($.isFunction(field) ? field : function() { setTimeout(function() {field.focus(); }, 1); } ), o = { close: function() { close(); if ($(this).hasClass('ui-dialog-content')) $(this).dialog('destroy').detach(); } }; $.extend(o, options); return _.dialog(_.label("Warning"), text.replace("\n", "<br />\n"), o); }; _.confirm = function(text, callback, options) { var o = { buttons: [ { text: _.label("Yes"), icons: {primary: "ui-icon-check"}, click: function() { callback(); $(this).dialog('destroy').detach(); } }, { text: _.label("No"), icons: {primary: "ui-icon-closethick"}, click: function() { $(this).dialog('destroy').detach(); } } ] }; $.extend(o, options); return _.dialog(_.label("Confirmation"), text, o); }; _.dialog = function(title, content, options) { if (!options) options = {}; var dlg = $('<div></div>'); dlg.hide().attr('title', title).html(content).appendTo('body'); if (dlg.find('form').get(0) && !dlg.find('form [type="submit"]').get(0)) dlg.find('form').append('<button type="submit" style="width:0;height:0;padding:0;margin:0;border:0;visibility:hidden">Submit</button>'); var o = { resizable: false, minHeight: false, modal: true, width: 351, buttons: [ { text: _.label("OK"), icons: {primary: "ui-icon-check"}, click: function() { if (typeof options.close != "undefined") options.close(); if ($(this).hasClass('ui-dialog-content')) $(this).dialog('destroy').detach(); } } ], close: function() { if ($(this).hasClass('ui-dialog-content')) $(this).dialog('destroy').detach(); }, closeText: false, zindex: 1000000, alone: false, blur: false, legend: false, nopadding: false, show: { effect: "fade", duration: 250 }, hide: { effect: "fade", duration: 250 } }; $.extend(o, options); if (o.alone) $('.ui-dialog .ui-dialog-content').dialog('destroy').detach(); dlg.dialog(o); if (o.nopadding) dlg.css({padding: 0}); if (o.blur) dlg.parent().find('.ui-dialog-buttonpane button').first().get(0).blur(); if (o.legend) dlg.parent().find('.ui-dialog-buttonpane').prepend('<div style="float:left;padding:10px 0 0 10px">' + o.legend + '</div>'); if ($.agent && $.agent.firefox) dlg.css('overflow-x', "hidden"); return dlg; }; _.fileNameDialog = function(post, inputName, inputValue, url, labels, callBack, selectAll) { var html = '<form method="post" action="javascript:;"><input name="' + inputName + '" type="text" /></form>', submit = function() { var name = dlg.find('[type="text"]').get(0); name.value = $.trim(name.value); if (name.value == "") { _.alert(_.label(labels.errEmpty), function() { name.focus(); }); return false; } else if (/[\/\\]/g.test(name.value)) { _.alert(_.label(labels.errSlash), function() { name.focus(); }); return false; } else if (name.value.substr(0, 1) == ".") { _.alert(_.label(labels.errDot), function() { name.focus(); }); return false; } post[inputName] = name.value; $.ajax({ type: "post", dataType: "json", url: url, data: post, async: false, success: function(data) { if (_.check4errors(data, false)) return; if (callBack) callBack(data); dlg.dialog("destroy").detach(); }, error: function() { _.alert(_.label("Unknown error.")); } }); return false; }, dlg = _.dialog(_.label(labels.title), html, { width: 351, buttons: [ { text: _.label("OK"), icons: {primary: "ui-icon-check"}, click: function() { submit(); } }, { text: _.label("Cancel"), icons: {primary: "ui-icon-closethick"}, click: function() { $(this).dialog('destroy').detach(); } } ] }), field = dlg.find('[type="text"]'); field.uniform().attr('value', inputValue).css('width', 310); dlg.find('form').submit(submit); if (!selectAll && /^(.+)\.[^\.]+$/ .test(inputValue)) field.selection(0, inputValue.replace(/^(.+)\.[^\.]+$/, "$1").length); else { field.get(0).focus(); field.get(0).select(); } };/** This file is part of KCFinder project * * @desc Object initializations * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.init = function() { if (!_.checkAgent()) return; $('body').click(function() { _.menu.hide(); }).rightClick(); $('#menu').unbind().click(function() { return false; }); _.initOpeners(); _.initSettings(); _.initContent(); _.initToolbar(); _.initResizer(); _.initDropUpload(); var div = $('<div></div>') .css({width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: -1000}) .prependTo('body').append('<div></div>').find('div').css({width: '100%', height: 200}); _.scrollbarWidth = 100 - div.width(); div.parent().remove(); $.each($.agent, function(i) { if (i != "platform") $('body').addClass(i) }); if ($.agent.platform) $.each($.agent.platform, function(i) { $('body').addClass(i) }); if ($.mobile) $('body').addClass("mobile"); }; _.checkAgent = function() { if (($.agent.msie && !$.agent.opera && !$.agent.chromeframe && (parseInt($.agent.msie) < 9)) || ($.agent.opera && (parseInt($.agent.version) < 10)) || ($.agent.firefox && (parseFloat($.agent.firefox) < 1.8)) ) { var html = '<div style="padding:10px">Your browser is not capable to display KCFinder. Please update your browser or install another one: <a href="http://www.mozilla.com/firefox/" target="_blank">Mozilla Firefox</a>, <a href="http://www.apple.com/safari" target="_blank">Apple Safari</a>, <a href="http://www.google.com/chrome" target="_blank">Google Chrome</a>, <a href="http://www.opera.com/browser" target="_blank">Opera</a>.'; if ($.agent.msie && !$.agent.opera) html += ' You may also install <a href="http://www.google.com/chromeframe" target="_blank">Google Chrome Frame ActiveX plugin</a> to get Internet Explorer 6, 7, 8 working.'; html += '</div>'; $('body').html(html); return false; } return true; }; _.initOpeners = function() { try { // TinyMCE 3 if (_.opener.name == "tinymce") { if (typeof tinyMCEPopup == "undefined") _.opener.name = null; else _.opener.callBack = true; // TinyMCE 4 } else if (_.opener.name == "tinymce4") _.opener.callBack = true; // CKEditor else if (_.opener.name == "ckeditor") { if (window.parent && window.parent.CKEDITOR) _.opener.CKEditor.object = window.parent.CKEDITOR; else if (window.opener && window.opener.CKEDITOR) { _.opener.CKEditor.object = window.opener.CKEDITOR; _.opener.callBack = true; } else _.opener.CKEditor = null; // FCKeditor } else if ((!_.opener.name || (_.opener.name == "fckeditor")) && window.opener && window.opener.SetUrl) { _.opener.name = "fckeditor"; _.opener.callBack = true; } // Custom callback if (!_.opener.callBack) { if ((window.opener && window.opener.KCFinder && window.opener.KCFinder.callBack) || (window.parent && window.parent.KCFinder && window.parent.KCFinder.callBack) ) _.opener.callBack = window.opener ? window.opener.KCFinder.callBack : window.parent.KCFinder.callBack; if (( window.opener && window.opener.KCFinder && window.opener.KCFinder.callBackMultiple ) || ( window.parent && window.parent.KCFinder && window.parent.KCFinder.callBackMultiple ) ) _.opener.callBackMultiple = window.opener ? window.opener.KCFinder.callBackMultiple : window.parent.KCFinder.callBackMultiple; } } catch(e) {} }; _.initContent = function() { $('div#folders').html(_.label("Loading folders...")); $('div#files').html(_.label("Loading files...")); $.ajax({ type: "get", dataType: "json", url: _.getURL("init"), async: false, success: function(data) { if (_.check4errors(data)) return; _.dirWritable = data.dirWritable; $('#folders').html(_.buildTree(data.tree)); _.setTreeData(data.tree); _.setTitle("KCFinder: /" + _.dir); _.initFolders(); _.files = data.files ? data.files : []; _.orderFiles(); }, error: function() { $('div#folders').html(_.label("Unknown error.")); $('div#files').html(_.label("Unknown error.")); } }); }; _.initResizer = function() { var cursor = ($.agent.opera) ? 'move' : 'col-resize'; $('#resizer').css('cursor', cursor).draggable({ axis: 'x', start: function() { $(this).css({ opacity: "0.4", filter: "alpha(opacity=40)" }); $('#all').css('cursor', cursor); }, stop: function() { $(this).css({ opacity: "0", filter: "alpha(opacity=0)" }); $('#all').css('cursor', ""); var jLeft = $('#left'), jRight = $('#right'), jFiles = $('#files'), jFolders = $('#folders'), left = parseInt($(this).css('left')) + parseInt($(this).css('width')), w = 0, r; $('#toolbar a').each(function() { if ($(this).css('display') != "none") w += $(this).outerWidth(true); }); r = $(window).width() - w; if (left < 100) left = 100; if (left > r) left = r; var right = $(window).width() - left; jLeft.css('width', left); jRight.css('width', right); jFiles.css('width', jRight.innerWidth() - jFiles.outerHSpace()); $('#resizer').css({ left: jLeft.outerWidth() - jFolders.outerRightSpace('m'), width: jFolders.outerRightSpace('m') + jFiles.outerLeftSpace('m') }); _.fixFilesHeight(); } }); }; _.resize = function() { var jLeft = $('#left'), jRight = $('#right'), jStatus = $('#status'), jFolders = $('#folders'), jFiles = $('#files'), jResizer = $('#resizer'), jWindow = $(window); jLeft.css({ width: "25%", height: jWindow.height() - jStatus.outerHeight() }); jRight.css({ width: "75%", height: jWindow.height() - jStatus.outerHeight() }); $('#toolbar').css('height', $('#toolbar a').outerHeight()); jResizer.css('height', $(window).height()); jFolders.css('height', jLeft.outerHeight() - jFolders.outerVSpace()); _.fixFilesHeight(); var width = jLeft.outerWidth() + jRight.outerWidth(); jStatus.css('width', width); while (jStatus.outerWidth() > width) jStatus.css('width', parseInt(jStatus.css('width')) - 1); while (jStatus.outerWidth() < width) jStatus.css('width', parseInt(jStatus.css('width')) + 1); jFiles.css('width', jRight.innerWidth() - jFiles.outerHSpace()); jResizer.css({ left: jLeft.outerWidth() - jFolders.outerRightSpace('m'), width: jFolders.outerRightSpace('m') + jFiles.outerLeftSpace('m') }); }; _.setTitle = function(title) { document.title = title; if (_.opener.name == "tinymce") tinyMCEPopup.editor.windowManager.setTitle(window, title); else if (_.opener.name == "tinymce4") { var ifr = $('iframe[src*="browse.php?opener=tinymce4&"]', window.parent.document), path = ifr.attr('src').split('browse.php?')[0]; ifr.parent().parent().find('div.mce-title').html('<span style="padding:0 0 0 28px;margin:-2px 0 -3px -6px;display:block;font-size:1em;font-weight:bold;background:url(' + path + 'themes/default/img/kcf_logo.png) left center no-repeat">' + title + '</span>'); } }; _.fixFilesHeight = function() { var jFiles = $('#files'), jSettings = $('#settings'); jFiles.css('height', $('#left').outerHeight() - $('#toolbar').outerHeight() - jFiles.outerVSpace() - ((jSettings.css('display') != "none") ? jSettings.outerHeight() : 0) ); }; /** This file is part of KCFinder project * * @desc Toolbar functionality * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.initToolbar = function() { $('#toolbar').disableTextSelect(); $('#toolbar a').click(function() { _.menu.hide(); }); if (!$.$.kuki.isSet('displaySettings')) $.$.kuki.set('displaySettings', "off"); if ($.$.kuki.get('displaySettings') == "on") { $('#toolbar a[href="kcact:settings"]').addClass('selected'); $('#settings').show(); _.resize(); } $('#toolbar a[href="kcact:settings"]').click(function () { var jSettings = $('#settings'); if (jSettings.css('display') == "none") { $(this).addClass('selected'); $.$.kuki.set('displaySettings', "on"); jSettings.show(); _.fixFilesHeight(); } else { $(this).removeClass('selected'); $.$.kuki.set('displaySettings', "off"); jSettings.hide(); _.fixFilesHeight(); } return false; }); $('#toolbar a[href="kcact:refresh"]').click(function() { _.refresh(); return false; }); $('#toolbar a[href="kcact:maximize"]').click(function() { _.maximize(this); return false; }); $('#toolbar a[href="kcact:about"]').click(function() { var html = '<div class="box about">' + '<div class="head"><a href="http://kcfinder.sunhater.com" target="_blank">KCFinder</a> ' + _.version + '</div>'; if (_.support.check4Update) html += '<div id="checkver"><span class="loading"><span>' + _.label("Checking for new version...") + '</span></span></div>'; html += '<div>' + _.label("Licenses:") + ' <a href="http://opensource.org/licenses/GPL-3.0" target="_blank">GPLv3</a> & <a href="http://opensource.org/licenses/LGPL-3.0" target="_blank">LGPLv3</a></div>' + '<div>Copyright &copy;2010-2014 Pavel Tzonkov</div>' + '</div>'; var dlg = _.dialog(_.label("About"), html, {width: 301}); setTimeout(function() { $.ajax({ dataType: "json", url: _.getURL('check4Update'), async: true, success: function(data) { if (!dlg.html().length) return; var span = $('#checkver'); span.removeClass('loading'); if (!data.version) { span.html(_.label("Unable to connect!")); return; } if (_.version < data.version) span.html('<a href="http://kcfinder.sunhater.com/download" target="_blank">' + _.label("Download version {version} now!", {version: data.version}) + '</a>'); else span.html(_.label("KCFinder is up to date!")); }, error: function() { if (!dlg.html().length) return; $('#checkver').removeClass('loading').html(_.label("Unable to connect!")); } }); }, 1000); return false; }); _.initUploadButton(); }; _.initUploadButton = function() { var btn = $('#toolbar a[href="kcact:upload"]'); if (!_.access.files.upload) { btn.hide(); return; } var top = btn.get(0).offsetTop, width = btn.outerWidth(), height = btn.outerHeight(), jInput = $('#upload input'); $('#toolbar').prepend('<div id="upload" style="top:' + top + 'px;width:' + width + 'px;height:' + height + 'px"><form enctype="multipart/form-data" method="post" target="uploadResponse" action="' + _.getURL('upload') + '"><input type="file" name="upload[]" onchange="_.uploadFile(this.form)" style="height:' + height + 'px" multiple="multiple" /><input type="hidden" name="dir" value="" /></form></div>'); jInput.css('margin-left', "-" + (jInput.outerWidth() - width)); $('#upload').mouseover(function() { $('#toolbar a[href="kcact:upload"]').addClass('hover'); }).mouseout(function() { $('#toolbar a[href="kcact:upload"]').removeClass('hover'); }); }; _.uploadFile = function(form) { if (!_.dirWritable) { _.alert(_.label("Cannot write to upload folder.")); $('#upload').detach(); _.initUploadButton(); return; } form.elements[1].value = _.dir; $('<iframe id="uploadResponse" name="uploadResponse" src="javascript:;"></iframe>').prependTo(document.body); $('#loading').html(_.label("Uploading file...")).show(); form.submit(); $('#uploadResponse').load(function() { var response = $(this).contents().find('body').text(); $('#loading').hide(); response = response.split("\n"); var selected = [], errors = []; $.each(response, function(i, row) { if (row.substr(0, 1) == "/") selected[selected.length] = row.substr(1, row.length - 1); else errors[errors.length] = row; }); if (errors.length) { errors = errors.join("\n"); if (errors.replace(/^\s+/g, "").replace(/\s+$/g, "").length) _.alert(errors); } if (!selected.length) selected = null; _.refresh(selected); $('#upload').detach(); setTimeout(function() { $('#uploadResponse').detach(); }, 1); _.initUploadButton(); }); }; _.maximize = function(button) { // TINYMCE 3 if (_.opener.name == "tinymce") { var par = window.parent.document, ifr = $('iframe[src*="browse.php?opener=tinymce&"]', par), id = parseInt(ifr.attr('id').replace(/^mce_(\d+)_ifr$/, "$1")), win = $('#mce_' + id, par); if ($(button).hasClass('selected')) { $(button).removeClass('selected'); win.css({ left: _.maximizeMCE.left, top: _.maximizeMCE.top, width: _.maximizeMCE.width, height: _.maximizeMCE.height }); ifr.css({ width: _.maximizeMCE.width - _.maximizeMCE.Hspace, height: _.maximizeMCE.height - _.maximizeMCE.Vspace }); } else { $(button).addClass('selected') _.maximizeMCE = { width: parseInt(win.css('width')), height: parseInt(win.css('height')), left: win.position().left, top: win.position().top, Hspace: parseInt(win.css('width')) - parseInt(ifr.css('width')), Vspace: parseInt(win.css('height')) - parseInt(ifr.css('height')) }; var width = $(window.top).width(), height = $(window.top).height(); win.css({ left: $(window.parent).scrollLeft(), top: $(window.parent).scrollTop(), width: width, height: height }); ifr.css({ width: width - _.maximizeMCE.Hspace, height: height - _.maximizeMCE.Vspace }); } // TINYMCE 4 } else if (_.opener.name == "tinymce4") { var par = window.parent.document, ifr = $('iframe[src*="browse.php?opener=tinymce4&"]', par).parent(), win = ifr.parent(); if ($(button).hasClass('selected')) { $(button).removeClass('selected'); win.css({ left: _.maximizeMCE4.left, top: _.maximizeMCE4.top, width: _.maximizeMCE4.width, height: _.maximizeMCE4.height }); ifr.css({ width: _.maximizeMCE4.width, height: _.maximizeMCE4.height - _.maximizeMCE4.Vspace }); } else { $(button).addClass('selected'); _.maximizeMCE4 = { width: parseInt(win.css('width')), height: parseInt(win.css('height')), left: win.position().left, top: win.position().top, Vspace: win.outerHeight(true) - ifr.outerHeight(true) - 1 }; var width = $(window.top).width(), height = $(window.top).height(); win.css({ left: 0, top: 0, width: width, height: height }); ifr.css({ width: width, height: height - _.maximizeMCE4.Vspace }); } // PUPUP WINDOW } else if (window.opener) { window.moveTo(0, 0); width = screen.availWidth; height = screen.availHeight; if ($.agent.opera) height -= 50; window.resizeTo(width, height); } else { if (window.parent) { var el = null; $(window.parent.document).find('iframe').each(function() { if (this.src.replace('/?', '?') == window.location.href.replace('/?', '?')) { el = this; return false; } }); // IFRAME if (el !== null) $(el).toggleFullscreen(window.parent.document); // SELF WINDOW else $('body').toggleFullscreen(); } else $('body').toggleFullscreen(); } }; _.refresh = function(selected) { _.fadeFiles(); $.ajax({ type: "post", dataType: "json", url: _.getURL("chDir"), data: {dir: _.dir}, async: false, success: function(data) { if (_.check4errors(data)) { $('#files > div').css({opacity: "", filter: ""}); return; } _.dirWritable = data.dirWritable; _.files = data.files ? data.files : []; _.orderFiles(null, selected); _.statusDir(); }, error: function() { $('#files > div').css({opacity: "", filter: ""}); $('#files').html(_.label("Unknown error.")); } }); }; /** This file is part of KCFinder project * * @desc Settings panel functionality * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.initSettings = function() { $('#settings').disableTextSelect(); $('#settings fieldset, #settings input, #settings label').uniform(); if (!_.shows.length) $('#show input[type="checkbox"]').each(function(i) { _.shows[i] = this.name; }); var shows = _.shows; if (!$.$.kuki.isSet('showname')) { $.$.kuki.set('showname', "on"); $.each(shows, function (i, val) { if (val != "name") $.$.kuki.set('show' + val, "off"); }); } $('#show input[type="checkbox"]').click(function() { $.$.kuki.set('show' + this.name, this.checked ? "on" : "off") $('#files .file div.' + this.name).css('display', this.checked ? "block" : "none"); }); $.each(shows, function(i, val) { $('#show input[name="' + val + '"]').get(0).checked = ($.$.kuki.get('show' + val) == "on") ? "checked" : ""; }); if (!_.orders.length) $('#order input[type="radio"]').each(function(i) { _.orders[i] = this.value; }) var orders = _.orders; if (!$.$.kuki.isSet('order')) $.$.kuki.set('order', "name"); if (!$.$.kuki.isSet('orderDesc')) $.$.kuki.set('orderDesc', "off"); $('#order input[value="' + $.$.kuki.get('order') + '"]').get(0).checked = true; $('#order input[name="desc"]').get(0).checked = ($.$.kuki.get('orderDesc') == "on"); $('#order input[type="radio"]').click(function() { $.$.kuki.set('order', this.value); _.orderFiles(); }); $('#order input[name="desc"]').click(function() { $.$.kuki.set('orderDesc', this.checked ? 'on' : "off"); _.orderFiles(); }); if (!$.$.kuki.isSet('view')) $.$.kuki.set('view', "thumbs"); if ($.$.kuki.get('view') == "list") $('#show').parent().hide(); $('#view input[value="' + $.$.kuki.get('view') + '"]').get(0).checked = true; $('#view input').click(function() { var view = this.value; if ($.$.kuki.get('view') != view) { $.$.kuki.set('view', view); if (view == "list") $('#show').parent().hide(); else $('#show').parent().show(); } _.fixFilesHeight(); _.refresh(); }); }; /** This file is part of KCFinder project * * @desc File related functionality * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.initFiles = function() { $(document).unbind('keydown').keydown(function(e) { return !_.selectAll(e); }); $('#files').unbind().scroll(function() { _.menu.hide(); }).disableTextSelect(); $('.file').unbind().click(function(e) { _.selectFile($(this), e); _.returnFile($(this)); }).rightClick(function(el, e) { _.menuFile($(el), e); }).dblclick(function() { _.returnFile($(this)); }); if ($.mobile) $('.file').on('taphold', function() { _.menuFile($(this), { pageX: $(this).offset().left, pageY: $(this).offset().top + $(this).outerHeight() }); }); $.each(_.shows, function(i, val) { $('#files .file div.' + val).css('display', ($.$.kuki.get('show' + val) == "off") ? "none" : "block"); }); _.statusDir(); }; _.showFiles = function(callBack, selected) { _.fadeFiles(); setTimeout(function() { var c = $('<div></div>'); $.each(_.files, function(i, file) { var f, icon, stamp = file.size + "|" + file.mtime; // List if ($.$.kuki.get('view') == "list") { if (!i) c.html('<table></table>'); icon = $.$.getFileExtension(file.name); if (file.thumb) icon = ".image"; else if (!icon.length || !file.smallIcon) icon = "."; icon = "themes/" + _.theme + "/img/files/small/" + icon + ".png"; f = $('<tr class="file"><td class="name thumb"></td><td class="time"></td><td class="size"></td></tr>'); f.appendTo(c.find('table')); // Thumbnails } else { if (file.thumb) icon = _.getURL('thumb') + "&file=" + encodeURIComponent(file.name) + "&dir=" + encodeURIComponent(_.dir) + "&stamp=" + stamp; else if (file.smallThumb) { icon = _.uploadURL + "/" + _.dir + "/" + encodeURIComponent(file.name); icon = $.$.escapeDirs(icon).replace(/\'/g, "%27"); } else { icon = file.bigIcon ? $.$.getFileExtension(file.name) : "."; if (!icon.length) icon = "."; icon = "themes/" + _.theme + "/img/files/big/" + icon + ".png"; } f = $('<div class="file"><div class="thumb"></div><div class="name"></div><div class="time"></div><div class="size"></div></div>'); f.appendTo(c); } f.find('.thumb').css({backgroundImage: 'url("' + icon + '")'}); f.find('.name').html($.$.htmlData(file.name)); f.find('.time').html(file.date); f.find('.size').html(_.humanSize(file.size)); f.data(file); if ((file.name === selected) || $.$.inArray(file.name, selected)) f.addClass('selected'); }); c.css({opacity:'', filter:''}); $('#files').html(c); if (callBack) callBack(); _.initFiles(); }, 200); }; _.selectFile = function(file, e) { // Click with Ctrl, Meta or Shift key if (e.ctrlKey || e.metaKey || e.shiftKey) { // Click with Shift key if (e.shiftKey && !file.hasClass('selected')) { var f = file.prev(); while (f.get(0) && !f.hasClass('selected')) { f.addClass('selected'); f = f.prev(); } } file.toggleClass('selected'); // Update statusbar var files = $('.file.selected').get(), size = 0, data; if (!files.length) _.statusDir(); else { $.each(files, function(i, cfile) { size += $(cfile).data('size'); }); size = _.humanSize(size); if (files.length > 1) $('#fileinfo').html(files.length + " " + _.label("selected files") + " (" + size + ")"); else { data = $(files[0]).data(); $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); } } // Normal click } else { data = file.data(); $('.file').removeClass('selected'); file.addClass('selected'); $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); } }; _.selectAll = function(e) { if ((!e.ctrlKey && !e.metaKey) || ((e.keyCode != 65) && (e.keyCode != 97))) // Ctrl-A return false; var files = $('.file'), size = 0; if (files.length) { files.addClass('selected').each(function() { size += $(this).data('size'); }); $('#fileinfo').html(files.length + " " + _.label("selected files") + " (" + _.humanSize(size) + ")"); } return true; }; _.returnFile = function(file) { var button, win, fileURL = file.substr ? file : _.uploadURL + "/" + _.dir + "/" + file.data('name'); fileURL = $.$.escapeDirs(fileURL); if (_.opener.name == "ckeditor") { _.opener.CKEditor.object.tools.callFunction(_.opener.CKEditor.funcNum, fileURL, ""); window.close(); } else if (_.opener.name == "fckeditor") { window.opener.SetUrl(fileURL) ; window.close() ; } else if (_.opener.name == "tinymce") { win = tinyMCEPopup.getWindowArg('window'); win.document.getElementById(tinyMCEPopup.getWindowArg('input')).value = fileURL; if (win.getImageData) win.getImageData(); if (typeof(win.ImageDialog) != "undefined") { if (win.ImageDialog.getImageData) win.ImageDialog.getImageData(); if (win.ImageDialog.showPreviewImage) win.ImageDialog.showPreviewImage(fileURL); } tinyMCEPopup.close(); } else if (_.opener.name == "tinymce4") { win = (window.opener ? window.opener : window.parent); $(win.document).find('#' + _.opener.TinyMCE.field).val(fileURL); win.tinyMCE.activeEditor.windowManager.close(); } else if (_.opener.callBack) { if (window.opener && window.opener.KCFinder) { _.opener.callBack(fileURL); window.close(); } if (window.parent && window.parent.KCFinder) { button = $('#toolbar a[href="kcact:maximize"]'); if (button.hasClass('selected')) _.maximize(button); _.opener.callBack(fileURL); } } else if (_.opener.callBackMultiple) { if (window.opener && window.opener.KCFinder) { _.opener.callBackMultiple([fileURL]); window.close(); } if (window.parent && window.parent.KCFinder) { button = $('#toolbar a[href="kcact:maximize"]'); if (button.hasClass('selected')) _.maximize(button); _.opener.callBackMultiple([fileURL]); } } }; _.returnFiles = function(files) { if (_.opener.callBackMultiple && files.length) { var rfiles = []; $.each(files, function(i, file) { rfiles[i] = _.uploadURL + "/" + _.dir + "/" + $(file).data('name'); rfiles[i] = $.$.escapeDirs(rfiles[i]); }); _.opener.callBackMultiple(rfiles); if (window.opener) window.close() } }; _.returnThumbnails = function(files) { if (_.opener.callBackMultiple) { var rfiles = [], j = 0; $.each(files, function(i, file) { if ($(file).data('thumb')) { rfiles[j] = _.thumbsURL + "/" + _.dir + "/" + $(file).data('name'); rfiles[j] = $.$.escapeDirs(rfiles[j++]); } }); _.opener.callBackMultiple(rfiles); if (window.opener) window.close() } }; /** This file is part of KCFinder project * * @desc Folder related functionality * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.initFolders = function() { $('#folders').scroll(function() { _.menu.hide(); }).disableTextSelect(); $('div.folder > a').unbind().click(function() { _.menu.hide(); return false; }); $('div.folder > a > span.brace').unbind().click(function() { if ($(this).hasClass('opened') || $(this).hasClass('closed')) _.expandDir($(this).parent()); }); $('div.folder > a > span.folder').unbind().click(function() { _.changeDir($(this).parent()); }).rightClick(function(el, e) { _.menuDir($(el).parent(), e); }); if ($.mobile) { $('div.folder > a > span.folder').on('taphold', function() { _.menuDir($(this).parent(), { pageX: $(this).offset().left + 1, pageY: $(this).offset().top + $(this).outerHeight() }); }); } }; _.setTreeData = function(data, path) { if (!path) path = ""; else if (path.length && (path.substr(path.length - 1, 1) != '/')) path += "/"; path += data.name; var selector = '#folders a[href="kcdir:/' + $.$.escapeDirs(path) + '"]'; $(selector).data({ name: data.name, path: path, readable: data.readable, writable: data.writable, removable: data.removable, hasDirs: data.hasDirs }); $(selector + ' span.folder').addClass(data.current ? 'current' : 'regular'); if (data.dirs && data.dirs.length) { $(selector + ' span.brace').addClass('opened'); $.each(data.dirs, function(i, cdir) { _.setTreeData(cdir, path + "/"); }); } else if (data.hasDirs) $(selector + ' span.brace').addClass('closed'); }; _.buildTree = function(root, path) { if (!path) path = ""; path += root.name; var cdir, html = '<div class="folder"><a href="kcdir:/' + $.$.escapeDirs(path) + '"><span class="brace">&nbsp;</span><span class="folder">' + $.$.htmlData(root.name) + '</span></a>'; if (root.dirs) { html += '<div class="folders">'; for (var i = 0; i < root.dirs.length; i++) { cdir = root.dirs[i]; html += _.buildTree(cdir, path + "/"); } html += '</div>'; } html += '</div>'; return html; }; _.expandDir = function(dir) { var path = dir.data('path'); if (dir.children('.brace').hasClass('opened')) { dir.parent().children('.folders').hide(500, function() { if (path == _.dir.substr(0, path.length)) _.changeDir(dir); }); dir.children('.brace').removeClass('opened').addClass('closed'); } else { if (dir.parent().children('.folders').get(0)) { dir.parent().children('.folders').show(500); dir.children('.brace').removeClass('closed').addClass('opened'); } else if (!$('#loadingDirs').get(0)) { dir.parent().append('<div id="loadingDirs">' + _.label("Loading folders...") + '</div>'); $('#loadingDirs').hide().show(200, function() { $.ajax({ type: "post", dataType: "json", url: _.getURL("expand"), data: {dir: path}, async: false, success: function(data) { $('#loadingDirs').hide(200, function() { $('#loadingDirs').detach(); }); if (_.check4errors(data)) return; var html = ""; $.each(data.dirs, function(i, cdir) { html += '<div class="folder"><a href="kcdir:/' + $.$.escapeDirs(path + '/' + cdir.name) + '"><span class="brace">&nbsp;</span><span class="folder">' + $.$.htmlData(cdir.name) + '</span></a></div>'; }); if (html.length) { dir.parent().append('<div class="folders">' + html + '</div>'); var folders = $(dir.parent().children('.folders').first()); folders.hide(); $(folders).show(500); $.each(data.dirs, function(i, cdir) { _.setTreeData(cdir, path); }); } if (data.dirs.length) dir.children('.brace').removeClass('closed').addClass('opened'); else dir.children('.brace').removeClass('opened closed'); _.initFolders(); _.initDropUpload(); }, error: function() { $('#loadingDirs').detach(); _.alert(_.label("Unknown error.")); } }); }); } } }; _.changeDir = function(dir) { if (dir.children('span.folder').hasClass('regular')) { $('div.folder > a > span.folder').removeClass('current regular').addClass('regular'); dir.children('span.folder').removeClass('regular').addClass('current'); $('#files').html(_.label("Loading files...")); $.ajax({ type: "post", dataType: "json", url: _.getURL("chDir"), data: {dir: dir.data('path')}, async: false, success: function(data) { if (_.check4errors(data)) return; _.files = data.files; _.orderFiles(); _.dir = dir.data('path'); _.dirWritable = data.dirWritable; _.setTitle("KCFinder: /" + _.dir); _.statusDir(); }, error: function() { $('#files').html(_.label("Unknown error.")); } }); } }; _.statusDir = function() { var i = 0, size = 0; for (; i < _.files.length; i++) size += _.files[i].size; size = _.humanSize(size); $('#fileinfo').html(_.files.length + " " + _.label("files") + " (" + size + ")"); }; _.refreshDir = function(dir) { var path = dir.data('path'); if (dir.children('.brace').hasClass('opened') || dir.children('.brace').hasClass('closed')) dir.children('.brace').removeClass('opened').addClass('closed'); dir.parent().children('.folders').first().detach(); if (path == _.dir.substr(0, path.length)) _.changeDir(dir); _.expandDir(dir); return true; }; /** This file is part of KCFinder project * * @desc Context menus * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.menu = { init: function() { $('#menu').html("<ul></ul>").css('display', 'none'); }, addItem: function(href, label, callback, denied) { if (typeof denied == "undefined") denied = false; $('#menu ul').append('<li><a href="' + href + '"' + (denied ? ' class="denied"' : "") + '><span>' + label + '</span></a></li>'); if (!denied && $.isFunction(callback)) $('#menu a[href="' + href + '"]').click(function() { _.menu.hide(); return callback(); }); }, addDivider: function() { if ($('#menu ul').html().length) $('#menu ul').append("<li>-</li>"); }, show: function(e) { var dlg = $('#menu'), ul = $('#menu ul'); if (ul.html().length) { dlg.find('ul').first().menu(); if (typeof e != "undefined") { var left = e.pageX, top = e.pageY, win = $(window); if ((dlg.outerWidth() + left) > win.width()) left = win.width() - dlg.outerWidth(); if ((dlg.outerHeight() + top) > win.height()) top = win.height() - dlg.outerHeight(); dlg.hide().css({ left: left, top: top, width: "" }).fadeIn('fast'); } else dlg.fadeIn('fast'); } else ul.detach(); }, hide: function() { $('#clipboard').removeClass('selected'); $('div.folder > a > span.folder').removeClass('context'); $('#menu').hide().css('width', "").html("").data('title', null).unbind().click(function() { return false; }); $(document).unbind('keydown').keydown(function(e) { return !_.selectAll(e); }); } }; // FILE CONTEXT MENU _.menuFile = function(file, e) { _.menu.init(); var data = file.data(), files = $('.file.selected').get(); // MULTIPLE FILES MENU if (file.hasClass('selected') && files.length && (files.length > 1)) { var thumb = false, notWritable = 0, cdata; $.each(files, function(i, cfile) { cdata = $(cfile).data(); if (cdata.thumb) thumb = true; if (!data.writable) notWritable++; }); if (_.opener.callBackMultiple) { // SELECT FILES _.menu.addItem("kcact:pick", _.label("Select"), function() { _.returnFiles(files); return false; }); // SELECT THUMBNAILS if (thumb) _.menu.addItem("kcact:pick_thumb", _.label("Select Thumbnails"), function() { _.returnThumbnails(files); return false; }); } if (data.thumb || data.smallThumb || _.support.zip) { _.menu.addDivider(); // VIEW IMAGE if (data.thumb || data.smallThumb) _.menu.addItem("kcact:view", _.label("View"), function() { _.viewImage(data); }); // DOWNLOAD if (_.support.zip) _.menu.addItem("kcact:download", _.label("Download"), function() { var pfiles = []; $.each(files, function(i, cfile) { pfiles[i] = $(cfile).data('name'); }); _.post(_.getURL('downloadSelected'), {dir:_.dir, files:pfiles}); return false; }); } // ADD TO CLIPBOARD if (_.access.files.copy || _.access.files.move) { _.menu.addDivider(); _.menu.addItem("kcact:clpbrdadd", _.label("Add to Clipboard"), function() { var msg = ''; $.each(files, function(i, cfile) { var cdata = $(cfile).data(), failed = false; for (i = 0; i < _.clipboard.length; i++) if ((_.clipboard[i].name == cdata.name) && (_.clipboard[i].dir == _.dir) ) { failed = true; msg += cdata.name + ": " + _.label("This file is already added to the Clipboard.") + "\n"; break; } if (!failed) { cdata.dir = _.dir; _.clipboard[_.clipboard.length] = cdata; } }); _.initClipboard(); if (msg.length) _.alert(msg.substr(0, msg.length - 1)); return false; }); } // DELETE if (_.access.files['delete']) { _.menu.addDivider(); _.menu.addItem("kcact:rm", _.label("Delete"), function() { if ($(this).hasClass('denied')) return false; var failed = 0, dfiles = []; $.each(files, function(i, cfile) { var cdata = $(cfile).data(); if (!cdata.writable) failed++; else dfiles[dfiles.length] = _.dir + "/" + cdata.name; }); if (failed == files.length) { _.alert(_.label("The selected files are not removable.")); return false; } var go = function(callBack) { _.fadeFiles(); $.ajax({ type: "post", dataType: "json", url: _.getURL("rm_cbd"), data: {files:dfiles}, async: false, success: function(data) { if (callBack) callBack(); _.check4errors(data); _.refresh(); }, error: function() { if (callBack) callBack(); $('#files > div').css({ opacity: "", filter: "" }); _.alert(_.label("Unknown error.")); } }); }; if (failed) _.confirm( _.label("{count} selected files are not removable. Do you want to delete the rest?", {count:failed}), go ); else _.confirm( _.label("Are you sure you want to delete all selected files?"), go ); return false; }, (notWritable == files.length)); } _.menu.show(e); // SINGLE FILE MENU } else { $('.file').removeClass('selected'); file.addClass('selected'); $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); if (_.opener.callBack || _.opener.callBackMultiple) { // SELECT FILE _.menu.addItem("kcact:pick", _.label("Select"), function() { _.returnFile(file); return false; }); // SELECT THUMBNAIL if (data.thumb) _.menu.addItem("kcact:pick_thumb", _.label("Select Thumbnail"), function() { _.returnFile(_.thumbsURL + "/" + _.dir + "/" + data.name); return false; }); _.menu.addDivider(); } // VIEW IMAGE if (data.thumb || data.smallThumb) _.menu.addItem("kcact:view", _.label("View"), function() { _.viewImage(data); }); // DOWNLOAD _.menu.addItem("kcact:download", _.label("Download"), function() { $('#menu').html('<form id="downloadForm" method="post" action="' + _.getURL('download') + '"><input type="hidden" name="dir" /><input type="hidden" name="file" /></form>'); $('#downloadForm input').get(0).value = _.dir; $('#downloadForm input').get(1).value = data.name; $('#downloadForm').submit(); return false; }); // ADD TO CLIPBOARD if (_.access.files.copy || _.access.files.move) { _.menu.addDivider(); _.menu.addItem("kcact:clpbrdadd", _.label("Add to Clipboard"), function() { for (i = 0; i < _.clipboard.length; i++) if ((_.clipboard[i].name == data.name) && (_.clipboard[i].dir == _.dir) ) { _.alert(_.label("This file is already added to the Clipboard.")); return false; } var cdata = data; cdata.dir = _.dir; _.clipboard[_.clipboard.length] = cdata; _.initClipboard(); return false; }); } if (_.access.files.rename || _.access.files['delete']) _.menu.addDivider(); // RENAME if (_.access.files.rename) _.menu.addItem("kcact:mv", _.label("Rename..."), function() { if (!data.writable) return false; _.fileNameDialog( {dir: _.dir, file: data.name}, 'newName', data.name, _.getURL("rename"), { title: "New file name:", errEmpty: "Please enter new file name.", errSlash: "Unallowable characters in file name.", errDot: "File name shouldn't begins with '.'" }, _.refresh ); return false; }, !data.writable); // DELETE if (_.access.files['delete']) _.menu.addItem("kcact:rm", _.label("Delete"), function() { if (!data.writable) return false; _.confirm(_.label("Are you sure you want to delete this file?"), function(callBack) { $.ajax({ type: "post", dataType: "json", url: _.getURL("delete"), data: {dir: _.dir, file: data.name}, async: false, success: function(data) { if (callBack) callBack(); _.clearClipboard(); if (_.check4errors(data)) return; _.refresh(); }, error: function() { if (callBack) callBack(); _.alert(_.label("Unknown error.")); } }); } ); return false; }, !data.writable); _.menu.show(e); } }; // FOLDER CONTEXT MENU _.menuDir = function(dir, e) { _.menu.init(); var data = dir.data(), html = '<ul>'; if (_.clipboard && _.clipboard.length) { // COPY CLIPBOARD if (_.access.files.copy) _.menu.addItem("kcact:cpcbd", _.label("Copy {count} files", {count: _.clipboard.length}), function() { _.copyClipboard(data.path); return false; }, !data.writable); // MOVE CLIPBOARD if (_.access.files.move) _.menu.addItem("kcact:mvcbd", _.label("Move {count} files", {count: _.clipboard.length}), function() { _.moveClipboard(data.path); return false; }, !data.writable); if (_.access.files.copy || _.access.files.move) _.menu.addDivider(); } // REFRESH _.menu.addItem("kcact:refresh", _.label("Refresh"), function() { _.refreshDir(dir); return false; }); // DOWNLOAD if (_.support.zip) { _.menu.addDivider(); _.menu.addItem("kcact:download", _.label("Download"), function() { _.post(_.getURL("downloadDir"), {dir:data.path}); return false; }); } if (_.access.dirs.create || _.access.dirs.rename || _.access.dirs['delete']) _.menu.addDivider(); // NEW SUBFOLDER if (_.access.dirs.create) _.menu.addItem("kcact:mkdir", _.label("New Subfolder..."), function(e) { if (!data.writable) return false; _.fileNameDialog( {dir: data.path}, "newDir", "", _.getURL("newDir"), { title: "New folder name:", errEmpty: "Please enter new folder name.", errSlash: "Unallowable characters in folder name.", errDot: "Folder name shouldn't begins with '.'" }, function() { _.refreshDir(dir); _.initDropUpload(); if (!data.hasDirs) { dir.data('hasDirs', true); dir.children('span.brace').addClass('closed'); } } ); return false; }, !data.writable); // RENAME if (_.access.dirs.rename) _.menu.addItem("kcact:mvdir", _.label("Rename..."), function(e) { if (!data.removable) return false; _.fileNameDialog( {dir: data.path}, "newName", data.name, _.getURL("renameDir"), { title: "New folder name:", errEmpty: "Please enter new folder name.", errSlash: "Unallowable characters in folder name.", errDot: "Folder name shouldn't begins with '.'" }, function(dt) { if (!dt.name) { _.alert(_.label("Unknown error.")); return; } var currentDir = (data.path == _.dir); dir.children('span.folder').html($.$.htmlData(dt.name)); dir.data('name', dt.name); dir.data('path', $.$.dirname(data.path) + '/' + dt.name); if (currentDir) _.dir = dir.data('path'); _.initDropUpload(); }, true ); return false; }, !data.removable); // DELETE if (_.access.dirs['delete']) _.menu.addItem("kcact:rmdir", _.label("Delete"), function() { if (!data.removable) return false; _.confirm( _.label("Are you sure you want to delete this folder and all its content?"), function(callBack) { $.ajax({ type: "post", dataType: "json", url: _.getURL("deleteDir"), data: {dir: data.path}, async: false, success: function(data) { if (callBack) callBack(); if (_.check4errors(data)) return; dir.parent().hide(500, function() { var folders = dir.parent().parent(); var pDir = folders.parent().children('a').first(); dir.parent().detach(); if (!folders.children('div.folder').get(0)) { pDir.children('span.brace').first().removeClass('opened closed'); pDir.parent().children('.folders').detach(); pDir.data('hasDirs', false); } if (pDir.data('path') == _.dir.substr(0, pDir.data('path').length)) _.changeDir(pDir); _.initDropUpload(); }); }, error: function() { if (callBack) callBack(); _.alert(_.label("Unknown error.")); } }); } ); return false; }, !data.removable); _.menu.show(e); $('div.folder > a > span.folder').removeClass('context'); if (dir.children('span.folder').hasClass('regular')) dir.children('span.folder').addClass('context'); }; // CLIPBOARD MENU _.openClipboard = function() { if (!_.clipboard || !_.clipboard.length) return; // CLOSE MENU if ($('#menu a[href="kcact:clrcbd"]').html()) { $('#clipboard').removeClass('selected'); _.menu.hide(); return; } setTimeout(function() { _.menu.init(); var dlg = $('#menu'), jStatus = $('#status'), html = '<li class="list"><div>'; // CLIPBOARD FILES $.each(_.clipboard, function(i, val) { var icon = $.$.getFileExtension(val.name); if (val.thumb) icon = ".image"; else if (!val.smallIcon || !icon.length) icon = "."; icon = "themes/" + _.theme + "/img/files/small/" + icon + ".png"; html += '<a title="' + _.label("Click to remove from the Clipboard") + '" onclick="_.removeFromClipboard(' + i + ')"' + ((i == 0) ? ' class="first"' : "") + '><span style="background-image:url(' + $.$.escapeDirs(icon) + ')">' + $.$.htmlData($.$.basename(val.name)) + '</span></a>'; }); html += '</div></li><li class="div-files">-</li>'; $('#menu ul').append(html); // DOWNLOAD if (_.support.zip) _.menu.addItem("kcact:download", _.label("Download files"), function() { _.downloadClipboard(); return false; }); if (_.access.files.copy || _.access.files.move || _.access.files['delete']) _.menu.addDivider(); // COPY if (_.access.files.copy) _.menu.addItem("kcact:cpcbd", _.label("Copy files here"), function() { if (!_.dirWritable) return false; _.copyClipboard(_.dir); return false; }, !_.dirWritable); // MOVE if (_.access.files.move) _.menu.addItem("kcact:mvcbd", _.label("Move files here"), function() { if (!_.dirWritable) return false; _.moveClipboard(_.dir); return false; }, !_.dirWritable); // DELETE if (_.access.files['delete']) _.menu.addItem("kcact:rmcbd", _.label("Delete files"), function() { _.confirm( _.label("Are you sure you want to delete all files in the Clipboard?"), function(callBack) { if (callBack) callBack(); _.deleteClipboard(); } ); return false; }); _.menu.addDivider(); // CLEAR CLIPBOARD _.menu.addItem("kcact:clrcbd", _.label("Clear the Clipboard"), function() { _.clearClipboard(); return false; }); $('#clipboard').addClass('selected'); _.menu.show(); var left = $(window).width() - dlg.css({width: ""}).outerWidth(), top = $(window).height() - dlg.outerHeight() - jStatus.outerHeight(), lheight = top + dlg.outerTopSpace(); dlg.find('.list').css({ 'max-height': lheight, 'overflow-y': "auto", 'overflow-x': "hidden", width: "" }); top = $(window).height() - dlg.outerHeight(true) - jStatus.outerHeight(true); dlg.css({ left: left - 5, top: top }).fadeIn("fast"); var a = dlg.find('.list').outerHeight(), b = dlg.find('.list div').outerHeight(); if (b - a > 10) { dlg.css({ left: parseInt(dlg.css('left')) - _.scrollbarWidth, }).width(dlg.width() + _.scrollbarWidth); } }, 1); };/** This file is part of KCFinder project * * @desc Image viewer * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.viewImage = function(data) { var ts = new Date().getTime(), dlg = false, images = [], showImage = function(data) { _.lock = true; $('#loading').html(_.label("Loading image...")).show(); var url = $.$.escapeDirs(_.uploadURL + "/" + _.dir + "/" + data.name) + "?ts=" + ts, img = new Image(), i = $(img), w = $(window), d = $(document); onImgLoad = function() { _.lock = false; $('#files .file').each(function() { if ($(this).data('name') == data.name) { _.ssImage = this; return false; } }); i.hide().appendTo('body'); var o_w = i.width(), o_h = i.height(), i_w = o_w, i_h = o_h, goTo = function(i) { if (!_.lock) { var nimg = images[i]; _.currImg = i; showImage(nimg); } }, nextFunc = function() { goTo((_.currImg >= images.length - 1) ? 0 : (_.currImg + 1)); }, prevFunc = function() { goTo((_.currImg ? _.currImg : images.length) - 1); }, t = $('<div></div>'); i.detach().appendTo(t); t.addClass("img"); if (!dlg) { var ww = w.width() - 60, closeFunc = function() { d.unbind('keydown').keydown(function(e) { return !_.selectAll(e); }); dlg.dialog('destroy').detach(); }; if ((ww % 2)) ww++; dlg = _.dialog($.$.htmlData(data.name), t.get(0), { width: ww, height: w.height() - 36, position: [30, 30], draggable: false, nopadding: true, close: closeFunc, show: false, hide: false, buttons: [ { text: _.label("Previous"), icons: {primary: "ui-icon-triangle-1-w"}, click: prevFunc }, { text: _.label("Next"), icons: {secondary: "ui-icon-triangle-1-e"}, click: nextFunc }, { text: _.label("Select"), icons: {primary: "ui-icon-check"}, click: function(e) { d.unbind('keydown').keydown(function(e) { return !_.selectAll(e); }); if (_.ssImage) { _.selectFile($(_.ssImage), e); } dlg.dialog('destroy').detach(); } }, { text: _.label("Close"), icons: {primary: "ui-icon-closethick"}, click: closeFunc } ] }); dlg.addClass('kcfImageViewer').css('overflow', "hidden").parent().find('.ui-dialog-buttonpane button').get(2).focus(); } else { dlg.prev().find('.ui-dialog-title').html($.$.htmlData(data.name)); dlg.html(t.get(0)); } dlg.unbind('click').click(nextFunc).disableTextSelect(); var d_w = dlg.innerWidth(), d_h = dlg.innerHeight(); if ((o_w > d_w) || (o_h > d_h)) { i_w = d_w; i_h = d_h; if ((d_w / d_h) > (o_w / o_h)) i_w = parseInt((o_w * d_h) / o_h); else if ((d_w / d_h) < (o_w / o_h)) i_h = parseInt((o_h * d_w) / o_w); } i.css({ width: i_w, height: i_h }).show().parent().css({ display: "block", margin: "0 auto", width: i_w, height: i_h, marginTop: parseInt((d_h - i_h) / 2) }); $('#loading').hide(); d.unbind('keydown').keydown(function(e) { if (!_.lock) { var kc = e.keyCode; if ((kc == 37)) prevFunc(); if ((kc == 39)) nextFunc(); } }); }; img.src = url; if (img.complete) onImgLoad(); else { img.onload = onImgLoad; img.onerror = function() { _.lock = false; $('#loading').hide(); _.alert(_.label("Unknown error.")); d.unbind('keydown').keydown(function(e) { return !_.selectAll(e); }); _.refresh(); }; } }; $.each(_.files, function(i, file) { var i = images.length; if (file.thumb || file.smallThumb) images[i] = file; if (file.name == data.name) _.currImg = i; }); showImage(data); return false; }; /** This file is part of KCFinder project * * @desc Clipboard functionality * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.initClipboard = function() { if (!_.clipboard || !_.clipboard.length) return; var size = 0, jClipboard = $('#clipboard'); $.each(_.clipboard, function(i, val) { size += val.size; }); size = _.humanSize(size); jClipboard.disableTextSelect().html('<div title="' + _.label("Clipboard") + ' (' + _.clipboard.length + ' ' + _.label("files") + ', ' + size + ')" onclick="_.openClipboard()"></div>'); var resize = function() { jClipboard.css({ left: $(window).width() - jClipboard.outerWidth(), top: $(window).height() - jClipboard.outerHeight() }); }; resize(); jClipboard.show(); $(window).unbind().resize(function() { _.resize(); resize(); }); }; _.removeFromClipboard = function(i) { if (!_.clipboard || !_.clipboard[i]) return false; if (_.clipboard.length == 1) { _.clearClipboard(); _.menu.hide(); return; } if (i < _.clipboard.length - 1) { var last = _.clipboard.slice(i + 1); _.clipboard = _.clipboard.slice(0, i); _.clipboard = _.clipboard.concat(last); } else _.clipboard.pop(); _.initClipboard(); _.menu.hide(); _.openClipboard(); return true; }; _.copyClipboard = function(dir) { if (!_.clipboard || !_.clipboard.length) return; var files = [], failed = 0; for (i = 0; i < _.clipboard.length; i++) if (_.clipboard[i].readable) files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; else failed++; if (_.clipboard.length == failed) { _.alert(_.label("The files in the Clipboard are not readable.")); return; } var go = function(callBack) { if (dir == _.dir) _.fadeFiles(); $.ajax({ type: "post", dataType: "json", url: _.getURL("cp_cbd"), data: {dir: dir, files: files}, async: false, success: function(data) { if (callBack) callBack(); _.check4errors(data); _.clearClipboard(); if (dir == _.dir) _.refresh(); }, error: function() { if (callBack) callBack(); $('#files > div').css({ opacity: "", filter: "" }); _.alert(_.label("Unknown error.")); } }); }; if (failed) _.confirm( _.label("{count} files in the Clipboard are not readable. Do you want to copy the rest?", {count:failed}), go ) else go(); }; _.moveClipboard = function(dir) { if (!_.clipboard || !_.clipboard.length) return; var files = [], failed = 0; for (i = 0; i < _.clipboard.length; i++) if (_.clipboard[i].readable && _.clipboard[i].writable) files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; else failed++; if (_.clipboard.length == failed) { _.alert(_.label("The files in the Clipboard are not movable.")) return; } var go = function(callBack) { _.fadeFiles(); $.ajax({ type: "post", dataType: "json", url: _.getURL("mv_cbd"), data: {dir: dir, files: files}, async: false, success: function(data) { if (callBack) callBack(); _.check4errors(data); _.clearClipboard(); _.refresh(); }, error: function() { if (callBack) callBack(); $('#files > div').css({ opacity: "", filter: "" }); _.alert(_.label("Unknown error.")); } }); }; if (failed) _.confirm( _.label("{count} files in the Clipboard are not movable. Do you want to move the rest?", {count: failed}), go ); else go(); }; _.deleteClipboard = function() { if (!_.clipboard || !_.clipboard.length) return; var files = [], failed = 0; for (i = 0; i < _.clipboard.length; i++) if (_.clipboard[i].readable && _.clipboard[i].writable) files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; else failed++; if (_.clipboard.length == failed) { _.alert(_.label("The files in the Clipboard are not removable.")) return; } var go = function(callBack) { _.fadeFiles(); $.ajax({ type: "post", dataType: "json", url: _.getURL("rm_cbd"), data: {files:files}, async: false, success: function(data) { if (callBack) callBack(); _.check4errors(data); _.clearClipboard(); _.refresh(); }, error: function() { if (callBack) callBack(); $('#files > div').css({ opacity: "", filter: "" }); _.alert(_.label("Unknown error.")); } }); }; if (failed) _.confirm( _.label("{count} files in the Clipboard are not removable. Do you want to delete the rest?", {count: failed}), go ); else go(); }; _.downloadClipboard = function() { if (!_.clipboard || !_.clipboard.length) return; var files = []; for (i = 0; i < _.clipboard.length; i++) if (_.clipboard[i].readable) files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; if (files.length) _.post(_.getURL('downloadClipboard'), {files:files}); }; _.clearClipboard = function() { $('#clipboard').html(""); _.clipboard = []; }; /** This file is part of KCFinder project * * @desc Upload files using drag and drop * @package KCFinder * @version 3.12 * @author Forum user (updated by Pavel Tzonkov) * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.initDropUpload = function() { if ((typeof XMLHttpRequest == "undefined") || (typeof document.addEventListener == "undefined") || (typeof File == "undefined") || (typeof FileReader == "undefined") ) return; if (!XMLHttpRequest.prototype.sendAsBinary) { XMLHttpRequest.prototype.sendAsBinary = function(datastr) { var ords = Array.prototype.map.call(datastr, function(x) { return x.charCodeAt(0) & 0xff; }), ui8a = new Uint8Array(ords); this.send(ui8a.buffer); } } var uploadQueue = [], uploadInProgress = false, filesCount = 0, errors = [], files = $('#files'), folders = $('div.folder > a'), boundary = "------multipartdropuploadboundary" + (new Date).getTime(), currentFile, filesDragOver = function(e) { if (e.preventDefault) e.preventDefault(); $('#files').addClass('drag'); return false; }, filesDragEnter = function(e) { if (e.preventDefault) e.preventDefault(); return false; }, filesDragLeave = function(e) { if (e.preventDefault) e.preventDefault(); $('#files').removeClass('drag'); return false; }, filesDrop = function(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); $('#files').removeClass('drag'); if (!$('#folders span.current').first().parent().data('writable')) { _.alert("Cannot write to upload folder."); return false; } filesCount += e.dataTransfer.files.length; for (var i = 0; i < e.dataTransfer.files.length; i++) { var file = e.dataTransfer.files[i]; file.thisTargetDir = _.dir; uploadQueue.push(file); } processUploadQueue(); return false; }, folderDrag = function(e) { if (e.preventDefault) e.preventDefault(); return false; }, folderDrop = function(e, dir) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); if (!$(dir).data('writable')) { _.alert(_.label("Cannot write to upload folder.")); return false; } filesCount += e.dataTransfer.files.length; for (var i = 0; i < e.dataTransfer.files.length; i++) { var file = e.dataTransfer.files[i]; file.thisTargetDir = $(dir).data('path'); uploadQueue.push(file); } processUploadQueue(); return false; }; files.get(0).removeEventListener('dragover', filesDragOver, false); files.get(0).removeEventListener('dragenter', filesDragEnter, false); files.get(0).removeEventListener('dragleave', filesDragLeave, false); files.get(0).removeEventListener('drop', filesDrop, false); files.get(0).addEventListener('dragover', filesDragOver, false); files.get(0).addEventListener('dragenter', filesDragEnter, false); files.get(0).addEventListener('dragleave', filesDragLeave, false); files.get(0).addEventListener('drop', filesDrop, false); folders.each(function() { var folder = this, dragOver = function(e) { $(folder).children('span.folder').addClass('context'); return folderDrag(e); }, dragLeave = function(e) { $(folder).children('span.folder').removeClass('context'); return folderDrag(e); }, drop = function(e) { $(folder).children('span.folder').removeClass('context'); return folderDrop(e, folder); }; this.removeEventListener('dragover', dragOver, false); this.removeEventListener('dragenter', folderDrag, false); this.removeEventListener('dragleave', dragLeave, false); this.removeEventListener('drop', drop, false); this.addEventListener('dragover', dragOver, false); this.addEventListener('dragenter', folderDrag, false); this.addEventListener('dragleave', dragLeave, false); this.addEventListener('drop', drop, false); }); function updateProgress(evt) { var progress = evt.lengthComputable ? Math.round((evt.loaded * 100) / evt.total) + '%' : Math.round(evt.loaded / 1024) + " KB"; $('#loading').html(_.label("Uploading file {number} of {count}... {progress}", { number: filesCount - uploadQueue.length, count: filesCount, progress: progress })); } function processUploadQueue() { if (uploadInProgress) return false; if (uploadQueue && uploadQueue.length) { var file = uploadQueue.shift(); currentFile = file; $('#loading').html(_.label("Uploading file {number} of {count}... {progress}", { number: filesCount - uploadQueue.length, count: filesCount, progress: "" })).show(); var reader = new FileReader(); reader.thisFileName = file.name; reader.thisFileType = file.type; reader.thisFileSize = file.size; reader.thisTargetDir = file.thisTargetDir; reader.onload = function(evt) { uploadInProgress = true; var postbody = '--' + boundary + '\r\nContent-Disposition: form-data; name="upload[]"'; if (evt.target.thisFileName) postbody += '; filename="' + $.$.utf8encode(evt.target.thisFileName) + '"'; postbody += '\r\n'; if (evt.target.thisFileSize) postbody += "Content-Length: " + evt.target.thisFileSize + "\r\n"; postbody += "Content-Type: " + evt.target.thisFileType + "\r\n\r\n" + evt.target.result + "\r\n--" + boundary + '\r\nContent-Disposition: form-data; name="dir"\r\n\r\n' + $.$.utf8encode(evt.target.thisTargetDir) + "\r\n--" + boundary + "\r\n--" + boundary + "--\r\n"; var xhr = new XMLHttpRequest(); xhr.thisFileName = evt.target.thisFileName; if (xhr.upload) { xhr.upload.thisFileName = evt.target.thisFileName; xhr.upload.addEventListener("progress", updateProgress, false); } xhr.open('post', _.getURL('upload'), true); xhr.setRequestHeader('Content-Type', "multipart/form-data; boundary=" + boundary); //xhr.setRequestHeader('Content-Length', postbody.length); xhr.onload = function(e) { $('#loading').hide(); if (_.dir == reader.thisTargetDir) _.fadeFiles(); uploadInProgress = false; processUploadQueue(); if (xhr.responseText.substr(0, 1) != "/") errors[errors.length] = xhr.responseText; }; xhr.sendAsBinary(postbody); }; reader.onerror = function(evt) { $('#loading').hide(); uploadInProgress = false; processUploadQueue(); errors[errors.length] = _.label("Failed to upload {filename}!", { filename: evt.target.thisFileName }); }; reader.readAsBinaryString(file); } else { filesCount = 0; var loop = setInterval(function() { if (uploadInProgress) return; boundary = "------multipartdropuploadboundary" + (new Date).getTime(); uploadQueue = []; clearInterval(loop); if (currentFile.thisTargetDir == _.dir) _.refresh(); if (errors.length) { errors = errors.join("\n"); if (errors.replace(/^\s+/g, "").replace(/\s+$/g, "").length) _.alert(errors); errors = []; } }, 333); } } }; /** This file is part of KCFinder project * * @desc Miscellaneous functionality * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.orderFiles = function(callBack, selected) { var order = $.$.kuki.get('order'), desc = ($.$.kuki.get('orderDesc') == "on"), a1, b1, arr; if (!_.files || !_.files.sort) _.files = []; _.files = _.files.sort(function(a, b) { if (!order) order = "name"; if (order == "date") { a1 = a.mtime; b1 = b.mtime; } else if (order == "type") { a1 = $.$.getFileExtension(a.name); b1 = $.$.getFileExtension(b.name); } else if (order == "size") { a1 = a.size; b1 = b.size; } else { a1 = a[order].toLowerCase(); b1 = b[order].toLowerCase(); } if ((order == "size") || (order == "date")) { if (a1 < b1) return desc ? 1 : -1; if (a1 > b1) return desc ? -1 : 1; } if (a1 == b1) { a1 = a.name.toLowerCase(); b1 = b.name.toLowerCase(); arr = [a1, b1]; arr = arr.sort(); return (arr[0] == a1) ? -1 : 1; } arr = [a1, b1]; arr = arr.sort(); if (arr[0] == a1) return desc ? 1 : -1; return desc ? -1 : 1; }); _.showFiles(callBack, selected); _.initFiles(); }; _.humanSize = function(size) { if (size < 1024) { size = size.toString() + " B"; } else if (size < 1048576) { size /= 1024; size = parseInt(size).toString() + " KB"; } else if (size < 1073741824) { size /= 1048576; size = parseInt(size).toString() + " MB"; } else if (size < 1099511627776) { size /= 1073741824; size = parseInt(size).toString() + " GB"; } else { size /= 1099511627776; size = parseInt(size).toString() + " TB"; } return size; }; _.getURL = function(act) { var url = "browse.php?type=" + encodeURIComponent(_.type) + "&lng=" + encodeURIComponent(_.lang); if (_.opener.name) url += "&opener=" + encodeURIComponent(_.opener.name); if (act) url += "&act=" + encodeURIComponent(act); if (_.cms) url += "&cms=" + encodeURIComponent(_.cms); return url; }; _.label = function(index, data) { var label = _.labels[index] ? _.labels[index] : index; if (data) $.each(data, function(key, val) { label = label.replace("{" + key + "}", val); }); return label; }; _.check4errors = function(data) { if (!data.error) return false; var msg = data.error.join ? data.error.join("\n") : data.error; _.alert(msg); return true; }; _.post = function(url, data) { var html = '<form id="postForm" method="post" action="' + url + '">'; $.each(data, function(key, val) { if ($.isArray(val)) $.each(val, function(i, aval) { html += '<input type="hidden" name="' + $.$.htmlValue(key) + '[]" value="' + $.$.htmlValue(aval) + '" />'; }); else html += '<input type="hidden" name="' + $.$.htmlValue(key) + '" value="' + $.$.htmlValue(val) + '" />'; }); html += '</form>'; $('#menu').html(html).show(); $('#postForm').get(0).submit(); }; _.fadeFiles = function() { $('#files > div').css({ opacity: "0.4", filter: "alpha(opacity=40)" }); };
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js
IgorKilipenko/KTS_React
import React from 'react'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; React.render(<HelloWorld />, document.getElementById('react-root'));
src/routes/notFound/index.js
jimmykobe1171/chatbotta
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import Layout from '../../components/Layout'; import NotFound from './NotFound'; const title = 'Page Not Found'; export default { path: '*', action() { return { title, component: <Layout><NotFound title={title} /></Layout>, status: 404, }; }, };
src/components/Slider/Toolbar.js
gabrielmf/SIR-EDU-2.0
import React from 'react'; import IconMenu from 'material-ui/IconMenu'; import IconButton from 'material-ui/IconButton'; import FontIcon from 'material-ui/FontIcon'; import NavigationExpandMoreIcon from 'material-ui/svg-icons/navigation/expand-more'; import MenuItem from 'material-ui/MenuItem'; import DropDownMenu from 'material-ui/DropDownMenu'; import RaisedButton from 'material-ui/RaisedButton'; import {Toolbar, ToolbarGroup, ToolbarSeparator, ToolbarTitle} from 'material-ui/Toolbar'; export default class ToolbarActions extends React.Component { constructor(props) { super(props); this.state = { value: 3, }; } handleChange = (event, index, value) => this.setState({value}); render() { return ( <Toolbar> <ToolbarGroup firstChild={true}> <DropDownMenu value={this.state.value} onChange={this.handleChange}> <MenuItem value={1} primaryText="All Broadcasts" /> <MenuItem value={2} primaryText="All Voice" /> <MenuItem value={3} primaryText="All Text" /> <MenuItem value={4} primaryText="Complete Voice" /> <MenuItem value={5} primaryText="Complete Text" /> <MenuItem value={6} primaryText="Active Voice" /> <MenuItem value={7} primaryText="Active Text" /> </DropDownMenu> </ToolbarGroup> <ToolbarGroup> <ToolbarTitle text="Options" /> <FontIcon className="muidocs-icon-custom-sort" /> <ToolbarSeparator /> <RaisedButton label="Create Broadcast" primary={true} /> <IconMenu iconButtonElement={ <IconButton touch={true}> <NavigationExpandMoreIcon /> </IconButton> } > <MenuItem primaryText="Download" /> <MenuItem primaryText="More Info" /> </IconMenu> </ToolbarGroup> </Toolbar> ); } }
docs/src/examples/modules/Modal/index.js
Semantic-Org/Semantic-UI-React
import React from 'react' import Content from './Content' import Types from './Types' import Variations from './Variations' import Usage from './Usage' const ModalExamples = () => ( <div> <Types /> <Content /> <Variations /> <Usage /> </div> ) export default ModalExamples
app/components/App.js
Cu7ious/Twitch-App
import React from 'react'; import { connect } from 'react-redux'; import { fetchData, searchChannels, filterAll, filterOnline, filterOffline, filterByQuery } from '../actions' import Tabs from '../components/Tabs'; import SearchBar from '../components/SearchBar'; import ChannelsList from '../components/ChannelsList'; const mapStateToProps = (state) => ({ data: state.data, query: state.query, filter: state.filter, byQuery: state.byQuery }) const mapDispatchToProps = (dispatch) => ({ fetchData: () => dispatch(fetchData()), searchChannels: (v) => dispatch(searchChannels(v)), filterAll: () => dispatch(filterAll()), filterOnline: () => dispatch(filterOnline()), filterOffline: () => dispatch(filterOffline()), filterByQuery: (a) => dispatch(filterByQuery(a)) }) class App extends React.Component { componentDidMount() { this.props.fetchData() } render() { let p = this.props let counters = [] if (p.data.data) { counters.push(p.data.data.online.concat(p.data.data.offline).length), counters.push(p.data.data.online.length), counters.push(p.data.data.offline.length) } return( <div> <Tabs current={p.filter} items={['all', 'online', 'offline']} info={counters} acts={[ p.filterAll, p.filterOnline, p.filterOffline ]} /> <SearchBar query={p.query} data={p.data} acts={{ searchChannels: p.searchChannels, filterByQuery: p.filterByQuery }} /> <ChannelsList data={p.data} filter={p.filter} query={p.query} byQuery={p.byQuery} /> </div> ); } } export default connect(mapStateToProps, mapDispatchToProps)(App);
ajax/libs/forerunnerdb/1.3.51/fdb-core+views.min.js
BitsyCode/cdnjs
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){{var d=a("../lib/Core");a("../lib/View")}"undefined"!=typeof window&&(window.ForerunnerDB=d),b.exports=d},{"../lib/Core":5,"../lib/View":26}],2:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){var b;this._primaryKey="_id",this._keyArr=[],this._data=[],this._objLookup={},this._count=0;for(b in a)a.hasOwnProperty(b)&&this._keyArr.push({key:b,dir:a[b]})};d.addModule("ActiveBucket",e),d.synthesize(e.prototype,"primaryKey"),d.mixin(e.prototype,"Mixin.Sorting"),e.prototype.qs=function(a,b,c,d){if(!b.length)return 0;for(var e,f,g,h=-1,i=0,j=b.length-1;j>=i&&(e=Math.floor((i+j)/2),h!==e);)f=b[e],void 0!==f&&(g=d(this,a,c,f),g>0&&(i=e+1),0>g&&(j=e-1)),h=e;return g>0?e+1:e},e.prototype._sortFunc=function(a,b,c,d){var e,f,g,h=c.split(".:."),i=d.split(".:."),j=a._keyArr,k=j.length;for(e=0;k>e;e++)if(f=j[e],g=typeof b[f.key],"number"===g&&(h[e]=Number(h[e]),i[e]=Number(i[e])),h[e]!==i[e]){if(1===f.dir)return a.sortAsc(h[e],i[e]);if(-1===f.dir)return a.sortDesc(h[e],i[e])}},e.prototype.insert=function(a){var b,c;return b=this.documentKey(a),c=this._data.indexOf(b),-1===c?(c=this.qs(a,this._data,b,this._sortFunc),this._data.splice(c,0,b)):this._data.splice(c,0,b),this._objLookup[a[this._primaryKey]]=b,this._count++,c},e.prototype.remove=function(a){var b,c;return b=this._objLookup[a[this._primaryKey]],b?(c=this._data.indexOf(b),c>-1?(this._data.splice(c,1),delete this._objLookup[a[this._primaryKey]],this._count--,!0):!1):!1},e.prototype.index=function(a){var b,c;return b=this.documentKey(a),c=this._data.indexOf(b),-1===c&&(c=this.qs(a,this._data,b,this._sortFunc)),c},e.prototype.documentKey=function(a){var b,c,d="",e=this._keyArr,f=e.length;for(b=0;f>b;b++)c=e[b],d&&(d+=".:."),d+=a[c.key];return d+=".:."+a[this._primaryKey]},e.prototype.count=function(){return this._count},d.finishModule("ActiveBucket"),b.exports=e},{"./Shared":25}],3:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m;d=a("./Shared");var n=function(a){this.init.apply(this,arguments)};n.prototype.init=function(a){this._primaryKey="_id",this._primaryIndex=new g("primary"),this._primaryCrc=new g("primaryCrc"),this._crcLookup=new g("crcLookup"),this._name=a,this._data=[],this._metrics=new f,this._deferQueue={insert:[],update:[],remove:[],upsert:[]},this._deferThreshold={insert:100,update:100,remove:100,upsert:100},this._deferTime={insert:1,update:1,remove:1,upsert:1},this._subsetOf(this)},d.addModule("Collection",n),d.mixin(n.prototype,"Mixin.Common"),d.mixin(n.prototype,"Mixin.Events"),d.mixin(n.prototype,"Mixin.ChainReactor"),d.mixin(n.prototype,"Mixin.CRUD"),d.mixin(n.prototype,"Mixin.Constants"),d.mixin(n.prototype,"Mixin.Triggers"),d.mixin(n.prototype,"Mixin.Sorting"),d.mixin(n.prototype,"Mixin.Matching"),d.mixin(n.prototype,"Mixin.Updating"),f=a("./Metrics"),g=a("./KeyValueStore"),h=a("./Path"),i=a("./IndexHashMap"),j=a("./IndexBinaryTree"),k=a("./Crc"),e=d.modules.Db,l=a("./Overload"),m=a("./ReactorIO"),n.prototype.crc=k,d.synthesize(n.prototype,"state"),d.synthesize(n.prototype,"name"),n.prototype.data=function(){return this._data},n.prototype.drop=function(a){var b;if("dropped"===this._state)return a&&a(!1,!0),!0;if(this._db&&this._db._collection&&this._name){if(this.debug()&&console.log("Dropping collection "+this._name),this._state="dropped",this.emit("drop",this),delete this._db._collection[this._name],this._collate)for(b in this._collate)this._collate.hasOwnProperty(b)&&this.collateRemove(b);return delete this._primaryKey,delete this._primaryIndex,delete this._primaryCrc,delete this._crcLookup,delete this._name,delete this._data,delete this._metrics,a&&a(!1,!0),!0}return a&&a(!1,!0),!1},n.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey!==a&&(this._primaryKey=a,this._primaryIndex.primaryKey(a),this.rebuildPrimaryKeyIndex()),this):this._primaryKey},n.prototype._onInsert=function(a,b){this.emit("insert",a,b)},n.prototype._onUpdate=function(a){this.emit("update",a)},n.prototype._onRemove=function(a){this.emit("remove",a)},d.synthesize(n.prototype,"db",function(a){return a&&"_id"===this.primaryKey()&&this.primaryKey(a.primaryKey()),this.$super.apply(this,arguments)}),n.prototype.setData=function(a,b,c){if("dropped"===this._state)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot operate in a dropped state!';if(a){var d=this._metrics.create("setData");d.start(),b=this.options(b),this.preSetData(a,b,c),b.$decouple&&(a=this.decouple(a)),a instanceof Array||(a=[a]),d.time("transformIn"),a=this.transformIn(a),d.time("transformIn");var e=[].concat(this._data);this._dataReplace(a),d.time("Rebuild Primary Key Index"),this.rebuildPrimaryKeyIndex(b),d.time("Rebuild Primary Key Index"),d.time("Rebuild All Other Indexes"),this._rebuildIndexes(),d.time("Rebuild All Other Indexes"),d.time("Resolve chains"),this.chainSend("setData",a,{oldData:e}),d.time("Resolve chains"),d.stop(),this.emit("setData",this._data,e)}return c&&c(!1),this},n.prototype.rebuildPrimaryKeyIndex=function(a){a=a||{$ensureKeys:void 0,$violationCheck:void 0};var b,c,d,e,f=a&&void 0!==a.$ensureKeys?a.$ensureKeys:!0,g=a&&void 0!==a.$violationCheck?a.$violationCheck:!0,h=this._primaryIndex,i=this._primaryCrc,j=this._crcLookup,k=this._primaryKey;for(h.truncate(),i.truncate(),j.truncate(),b=this._data,c=b.length;c--;){if(d=b[c],f&&this.ensurePrimaryKey(d),g){if(!h.uniqueSet(d[k],d))throw'ForerunnerDB.Collection "'+this.name()+'": Call to setData on collection failed because your data violates the primary key unique constraint. One or more documents are using the same primary key: '+d[this._primaryKey]}else h.set(d[k],d);e=JSON.stringify(d),i.set(d[k],e),j.set(e,d)}},n.prototype.ensurePrimaryKey=function(a){void 0===a[this._primaryKey]&&(a[this._primaryKey]=this.objectId())},n.prototype.truncate=function(){if("dropped"===this._state)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot operate in a dropped state!';return this.emit("truncate",this._data),this._data.length=0,this._primaryIndex=new g("primary"),this._primaryCrc=new g("primaryCrc"),this._crcLookup=new g("crcLookup"),this.deferEmit("change",{type:"truncate"}),this},n.prototype.upsert=function(a,b){if("dropped"===this._state)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot operate in a dropped state!';if(a){var c,d,e=this._deferQueue.upsert,f=this._deferThreshold.upsert,g={};if(a instanceof Array){if(a.length>f)return this._deferQueue.upsert=e.concat(a),this.processQueue("upsert",b),{};for(g=[],d=0;d<a.length;d++)g.push(this.upsert(a[d]));return b&&b(),g}switch(a[this._primaryKey]?(c={},c[this._primaryKey]=a[this._primaryKey],this._primaryIndex.lookup(c)[0]?g.op="update":g.op="insert"):g.op="insert",g.op){case"insert":g.result=this.insert(a);break;case"update":g.result=this.update(c,a)}return g}return b&&b(),{}},n.prototype.filter=function(a,b,c){return this.find(a,c).filter(b)},n.prototype.filterUpdate=function(a,b,c){var d,e,f,g,h=this.find(a,c),i=[],j=this.primaryKey();for(g=0;g<h.length;g++)d=h[g],f=b(d),f&&(e={},e[j]=d[j],i.push(this.update(e,f)));return i},n.prototype.update=function(a,b,c){if("dropped"===this._state)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot operate in a dropped state!';b=this.decouple(b),b=this.transformIn(b),this.debug()&&console.log('Updating some collection data for collection "'+this.name()+'"');var d,e,f=this,g=this._metrics.create("update"),h=function(d){var e,h,i=f.decouple(d);return f.willTrigger(f.TYPE_UPDATE,f.PHASE_BEFORE)||f.willTrigger(f.TYPE_UPDATE,f.PHASE_AFTER)?(e={type:"update",query:f.decouple(a),update:f.decouple(b),options:f.decouple(c),op:g},h=f.updateObject(i,e.update,e.query,e.options,""),f.processTrigger(e,f.TYPE_UPDATE,f.PHASE_BEFORE,d,i)!==!1?(h=f.updateObject(d,i,e.query,e.options,""),f.processTrigger(e,f.TYPE_UPDATE,f.PHASE_AFTER,d,i)):h=!1):h=f.updateObject(d,b,a,c,""),h};return g.start(),g.time("Retrieve documents to update"),d=this.find(a,{$decouple:!1}),g.time("Retrieve documents to update"),d.length&&(g.time("Update documents"),e=d.filter(h),g.time("Update documents"),e.length&&(g.time("Resolve chains"),this.chainSend("update",{query:a,update:b,dataSet:d},c),g.time("Resolve chains"),this._onUpdate(e),this.deferEmit("change",{type:"update",data:e}))),g.stop(),e||[]},n.prototype._replaceObj=function(a,b){var c;this._removeFromIndexes(a);for(c in a)a.hasOwnProperty(c)&&delete a[c];for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);if(!this._insertIntoIndexes(a))throw'ForerunnerDB.Collection "'+this.name()+'": Primary key violation in update! Key violated: '+a[this._primaryKey];return!0},n.prototype.updateById=function(a,b){var c={};return c[this._primaryKey]=a,this.update(c,b)},n.prototype.updateObject=function(a,b,c,d,e,f){b=this.decouple(b),e=e||"","."===e.substr(0,1)&&(e=e.substr(1,e.length-1));var g,i,j,k,l,m,n,o,p,q=!1,r=!1;for(p in b)if(b.hasOwnProperty(p)){if(g=!1,"$"===p.substr(0,1))switch(p){case"$key":case"$index":case"$data":g=!0;break;case"$each":for(g=!0,k=b.$each.length,j=0;k>j;j++)r=this.updateObject(a,b.$each[j],c,d,e),r&&(q=!0);q=q||r;break;default:g=!0,r=this.updateObject(a,b[p],c,d,e,p),q=q||r}if(this._isPositionalKey(p)&&(g=!0,p=p.substr(0,p.length-2),m=new h(e+"."+p),a[p]&&a[p]instanceof Array&&a[p].length)){for(i=[],j=0;j<a[p].length;j++)this._match(a[p][j],m.value(c)[0],"",{})&&i.push(j);for(j=0;j<i.length;j++)r=this.updateObject(a[p][i[j]],b[p+".$"],c,d,e+"."+p,f),q=q||r}if(!g)if(f||"object"!=typeof b[p])switch(f){case"$inc":this._updateIncrement(a,p,b[p]),q=!0;break;case"$cast":switch(b[p]){case"array":a[p]instanceof Array||(this._updateProperty(a,p,b.$data||[]),q=!0);break;case"object":(!(a[p]instanceof Object)||a[p]instanceof Array)&&(this._updateProperty(a,p,b.$data||{}),q=!0);break;case"number":"number"!=typeof a[p]&&(this._updateProperty(a,p,Number(a[p])),q=!0);break;case"string":"string"!=typeof a[p]&&(this._updateProperty(a,p,String(a[p])),q=!0);break;default:throw'ForerunnerDB.Collection "'+this.name()+'": Cannot update cast to unknown type: '+b[p]}break;case"$push":if(void 0===a[p]&&this._updateProperty(a,p,[]),!(a[p]instanceof Array))throw'ForerunnerDB.Collection "'+this.name()+'": Cannot push to a key that is not an array! ('+p+")";if(void 0!==b[p].$position&&b[p].$each instanceof Array)for(l=b[p].$position,k=b[p].$each.length,j=0;k>j;j++)this._updateSplicePush(a[p],l+j,b[p].$each[j]);else if(b[p].$each instanceof Array)for(k=b[p].$each.length,j=0;k>j;j++)this._updatePush(a[p],b[p].$each[j]);else this._updatePush(a[p],b[p]);q=!0;break;case"$pull":if(a[p]instanceof Array){for(i=[],j=0;j<a[p].length;j++)this._match(a[p][j],b[p],"",{})&&i.push(j);for(k=i.length;k--;)this._updatePull(a[p],i[k]),q=!0}break;case"$pullAll":if(a[p]instanceof Array){if(!(b[p]instanceof Array))throw'ForerunnerDB.Collection "'+this.name()+'": Cannot pullAll without being given an array of values to pull! ('+p+")";if(i=a[p],k=i.length,k>0)for(;k--;){for(l=0;l<b[p].length;l++)i[k]===b[p][l]&&(this._updatePull(a[p],k),k--,q=!0);if(0>k)break}}break;case"$addToSet":if(void 0===a[p]&&this._updateProperty(a,p,[]),!(a[p]instanceof Array))throw'ForerunnerDB.Collection "'+this.name()+'": Cannot addToSet on a key that is not an array! ('+p+")";var s,t,u,v,w=a[p],x=w.length,y=!0,z=d&&d.$addToSet;for(b[p].$key?(u=!1,v=new h(b[p].$key),t=v.value(b[p])[0],delete b[p].$key):z&&z.key?(u=!1,v=new h(z.key),t=v.value(b[p])[0]):(t=JSON.stringify(b[p]),u=!0),s=0;x>s;s++)if(u){if(JSON.stringify(w[s])===t){y=!1;break}}else if(t===v.value(w[s])[0]){y=!1;break}y&&(this._updatePush(a[p],b[p]),q=!0);break;case"$splicePush":if(void 0===a[p]&&this._updateProperty(a,p,[]),!(a[p]instanceof Array))throw'ForerunnerDB.Collection "'+this.name()+'": Cannot splicePush with a key that is not an array! ('+p+")";if(l=b.$index,void 0===l)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot splicePush without a $index integer value!';delete b.$index,l>a[p].length&&(l=a[p].length),this._updateSplicePush(a[p],l,b[p]),q=!0;break;case"$move":if(!(a[p]instanceof Array))throw'ForerunnerDB.Collection "'+this.name()+'": Cannot move on a key that is not an array! ('+p+")";for(j=0;j<a[p].length;j++)if(this._match(a[p][j],b[p],"",{})){var A=b.$index;if(void 0===A)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot move without a $index integer value!';delete b.$index,this._updateSpliceMove(a[p],j,A),q=!0;break}break;case"$mul":this._updateMultiply(a,p,b[p]),q=!0;break;case"$rename":this._updateRename(a,p,b[p]),q=!0;break;case"$overwrite":this._updateOverwrite(a,p,b[p]),q=!0;break;case"$unset":this._updateUnset(a,p),q=!0;break;case"$clear":this._updateClear(a,p),q=!0;break;case"$pop":if(!(a[p]instanceof Array))throw'ForerunnerDB.Collection "'+this.name()+'": Cannot pop from a key that is not an array! ('+p+")";this._updatePop(a[p],b[p])&&(q=!0);break;default:a[p]!==b[p]&&(this._updateProperty(a,p,b[p]),q=!0)}else if(null!==a[p]&&"object"==typeof a[p])if(n=a[p]instanceof Array,o=b[p]instanceof Array,n||o)if(!o&&n)for(j=0;j<a[p].length;j++)r=this.updateObject(a[p][j],b[p],c,d,e+"."+p,f),q=q||r;else a[p]!==b[p]&&(this._updateProperty(a,p,b[p]),q=!0);else r=this.updateObject(a[p],b[p],c,d,e+"."+p,f),q=q||r;else a[p]!==b[p]&&(this._updateProperty(a,p,b[p]),q=!0)}return q},n.prototype._isPositionalKey=function(a){return".$"===a.substr(a.length-2,2)},n.prototype.remove=function(a,b,c){if("dropped"===this._state)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot operate in a dropped state!';var d,e,f,g,h,i,j,k,l=this;if(a instanceof Array){for(g=[],f=0;f<a.length;f++)g.push(this.remove(a[f],{noEmit:!0}));return(!b||b&&!b.noEmit)&&this._onRemove(g),c&&c(!1,g),g}if(d=this.find(a,{$decouple:!1}),d.length){h=function(a){l._removeFromIndexes(a),e=l._data.indexOf(a),l._dataRemoveAtIndex(e)};for(var m=0;m<d.length;m++)j=d[m],l.willTrigger(l.TYPE_REMOVE,l.PHASE_BEFORE)||l.willTrigger(l.TYPE_REMOVE,l.PHASE_AFTER)?(i={type:"remove"},k=l.decouple(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_BEFORE,k,k)!==!1&&(h(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_AFTER,k,k))):h(j);this.chainSend("remove",{query:a,dataSet:d},b),(!b||b&&!b.noEmit)&&this._onRemove(d),this.deferEmit("change",{type:"remove",data:d})}return c&&c(!1,d),d},n.prototype.removeById=function(a){var b={};return b[this._primaryKey]=a,this.remove(b)},n.prototype.deferEmit=function(){var a,b=this;this._noEmitDefer||this._db&&(!this._db||this._db._noEmitDefer)?this.emit.apply(this,arguments):(a=arguments,this._changeTimeout&&clearTimeout(this._changeTimeout),this._changeTimeout=setTimeout(function(){b.debug()&&console.log("ForerunnerDB.Collection: Emitting "+a[0]),b.emit.apply(b,a)},1))},n.prototype.processQueue=function(a,b){var c=this._deferQueue[a],d=this._deferThreshold[a],e=this._deferTime[a];if(c.length){var f,g=this;c.length&&(f=c.length>d?c.splice(0,d):c.splice(0,c.length),this[a](f)),setTimeout(function(){g.processQueue(a,b)},e)}else b&&b()},n.prototype.insert=function(a,b,c){if("dropped"===this._state)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot operate in a dropped state!';return"function"==typeof b?(c=b,b=this._data.length):void 0===b&&(b=this._data.length),a=this.transformIn(a),this._insertHandle(a,b,c)},n.prototype._insertHandle=function(a,b,c){var d,e,f=this._deferQueue.insert,g=this._deferThreshold.insert,h=[],i=[];if(a instanceof Array){if(a.length>g)return this._deferQueue.insert=f.concat(a),void this.processQueue("insert",c);for(e=0;e<a.length;e++)d=this._insert(a[e],b+e),d===!0?h.push(a[e]):i.push({doc:a[e],reason:d})}else d=this._insert(a,b),d===!0?h.push(a):i.push({doc:a,reason:d});return this.chainSend("insert",a,{index:b}),this._onInsert(h,i),c&&c(),this.deferEmit("change",{type:"insert",data:h}),{inserted:h,failed:i}},n.prototype._insert=function(a,b){if(a){var c,d,e,f,g=this;if(this.ensurePrimaryKey(a),c=this.insertIndexViolation(a),e=function(a){g._insertIntoIndexes(a),b>g._data.length&&(b=g._data.length),g._dataInsertAtIndex(b,a)},c)return"Index violation in index: "+c;if(g.willTrigger(g.TYPE_INSERT,g.PHASE_BEFORE)||g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)){if(d={type:"insert"},g.processTrigger(d,g.TYPE_INSERT,g.PHASE_BEFORE,{},a)===!1)return!1;e(a),g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)&&(f=g.decouple(a),g.processTrigger(d,g.TYPE_INSERT,g.PHASE_AFTER,{},f))}else e(a);return!0}return"No document passed to insert"},n.prototype._dataInsertAtIndex=function(a,b){this._data.splice(a,0,b)},n.prototype._dataRemoveAtIndex=function(a){this._data.splice(a,1)},n.prototype._dataReplace=function(a){for(;this._data.length;)this._data.pop();this._data=this._data.concat(a)},n.prototype._insertIntoIndexes=function(a){var b,c,d=this._indexByName,e=JSON.stringify(a);c=this._primaryIndex.uniqueSet(a[this._primaryKey],a),this._primaryCrc.uniqueSet(a[this._primaryKey],e),this._crcLookup.uniqueSet(e,a);for(b in d)d.hasOwnProperty(b)&&d[b].insert(a);return c},n.prototype._removeFromIndexes=function(a){var b,c=this._indexByName,d=JSON.stringify(a);this._primaryIndex.unSet(a[this._primaryKey]),this._primaryCrc.unSet(a[this._primaryKey]),this._crcLookup.unSet(d);for(b in c)c.hasOwnProperty(b)&&c[b].remove(a)},n.prototype._rebuildIndexes=function(){var a,b=this._indexByName;for(a in b)b.hasOwnProperty(a)&&b[a].rebuild()},n.prototype.indexOfDocById=function(a){return this._data.indexOf(this._primaryIndex.get(a[this._primaryKey]))},n.prototype.subset=function(a,b){var c=this.find(a,b);return(new n)._subsetOf(this).primaryKey(this._primaryKey).setData(c)},n.prototype.subsetOf=function(){return this.__subsetOf},n.prototype._subsetOf=function(a){return this.__subsetOf=a,this},n.prototype.distinct=function(a,b,c){if("dropped"===this._state)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot operate in a dropped state!';var d,e,f=this.find(b,c),g=new h(a),i={},j=[];for(e=0;e<f.length;e++)d=g.value(f[e])[0],d&&!i[d]&&(i[d]=!0,j.push(d));return j},n.prototype.findById=function(a,b){var c={};return c[this._primaryKey]=a,this.find(c,b)[0]},n.prototype.peek=function(a,b){var c,d,e=this._data,f=e.length,g=new n,h=typeof a;if("string"===h){for(c=0;f>c;c++)d=JSON.stringify(e[c]),d.indexOf(a)>-1&&g.insert(e[c]);return g.find({},b)}return this.find(a,b)},n.prototype.explain=function(a,b){var c=this.find(a,b);return c.__fdbOp._data},n.prototype.options=function(a){return a=a||{},a.$decouple=void 0!==a.$decouple?a.$decouple:!0,a.$explain=void 0!==a.$explain?a.$explain:!1,a},n.prototype.find=function(a,b){if("dropped"===this._state)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot operate in a dropped state!';a=a||{},b=this.options(b);var c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C=this._metrics.create("find"),D=this.primaryKey(),E=this,F=!0,G={},H=[],I=[],J=[],K={},L={},M=function(b){return E._match(b,a,"and",K)};if(C.start(),a){if(C.time("analyseQuery"),c=this._analyseQuery(a,b,C),C.time("analyseQuery"),C.data("analysis",c),c.hasJoin&&c.queriesJoin){for(C.time("joinReferences"),g=0;g<c.joinsOn.length;g++)k=c.joinsOn[g],j=new h(c.joinQueries[k]),i=j.value(a)[0],G[c.joinsOn[g]]=this._db.collection(c.joinsOn[g]).subset(i);C.time("joinReferences")}if(c.indexMatch.length&&(!b||b&&!b.$skipIndex)?(C.data("index.potential",c.indexMatch),C.data("index.used",c.indexMatch[0].index),C.time("indexLookup"),e=c.indexMatch[0].lookup,C.time("indexLookup"),c.indexMatch[0].keyData.totalKeyCount===c.indexMatch[0].keyData.score&&(F=!1)):C.flag("usedIndex",!1),F&&(e&&e.length?(d=e.length,C.time("tableScan: "+d),e=e.filter(M)):(d=this._data.length,C.time("tableScan: "+d),e=this._data.filter(M)),b.$orderBy&&(C.time("sort"),e=this.sort(b.$orderBy,e),C.time("sort")),C.time("tableScan: "+d)),void 0!==b.$page&&void 0!==b.$limit&&(L.page=b.$page,L.pages=Math.ceil(e.length/b.$limit),L.records=e.length,b.$page&&b.$limit>0&&(C.data("cursor",L),e.splice(0,b.$page*b.$limit))),b.$skip&&(L.skip=b.$skip,e.splice(0,b.$skip),C.data("skip",b.$skip)),b.$limit&&e&&e.length>b.$limit&&(L.limit=b.$limit,e.length=b.$limit,C.data("limit",b.$limit)),b.$decouple&&(C.time("decouple"),e=this.decouple(e),C.time("decouple"),C.data("flag.decouple",!0)),b.$join){for(f=0;f<b.$join.length;f++)for(k in b.$join[f])if(b.$join[f].hasOwnProperty(k))for(s=k,l=this._db.collection(k),m=b.$join[f][k],t=0;t<e.length;t++){o={},p=!1,q=!1;for(n in m)if(m.hasOwnProperty(n))if("$"===n.substr(0,1))switch(n){case"$as":s=m[n];break;case"$multi":p=m[n];break;case"$require":q=m[n]}else o[n]=new h(m[n]).value(e[t])[0];r=l.find(o),!q||q&&r[0]?e[t][s]=p===!1?r[0]:r:H.push(e[t])}C.data("flag.join",!0)}if(H.length){for(C.time("removalQueue"),v=0;v<H.length;v++)u=e.indexOf(H[v]),u>-1&&e.splice(u,1);C.time("removalQueue")}if(b.$transform){for(C.time("transform"),v=0;v<e.length;v++)e.splice(v,1,b.$transform(e[v]));C.time("transform"),C.data("flag.transform",!0)}this._transformEnabled&&this._transformOut&&(C.time("transformOut"),e=this.transformOut(e),C.time("transformOut")),C.data("results",e.length)}else e=[];C.time("scanFields");for(v in b)b.hasOwnProperty(v)&&0!==v.indexOf("$")&&(1===b[v]?I.push(v):0===b[v]&&J.push(v));if(C.time("scanFields"),I.length||J.length){for(C.data("flag.limitFields",!0),C.data("limitFields.on",I),C.data("limitFields.off",J),C.time("limitFields"),v=0;v<e.length;v++){B=e[v];for(w in B)B.hasOwnProperty(w)&&(I.length&&w!==D&&-1===I.indexOf(w)&&delete B[w],J.length&&J.indexOf(w)>-1&&delete B[w])}C.time("limitFields")}if(b.$elemMatch){C.data("flag.elemMatch",!0),C.time("projection-elemMatch");for(v in b.$elemMatch)if(b.$elemMatch.hasOwnProperty(v))for(y=new h(v),w=0;w<e.length;w++)if(z=y.value(e[w])[0],z&&z.length)for(x=0;x<z.length;x++)if(E._match(z[x],b.$elemMatch[v],"",{})){y.set(e[w],v,[z[x]]);break}C.time("projection-elemMatch")}if(b.$elemsMatch){C.data("flag.elemsMatch",!0),C.time("projection-elemsMatch");for(v in b.$elemsMatch)if(b.$elemsMatch.hasOwnProperty(v))for(y=new h(v),w=0;w<e.length;w++)if(z=y.value(e[w])[0],z&&z.length){for(A=[],x=0;x<z.length;x++)E._match(z[x],b.$elemsMatch[v],"",{})&&A.push(z[x]);y.set(e[w],v,A)}C.time("projection-elemsMatch")}return C.stop(),e.__fdbOp=C,e.$cursor=L,e},n.prototype.findOne=function(){return this.find.apply(this,arguments)[0]},n.prototype.indexOf=function(a){var b=this.find(a,{$decouple:!1})[0];return b?this._data.indexOf(b):void 0},n.prototype.transform=function(a){return void 0!==a?("object"==typeof a?(void 0!==a.enabled&&(this._transformEnabled=a.enabled),void 0!==a.dataIn&&(this._transformIn=a.dataIn),void 0!==a.dataOut&&(this._transformOut=a.dataOut)):this._transformEnabled=a!==!1,this):{enabled:this._transformEnabled,dataIn:this._transformIn,dataOut:this._transformOut}},n.prototype.transformIn=function(a){if(this._transformEnabled&&this._transformIn){if(a instanceof Array){var b,c=[];for(b=0;b<a.length;b++)c[b]=this._transformIn(a[b]);return c}return this._transformIn(a)}return a},n.prototype.transformOut=function(a){if(this._transformEnabled&&this._transformOut){if(a instanceof Array){var b,c=[];for(b=0;b<a.length;b++)c[b]=this._transformOut(a[b]);return c}return this._transformOut(a)}return a},n.prototype.sort=function(a,b){b=b||[];var c,d,e=[];for(c in a)a.hasOwnProperty(c)&&(d={},d[c]=a[c],d.___fdbKey=c,e.push(d));return e.length<2?this._sort(a,b):this._bucketSort(e,b)},n.prototype._bucketSort=function(a,b){var c,d,e,f=a.shift(),g=[];if(a.length>0){b=this._sort(f,b),d=this.bucket(f.___fdbKey,b);for(e in d)d.hasOwnProperty(e)&&(c=[].concat(a),g=g.concat(this._bucketSort(c,d[e])));return g}return this._sort(f,b)},n.prototype._sort=function(a,b){var c,d=this,e=new h,f=e.parse(a,!0)[0];if(e.path(f.path),1===f.value)c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortAsc(c,f)};else{if(-1!==f.value)throw'ForerunnerDB.Collection "'+this.name()+'": $orderBy clause has invalid direction: '+f.value+", accepted values are 1 or -1 for ascending or descending!";c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortDesc(c,f)}}return b.sort(c)},n.prototype.bucket=function(a,b){var c,d={};for(c=0;c<b.length;c++)d[b[c][a]]=d[b[c][a]]||[],d[b[c][a]].push(b[c]);return d},n.prototype._analyseQuery=function(a,b,c){var d,e,f,g,i,j,k,l,m,n,o,p={queriesOn:[this._name],indexMatch:[],hasJoin:!1,queriesJoin:!1,joinQueries:{},query:a,options:b},q=[],r=[];if(c.time("checkIndexes"),m=new h,n=m.countKeys(a)){void 0!==a[this._primaryKey]&&(c.time("checkIndexMatch: Primary Key"),p.indexMatch.push({lookup:this._primaryIndex.lookup(a,b),keyData:{matchedKeys:[this._primaryKey],totalKeyCount:n,score:1},index:this._primaryIndex}),c.time("checkIndexMatch: Primary Key"));for(o in this._indexById)if(this._indexById.hasOwnProperty(o)&&(j=this._indexById[o],k=j.name(),c.time("checkIndexMatch: "+k),i=j.match(a,b),i.score>0&&(l=j.lookup(a,b),p.indexMatch.push({lookup:l,keyData:i,index:j})),c.time("checkIndexMatch: "+k),i.score===n))break;c.time("checkIndexes"),p.indexMatch.length>1&&(c.time("findOptimalIndex"),p.indexMatch.sort(function(a,b){return a.keyData.score>b.keyData.score?-1:a.keyData.score<b.keyData.score?1:a.keyData.score===b.keyData.score?a.lookup.length-b.lookup.length:void 0}),c.time("findOptimalIndex"))}if(b.$join){for(p.hasJoin=!0,d=0;d<b.$join.length;d++)for(e in b.$join[d])b.$join[d].hasOwnProperty(e)&&(q.push(e),r.push("$as"in b.$join[d][e]?b.$join[d][e].$as:e));for(g=0;g<r.length;g++)f=this._queryReferencesCollection(a,r[g],""),f&&(p.joinQueries[q[g]]=f,p.queriesJoin=!0);p.joinsOn=q,p.queriesOn=p.queriesOn.concat(q)}return p},n.prototype._queryReferencesCollection=function(a,b,c){var d;for(d in a)if(a.hasOwnProperty(d)){if(d===b)return c&&(c+="."),c+d;if("object"==typeof a[d])return c&&(c+="."),c+=d,this._queryReferencesCollection(a[d],b,c)}return!1},n.prototype.count=function(a,b){return a?this.find(a,b).length:this._data.length},n.prototype.findSub=function(a,b,c,d){var e,f,g,i=new h(b),j=this.find(a),k=j.length,l=this._db.collection("__FDB_temp_"+this.objectId()),m={parents:k,subDocTotal:0,subDocs:[],pathFound:!1,err:""};for(e=0;k>e;e++)if(f=i.value(j[e])[0]){if(l.setData(f),g=l.find(c,d),d.returnFirst&&g.length)return g[0];m.subDocs.push(g),m.subDocTotal+=g.length,m.pathFound=!0}return l.drop(),d.noStats?m.subDocs:(m.pathFound||(m.err="No objects found in the parent documents with a matching path of: "+b),m)},n.prototype.insertIndexViolation=function(a){var b,c,d,e=this._indexByName;if(this._primaryIndex.get(a[this._primaryKey]))b=this._primaryIndex;else for(c in e)if(e.hasOwnProperty(c)&&(d=e[c],d.unique()&&d.violation(a))){b=d;break}return b?b.name():!1},n.prototype.ensureIndex=function(a,b){if("dropped"===this._state)throw'ForerunnerDB.Collection "'+this.name()+'": Cannot operate in a dropped state!';this._indexByName=this._indexByName||{},this._indexById=this._indexById||{};var c,d={start:(new Date).getTime()};if(b)switch(b.type){case"hashed":c=new i(a,b,this);break;case"btree":c=new j(a,b,this);break;default:c=new i(a,b,this)}else c=new i(a,b,this);return this._indexByName[c.name()]?{err:"Index with that name already exists"}:this._indexById[c.id()]?{err:"Index with those keys already exists"}:(c.rebuild(),this._indexByName[c.name()]=c,this._indexById[c.id()]=c,d.end=(new Date).getTime(),d.total=d.end-d.start,this._lastOp={type:"ensureIndex",stats:{time:d}},{index:c,id:c.id(),name:c.name(),state:c.state()})},n.prototype.index=function(a){return this._indexByName?this._indexByName[a]:void 0},n.prototype.lastOp=function(){return this._metrics.list()},n.prototype.diff=function(a){var b,c,d,e,f={insert:[],update:[],remove:[]},g=this.primaryKey();if(g!==a.primaryKey())throw'ForerunnerDB.Collection "'+this.name()+'": Collection diffing requires that both collections have the same primary key!';for(b=a._data;b&&!(b instanceof Array);)a=b,b=a._data;for(e=b.length,c=0;e>c;c++)d=b[c],this._primaryIndex.get(d[g])?this._primaryCrc.get(d[g])!==a._primaryCrc.get(d[g])&&f.update.push(d):f.insert.push(d);for(b=this._data,e=b.length,c=0;e>c;c++)d=b[c],a._primaryIndex.get(d[g])||f.remove.push(d);return f},n.prototype.collateAdd=new l({"object, string":function(a,b){var c=this;c.collateAdd(a,function(d){var e,f;switch(d.type){case"insert":e={$push:{}},e.$push[b]=c.decouple(d.data),c.update({},e);break;case"update":e={},f={},e[b]=d.data.query,f[b+".$"]=d.data.update,c.update(e,f);break;case"remove":e={$pull:{}},e.$pull[b]={},e.$pull[b][c.primaryKey()]=d.data.dataSet[0][a.primaryKey()],c.update({},e)}})},"object, function":function(a,b){if("string"==typeof a&&(a=this._db.collection(a,{autoCreate:!1,throwError:!1})),a)return this._collate=this._collate||{},this._collate[a.name()]=new m(a,this,b),this;throw"Cannot collate from a non-existent collection!"}}),n.prototype.collateRemove=function(a){if("object"==typeof a&&(a=a.name()),a)return this._collate[a].drop(),delete this._collate[a],this;throw"No collection name passed to collateRemove() or collection not found!"},e.prototype.collection=new l({object:function(a){return this.$main.call(this,a)},string:function(a){return this.$main.call(this,{name:a})},"string, string":function(a,b){return this.$main.call(this,{name:a,primaryKey:b})},"string, object":function(a,b){return b.name=a,this.$main.call(this,b)},"string, string, object":function(a,b,c){return c.name=a,c.primaryKey=b,this.$main.call(this,c)},$main:function(a){var b=a.name;if(b){if(!this._collection[b]){if(a&&a.autoCreate===!1&&a&&a.throwError!==!1)throw'ForerunnerDB.Db "'+this.name()+'": Cannot get collection '+b+" because it does not exist and auto-create has been disabled!";this.debug()&&console.log("Creating collection "+b)}return this._collection[b]=this._collection[b]||new n(b).db(this),void 0!==a.primaryKey&&this._collection[b].primaryKey(a.primaryKey),this._collection[b]}if(!a||a&&a.throwError!==!1)throw'ForerunnerDB.Db "'+this.name()+'": Cannot get collection with undefined name!'}}),e.prototype.collectionExists=function(a){return Boolean(this._collection[a])},e.prototype.collections=function(a){var b,c=[];a&&(a instanceof RegExp||(a=new RegExp(a)));for(b in this._collection)this._collection.hasOwnProperty(b)&&(a?a.exec(b)&&c.push({name:b,count:this._collection[b].count()}):c.push({name:b,count:this._collection[b].count()}));return c.sort(function(a,b){return a.name.localeCompare(b.name)}),c},d.finishModule("Collection"),b.exports=n},{"./Crc":6,"./IndexBinaryTree":8,"./IndexHashMap":9,"./KeyValueStore":10,"./Metrics":11,"./Overload":22,"./Path":23,"./ReactorIO":24,"./Shared":25}],4:[function(a,b,c){"use strict";var d,e,f,g;d=a("./Shared");var h=function(){this.init.apply(this,arguments)};h.prototype.init=function(a){var b=this;b._name=a,b._data=new g("__FDB__cg_data_"+b._name),b._collections=[],b._view=[]},d.addModule("CollectionGroup",h),d.mixin(h.prototype,"Mixin.Common"),d.mixin(h.prototype,"Mixin.ChainReactor"),d.mixin(h.prototype,"Mixin.Constants"),d.mixin(h.prototype,"Mixin.Triggers"),g=a("./Collection"),e=d.modules.Db,f=d.modules.Db.prototype.init,h.prototype.on=function(){this._data.on.apply(this._data,arguments)},h.prototype.off=function(){this._data.off.apply(this._data,arguments)},h.prototype.emit=function(){this._data.emit.apply(this._data,arguments)},h.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey=a,this):this._primaryKey},d.synthesize(h.prototype,"state"),d.synthesize(h.prototype,"db"),h.prototype.addCollection=function(a){if(a&&-1===this._collections.indexOf(a)){if(this._collections.length){if(this._primaryKey!==a.primaryKey())throw'ForerunnerDB.CollectionGroup "'+this.name()+'": All collections in a collection group must have the same primary key!'}else this.primaryKey(a.primaryKey());this._collections.push(a),a._groups=a._groups||[],a._groups.push(this),a.chain(this),a.on("drop",function(){if(a._groups&&a._groups.length){ var b,c=[];for(b=0;b<a._groups.length;b++)c.push(a._groups[b]);for(b=0;b<c.length;b++)a._groups[b].removeCollection(a)}delete a._groups}),this._data.insert(a.find())}return this},h.prototype.removeCollection=function(a){if(a){var b,c=this._collections.indexOf(a);-1!==c&&(a.unChain(this),this._collections.splice(c,1),a._groups=a._groups||[],b=a._groups.indexOf(this),-1!==b&&a._groups.splice(b,1),a.off("drop")),0===this._collections.length&&delete this._primaryKey}return this},h.prototype._chainHandler=function(a){switch(a.type){case"setData":a.data=this.decouple(a.data),this._data.remove(a.options.oldData),this._data.insert(a.data);break;case"insert":a.data=this.decouple(a.data),this._data.insert(a.data);break;case"update":this._data.update(a.data.query,a.data.update,a.options);break;case"remove":this._data.remove(a.data.query,a.options)}},h.prototype.insert=function(){this._collectionsRun("insert",arguments)},h.prototype.update=function(){this._collectionsRun("update",arguments)},h.prototype.updateById=function(){this._collectionsRun("updateById",arguments)},h.prototype.remove=function(){this._collectionsRun("remove",arguments)},h.prototype._collectionsRun=function(a,b){for(var c=0;c<this._collections.length;c++)this._collections[c][a].apply(this._collections[c],b)},h.prototype.find=function(a,b){return this._data.find(a,b)},h.prototype.removeById=function(a){for(var b=0;b<this._collections.length;b++)this._collections[b].removeById(a)},h.prototype.subset=function(a,b){var c=this.find(a,b);return(new g)._subsetOf(this).primaryKey(this._primaryKey).setData(c)},h.prototype.drop=function(){if("dropped"!==this._state){var a,b,c;if(this._debug&&console.log("Dropping collection group "+this._name),this._state="dropped",this._collections&&this._collections.length)for(b=[].concat(this._collections),a=0;a<b.length;a++)this.removeCollection(b[a]);if(this._view&&this._view.length)for(c=[].concat(this._view),a=0;a<c.length;a++)this._removeView(c[a]);this.emit("drop",this)}return!0},e.prototype.init=function(){this._collectionGroup={},f.apply(this,arguments)},e.prototype.collectionGroup=function(a){return a?(this._collectionGroup[a]=this._collectionGroup[a]||new h(a).db(this),this._collectionGroup[a]):this._collectionGroup},e.prototype.collectionGroups=function(){var a,b=[];for(a in this._collectionGroup)this._collectionGroup.hasOwnProperty(a)&&b.push({name:a});return b},b.exports=h},{"./Collection":3,"./Shared":25}],5:[function(a,b,c){"use strict";var d,e,f,g;d=a("./Shared"),g=a("./Overload");var h=function(a){this.init.apply(this,arguments)};h.prototype.init=function(){this._db={},this._debug={}},h.prototype.moduleLoaded=new g({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b()}},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),h.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)?(b&&b(),!0):!1:d.version},h.moduleLoaded=h.prototype.moduleLoaded,h.version=h.prototype.version,h.shared=d,h.prototype.shared=d,d.addModule("Core",h),d.mixin(h.prototype,"Mixin.Common"),d.mixin(h.prototype,"Mixin.Constants"),e=a("./Db.js"),f=a("./Metrics.js"),h.prototype._isServer=!1,h.prototype.isClient=function(){return!this._isServer},h.prototype.isServer=function(){return this._isServer},h.prototype.isClient=function(){return!this._isServer},h.prototype.isServer=function(){return this._isServer},h.prototype.collection=function(){throw"ForerunnerDB's instantiation has changed since version 1.3.36 to support multiple database instances. Please see the readme.md file for the minor change you have to make to get your project back up and running, or see the issue related to this change at https://github.com/Irrelon/ForerunnerDB/issues/44"},b.exports=h},{"./Db.js":7,"./Metrics.js":11,"./Overload":22,"./Shared":25}],6:[function(a,b,c){"use strict";var d=function(){var a,b,c,d=[];for(b=0;256>b;b++){for(a=b,c=0;8>c;c++)a=1&a?3988292384^a>>>1:a>>>1;d[b]=a}return d}();b.exports=function(a){var b,c=-1;for(b=0;b<a.length;b++)c=c>>>8^d[255&(c^a.charCodeAt(b))];return(-1^c)>>>0}},{}],7:[function(a,b,c){"use strict";var d,e,f,g,h,i;d=a("./Shared"),i=a("./Overload");var j=function(a){this.init.apply(this,arguments)};j.prototype.init=function(a){this._primaryKey="_id",this._name=a,this._collection={},this._debug={}},j.prototype.moduleLoaded=new i({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b()}},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),j.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)?(b&&b(),!0):!1:d.version},j.moduleLoaded=j.prototype.moduleLoaded,j.version=j.prototype.version,j.shared=d,j.prototype.shared=d,d.addModule("Db",j),d.mixin(j.prototype,"Mixin.Common"),d.mixin(j.prototype,"Mixin.ChainReactor"),d.mixin(j.prototype,"Mixin.Constants"),e=d.modules.Core,f=a("./Collection.js"),g=a("./Metrics.js"),h=a("./Crc.js"),j.prototype._isServer=!1,d.synthesize(j.prototype,"core"),d.synthesize(j.prototype,"primaryKey"),d.synthesize(j.prototype,"state"),d.synthesize(j.prototype,"name"),j.prototype.isClient=function(){return!this._isServer},j.prototype.isServer=function(){return this._isServer},j.prototype.crc=h,j.prototype.isClient=function(){return!this._isServer},j.prototype.isServer=function(){return this._isServer},j.prototype.arrayToCollection=function(a){return(new f).setData(a)},j.prototype.on=function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||[],this._listeners[a].push(b),this},j.prototype.off=function(a,b){if(a in this._listeners){var c=this._listeners[a],d=c.indexOf(b);d>-1&&c.splice(d,1)}return this},j.prototype.emit=function(a,b){if(this._listeners=this._listeners||{},a in this._listeners){var c,d=this._listeners[a],e=d.length;for(c=0;e>c;c++)d[c].apply(this,Array.prototype.slice.call(arguments,1))}return this},j.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d=d.concat("string"===e?c.peek(a):c.find(a)));return d},j.prototype.peekCat=function(a){var b,c,d,e={},f=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],"string"===f?(d=c.peek(a),d&&d.length&&(e[c.name()]=d)):(d=c.find(a),d&&d.length&&(e[c.name()]=d)));return e},j.prototype.drop=new i({"":function(){if("dropped"!==this._state){var a,b=this.collections(),c=b.length;for(this._state="dropped",a=0;c>a;a++)this.collection(b[a].name).drop(),delete this._collection[b[a].name];this.emit("drop",this),delete this._core._db[this._name]}return!0},"function":function(a){if("dropped"!==this._state){var b,c=this.collections(),d=c.length,e=0,f=function(){e++,e===d&&a&&a()};for(this._state="dropped",b=0;d>b;b++)this.collection(c[b].name).drop(f),delete this._collection[c[b].name];this.emit("drop",this),delete this._core._db[this._name]}return!0},"boolean":function(a){if("dropped"!==this._state){var b,c=this.collections(),d=c.length;for(this._state="dropped",b=0;d>b;b++)this.collection(c[b].name).drop(a),delete this._collection[c[b].name];this.emit("drop",this),delete this._core._db[this._name]}return!0},"boolean, function":function(a,b){if("dropped"!==this._state){var c,d=this.collections(),e=d.length,f=0,g=function(){f++,f===e&&b&&b()};for(this._state="dropped",c=0;e>c;c++)this.collection(d[c].name).drop(a,g),delete this._collection[d[c].name];this.emit("drop",this),delete this._core._db[this._name]}return!0}}),e.prototype.db=function(a){return a||(a=this.objectId()),this._db[a]=this._db[a]||new j(a).core(this),this._db[a]},e.prototype.databases=function(a){var b,c=[];a&&(a instanceof RegExp||(a=new RegExp(a)));for(b in this._db)this._db.hasOwnProperty(b)&&(a?a.exec(b)&&c.push({name:b,collectionCount:this._db[b].collections().length}):c.push({name:b,collectionCount:this._db[b].collections().length}));return c.sort(function(a,b){return a.name.localeCompare(b.name)}),c},b.exports=j},{"./Collection.js":3,"./Crc.js":6,"./Metrics.js":11,"./Overload":22,"./Shared":25}],8:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(){},g=function(){this.init.apply(this,arguments)};g.prototype.init=function(a,b,c){this._btree=new(f.create(2,this.sortAsc)),this._size=0,this._id=this._itemKeyHash(a,a),this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&this.collection(c),this.name(b&&b.name?b.name:this._id)},d.addModule("IndexBinaryTree",g),d.mixin(g.prototype,"Mixin.ChainReactor"),d.mixin(g.prototype,"Mixin.Sorting"),g.prototype.id=function(){return this._id},g.prototype.state=function(){return this._state},g.prototype.size=function(){return this._size},d.synthesize(g.prototype,"data"),d.synthesize(g.prototype,"name"),d.synthesize(g.prototype,"collection"),d.synthesize(g.prototype,"type"),d.synthesize(g.prototype,"unique"),g.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},g.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._btree=new(f.create(2,this.sortAsc)),this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},g.prototype.insert=function(a,b){var c,d,e=this._unique,f=this._itemKeyHash(a,this._keys);e&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),d=this._btree.get(f),void 0===d&&(d=[],this._btree.put(f,d)),d.push(a),this._size++},g.prototype.remove=function(a,b){var c,d,e,f=this._unique,g=this._itemKeyHash(a,this._keys);f&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),d=this._btree.get(g),void 0!==d&&(e=d.indexOf(a),e>-1&&(1===d.length?this._btree.del(g):d.splice(e,1),this._size--))},g.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},g.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},g.prototype.lookup=function(a){return this._data[this._itemHash(a,this._keys)]||[]},g.prototype.match=function(a,b){var c,d=new e,f=d.parseArr(this._keys),g=d.parseArr(a),h=[],i=0;for(c=0;c<f.length;c++){if(g[c]!==f[c])return{matchedKeys:[],totalKeyCount:g.length,score:0};i++,h.push(g[c])}return{matchedKeys:h,totalKeyCount:g.length,score:i}},g.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},g.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},g.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.finishModule("IndexBinaryTree"),b.exports=g},{"./Path":23,"./Shared":25}],9:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a,b,c){this._crossRef={},this._size=0,this._id=this._itemKeyHash(a,a),this.data({}),this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&this.collection(c),this.name(b&&b.name?b.name:this._id)},d.addModule("IndexHashMap",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.id=function(){return this._id},f.prototype.state=function(){return this._state},f.prototype.size=function(){return this._size},d.synthesize(f.prototype,"data"),d.synthesize(f.prototype,"name"),d.synthesize(f.prototype,"collection"),d.synthesize(f.prototype,"type"),d.synthesize(f.prototype,"unique"),f.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},f.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._data={},this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},f.prototype.insert=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pushToPathValue(d[e],a)},f.prototype.remove=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pullFromPathValue(d[e],a)},f.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},f.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},f.prototype.pushToPathValue=function(a,b){var c=this._data[a]=this._data[a]||[];-1===c.indexOf(b)&&(c.push(b),this._size++,this.pushToCrossRef(b,c))},f.prototype.pullFromPathValue=function(a,b){var c,d=this._data[a];c=d.indexOf(b),c>-1&&(d.splice(c,1),this._size--,this.pullFromCrossRef(b,d)),d.length||delete this._data[a]},f.prototype.pull=function(a){var b,c,d=a[this._collection.primaryKey()],e=this._crossRef[d],f=e.length;for(b=0;f>b;b++)c=e[b],this._pullFromArray(c,a);this._size--,delete this._crossRef[d]},f.prototype._pullFromArray=function(a,b){for(var c=a.length;c--;)a[c]===b&&a.splice(c,1)},f.prototype.pushToCrossRef=function(a,b){var c,d=a[this._collection.primaryKey()];this._crossRef[d]=this._crossRef[d]||[],c=this._crossRef[d],-1===c.indexOf(b)&&c.push(b)},f.prototype.pullFromCrossRef=function(a,b){var c=a[this._collection.primaryKey()];delete this._crossRef[c]},f.prototype.lookup=function(a){return this._data[this._itemHash(a,this._keys)]||[]},f.prototype.match=function(a,b){var c,d=new e,f=d.parseArr(this._keys),g=d.parseArr(a),h=[],i=0;for(c=0;c<f.length;c++){if(g[c]!==f[c])return{matchedKeys:[],totalKeyCount:g.length,score:0};i++,h.push(g[c])}return{matchedKeys:h,totalKeyCount:g.length,score:i}},f.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},f.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},f.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.finishModule("IndexHashMap"),b.exports=f},{"./Path":23,"./Shared":25}],10:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){this._name=a,this._data={},this._primaryKey="_id"},d.addModule("KeyValueStore",e),d.mixin(e.prototype,"Mixin.ChainReactor"),d.synthesize(e.prototype,"name"),e.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey=a,this):this._primaryKey},e.prototype.truncate=function(){return this._data={},this},e.prototype.set=function(a,b){return this._data[a]=b?b:!0,this},e.prototype.get=function(a){return this._data[a]},e.prototype.lookup=function(a){var b,c,d,e,f=a[this._primaryKey];if(f instanceof Array){for(c=f.length,e=[],b=0;c>b;b++)d=this._data[f[b]],d&&e.push(d);return e}if(f instanceof RegExp){e=[];for(b in this._data)this._data.hasOwnProperty(b)&&f.test(b)&&e.push(this._data[b]);return e}if("object"!=typeof f)return d=this._data[f],void 0!==d?[d]:[];if(f.$ne){e=[];for(b in this._data)this._data.hasOwnProperty(b)&&b!==f.$ne&&e.push(this._data[b]);return e}if(f.$in&&f.$in instanceof Array){e=[];for(b in this._data)this._data.hasOwnProperty(b)&&f.$in.indexOf(b)>-1&&e.push(this._data[b]);return e}if(f.$nin&&f.$nin instanceof Array){e=[];for(b in this._data)this._data.hasOwnProperty(b)&&-1===f.$nin.indexOf(b)&&e.push(this._data[b]);return e}if(f.$or&&f.$or instanceof Array){for(e=[],b=0;b<f.$or.length;b++)e=e.concat(this.lookup(f.$or[b]));return e}},e.prototype.unSet=function(a){return delete this._data[a],this},e.prototype.uniqueSet=function(a,b){return void 0===this._data[a]?(this._data[a]=b,!0):!1},d.finishModule("KeyValueStore"),b.exports=e},{"./Shared":25}],11:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Operation"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(){this._data=[]},d.addModule("Metrics",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.create=function(a){var b=new e(a);return this._enabled&&this._data.push(b),b},f.prototype.start=function(){return this._enabled=!0,this},f.prototype.stop=function(){return this._enabled=!1,this},f.prototype.clear=function(){return this._data=[],this},f.prototype.list=function(){return this._data},d.finishModule("Metrics"),b.exports=f},{"./Operation":21,"./Shared":25}],12:[function(a,b,c){"use strict";var d={preSetData:function(){},postSetData:function(){}};b.exports=d},{}],13:[function(a,b,c){"use strict";var d={chain:function(a){this._chain=this._chain||[];var b=this._chain.indexOf(a);-1===b&&this._chain.push(a)},unChain:function(a){if(this._chain){var b=this._chain.indexOf(a);b>-1&&this._chain.splice(b,1)}},chainSend:function(a,b,c){if(this._chain){var d,e,f=this._chain,g=f.length;for(e=0;g>e;e++){if(d=f[e],d._state&&(!d._state||"dropped"===d._state))throw console.log("Reactor Data:",a,b,c),console.log("Reactor Node:",d),"Chain reactor attempting to send data to target reactor node that is in a dropped state!";d.chainReceive(this,a,b,c)}}},chainReceive:function(a,b,c,d){var e={sender:a,type:b,data:c,options:d};(!this._chainHandler||this._chainHandler&&!this._chainHandler(e))&&this.chainSend(e.type,e.data,e.options)}};b.exports=d},{}],14:[function(a,b,c){"use strict";var d,e=0,f=a("./Overload");d={store:function(a,b){if(void 0!==a){if(void 0!==b)return this._store=this._store||{},this._store[a]=b,this;if(this._store)return this._store[a]}return void 0},unStore:function(a){return void 0!==a&&delete this._store[a],this},decouple:function(a,b){if(void 0!==a){if(b){var c,d=JSON.stringify(a),e=[];for(c=0;b>c;c++)e.push(JSON.parse(d));return e}return JSON.parse(JSON.stringify(a))}return void 0},objectId:function(a){var b,c=Math.pow(10,17);if(a){var d,f=0,g=a.length;for(d=0;g>d;d++)f+=a.charCodeAt(d)*c;b=f.toString(16)}else e++,b=(e+(Math.random()*c+Math.random()*c+Math.random()*c+Math.random()*c)).toString(16);return b},debug:new f([function(){return this._debug&&this._debug.all},function(a){return void 0!==a?"boolean"==typeof a?(this._debug=this._debug||{},this._debug.all=a,this.chainSend("debug",this._debug),this):this._debug&&this._debug[a]||this._db&&this._db._debug&&this._db._debug[a]||this._debug&&this._debug.all:this._debug&&this._debug.all},function(a,b){return void 0!==a?void 0!==b?(this._debug=this._debug||{},this._debug[a]=b,this.chainSend("debug",this._debug),this):this._debug&&this._debug[b]||this._db&&this._db._debug&&this._db._debug[a]:this._debug&&this._debug.all}])},b.exports=d},{"./Overload":22}],15:[function(a,b,c){"use strict";var d={TYPE_INSERT:0,TYPE_UPDATE:1,TYPE_REMOVE:2,PHASE_BEFORE:0,PHASE_AFTER:1};b.exports=d},{}],16:[function(a,b,c){"use strict";var d=a("./Overload"),e={on:new d({"string, function":function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a]["*"]=this._listeners[a]["*"]||[],this._listeners[a]["*"].push(b),this},"string, *, function":function(a,b,c){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a][b]=this._listeners[a][b]||[],this._listeners[a][b].push(c),this}}),off:new d({string:function(a){return this._listeners&&this._listeners[a]&&a in this._listeners&&delete this._listeners[a],this},"string, function":function(a,b){var c,d;return"string"==typeof b?this._listeners&&this._listeners[a]&&this._listeners[a][b]&&delete this._listeners[a][b]:this._listeners&&a in this._listeners&&(c=this._listeners[a]["*"],d=c.indexOf(b),d>-1&&c.splice(d,1)),this},"string, *, function":function(a,b,c){if(this._listeners&&a in this._listeners&&b in this.listeners[a]){var d=this._listeners[a][b],e=d.indexOf(c);e>-1&&d.splice(e,1)}},"string, *":function(a,b){this._listeners&&a in this._listeners&&b in this._listeners[a]&&delete this._listeners[a][b]}}),emit:function(a,b){if(this._listeners=this._listeners||{},a in this._listeners){var c,d;if(this._listeners[a]["*"]){var e=this._listeners[a]["*"];for(d=e.length,c=0;d>c;c++)e[c].apply(this,Array.prototype.slice.call(arguments,1))}if(b instanceof Array&&b[0]&&b[0][this._primaryKey]){var f,g,h=this._listeners[a];for(d=b.length,c=0;d>c;c++)if(h[b[c][this._primaryKey]])for(f=h[b[c][this._primaryKey]].length,g=0;f>g;g++)h[b[c][this._primaryKey]][g].apply(this,Array.prototype.slice.call(arguments,1))}}return this}};b.exports=e},{"./Overload":22}],17:[function(a,b,c){"use strict";var d={_match:function(a,b,c,d){var e,f,g,h,i,j,k,l=typeof a,m=typeof b,n=!0;if(d=d||{},d.$rootQuery||(d.$rootQuery=b),"string"!==l&&"number"!==l||"string"!==m&&"number"!==m){for(k in b)if(b.hasOwnProperty(k)){if(e=!1,j=k.substr(0,2),"//"===j)continue;if(0===j.indexOf("$")&&(i=this._matchOp(k,a,b[k],d),i>-1)){if(i){if("or"===c)return!0}else n=i;e=!0}if(!e&&b[k]instanceof RegExp)if(e=!0,"object"==typeof a&&void 0!==a[k]&&b[k].test(a[k])){if("or"===c)return!0}else n=!1;if(!e)if("object"==typeof b[k])if(void 0!==a[k])if(a[k]instanceof Array&&!(b[k]instanceof Array)){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],f,d));h++);if(g){if("or"===c)return!0}else n=!1}else if(!(a[k]instanceof Array)&&b[k]instanceof Array){for(g=!1,h=0;h<b[k].length&&!(g=this._match(a[k],b[k][h],f,d));h++);if(g){if("or"===c)return!0}else n=!1}else if("object"==typeof a)if(g=this._match(a[k],b[k],f,d)){if("or"===c)return!0}else n=!1;else if(g=this._match(void 0,b[k],f,d)){if("or"===c)return!0}else n=!1;else if(b[k]&&void 0!==b[k].$exists)if(g=this._match(void 0,b[k],f,d)){if("or"===c)return!0}else n=!1;else n=!1;else if(a&&a[k]===b[k]){if("or"===c)return!0}else if(a&&a[k]&&a[k]instanceof Array&&b[k]&&"object"!=typeof b[k]){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],f,d));h++);if(g){if("or"===c)return!0}else n=!1}else n=!1;if("and"===c&&!n)return!1}}else"number"===l?a!==b&&(n=!1):a.localeCompare(b)&&(n=!1);return n},_matchOp:function(a,b,c,d){switch(a){case"$gt":return b>c;case"$gte":return b>=c;case"$lt":return c>b;case"$lte":return c>=b;case"$exists":return void 0===b!==c;case"$ne":return b!=c;case"$or":for(var e=0;e<c.length;e++)if(this._match(b,c[e],"and",d))return!0;return!1;case"$and":for(var f=0;f<c.length;f++)if(!this._match(b,c[f],"and",d))return!1;return!0;case"$in":if(c instanceof Array){var g,h=c,i=h.length;for(g=0;i>g;g++)if(h[g]===b)return!0;return!1}throw'ForerunnerDB.Mixin.Matching "'+this.name()+'": Cannot use an $in operator on a non-array key: '+a;case"$nin":if(c instanceof Array){var j,k=c,l=k.length;for(j=0;l>j;j++)if(k[j]===b)return!1;return!0}throw'ForerunnerDB.Mixin.Matching "'+this.name()+'": Cannot use a $nin operator on a non-array key: '+a;case"$distinct":d.$rootQuery["//distinctLookup"]=d.$rootQuery["//distinctLookup"]||{};for(var m in c)if(c.hasOwnProperty(m))return d.$rootQuery["//distinctLookup"][m]=d.$rootQuery["//distinctLookup"][m]||{},d.$rootQuery["//distinctLookup"][m][b[m]]?!1:(d.$rootQuery["//distinctLookup"][m][b[m]]=!0,!0)}return-1}};b.exports=d},{}],18:[function(a,b,c){"use strict";var d={sortAsc:function(a,b){return"string"==typeof a&&"string"==typeof b?a.localeCompare(b):a>b?1:b>a?-1:0},sortDesc:function(a,b){return"string"==typeof a&&"string"==typeof b?b.localeCompare(a):a>b?-1:b>a?1:0}};b.exports=d},{}],19:[function(a,b,c){"use strict";var d=a("./Overload"),e={addTrigger:function(a,b,c,d){var e,f=this;return e=f._triggerIndexOf(a,b,c),-1===e?(f._trigger=f._trigger||{},f._trigger[b]=f._trigger[b]||{},f._trigger[b][c]=f._trigger[b][c]||[],f._trigger[b][c].push({id:a,method:d,enabled:!0}),!0):!1},removeTrigger:function(a,b,c){var d,e=this;return d=e._triggerIndexOf(a,b,c),d>-1&&e._trigger[b][c].splice(d,1),!1},enableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!0,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!0,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!0,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1?(d._trigger[b][c][e].enabled=!0,!0):!1}}),disableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!1,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!1,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!1,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1?(d._trigger[b][c][e].enabled=!1,!0):!1}}),willTrigger:function(a,b){if(this._trigger&&this._trigger[a]&&this._trigger[a][b]&&this._trigger[a][b].length){var c,d=this._trigger[a][b];for(c=0;c<d.length;c++)if(d[c].enabled)return!0}return!1},processTrigger:function(a,b,c,d,e){var f,g,h,i,j,k=this;if(k._trigger&&k._trigger[b]&&k._trigger[b][c]){for(f=k._trigger[b][c],h=f.length,g=0;h>g;g++)if(i=f[g],i.enabled){if(this.debug()){var l,m;switch(b){case this.TYPE_INSERT:l="insert";break;case this.TYPE_UPDATE:l="update";break;case this.TYPE_REMOVE:l="remove";break;default:l=""}switch(c){case this.PHASE_BEFORE:m="before";break;case this.PHASE_AFTER:m="after";break;default:m=""}}if(j=i.method.call(k,a,d,e),j===!1)return!1;if(void 0!==j&&j!==!0&&j!==!1)throw"ForerunnerDB.Mixin.Triggers: Trigger error: "+j}return!0}},_triggerIndexOf:function(a,b,c){var d,e,f,g=this;if(g._trigger&&g._trigger[b]&&g._trigger[b][c])for(d=g._trigger[b][c],e=d.length,f=0;e>f;f++)if(d[f].id===a)return f;return-1}};b.exports=e},{"./Overload":22}],20:[function(a,b,c){"use strict";var d={_updateProperty:function(a,b,c){a[b]=c,this.debug()&&console.log('ForerunnerDB.Mixin.Updating: Setting non-data-bound document property "'+b+'" for "'+this.name()+'"')},_updateIncrement:function(a,b,c){a[b]+=c},_updateSpliceMove:function(a,b,c){a.splice(c,0,a.splice(b,1)[0]),this.debug()&&console.log('ForerunnerDB.Mixin.Updating: Moving non-data-bound document array index from "'+b+'" to "'+c+'" for "'+this.name()+'"')},_updateSplicePush:function(a,b,c){a.length>b?a.splice(b,0,c):a.push(c)},_updatePush:function(a,b){a.push(b)},_updatePull:function(a,b){a.splice(b,1)},_updateMultiply:function(a,b,c){a[b]*=c},_updateRename:function(a,b,c){a[c]=a[b],delete a[b]},_updateOverwrite:function(a,b,c){a[b]=c},_updateUnset:function(a,b){delete a[b]},_updateClear:function(a,b){var c,d=a[b];if(d&&"object"==typeof d)for(c in d)d.hasOwnProperty(c)&&this._updateUnset(d,c)},_updatePop:function(a,b){var c=!1;return a.length>0&&(1===b?(a.pop(),c=!0):-1===b&&(a.shift(),c=!0)),c}};b.exports=d},{}],21:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(a){this.pathSolver=new e,this.counter=0,this.init.apply(this,arguments)};f.prototype.init=function(a){this._data={operation:a,index:{potential:[],used:!1},steps:[],time:{startMs:0,stopMs:0,totalMs:0,process:{}},flag:{},log:[]}},d.addModule("Operation",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.start=function(){this._data.time.startMs=(new Date).getTime()},f.prototype.log=function(a){if(a){var b=this._log.length>0?this._data.log[this._data.log.length-1].time:0,c={event:a,time:(new Date).getTime(),delta:0};return this._data.log.push(c),b&&(c.delta=c.time-b),this}return this._data.log},f.prototype.time=function(a){if(void 0!==a){var b=this._data.time.process,c=b[a]=b[a]||{};return c.startMs?(c.stopMs=(new Date).getTime(),c.totalMs=c.stopMs-c.startMs,c.stepObj.totalMs=c.totalMs,delete c.stepObj):(c.startMs=(new Date).getTime(),c.stepObj={name:a},this._data.steps.push(c.stepObj)),this}return this._data.time},f.prototype.flag=function(a,b){return void 0===a||void 0===b?void 0!==a?this._data.flag[a]:this._data.flag:void(this._data.flag[a]=b)},f.prototype.data=function(a,b,c){return void 0!==b?(this.pathSolver.set(this._data,a,b),this):this.pathSolver.get(this._data,a)},f.prototype.pushData=function(a,b,c){this.pathSolver.push(this._data,a,b)},f.prototype.stop=function(){this._data.time.stopMs=(new Date).getTime(),this._data.time.totalMs=this._data.time.stopMs-this._data.time.startMs},d.finishModule("Operation"),b.exports=f},{"./Path":23,"./Shared":25}],22:[function(a,b,c){"use strict";var d=function(a){if(a){var b,c,d,e,f,g,h=this;if(!(a instanceof Array)){d={};for(b in a)if(a.hasOwnProperty(b))if(e=b.replace(/ /g,""),-1===e.indexOf("*"))d[e]=a[b];else for(g=this.generateSignaturePermutations(e),f=0;f<g.length;f++)d[g[f]]||(d[g[f]]=a[b]);a=d}return function(){var d,e,f=[];if(a instanceof Array){for(c=a.length,b=0;c>b;b++)if(a[b].length===arguments.length)return h.callExtend(this,"$main",a,a[b],arguments)}else{for(b=0;b<arguments.length&&(e=typeof arguments[b],"object"===e&&arguments[b]instanceof Array&&(e="array"),1!==arguments.length||"undefined"!==e);b++)f.push(e);if(d=f.join(","),a[d])return h.callExtend(this,"$main",a,a[d],arguments);for(b=f.length;b>=0;b--)if(d=f.slice(0,b).join(","),a[d+",..."])return h.callExtend(this,"$main",a,a[d+",..."],arguments)}throw'ForerunnerDB.Overload "'+this.name()+'": Overloaded method does not have a matching signature for the passed arguments: '+JSON.stringify(f)}}return function(){}};d.prototype.generateSignaturePermutations=function(a){var b,c,d=[],e=["string","object","number","function","undefined"];if(a.indexOf("*")>-1)for(c=0;c<e.length;c++)b=a.replace("*",e[c]),d=d.concat(this.generateSignaturePermutations(b));else d.push(a);return d},d.prototype.callExtend=function(a,b,c,d,e){var f,g;return a&&c[b]?(f=a[b],a[b]=c[b],g=d.apply(a,e),a[b]=f,g):d.apply(a,e)},b.exports=d},{}],23:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){a&&this.path(a)},d.addModule("Path",e),d.mixin(e.prototype,"Mixin.ChainReactor"),e.prototype.path=function(a){return void 0!==a?(this._path=this.clean(a),this._pathParts=this._path.split("."),this):this._path},e.prototype.hasObjectPaths=function(a,b){var c,d=!0;for(c in a)if(a.hasOwnProperty(c)){if(void 0===b[c])return!1;if("object"==typeof a[c]&&(d=this.hasObjectPaths(a[c],b[c]),!d))return!1}return d},e.prototype.countKeys=function(a){var b,c=0;for(b in a)a.hasOwnProperty(b)&&void 0!==a[b]&&("object"!=typeof a[b]?c++:c+=this.countKeys(a[b]));return c},e.prototype.countObjectPaths=function(a,b){var c,d,e={},f=0,g=0;for(d in b)b.hasOwnProperty(d)&&("object"==typeof b[d]?(c=this.countObjectPaths(a[d],b[d]),e[d]=c.matchedKeys,g+=c.totalKeyCount,f+=c.matchedKeyCount):(g++,a&&a[d]&&"object"!=typeof a[d]?(e[d]=!0,f++):e[d]=!1));return{matchedKeys:e, matchedKeyCount:f,totalKeyCount:g}},e.prototype.parse=function(a,b){var c,d,e,f=[],g="";for(d in a)if(a.hasOwnProperty(d))if(g=d,"object"==typeof a[d])if(b)for(c=this.parse(a[d],b),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path,value:c[e].value});else for(c=this.parse(a[d]),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path});else f.push(b?{path:g,value:a[d]}:{path:g});return f},e.prototype.parseArr=function(a,b){return b=b||{},this._parseArr(a,"",[],b)},e.prototype._parseArr=function(a,b,c,d){var e,f="";b=b||"",c=c||[];for(e in a)a.hasOwnProperty(e)&&(!d.ignore||d.ignore&&!d.ignore.test(e))&&(f=b?b+"."+e:e,"object"==typeof a[e]?this._parseArr(a[e],f,c,d):c.push(f));return c},e.prototype.value=function(a,b){if(void 0!==a&&"object"==typeof a){var c,d,e,f,g,h,i,j=[];for(void 0!==b&&(b=this.clean(b),c=b.split(".")),d=c||this._pathParts,e=d.length,f=a,h=0;e>h;h++){if(f=f[d[h]],g instanceof Array){for(i=0;i<g.length;i++)j=j.concat(this.value(g,i+"."+d[h]));return j}if(!f||"object"!=typeof f)break;g=f}return[f]}return[]},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.get=function(a,b){return this.value(a,b)[0]},e.prototype.push=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;if(b=this.clean(b),d=b.split("."),e=d.shift(),d.length)a[e]=a[e]||{},this.set(a[e],d.join("."),c);else{if(a[e]=a[e]||[],!(a[e]instanceof Array))throw"ForerunnerDB.Path: Cannot push to a path whose endpoint is not an array!";a[e].push(c)}}return a},e.prototype.keyValue=function(a,b){var c,d,e,f,g,h,i;for(void 0!==b&&(b=this.clean(b),c=b.split(".")),d=c||this._pathParts,e=d.length,f=a,i=0;e>i;i++){if(f=f[d[i]],!f||"object"!=typeof f){h=d[i]+":"+f;break}g=f}return h},e.prototype.clean=function(a){return"."===a.substr(0,1)&&(a=a.substr(1,a.length-1)),a},d.finishModule("Path"),b.exports=e},{"./Shared":25}],24:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a,b,c){if(!(a&&b&&c))throw"ForerunnerDB.ReactorIO: ReactorIO requires in, out and process arguments to instantiate!";if(this._reactorIn=a,this._reactorOut=b,this._chainHandler=c,!a.chain||!b.chainReceive)throw"ForerunnerDB.ReactorIO: ReactorIO requires passed in and out objects to implement the ChainReactor mixin!";a.chain(this),this.chain(b)};d.addModule("ReactorIO",e),e.prototype.drop=function(){return"dropped"!==this._state&&(this._state="dropped",this._reactorIn&&this._reactorIn.unChain(this),this._reactorOut&&this.unChain(this._reactorOut),delete this._reactorIn,delete this._reactorOut,delete this._chainHandler,this.emit("drop",this)),!0},d.synthesize(e.prototype,"state"),d.mixin(e.prototype,"Mixin.ChainReactor"),d.mixin(e.prototype,"Mixin.Events"),d.finishModule("ReactorIO"),b.exports=e},{"./Shared":25}],25:[function(a,b,c){"use strict";var d={version:"1.3.51",modules:{},_synth:{},addModule:function(a,b){this.modules[a]=b,this.emit("moduleLoad",[a,b])},finishModule:function(a){if(!this.modules[a])throw"ForerunnerDB.Shared: finishModule called on a module that has not been registered with addModule(): "+a;this.modules[a]._fdbFinished=!0,this.emit("moduleFinished",[a,this.modules[a]])},moduleFinished:function(a,b){this.modules[a]&&this.modules[a]._fdbFinished?b&&b(a,this.modules[a]):this.on("moduleFinished",b)},moduleExists:function(a){return Boolean(this.modules[a])},mixin:function(a,b){var c=this.mixins[b];if(!c)throw"ForerunnerDB.Shared: Cannot find mixin named: "+b;for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])},synthesize:function(a,b,c){if(this._synth[b]=this._synth[b]||function(a){return void 0!==a?(this["_"+b]=a,this):this["_"+b]},c){var d=this;a[b]=function(){var a,e=this.$super;return this.$super=d._synth[b],a=c.apply(this,arguments),this.$super=e,a}}else a[b]=this._synth[b]},overload:a("./Overload"),mixins:{"Mixin.Common":a("./Mixin.Common"),"Mixin.Events":a("./Mixin.Events"),"Mixin.ChainReactor":a("./Mixin.ChainReactor"),"Mixin.CRUD":a("./Mixin.CRUD"),"Mixin.Constants":a("./Mixin.Constants"),"Mixin.Triggers":a("./Mixin.Triggers"),"Mixin.Sorting":a("./Mixin.Sorting"),"Mixin.Matching":a("./Mixin.Matching"),"Mixin.Updating":a("./Mixin.Updating")}};d.mixin(d,"Mixin.Events"),b.exports=d},{"./Mixin.CRUD":12,"./Mixin.ChainReactor":13,"./Mixin.Common":14,"./Mixin.Constants":15,"./Mixin.Events":16,"./Mixin.Matching":17,"./Mixin.Sorting":18,"./Mixin.Triggers":19,"./Mixin.Updating":20,"./Overload":22}],26:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k;d=a("./Shared");var l=function(a,b,c){this.init.apply(this,arguments)};l.prototype.init=function(a,b,c){var d=this;this._name=a,this._listeners={},this._querySettings={},this._debug={},this.query(b,!1),this.queryOptions(c,!1),this._collectionDroppedWrap=function(){d._collectionDropped.apply(d,arguments)},this._privateData=new f("__FDB__view_privateData_"+this._name)},d.addModule("View",l),d.mixin(l.prototype,"Mixin.Common"),d.mixin(l.prototype,"Mixin.ChainReactor"),d.mixin(l.prototype,"Mixin.Constants"),d.mixin(l.prototype,"Mixin.Triggers"),f=a("./Collection"),g=a("./CollectionGroup"),k=a("./ActiveBucket"),j=a("./ReactorIO"),h=f.prototype.init,e=d.modules.Db,i=e.prototype.init,d.synthesize(l.prototype,"state"),d.synthesize(l.prototype,"name"),d.synthesize(l.prototype,"cursor"),l.prototype.insert=function(){this._from.insert.apply(this._from,arguments)},l.prototype.update=function(){this._from.update.apply(this._from,arguments)},l.prototype.updateById=function(){this._from.updateById.apply(this._from,arguments)},l.prototype.remove=function(){this._from.remove.apply(this._from,arguments)},l.prototype.find=function(a,b){return this.publicData().find(a,b)},l.prototype.data=function(){return this._privateData},l.prototype.from=function(a){var b=this;if(void 0!==a){this._from&&(this._from.off("drop",this._collectionDroppedWrap),delete this._from),"string"==typeof a&&(a=this._db.collection(a)),this._from=a,this._from.on("drop",this._collectionDroppedWrap),this._io=new j(a,this,function(a){var c,d,e,f,g,h,i;if(b._querySettings.query){if("insert"===a.type){if(c=a.data,c instanceof Array)for(f=[],i=0;i<c.length;i++)b._privateData._match(c[i],b._querySettings.query,"and",{})&&(f.push(c[i]),g=!0);else b._privateData._match(c,b._querySettings.query,"and",{})&&(f=c,g=!0);return g&&this.chainSend("insert",f),!0}if("update"===a.type){if(d=b._privateData.diff(b._from.subset(b._querySettings.query,b._querySettings.options)),d.insert.length||d.remove.length){if(d.insert.length&&this.chainSend("insert",d.insert),d.update.length)for(h=b._privateData.primaryKey(),i=0;i<d.update.length;i++)e={},e[h]=d.update[i][h],this.chainSend("update",{query:e,update:d.update[i]});if(d.remove.length){h=b._privateData.primaryKey();var j=[],k={query:{$or:j}};for(i=0;i<d.remove.length;i++)j.push({_id:d.remove[i][h]});this.chainSend("remove",k)}return!0}return!1}}return!1});var c=a.find(this._querySettings.query,this._querySettings.options);this._transformPrimaryKey(a.primaryKey()),this._transformSetData(c),this._privateData.primaryKey(a.primaryKey()),this._privateData.setData(c),this._querySettings.options&&this._querySettings.options.$orderBy?this.rebuildActiveBucket(this._querySettings.options.$orderBy):this.rebuildActiveBucket()}return this},l.prototype._collectionDropped=function(a){a&&delete this._from},l.prototype.ensureIndex=function(){return this._privateData.ensureIndex.apply(this._privateData,arguments)},l.prototype._chainHandler=function(a){var b,c,d,e,f,g,h,i,j,k;switch(a.type){case"setData":this.debug()&&console.log('ForerunnerDB.View: Setting data on view "'+this.name()+'" in underlying (internal) view collection "'+this._privateData.name()+'"');var l=this._from.find(this._querySettings.query,this._querySettings.options);this._transformSetData(l),this._privateData.setData(l);break;case"insert":if(this.debug()&&console.log('ForerunnerDB.View: Inserting some data on view "'+this.name()+'" in underlying (internal) view collection "'+this._privateData.name()+'"'),a.data=this.decouple(a.data),a.data instanceof Array||(a.data=[a.data]),this._querySettings.options&&this._querySettings.options.$orderBy)for(b=a.data,c=b.length,d=0;c>d;d++)e=this._activeBucket.insert(b[d]),this._transformInsert(a.data,e),this._privateData._insertHandle(a.data,e);else e=this._privateData._data.length,this._transformInsert(a.data,e),this._privateData._insertHandle(a.data,e);break;case"update":if(this.debug()&&console.log('ForerunnerDB.View: Updating some data on view "'+this.name()+'" in underlying (internal) view collection "'+this._privateData.name()+'"'),g=this._privateData.primaryKey(),f=this._privateData.update(a.data.query,a.data.update,a.data.options),this._querySettings.options&&this._querySettings.options.$orderBy)for(c=f.length,d=0;c>d;d++)i=f[d],this._activeBucket.remove(i),j=this._privateData._data.indexOf(i),e=this._activeBucket.insert(i),j!==e&&this._privateData._updateSpliceMove(this._privateData._data,j,e);if(this._transformEnabled&&this._transformIn)for(g=this._publicData.primaryKey(),k=0;k<f.length;k++)h={},i=f[k],h[g]=i[g],this._transformUpdate(h,i);break;case"remove":this.debug()&&console.log('ForerunnerDB.View: Removing some data on view "'+this.name()+'" in underlying (internal) view collection "'+this._privateData.name()+'"'),this._transformRemove(a.data.query,a.options),this._privateData.remove(a.data.query,a.options)}},l.prototype.on=function(){this._privateData.on.apply(this._privateData,arguments)},l.prototype.off=function(){this._privateData.off.apply(this._privateData,arguments)},l.prototype.emit=function(){this._privateData.emit.apply(this._privateData,arguments)},l.prototype.distinct=function(a,b,c){return this._privateData.distinct.apply(this._privateData,arguments)},l.prototype.primaryKey=function(){return this._privateData.primaryKey()},l.prototype.drop=function(){return"dropped"===this._state?!0:this._from?(this._from.off("drop",this._collectionDroppedWrap),this._from._removeView(this),(this.debug()||this._db&&this._db.debug())&&console.log("ForerunnerDB.View: Dropping view "+this._name),this._state="dropped",this._io&&this._io.drop(),this._privateData&&this._privateData.drop(),this._db&&this._name&&delete this._db._view[this._name],this.emit("drop",this),delete this._chain,delete this._from,delete this._privateData,delete this._io,delete this._listeners,delete this._querySettings,delete this._db,!0):!1},l.prototype.db=function(a){return void 0!==a?(this._db=a,this.privateData().db(a),this.publicData().db(a),this):this._db},l.prototype.queryData=function(a,b,c){return void 0!==a&&(this._querySettings.query=a),void 0!==b&&(this._querySettings.options=b),void 0!==a||void 0!==b?((void 0===c||c===!0)&&this.refresh(),this):this._querySettings},l.prototype.queryAdd=function(a,b,c){this._querySettings.query=this._querySettings.query||{};var d,e=this._querySettings.query;if(void 0!==a)for(d in a)a.hasOwnProperty(d)&&(void 0===e[d]||void 0!==e[d]&&b!==!1)&&(e[d]=a[d]);(void 0===c||c===!0)&&this.refresh()},l.prototype.queryRemove=function(a,b){var c,d=this._querySettings.query;if(void 0!==a)for(c in a)a.hasOwnProperty(c)&&delete d[c];(void 0===b||b===!0)&&this.refresh()},l.prototype.query=function(a,b){return void 0!==a?(this._querySettings.query=a,(void 0===b||b===!0)&&this.refresh(),this):this._querySettings.query},l.prototype.orderBy=function(a){if(void 0!==a){var b=this.queryOptions()||{};return b.$orderBy=a,this.queryOptions(b),this}return(this.queryOptions()||{}).$orderBy},l.prototype.page=function(a){if(void 0!==a){var b=this.queryOptions()||{};return a!==b.$page&&(b.$page=a,this.queryOptions(b)),this}return(this.queryOptions()||{}).$page},l.prototype.pageFirst=function(){return this.page(0)},l.prototype.pageLast=function(){var a=this.cursor().pages,b=void 0!==a?a:0;return this.page(b-1)},l.prototype.pageScan=function(a){if(void 0!==a){var b=this.cursor().pages,c=this.queryOptions()||{},d=void 0!==c.$page?c.$page:0;return d+=a,0>d&&(d=0),d>=b&&(d=b-1),this.page(d)}},l.prototype.queryOptions=function(a,b){return void 0!==a?(this._querySettings.options=a,void 0===a.$decouple&&(a.$decouple=!0),void 0===b||b===!0?this.refresh():this.rebuildActiveBucket(a.$orderBy),this):this._querySettings.options},l.prototype.rebuildActiveBucket=function(a){if(a){var b=this._privateData._data,c=b.length;this._activeBucket=new k(a),this._activeBucket.primaryKey(this._privateData.primaryKey());for(var d=0;c>d;d++)this._activeBucket.insert(b[d])}else delete this._activeBucket},l.prototype.refresh=function(){if(this._from){var a,b=this.publicData();this._privateData.remove(),b.remove(),a=this._from.find(this._querySettings.query,this._querySettings.options),this.cursor(a.$cursor),this._privateData.insert(a),this._privateData._data.$cursor=a.$cursor,b._data.$cursor=a.$cursor}return this._querySettings.options&&this._querySettings.options.$orderBy?this.rebuildActiveBucket(this._querySettings.options.$orderBy):this.rebuildActiveBucket(),this},l.prototype.count=function(){return this._privateData&&this._privateData._data?this._privateData._data.length:0},l.prototype.subset=function(){return this.publicData().subset.apply(this._privateData,arguments)},l.prototype.transform=function(a){return void 0!==a?("object"==typeof a?(void 0!==a.enabled&&(this._transformEnabled=a.enabled),void 0!==a.dataIn&&(this._transformIn=a.dataIn),void 0!==a.dataOut&&(this._transformOut=a.dataOut)):this._transformEnabled=a!==!1,this._transformPrimaryKey(this.privateData().primaryKey()),this._transformSetData(this.privateData().find()),this):{enabled:this._transformEnabled,dataIn:this._transformIn,dataOut:this._transformOut}},l.prototype.filter=function(a,b,c){return this.publicData().filter(a,b,c)},l.prototype.privateData=function(){return this._privateData},l.prototype.publicData=function(){return this._transformEnabled?this._publicData:this._privateData},l.prototype._transformSetData=function(a){this._transformEnabled&&(this._publicData=new f("__FDB__view_publicData_"+this._name),this._publicData.db(this._privateData._db),this._publicData.transform({enabled:!0,dataIn:this._transformIn,dataOut:this._transformOut}),this._publicData.setData(a))},l.prototype._transformInsert=function(a,b){this._transformEnabled&&this._publicData&&this._publicData.insert(a,b)},l.prototype._transformUpdate=function(a,b,c){this._transformEnabled&&this._publicData&&this._publicData.update(a,b,c)},l.prototype._transformRemove=function(a,b){this._transformEnabled&&this._publicData&&this._publicData.remove(a,b)},l.prototype._transformPrimaryKey=function(a){this._transformEnabled&&this._publicData&&this._publicData.primaryKey(a)},f.prototype.init=function(){this._view=[],h.apply(this,arguments)},f.prototype.view=function(a,b,c){if(this._db&&this._db._view){if(this._db._view[a])throw'ForerunnerDB.Collection "'+this.name()+'": Cannot create a view using this collection because a view with this name already exists: '+a;var d=new l(a,b,c).db(this._db).from(this);return this._view=this._view||[],this._view.push(d),d}},f.prototype._addView=g.prototype._addView=function(a){return void 0!==a&&this._view.push(a),this},f.prototype._removeView=g.prototype._removeView=function(a){if(void 0!==a){var b=this._view.indexOf(a);b>-1&&this._view.splice(b,1)}return this},e.prototype.init=function(){this._view={},i.apply(this,arguments)},e.prototype.view=function(a){return this._view[a]||(this.debug()||this._db&&this._db.debug())&&console.log("Db.View: Creating view "+a),this._view[a]=this._view[a]||new l(a).db(this),this._view[a]},e.prototype.viewExists=function(a){return Boolean(this._view[a])},e.prototype.views=function(){var a,b=[];for(a in this._view)this._view.hasOwnProperty(a)&&b.push({name:a,count:this._view[a].count()});return b},d.finishModule("View"),b.exports=l},{"./ActiveBucket":2,"./Collection":3,"./CollectionGroup":4,"./ReactorIO":24,"./Shared":25}]},{},[1]);
app/javascript/mastodon/features/ui/components/tabs_bar.js
3846masa/mastodon
import React from 'react'; import Link from 'react-router/lib/Link'; import { FormattedMessage } from 'react-intl'; class TabsBar extends React.Component { render () { return ( <div className='tabs-bar'> <Link className='tabs-bar__link primary' activeClassName='active' to='/statuses/new'><i className='fa fa-fw fa-pencil' /><FormattedMessage id='tabs_bar.compose' defaultMessage='Compose' /></Link> <Link className='tabs-bar__link primary' activeClassName='active' to='/timelines/home'><i className='fa fa-fw fa-home' /><FormattedMessage id='tabs_bar.home' defaultMessage='Home' /></Link> <Link className='tabs-bar__link primary' activeClassName='active' to='/notifications'><i className='fa fa-fw fa-bell' /><FormattedMessage id='tabs_bar.notifications' defaultMessage='Notifications' /></Link> <Link className='tabs-bar__link secondary' activeClassName='active' to='/timelines/public/local'><i className='fa fa-fw fa-users' /><FormattedMessage id='tabs_bar.local_timeline' defaultMessage='Local' /></Link> <Link className='tabs-bar__link secondary' activeClassName='active' to='/timelines/public'><i className='fa fa-fw fa-globe' /><FormattedMessage id='tabs_bar.federated_timeline' defaultMessage='Federated' /></Link> <Link className='tabs-bar__link primary' activeClassName='active' style={{ flexGrow: '0', flexBasis: '30px' }} to='/getting-started'><i className='fa fa-fw fa-asterisk' /></Link> </div> ); } } export default TabsBar;
src/app.js
jamjar919/bork
import 'bootstrap'; import React from 'react'; import { render } from 'react-dom'; import Root from 'Containers/root'; render(<Root />, document.getElementById('root'));
test/specs/views/Comment/CommentAction-test.js
ben174/Semantic-UI-React
import React from 'react' import * as common from 'test/specs/commonTests' import CommentAction from 'src/views/Comment/CommentAction' describe('CommentAction', () => { common.isConformant(CommentAction) common.rendersChildren(CommentAction) it('renders an a element by default', () => { shallow(<CommentAction />) .should.have.tagName('a') }) })
src/molecules/archive/pagination/stories.js
dsmjs/components
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import React from 'react'; import storyRouter from 'storybook-router'; import {linkTo} from '@storybook/addon-links'; import Pagination from '.'; export default { title: 'Molecules/Archive/Pagination', decorators: [ storyRouter({ '/archive': linkTo('Molecules/Archive/Pagination', 'default'), '/archive/page-2': linkTo('Molecules/Archive/Pagination', 'page-2') }) ] }; export const Default = () => <Pagination totalPages={20} currentPage={1} />; Default.story = { name: 'default' }; export const Page2 = () => <Pagination totalPages={20} currentPage={2} />; Page2.story = { name: 'page-2' };
.public/site.bundle.js
Xmerr/PortfolioSite
!function(e){var A={};function t(n){if(A[n])return A[n].exports;var r=A[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=e,t.c=A,t.d=function(e,A,n){t.o(e,A)||Object.defineProperty(e,A,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,A){if(1&A&&(e=t(e)),8&A)return e;if(4&A&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&A&&"string"!=typeof e)for(var r in e)t.d(n,r,function(A){return e[A]}.bind(null,r));return n},t.n=function(e){var A=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(A,"a",A),A},t.o=function(e,A){return Object.prototype.hasOwnProperty.call(e,A)},t.p="",t(t.s=30)}([function(e,A,t){"use strict";e.exports=t(31)},function(e,A,t){e.exports=t(44)()},function(e,A,t){"use strict";function n(){return(n=Object.assign||function(e){for(var A=1;A<arguments.length;A++){var t=arguments[A];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}t.d(A,"a",function(){return n})},function(e,A,t){"use strict";var n=!0,r="Invariant failed";A.a=function(e,A){if(!e)throw n?new Error(r):new Error(r+": "+(A||""))}},function(e,A,t){"use strict";function n(e,A){e.prototype=Object.create(A.prototype),e.prototype.constructor=e,e.__proto__=A}t.d(A,"a",function(){return n})},function(e,A,t){"use strict";var n=t(2);function r(e){return"/"===e.charAt(0)}function o(e,A){for(var t=A,n=t+1,r=e.length;n<r;t+=1,n+=1)e[t]=e[n];e.pop()}var i=function(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=e&&e.split("/")||[],n=A&&A.split("/")||[],i=e&&r(e),c=A&&r(A),a=i||c;if(e&&r(e)?n=t:t.length&&(n.pop(),n=n.concat(t)),!n.length)return"/";var l=void 0;if(n.length){var u=n[n.length-1];l="."===u||".."===u||""===u}else l=!1;for(var s=0,g=n.length;g>=0;g--){var B=n[g];"."===B?o(n,g):".."===B?(o(n,g),s++):s&&(o(n,g),s--)}if(!a)for(;s--;s)n.unshift("..");!a||""===n[0]||n[0]&&r(n[0])||n.unshift("");var f=n.join("/");return l&&"/"!==f.substr(-1)&&(f+="/"),f},c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var a=function e(A,t){if(A===t)return!0;if(null==A||null==t)return!1;if(Array.isArray(A))return Array.isArray(t)&&A.length===t.length&&A.every(function(A,n){return e(A,t[n])});var n=void 0===A?"undefined":c(A);if(n!==(void 0===t?"undefined":c(t)))return!1;if("object"===n){var r=A.valueOf(),o=t.valueOf();if(r!==A||o!==t)return e(r,o);var i=Object.keys(A),a=Object.keys(t);return i.length===a.length&&i.every(function(n){return e(A[n],t[n])})}return!1},l=t(3);function u(e){return"/"===e.charAt(0)?e:"/"+e}function s(e){return"/"===e.charAt(0)?e.substr(1):e}function g(e,A){return function(e,A){return new RegExp("^"+A+"(\\/|\\?|#|$)","i").test(e)}(e,A)?e.substr(A.length):e}function B(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var A=e.pathname,t=e.search,n=e.hash,r=A||"/";return t&&"?"!==t&&(r+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(r+="#"===n.charAt(0)?n:"#"+n),r}function E(e,A,t,r){var o;"string"==typeof e?(o=function(e){var A=e||"/",t="",n="",r=A.indexOf("#");-1!==r&&(n=A.substr(r),A=A.substr(0,r));var o=A.indexOf("?");return-1!==o&&(t=A.substr(o),A=A.substr(0,o)),{pathname:A,search:"?"===t?"":t,hash:"#"===n?"":n}}(e)).state=A:(void 0===(o=Object(n.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==A&&void 0===o.state&&(o.state=A));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return t&&(o.key=t),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function w(e,A){return e.pathname===A.pathname&&e.search===A.search&&e.hash===A.hash&&e.key===A.key&&a(e.state,A.state)}function Q(){var e=null;var A=[];return{setPrompt:function(A){return e=A,function(){e===A&&(e=null)}},confirmTransitionTo:function(A,t,n,r){if(null!=e){var o="function"==typeof e?e(A,t):e;"string"==typeof o?"function"==typeof n?n(o,r):r(!0):r(!1!==o)}else r(!0)},appendListener:function(e){var t=!0;function n(){t&&e.apply(void 0,arguments)}return A.push(n),function(){t=!1,A=A.filter(function(e){return e!==n})}},notifyListeners:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.forEach(function(e){return e.apply(void 0,t)})}}}t.d(A,"a",function(){return Y}),t.d(A,"b",function(){return D}),t.d(A,"d",function(){return M}),t.d(A,"c",function(){return E}),t.d(A,"f",function(){return w}),t.d(A,"e",function(){return f});var p=!("undefined"==typeof window||!window.document||!window.document.createElement);function d(e,A){A(window.confirm(e))}var h="popstate",C="hashchange";function F(){try{return window.history.state||{}}catch(e){return{}}}function Y(e){void 0===e&&(e={}),p||Object(l.a)(!1);var A,t=window.history,r=(-1===(A=window.navigator.userAgent).indexOf("Android 2.")&&-1===A.indexOf("Android 4.0")||-1===A.indexOf("Mobile Safari")||-1!==A.indexOf("Chrome")||-1!==A.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,c=i.forceRefresh,a=void 0!==c&&c,s=i.getUserConfirmation,w=void 0===s?d:s,Y=i.keyLength,y=void 0===Y?6:Y,m=e.basename?B(u(e.basename)):"";function I(e){var A=e||{},t=A.key,n=A.state,r=window.location,o=r.pathname+r.search+r.hash;return m&&(o=g(o,m)),E(o,n,t)}function v(){return Math.random().toString(36).substr(2,y)}var D=Q();function x(e){Object(n.a)(P,e),P.length=t.length,D.notifyListeners(P.location,P.action)}function M(e){(function(e){void 0===e.state&&navigator.userAgent.indexOf("CriOS")})(e)||U(I(e.state))}function N(){U(I(F()))}var b=!1;function U(e){if(b)b=!1,x();else{D.confirmTransitionTo(e,"POP",w,function(A){A?x({action:"POP",location:e}):function(e){var A=P.location,t=k.indexOf(A.key);-1===t&&(t=0);var n=k.indexOf(e.key);-1===n&&(n=0);var r=t-n;r&&(b=!0,R(r))}(e)})}}var H=I(F()),k=[H.key];function T(e){return m+f(e)}function R(e){t.go(e)}var J=0;function G(e){1===(J+=e)&&1===e?(window.addEventListener(h,M),o&&window.addEventListener(C,N)):0===J&&(window.removeEventListener(h,M),o&&window.removeEventListener(C,N))}var L=!1;var P={length:t.length,action:"POP",location:H,createHref:T,push:function(e,A){var n=E(e,A,v(),P.location);D.confirmTransitionTo(n,"PUSH",w,function(e){if(e){var A=T(n),o=n.key,i=n.state;if(r)if(t.pushState({key:o,state:i},null,A),a)window.location.href=A;else{var c=k.indexOf(P.location.key),l=k.slice(0,-1===c?0:c+1);l.push(n.key),k=l,x({action:"PUSH",location:n})}else window.location.href=A}})},replace:function(e,A){var n=E(e,A,v(),P.location);D.confirmTransitionTo(n,"REPLACE",w,function(e){if(e){var A=T(n),o=n.key,i=n.state;if(r)if(t.replaceState({key:o,state:i},null,A),a)window.location.replace(A);else{var c=k.indexOf(P.location.key);-1!==c&&(k[c]=n.key),x({action:"REPLACE",location:n})}else window.location.replace(A)}})},go:R,goBack:function(){R(-1)},goForward:function(){R(1)},block:function(e){void 0===e&&(e=!1);var A=D.setPrompt(e);return L||(G(1),L=!0),function(){return L&&(L=!1,G(-1)),A()}},listen:function(e){var A=D.appendListener(e);return G(1),function(){G(-1),A()}}};return P}var y="hashchange",m={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+s(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:s,decodePath:u},slash:{encodePath:u,decodePath:u}};function I(){var e=window.location.href,A=e.indexOf("#");return-1===A?"":e.substring(A+1)}function v(e){var A=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,A>=0?A:0)+"#"+e)}function D(e){void 0===e&&(e={}),p||Object(l.a)(!1);var A=window.history,t=(window.navigator.userAgent.indexOf("Firefox"),e),r=t.getUserConfirmation,o=void 0===r?d:r,i=t.hashType,c=void 0===i?"slash":i,a=e.basename?B(u(e.basename)):"",s=m[c],h=s.encodePath,C=s.decodePath;function F(){var e=C(I());return a&&(e=g(e,a)),E(e)}var Y=Q();function D(e){Object(n.a)(L,e),L.length=A.length,Y.notifyListeners(L.location,L.action)}var x=!1,M=null;function N(){var e=I(),A=h(e);if(e!==A)v(A);else{var t=F(),n=L.location;if(!x&&w(n,t))return;if(M===f(t))return;M=null,function(e){if(x)x=!1,D();else{Y.confirmTransitionTo(e,"POP",o,function(A){A?D({action:"POP",location:e}):function(e){var A=L.location,t=k.lastIndexOf(f(A));-1===t&&(t=0);var n=k.lastIndexOf(f(e));-1===n&&(n=0);var r=t-n;r&&(x=!0,T(r))}(e)})}}(t)}}var b=I(),U=h(b);b!==U&&v(U);var H=F(),k=[f(H)];function T(e){A.go(e)}var R=0;function J(e){1===(R+=e)&&1===e?window.addEventListener(y,N):0===R&&window.removeEventListener(y,N)}var G=!1;var L={length:A.length,action:"POP",location:H,createHref:function(e){return"#"+h(a+f(e))},push:function(e,A){var t=E(e,void 0,void 0,L.location);Y.confirmTransitionTo(t,"PUSH",o,function(e){if(e){var A=f(t),n=h(a+A);if(I()!==n){M=A,function(e){window.location.hash=e}(n);var r=k.lastIndexOf(f(L.location)),o=k.slice(0,-1===r?0:r+1);o.push(A),k=o,D({action:"PUSH",location:t})}else D()}})},replace:function(e,A){var t=E(e,void 0,void 0,L.location);Y.confirmTransitionTo(t,"REPLACE",o,function(e){if(e){var A=f(t),n=h(a+A);I()!==n&&(M=A,v(n));var r=k.indexOf(f(L.location));-1!==r&&(k[r]=A),D({action:"REPLACE",location:t})}})},go:T,goBack:function(){T(-1)},goForward:function(){T(1)},block:function(e){void 0===e&&(e=!1);var A=Y.setPrompt(e);return G||(J(1),G=!0),function(){return G&&(G=!1,J(-1)),A()}},listen:function(e){var A=Y.appendListener(e);return J(1),function(){J(-1),A()}}};return L}function x(e,A,t){return Math.min(Math.max(e,A),t)}function M(e){void 0===e&&(e={});var A=e,t=A.getUserConfirmation,r=A.initialEntries,o=void 0===r?["/"]:r,i=A.initialIndex,c=void 0===i?0:i,a=A.keyLength,l=void 0===a?6:a,u=Q();function s(e){Object(n.a)(h,e),h.length=h.entries.length,u.notifyListeners(h.location,h.action)}function g(){return Math.random().toString(36).substr(2,l)}var B=x(c,0,o.length-1),w=o.map(function(e){return E(e,void 0,"string"==typeof e?g():e.key||g())}),p=f;function d(e){var A=x(h.index+e,0,h.entries.length-1),n=h.entries[A];u.confirmTransitionTo(n,"POP",t,function(e){e?s({action:"POP",location:n,index:A}):s()})}var h={length:w.length,action:"POP",location:w[B],index:B,entries:w,createHref:p,push:function(e,A){var n=E(e,A,g(),h.location);u.confirmTransitionTo(n,"PUSH",t,function(e){if(e){var A=h.index+1,t=h.entries.slice(0);t.length>A?t.splice(A,t.length-A,n):t.push(n),s({action:"PUSH",location:n,index:A,entries:t})}})},replace:function(e,A){var n=E(e,A,g(),h.location);u.confirmTransitionTo(n,"REPLACE",t,function(e){e&&(h.entries[h.index]=n,s({action:"REPLACE",location:n}))})},go:d,goBack:function(){d(-1)},goForward:function(){d(1)},canGo:function(e){var A=h.index+e;return A>=0&&A<h.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return h}},function(e,A,t){"use strict";t.d(A,"a",function(){return h}),t.d(A,"b",function(){return E}),t.d(A,"c",function(){return I}),t.d(A,"e",function(){return d}),t.d(A,"d",function(){return f});var n=t(21),r=t.n(n),o=t(4),i=t(0),c=t.n(i),a=(t(1),t(5)),l=t(3),u=t(13),s=t.n(u),g=t(2),B=(t(18),t(10)),f=(t(22),function(e){var A=r()();return A.Provider.displayName=e+".Provider",A.Consumer.displayName=e+".Consumer",A}("Router")),E=function(e){function A(A){var t;return(t=e.call(this,A)||this).state={location:A.history.location},t._isMounted=!1,t._pendingLocation=null,A.staticContext||(t.unlisten=A.history.listen(function(e){t._isMounted?t.setState({location:e}):t._pendingLocation=e})),t}Object(o.a)(A,e),A.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var t=A.prototype;return t.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},t.componentWillUnmount=function(){this.unlisten&&this.unlisten()},t.render=function(){return c.a.createElement(f.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:A.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},A}(c.a.Component);c.a.Component;c.a.Component;var w={},Q=1e4,p=0;function d(e,A){void 0===A&&(A={}),"string"==typeof A&&(A={path:A});var t=A,n=t.path,r=t.exact,o=void 0!==r&&r,i=t.strict,c=void 0!==i&&i,a=t.sensitive,l=void 0!==a&&a;return[].concat(n).reduce(function(A,t){if(A)return A;var n=function(e,A){var t=""+A.end+A.strict+A.sensitive,n=w[t]||(w[t]={});if(n[e])return n[e];var r=[],o={regexp:s()(e,r,A),keys:r};return p<Q&&(n[e]=o,p++),o}(t,{end:o,strict:c,sensitive:l}),r=n.regexp,i=n.keys,a=r.exec(e);if(!a)return null;var u=a[0],g=a.slice(1),B=e===u;return o&&!B?null:{path:t,url:"/"===t&&""===u?"/":u,isExact:B,params:i.reduce(function(e,A,t){return e[A.name]=g[t],e},{})}},null)}var h=function(e){function A(){return e.apply(this,arguments)||this}return Object(o.a)(A,e),A.prototype.render=function(){var e=this;return c.a.createElement(f.Consumer,null,function(A){A||Object(l.a)(!1);var t=e.props.location||A.location,n=e.props.computedMatch?e.props.computedMatch:e.props.path?d(t.pathname,e.props):A.match,r=Object(g.a)({},A,{location:t,match:n}),o=e.props,i=o.children,a=o.component,u=o.render;(Array.isArray(i)&&0===i.length&&(i=null),"function"==typeof i)&&(void 0===(i=i(r))&&(i=null));return c.a.createElement(f.Provider,{value:r},i&&!function(e){return 0===c.a.Children.count(e)}(i)?i:r.match?a?c.a.createElement(a,r):u?u(r):null:null)})},A}(c.a.Component);function C(e){return"/"===e.charAt(0)?e:"/"+e}function F(e,A){if(!e)return A;var t=C(e);return 0!==A.pathname.indexOf(t)?A:Object(g.a)({},A,{pathname:A.pathname.substr(t.length)})}function Y(e){return"string"==typeof e?e:Object(a.e)(e)}function y(e){return function(){Object(l.a)(!1)}}function m(){}c.a.Component;var I=function(e){function A(){return e.apply(this,arguments)||this}return Object(o.a)(A,e),A.prototype.render=function(){var e=this;return c.a.createElement(f.Consumer,null,function(A){A||Object(l.a)(!1);var t,n,r=e.props.location||A.location;return c.a.Children.forEach(e.props.children,function(e){if(null==n&&c.a.isValidElement(e)){t=e;var o=e.props.path||e.props.from;n=o?d(r.pathname,Object(g.a)({},e.props,{path:o})):A.match}}),n?c.a.cloneElement(t,{location:r,computedMatch:n}):null})},A}(c.a.Component)},function(e,A,t){"use strict";t.d(A,"a",function(){return s}),t.d(A,"b",function(){return B});var n=t(4),r=t(0),o=t.n(r),i=t(6),c=t(5),a=(t(1),t(2)),l=t(10),u=t(3),s=function(e){function A(){for(var A,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(A=e.call.apply(e,[this].concat(n))||this).history=Object(c.a)(A.props),A}return Object(n.a)(A,e),A.prototype.render=function(){return o.a.createElement(i.b,{history:this.history,children:this.props.children})},A}(o.a.Component);o.a.Component;var g=function(e){function A(){return e.apply(this,arguments)||this}Object(n.a)(A,e);var t=A.prototype;return t.handleClick=function(e,A){(this.props.onClick&&this.props.onClick(e),e.defaultPrevented||0!==e.button||this.props.target&&"_self"!==this.props.target||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))||(e.preventDefault(),(this.props.replace?A.replace:A.push)(this.props.to))},t.render=function(){var e=this,A=this.props,t=A.innerRef,n=(A.replace,A.to),r=Object(l.a)(A,["innerRef","replace","to"]);return o.a.createElement(i.d.Consumer,null,function(A){A||Object(u.a)(!1);var i="string"==typeof n?Object(c.c)(n,null,null,A.location):n,l=i?A.history.createHref(i):"";return o.a.createElement("a",Object(a.a)({},r,{onClick:function(t){return e.handleClick(t,A.history)},href:l,ref:t}))})},A}(o.a.Component);function B(e){var A=e["aria-current"],t=void 0===A?"page":A,n=e.activeClassName,r=void 0===n?"active":n,c=e.activeStyle,u=e.className,s=e.exact,B=e.isActive,f=e.location,E=e.strict,w=e.style,Q=e.to,p=Object(l.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","strict","style","to"]),d="object"==typeof Q?Q.pathname:Q,h=d&&d.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1");return o.a.createElement(i.a,{path:h,exact:s,strict:E,location:f,children:function(e){var A=e.location,n=e.match,i=!!(B?B(n,A):n),l=i?function(){for(var e=arguments.length,A=new Array(e),t=0;t<e;t++)A[t]=arguments[t];return A.filter(function(e){return e}).join(" ")}(u,r):u,s=i?Object(a.a)({},w,c):w;return o.a.createElement(g,Object(a.a)({"aria-current":i&&t||null,className:l,style:s,to:Q},p))}})}},function(e,A,t){"use strict";e.exports=function(e){var A=[];return A.toString=function(){return this.map(function(A){var t=function(e,A){var t=e[1]||"",n=e[3];if(!n)return t;if(A&&"function"==typeof btoa){var r=(i=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),o=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[t].concat(o).concat([r]).join("\n")}var i;return[t].join("\n")}(A,e);return A[2]?"@media "+A[2]+"{"+t+"}":t}).join("")},A.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var o=this[r][0];null!=o&&(n[o]=!0)}for(r=0;r<e.length;r++){var i=e[r];null!=i[0]&&n[i[0]]||(t&&!i[2]?i[2]=t:t&&(i[2]="("+i[2]+") and ("+t+")"),A.push(i))}},A}},function(e,A,t){var n,r,o={},i=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),c=function(e){var A={};return function(e,t){if("function"==typeof e)return e();if(void 0===A[e]){var n=function(e,A){return A?A.querySelector(e):document.querySelector(e)}.call(this,e,t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}A[e]=n}return A[e]}}(),a=null,l=0,u=[],s=t(55);function g(e,A){for(var t=0;t<e.length;t++){var n=e[t],r=o[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(p(n.parts[i],A))}else{var c=[];for(i=0;i<n.parts.length;i++)c.push(p(n.parts[i],A));o[n.id]={id:n.id,refs:1,parts:c}}}}function B(e,A){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],i=A.base?o[0]+A.base:o[0],c={css:o[1],media:o[2],sourceMap:o[3]};n[i]?n[i].parts.push(c):t.push(n[i]={id:i,parts:[c]})}return t}function f(e,A){var t=c(e.insertInto);if(!t)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=u[u.length-1];if("top"===e.insertAt)n?n.nextSibling?t.insertBefore(A,n.nextSibling):t.appendChild(A):t.insertBefore(A,t.firstChild),u.push(A);else if("bottom"===e.insertAt)t.appendChild(A);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(e.insertAt.before,t);t.insertBefore(A,r)}}function E(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var A=u.indexOf(e);A>=0&&u.splice(A,1)}function w(e){var A=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return t.nc}();n&&(e.attrs.nonce=n)}return Q(A,e.attrs),f(e,A),A}function Q(e,A){Object.keys(A).forEach(function(t){e.setAttribute(t,A[t])})}function p(e,A){var t,n,r,o;if(A.transform&&e.css){if(!(o="function"==typeof A.transform?A.transform(e.css):A.transform.default(e.css)))return function(){};e.css=o}if(A.singleton){var i=l++;t=a||(a=w(A)),n=C.bind(null,t,i,!1),r=C.bind(null,t,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=function(e){var A=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",Q(A,e.attrs),f(e,A),A}(A),n=function(e,A,t){var n=t.css,r=t.sourceMap,o=void 0===A.convertToAbsoluteUrls&&r;(A.convertToAbsoluteUrls||o)&&(n=s(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(i),c&&URL.revokeObjectURL(c)}.bind(null,t,A),r=function(){E(t),t.href&&URL.revokeObjectURL(t.href)}):(t=w(A),n=function(e,A){var t=A.css,n=A.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}.bind(null,t),r=function(){E(t)});return n(e),function(A){if(A){if(A.css===e.css&&A.media===e.media&&A.sourceMap===e.sourceMap)return;n(e=A)}else r()}}e.exports=function(e,A){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(A=A||{}).attrs="object"==typeof A.attrs?A.attrs:{},A.singleton||"boolean"==typeof A.singleton||(A.singleton=i()),A.insertInto||(A.insertInto="head"),A.insertAt||(A.insertAt="bottom");var t=B(e,A);return g(t,A),function(e){for(var n=[],r=0;r<t.length;r++){var i=t[r];(c=o[i.id]).refs--,n.push(c)}e&&g(B(e,A),A);for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var a=0;a<c.parts.length;a++)c.parts[a]();delete o[c.id]}}}};var d,h=(d=[],function(e,A){return d[e]=A,d.filter(Boolean).join("\n")});function C(e,A,t,n){var r=t?"":n.css;if(e.styleSheet)e.styleSheet.cssText=h(A,r);else{var o=document.createTextNode(r),i=e.childNodes;i[A]&&e.removeChild(i[A]),i.length?e.insertBefore(o,i[A]):e.appendChild(o)}}},function(e,A,t){"use strict";function n(e,A){if(null==e)return{};var t,n,r={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],A.indexOf(t)>=0||(r[t]=e[t]);return r}t.d(A,"a",function(){return n})},function(e,A){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,A,t){"use strict";(function(e){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,A){return!A||"object"!==n(A)&&"function"!=typeof A?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):A}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,A){return(c=Object.setPrototypeOf||function(e,A){return e.__proto__=A,e})(e,A)}t(53);var a="#f2c6af",l=200,u=300,s=250,g={color:"#442001",left:1.37*Math.PI,right:.55*Math.PI,curl:.95*Math.PI},B={radius:50,left:{x:u-.4*l,y:s-.05*l},right:{x:u+.4*l,y:s-.05*l}},f={radius:15,x:u,y:1.15*s},E={x:u,y:s+.5*l,radius:150};E.y=E.y-E.radius/2,g.left={x:l*Math.sin(g.left)+u,y:l*Math.cos(g.left)+s},g.right={x:l*Math.sin(g.right)+u,y:l*Math.cos(g.right)+s},g.curl={x1:l*Math.sin(g.curl)+u,y1:l*Math.cos(g.curl)+s,x2:l*Math.sin(g.curl)+(u-30),y2:l*Math.cos(g.curl)+(s-15)};var w=function(A){function t(){return function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,t),o(this,i(t).apply(this,arguments))}var n,w,Q;return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),A&&c(e,A)}(t,e.Component),n=t,(w=[{key:"render",value:function(){return e.createElement("div",{className:"Avatar"},e.createElement("svg",{className:"me",viewBox:"0 0 600 600",preserveAspectRatio:"xMidYMid meet",style:this.props.style},e.createElement("circle",{cx:"300",cy:"300",fill:"white",r:"300"}),e.createElement("g",null,e.createElement("ellipse",{cx:u,cy:s+2*l,fill:"#43a48a",rx:225,ry:230}),e.createElement("circle",{cx:u,cy:s+l,r:l/3,fill:a,stroke:"darkgray",strokeWidth:"10"})),e.createElement("g",null,e.createElement("ellipse",{cx:"300",cy:"270",rx:"220",ry:"100",strokeWidth:"30",stroke:a,fill:"#333"}),e.createElement("circle",{cx:u,cy:s,r:l,fill:a}),e.createElement("circle",{cx:E.x,cy:E.y,r:E.radius,fill:"black"}),e.createElement("ellipse",{cx:E.x,cy:.985*E.y,rx:1.05*E.radius,ry:E.radius,fill:a}),e.createElement("circle",{cx:B.left.x,cy:B.left.y,r:B.radius,fill:"black"}),e.createElement("circle",{cx:B.left.x,cy:1.1*B.left.y,r:1.2*B.radius,fill:a}),e.createElement("circle",{cx:B.right.x,cy:B.right.y,r:B.radius,fill:"black"}),e.createElement("circle",{cx:B.right.x,cy:1.1*B.right.y,r:1.2*B.radius,fill:a}),e.createElement("circle",{cx:g.curl.x1,cy:g.curl.y1,r:"30",fill:g.color}),e.createElement("circle",{cx:g.curl.x2,cy:g.curl.y2,r:"45",fill:"white"}),e.createElement("path",{d:"\n M ".concat(g.left.x,",").concat(g.left.y," \n A 200 200 0 0 1 ").concat(g.right.x," ").concat(g.right.y," \n Z\n "),fill:g.color}),e.createElement("circle",{cx:f.x,cy:f.y,r:f.radius,fill:"black"}),e.createElement("circle",{cx:f.x,cy:1.02*f.y,r:f.radius,fill:a}),e.createElement("circle",{cx:f.x-.5*f.radius,cy:f.y,r:f.radius/10,fill:"#333"}),e.createElement("circle",{cx:f.x+.5*f.radius,cy:f.y,r:f.radius/10,fill:"#333"}))))}}])&&r(n.prototype,w),Q&&r(n,Q),t}();w.propTypes={},A.a=w}).call(this,t(0))},function(e,A,t){var n=t(51);e.exports=B,e.exports.parse=o,e.exports.compile=function(e,A){return c(o(e,A))},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=g;var r=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,A){for(var t,n=[],o=0,i=0,c="",u=A&&A.delimiter||"/";null!=(t=r.exec(e));){var s=t[0],g=t[1],B=t.index;if(c+=e.slice(i,B),i=B+s.length,g)c+=g[1];else{var f=e[i],E=t[2],w=t[3],Q=t[4],p=t[5],d=t[6],h=t[7];c&&(n.push(c),c="");var C=null!=E&&null!=f&&f!==E,F="+"===d||"*"===d,Y="?"===d||"*"===d,y=t[2]||u,m=Q||p;n.push({name:w||o++,prefix:E||"",delimiter:y,optional:Y,repeat:F,partial:C,asterisk:!!h,pattern:m?l(m):h?".*":"[^"+a(y)+"]+?"})}}return i<e.length&&(c+=e.substr(i)),c&&n.push(c),n}function i(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function c(e){for(var A=new Array(e.length),t=0;t<e.length;t++)"object"==typeof e[t]&&(A[t]=new RegExp("^(?:"+e[t].pattern+")$"));return function(t,r){for(var o="",c=t||{},a=(r||{}).pretty?i:encodeURIComponent,l=0;l<e.length;l++){var u=e[l];if("string"!=typeof u){var s,g=c[u.name];if(null==g){if(u.optional){u.partial&&(o+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(n(g)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(g)+"`");if(0===g.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var B=0;B<g.length;B++){if(s=a(g[B]),!A[l].test(s))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(s)+"`");o+=(0===B?u.prefix:u.delimiter)+s}}else{if(s=u.asterisk?encodeURI(g).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}):a(g),!A[l].test(s))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+s+'"');o+=u.prefix+s}}else o+=u}return o}}function a(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,A){return e.keys=A,e}function s(e){return e.sensitive?"":"i"}function g(e,A,t){n(A)||(t=A||t,A=[]);for(var r=(t=t||{}).strict,o=!1!==t.end,i="",c=0;c<e.length;c++){var l=e[c];if("string"==typeof l)i+=a(l);else{var g=a(l.prefix),B="(?:"+l.pattern+")";A.push(l),l.repeat&&(B+="(?:"+g+B+")*"),i+=B=l.optional?l.partial?g+"("+B+")?":"(?:"+g+"("+B+"))?":g+"("+B+")"}}var f=a(t.delimiter||"/"),E=i.slice(-f.length)===f;return r||(i=(E?i.slice(0,-f.length):i)+"(?:"+f+"(?=$))?"),i+=o?"$":r&&E?"":"(?="+f+"|$)",u(new RegExp("^"+i,s(t)),A)}function B(e,A,t){return n(A)||(t=A||t,A=[]),t=t||{},e instanceof RegExp?function(e,A){var t=e.source.match(/\((?!\?)/g);if(t)for(var n=0;n<t.length;n++)A.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,A)}(e,A):n(e)?function(e,A,t){for(var n=[],r=0;r<e.length;r++)n.push(B(e[r],A,t).source);return u(new RegExp("(?:"+n.join("|")+")",s(t)),A)}(e,A,t):function(e,A,t){return g(o(e,t),A,t)}(e,A,t)}},,function(e,A,t){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var A={},t=0;t<10;t++)A["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(A).map(function(e){return A[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,A){for(var t,i,c=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),a=1;a<arguments.length;a++){for(var l in t=Object(arguments[a]))r.call(t,l)&&(c[l]=t[l]);if(n){i=n(t);for(var u=0;u<i.length;u++)o.call(t,i[u])&&(c[i[u]]=t[i[u]])}}return c}},function(e,A){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function c(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(A){try{return t.call(null,e,0)}catch(A){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,l=[],u=!1,s=-1;function g(){u&&a&&(u=!1,a.length?l=a.concat(l):s=-1,l.length&&B())}function B(){if(!u){var e=c(g);u=!0;for(var A=l.length;A;){for(a=l,l=[];++s<A;)a&&a[s].run();s=-1,A=l.length}a=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(A){try{return n.call(null,e)}catch(A){return n.call(this,e)}}}(e)}}function f(e,A){this.fun=e,this.array=A}function E(){}r.nextTick=function(e){var A=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)A[t-1]=arguments[t];l.push(new f(e,A)),1!==l.length||u||c(B)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=E,r.addListener=E,r.once=E,r.off=E,r.removeListener=E,r.removeAllListeners=E,r.emit=E,r.prependListener=E,r.prependOnceListener=E,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,A,t){"use strict";A.__esModule=!0;var n=Object.assign||function(e){for(var A=1;A<arguments.length;A++){var t=arguments[A];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};A.default=function(e,A){return n({},c,A,{val:e})};var r,o=t(46),i=(r=o)&&r.__esModule?r:{default:r},c=n({},i.default.noWobble,{precision:.01});e.exports=A.default},function(e,A,t){"use strict";e.exports=t(52)},function(e,A,t){"use strict";(function(e){var n=t(7),r=t(6),o=t(29),i=t(23),c=t(24),a=t(25),l=t(27);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,A){return!A||"object"!==u(A)&&"function"!=typeof A?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):A}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,A){return(f=Object.setPrototypeOf||function(e,A){return e.__proto__=A,e})(e,A)}var E=function(A){function t(e){var A;return function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,t),(A=g(this,B(t).call(this,e))).state={},A}var u,E,w;return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),A&&f(e,A)}(t,e.Component),u=t,(E=[{key:"componentWillReceiveProps",value:function(e){this.props.component!==e.component&&this.setState({oldComp:this.props.component})}},{key:"render",value:function(){return e.createElement("div",{className:"Router"},e.createElement(n.a,null,e.createElement(o.a,{atEnter:{opacity:0},atLeave:{opacity:0},atActive:{opacity:1},className:"switch-wrapper"},e.createElement(r.a,{path:"/about",component:i.a}),e.createElement(r.a,{path:"/work",component:l.a}),e.createElement(r.a,{path:"/",component:a.a})),e.createElement(c.a,null)))}}])&&s(u.prototype,E),w&&s(u,w),t}();A.a=E}).call(this,t(0))},function(e,A,t){"use strict";A.__esModule=!0;var n=Object.assign||function(e){for(var A=1;A<arguments.length;A++){var t=arguments[A];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r=function(){function e(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(A,t,n){return t&&e(A.prototype,t),n&&e(A,n),A}}();function o(e){return e&&e.__esModule?e:{default:e}}var i=o(t(36)),c=o(t(37)),a=o(t(38)),l=o(t(39)),u=o(t(40)),s=o(t(41)),g=o(t(43)),B=o(t(0)),f=o(t(1)),E=1e3/60;function w(e,A,t){var n=A;return null==n?e.map(function(e,A){return{key:e.key,data:e.data,style:t[A]}}):e.map(function(e,A){for(var r=0;r<n.length;r++)if(n[r].key===e.key)return{key:n[r].key,data:n[r].data,style:t[A]};return{key:e.key,data:e.data,style:t[A]}})}function Q(e,A,t,n,r,o,c,a,u){for(var s=l.default(n,r,function(e,n){var r=A(n);return null==r?(t({key:n.key,data:n.data}),null):g.default(o[e],r,c[e])?(t({key:n.key,data:n.data}),null):{key:n.key,data:n.data,style:r}}),B=[],f=[],E=[],w=[],Q=0;Q<s.length;Q++){for(var p=s[Q],d=null,h=0;h<n.length;h++)if(n[h].key===p.key){d=h;break}if(null==d){var C=e(p);B[Q]=C,E[Q]=C;var F=i.default(p.style);f[Q]=F,w[Q]=F}else B[Q]=o[d],E[Q]=a[d],f[Q]=c[d],w[Q]=u[d]}return[s,B,f,E,w]}var p=function(e){function A(t){var r=this;!function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,A),e.call(this,t),this.unmounting=!1,this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyles=null,this.clearUnreadPropStyle=function(e){for(var A=Q(r.props.willEnter,r.props.willLeave,r.props.didLeave,r.state.mergedPropsStyles,e,r.state.currentStyles,r.state.currentVelocities,r.state.lastIdealStyles,r.state.lastIdealVelocities),t=A[0],o=A[1],i=A[2],c=A[3],a=A[4],l=0;l<e.length;l++){var u=e[l].style,s=!1;for(var g in u)if(Object.prototype.hasOwnProperty.call(u,g)){var B=u[g];"number"==typeof B&&(s||(s=!0,o[l]=n({},o[l]),i[l]=n({},i[l]),c[l]=n({},c[l]),a[l]=n({},a[l]),t[l]={key:t[l].key,data:t[l].data,style:n({},t[l].style)}),o[l][g]=B,i[l][g]=0,c[l][g]=B,a[l][g]=0,t[l].style[g]=B)}}r.setState({currentStyles:o,currentVelocities:i,mergedPropsStyles:t,lastIdealStyles:c,lastIdealVelocities:a})},this.startAnimationIfNecessary=function(){r.unmounting||(r.animationID=s.default(function(e){if(!r.unmounting){var A=r.props.styles,t="function"==typeof A?A(w(r.state.mergedPropsStyles,r.unreadPropStyles,r.state.lastIdealStyles)):A;if(function(e,A,t,n){if(n.length!==A.length)return!1;for(var r=0;r<n.length;r++)if(n[r].key!==A[r].key)return!1;for(r=0;r<n.length;r++)if(!g.default(e[r],A[r].style,t[r]))return!1;return!0}(r.state.currentStyles,t,r.state.currentVelocities,r.state.mergedPropsStyles))return r.animationID=null,void(r.accumulatedTime=0);var n=e||u.default(),o=n-r.prevTime;if(r.prevTime=n,r.accumulatedTime=r.accumulatedTime+o,r.accumulatedTime>10*E&&(r.accumulatedTime=0),0===r.accumulatedTime)return r.animationID=null,void r.startAnimationIfNecessary();for(var i=(r.accumulatedTime-Math.floor(r.accumulatedTime/E)*E)/E,c=Math.floor(r.accumulatedTime/E),l=Q(r.props.willEnter,r.props.willLeave,r.props.didLeave,r.state.mergedPropsStyles,t,r.state.currentStyles,r.state.currentVelocities,r.state.lastIdealStyles,r.state.lastIdealVelocities),s=l[0],B=l[1],f=l[2],p=l[3],d=l[4],h=0;h<s.length;h++){var C=s[h].style,F={},Y={},y={},m={};for(var I in C)if(Object.prototype.hasOwnProperty.call(C,I)){var v=C[I];if("number"==typeof v)F[I]=v,Y[I]=0,y[I]=v,m[I]=0;else{for(var D=p[h][I],x=d[h][I],M=0;M<c;M++){var N=a.default(E/1e3,D,x,v.val,v.stiffness,v.damping,v.precision);D=N[0],x=N[1]}var b=a.default(E/1e3,D,x,v.val,v.stiffness,v.damping,v.precision),U=b[0],H=b[1];F[I]=D+(U-D)*i,Y[I]=x+(H-x)*i,y[I]=D,m[I]=x}}p[h]=y,d[h]=m,B[h]=F,f[h]=Y}r.animationID=null,r.accumulatedTime-=c*E,r.setState({currentStyles:B,currentVelocities:f,lastIdealStyles:p,lastIdealVelocities:d,mergedPropsStyles:s}),r.unreadPropStyles=null,r.startAnimationIfNecessary()}}))},this.state=this.defaultState()}return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function, not "+typeof A);e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(e,A):e.__proto__=A)}(A,e),r(A,null,[{key:"propTypes",value:{defaultStyles:f.default.arrayOf(f.default.shape({key:f.default.string.isRequired,data:f.default.any,style:f.default.objectOf(f.default.number).isRequired})),styles:f.default.oneOfType([f.default.func,f.default.arrayOf(f.default.shape({key:f.default.string.isRequired,data:f.default.any,style:f.default.objectOf(f.default.oneOfType([f.default.number,f.default.object])).isRequired}))]).isRequired,children:f.default.func.isRequired,willEnter:f.default.func,willLeave:f.default.func,didLeave:f.default.func},enumerable:!0},{key:"defaultProps",value:{willEnter:function(e){return c.default(e.style)},willLeave:function(){return null},didLeave:function(){}},enumerable:!0}]),A.prototype.defaultState=function(){var e=this.props,A=e.defaultStyles,t=e.styles,n=e.willEnter,r=e.willLeave,o=e.didLeave,a="function"==typeof t?t(A):t,l=void 0;l=null==A?a:A.map(function(e){for(var A=0;A<a.length;A++)if(a[A].key===e.key)return a[A];return e});var u=null==A?a.map(function(e){return c.default(e.style)}):A.map(function(e){return c.default(e.style)}),s=null==A?a.map(function(e){return i.default(e.style)}):A.map(function(e){return i.default(e.style)}),g=Q(n,r,o,l,a,u,s,u,s),B=g[0];return{currentStyles:g[1],currentVelocities:g[2],lastIdealStyles:g[3],lastIdealVelocities:g[4],mergedPropsStyles:B}},A.prototype.componentDidMount=function(){this.prevTime=u.default(),this.startAnimationIfNecessary()},A.prototype.componentWillReceiveProps=function(e){this.unreadPropStyles&&this.clearUnreadPropStyle(this.unreadPropStyles);var A=e.styles;this.unreadPropStyles="function"==typeof A?A(w(this.state.mergedPropsStyles,this.unreadPropStyles,this.state.lastIdealStyles)):A,null==this.animationID&&(this.prevTime=u.default(),this.startAnimationIfNecessary())},A.prototype.componentWillUnmount=function(){this.unmounting=!0,null!=this.animationID&&(s.default.cancel(this.animationID),this.animationID=null)},A.prototype.render=function(){var e=w(this.state.mergedPropsStyles,this.unreadPropStyles,this.state.currentStyles),A=this.props.children(e);return A&&B.default.Children.only(A)},A}(B.default.Component);A.default=p,e.exports=A.default},function(e,A,t){"use strict";A.__esModule=!0;var n=o(t(0)),r=o(t(47));function o(e){return e&&e.__esModule?e:{default:e}}A.default=n.default.createContext||r.default,e.exports=A.default},function(e,A,t){"use strict";var n=t(18),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function a(e){return n.isMemo(e)?i:c[e.$$typeof]||r}c[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var l=Object.defineProperty,u=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,B=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(A,t,n){if("string"!=typeof t){if(f){var r=B(t);r&&r!==f&&e(A,r,n)}var i=u(t);s&&(i=i.concat(s(t)));for(var c=a(A),E=a(t),w=0;w<i.length;++w){var Q=i[w];if(!(o[Q]||n&&n[Q]||E&&E[Q]||c&&c[Q])){var p=g(t,Q);try{l(A,Q,p)}catch(e){}}}return A}return A}},function(e,A,t){"use strict";(function(e){var n=t(12);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,A){return!A||"object"!==r(A)&&"function"!=typeof A?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):A}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,A){return(a=Object.setPrototypeOf||function(e,A){return e.__proto__=A,e})(e,A)}t(56);var l=function(A){function t(){return function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,c(t).apply(this,arguments))}var r,l,u;return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),A&&a(e,A)}(t,e.Component),r=t,(l=[{key:"render",value:function(){return e.createElement("div",{className:"About"},e.createElement("div",null,e.createElement(n.a,{style:{height:"10rem"}}),e.createElement("h2",null,"Hi."),e.createElement("div",null,"I'm a web designer and front end developer (with full stack capabilities) based in Huntsville, Alabama. I have a passion for web development and I love to create responsive apps for the web.")),e.createElement("div",{className:"sec"},e.createElement("h1",null,"What I do."),e.createElement("div",null,e.createElement("div",null,"Image Here"),e.createElement("div",null,"I'm a developer, so I know how to create your website to run across devices using the latest technologies available.")),e.createElement("div",null,e.createElement("div",null,"I'm a researcher, I like to keep up to date with industry standards and best practices so I always know how to keep innovating."),e.createElement("div",null,"Image Here"))))}}])&&o(r.prototype,l),u&&o(r,u),t}();l.propTypes={},A.a=l}).call(this,t(0))},function(e,A,t){"use strict";(function(e){var n=t(7),r=t(12);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,A){return!A||"object"!==o(A)&&"function"!=typeof A?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):A}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,A){return(l=Object.setPrototypeOf||function(e,A){return e.__proto__=A,e})(e,A)}t(58);var u=function(A){function t(){return function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,a(t).apply(this,arguments))}var o,u,s;return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),A&&l(e,A)}(t,e.Component),o=t,(u=[{key:"render",value:function(){return e.createElement("div",{className:"Header"},e.createElement(n.b,{to:"/"},e.createElement(r.a,{style:{height:"100%"}})),e.createElement("div",null),e.createElement("div",null,e.createElement(n.b,{to:"/about"},"About Me")),e.createElement("div",null,e.createElement(n.b,{to:"/work"},"Projects")))}}])&&i(o.prototype,u),s&&i(o,s),t}();A.a=u}).call(this,t(0))},function(e,A,t){"use strict";(function(e){var n=t(26);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,A){return!A||"object"!==r(A)&&"function"!=typeof A?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):A}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,A){return(a=Object.setPrototypeOf||function(e,A){return e.__proto__=A,e})(e,A)}t(60);var l=function(A){function t(){return function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,c(t).apply(this,arguments))}var r,l,u;return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),A&&a(e,A)}(t,e.Component),r=t,(l=[{key:"render",value:function(){return e.createElement("div",{className:"Splash"},e.createElement("div",null,e.createElement("h1",{className:"title"},"I'm Wiley,"),e.createElement("h2",{className:"subtitle"},"a front end web developer")),e.createElement("div",{className:"earth"},e.createElement(n.a,null)))}}])&&o(r.prototype,l),u&&o(r,u),t}();A.a=l}).call(this,t(0))},function(e,A,t){"use strict";(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,A){return!A||"object"!==t(A)&&"function"!=typeof A?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):A}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,A){return(i=Object.setPrototypeOf||function(e,A){return e.__proto__=A,e})(e,A)}var c=function(A){function t(){return function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,t),r(this,o(t).apply(this,arguments))}var c,a,l;return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),A&&i(e,A)}(t,e.Component),c=t,(a=[{key:"animate",value:function(A){return e.createElement("animate",{begin:1.25*A+"s",fill:"freeze",attributeName:"opacity",from:"0",to:"1",dur:"1.25s"})}},{key:"render",value:function(){var A=0;return e.createElement("svg",{className:"Land",viewBox:"0 0 800 300",preserveAspectRatio:"xMidYMax meet",style:this.props.style},e.createElement("defs",null,e.createElement("linearGradient",{id:"gradient-oval10",x1:"429.5",y1:"10",x2:"429.5",y2:"30",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{offset:"0",stopColor:"rgb(224, 235, 232)",stopOpacity:"1"}),e.createElement("stop",{offset:"1",stopColor:"rgb(255, 255, 255)",stopOpacity:"1"})),e.createElement("linearGradient",{id:"gradient-oval9",x1:"228",y1:"86",x2:"228",y2:"112",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{offset:"0",stopColor:"rgb(224, 235, 232)",stopOpacity:"1"}),e.createElement("stop",{offset:"1",stopColor:"rgb(255, 255, 255)",stopOpacity:"1"}))),e.createElement("g",null,e.createElement("path",{fill:"rgb(62, 156, 135)",opacity:"0",d:"M 212,300 V 231 C 212,132.14 296.62,52 401,52 505.38,52 590,132.14 590,231 V 300 Z"},this.animate(A++)),e.createElement("path",{fill:"rgb(255, 255, 255)",opacity:"0",d:"M 333,383 C 333,259.29 437.09,159 565.5,159 693.91,159 798,259.29 798,383 Z"},this.animate(A++)),e.createElement("path",{fill:"rgb(74, 177, 154)",opacity:"0",d:"M 3,368 C 3,238.21 116.94,133 257.5,133 398.06,133 512,238.21 512,368 Z"},this.animate(A++))),e.createElement("g",{opacity:"0"},e.createElement("g",null,e.createElement("ellipse",{fill:"rgb(224, 235, 232)",cx:"645",cy:"249",rx:"12",ry:"4"}),e.createElement("path",{fill:"rgb(33, 125, 104)",d:"M 627.5,238.51 L 643.88,176.49 663,238.51 627.5,238.51 Z M 627.5,238.51"}),e.createElement("rect",{fill:"rgb(175, 148, 108)",x:"644",y:"216",width:"2",height:"33"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 644.5,222.75 L 650.23,216.99 651.5,218.27 645.14,224.68 644.71,224.89 644.5,222.75 Z M 644.5,222.75"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 644.5,230.65 L 650.23,224.89 651.5,226.17 645.14,232.58 644.71,232.79 644.5,230.65 Z M 644.5,230.65"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 645.5,226.7 L 639.77,220.94 638.5,222.22 644.86,228.63 645.29,228.84 645.5,226.7 Z M 645.5,226.7"})),e.createElement("g",null,e.createElement("ellipse",{fill:"rgb(67, 159, 138)",cx:"104",cy:"215.5",rx:"12",ry:"5.5"}),e.createElement("path",{fill:"rgb(246, 213, 70)",d:"M 89.5,201.5 L 102.88,145.5 118.5,201.5 89.5,201.5 Z M 89.5,201.5"}),e.createElement("rect",{fill:"rgb(175, 148, 108)",x:"103",y:"178",width:"2",height:"37"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 103.5,187.34 L 109.23,181.5 110.5,182.8 104.14,189.28 103.71,189.5 103.5,187.34 Z M 103.5,187.34"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 103.5,195.34 L 109.23,189.5 110.5,190.8 104.14,197.28 103.71,197.5 103.5,195.34 Z M 103.5,195.34"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 104.5,191.34 L 98.77,185.5 97.5,186.8 103.86,193.28 104.29,193.5 104.5,191.34 Z M 104.5,191.34"})),e.createElement("g",null,e.createElement("ellipse",{fill:"rgb(67, 159, 138)",cx:"178.25",cy:"187",rx:"10.25",ry:"4"}),e.createElement("path",{fill:"rgb(244, 160, 160)",d:"M 163.5,175.3 L 176.88,124.45 192.5,175.3 163.5,175.3 Z M 163.5,175.3"}),e.createElement("rect",{fill:"rgb(175, 148, 108)",x:"177",y:"157",width:"2",height:"30"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 177.5,162.44 L 183.23,157.14 184.5,158.32 178.14,164.21 177.71,164.4 177.5,162.44 Z M 177.5,162.44"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 177.5,169.7 L 183.23,164.4 184.5,165.58 178.14,171.47 177.71,171.66 177.5,169.7 Z M 177.5,169.7"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 178.5,166.07 L 172.77,160.77 171.5,161.95 177.86,167.84 178.29,168.03 178.5,166.07 Z M 178.5,166.07"})),e.createElement("g",null,e.createElement("ellipse",{fill:"rgb(224, 235, 232)",cx:"602.75",cy:"195",rx:"10.75",ry:"4"}),e.createElement("path",{fill:"rgb(244, 160, 160)",d:"M 588.5,183.3 L 601.88,132.45 617.5,183.3 588.5,183.3 Z M 588.5,183.3"}),e.createElement("rect",{fill:"rgb(175, 148, 108)",x:"602",y:"165",width:"2",height:"30"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 602.5,170.44 L 608.23,165.14 609.5,166.32 603.14,172.21 602.71,172.4 602.5,170.44 Z M 602.5,170.44"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 602.5,177.7 L 608.23,172.4 609.5,173.58 603.14,179.47 602.71,179.66 602.5,177.7 Z M 602.5,177.7"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 603.5,174.07 L 597.77,168.77 596.5,169.95 602.86,175.84 603.29,176.03 603.5,174.07 Z M 603.5,174.07"})),e.createElement("g",null,e.createElement("ellipse",{fill:"rgb(224, 235, 232)",cx:"679",cy:"211",rx:"10",ry:"4"}),e.createElement("path",{fill:"rgb(246, 213, 70)",d:"M 664.5,197.5 L 677.88,141.5 693.5,197.5 664.5,197.5 Z M 664.5,197.5"}),e.createElement("rect",{fill:"rgb(175, 148, 108)",x:"678",y:"174",width:"2",height:"37"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 678.5,183.34 L 684.23,177.5 685.5,178.8 679.14,185.28 678.71,185.5 678.5,183.34 Z M 678.5,183.34"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 678.5,191.34 L 684.23,185.5 685.5,186.8 679.14,193.28 678.71,193.5 678.5,191.34 Z M 678.5,191.34"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 679.5,187.34 L 673.77,181.5 672.5,182.8 678.86,189.28 679.29,189.5 679.5,187.34 Z M 679.5,187.34"})),e.createElement("g",null,e.createElement("ellipse",{fill:"rgb(67, 159, 138)",cx:"143",cy:"199.5",rx:"12",ry:"5.5"}),e.createElement("path",{fill:"rgb(33, 125, 104)",d:"M 127.5,185.5 L 142.27,116.5 159.5,185.5 127.5,185.5 Z M 127.5,185.5"}),e.createElement("rect",{fill:"rgb(175, 148, 108)",x:"142",y:"162",width:"2",height:"37"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 142.5,171.34 L 148.23,165.5 149.5,166.8 143.14,173.28 142.71,173.5 142.5,171.34 Z M 142.5,171.34"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 142.5,179.34 L 148.23,173.5 149.5,174.8 143.14,181.28 142.71,181.5 142.5,179.34 Z M 142.5,179.34"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 143.5,175.34 L 137.77,169.5 136.5,170.8 142.86,177.28 143.29,177.5 143.5,175.34 Z M 143.5,175.34"})),e.createElement("g",null,e.createElement("ellipse",{fill:"rgb(55, 140, 121)",cx:"349",cy:"90.5",rx:"12",ry:"5.5"}),e.createElement("path",{fill:"rgb(143, 209, 130)",d:"M 333.5,76.5 L 348.27,7.5 365.5,76.5 333.5,76.5 Z M 333.5,76.5"}),e.createElement("rect",{fill:"rgb(175, 148, 108)",x:"348",y:"53",width:"2",height:"37"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 348.5,62.34 L 354.23,56.5 355.5,57.8 349.14,64.28 348.71,64.5 348.5,62.34 Z M 348.5,62.34"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 348.5,70.34 L 354.23,64.5 355.5,65.8 349.14,72.28 348.71,72.5 348.5,70.34 Z M 348.5,70.34"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 349.5,66.34 L 343.77,60.5 342.5,61.8 348.86,68.28 349.29,68.5 349.5,66.34 Z M 349.5,66.34"})),e.createElement("g",null,e.createElement("ellipse",{fill:"rgb(55, 140, 121)",cx:"492.25",cy:"104",rx:"10.25",ry:"4"}),e.createElement("path",{fill:"rgb(33, 125, 104)",d:"M 477.5,92.3 L 490.88,41.45 506.5,92.3 477.5,92.3 Z M 477.5,92.3"}),e.createElement("rect",{fill:"rgb(175, 148, 108)",x:"491",y:"74",width:"2",height:"30"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 491.5,79.44 L 497.23,74.14 498.5,75.32 492.14,81.21 491.71,81.4 491.5,79.44 Z M 491.5,79.44"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 491.5,86.7 L 497.23,81.4 498.5,82.58 492.14,88.47 491.71,88.66 491.5,86.7 Z M 491.5,86.7"}),e.createElement("path",{fill:"rgb(175, 148, 108)",d:"M 492.5,83.07 L 486.77,77.77 485.5,78.95 491.86,84.84 492.29,85.03 492.5,83.07 Z M 492.5,83.07"})),this.animate(A++)),e.createElement("g",null,e.createElement("g",{opacity:"0"},e.createElement("rect",{fill:"rgb(255, 255, 255)",x:"65",y:"83",width:"4",height:"144"}),e.createElement("path",{fill:"rgb(244, 160, 160)",d:"M 28.5,108.83 L 69.5,93.5 69.5,125.5 28.5,108.83 Z M 28.5,108.83"}),e.createElement("path",{fill:"rgb(88, 214, 185)",d:"M 28.5,88.83 L 69.5,73.5 69.5,105.5 28.5,88.83 Z M 28.5,88.83"}),this.animate(A++)),e.createElement("g",{opacity:"0"},e.createElement("rect",{fill:"rgb(255, 255, 255)",x:"725",y:"83",width:"4",height:"144"}),e.createElement("path",{fill:"rgb(88, 214, 185)",d:"M 688.5,108.83 L 729.5,93.5 729.5,125.5 688.5,108.83 Z M 688.5,108.83"}),e.createElement("path",{fill:"rgb(244, 160, 160)",d:"M 688.5,88.83 L 729.5,73.5 729.5,105.5 688.5,88.83 Z M 688.5,88.83"}),this.animate(A++))),e.createElement("g",null,e.createElement("g",{opacity:"0"},e.createElement("rect",{fill:"rgb(109, 160, 171)",x:"204",y:"121",width:"30",height:"30"}),e.createElement("rect",{fill:"rgb(198, 247, 251)",x:"208",y:"126",width:"8",height:"8"}),e.createElement("rect",{fill:"rgb(198, 247, 251)",x:"223",y:"126",width:"8",height:"8"}),e.createElement("rect",{fill:"rgb(198, 247, 251)",x:"208",y:"139",width:"8",height:"8"}),e.createElement("rect",{fill:"rgb(112, 89, 94)",x:"223",y:"139",width:"8",height:"12"}),e.createElement("path",{fill:"rgb(112, 89, 94)",d:"M 219,106 L 238.92,122.12 199.08,122.12 219,106 Z M 219,106"}),e.createElement("path",{fill:"url(#gradient-oval9)",d:"M 225.01,98.09 C 225.12,90.93 226.56,85.53 228.21,86.03 229.86,86.53 231.11,92.74 230.99,99.91 230.88,107.07 229.44,112.47 227.79,111.97 226.22,111.49 225,105.83 225,99"}),e.createElement("rect",{fill:"rgb(112, 89, 94)",x:"224",y:"107",width:"7.5",height:"12"}),this.animate(A++)),e.createElement("g",{opacity:"0"},e.createElement("rect",{fill:"rgb(202, 138, 101)",x:"411",y:"37",width:"23",height:"23"}),e.createElement("rect",{fill:"rgb(198, 247, 251)",x:"414",y:"41",width:"6",height:"6"}),e.createElement("rect",{fill:"rgb(198, 247, 251)",x:"426",y:"41",width:"6",height:"6"}),e.createElement("rect",{fill:"rgb(198, 247, 251)",x:"414",y:"51",width:"6",height:"6"}),e.createElement("rect",{fill:"rgb(112, 89, 94)",x:"426",y:"51",width:"6",height:"9"}),e.createElement("path",{fill:"rgb(112, 89, 94)",d:"M 422.5,25.38 L 437.94,37.79 407.06,37.79 422.5,25.38 Z M 422.5,25.38"}),e.createElement("path",{fill:"url(#gradient-oval10)",d:"M 427.01,19.3 C 427.1,13.79 428.3,9.64 429.67,10.02 431.05,10.41 432.09,15.19 431.99,20.7 431.9,26.21 430.7,30.36 429.33,29.98 428.02,29.61 427,25.25 427,20"}),e.createElement("rect",{fill:"rgb(112, 89, 94)",x:"426",y:"26",width:"6.5",height:"9"}),this.animate(A++))))}}])&&n(c.prototype,a),l&&n(c,l),t}();A.a=c}).call(this,t(0))},function(e,A,t){"use strict";(function(e){var n=t(28);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,A){return!A||"object"!==r(A)&&"function"!=typeof A?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):A}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,A){return(a=Object.setPrototypeOf||function(e,A){return e.__proto__=A,e})(e,A)}t(62);var l=function(A){function t(){return function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,c(t).apply(this,arguments))}var r,l,u;return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),A&&a(e,A)}(t,e.Component),r=t,(l=[{key:"render",value:function(){return e.createElement("div",{className:"Work"},n.a.map(function(A){return e.createElement("div",{key:A.title},e.createElement("div",null,e.createElement("img",{src:"".concat(A.link,"/public/preview.png")})),e.createElement("div",null,e.createElement("h1",null,A.title),e.createElement("h4",null,A.type)),e.createElement("div",null,A.description),e.createElement("div",{className:"buttons"},e.createElement("a",{href:A.link,target:"_blank"},"visit"),e.createElement("a",{href:A.repo,target:"_blank"},"github")))}))}}])&&o(r.prototype,l),u&&o(r,u),t}();l.propTypes={},A.a=l}).call(this,t(0))},function(e,A,t){"use strict";var n;A.a=(n=window.location.host.substr(window.location.host.indexOf(".")+1),[{title:"Avatar Craft (WIP)",link:"http://avatar.".concat(n),repo:"https://github.com/Xmerr/AvatarCraft",type:"image crafting",description:"A 100% client browser based method to create svg avatars. Still a work in progress"},{title:"Wooly Willy Online",link:"http://willy.".concat(n),repo:"https://github.com/Xmerr/WoolyWilly",type:"entertainment",description:"An online SVG based wooly willy"},{title:"This Site",link:"http://www.".concat(n),repo:"https://github.com/Xmerr/PortfolioSite",type:"web design",description:"This site is used just to tell the world who I am. The design is simple and the features are minimal."}])},function(e,A,t){"use strict";var n=t(0),r=t.n(n),o=t(6),i=t(20),c=t.n(i),a=t(1),l=t.n(a),u=t(17),s=t.n(u);function g(e){return Object.keys(e).reduce(function(A,t){var n=e[t];return A[t]="number"==typeof n?s()(n):n,A},{})}var B=function(){function e(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(A,t,n){return t&&e(A.prototype,t),n&&e(A,n),A}}();function f(e,A){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!A||"object"!=typeof A&&"function"!=typeof A?e:A}var E=function(e){function A(){var e,t,o;!function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,A);for(var i=arguments.length,c=Array(i),a=0;a<i;a++)c[a]=arguments[a];return t=o=f(this,(e=A.__proto__||Object.getPrototypeOf(A)).call.apply(e,[this].concat(c))),o.willEnter=function(){return o.props.atEnter},o.willLeave=function(){return g(o.props.atLeave)},o.didLeave=function(e){o.props.didLeave&&o.props.didLeave(e)},o.renderRoute=function(e){var A={style:o.props.mapStyles(e.style),key:e.key};return!1!==o.props.wrapperComponent?Object(n.createElement)(o.props.wrapperComponent,A,e.data):Object(n.cloneElement)(e.data,A)},o.renderRoutes=function(e){return r.a.createElement("div",{className:o.props.className},e.map(o.renderRoute))},f(o,t)}return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function, not "+typeof A);e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(e,A):e.__proto__=A)}(A,n["Component"]),B(A,[{key:"getDefaultStyles",value:function(){return this.props.runOnMount?this.props.children?[{key:this.props.children.key,data:this.props.children,style:this.props.atEnter}]:[]:null}},{key:"getStyles",value:function(){return this.props.children?[{key:this.props.children.key,data:this.props.children,style:g(this.props.atActive)}]:[]}},{key:"render",value:function(){return r.a.createElement(c.a,{defaultStyles:this.getDefaultStyles(),styles:this.getStyles(),willEnter:this.willEnter,willLeave:this.willLeave,didLeave:this.didLeave},this.renderRoutes)}}]),A}();E.defaultProps={wrapperComponent:"div",runOnMount:!1,mapStyles:function(e){return e}},E.propTypes={className:l.a.string,wrapperComponent:l.a.oneOfType([l.a.bool,l.a.element,l.a.string]),atEnter:l.a.object.isRequired,atActive:l.a.object.isRequired,atLeave:l.a.object.isRequired,didLeave:l.a.func,mapStyles:l.a.func.isRequired,runOnMount:l.a.bool.isRequired};var w=E;var Q=Object.assign||function(e){for(var A=1;A<arguments.length;A++){var t=arguments[A];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},p=function(){function e(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(A,t,n){return t&&e(A.prototype,t),n&&e(A,n),A}}();function d(e,A){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!A||"object"!=typeof A&&"function"!=typeof A?e:A}var h={key:"no-match"};function C(e){return"string"==typeof e.key?e.key:""}function F(e,A){return r.a.Children.toArray(e).find(function(e){return Object(o.e)(A,{exact:e.props.exact,path:e.props.path})})||h}var Y=function(e){function A(){var e,t,n;!function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,A);for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return t=n=d(this,(e=A.__proto__||Object.getPrototypeOf(A)).call.apply(e,[this].concat(o))),n.state={key:C(n.props.location),match:F(n.props.children,n.props.location.pathname)},n.matches=0,d(n,t)}return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function, not "+typeof A);e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(e,A):e.__proto__=A)}(A,r.a.Component),p(A,[{key:"componentWillReceiveProps",value:function(e){var A=F(e.children,e.location.pathname);this.state.match.key!==A.key&&this.setState({match:A,key:C(e.location)+ ++this.matches})}},{key:"render",value:function(){var e=this.props,A=e.children,t=e.location,n=(e.match,function(e,A){var t={};for(var n in e)A.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}(e,["children","location","match"]));return r.a.createElement(w,n,r.a.createElement(o.c,{key:this.state.key,location:t},A))}}]),A}();Y.propTypes={location:l.a.shape({key:l.a.string,pathname:l.a.string})};var y=function(e){return r.a.createElement(o.a,{children:function(A){var t=A.location;return r.a.createElement(Y,Q({location:t},e))}})};t.d(A,"a",function(){return y})},function(e,A,t){"use strict";t.r(A),function(e,n,r){var o=t(19);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,A){for(var t=0;t<A.length;t++){var n=A[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,A){return!A||"object"!==i(A)&&"function"!=typeof A?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):A}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,A){return(u=Object.setPrototypeOf||function(e,A){return e.__proto__=A,e})(e,A)}t(64);var s=function(A){function t(e){var A;return function(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}(this,t),(A=a(this,l(t).call(this,e))).state={},n.toggleMenu=function(){A.setState({hideMenu:!A.state.hideMenu})},A}var r,i,s;return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),A&&u(e,A)}(t,e.Component),r=t,(i=[{key:"render",value:function(){return e.createElement("div",{className:"MainArea"},e.createElement(o.a,null))}}])&&c(r.prototype,i),s&&c(r,s),t}();A.default=s,r.render(e.createElement(s,null),document.getElementById("content"))}.call(this,t(0),t(11),t(32))},function(e,A,t){"use strict"; /** @license React v16.8.6 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var n=t(15),r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,c=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,g=r?Symbol.for("react.concurrent_mode"):60111,B=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,E=r?Symbol.for("react.memo"):60115,w=r?Symbol.for("react.lazy"):60116,Q="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var A=arguments.length-1,t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=0;n<A;n++)t+="&args[]="+encodeURIComponent(arguments[n+1]);!function(e,A,t,n,r,o,i,c){if(!e){if(e=void 0,void 0===A)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=[t,n,r,o,i,c],l=0;(e=Error(A.replace(/%s/g,function(){return a[l++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",t)}var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function C(e,A,t){this.props=e,this.context=A,this.refs=h,this.updater=t||d}function F(){}function Y(e,A,t){this.props=e,this.context=A,this.refs=h,this.updater=t||d}C.prototype.isReactComponent={},C.prototype.setState=function(e,A){"object"!=typeof e&&"function"!=typeof e&&null!=e&&p("85"),this.updater.enqueueSetState(this,e,A,"setState")},C.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},F.prototype=C.prototype;var y=Y.prototype=new F;y.constructor=Y,n(y,C.prototype),y.isPureReactComponent=!0;var m={current:null},I={current:null},v=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};function x(e,A,t){var n=void 0,r={},i=null,c=null;if(null!=A)for(n in void 0!==A.ref&&(c=A.ref),void 0!==A.key&&(i=""+A.key),A)v.call(A,n)&&!D.hasOwnProperty(n)&&(r[n]=A[n]);var a=arguments.length-2;if(1===a)r.children=t;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===r[n]&&(r[n]=a[n]);return{$$typeof:o,type:e,key:i,ref:c,props:r,_owner:I.current}}function M(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var N=/\/+/g,b=[];function U(e,A,t,n){if(b.length){var r=b.pop();return r.result=e,r.keyPrefix=A,r.func=t,r.context=n,r.count=0,r}return{result:e,keyPrefix:A,func:t,context:n,count:0}}function H(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>b.length&&b.push(e)}function k(e,A,t){return null==e?0:function e(A,t,n,r){var c=typeof A;"undefined"!==c&&"boolean"!==c||(A=null);var a=!1;if(null===A)a=!0;else switch(c){case"string":case"number":a=!0;break;case"object":switch(A.$$typeof){case o:case i:a=!0}}if(a)return n(r,A,""===t?"."+T(A,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(A))for(var l=0;l<A.length;l++){var u=t+T(c=A[l],l);a+=e(c,u,n,r)}else if(u=null===A||"object"!=typeof A?null:"function"==typeof(u=Q&&A[Q]||A["@@iterator"])?u:null,"function"==typeof u)for(A=u.call(A),l=0;!(c=A.next()).done;)a+=e(c=c.value,u=t+T(c,l++),n,r);else"object"===c&&p("31","[object Object]"==(n=""+A)?"object with keys {"+Object.keys(A).join(", ")+"}":n,"");return a}(e,"",A,t)}function T(e,A){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var A={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return A[e]})}(e.key):A.toString(36)}function R(e,A){e.func.call(e.context,A,e.count++)}function J(e,A,t){var n=e.result,r=e.keyPrefix;e=e.func.call(e.context,A,e.count++),Array.isArray(e)?G(e,n,t,function(e){return e}):null!=e&&(M(e)&&(e=function(e,A){return{$$typeof:o,type:e.type,key:A,ref:e.ref,props:e.props,_owner:e._owner}}(e,r+(!e.key||A&&A.key===e.key?"":(""+e.key).replace(N,"$&/")+"/")+t)),n.push(e))}function G(e,A,t,n,r){var o="";null!=t&&(o=(""+t).replace(N,"$&/")+"/"),k(e,J,A=U(A,o,n,r)),H(A)}function L(){var e=m.current;return null===e&&p("321"),e}var P={Children:{map:function(e,A,t){if(null==e)return e;var n=[];return G(e,n,null,A,t),n},forEach:function(e,A,t){if(null==e)return e;k(e,R,A=U(null,null,A,t)),H(A)},count:function(e){return k(e,function(){return null},null)},toArray:function(e){var A=[];return G(e,A,null,function(e){return e}),A},only:function(e){return M(e)||p("143"),e}},createRef:function(){return{current:null}},Component:C,PureComponent:Y,createContext:function(e,A){return void 0===A&&(A=null),(e={$$typeof:s,_calculateChangedBits:A,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:B,render:e}},lazy:function(e){return{$$typeof:w,_ctor:e,_status:-1,_result:null}},memo:function(e,A){return{$$typeof:E,type:e,compare:void 0===A?null:A}},useCallback:function(e,A){return L().useCallback(e,A)},useContext:function(e,A){return L().useContext(e,A)},useEffect:function(e,A){return L().useEffect(e,A)},useImperativeHandle:function(e,A,t){return L().useImperativeHandle(e,A,t)},useDebugValue:function(){},useLayoutEffect:function(e,A){return L().useLayoutEffect(e,A)},useMemo:function(e,A){return L().useMemo(e,A)},useReducer:function(e,A,t){return L().useReducer(e,A,t)},useRef:function(e){return L().useRef(e)},useState:function(e){return L().useState(e)},Fragment:c,StrictMode:a,Suspense:f,createElement:x,cloneElement:function(e,A,t){null==e&&p("267",e);var r=void 0,i=n({},e.props),c=e.key,a=e.ref,l=e._owner;if(null!=A){void 0!==A.ref&&(a=A.ref,l=I.current),void 0!==A.key&&(c=""+A.key);var u=void 0;for(r in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),A)v.call(A,r)&&!D.hasOwnProperty(r)&&(i[r]=void 0===A[r]&&void 0!==u?u[r]:A[r])}if(1===(r=arguments.length-2))i.children=t;else if(1<r){u=Array(r);for(var s=0;s<r;s++)u[s]=arguments[s+2];i.children=u}return{$$typeof:o,type:e.type,key:c,ref:a,props:i,_owner:l}},createFactory:function(e){var A=x.bind(null,e);return A.type=e,A},isValidElement:M,version:"16.8.6",unstable_ConcurrentMode:g,unstable_Profiler:l,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:m,ReactCurrentOwner:I,assign:n}},S={default:P},W=S&&P||S;e.exports=W.default||W},function(e,A,t){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=t(33)},function(e,A,t){"use strict"; /** @license React v16.8.6 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var n=t(0),r=t(15),o=t(34);function i(e){for(var A=arguments.length-1,t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=0;n<A;n++)t+="&args[]="+encodeURIComponent(arguments[n+1]);!function(e,A,t,n,r,o,i,c){if(!e){if(e=void 0,void 0===A)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=[t,n,r,o,i,c],l=0;(e=Error(A.replace(/%s/g,function(){return a[l++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",t)}n||i("227");var c=!1,a=null,l=!1,u=null,s={onError:function(e){c=!0,a=e}};function g(e,A,t,n,r,o,i,l,u){c=!1,a=null,function(e,A,t,n,r,o,i,c,a){var l=Array.prototype.slice.call(arguments,3);try{A.apply(t,l)}catch(e){this.onError(e)}}.apply(s,arguments)}var B=null,f={};function E(){if(B)for(var e in f){var A=f[e],t=B.indexOf(e);if(-1<t||i("96",e),!Q[t])for(var n in A.extractEvents||i("97",e),Q[t]=A,t=A.eventTypes){var r=void 0,o=t[n],c=A,a=n;p.hasOwnProperty(a)&&i("99",a),p[a]=o;var l=o.phasedRegistrationNames;if(l){for(r in l)l.hasOwnProperty(r)&&w(l[r],c,a);r=!0}else o.registrationName?(w(o.registrationName,c,a),r=!0):r=!1;r||i("98",n,e)}}}function w(e,A,t){d[e]&&i("100",e),d[e]=A,h[e]=A.eventTypes[t].dependencies}var Q=[],p={},d={},h={},C=null,F=null,Y=null;function y(e,A,t){var n=e.type||"unknown-event";e.currentTarget=Y(t),function(e,A,t,n,r,o,s,B,f){if(g.apply(this,arguments),c){if(c){var E=a;c=!1,a=null}else i("198"),E=void 0;l||(l=!0,u=E)}}(n,A,void 0,e),e.currentTarget=null}function m(e,A){return null==A&&i("30"),null==e?A:Array.isArray(e)?Array.isArray(A)?(e.push.apply(e,A),e):(e.push(A),e):Array.isArray(A)?[e].concat(A):[e,A]}function I(e,A,t){Array.isArray(e)?e.forEach(A,t):e&&A.call(t,e)}var v=null;function D(e){if(e){var A=e._dispatchListeners,t=e._dispatchInstances;if(Array.isArray(A))for(var n=0;n<A.length&&!e.isPropagationStopped();n++)y(e,A[n],t[n]);else A&&y(e,A,t);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}var x={injectEventPluginOrder:function(e){B&&i("101"),B=Array.prototype.slice.call(e),E()},injectEventPluginsByName:function(e){var A,t=!1;for(A in e)if(e.hasOwnProperty(A)){var n=e[A];f.hasOwnProperty(A)&&f[A]===n||(f[A]&&i("102",A),f[A]=n,t=!0)}t&&E()}};function M(e,A){var t=e.stateNode;if(!t)return null;var n=C(t);if(!n)return null;t=n[A];e:switch(A){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(n=!n.disabled)||(n=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!n;break e;default:e=!1}return e?null:(t&&"function"!=typeof t&&i("231",A,typeof t),t)}function N(e){if(null!==e&&(v=m(v,e)),e=v,v=null,e&&(I(e,D),v&&i("95"),l))throw e=u,l=!1,u=null,e}var b=Math.random().toString(36).slice(2),U="__reactInternalInstance$"+b,H="__reactEventHandlers$"+b;function k(e){if(e[U])return e[U];for(;!e[U];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[U]).tag||6===e.tag?e:null}function T(e){return!(e=e[U])||5!==e.tag&&6!==e.tag?null:e}function R(e){if(5===e.tag||6===e.tag)return e.stateNode;i("33")}function J(e){return e[H]||null}function G(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function L(e,A,t){(A=M(e,t.dispatchConfig.phasedRegistrationNames[A]))&&(t._dispatchListeners=m(t._dispatchListeners,A),t._dispatchInstances=m(t._dispatchInstances,e))}function P(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var A=e._targetInst,t=[];A;)t.push(A),A=G(A);for(A=t.length;0<A--;)L(t[A],"captured",e);for(A=0;A<t.length;A++)L(t[A],"bubbled",e)}}function S(e,A,t){e&&t&&t.dispatchConfig.registrationName&&(A=M(e,t.dispatchConfig.registrationName))&&(t._dispatchListeners=m(t._dispatchListeners,A),t._dispatchInstances=m(t._dispatchInstances,e))}function W(e){e&&e.dispatchConfig.registrationName&&S(e._targetInst,null,e)}function j(e){I(e,P)}var z=!("undefined"==typeof window||!window.document||!window.document.createElement);function O(e,A){var t={};return t[e.toLowerCase()]=A.toLowerCase(),t["Webkit"+e]="webkit"+A,t["Moz"+e]="moz"+A,t}var K={animationend:O("Animation","AnimationEnd"),animationiteration:O("Animation","AnimationIteration"),animationstart:O("Animation","AnimationStart"),transitionend:O("Transition","TransitionEnd")},X={},V={};function _(e){if(X[e])return X[e];if(!K[e])return e;var A,t=K[e];for(A in t)if(t.hasOwnProperty(A)&&A in V)return X[e]=t[A];return e}z&&(V=document.createElement("div").style,"AnimationEvent"in window||(delete K.animationend.animation,delete K.animationiteration.animation,delete K.animationstart.animation),"TransitionEvent"in window||delete K.transitionend.transition);var Z=_("animationend"),q=_("animationiteration"),$=_("animationstart"),ee=_("transitionend"),Ae="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),te=null,ne=null,re=null;function oe(){if(re)return re;var e,A,t=ne,n=t.length,r="value"in te?te.value:te.textContent,o=r.length;for(e=0;e<n&&t[e]===r[e];e++);var i=n-e;for(A=1;A<=i&&t[n-A]===r[o-A];A++);return re=r.slice(e,1<A?1-A:void 0)}function ie(){return!0}function ce(){return!1}function ae(e,A,t,n){for(var r in this.dispatchConfig=e,this._targetInst=A,this.nativeEvent=t,e=this.constructor.Interface)e.hasOwnProperty(r)&&((A=e[r])?this[r]=A(t):"target"===r?this.target=n:this[r]=t[r]);return this.isDefaultPrevented=(null!=t.defaultPrevented?t.defaultPrevented:!1===t.returnValue)?ie:ce,this.isPropagationStopped=ce,this}function le(e,A,t,n){if(this.eventPool.length){var r=this.eventPool.pop();return this.call(r,e,A,t,n),r}return new this(e,A,t,n)}function ue(e){e instanceof this||i("279"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function se(e){e.eventPool=[],e.getPooled=le,e.release=ue}r(ae.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ie)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ie)},persist:function(){this.isPersistent=ie},isPersistent:ce,destructor:function(){var e,A=this.constructor.Interface;for(e in A)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ce,this._dispatchInstances=this._dispatchListeners=null}}),ae.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ae.extend=function(e){function A(){}function t(){return n.apply(this,arguments)}var n=this;A.prototype=n.prototype;var o=new A;return r(o,t.prototype),t.prototype=o,t.prototype.constructor=t,t.Interface=r({},n.Interface,e),t.extend=n.extend,se(t),t},se(ae);var ge=ae.extend({data:null}),Be=ae.extend({data:null}),fe=[9,13,27,32],Ee=z&&"CompositionEvent"in window,we=null;z&&"documentMode"in document&&(we=document.documentMode);var Qe=z&&"TextEvent"in window&&!we,pe=z&&(!Ee||we&&8<we&&11>=we),de=String.fromCharCode(32),he={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Ce=!1;function Fe(e,A){switch(e){case"keyup":return-1!==fe.indexOf(A.keyCode);case"keydown":return 229!==A.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Ye(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ye=!1;var me={eventTypes:he,extractEvents:function(e,A,t,n){var r=void 0,o=void 0;if(Ee)e:{switch(e){case"compositionstart":r=he.compositionStart;break e;case"compositionend":r=he.compositionEnd;break e;case"compositionupdate":r=he.compositionUpdate;break e}r=void 0}else ye?Fe(e,t)&&(r=he.compositionEnd):"keydown"===e&&229===t.keyCode&&(r=he.compositionStart);return r?(pe&&"ko"!==t.locale&&(ye||r!==he.compositionStart?r===he.compositionEnd&&ye&&(o=oe()):(ne="value"in(te=n)?te.value:te.textContent,ye=!0)),r=ge.getPooled(r,A,t,n),o?r.data=o:null!==(o=Ye(t))&&(r.data=o),j(r),o=r):o=null,(e=Qe?function(e,A){switch(e){case"compositionend":return Ye(A);case"keypress":return 32!==A.which?null:(Ce=!0,de);case"textInput":return(e=A.data)===de&&Ce?null:e;default:return null}}(e,t):function(e,A){if(ye)return"compositionend"===e||!Ee&&Fe(e,A)?(e=oe(),re=ne=te=null,ye=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(A.ctrlKey||A.altKey||A.metaKey)||A.ctrlKey&&A.altKey){if(A.char&&1<A.char.length)return A.char;if(A.which)return String.fromCharCode(A.which)}return null;case"compositionend":return pe&&"ko"!==A.locale?null:A.data;default:return null}}(e,t))?((A=Be.getPooled(he.beforeInput,A,t,n)).data=e,j(A)):A=null,null===o?A:null===A?o:[o,A]}},Ie=null,ve=null,De=null;function xe(e){if(e=F(e)){"function"!=typeof Ie&&i("280");var A=C(e.stateNode);Ie(e.stateNode,e.type,A)}}function Me(e){ve?De?De.push(e):De=[e]:ve=e}function Ne(){if(ve){var e=ve,A=De;if(De=ve=null,xe(e),A)for(e=0;e<A.length;e++)xe(A[e])}}function be(e,A){return e(A)}function Ue(e,A,t){return e(A,t)}function He(){}var ke=!1;function Te(e,A){if(ke)return e(A);ke=!0;try{return be(e,A)}finally{ke=!1,(null!==ve||null!==De)&&(He(),Ne())}}var Re={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};function Je(e){var A=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===A?!!Re[e.type]:"textarea"===A}function Ge(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function Le(e){if(!z)return!1;var A=(e="on"+e)in document;return A||((A=document.createElement("div")).setAttribute(e,"return;"),A="function"==typeof A[e]),A}function Pe(e){var A=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===A||"radio"===A)}function Se(e){e._valueTracker||(e._valueTracker=function(e){var A=Pe(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,A),n=""+e[A];if(!e.hasOwnProperty(A)&&void 0!==t&&"function"==typeof t.get&&"function"==typeof t.set){var r=t.get,o=t.set;return Object.defineProperty(e,A,{configurable:!0,get:function(){return r.call(this)},set:function(e){n=""+e,o.call(this,e)}}),Object.defineProperty(e,A,{enumerable:t.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[A]}}}}(e))}function We(e){if(!e)return!1;var A=e._valueTracker;if(!A)return!0;var t=A.getValue(),n="";return e&&(n=Pe(e)?e.checked?"true":"false":e.value),(e=n)!==t&&(A.setValue(e),!0)}var je=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;je.hasOwnProperty("ReactCurrentDispatcher")||(je.ReactCurrentDispatcher={current:null});var ze=/^(.*)[\\\/]/,Oe="function"==typeof Symbol&&Symbol.for,Ke=Oe?Symbol.for("react.element"):60103,Xe=Oe?Symbol.for("react.portal"):60106,Ve=Oe?Symbol.for("react.fragment"):60107,_e=Oe?Symbol.for("react.strict_mode"):60108,Ze=Oe?Symbol.for("react.profiler"):60114,qe=Oe?Symbol.for("react.provider"):60109,$e=Oe?Symbol.for("react.context"):60110,eA=Oe?Symbol.for("react.concurrent_mode"):60111,AA=Oe?Symbol.for("react.forward_ref"):60112,tA=Oe?Symbol.for("react.suspense"):60113,nA=Oe?Symbol.for("react.memo"):60115,rA=Oe?Symbol.for("react.lazy"):60116,oA="function"==typeof Symbol&&Symbol.iterator;function iA(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=oA&&e[oA]||e["@@iterator"])?e:null}function cA(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case eA:return"ConcurrentMode";case Ve:return"Fragment";case Xe:return"Portal";case Ze:return"Profiler";case _e:return"StrictMode";case tA:return"Suspense"}if("object"==typeof e)switch(e.$$typeof){case $e:return"Context.Consumer";case qe:return"Context.Provider";case AA:var A=e.render;return A=A.displayName||A.name||"",e.displayName||(""!==A?"ForwardRef("+A+")":"ForwardRef");case nA:return cA(e.type);case rA:if(e=1===e._status?e._result:null)return cA(e)}return null}function aA(e){var A="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var t="";break e;default:var n=e._debugOwner,r=e._debugSource,o=cA(e.type);t=null,n&&(t=cA(n.type)),n=o,o="",r?o=" (at "+r.fileName.replace(ze,"")+":"+r.lineNumber+")":t&&(o=" (created by "+t+")"),t="\n in "+(n||"Unknown")+o}A+=t,e=e.return}while(e);return A}var lA=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,uA=Object.prototype.hasOwnProperty,sA={},gA={};function BA(e,A,t,n,r){this.acceptsBooleans=2===A||3===A||4===A,this.attributeName=n,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=e,this.type=A}var fA={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){fA[e]=new BA(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var A=e[0];fA[A]=new BA(A,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){fA[e]=new BA(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){fA[e]=new BA(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){fA[e]=new BA(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){fA[e]=new BA(e,3,!0,e,null)}),["capture","download"].forEach(function(e){fA[e]=new BA(e,4,!1,e,null)}),["cols","rows","size","span"].forEach(function(e){fA[e]=new BA(e,6,!1,e,null)}),["rowSpan","start"].forEach(function(e){fA[e]=new BA(e,5,!1,e.toLowerCase(),null)});var EA=/[\-:]([a-z])/g;function wA(e){return e[1].toUpperCase()}function QA(e,A,t,n){var r=fA.hasOwnProperty(A)?fA[A]:null;(null!==r?0===r.type:!n&&(2<A.length&&("o"===A[0]||"O"===A[0])&&("n"===A[1]||"N"===A[1])))||(function(e,A,t,n){if(null==A||function(e,A,t,n){if(null!==t&&0===t.type)return!1;switch(typeof A){case"function":case"symbol":return!0;case"boolean":return!n&&(null!==t?!t.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,A,t,n))return!0;if(n)return!1;if(null!==t)switch(t.type){case 3:return!A;case 4:return!1===A;case 5:return isNaN(A);case 6:return isNaN(A)||1>A}return!1}(A,t,r,n)&&(t=null),n||null===r?function(e){return!!uA.call(gA,e)||!uA.call(sA,e)&&(lA.test(e)?gA[e]=!0:(sA[e]=!0,!1))}(A)&&(null===t?e.removeAttribute(A):e.setAttribute(A,""+t)):r.mustUseProperty?e[r.propertyName]=null===t?3!==r.type&&"":t:(A=r.attributeName,n=r.attributeNamespace,null===t?e.removeAttribute(A):(t=3===(r=r.type)||4===r&&!0===t?"":""+t,n?e.setAttributeNS(n,A,t):e.setAttribute(A,t))))}function pA(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function dA(e,A){var t=A.checked;return r({},A,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=t?t:e._wrapperState.initialChecked})}function hA(e,A){var t=null==A.defaultValue?"":A.defaultValue,n=null!=A.checked?A.checked:A.defaultChecked;t=pA(null!=A.value?A.value:t),e._wrapperState={initialChecked:n,initialValue:t,controlled:"checkbox"===A.type||"radio"===A.type?null!=A.checked:null!=A.value}}function CA(e,A){null!=(A=A.checked)&&QA(e,"checked",A,!1)}function FA(e,A){CA(e,A);var t=pA(A.value),n=A.type;if(null!=t)"number"===n?(0===t&&""===e.value||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");A.hasOwnProperty("value")?yA(e,A.type,t):A.hasOwnProperty("defaultValue")&&yA(e,A.type,pA(A.defaultValue)),null==A.checked&&null!=A.defaultChecked&&(e.defaultChecked=!!A.defaultChecked)}function YA(e,A,t){if(A.hasOwnProperty("value")||A.hasOwnProperty("defaultValue")){var n=A.type;if(!("submit"!==n&&"reset"!==n||void 0!==A.value&&null!==A.value))return;A=""+e._wrapperState.initialValue,t||A===e.value||(e.value=A),e.defaultValue=A}""!==(t=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==t&&(e.name=t)}function yA(e,A,t){"number"===A&&e.ownerDocument.activeElement===e||(null==t?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var A=e.replace(EA,wA);fA[A]=new BA(A,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var A=e.replace(EA,wA);fA[A]=new BA(A,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var A=e.replace(EA,wA);fA[A]=new BA(A,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),["tabIndex","crossOrigin"].forEach(function(e){fA[e]=new BA(e,1,!1,e.toLowerCase(),null)});var mA={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function IA(e,A,t){return(e=ae.getPooled(mA.change,e,A,t)).type="change",Me(t),j(e),e}var vA=null,DA=null;function xA(e){N(e)}function MA(e){if(We(R(e)))return e}function NA(e,A){if("change"===e)return A}var bA=!1;function UA(){vA&&(vA.detachEvent("onpropertychange",HA),DA=vA=null)}function HA(e){"value"===e.propertyName&&MA(DA)&&Te(xA,e=IA(DA,e,Ge(e)))}function kA(e,A,t){"focus"===e?(UA(),DA=t,(vA=A).attachEvent("onpropertychange",HA)):"blur"===e&&UA()}function TA(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return MA(DA)}function RA(e,A){if("click"===e)return MA(A)}function JA(e,A){if("input"===e||"change"===e)return MA(A)}z&&(bA=Le("input")&&(!document.documentMode||9<document.documentMode));var GA={eventTypes:mA,_isInputEventSupported:bA,extractEvents:function(e,A,t,n){var r=A?R(A):window,o=void 0,i=void 0,c=r.nodeName&&r.nodeName.toLowerCase();if("select"===c||"input"===c&&"file"===r.type?o=NA:Je(r)?bA?o=JA:(o=TA,i=kA):(c=r.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===r.type||"radio"===r.type)&&(o=RA),o&&(o=o(e,A)))return IA(o,t,n);i&&i(e,r,A),"blur"===e&&(e=r._wrapperState)&&e.controlled&&"number"===r.type&&yA(r,"number",r.value)}},LA=ae.extend({view:null,detail:null}),PA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SA(e){var A=this.nativeEvent;return A.getModifierState?A.getModifierState(e):!!(e=PA[e])&&!!A[e]}function WA(){return SA}var jA=0,zA=0,OA=!1,KA=!1,XA=LA.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:WA,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var A=jA;return jA=e.screenX,OA?"mousemove"===e.type?e.screenX-A:0:(OA=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var A=zA;return zA=e.screenY,KA?"mousemove"===e.type?e.screenY-A:0:(KA=!0,0)}}),VA=XA.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),_A={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},ZA={eventTypes:_A,extractEvents:function(e,A,t,n){var r="mouseover"===e||"pointerover"===e,o="mouseout"===e||"pointerout"===e;if(r&&(t.relatedTarget||t.fromElement)||!o&&!r)return null;if(r=n.window===n?n:(r=n.ownerDocument)?r.defaultView||r.parentWindow:window,o?(o=A,A=(A=t.relatedTarget||t.toElement)?k(A):null):o=null,o===A)return null;var i=void 0,c=void 0,a=void 0,l=void 0;"mouseout"===e||"mouseover"===e?(i=XA,c=_A.mouseLeave,a=_A.mouseEnter,l="mouse"):"pointerout"!==e&&"pointerover"!==e||(i=VA,c=_A.pointerLeave,a=_A.pointerEnter,l="pointer");var u=null==o?r:R(o);if(r=null==A?r:R(A),(e=i.getPooled(c,o,t,n)).type=l+"leave",e.target=u,e.relatedTarget=r,(t=i.getPooled(a,A,t,n)).type=l+"enter",t.target=r,t.relatedTarget=u,n=A,o&&n)e:{for(r=n,l=0,i=A=o;i;i=G(i))l++;for(i=0,a=r;a;a=G(a))i++;for(;0<l-i;)A=G(A),l--;for(;0<i-l;)r=G(r),i--;for(;l--;){if(A===r||A===r.alternate)break e;A=G(A),r=G(r)}A=null}else A=null;for(r=A,A=[];o&&o!==r&&(null===(l=o.alternate)||l!==r);)A.push(o),o=G(o);for(o=[];n&&n!==r&&(null===(l=n.alternate)||l!==r);)o.push(n),n=G(n);for(n=0;n<A.length;n++)S(A[n],"bubbled",e);for(n=o.length;0<n--;)S(o[n],"captured",t);return[e,t]}};function qA(e,A){return e===A&&(0!==e||1/e==1/A)||e!=e&&A!=A}var $A=Object.prototype.hasOwnProperty;function et(e,A){if(qA(e,A))return!0;if("object"!=typeof e||null===e||"object"!=typeof A||null===A)return!1;var t=Object.keys(e),n=Object.keys(A);if(t.length!==n.length)return!1;for(n=0;n<t.length;n++)if(!$A.call(A,t[n])||!qA(e[t[n]],A[t[n]]))return!1;return!0}function At(e){var A=e;if(e.alternate)for(;A.return;)A=A.return;else{if(0!=(2&A.effectTag))return 1;for(;A.return;)if(0!=(2&(A=A.return).effectTag))return 1}return 3===A.tag?2:3}function tt(e){2!==At(e)&&i("188")}function nt(e){if(!(e=function(e){var A=e.alternate;if(!A)return 3===(A=At(e))&&i("188"),1===A?null:e;for(var t=e,n=A;;){var r=t.return,o=r?r.alternate:null;if(!r||!o)break;if(r.child===o.child){for(var c=r.child;c;){if(c===t)return tt(r),e;if(c===n)return tt(r),A;c=c.sibling}i("188")}if(t.return!==n.return)t=r,n=o;else{c=!1;for(var a=r.child;a;){if(a===t){c=!0,t=r,n=o;break}if(a===n){c=!0,n=r,t=o;break}a=a.sibling}if(!c){for(a=o.child;a;){if(a===t){c=!0,t=o,n=r;break}if(a===n){c=!0,n=o,t=r;break}a=a.sibling}c||i("189")}}t.alternate!==n&&i("190")}return 3!==t.tag&&i("188"),t.stateNode.current===t?e:A}(e)))return null;for(var A=e;;){if(5===A.tag||6===A.tag)return A;if(A.child)A.child.return=A,A=A.child;else{if(A===e)break;for(;!A.sibling;){if(!A.return||A.return===e)return null;A=A.return}A.sibling.return=A.return,A=A.sibling}}return null}var rt=ae.extend({animationName:null,elapsedTime:null,pseudoElement:null}),ot=ae.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),it=LA.extend({relatedTarget:null});function ct(e){var A=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===A&&(e=13):e=A,10===e&&(e=13),32<=e||13===e?e:0}var at={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lt={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"},ut=LA.extend({key:function(e){if(e.key){var A=at[e.key]||e.key;if("Unidentified"!==A)return A}return"keypress"===e.type?13===(e=ct(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?lt[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:WA,charCode:function(e){return"keypress"===e.type?ct(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ct(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),st=XA.extend({dataTransfer:null}),gt=LA.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:WA}),Bt=ae.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ft=XA.extend({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}),Et=[["abort","abort"],[Z,"animationEnd"],[q,"animationIteration"],[$,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[ee,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],wt={},Qt={};function pt(e,A){var t=e[0],n="on"+((e=e[1])[0].toUpperCase()+e.slice(1));A={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[t],isInteractive:A},wt[e]=A,Qt[t]=A}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(e){pt(e,!0)}),Et.forEach(function(e){pt(e,!1)});var dt={eventTypes:wt,isInteractiveTopLevelEventType:function(e){return void 0!==(e=Qt[e])&&!0===e.isInteractive},extractEvents:function(e,A,t,n){var r=Qt[e];if(!r)return null;switch(e){case"keypress":if(0===ct(t))return null;case"keydown":case"keyup":e=ut;break;case"blur":case"focus":e=it;break;case"click":if(2===t.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=XA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=st;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=gt;break;case Z:case q:case $:e=rt;break;case ee:e=Bt;break;case"scroll":e=LA;break;case"wheel":e=ft;break;case"copy":case"cut":case"paste":e=ot;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=VA;break;default:e=ae}return j(A=e.getPooled(r,A,t,n)),A}},ht=dt.isInteractiveTopLevelEventType,Ct=[];function Ft(e){var A=e.targetInst,t=A;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=k(n)}while(t);for(t=0;t<e.ancestors.length;t++){A=e.ancestors[t];var r=Ge(e.nativeEvent);n=e.topLevelType;for(var o=e.nativeEvent,i=null,c=0;c<Q.length;c++){var a=Q[c];a&&(a=a.extractEvents(n,A,o,r))&&(i=m(i,a))}N(i)}}var Yt=!0;function yt(e,A){if(!A)return null;var t=(ht(e)?It:vt).bind(null,e);A.addEventListener(e,t,!1)}function mt(e,A){if(!A)return null;var t=(ht(e)?It:vt).bind(null,e);A.addEventListener(e,t,!0)}function It(e,A){Ue(vt,e,A)}function vt(e,A){if(Yt){var t=Ge(A);if(null===(t=k(t))||"number"!=typeof t.tag||2===At(t)||(t=null),Ct.length){var n=Ct.pop();n.topLevelType=e,n.nativeEvent=A,n.targetInst=t,e=n}else e={topLevelType:e,nativeEvent:A,targetInst:t,ancestors:[]};try{Te(Ft,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Ct.length&&Ct.push(e)}}}var Dt={},xt=0,Mt="_reactListenersID"+(""+Math.random()).slice(2);function Nt(e){return Object.prototype.hasOwnProperty.call(e,Mt)||(e[Mt]=xt++,Dt[e[Mt]]={}),Dt[e[Mt]]}function bt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(A){return e.body}}function Ut(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ht(e,A){var t,n=Ut(e);for(e=0;n;){if(3===n.nodeType){if(t=e+n.textContent.length,e<=A&&t>=A)return{node:n,offset:A-e};e=t}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ut(n)}}function kt(){for(var e=window,A=bt();A instanceof e.HTMLIFrameElement;){try{var t="string"==typeof A.contentWindow.location.href}catch(e){t=!1}if(!t)break;A=bt((e=A.contentWindow).document)}return A}function Tt(e){var A=e&&e.nodeName&&e.nodeName.toLowerCase();return A&&("input"===A&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===A||"true"===e.contentEditable)}function Rt(e){var A=kt(),t=e.focusedElem,n=e.selectionRange;if(A!==t&&t&&t.ownerDocument&&function e(A,t){return!(!A||!t)&&(A===t||(!A||3!==A.nodeType)&&(t&&3===t.nodeType?e(A,t.parentNode):"contains"in A?A.contains(t):!!A.compareDocumentPosition&&!!(16&A.compareDocumentPosition(t))))}(t.ownerDocument.documentElement,t)){if(null!==n&&Tt(t))if(A=n.start,void 0===(e=n.end)&&(e=A),"selectionStart"in t)t.selectionStart=A,t.selectionEnd=Math.min(e,t.value.length);else if((e=(A=t.ownerDocument||document)&&A.defaultView||window).getSelection){e=e.getSelection();var r=t.textContent.length,o=Math.min(n.start,r);n=void 0===n.end?o:Math.min(n.end,r),!e.extend&&o>n&&(r=n,n=o,o=r),r=Ht(t,o);var i=Ht(t,n);r&&i&&(1!==e.rangeCount||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((A=A.createRange()).setStart(r.node,r.offset),e.removeAllRanges(),o>n?(e.addRange(A),e.extend(i.node,i.offset)):(A.setEnd(i.node,i.offset),e.addRange(A)))}for(A=[],e=t;e=e.parentNode;)1===e.nodeType&&A.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;t<A.length;t++)(e=A[t]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Jt=z&&"documentMode"in document&&11>=document.documentMode,Gt={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Lt=null,Pt=null,St=null,Wt=!1;function jt(e,A){var t=A.window===A?A.document:9===A.nodeType?A:A.ownerDocument;return Wt||null==Lt||Lt!==bt(t)?null:("selectionStart"in(t=Lt)&&Tt(t)?t={start:t.selectionStart,end:t.selectionEnd}:t={anchorNode:(t=(t.ownerDocument&&t.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset},St&&et(St,t)?null:(St=t,(e=ae.getPooled(Gt.select,Pt,e,A)).type="select",e.target=Lt,j(e),e))}var zt={eventTypes:Gt,extractEvents:function(e,A,t,n){var r,o=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;if(!(r=!o)){e:{o=Nt(o),r=h.onSelect;for(var i=0;i<r.length;i++){var c=r[i];if(!o.hasOwnProperty(c)||!o[c]){o=!1;break e}}o=!0}r=!o}if(r)return null;switch(o=A?R(A):window,e){case"focus":(Je(o)||"true"===o.contentEditable)&&(Lt=o,Pt=A,St=null);break;case"blur":St=Pt=Lt=null;break;case"mousedown":Wt=!0;break;case"contextmenu":case"mouseup":case"dragend":return Wt=!1,jt(t,n);case"selectionchange":if(Jt)break;case"keydown":case"keyup":return jt(t,n)}return null}};function Ot(e,A){return e=r({children:void 0},A),(A=function(e){var A="";return n.Children.forEach(e,function(e){null!=e&&(A+=e)}),A}(A.children))&&(e.children=A),e}function Kt(e,A,t,n){if(e=e.options,A){A={};for(var r=0;r<t.length;r++)A["$"+t[r]]=!0;for(t=0;t<e.length;t++)r=A.hasOwnProperty("$"+e[t].value),e[t].selected!==r&&(e[t].selected=r),r&&n&&(e[t].defaultSelected=!0)}else{for(t=""+pA(t),A=null,r=0;r<e.length;r++){if(e[r].value===t)return e[r].selected=!0,void(n&&(e[r].defaultSelected=!0));null!==A||e[r].disabled||(A=e[r])}null!==A&&(A.selected=!0)}}function Xt(e,A){return null!=A.dangerouslySetInnerHTML&&i("91"),r({},A,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Vt(e,A){var t=A.value;null==t&&(t=A.defaultValue,null!=(A=A.children)&&(null!=t&&i("92"),Array.isArray(A)&&(1>=A.length||i("93"),A=A[0]),t=A),null==t&&(t="")),e._wrapperState={initialValue:pA(t)}}function _t(e,A){var t=pA(A.value),n=pA(A.defaultValue);null!=t&&((t=""+t)!==e.value&&(e.value=t),null==A.defaultValue&&e.defaultValue!==t&&(e.defaultValue=t)),null!=n&&(e.defaultValue=""+n)}function Zt(e){var A=e.textContent;A===e._wrapperState.initialValue&&(e.value=A)}x.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),C=J,F=T,Y=R,x.injectEventPluginsByName({SimpleEventPlugin:dt,EnterLeaveEventPlugin:ZA,ChangeEventPlugin:GA,SelectEventPlugin:zt,BeforeInputEventPlugin:me});var qt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function $t(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function en(e,A){return null==e||"http://www.w3.org/1999/xhtml"===e?$t(A):"http://www.w3.org/2000/svg"===e&&"foreignObject"===A?"http://www.w3.org/1999/xhtml":e}var An,tn=void 0,nn=(An=function(e,A){if(e.namespaceURI!==qt.svg||"innerHTML"in e)e.innerHTML=A;else{for((tn=tn||document.createElement("div")).innerHTML="<svg>"+A+"</svg>",A=tn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;A.firstChild;)e.appendChild(A.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,A,t,n){MSApp.execUnsafeLocalFunction(function(){return An(e,A)})}:An);function rn(e,A){if(A){var t=e.firstChild;if(t&&t===e.lastChild&&3===t.nodeType)return void(t.nodeValue=A)}e.textContent=A}var on={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!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},cn=["Webkit","ms","Moz","O"];function an(e,A,t){return null==A||"boolean"==typeof A||""===A?"":t||"number"!=typeof A||0===A||on.hasOwnProperty(e)&&on[e]?(""+A).trim():A+"px"}function ln(e,A){for(var t in e=e.style,A)if(A.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=an(t,A[t],n);"float"===t&&(t="cssFloat"),n?e.setProperty(t,r):e[t]=r}}Object.keys(on).forEach(function(e){cn.forEach(function(A){A=A+e.charAt(0).toUpperCase()+e.substring(1),on[A]=on[e]})});var un=r({menuitem:!0},{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});function sn(e,A){A&&(un[e]&&(null!=A.children||null!=A.dangerouslySetInnerHTML)&&i("137",e,""),null!=A.dangerouslySetInnerHTML&&(null!=A.children&&i("60"),"object"==typeof A.dangerouslySetInnerHTML&&"__html"in A.dangerouslySetInnerHTML||i("61")),null!=A.style&&"object"!=typeof A.style&&i("62",""))}function gn(e,A){if(-1===e.indexOf("-"))return"string"==typeof A.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Bn(e,A){var t=Nt(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);A=h[A];for(var n=0;n<A.length;n++){var r=A[n];if(!t.hasOwnProperty(r)||!t[r]){switch(r){case"scroll":mt("scroll",e);break;case"focus":case"blur":mt("focus",e),mt("blur",e),t.blur=!0,t.focus=!0;break;case"cancel":case"close":Le(r)&&mt(r,e);break;case"invalid":case"submit":case"reset":break;default:-1===Ae.indexOf(r)&&yt(r,e)}t[r]=!0}}}function fn(){}var En=null,wn=null;function Qn(e,A){switch(e){case"button":case"input":case"select":case"textarea":return!!A.autoFocus}return!1}function pn(e,A){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof A.children||"number"==typeof A.children||"object"==typeof A.dangerouslySetInnerHTML&&null!==A.dangerouslySetInnerHTML&&null!=A.dangerouslySetInnerHTML.__html}var dn="function"==typeof setTimeout?setTimeout:void 0,hn="function"==typeof clearTimeout?clearTimeout:void 0,Cn=o.unstable_scheduleCallback,Fn=o.unstable_cancelCallback;function Yn(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function yn(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}new Set;var mn=[],In=-1;function vn(e){0>In||(e.current=mn[In],mn[In]=null,In--)}function Dn(e,A){mn[++In]=e.current,e.current=A}var xn={},Mn={current:xn},Nn={current:!1},bn=xn;function Un(e,A){var t=e.type.contextTypes;if(!t)return xn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===A)return n.__reactInternalMemoizedMaskedChildContext;var r,o={};for(r in t)o[r]=A[r];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=A,e.__reactInternalMemoizedMaskedChildContext=o),o}function Hn(e){return null!=(e=e.childContextTypes)}function kn(e){vn(Nn),vn(Mn)}function Tn(e){vn(Nn),vn(Mn)}function Rn(e,A,t){Mn.current!==xn&&i("168"),Dn(Mn,A),Dn(Nn,t)}function Jn(e,A,t){var n=e.stateNode;if(e=A.childContextTypes,"function"!=typeof n.getChildContext)return t;for(var o in n=n.getChildContext())o in e||i("108",cA(A)||"Unknown",o);return r({},t,n)}function Gn(e){var A=e.stateNode;return A=A&&A.__reactInternalMemoizedMergedChildContext||xn,bn=Mn.current,Dn(Mn,A),Dn(Nn,Nn.current),!0}function Ln(e,A,t){var n=e.stateNode;n||i("169"),t?(A=Jn(e,A,bn),n.__reactInternalMemoizedMergedChildContext=A,vn(Nn),vn(Mn),Dn(Mn,A)):vn(Nn),Dn(Nn,t)}var Pn=null,Sn=null;function Wn(e){return function(A){try{return e(A)}catch(e){}}}function jn(e,A,t,n){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=A,this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function zn(e,A,t,n){return new jn(e,A,t,n)}function On(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Kn(e,A){var t=e.alternate;return null===t?((t=zn(e.tag,A,e.key,e.mode)).elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=A,t.effectTag=0,t.nextEffect=null,t.firstEffect=null,t.lastEffect=null),t.childExpirationTime=e.childExpirationTime,t.expirationTime=e.expirationTime,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,t.contextDependencies=e.contextDependencies,t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Xn(e,A,t,n,r,o){var c=2;if(n=e,"function"==typeof e)On(e)&&(c=1);else if("string"==typeof e)c=5;else e:switch(e){case Ve:return Vn(t.children,r,o,A);case eA:return _n(t,3|r,o,A);case _e:return _n(t,2|r,o,A);case Ze:return(e=zn(12,t,A,4|r)).elementType=Ze,e.type=Ze,e.expirationTime=o,e;case tA:return(e=zn(13,t,A,r)).elementType=tA,e.type=tA,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case qe:c=10;break e;case $e:c=9;break e;case AA:c=11;break e;case nA:c=14;break e;case rA:c=16,n=null;break e}i("130",null==e?e:typeof e,"")}return(A=zn(c,t,A,r)).elementType=e,A.type=n,A.expirationTime=o,A}function Vn(e,A,t,n){return(e=zn(7,e,n,A)).expirationTime=t,e}function _n(e,A,t,n){return e=zn(8,e,n,A),A=0==(1&A)?_e:eA,e.elementType=A,e.type=A,e.expirationTime=t,e}function Zn(e,A,t){return(e=zn(6,e,null,A)).expirationTime=t,e}function qn(e,A,t){return(A=zn(4,null!==e.children?e.children:[],e.key,A)).expirationTime=t,A.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},A}function $n(e,A){e.didError=!1;var t=e.earliestPendingTime;0===t?e.earliestPendingTime=e.latestPendingTime=A:t<A?e.earliestPendingTime=A:e.latestPendingTime>A&&(e.latestPendingTime=A),tr(A,e)}function er(e,A){e.didError=!1,e.latestPingedTime>=A&&(e.latestPingedTime=0);var t=e.earliestPendingTime,n=e.latestPendingTime;t===A?e.earliestPendingTime=n===A?e.latestPendingTime=0:n:n===A&&(e.latestPendingTime=t),t=e.earliestSuspendedTime,n=e.latestSuspendedTime,0===t?e.earliestSuspendedTime=e.latestSuspendedTime=A:t<A?e.earliestSuspendedTime=A:n>A&&(e.latestSuspendedTime=A),tr(A,e)}function Ar(e,A){var t=e.earliestPendingTime;return t>A&&(A=t),(e=e.earliestSuspendedTime)>A&&(A=e),A}function tr(e,A){var t=A.earliestSuspendedTime,n=A.latestSuspendedTime,r=A.earliestPendingTime,o=A.latestPingedTime;0===(r=0!==r?r:o)&&(0===e||n<e)&&(r=n),0!==(e=r)&&t>e&&(e=t),A.nextExpirationTimeToWorkOn=r,A.expirationTime=e}function nr(e,A){if(e&&e.defaultProps)for(var t in A=r({},A),e=e.defaultProps)void 0===A[t]&&(A[t]=e[t]);return A}var rr=(new n.Component).refs;function or(e,A,t,n){t=null==(t=t(n,A=e.memoizedState))?A:r({},A,t),e.memoizedState=t,null!==(n=e.updateQueue)&&0===e.expirationTime&&(n.baseState=t)}var ir={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===At(e)},enqueueSetState:function(e,A,t){e=e._reactInternalFiber;var n=Fc(),r=_o(n=Vi(n,e));r.payload=A,null!=t&&(r.callback=t),Wi(),qo(e,r),qi(e,n)},enqueueReplaceState:function(e,A,t){e=e._reactInternalFiber;var n=Fc(),r=_o(n=Vi(n,e));r.tag=jo,r.payload=A,null!=t&&(r.callback=t),Wi(),qo(e,r),qi(e,n)},enqueueForceUpdate:function(e,A){e=e._reactInternalFiber;var t=Fc(),n=_o(t=Vi(t,e));n.tag=zo,null!=A&&(n.callback=A),Wi(),qo(e,n),qi(e,t)}};function cr(e,A,t,n,r,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,o,i):!A.prototype||!A.prototype.isPureReactComponent||(!et(t,n)||!et(r,o))}function ar(e,A,t){var n=!1,r=xn,o=A.contextType;return"object"==typeof o&&null!==o?o=So(o):(r=Hn(A)?bn:Mn.current,o=(n=null!=(n=A.contextTypes))?Un(e,r):xn),A=new A(t,o),e.memoizedState=null!==A.state&&void 0!==A.state?A.state:null,A.updater=ir,e.stateNode=A,A._reactInternalFiber=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=o),A}function lr(e,A,t,n){e=A.state,"function"==typeof A.componentWillReceiveProps&&A.componentWillReceiveProps(t,n),"function"==typeof A.UNSAFE_componentWillReceiveProps&&A.UNSAFE_componentWillReceiveProps(t,n),A.state!==e&&ir.enqueueReplaceState(A,A.state,null)}function ur(e,A,t,n){var r=e.stateNode;r.props=t,r.state=e.memoizedState,r.refs=rr;var o=A.contextType;"object"==typeof o&&null!==o?r.context=So(o):(o=Hn(A)?bn:Mn.current,r.context=Un(e,o)),null!==(o=e.updateQueue)&&(ti(e,o,t,r,n),r.state=e.memoizedState),"function"==typeof(o=A.getDerivedStateFromProps)&&(or(e,A,o,t),r.state=e.memoizedState),"function"==typeof A.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(A=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),A!==r.state&&ir.enqueueReplaceState(r,r.state,null),null!==(o=e.updateQueue)&&(ti(e,o,t,r,n),r.state=e.memoizedState)),"function"==typeof r.componentDidMount&&(e.effectTag|=4)}var sr=Array.isArray;function gr(e,A,t){if(null!==(e=t.ref)&&"function"!=typeof e&&"object"!=typeof e){if(t._owner){t=t._owner;var n=void 0;t&&(1!==t.tag&&i("309"),n=t.stateNode),n||i("147",e);var r=""+e;return null!==A&&null!==A.ref&&"function"==typeof A.ref&&A.ref._stringRef===r?A.ref:((A=function(e){var A=n.refs;A===rr&&(A=n.refs={}),null===e?delete A[r]:A[r]=e})._stringRef=r,A)}"string"!=typeof e&&i("284"),t._owner||i("290",e)}return e}function Br(e,A){"textarea"!==e.type&&i("31","[object Object]"===Object.prototype.toString.call(A)?"object with keys {"+Object.keys(A).join(", ")+"}":A,"")}function fr(e){function A(A,t){if(e){var n=A.lastEffect;null!==n?(n.nextEffect=t,A.lastEffect=t):A.firstEffect=A.lastEffect=t,t.nextEffect=null,t.effectTag=8}}function t(t,n){if(!e)return null;for(;null!==n;)A(t,n),n=n.sibling;return null}function n(e,A){for(e=new Map;null!==A;)null!==A.key?e.set(A.key,A):e.set(A.index,A),A=A.sibling;return e}function r(e,A,t){return(e=Kn(e,A)).index=0,e.sibling=null,e}function o(A,t,n){return A.index=n,e?null!==(n=A.alternate)?(n=n.index)<t?(A.effectTag=2,t):n:(A.effectTag=2,t):t}function c(A){return e&&null===A.alternate&&(A.effectTag=2),A}function a(e,A,t,n){return null===A||6!==A.tag?((A=Zn(t,e.mode,n)).return=e,A):((A=r(A,t)).return=e,A)}function l(e,A,t,n){return null!==A&&A.elementType===t.type?((n=r(A,t.props)).ref=gr(e,A,t),n.return=e,n):((n=Xn(t.type,t.key,t.props,null,e.mode,n)).ref=gr(e,A,t),n.return=e,n)}function u(e,A,t,n){return null===A||4!==A.tag||A.stateNode.containerInfo!==t.containerInfo||A.stateNode.implementation!==t.implementation?((A=qn(t,e.mode,n)).return=e,A):((A=r(A,t.children||[])).return=e,A)}function s(e,A,t,n,o){return null===A||7!==A.tag?((A=Vn(t,e.mode,n,o)).return=e,A):((A=r(A,t)).return=e,A)}function g(e,A,t){if("string"==typeof A||"number"==typeof A)return(A=Zn(""+A,e.mode,t)).return=e,A;if("object"==typeof A&&null!==A){switch(A.$$typeof){case Ke:return(t=Xn(A.type,A.key,A.props,null,e.mode,t)).ref=gr(e,null,A),t.return=e,t;case Xe:return(A=qn(A,e.mode,t)).return=e,A}if(sr(A)||iA(A))return(A=Vn(A,e.mode,t,null)).return=e,A;Br(e,A)}return null}function B(e,A,t,n){var r=null!==A?A.key:null;if("string"==typeof t||"number"==typeof t)return null!==r?null:a(e,A,""+t,n);if("object"==typeof t&&null!==t){switch(t.$$typeof){case Ke:return t.key===r?t.type===Ve?s(e,A,t.props.children,n,r):l(e,A,t,n):null;case Xe:return t.key===r?u(e,A,t,n):null}if(sr(t)||iA(t))return null!==r?null:s(e,A,t,n,null);Br(e,t)}return null}function f(e,A,t,n,r){if("string"==typeof n||"number"==typeof n)return a(A,e=e.get(t)||null,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Ke:return e=e.get(null===n.key?t:n.key)||null,n.type===Ve?s(A,e,n.props.children,r,n.key):l(A,e,n,r);case Xe:return u(A,e=e.get(null===n.key?t:n.key)||null,n,r)}if(sr(n)||iA(n))return s(A,e=e.get(t)||null,n,r,null);Br(A,n)}return null}function E(r,i,c,a){for(var l=null,u=null,s=i,E=i=0,w=null;null!==s&&E<c.length;E++){s.index>E?(w=s,s=null):w=s.sibling;var Q=B(r,s,c[E],a);if(null===Q){null===s&&(s=w);break}e&&s&&null===Q.alternate&&A(r,s),i=o(Q,i,E),null===u?l=Q:u.sibling=Q,u=Q,s=w}if(E===c.length)return t(r,s),l;if(null===s){for(;E<c.length;E++)(s=g(r,c[E],a))&&(i=o(s,i,E),null===u?l=s:u.sibling=s,u=s);return l}for(s=n(r,s);E<c.length;E++)(w=f(s,r,E,c[E],a))&&(e&&null!==w.alternate&&s.delete(null===w.key?E:w.key),i=o(w,i,E),null===u?l=w:u.sibling=w,u=w);return e&&s.forEach(function(e){return A(r,e)}),l}function w(r,c,a,l){var u=iA(a);"function"!=typeof u&&i("150"),null==(a=u.call(a))&&i("151");for(var s=u=null,E=c,w=c=0,Q=null,p=a.next();null!==E&&!p.done;w++,p=a.next()){E.index>w?(Q=E,E=null):Q=E.sibling;var d=B(r,E,p.value,l);if(null===d){E||(E=Q);break}e&&E&&null===d.alternate&&A(r,E),c=o(d,c,w),null===s?u=d:s.sibling=d,s=d,E=Q}if(p.done)return t(r,E),u;if(null===E){for(;!p.done;w++,p=a.next())null!==(p=g(r,p.value,l))&&(c=o(p,c,w),null===s?u=p:s.sibling=p,s=p);return u}for(E=n(r,E);!p.done;w++,p=a.next())null!==(p=f(E,r,w,p.value,l))&&(e&&null!==p.alternate&&E.delete(null===p.key?w:p.key),c=o(p,c,w),null===s?u=p:s.sibling=p,s=p);return e&&E.forEach(function(e){return A(r,e)}),u}return function(e,n,o,a){var l="object"==typeof o&&null!==o&&o.type===Ve&&null===o.key;l&&(o=o.props.children);var u="object"==typeof o&&null!==o;if(u)switch(o.$$typeof){case Ke:e:{for(u=o.key,l=n;null!==l;){if(l.key===u){if(7===l.tag?o.type===Ve:l.elementType===o.type){t(e,l.sibling),(n=r(l,o.type===Ve?o.props.children:o.props)).ref=gr(e,l,o),n.return=e,e=n;break e}t(e,l);break}A(e,l),l=l.sibling}o.type===Ve?((n=Vn(o.props.children,e.mode,a,o.key)).return=e,e=n):((a=Xn(o.type,o.key,o.props,null,e.mode,a)).ref=gr(e,n,o),a.return=e,e=a)}return c(e);case Xe:e:{for(l=o.key;null!==n;){if(n.key===l){if(4===n.tag&&n.stateNode.containerInfo===o.containerInfo&&n.stateNode.implementation===o.implementation){t(e,n.sibling),(n=r(n,o.children||[])).return=e,e=n;break e}t(e,n);break}A(e,n),n=n.sibling}(n=qn(o,e.mode,a)).return=e,e=n}return c(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==n&&6===n.tag?(t(e,n.sibling),(n=r(n,o)).return=e,e=n):(t(e,n),(n=Zn(o,e.mode,a)).return=e,e=n),c(e);if(sr(o))return E(e,n,o,a);if(iA(o))return w(e,n,o,a);if(u&&Br(e,o),void 0===o&&!l)switch(e.tag){case 1:case 0:i("152",(a=e.type).displayName||a.name||"Component")}return t(e,n)}}var Er=fr(!0),wr=fr(!1),Qr={},pr={current:Qr},dr={current:Qr},hr={current:Qr};function Cr(e){return e===Qr&&i("174"),e}function Fr(e,A){Dn(hr,A),Dn(dr,e),Dn(pr,Qr);var t=A.nodeType;switch(t){case 9:case 11:A=(A=A.documentElement)?A.namespaceURI:en(null,"");break;default:A=en(A=(t=8===t?A.parentNode:A).namespaceURI||null,t=t.tagName)}vn(pr),Dn(pr,A)}function Yr(e){vn(pr),vn(dr),vn(hr)}function yr(e){Cr(hr.current);var A=Cr(pr.current),t=en(A,e.type);A!==t&&(Dn(dr,e),Dn(pr,t))}function mr(e){dr.current===e&&(vn(pr),vn(dr))}var Ir=0,vr=2,Dr=4,xr=8,Mr=16,Nr=32,br=64,Ur=128,Hr=je.ReactCurrentDispatcher,kr=0,Tr=null,Rr=null,Jr=null,Gr=null,Lr=null,Pr=null,Sr=0,Wr=null,jr=0,zr=!1,Or=null,Kr=0;function Xr(){i("321")}function Vr(e,A){if(null===A)return!1;for(var t=0;t<A.length&&t<e.length;t++)if(!qA(e[t],A[t]))return!1;return!0}function _r(e,A,t,n,r,o){if(kr=o,Tr=A,Jr=null!==e?e.memoizedState:null,Hr.current=null===Jr?lo:uo,A=t(n,r),zr){do{zr=!1,Kr+=1,Jr=null!==e?e.memoizedState:null,Pr=Gr,Wr=Lr=Rr=null,Hr.current=uo,A=t(n,r)}while(zr);Or=null,Kr=0}return Hr.current=ao,(e=Tr).memoizedState=Gr,e.expirationTime=Sr,e.updateQueue=Wr,e.effectTag|=jr,e=null!==Rr&&null!==Rr.next,kr=0,Pr=Lr=Gr=Jr=Rr=Tr=null,Sr=0,Wr=null,jr=0,e&&i("300"),A}function Zr(){Hr.current=ao,kr=0,Pr=Lr=Gr=Jr=Rr=Tr=null,Sr=0,Wr=null,jr=0,zr=!1,Or=null,Kr=0}function qr(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===Lr?Gr=Lr=e:Lr=Lr.next=e,Lr}function $r(){if(null!==Pr)Pr=(Lr=Pr).next,Jr=null!==(Rr=Jr)?Rr.next:null;else{null===Jr&&i("310");var e={memoizedState:(Rr=Jr).memoizedState,baseState:Rr.baseState,queue:Rr.queue,baseUpdate:Rr.baseUpdate,next:null};Lr=null===Lr?Gr=e:Lr.next=e,Jr=Rr.next}return Lr}function eo(e,A){return"function"==typeof A?A(e):A}function Ao(e){var A=$r(),t=A.queue;if(null===t&&i("311"),t.lastRenderedReducer=e,0<Kr){var n=t.dispatch;if(null!==Or){var r=Or.get(t);if(void 0!==r){Or.delete(t);var o=A.memoizedState;do{o=e(o,r.action),r=r.next}while(null!==r);return qA(o,A.memoizedState)||(Fo=!0),A.memoizedState=o,A.baseUpdate===t.last&&(A.baseState=o),t.lastRenderedState=o,[o,n]}}return[A.memoizedState,n]}n=t.last;var c=A.baseUpdate;if(o=A.baseState,null!==c?(null!==n&&(n.next=null),n=c.next):n=null!==n?n.next:null,null!==n){var a=r=null,l=n,u=!1;do{var s=l.expirationTime;s<kr?(u||(u=!0,a=c,r=o),s>Sr&&(Sr=s)):o=l.eagerReducer===e?l.eagerState:e(o,l.action),c=l,l=l.next}while(null!==l&&l!==n);u||(a=c,r=o),qA(o,A.memoizedState)||(Fo=!0),A.memoizedState=o,A.baseUpdate=a,A.baseState=r,t.lastRenderedState=o}return[A.memoizedState,t.dispatch]}function to(e,A,t,n){return e={tag:e,create:A,destroy:t,deps:n,next:null},null===Wr?(Wr={lastEffect:null}).lastEffect=e.next=e:null===(A=Wr.lastEffect)?Wr.lastEffect=e.next=e:(t=A.next,A.next=e,e.next=t,Wr.lastEffect=e),e}function no(e,A,t,n){var r=qr();jr|=e,r.memoizedState=to(A,t,void 0,void 0===n?null:n)}function ro(e,A,t,n){var r=$r();n=void 0===n?null:n;var o=void 0;if(null!==Rr){var i=Rr.memoizedState;if(o=i.destroy,null!==n&&Vr(n,i.deps))return void to(Ir,t,o,n)}jr|=e,r.memoizedState=to(A,t,o,n)}function oo(e,A){return"function"==typeof A?(e=e(),A(e),function(){A(null)}):null!=A?(e=e(),A.current=e,function(){A.current=null}):void 0}function io(){}function co(e,A,t){25>Kr||i("301");var n=e.alternate;if(e===Tr||null!==n&&n===Tr)if(zr=!0,e={expirationTime:kr,action:t,eagerReducer:null,eagerState:null,next:null},null===Or&&(Or=new Map),void 0===(t=Or.get(A)))Or.set(A,e);else{for(A=t;null!==A.next;)A=A.next;A.next=e}else{Wi();var r=Fc(),o={expirationTime:r=Vi(r,e),action:t,eagerReducer:null,eagerState:null,next:null},c=A.last;if(null===c)o.next=o;else{var a=c.next;null!==a&&(o.next=a),c.next=o}if(A.last=o,0===e.expirationTime&&(null===n||0===n.expirationTime)&&null!==(n=A.lastRenderedReducer))try{var l=A.lastRenderedState,u=n(l,t);if(o.eagerReducer=n,o.eagerState=u,qA(u,l))return}catch(e){}qi(e,r)}}var ao={readContext:So,useCallback:Xr,useContext:Xr,useEffect:Xr,useImperativeHandle:Xr,useLayoutEffect:Xr,useMemo:Xr,useReducer:Xr,useRef:Xr,useState:Xr,useDebugValue:Xr},lo={readContext:So,useCallback:function(e,A){return qr().memoizedState=[e,void 0===A?null:A],e},useContext:So,useEffect:function(e,A){return no(516,Ur|br,e,A)},useImperativeHandle:function(e,A,t){return t=null!=t?t.concat([e]):null,no(4,Dr|Nr,oo.bind(null,A,e),t)},useLayoutEffect:function(e,A){return no(4,Dr|Nr,e,A)},useMemo:function(e,A){var t=qr();return A=void 0===A?null:A,e=e(),t.memoizedState=[e,A],e},useReducer:function(e,A,t){var n=qr();return A=void 0!==t?t(A):A,n.memoizedState=n.baseState=A,e=(e=n.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:A}).dispatch=co.bind(null,Tr,e),[n.memoizedState,e]},useRef:function(e){return e={current:e},qr().memoizedState=e},useState:function(e){var A=qr();return"function"==typeof e&&(e=e()),A.memoizedState=A.baseState=e,e=(e=A.queue={last:null,dispatch:null,lastRenderedReducer:eo,lastRenderedState:e}).dispatch=co.bind(null,Tr,e),[A.memoizedState,e]},useDebugValue:io},uo={readContext:So,useCallback:function(e,A){var t=$r();A=void 0===A?null:A;var n=t.memoizedState;return null!==n&&null!==A&&Vr(A,n[1])?n[0]:(t.memoizedState=[e,A],e)},useContext:So,useEffect:function(e,A){return ro(516,Ur|br,e,A)},useImperativeHandle:function(e,A,t){return t=null!=t?t.concat([e]):null,ro(4,Dr|Nr,oo.bind(null,A,e),t)},useLayoutEffect:function(e,A){return ro(4,Dr|Nr,e,A)},useMemo:function(e,A){var t=$r();A=void 0===A?null:A;var n=t.memoizedState;return null!==n&&null!==A&&Vr(A,n[1])?n[0]:(e=e(),t.memoizedState=[e,A],e)},useReducer:Ao,useRef:function(){return $r().memoizedState},useState:function(e){return Ao(eo)},useDebugValue:io},so=null,go=null,Bo=!1;function fo(e,A){var t=zn(5,null,null,0);t.elementType="DELETED",t.type="DELETED",t.stateNode=A,t.return=e,t.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=t,e.lastEffect=t):e.firstEffect=e.lastEffect=t}function Eo(e,A){switch(e.tag){case 5:var t=e.type;return null!==(A=1!==A.nodeType||t.toLowerCase()!==A.nodeName.toLowerCase()?null:A)&&(e.stateNode=A,!0);case 6:return null!==(A=""===e.pendingProps||3!==A.nodeType?null:A)&&(e.stateNode=A,!0);case 13:default:return!1}}function wo(e){if(Bo){var A=go;if(A){var t=A;if(!Eo(e,A)){if(!(A=Yn(t))||!Eo(e,A))return e.effectTag|=2,Bo=!1,void(so=e);fo(so,t)}so=e,go=yn(A)}else e.effectTag|=2,Bo=!1,so=e}}function Qo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;so=e}function po(e){if(e!==so)return!1;if(!Bo)return Qo(e),Bo=!0,!1;var A=e.type;if(5!==e.tag||"head"!==A&&"body"!==A&&!pn(A,e.memoizedProps))for(A=go;A;)fo(e,A),A=Yn(A);return Qo(e),go=so?Yn(e.stateNode):null,!0}function ho(){go=so=null,Bo=!1}var Co=je.ReactCurrentOwner,Fo=!1;function Yo(e,A,t,n){A.child=null===e?wr(A,null,t,n):Er(A,e.child,t,n)}function yo(e,A,t,n,r){t=t.render;var o=A.ref;return Po(A,r),n=_r(e,A,t,n,o,r),null===e||Fo?(A.effectTag|=1,Yo(e,A,n,r),A.child):(A.updateQueue=e.updateQueue,A.effectTag&=-517,e.expirationTime<=r&&(e.expirationTime=0),Uo(e,A,r))}function mo(e,A,t,n,r,o){if(null===e){var i=t.type;return"function"!=typeof i||On(i)||void 0!==i.defaultProps||null!==t.compare||void 0!==t.defaultProps?((e=Xn(t.type,null,n,null,A.mode,o)).ref=A.ref,e.return=A,A.child=e):(A.tag=15,A.type=i,Io(e,A,i,n,r,o))}return i=e.child,r<o&&(r=i.memoizedProps,(t=null!==(t=t.compare)?t:et)(r,n)&&e.ref===A.ref)?Uo(e,A,o):(A.effectTag|=1,(e=Kn(i,n)).ref=A.ref,e.return=A,A.child=e)}function Io(e,A,t,n,r,o){return null!==e&&et(e.memoizedProps,n)&&e.ref===A.ref&&(Fo=!1,r<o)?Uo(e,A,o):Do(e,A,t,n,o)}function vo(e,A){var t=A.ref;(null===e&&null!==t||null!==e&&e.ref!==t)&&(A.effectTag|=128)}function Do(e,A,t,n,r){var o=Hn(t)?bn:Mn.current;return o=Un(A,o),Po(A,r),t=_r(e,A,t,n,o,r),null===e||Fo?(A.effectTag|=1,Yo(e,A,t,r),A.child):(A.updateQueue=e.updateQueue,A.effectTag&=-517,e.expirationTime<=r&&(e.expirationTime=0),Uo(e,A,r))}function xo(e,A,t,n,r){if(Hn(t)){var o=!0;Gn(A)}else o=!1;if(Po(A,r),null===A.stateNode)null!==e&&(e.alternate=null,A.alternate=null,A.effectTag|=2),ar(A,t,n),ur(A,t,n,r),n=!0;else if(null===e){var i=A.stateNode,c=A.memoizedProps;i.props=c;var a=i.context,l=t.contextType;"object"==typeof l&&null!==l?l=So(l):l=Un(A,l=Hn(t)?bn:Mn.current);var u=t.getDerivedStateFromProps,s="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;s||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(c!==n||a!==l)&&lr(A,i,n,l),Ko=!1;var g=A.memoizedState;a=i.state=g;var B=A.updateQueue;null!==B&&(ti(A,B,n,i,r),a=A.memoizedState),c!==n||g!==a||Nn.current||Ko?("function"==typeof u&&(or(A,t,u,n),a=A.memoizedState),(c=Ko||cr(A,t,c,n,g,a,l))?(s||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(A.effectTag|=4)):("function"==typeof i.componentDidMount&&(A.effectTag|=4),A.memoizedProps=n,A.memoizedState=a),i.props=n,i.state=a,i.context=l,n=c):("function"==typeof i.componentDidMount&&(A.effectTag|=4),n=!1)}else i=A.stateNode,c=A.memoizedProps,i.props=A.type===A.elementType?c:nr(A.type,c),a=i.context,"object"==typeof(l=t.contextType)&&null!==l?l=So(l):l=Un(A,l=Hn(t)?bn:Mn.current),(s="function"==typeof(u=t.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(c!==n||a!==l)&&lr(A,i,n,l),Ko=!1,a=A.memoizedState,g=i.state=a,null!==(B=A.updateQueue)&&(ti(A,B,n,i,r),g=A.memoizedState),c!==n||a!==g||Nn.current||Ko?("function"==typeof u&&(or(A,t,u,n),g=A.memoizedState),(u=Ko||cr(A,t,c,n,a,g,l))?(s||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(n,g,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(n,g,l)),"function"==typeof i.componentDidUpdate&&(A.effectTag|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(A.effectTag|=256)):("function"!=typeof i.componentDidUpdate||c===e.memoizedProps&&a===e.memoizedState||(A.effectTag|=4),"function"!=typeof i.getSnapshotBeforeUpdate||c===e.memoizedProps&&a===e.memoizedState||(A.effectTag|=256),A.memoizedProps=n,A.memoizedState=g),i.props=n,i.state=g,i.context=l,n=u):("function"!=typeof i.componentDidUpdate||c===e.memoizedProps&&a===e.memoizedState||(A.effectTag|=4),"function"!=typeof i.getSnapshotBeforeUpdate||c===e.memoizedProps&&a===e.memoizedState||(A.effectTag|=256),n=!1);return Mo(e,A,t,n,o,r)}function Mo(e,A,t,n,r,o){vo(e,A);var i=0!=(64&A.effectTag);if(!n&&!i)return r&&Ln(A,t,!1),Uo(e,A,o);n=A.stateNode,Co.current=A;var c=i&&"function"!=typeof t.getDerivedStateFromError?null:n.render();return A.effectTag|=1,null!==e&&i?(A.child=Er(A,e.child,null,o),A.child=Er(A,null,c,o)):Yo(e,A,c,o),A.memoizedState=n.state,r&&Ln(A,t,!0),A.child}function No(e){var A=e.stateNode;A.pendingContext?Rn(0,A.pendingContext,A.pendingContext!==A.context):A.context&&Rn(0,A.context,!1),Fr(e,A.containerInfo)}function bo(e,A,t){var n=A.mode,r=A.pendingProps,o=A.memoizedState;if(0==(64&A.effectTag)){o=null;var i=!1}else o={timedOutAt:null!==o?o.timedOutAt:0},i=!0,A.effectTag&=-65;if(null===e)if(i){var c=r.fallback;e=Vn(null,n,0,null),0==(1&A.mode)&&(e.child=null!==A.memoizedState?A.child.child:A.child),n=Vn(c,n,t,null),e.sibling=n,(t=e).return=n.return=A}else t=n=wr(A,null,r.children,t);else null!==e.memoizedState?(c=(n=e.child).sibling,i?(t=r.fallback,r=Kn(n,n.pendingProps),0==(1&A.mode)&&((i=null!==A.memoizedState?A.child.child:A.child)!==n.child&&(r.child=i)),n=r.sibling=Kn(c,t,c.expirationTime),t=r,r.childExpirationTime=0,t.return=n.return=A):t=n=Er(A,n.child,r.children,t)):(c=e.child,i?(i=r.fallback,(r=Vn(null,n,0,null)).child=c,0==(1&A.mode)&&(r.child=null!==A.memoizedState?A.child.child:A.child),(n=r.sibling=Vn(i,n,t,null)).effectTag|=2,t=r,r.childExpirationTime=0,t.return=n.return=A):n=t=Er(A,c,r.children,t)),A.stateNode=e.stateNode;return A.memoizedState=o,A.child=t,n}function Uo(e,A,t){if(null!==e&&(A.contextDependencies=e.contextDependencies),A.childExpirationTime<t)return null;if(null!==e&&A.child!==e.child&&i("153"),null!==A.child){for(t=Kn(e=A.child,e.pendingProps,e.expirationTime),A.child=t,t.return=A;null!==e.sibling;)e=e.sibling,(t=t.sibling=Kn(e,e.pendingProps,e.expirationTime)).return=A;t.sibling=null}return A.child}function Ho(e,A,t){var n=A.expirationTime;if(null!==e){if(e.memoizedProps!==A.pendingProps||Nn.current)Fo=!0;else if(n<t){switch(Fo=!1,A.tag){case 3:No(A),ho();break;case 5:yr(A);break;case 1:Hn(A.type)&&Gn(A);break;case 4:Fr(A,A.stateNode.containerInfo);break;case 10:Go(A,A.memoizedProps.value);break;case 13:if(null!==A.memoizedState)return 0!==(n=A.child.childExpirationTime)&&n>=t?bo(e,A,t):null!==(A=Uo(e,A,t))?A.sibling:null}return Uo(e,A,t)}}else Fo=!1;switch(A.expirationTime=0,A.tag){case 2:n=A.elementType,null!==e&&(e.alternate=null,A.alternate=null,A.effectTag|=2),e=A.pendingProps;var r=Un(A,Mn.current);if(Po(A,t),r=_r(null,A,n,e,r,t),A.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof){if(A.tag=1,Zr(),Hn(n)){var o=!0;Gn(A)}else o=!1;A.memoizedState=null!==r.state&&void 0!==r.state?r.state:null;var c=n.getDerivedStateFromProps;"function"==typeof c&&or(A,n,c,e),r.updater=ir,A.stateNode=r,r._reactInternalFiber=A,ur(A,n,e,t),A=Mo(null,A,n,!0,o,t)}else A.tag=0,Yo(null,A,r,t),A=A.child;return A;case 16:switch(r=A.elementType,null!==e&&(e.alternate=null,A.alternate=null,A.effectTag|=2),o=A.pendingProps,e=function(e){var A=e._result;switch(e._status){case 1:return A;case 2:case 0:throw A;default:switch(e._status=0,(A=(A=e._ctor)()).then(function(A){0===e._status&&(A=A.default,e._status=1,e._result=A)},function(A){0===e._status&&(e._status=2,e._result=A)}),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=A,A}}(r),A.type=e,r=A.tag=function(e){if("function"==typeof e)return On(e)?1:0;if(null!=e){if((e=e.$$typeof)===AA)return 11;if(e===nA)return 14}return 2}(e),o=nr(e,o),c=void 0,r){case 0:c=Do(null,A,e,o,t);break;case 1:c=xo(null,A,e,o,t);break;case 11:c=yo(null,A,e,o,t);break;case 14:c=mo(null,A,e,nr(e.type,o),n,t);break;default:i("306",e,"")}return c;case 0:return n=A.type,r=A.pendingProps,Do(e,A,n,r=A.elementType===n?r:nr(n,r),t);case 1:return n=A.type,r=A.pendingProps,xo(e,A,n,r=A.elementType===n?r:nr(n,r),t);case 3:return No(A),null===(n=A.updateQueue)&&i("282"),r=null!==(r=A.memoizedState)?r.element:null,ti(A,n,A.pendingProps,null,t),(n=A.memoizedState.element)===r?(ho(),A=Uo(e,A,t)):(r=A.stateNode,(r=(null===e||null===e.child)&&r.hydrate)&&(go=yn(A.stateNode.containerInfo),so=A,r=Bo=!0),r?(A.effectTag|=2,A.child=wr(A,null,n,t)):(Yo(e,A,n,t),ho()),A=A.child),A;case 5:return yr(A),null===e&&wo(A),n=A.type,r=A.pendingProps,o=null!==e?e.memoizedProps:null,c=r.children,pn(n,r)?c=null:null!==o&&pn(n,o)&&(A.effectTag|=16),vo(e,A),1!==t&&1&A.mode&&r.hidden?(A.expirationTime=A.childExpirationTime=1,A=null):(Yo(e,A,c,t),A=A.child),A;case 6:return null===e&&wo(A),null;case 13:return bo(e,A,t);case 4:return Fr(A,A.stateNode.containerInfo),n=A.pendingProps,null===e?A.child=Er(A,null,n,t):Yo(e,A,n,t),A.child;case 11:return n=A.type,r=A.pendingProps,yo(e,A,n,r=A.elementType===n?r:nr(n,r),t);case 7:return Yo(e,A,A.pendingProps,t),A.child;case 8:case 12:return Yo(e,A,A.pendingProps.children,t),A.child;case 10:e:{if(n=A.type._context,r=A.pendingProps,c=A.memoizedProps,Go(A,o=r.value),null!==c){var a=c.value;if(0===(o=qA(a,o)?0:0|("function"==typeof n._calculateChangedBits?n._calculateChangedBits(a,o):1073741823))){if(c.children===r.children&&!Nn.current){A=Uo(e,A,t);break e}}else for(null!==(a=A.child)&&(a.return=A);null!==a;){var l=a.contextDependencies;if(null!==l){c=a.child;for(var u=l.first;null!==u;){if(u.context===n&&0!=(u.observedBits&o)){1===a.tag&&((u=_o(t)).tag=zo,qo(a,u)),a.expirationTime<t&&(a.expirationTime=t),null!==(u=a.alternate)&&u.expirationTime<t&&(u.expirationTime=t),u=t;for(var s=a.return;null!==s;){var g=s.alternate;if(s.childExpirationTime<u)s.childExpirationTime=u,null!==g&&g.childExpirationTime<u&&(g.childExpirationTime=u);else{if(!(null!==g&&g.childExpirationTime<u))break;g.childExpirationTime=u}s=s.return}l.expirationTime<t&&(l.expirationTime=t);break}u=u.next}}else c=10===a.tag&&a.type===A.type?null:a.child;if(null!==c)c.return=a;else for(c=a;null!==c;){if(c===A){c=null;break}if(null!==(a=c.sibling)){a.return=c.return,c=a;break}c=c.return}a=c}}Yo(e,A,r.children,t),A=A.child}return A;case 9:return r=A.type,n=(o=A.pendingProps).children,Po(A,t),n=n(r=So(r,o.unstable_observedBits)),A.effectTag|=1,Yo(e,A,n,t),A.child;case 14:return o=nr(r=A.type,A.pendingProps),mo(e,A,r,o=nr(r.type,o),n,t);case 15:return Io(e,A,A.type,A.pendingProps,n,t);case 17:return n=A.type,r=A.pendingProps,r=A.elementType===n?r:nr(n,r),null!==e&&(e.alternate=null,A.alternate=null,A.effectTag|=2),A.tag=1,Hn(n)?(e=!0,Gn(A)):e=!1,Po(A,t),ar(A,n,r),ur(A,n,r,t),Mo(null,A,n,!0,e,t)}i("156")}var ko={current:null},To=null,Ro=null,Jo=null;function Go(e,A){var t=e.type._context;Dn(ko,t._currentValue),t._currentValue=A}function Lo(e){var A=ko.current;vn(ko),e.type._context._currentValue=A}function Po(e,A){To=e,Jo=Ro=null;var t=e.contextDependencies;null!==t&&t.expirationTime>=A&&(Fo=!0),e.contextDependencies=null}function So(e,A){return Jo!==e&&!1!==A&&0!==A&&("number"==typeof A&&1073741823!==A||(Jo=e,A=1073741823),A={context:e,observedBits:A,next:null},null===Ro?(null===To&&i("308"),Ro=A,To.contextDependencies={first:A,expirationTime:0}):Ro=Ro.next=A),e._currentValue}var Wo=0,jo=1,zo=2,Oo=3,Ko=!1;function Xo(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Vo(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function _o(e){return{expirationTime:e,tag:Wo,payload:null,callback:null,next:null,nextEffect:null}}function Zo(e,A){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=A:(e.lastUpdate.next=A,e.lastUpdate=A)}function qo(e,A){var t=e.alternate;if(null===t){var n=e.updateQueue,r=null;null===n&&(n=e.updateQueue=Xo(e.memoizedState))}else n=e.updateQueue,r=t.updateQueue,null===n?null===r?(n=e.updateQueue=Xo(e.memoizedState),r=t.updateQueue=Xo(t.memoizedState)):n=e.updateQueue=Vo(r):null===r&&(r=t.updateQueue=Vo(n));null===r||n===r?Zo(n,A):null===n.lastUpdate||null===r.lastUpdate?(Zo(n,A),Zo(r,A)):(Zo(n,A),r.lastUpdate=A)}function $o(e,A){var t=e.updateQueue;null===(t=null===t?e.updateQueue=Xo(e.memoizedState):ei(e,t)).lastCapturedUpdate?t.firstCapturedUpdate=t.lastCapturedUpdate=A:(t.lastCapturedUpdate.next=A,t.lastCapturedUpdate=A)}function ei(e,A){var t=e.alternate;return null!==t&&A===t.updateQueue&&(A=e.updateQueue=Vo(A)),A}function Ai(e,A,t,n,o,i){switch(t.tag){case jo:return"function"==typeof(e=t.payload)?e.call(i,n,o):e;case Oo:e.effectTag=-2049&e.effectTag|64;case Wo:if(null==(o="function"==typeof(e=t.payload)?e.call(i,n,o):e))break;return r({},n,o);case zo:Ko=!0}return n}function ti(e,A,t,n,r){Ko=!1;for(var o=(A=ei(e,A)).baseState,i=null,c=0,a=A.firstUpdate,l=o;null!==a;){var u=a.expirationTime;u<r?(null===i&&(i=a,o=l),c<u&&(c=u)):(l=Ai(e,0,a,l,t,n),null!==a.callback&&(e.effectTag|=32,a.nextEffect=null,null===A.lastEffect?A.firstEffect=A.lastEffect=a:(A.lastEffect.nextEffect=a,A.lastEffect=a))),a=a.next}for(u=null,a=A.firstCapturedUpdate;null!==a;){var s=a.expirationTime;s<r?(null===u&&(u=a,null===i&&(o=l)),c<s&&(c=s)):(l=Ai(e,0,a,l,t,n),null!==a.callback&&(e.effectTag|=32,a.nextEffect=null,null===A.lastCapturedEffect?A.firstCapturedEffect=A.lastCapturedEffect=a:(A.lastCapturedEffect.nextEffect=a,A.lastCapturedEffect=a))),a=a.next}null===i&&(A.lastUpdate=null),null===u?A.lastCapturedUpdate=null:e.effectTag|=32,null===i&&null===u&&(o=l),A.baseState=o,A.firstUpdate=i,A.firstCapturedUpdate=u,e.expirationTime=c,e.memoizedState=l}function ni(e,A,t){null!==A.firstCapturedUpdate&&(null!==A.lastUpdate&&(A.lastUpdate.next=A.firstCapturedUpdate,A.lastUpdate=A.lastCapturedUpdate),A.firstCapturedUpdate=A.lastCapturedUpdate=null),ri(A.firstEffect,t),A.firstEffect=A.lastEffect=null,ri(A.firstCapturedEffect,t),A.firstCapturedEffect=A.lastCapturedEffect=null}function ri(e,A){for(;null!==e;){var t=e.callback;if(null!==t){e.callback=null;var n=A;"function"!=typeof t&&i("191",t),t.call(n)}e=e.nextEffect}}function oi(e,A){return{value:e,source:A,stack:aA(A)}}function ii(e){e.effectTag|=4}var ci=void 0,ai=void 0,li=void 0,ui=void 0;ci=function(e,A){for(var t=A.child;null!==t;){if(5===t.tag||6===t.tag)e.appendChild(t.stateNode);else if(4!==t.tag&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===A)break;for(;null===t.sibling;){if(null===t.return||t.return===A)return;t=t.return}t.sibling.return=t.return,t=t.sibling}},ai=function(){},li=function(e,A,t,n,o){var i=e.memoizedProps;if(i!==n){var c=A.stateNode;switch(Cr(pr.current),e=null,t){case"input":i=dA(c,i),n=dA(c,n),e=[];break;case"option":i=Ot(c,i),n=Ot(c,n),e=[];break;case"select":i=r({},i,{value:void 0}),n=r({},n,{value:void 0}),e=[];break;case"textarea":i=Xt(c,i),n=Xt(c,n),e=[];break;default:"function"!=typeof i.onClick&&"function"==typeof n.onClick&&(c.onclick=fn)}sn(t,n),c=t=void 0;var a=null;for(t in i)if(!n.hasOwnProperty(t)&&i.hasOwnProperty(t)&&null!=i[t])if("style"===t){var l=i[t];for(c in l)l.hasOwnProperty(c)&&(a||(a={}),a[c]="")}else"dangerouslySetInnerHTML"!==t&&"children"!==t&&"suppressContentEditableWarning"!==t&&"suppressHydrationWarning"!==t&&"autoFocus"!==t&&(d.hasOwnProperty(t)?e||(e=[]):(e=e||[]).push(t,null));for(t in n){var u=n[t];if(l=null!=i?i[t]:void 0,n.hasOwnProperty(t)&&u!==l&&(null!=u||null!=l))if("style"===t)if(l){for(c in l)!l.hasOwnProperty(c)||u&&u.hasOwnProperty(c)||(a||(a={}),a[c]="");for(c in u)u.hasOwnProperty(c)&&l[c]!==u[c]&&(a||(a={}),a[c]=u[c])}else a||(e||(e=[]),e.push(t,a)),a=u;else"dangerouslySetInnerHTML"===t?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(e=e||[]).push(t,""+u)):"children"===t?l===u||"string"!=typeof u&&"number"!=typeof u||(e=e||[]).push(t,""+u):"suppressContentEditableWarning"!==t&&"suppressHydrationWarning"!==t&&(d.hasOwnProperty(t)?(null!=u&&Bn(o,t),e||l===u||(e=[])):(e=e||[]).push(t,u))}a&&(e=e||[]).push("style",a),o=e,(A.updateQueue=o)&&ii(A)}},ui=function(e,A,t,n){t!==n&&ii(A)};var si="function"==typeof WeakSet?WeakSet:Set;function gi(e,A){var t=A.source,n=A.stack;null===n&&null!==t&&(n=aA(t)),null!==t&&cA(t.type),A=A.value,null!==e&&1===e.tag&&cA(e.type);try{console.error(A)}catch(e){setTimeout(function(){throw e})}}function Bi(e){var A=e.ref;if(null!==A)if("function"==typeof A)try{A(null)}catch(A){Xi(e,A)}else A.current=null}function fi(e,A,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)!==Ir){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}(n.tag&A)!==Ir&&(r=n.create,n.destroy=r()),n=n.next}while(n!==t)}}function Ei(e){switch("function"==typeof Sn&&Sn(e),e.tag){case 0:case 11:case 14:case 15:var A=e.updateQueue;if(null!==A&&null!==(A=A.lastEffect)){var t=A=A.next;do{var n=t.destroy;if(void 0!==n){var r=e;try{n()}catch(e){Xi(r,e)}}t=t.next}while(t!==A)}break;case 1:if(Bi(e),"function"==typeof(A=e.stateNode).componentWillUnmount)try{A.props=e.memoizedProps,A.state=e.memoizedState,A.componentWillUnmount()}catch(A){Xi(e,A)}break;case 5:Bi(e);break;case 4:pi(e)}}function wi(e){return 5===e.tag||3===e.tag||4===e.tag}function Qi(e){e:{for(var A=e.return;null!==A;){if(wi(A)){var t=A;break e}A=A.return}i("160"),t=void 0}var n=A=void 0;switch(t.tag){case 5:A=t.stateNode,n=!1;break;case 3:case 4:A=t.stateNode.containerInfo,n=!0;break;default:i("161")}16&t.effectTag&&(rn(A,""),t.effectTag&=-17);e:A:for(t=e;;){for(;null===t.sibling;){if(null===t.return||wi(t.return)){t=null;break e}t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.effectTag)continue A;if(null===t.child||4===t.tag)continue A;t.child.return=t,t=t.child}if(!(2&t.effectTag)){t=t.stateNode;break e}}for(var r=e;;){if(5===r.tag||6===r.tag)if(t)if(n){var o=A,c=r.stateNode,a=t;8===o.nodeType?o.parentNode.insertBefore(c,a):o.insertBefore(c,a)}else A.insertBefore(r.stateNode,t);else n?(c=A,a=r.stateNode,8===c.nodeType?(o=c.parentNode).insertBefore(a,c):(o=c).appendChild(a),null!=(c=c._reactRootContainer)||null!==o.onclick||(o.onclick=fn)):A.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)break;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function pi(e){for(var A=e,t=!1,n=void 0,r=void 0;;){if(!t){t=A.return;e:for(;;){switch(null===t&&i("160"),t.tag){case 5:n=t.stateNode,r=!1;break e;case 3:case 4:n=t.stateNode.containerInfo,r=!0;break e}t=t.return}t=!0}if(5===A.tag||6===A.tag){e:for(var o=A,c=o;;)if(Ei(c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===o)break;for(;null===c.sibling;){if(null===c.return||c.return===o)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(o=n,c=A.stateNode,8===o.nodeType?o.parentNode.removeChild(c):o.removeChild(c)):n.removeChild(A.stateNode)}else if(4===A.tag){if(null!==A.child){n=A.stateNode.containerInfo,r=!0,A.child.return=A,A=A.child;continue}}else if(Ei(A),null!==A.child){A.child.return=A,A=A.child;continue}if(A===e)break;for(;null===A.sibling;){if(null===A.return||A.return===e)return;4===(A=A.return).tag&&(t=!1)}A.sibling.return=A.return,A=A.sibling}}function di(e,A){switch(A.tag){case 0:case 11:case 14:case 15:fi(Dr,xr,A);break;case 1:break;case 5:var t=A.stateNode;if(null!=t){var n=A.memoizedProps;e=null!==e?e.memoizedProps:n;var r=A.type,o=A.updateQueue;A.updateQueue=null,null!==o&&function(e,A,t,n,r){e[H]=r,"input"===t&&"radio"===r.type&&null!=r.name&&CA(e,r),gn(t,n),n=gn(t,r);for(var o=0;o<A.length;o+=2){var i=A[o],c=A[o+1];"style"===i?ln(e,c):"dangerouslySetInnerHTML"===i?nn(e,c):"children"===i?rn(e,c):QA(e,i,c,n)}switch(t){case"input":FA(e,r);break;case"textarea":_t(e,r);break;case"select":A=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!r.multiple,null!=(t=r.value)?Kt(e,!!r.multiple,t,!1):A!==!!r.multiple&&(null!=r.defaultValue?Kt(e,!!r.multiple,r.defaultValue,!0):Kt(e,!!r.multiple,r.multiple?[]:"",!1))}}(t,o,r,e,n)}break;case 6:null===A.stateNode&&i("162"),A.stateNode.nodeValue=A.memoizedProps;break;case 3:case 12:break;case 13:if(t=A.memoizedState,n=void 0,e=A,null===t?n=!1:(n=!0,e=A.child,0===t.timedOutAt&&(t.timedOutAt=Fc())),null!==e&&function(e,A){for(var t=e;;){if(5===t.tag){var n=t.stateNode;if(A)n.style.display="none";else{n=t.stateNode;var r=t.memoizedProps.style;r=null!=r&&r.hasOwnProperty("display")?r.display:null,n.style.display=an("display",r)}}else if(6===t.tag)t.stateNode.nodeValue=A?"":t.memoizedProps;else{if(13===t.tag&&null!==t.memoizedState){(n=t.child.sibling).return=t,t=n;continue}if(null!==t.child){t.child.return=t,t=t.child;continue}}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}}(e,n),null!==(t=A.updateQueue)){A.updateQueue=null;var c=A.stateNode;null===c&&(c=A.stateNode=new si),t.forEach(function(e){var t=function(e,A){var t=e.stateNode;null!==t&&t.delete(A),A=Vi(A=Fc(),e),null!==(e=Zi(e,A))&&($n(e,A),0!==(A=e.expirationTime)&&Yc(e,A))}.bind(null,A,e);c.has(e)||(c.add(e),e.then(t,t))})}break;case 17:break;default:i("163")}}var hi="function"==typeof WeakMap?WeakMap:Map;function Ci(e,A,t){(t=_o(t)).tag=Oo,t.payload={element:null};var n=A.value;return t.callback=function(){bc(n),gi(e,A)},t}function Fi(e,A,t){(t=_o(t)).tag=Oo;var n=e.type.getDerivedStateFromError;if("function"==typeof n){var r=A.value;t.payload=function(){return n(r)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(t.callback=function(){"function"!=typeof n&&(null===Ji?Ji=new Set([this]):Ji.add(this));var t=A.value,r=A.stack;gi(e,A),this.componentDidCatch(t,{componentStack:null!==r?r:""})}),t}function Yi(e){switch(e.tag){case 1:Hn(e.type)&&kn();var A=e.effectTag;return 2048&A?(e.effectTag=-2049&A|64,e):null;case 3:return Yr(),Tn(),0!=(64&(A=e.effectTag))&&i("285"),e.effectTag=-2049&A|64,e;case 5:return mr(e),null;case 13:return 2048&(A=e.effectTag)?(e.effectTag=-2049&A|64,e):null;case 18:return null;case 4:return Yr(),null;case 10:return Lo(e),null;default:return null}}var yi=je.ReactCurrentDispatcher,mi=je.ReactCurrentOwner,Ii=1073741822,vi=!1,Di=null,xi=null,Mi=0,Ni=-1,bi=!1,Ui=null,Hi=!1,ki=null,Ti=null,Ri=null,Ji=null;function Gi(){if(null!==Di)for(var e=Di.return;null!==e;){var A=e;switch(A.tag){case 1:var t=A.type.childContextTypes;null!=t&&kn();break;case 3:Yr(),Tn();break;case 5:mr(A);break;case 4:Yr();break;case 10:Lo(A)}e=e.return}xi=null,Mi=0,Ni=-1,bi=!1,Di=null}function Li(){for(;null!==Ui;){var e=Ui.effectTag;if(16&e&&rn(Ui.stateNode,""),128&e){var A=Ui.alternate;null!==A&&(null!==(A=A.ref)&&("function"==typeof A?A(null):A.current=null))}switch(14&e){case 2:Qi(Ui),Ui.effectTag&=-3;break;case 6:Qi(Ui),Ui.effectTag&=-3,di(Ui.alternate,Ui);break;case 4:di(Ui.alternate,Ui);break;case 8:pi(e=Ui),e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,null!==(e=e.alternate)&&(e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null)}Ui=Ui.nextEffect}}function Pi(){for(;null!==Ui;){if(256&Ui.effectTag)e:{var e=Ui.alternate,A=Ui;switch(A.tag){case 0:case 11:case 15:fi(vr,Ir,A);break e;case 1:if(256&A.effectTag&&null!==e){var t=e.memoizedProps,n=e.memoizedState;A=(e=A.stateNode).getSnapshotBeforeUpdate(A.elementType===A.type?t:nr(A.type,t),n),e.__reactInternalSnapshotBeforeUpdate=A}break e;case 3:case 5:case 6:case 4:case 17:break e;default:i("163")}}Ui=Ui.nextEffect}}function Si(e,A){for(;null!==Ui;){var t=Ui.effectTag;if(36&t){var n=Ui.alternate,r=Ui,o=A;switch(r.tag){case 0:case 11:case 15:fi(Mr,Nr,r);break;case 1:var c=r.stateNode;if(4&r.effectTag)if(null===n)c.componentDidMount();else{var a=r.elementType===r.type?n.memoizedProps:nr(r.type,n.memoizedProps);c.componentDidUpdate(a,n.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}null!==(n=r.updateQueue)&&ni(0,n,c);break;case 3:if(null!==(n=r.updateQueue)){if(c=null,null!==r.child)switch(r.child.tag){case 5:c=r.child.stateNode;break;case 1:c=r.child.stateNode}ni(0,n,c)}break;case 5:o=r.stateNode,null===n&&4&r.effectTag&&Qn(r.type,r.memoizedProps)&&o.focus();break;case 6:case 4:case 12:case 13:case 17:break;default:i("163")}}128&t&&(null!==(r=Ui.ref)&&(o=Ui.stateNode,"function"==typeof r?r(o):r.current=o)),512&t&&(ki=e),Ui=Ui.nextEffect}}function Wi(){null!==Ti&&Fn(Ti),null!==Ri&&Ri()}function ji(e,A){Hi=vi=!0,e.current===A&&i("177");var t=e.pendingCommitExpirationTime;0===t&&i("261"),e.pendingCommitExpirationTime=0;var n=A.expirationTime,r=A.childExpirationTime;for(function(e,A){if(e.didError=!1,0===A)e.earliestPendingTime=0,e.latestPendingTime=0,e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0;else{A<e.latestPingedTime&&(e.latestPingedTime=0);var t=e.latestPendingTime;0!==t&&(t>A?e.earliestPendingTime=e.latestPendingTime=0:e.earliestPendingTime>A&&(e.earliestPendingTime=e.latestPendingTime)),0===(t=e.earliestSuspendedTime)?$n(e,A):A<e.latestSuspendedTime?(e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0,$n(e,A)):A>t&&$n(e,A)}tr(0,e)}(e,r>n?r:n),mi.current=null,n=void 0,1<A.effectTag?null!==A.lastEffect?(A.lastEffect.nextEffect=A,n=A.firstEffect):n=A:n=A.firstEffect,En=Yt,wn=function(){var e=kt();if(Tt(e)){if("selectionStart"in e)var A={start:e.selectionStart,end:e.selectionEnd};else e:{var t=(A=(A=e.ownerDocument)&&A.defaultView||window).getSelection&&A.getSelection();if(t&&0!==t.rangeCount){A=t.anchorNode;var n=t.anchorOffset,r=t.focusNode;t=t.focusOffset;try{A.nodeType,r.nodeType}catch(e){A=null;break e}var o=0,i=-1,c=-1,a=0,l=0,u=e,s=null;A:for(;;){for(var g;u!==A||0!==n&&3!==u.nodeType||(i=o+n),u!==r||0!==t&&3!==u.nodeType||(c=o+t),3===u.nodeType&&(o+=u.nodeValue.length),null!==(g=u.firstChild);)s=u,u=g;for(;;){if(u===e)break A;if(s===A&&++a===n&&(i=o),s===r&&++l===t&&(c=o),null!==(g=u.nextSibling))break;s=(u=s).parentNode}u=g}A=-1===i||-1===c?null:{start:i,end:c}}else A=null}A=A||{start:0,end:0}}else A=null;return{focusedElem:e,selectionRange:A}}(),Yt=!1,Ui=n;null!==Ui;){r=!1;var c=void 0;try{Pi()}catch(e){r=!0,c=e}r&&(null===Ui&&i("178"),Xi(Ui,c),null!==Ui&&(Ui=Ui.nextEffect))}for(Ui=n;null!==Ui;){r=!1,c=void 0;try{Li()}catch(e){r=!0,c=e}r&&(null===Ui&&i("178"),Xi(Ui,c),null!==Ui&&(Ui=Ui.nextEffect))}for(Rt(wn),wn=null,Yt=!!En,En=null,e.current=A,Ui=n;null!==Ui;){r=!1,c=void 0;try{Si(e,t)}catch(e){r=!0,c=e}r&&(null===Ui&&i("178"),Xi(Ui,c),null!==Ui&&(Ui=Ui.nextEffect))}if(null!==n&&null!==ki){var a=function(e,A){Ri=Ti=ki=null;var t=rc;rc=!0;do{if(512&A.effectTag){var n=!1,r=void 0;try{var o=A;fi(Ur,Ir,o),fi(Ir,br,o)}catch(e){n=!0,r=e}n&&Xi(A,r)}A=A.nextEffect}while(null!==A);rc=t,0!==(t=e.expirationTime)&&Yc(e,t),uc||rc||Dc(1073741823,!1)}.bind(null,e,n);Ti=o.unstable_runWithPriority(o.unstable_NormalPriority,function(){return Cn(a)}),Ri=a}vi=Hi=!1,"function"==typeof Pn&&Pn(A.stateNode),t=A.expirationTime,0===(A=(A=A.childExpirationTime)>t?A:t)&&(Ji=null),function(e,A){e.expirationTime=A,e.finishedWork=null}(e,A)}function zi(e){for(;;){var A=e.alternate,t=e.return,n=e.sibling;if(0==(1024&e.effectTag)){Di=e;e:{var o=A,c=Mi,a=(A=e).pendingProps;switch(A.tag){case 2:case 16:break;case 15:case 0:break;case 1:Hn(A.type)&&kn();break;case 3:Yr(),Tn(),(a=A.stateNode).pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),null!==o&&null!==o.child||(po(A),A.effectTag&=-3),ai(A);break;case 5:mr(A);var l=Cr(hr.current);if(c=A.type,null!==o&&null!=A.stateNode)li(o,A,c,a,l),o.ref!==A.ref&&(A.effectTag|=128);else if(a){var u=Cr(pr.current);if(po(A)){o=(a=A).stateNode;var s=a.type,g=a.memoizedProps,B=l;switch(o[U]=a,o[H]=g,c=void 0,l=s){case"iframe":case"object":yt("load",o);break;case"video":case"audio":for(s=0;s<Ae.length;s++)yt(Ae[s],o);break;case"source":yt("error",o);break;case"img":case"image":case"link":yt("error",o),yt("load",o);break;case"form":yt("reset",o),yt("submit",o);break;case"details":yt("toggle",o);break;case"input":hA(o,g),yt("invalid",o),Bn(B,"onChange");break;case"select":o._wrapperState={wasMultiple:!!g.multiple},yt("invalid",o),Bn(B,"onChange");break;case"textarea":Vt(o,g),yt("invalid",o),Bn(B,"onChange")}for(c in sn(l,g),s=null,g)g.hasOwnProperty(c)&&(u=g[c],"children"===c?"string"==typeof u?o.textContent!==u&&(s=["children",u]):"number"==typeof u&&o.textContent!==""+u&&(s=["children",""+u]):d.hasOwnProperty(c)&&null!=u&&Bn(B,c));switch(l){case"input":Se(o),YA(o,g,!0);break;case"textarea":Se(o),Zt(o);break;case"select":case"option":break;default:"function"==typeof g.onClick&&(o.onclick=fn)}c=s,a.updateQueue=c,(a=null!==c)&&ii(A)}else{g=A,B=c,o=a,s=9===l.nodeType?l:l.ownerDocument,u===qt.html&&(u=$t(B)),u===qt.html?"script"===B?((o=s.createElement("div")).innerHTML="<script><\/script>",s=o.removeChild(o.firstChild)):"string"==typeof o.is?s=s.createElement(B,{is:o.is}):(s=s.createElement(B),"select"===B&&(B=s,o.multiple?B.multiple=!0:o.size&&(B.size=o.size))):s=s.createElementNS(u,B),(o=s)[U]=g,o[H]=a,ci(o,A,!1,!1),B=o;var f=l,E=gn(s=c,g=a);switch(s){case"iframe":case"object":yt("load",B),l=g;break;case"video":case"audio":for(l=0;l<Ae.length;l++)yt(Ae[l],B);l=g;break;case"source":yt("error",B),l=g;break;case"img":case"image":case"link":yt("error",B),yt("load",B),l=g;break;case"form":yt("reset",B),yt("submit",B),l=g;break;case"details":yt("toggle",B),l=g;break;case"input":hA(B,g),l=dA(B,g),yt("invalid",B),Bn(f,"onChange");break;case"option":l=Ot(B,g);break;case"select":B._wrapperState={wasMultiple:!!g.multiple},l=r({},g,{value:void 0}),yt("invalid",B),Bn(f,"onChange");break;case"textarea":Vt(B,g),l=Xt(B,g),yt("invalid",B),Bn(f,"onChange");break;default:l=g}sn(s,l),u=void 0;var w=s,Q=B,p=l;for(u in p)if(p.hasOwnProperty(u)){var h=p[u];"style"===u?ln(Q,h):"dangerouslySetInnerHTML"===u?null!=(h=h?h.__html:void 0)&&nn(Q,h):"children"===u?"string"==typeof h?("textarea"!==w||""!==h)&&rn(Q,h):"number"==typeof h&&rn(Q,""+h):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(d.hasOwnProperty(u)?null!=h&&Bn(f,u):null!=h&&QA(Q,u,h,E))}switch(s){case"input":Se(B),YA(B,g,!1);break;case"textarea":Se(B),Zt(B);break;case"option":null!=g.value&&B.setAttribute("value",""+pA(g.value));break;case"select":(l=B).multiple=!!g.multiple,null!=(B=g.value)?Kt(l,!!g.multiple,B,!1):null!=g.defaultValue&&Kt(l,!!g.multiple,g.defaultValue,!0);break;default:"function"==typeof l.onClick&&(B.onclick=fn)}(a=Qn(c,a))&&ii(A),A.stateNode=o}null!==A.ref&&(A.effectTag|=128)}else null===A.stateNode&&i("166");break;case 6:o&&null!=A.stateNode?ui(o,A,o.memoizedProps,a):("string"!=typeof a&&(null===A.stateNode&&i("166")),o=Cr(hr.current),Cr(pr.current),po(A)?(c=(a=A).stateNode,o=a.memoizedProps,c[U]=a,(a=c.nodeValue!==o)&&ii(A)):(c=A,(a=(9===o.nodeType?o:o.ownerDocument).createTextNode(a))[U]=A,c.stateNode=a));break;case 11:break;case 13:if(a=A.memoizedState,0!=(64&A.effectTag)){A.expirationTime=c,Di=A;break e}a=null!==a,c=null!==o&&null!==o.memoizedState,null!==o&&!a&&c&&(null!==(o=o.child.sibling)&&(null!==(l=A.firstEffect)?(A.firstEffect=o,o.nextEffect=l):(A.firstEffect=A.lastEffect=o,o.nextEffect=null),o.effectTag=8)),(a||c)&&(A.effectTag|=4);break;case 7:case 8:case 12:break;case 4:Yr(),ai(A);break;case 10:Lo(A);break;case 9:case 14:break;case 17:Hn(A.type)&&kn();break;case 18:break;default:i("156")}Di=null}if(A=e,1===Mi||1!==A.childExpirationTime){for(a=0,c=A.child;null!==c;)(o=c.expirationTime)>a&&(a=o),(l=c.childExpirationTime)>a&&(a=l),c=c.sibling;A.childExpirationTime=a}if(null!==Di)return Di;null!==t&&0==(1024&t.effectTag)&&(null===t.firstEffect&&(t.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1<e.effectTag&&(null!==t.lastEffect?t.lastEffect.nextEffect=e:t.firstEffect=e,t.lastEffect=e))}else{if(null!==(e=Yi(e)))return e.effectTag&=1023,e;null!==t&&(t.firstEffect=t.lastEffect=null,t.effectTag|=1024)}if(null!==n)return n;if(null===t)break;e=t}return null}function Oi(e){var A=Ho(e.alternate,e,Mi);return e.memoizedProps=e.pendingProps,null===A&&(A=zi(e)),mi.current=null,A}function Ki(e,A){vi&&i("243"),Wi(),vi=!0;var t=yi.current;yi.current=ao;var n=e.nextExpirationTimeToWorkOn;n===Mi&&e===xi&&null!==Di||(Gi(),Mi=n,Di=Kn((xi=e).current,null),e.pendingCommitExpirationTime=0);for(var r=!1;;){try{if(A)for(;null!==Di&&!Ic();)Di=Oi(Di);else for(;null!==Di;)Di=Oi(Di)}catch(A){if(Jo=Ro=To=null,Zr(),null===Di)r=!0,bc(A);else{null===Di&&i("271");var o=Di,c=o.return;if(null!==c){e:{var a=e,l=c,u=o,s=A;if(c=Mi,u.effectTag|=1024,u.firstEffect=u.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var g=s;s=l;var B=-1,f=-1;do{if(13===s.tag){var E=s.alternate;if(null!==E&&null!==(E=E.memoizedState)){f=10*(1073741822-E.timedOutAt);break}"number"==typeof(E=s.pendingProps.maxDuration)&&(0>=E?B=0:(-1===B||E<B)&&(B=E))}s=s.return}while(null!==s);s=l;do{if((E=13===s.tag)&&(E=void 0!==s.memoizedProps.fallback&&null===s.memoizedState),E){if(null===(l=s.updateQueue)?((l=new Set).add(g),s.updateQueue=l):l.add(g),0==(1&s.mode)){s.effectTag|=64,u.effectTag&=-1957,1===u.tag&&(null===u.alternate?u.tag=17:((c=_o(1073741823)).tag=zo,qo(u,c))),u.expirationTime=1073741823;break e}l=c;var w=(u=a).pingCache;null===w?(w=u.pingCache=new hi,E=new Set,w.set(g,E)):void 0===(E=w.get(g))&&(E=new Set,w.set(g,E)),E.has(l)||(E.add(l),u=_i.bind(null,u,g,l),g.then(u,u)),-1===B?a=1073741823:(-1===f&&(f=10*(1073741822-Ar(a,c))-5e3),a=f+B),0<=a&&Ni<a&&(Ni=a),s.effectTag|=2048,s.expirationTime=c;break e}s=s.return}while(null!==s);s=Error((cA(u.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+aA(u))}bi=!0,s=oi(s,u),a=l;do{switch(a.tag){case 3:a.effectTag|=2048,a.expirationTime=c,$o(a,c=Ci(a,s,c));break e;case 1:if(B=s,f=a.type,u=a.stateNode,0==(64&a.effectTag)&&("function"==typeof f.getDerivedStateFromError||null!==u&&"function"==typeof u.componentDidCatch&&(null===Ji||!Ji.has(u)))){a.effectTag|=2048,a.expirationTime=c,$o(a,c=Fi(a,B,c));break e}}a=a.return}while(null!==a)}Di=zi(o);continue}r=!0,bc(A)}}break}if(vi=!1,yi.current=t,Jo=Ro=To=null,Zr(),r)xi=null,e.finishedWork=null;else if(null!==Di)e.finishedWork=null;else{if(null===(t=e.current.alternate)&&i("281"),xi=null,bi){if(r=e.latestPendingTime,o=e.latestSuspendedTime,c=e.latestPingedTime,0!==r&&r<n||0!==o&&o<n||0!==c&&c<n)return er(e,n),void Cc(e,t,n,e.expirationTime,-1);if(!e.didError&&A)return e.didError=!0,n=e.nextExpirationTimeToWorkOn=n,A=e.expirationTime=1073741823,void Cc(e,t,n,A,-1)}A&&-1!==Ni?(er(e,n),(A=10*(1073741822-Ar(e,n)))<Ni&&(Ni=A),A=10*(1073741822-Fc()),A=Ni-A,Cc(e,t,n,e.expirationTime,0>A?0:A)):(e.pendingCommitExpirationTime=n,e.finishedWork=t)}}function Xi(e,A){for(var t=e.return;null!==t;){switch(t.tag){case 1:var n=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof n.componentDidCatch&&(null===Ji||!Ji.has(n)))return qo(t,e=Fi(t,e=oi(A,e),1073741823)),void qi(t,1073741823);break;case 3:return qo(t,e=Ci(t,e=oi(A,e),1073741823)),void qi(t,1073741823)}t=t.return}3===e.tag&&(qo(e,t=Ci(e,t=oi(A,e),1073741823)),qi(e,1073741823))}function Vi(e,A){var t=o.unstable_getCurrentPriorityLevel(),n=void 0;if(0==(1&A.mode))n=1073741823;else if(vi&&!Hi)n=Mi;else{switch(t){case o.unstable_ImmediatePriority:n=1073741823;break;case o.unstable_UserBlockingPriority:n=1073741822-10*(1+((1073741822-e+15)/10|0));break;case o.unstable_NormalPriority:n=1073741822-25*(1+((1073741822-e+500)/25|0));break;case o.unstable_LowPriority:case o.unstable_IdlePriority:n=1;break;default:i("313")}null!==xi&&n===Mi&&--n}return t===o.unstable_UserBlockingPriority&&(0===cc||n<cc)&&(cc=n),n}function _i(e,A,t){var n=e.pingCache;null!==n&&n.delete(A),null!==xi&&Mi===t?xi=null:(A=e.earliestSuspendedTime,n=e.latestSuspendedTime,0!==A&&t<=A&&t>=n&&(e.didError=!1,(0===(A=e.latestPingedTime)||A>t)&&(e.latestPingedTime=t),tr(t,e),0!==(t=e.expirationTime)&&Yc(e,t)))}function Zi(e,A){e.expirationTime<A&&(e.expirationTime=A);var t=e.alternate;null!==t&&t.expirationTime<A&&(t.expirationTime=A);var n=e.return,r=null;if(null===n&&3===e.tag)r=e.stateNode;else for(;null!==n;){if(t=n.alternate,n.childExpirationTime<A&&(n.childExpirationTime=A),null!==t&&t.childExpirationTime<A&&(t.childExpirationTime=A),null===n.return&&3===n.tag){r=n.stateNode;break}n=n.return}return r}function qi(e,A){null!==(e=Zi(e,A))&&(!vi&&0!==Mi&&A>Mi&&Gi(),$n(e,A),vi&&!Hi&&xi===e||Yc(e,e.expirationTime),Qc>wc&&(Qc=0,i("185")))}function $i(e,A,t,n,r){return o.unstable_runWithPriority(o.unstable_ImmediatePriority,function(){return e(A,t,n,r)})}var ec=null,Ac=null,tc=0,nc=void 0,rc=!1,oc=null,ic=0,cc=0,ac=!1,lc=null,uc=!1,sc=!1,gc=null,Bc=o.unstable_now(),fc=1073741822-(Bc/10|0),Ec=fc,wc=50,Qc=0,pc=null;function dc(){fc=1073741822-((o.unstable_now()-Bc)/10|0)}function hc(e,A){if(0!==tc){if(A<tc)return;null!==nc&&o.unstable_cancelCallback(nc)}tc=A,e=o.unstable_now()-Bc,nc=o.unstable_scheduleCallback(vc,{timeout:10*(1073741822-A)-e})}function Cc(e,A,t,n,r){e.expirationTime=n,0!==r||Ic()?0<r&&(e.timeoutHandle=dn(function(e,A,t){e.pendingCommitExpirationTime=t,e.finishedWork=A,dc(),Ec=fc,xc(e,t)}.bind(null,e,A,t),r)):(e.pendingCommitExpirationTime=t,e.finishedWork=A)}function Fc(){return rc?Ec:(yc(),0!==ic&&1!==ic||(dc(),Ec=fc),Ec)}function Yc(e,A){null===e.nextScheduledRoot?(e.expirationTime=A,null===Ac?(ec=Ac=e,e.nextScheduledRoot=e):(Ac=Ac.nextScheduledRoot=e).nextScheduledRoot=ec):A>e.expirationTime&&(e.expirationTime=A),rc||(uc?sc&&(oc=e,ic=1073741823,Mc(e,1073741823,!1)):1073741823===A?Dc(1073741823,!1):hc(e,A))}function yc(){var e=0,A=null;if(null!==Ac)for(var t=Ac,n=ec;null!==n;){var r=n.expirationTime;if(0===r){if((null===t||null===Ac)&&i("244"),n===n.nextScheduledRoot){ec=Ac=n.nextScheduledRoot=null;break}if(n===ec)ec=r=n.nextScheduledRoot,Ac.nextScheduledRoot=r,n.nextScheduledRoot=null;else{if(n===Ac){(Ac=t).nextScheduledRoot=ec,n.nextScheduledRoot=null;break}t.nextScheduledRoot=n.nextScheduledRoot,n.nextScheduledRoot=null}n=t.nextScheduledRoot}else{if(r>e&&(e=r,A=n),n===Ac)break;if(1073741823===e)break;t=n,n=n.nextScheduledRoot}}oc=A,ic=e}var mc=!1;function Ic(){return!!mc||!!o.unstable_shouldYield()&&(mc=!0)}function vc(){try{if(!Ic()&&null!==ec){dc();var e=ec;do{var A=e.expirationTime;0!==A&&fc<=A&&(e.nextExpirationTimeToWorkOn=fc),e=e.nextScheduledRoot}while(e!==ec)}Dc(0,!0)}finally{mc=!1}}function Dc(e,A){if(yc(),A)for(dc(),Ec=fc;null!==oc&&0!==ic&&e<=ic&&!(mc&&fc>ic);)Mc(oc,ic,fc>ic),yc(),dc(),Ec=fc;else for(;null!==oc&&0!==ic&&e<=ic;)Mc(oc,ic,!1),yc();if(A&&(tc=0,nc=null),0!==ic&&hc(oc,ic),Qc=0,pc=null,null!==gc)for(e=gc,gc=null,A=0;A<e.length;A++){var t=e[A];try{t._onComplete()}catch(e){ac||(ac=!0,lc=e)}}if(ac)throw e=lc,lc=null,ac=!1,e}function xc(e,A){rc&&i("253"),oc=e,ic=A,Mc(e,A,!1),Dc(1073741823,!1)}function Mc(e,A,t){if(rc&&i("245"),rc=!0,t){var n=e.finishedWork;null!==n?Nc(e,n,A):(e.finishedWork=null,-1!==(n=e.timeoutHandle)&&(e.timeoutHandle=-1,hn(n)),Ki(e,t),null!==(n=e.finishedWork)&&(Ic()?e.finishedWork=n:Nc(e,n,A)))}else null!==(n=e.finishedWork)?Nc(e,n,A):(e.finishedWork=null,-1!==(n=e.timeoutHandle)&&(e.timeoutHandle=-1,hn(n)),Ki(e,t),null!==(n=e.finishedWork)&&Nc(e,n,A));rc=!1}function Nc(e,A,t){var n=e.firstBatch;if(null!==n&&n._expirationTime>=t&&(null===gc?gc=[n]:gc.push(n),n._defer))return e.finishedWork=A,void(e.expirationTime=0);e.finishedWork=null,e===pc?Qc++:(pc=e,Qc=0),o.unstable_runWithPriority(o.unstable_ImmediatePriority,function(){ji(e,A)})}function bc(e){null===oc&&i("246"),oc.expirationTime=0,ac||(ac=!0,lc=e)}function Uc(e,A){var t=uc;uc=!0;try{return e(A)}finally{(uc=t)||rc||Dc(1073741823,!1)}}function Hc(e,A){if(uc&&!sc){sc=!0;try{return e(A)}finally{sc=!1}}return e(A)}function kc(e,A,t){uc||rc||0===cc||(Dc(cc,!1),cc=0);var n=uc;uc=!0;try{return o.unstable_runWithPriority(o.unstable_UserBlockingPriority,function(){return e(A,t)})}finally{(uc=n)||rc||Dc(1073741823,!1)}}function Tc(e,A,t,n,r){var o=A.current;e:if(t){A:{2===At(t=t._reactInternalFiber)&&1===t.tag||i("170");var c=t;do{switch(c.tag){case 3:c=c.stateNode.context;break A;case 1:if(Hn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break A}}c=c.return}while(null!==c);i("171"),c=void 0}if(1===t.tag){var a=t.type;if(Hn(a)){t=Jn(t,a,c);break e}}t=c}else t=xn;return null===A.context?A.context=t:A.pendingContext=t,A=r,(r=_o(n)).payload={element:e},null!==(A=void 0===A?null:A)&&(r.callback=A),Wi(),qo(o,r),qi(o,n),n}function Rc(e,A,t,n){var r=A.current;return Tc(e,A,t,r=Vi(Fc(),r),n)}function Jc(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Gc(e){var A=1073741822-25*(1+((1073741822-Fc()+500)/25|0));A>=Ii&&(A=Ii-1),this._expirationTime=Ii=A,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function Lc(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function Pc(e,A,t){e={current:A=zn(3,null,null,A?3:0),containerInfo:e,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:t,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=A.stateNode=e}function Sc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Wc(e,A,t,n,r){var o=t._reactRootContainer;if(o){if("function"==typeof r){var i=r;r=function(){var e=Jc(o._internalRoot);i.call(e)}}null!=e?o.legacy_renderSubtreeIntoContainer(e,A,r):o.render(A,r)}else{if(o=t._reactRootContainer=function(e,A){if(A||(A=!(!(A=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==A.nodeType||!A.hasAttribute("data-reactroot"))),!A)for(var t;t=e.lastChild;)e.removeChild(t);return new Pc(e,!1,A)}(t,n),"function"==typeof r){var c=r;r=function(){var e=Jc(o._internalRoot);c.call(e)}}Hc(function(){null!=e?o.legacy_renderSubtreeIntoContainer(e,A,r):o.render(A,r)})}return Jc(o._internalRoot)}function jc(e,A){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return Sc(A)||i("200"),function(e,A,t){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Xe,key:null==n?null:""+n,children:e,containerInfo:A,implementation:t}}(e,A,null,t)}Ie=function(e,A,t){switch(A){case"input":if(FA(e,t),A=t.name,"radio"===t.type&&null!=A){for(t=e;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+A)+'][type="radio"]'),A=0;A<t.length;A++){var n=t[A];if(n!==e&&n.form===e.form){var r=J(n);r||i("90"),We(n),FA(n,r)}}}break;case"textarea":_t(e,t);break;case"select":null!=(A=t.value)&&Kt(e,!!t.multiple,A,!1)}},Gc.prototype.render=function(e){this._defer||i("250"),this._hasChildren=!0,this._children=e;var A=this._root._internalRoot,t=this._expirationTime,n=new Lc;return Tc(e,A,null,t,n._onCommit),n},Gc.prototype.then=function(e){if(this._didComplete)e();else{var A=this._callbacks;null===A&&(A=this._callbacks=[]),A.push(e)}},Gc.prototype.commit=function(){var e=this._root._internalRoot,A=e.firstBatch;if(this._defer&&null!==A||i("251"),this._hasChildren){var t=this._expirationTime;if(A!==this){this._hasChildren&&(t=this._expirationTime=A._expirationTime,this.render(this._children));for(var n=null,r=A;r!==this;)n=r,r=r._next;null===n&&i("251"),n._next=r._next,this._next=A,e.firstBatch=this}this._defer=!1,xc(e,t),A=this._next,this._next=null,null!==(A=e.firstBatch=A)&&A._hasChildren&&A.render(A._children)}else this._next=null,this._defer=!1},Gc.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var A=0;A<e.length;A++)(0,e[A])()}},Lc.prototype.then=function(e){if(this._didCommit)e();else{var A=this._callbacks;null===A&&(A=this._callbacks=[]),A.push(e)}},Lc.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var A=0;A<e.length;A++){var t=e[A];"function"!=typeof t&&i("191",t),t()}}},Pc.prototype.render=function(e,A){var t=this._internalRoot,n=new Lc;return null!==(A=void 0===A?null:A)&&n.then(A),Rc(e,t,null,n._onCommit),n},Pc.prototype.unmount=function(e){var A=this._internalRoot,t=new Lc;return null!==(e=void 0===e?null:e)&&t.then(e),Rc(null,A,null,t._onCommit),t},Pc.prototype.legacy_renderSubtreeIntoContainer=function(e,A,t){var n=this._internalRoot,r=new Lc;return null!==(t=void 0===t?null:t)&&r.then(t),Rc(A,n,e,r._onCommit),r},Pc.prototype.createBatch=function(){var e=new Gc(this),A=e._expirationTime,t=this._internalRoot,n=t.firstBatch;if(null===n)t.firstBatch=e,e._next=null;else{for(t=null;null!==n&&n._expirationTime>=A;)t=n,n=n._next;e._next=n,null!==t&&(t._next=e)}return e},be=Uc,Ue=kc,He=function(){rc||0===cc||(Dc(cc,!1),cc=0)};var zc={createPortal:jc,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var A=e._reactInternalFiber;return void 0===A&&("function"==typeof e.render?i("188"):i("268",Object.keys(e))),e=null===(e=nt(A))?null:e.stateNode},hydrate:function(e,A,t){return Sc(A)||i("200"),Wc(null,e,A,!0,t)},render:function(e,A,t){return Sc(A)||i("200"),Wc(null,e,A,!1,t)},unstable_renderSubtreeIntoContainer:function(e,A,t,n){return Sc(t)||i("200"),(null==e||void 0===e._reactInternalFiber)&&i("38"),Wc(e,A,t,!1,n)},unmountComponentAtNode:function(e){return Sc(e)||i("40"),!!e._reactRootContainer&&(Hc(function(){Wc(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return jc.apply(void 0,arguments)},unstable_batchedUpdates:Uc,unstable_interactiveUpdates:kc,flushSync:function(e,A){rc&&i("187");var t=uc;uc=!0;try{return $i(e,A)}finally{uc=t,Dc(1073741823,!1)}},unstable_createRoot:function(e,A){return Sc(e)||i("299","unstable_createRoot"),new Pc(e,!0,null!=A&&!0===A.hydrate)},unstable_flushControlled:function(e){var A=uc;uc=!0;try{$i(e)}finally{(uc=A)||rc||Dc(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[T,R,J,x.injectEventPluginsByName,p,j,function(e){I(e,W)},Me,Ne,vt,N]}};!function(e){var A=e.findFiberByHostInstance;(function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var A=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(A.isDisabled||!A.supportsFiber)return!0;try{var t=A.inject(e);Pn=Wn(function(e){return A.onCommitFiberRoot(t,e)}),Sn=Wn(function(e){return A.onCommitFiberUnmount(t,e)})}catch(e){}})(r({},e,{overrideProps:null,currentDispatcherRef:je.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return A?A(e):null}}))}({findFiberByHostInstance:k,bundleType:0,version:"16.8.6",rendererPackageName:"react-dom"});var Oc={default:zc},Kc=Oc&&zc||Oc;e.exports=Kc.default||Kc},function(e,A,t){"use strict";e.exports=t(35)},function(e,A,t){"use strict";(function(e){ /** @license React v0.13.6 * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ Object.defineProperty(A,"__esModule",{value:!0});var t=null,n=!1,r=3,o=-1,i=-1,c=!1,a=!1;function l(){if(!c){var e=t.expirationTime;a?Y():a=!0,F(g,e)}}function u(){var e=t,A=t.next;if(t===A)t=null;else{var n=t.previous;t=n.next=A,A.previous=n}e.next=e.previous=null,n=e.callback,A=e.expirationTime,e=e.priorityLevel;var o=r,c=i;r=e,i=A;try{var a=n()}finally{r=o,i=c}if("function"==typeof a)if(a={callback:a,priorityLevel:e,expirationTime:A,next:null,previous:null},null===t)t=a.next=a.previous=a;else{n=null,e=t;do{if(e.expirationTime>=A){n=e;break}e=e.next}while(e!==t);null===n?n=t:n===t&&(t=a,l()),(A=n.previous).next=n.previous=a,a.next=n,a.previous=A}}function s(){if(-1===o&&null!==t&&1===t.priorityLevel){c=!0;try{do{u()}while(null!==t&&1===t.priorityLevel)}finally{c=!1,null!==t?l():a=!1}}}function g(e){c=!0;var r=n;n=e;try{if(e)for(;null!==t;){var o=A.unstable_now();if(!(t.expirationTime<=o))break;do{u()}while(null!==t&&t.expirationTime<=o)}else if(null!==t)do{u()}while(null!==t&&!y())}finally{c=!1,n=r,null!==t?l():a=!1,s()}}var B,f,E=Date,w="function"==typeof setTimeout?setTimeout:void 0,Q="function"==typeof clearTimeout?clearTimeout:void 0,p="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,d="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function h(e){B=p(function(A){Q(f),e(A)}),f=w(function(){d(B),e(A.unstable_now())},100)}if("object"==typeof performance&&"function"==typeof performance.now){var C=performance;A.unstable_now=function(){return C.now()}}else A.unstable_now=function(){return E.now()};var F,Y,y,m=null;if("undefined"!=typeof window?m=window:void 0!==e&&(m=e),m&&m._schedMock){var I=m._schedMock;F=I[0],Y=I[1],y=I[2],A.unstable_now=I[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var v=null,D=function(e){if(null!==v)try{v(e)}finally{v=null}};F=function(e){null!==v?setTimeout(F,0,e):(v=e,setTimeout(D,0,!1))},Y=function(){v=null},y=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof p&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof d&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var x=null,M=!1,N=-1,b=!1,U=!1,H=0,k=33,T=33;y=function(){return H<=A.unstable_now()};var R=new MessageChannel,J=R.port2;R.port1.onmessage=function(){M=!1;var e=x,t=N;x=null,N=-1;var n=A.unstable_now(),r=!1;if(0>=H-n){if(!(-1!==t&&t<=n))return b||(b=!0,h(G)),x=e,void(N=t);r=!0}if(null!==e){U=!0;try{e(r)}finally{U=!1}}};var G=function(e){if(null!==x){h(G);var A=e-H+T;A<T&&k<T?(8>A&&(A=8),T=A<k?k:A):k=A,H=e+T,M||(M=!0,J.postMessage(void 0))}else b=!1};F=function(e,A){x=e,N=A,U||0>A?J.postMessage(void 0):b||(b=!0,h(G))},Y=function(){x=null,M=!1,N=-1}}A.unstable_ImmediatePriority=1,A.unstable_UserBlockingPriority=2,A.unstable_NormalPriority=3,A.unstable_IdlePriority=5,A.unstable_LowPriority=4,A.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=r,i=o;r=e,o=A.unstable_now();try{return t()}finally{r=n,o=i,s()}},A.unstable_next=function(e){switch(r){case 1:case 2:case 3:var t=3;break;default:t=r}var n=r,i=o;r=t,o=A.unstable_now();try{return e()}finally{r=n,o=i,s()}},A.unstable_scheduleCallback=function(e,n){var i=-1!==o?o:A.unstable_now();if("object"==typeof n&&null!==n&&"number"==typeof n.timeout)n=i+n.timeout;else switch(r){case 1:n=i+-1;break;case 2:n=i+250;break;case 5:n=i+1073741823;break;case 4:n=i+1e4;break;default:n=i+5e3}if(e={callback:e,priorityLevel:r,expirationTime:n,next:null,previous:null},null===t)t=e.next=e.previous=e,l();else{i=null;var c=t;do{if(c.expirationTime>n){i=c;break}c=c.next}while(c!==t);null===i?i=t:i===t&&(t=e,l()),(n=i.previous).next=i.previous=e,e.next=i,e.previous=n}return e},A.unstable_cancelCallback=function(e){var A=e.next;if(null!==A){if(A===e)t=null;else{e===t&&(t=A);var n=e.previous;n.next=A,A.previous=n}e.next=e.previous=null}},A.unstable_wrapCallback=function(e){var t=r;return function(){var n=r,i=o;r=t,o=A.unstable_now();try{return e.apply(this,arguments)}finally{r=n,o=i,s()}}},A.unstable_getCurrentPriorityLevel=function(){return r},A.unstable_shouldYield=function(){return!n&&(null!==t&&t.expirationTime<i||y())},A.unstable_continueExecution=function(){null!==t&&l()},A.unstable_pauseExecution=function(){},A.unstable_getFirstCallbackNode=function(){return t}}).call(this,t(11))},function(e,A,t){"use strict";A.__esModule=!0,A.default=function(e){var A={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=0);return A},e.exports=A.default},function(e,A,t){"use strict";A.__esModule=!0,A.default=function(e){var A={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]="number"==typeof e[t]?e[t]:e[t].val);return A},e.exports=A.default},function(e,A,t){"use strict";A.__esModule=!0,A.default=function(e,A,t,r,o,i,c){var a=t+(-o*(A-r)+-i*t)*e,l=A+a*e;if(Math.abs(a)<c&&Math.abs(l-r)<c)return n[0]=r,n[1]=0,n;return n[0]=l,n[1]=a,n};var n=[0,0];e.exports=A.default},function(e,A,t){"use strict";A.__esModule=!0,A.default=function(e,A,t){for(var n={},r=0;r<e.length;r++)n[e[r].key]=r;for(var o={},r=0;r<A.length;r++)o[A[r].key]=r;for(var i=[],r=0;r<A.length;r++)i[r]=A[r];for(var r=0;r<e.length;r++)if(!Object.prototype.hasOwnProperty.call(o,e[r].key)){var c=t(r,e[r]);null!=c&&i.push(c)}return i.sort(function(e,t){var r=o[e.key],i=o[t.key],c=n[e.key],a=n[t.key];if(null!=r&&null!=i)return o[e.key]-o[t.key];if(null!=c&&null!=a)return n[e.key]-n[t.key];if(null!=r){for(var l=0;l<A.length;l++){var u=A[l].key;if(Object.prototype.hasOwnProperty.call(n,u)){if(r<o[u]&&a>n[u])return-1;if(r>o[u]&&a<n[u])return 1}}return 1}for(var l=0;l<A.length;l++){var u=A[l].key;if(Object.prototype.hasOwnProperty.call(n,u)){if(i<o[u]&&c>n[u])return 1;if(i>o[u]&&c<n[u])return-1}}return-1})},e.exports=A.default},function(e,A,t){(function(A){(function(){var t,n,r;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=A&&A.hrtime?(e.exports=function(){return(t()-r)/1e6},n=A.hrtime,r=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})()):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)}).call(this,t(16))},function(e,A,t){(function(A){for(var n=t(42),r="undefined"==typeof window?A:window,o=["moz","webkit"],i="AnimationFrame",c=r["request"+i],a=r["cancel"+i]||r["cancelRequest"+i],l=0;!c&&l<o.length;l++)c=r[o[l]+"Request"+i],a=r[o[l]+"Cancel"+i]||r[o[l]+"CancelRequest"+i];if(!c||!a){var u=0,s=0,g=[];c=function(e){if(0===g.length){var A=n(),t=Math.max(0,1e3/60-(A-u));u=t+A,setTimeout(function(){var e=g.slice(0);g.length=0;for(var A=0;A<e.length;A++)if(!e[A].cancelled)try{e[A].callback(u)}catch(e){setTimeout(function(){throw e},0)}},Math.round(t))}return g.push({handle:++s,callback:e,cancelled:!1}),s},a=function(e){for(var A=0;A<g.length;A++)g[A].handle===e&&(g[A].cancelled=!0)}}e.exports=function(e){return c.call(r,e)},e.exports.cancel=function(){a.apply(r,arguments)},e.exports.polyfill=function(e){e||(e=r),e.requestAnimationFrame=c,e.cancelAnimationFrame=a}}).call(this,t(11))},function(e,A,t){(function(A){(function(){var t,n,r,o,i,c;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=A&&A.hrtime?(e.exports=function(){return(t()-i)/1e6},n=A.hrtime,o=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),c=1e9*A.uptime(),i=o-c):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)}).call(this,t(16))},function(e,A,t){"use strict";A.__esModule=!0,A.default=function(e,A,t){for(var n in A)if(Object.prototype.hasOwnProperty.call(A,n)){if(0!==t[n])return!1;var r="number"==typeof A[n]?A[n]:A[n].val;if(e[n]!==r)return!1}return!0},e.exports=A.default},function(e,A,t){"use strict";var n=t(45);function r(){}function o(){}o.resetWarningCache=r,e.exports=function(){function e(e,A,t,r,o,i){if(i!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function A(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:A,element:e,elementType:e,instanceOf:A,node:e,objectOf:A,oneOf:A,oneOfType:A,shape:A,exact:A,checkPropTypes:o,resetWarningCache:r};return t.PropTypes=t,t}},function(e,A,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,A,t){"use strict";A.__esModule=!0,A.default={noWobble:{stiffness:170,damping:26},gentle:{stiffness:120,damping:14},wobbly:{stiffness:180,damping:12},stiff:{stiffness:210,damping:20}},e.exports=A.default},function(e,A,t){"use strict";A.__esModule=!0;var n=t(0),r=(i(n),i(t(1))),o=i(t(48));i(t(49));function i(e){return e&&e.__esModule?e:{default:e}}function c(e,A){if(!(e instanceof A))throw new TypeError("Cannot call a class as a function")}function a(e,A){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!A||"object"!=typeof A&&"function"!=typeof A?e:A}function l(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Super expression must either be null or a function, not "+typeof A);e.prototype=Object.create(A&&A.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(e,A):e.__proto__=A)}var u=1073741823;A.default=function(e,A){var t,i,s="__create-react-context-"+(0,o.default)()+"__",g=function(e){function t(){var A,n,r,o;c(this,t);for(var i=arguments.length,l=Array(i),u=0;u<i;u++)l[u]=arguments[u];return A=n=a(this,e.call.apply(e,[this].concat(l))),n.emitter=(r=n.props.value,o=[],{on:function(e){o.push(e)},off:function(e){o=o.filter(function(A){return A!==e})},get:function(){return r},set:function(e,A){r=e,o.forEach(function(e){return e(r,A)})}}),a(n,A)}return l(t,e),t.prototype.getChildContext=function(){var e;return(e={})[s]=this.emitter,e},t.prototype.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var t=this.props.value,n=e.value,r=void 0;((o=t)===(i=n)?0!==o||1/o==1/i:o!=o&&i!=i)?r=0:(r="function"==typeof A?A(t,n):u,0!=(r|=0)&&this.emitter.set(e.value,r))}var o,i},t.prototype.render=function(){return this.props.children},t}(n.Component);g.childContextTypes=((t={})[s]=r.default.object.isRequired,t);var B=function(A){function t(){var e,n;c(this,t);for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=n=a(this,A.call.apply(A,[this].concat(o))),n.state={value:n.getValue()},n.onUpdate=function(e,A){0!=((0|n.observedBits)&A)&&n.setState({value:n.getValue()})},a(n,e)}return l(t,A),t.prototype.componentWillReceiveProps=function(e){var A=e.observedBits;this.observedBits=null==A?u:A},t.prototype.componentDidMount=function(){this.context[s]&&this.context[s].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?u:e},t.prototype.componentWillUnmount=function(){this.context[s]&&this.context[s].off(this.onUpdate)},t.prototype.getValue=function(){return this.context[s]?this.context[s].get():e},t.prototype.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},t}(n.Component);return B.contextTypes=((i={})[s]=r.default.object,i),{Provider:g,Consumer:B}},e.exports=A.default},function(e,A,t){"use strict";(function(A){var t="__global_unique_id__";e.exports=function(){return A[t]=(A[t]||0)+1}}).call(this,t(11))},function(e,A,t){"use strict";var n=t(50);e.exports=n},function(e,A,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,A){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,A,t){"use strict"; /** @license React v16.8.6 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */Object.defineProperty(A,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,c=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,s=n?Symbol.for("react.async_mode"):60111,g=n?Symbol.for("react.concurrent_mode"):60111,B=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,E=n?Symbol.for("react.memo"):60115,w=n?Symbol.for("react.lazy"):60116;function Q(e){if("object"==typeof e&&null!==e){var A=e.$$typeof;switch(A){case r:switch(e=e.type){case s:case g:case i:case a:case c:case f:return e;default:switch(e=e&&e.$$typeof){case u:case B:case l:return e;default:return A}}case w:case E:case o:return A}}}function p(e){return Q(e)===g}A.typeOf=Q,A.AsyncMode=s,A.ConcurrentMode=g,A.ContextConsumer=u,A.ContextProvider=l,A.Element=r,A.ForwardRef=B,A.Fragment=i,A.Lazy=w,A.Memo=E,A.Portal=o,A.Profiler=a,A.StrictMode=c,A.Suspense=f,A.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===g||e===a||e===c||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===w||e.$$typeof===E||e.$$typeof===l||e.$$typeof===u||e.$$typeof===B)},A.isAsyncMode=function(e){return p(e)||Q(e)===s},A.isConcurrentMode=p,A.isContextConsumer=function(e){return Q(e)===u},A.isContextProvider=function(e){return Q(e)===l},A.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},A.isForwardRef=function(e){return Q(e)===B},A.isFragment=function(e){return Q(e)===i},A.isLazy=function(e){return Q(e)===w},A.isMemo=function(e){return Q(e)===E},A.isPortal=function(e){return Q(e)===o},A.isProfiler=function(e){return Q(e)===a},A.isStrictMode=function(e){return Q(e)===c},A.isSuspense=function(e){return Q(e)===f}},function(e,A,t){var n=t(54);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};t(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,A,t){(e.exports=t(8)(!1)).push([e.i,".Avatar .me {\n background-color: transparent;\n border-radius: 100%;\n border: 1px black; }\n",""])},function(e,A){e.exports=function(e){var A="undefined"!=typeof window&&window.location;if(!A)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var t=A.protocol+"//"+A.host,n=t+A.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,A){var r,o=A.trim().replace(/^"(.*)"$/,function(e,A){return A}).replace(/^'(.*)'$/,function(e,A){return A});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(r=0===o.indexOf("//")?o:0===o.indexOf("/")?t+o:n+o.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(e,A,t){var n=t(57);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};t(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,A,t){(e.exports=t(8)(!1)).push([e.i,".About {\n background-color: #e0ebe8;\n text-align: center; }\n .About > * {\n margin-top: 4rem; }\n .About > div {\n display: flex;\n flex-direction: column;\n min-width: 75vw;\n width: 40rem;\n max-width: 100vw;\n margin-left: auto;\n margin-right: auto; }\n .About > div div {\n flex: 1;\n padding: 1rem; }\n .About > div.sec > div {\n display: flex;\n justify-content: space-around; }\n .About > div.sec > div > * {\n flex: 1; }\n .About > div.sec > div > *:first-of-type {\n text-align: left; }\n .About > div.sec > div > *:last-of-type {\n text-align: right; }\n",""])},function(e,A,t){var n=t(59);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};t(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,A,t){(e.exports=t(8)(!1)).push([e.i,".Header {\n height: 80px;\n display: flex;\n justify-content: space-around;\n align-items: flex-end;\n text-align: center;\n background-color: transparent;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw; }\n .Header > * {\n flex: 1 1 1px;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-around; }\n .Header > div.Avatar {\n flex-grow: 3;\n display: flex;\n justify-content: space-around; }\n",""])},function(e,A,t){var n=t(61);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};t(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,A,t){(e.exports=t(8)(!1)).push([e.i,".Splash {\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n position: relative;\n background-color: #e0ebe8;\n display: flex;\n flex-direction: column; }\n .Splash > div {\n flex: 1 1 1px;\n font-size: 2.5em;\n background-color: transparent;\n text-align: center;\n cursor: default; }\n .Splash > div:first-of-type {\n padding: 2.5% 0;\n display: flex;\n flex-direction: column;\n justify-content: center; }\n .Splash > div .title {\n font-size: 3em;\n font-family: Handwritten; }\n .Splash > div .subtitle {\n font-size: 1.5em;\n margin: 0;\n font-weight: 100; }\n .Splash > div.earth {\n display: flex;\n flex-direction: column;\n align-items: center; }\n .Splash > div.earth > * {\n min-width: 50%;\n max-width: 1040px;\n flex: 1; }\n",""])},function(e,A,t){var n=t(63);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};t(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,A,t){(e.exports=t(8)(!1)).push([e.i,".Work > div {\n display: flex;\n flex-direction: column;\n min-height: calc(100vh - 80px);\n text-align: center; }\n .Work > div:nth-child(1n) {\n background-color: #f76160; }\n .Work > div:nth-child(2n) {\n background-color: #7dcc93; }\n .Work > div:nth-child(3n) {\n background-color: #31355b; }\n .Work > div:nth-child(4n) {\n background-color: #f8c687; }\n .Work > div img {\n border-radius: 15px;\n object-fit: contain;\n max-height: 50vh;\n max-width: 95vw; }\n .Work > div > * {\n flex: 1;\n margin-top: 25px; }\n .Work > div * {\n color: #e0ebe8; }\n .Work > div .buttons a {\n background-color: #4ab19a;\n padding: 0.5rem 5rem;\n border-radius: 5px;\n margin: 5px; }\n",""])},function(e,A,t){var n=t(65);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};t(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,A,t){A=e.exports=t(8)(!1);var n=t(66)(t(67));A.push([e.i,"@media all and (max-width: 599px) {\n html {\n font-size: 8px; } }\n\n@media all and (min-width: 600px) and (max-width: 799px) {\n html {\n font-size: 10px; } }\n\n@media all and (min-width: 800px) and (max-width: 1024px) {\n html {\n font-size: 12px; } }\n\n@media all and (min-width: 1025px) and (max-width: 1399px) {\n html {\n font-size: 15px; } }\n\n@media all and (min-width: 1400px) {\n html {\n font-size: 18px; } }\n\n@font-face {\n font-family: Handwritten;\n src: url("+n+"); }\n\nbody {\n margin: 0;\n padding: 0;\n font-size: 18px;\n overflow: hidden; }\n body * {\n box-sizing: border-box;\n -webkit-touch-callout: none;\n /* iOS Safari */\n -webkit-user-select: none;\n /* Safari */\n -khtml-user-select: none;\n /* Konqueror HTML */\n -moz-user-select: none;\n /* Firefox */\n -ms-user-select: none;\n /* Internet Explorer/Edge */\n user-select: none;\n /* Non-prefixed version, currently supported by Chrome and Opera */ }\n body h1, body h2, body h3, body h4, body h5 {\n margin: 0;\n padding: 0; }\n body h1, body h2 {\n color: #4ab19a; }\n body h1 {\n font-size: 3rem; }\n body h2 {\n font-size: 2.25rem; }\n body h3 {\n margin-bottom: 0.5em; }\n body h5 {\n margin-top: 0.75em; }\n body a {\n text-decoration: none;\n color: #4ab19a;\n font-weight: bold;\n font-size: 1.75rem; }\n body a.active {\n color: #225e51; }\n\n/* Transitions */\n.switch-wrapper {\n position: relative; }\n .switch-wrapper > div {\n position: absolute;\n overflow-y: auto;\n overflow-x: hidden;\n height: 100vh;\n width: 100vw; }\n .switch-wrapper > div > * {\n width: 100vw;\n min-height: 100vh;\n padding-top: 80px; }\n",""])},function(e,A,t){"use strict";e.exports=function(e,A){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)||A?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},function(e,A){e.exports="data:font/ttf;base64,AAEAAAAPAIAAAwBwR0RFRgD6ACQAAN0IAAAAKEdQT1OYRvWZAADdMAAAESpPUy8yiS7McQAAAXgAAABgVkRNWGDTaFgAAAUEAAAF4GNtYXAPz+rEAAAK5AAAAsBnYXNw//8AAwAA3QAAAAAIZ2x5ZqbiTKoAAA2kAACxnGhlYWT885mRAAAA/AAAADZoaGVhBtQCQwAAATQAAAAkaG10eEDDxPUAAAHYAAADLGtlcm7i9ei0AADA2AAAGAxsb2NhxdH04AAAv0AAAAGYbWF4cADVAUIAAAFYAAAAIG5hbWWq+euZAADY5AAAAihwb3N0u4TliQAA2wwAAAHyAAEAAAABAADQtiKeXw889QALA+gAAAAAzUcp0wAAAADNSCz0/4n+qgO8AzsAAAAIAAIAAAAAAAAAAQAAAzL+rwBaA+j/if7gA7wAAQAAAAAAAAAAAAAAAAAAAMsAAQAAAMsBQQAJAAAAAAABAAAAAAAAAAAAAAAAAAAAAAADAZYB9AAFAAACigK7AAAAjAKKArsAAAHfADEBAgAAAgAGAwAAAAAAAIAAAAcQAQAKAAAAAAAAAAAydHRmAEAAIPj/AyD/OABaAy0BTQAAAAEAAAAAAXMC0wAAACAAAgFsACEAAAAAAU0AAAEPAAAArQFjAUsBmgE0AIoBOgDQAT8BFAFNAMoA2AGSAMgAwgGqASMBFgEbAOoA9gCCAQkA5gEaALgBLAEqANUBvgFBAM8BgwH8AUECAgFoAfQBUAH/AXsB6AFpAewBWAHUAVUB7gF1ANABkADNAU0BBgDVAQsBBwEHAOkBYgEmAcUAqAIbAOIB1ACXAdcAugI7ALMCCwDUAkAAvQI0AOoB/gCXAXYAxQGgAKEB1ABtAdYAeQJsAIsB9wCzAfQAtgH0AJcB9AC2AhcAnQG0AIICKgCoAdcAywIoAJgCtgCYAbEA9AHEAMUCRQBxAW8AvQE4AMYBXgBnAP8BIwHKAUoAwQFeAXQAqQEOAMEBDwC0AXYApwEEALABCwCLAUoAqAFzALgAlAC1AKAAHwFJAMgA5QCoAh8AogF7AKkBVgCiAWMAtAFIAKMBKADGAW8AggDQAHkBegDEAXMAxgIQAMcBVQDJAUkAtQFZAJwAvgCbAJYBWAEYAOAA7QBkAPoBrwDnAMABigDfAdABKgFjAQIA0AF+AQoA/AEsAWoB2QDaAZ4BLAG6AWMBvgEqAdkA2gG5AUYBRwGGAVYA4AFFAVEBQwFYATIBrgHkARsBpgEGANQBmAD+AWYA9QGjAUcBWwG9AXUCRAFtAiYBbQJEAREBqwFwArYBqgK2AaoCtgGqArYBqgK2AaoCtgGqAmkA2gJNAYECVAFoAlQBaAJUAWgCVAFoAc8BYAHPAWAB0wFgAc8BYAKjAXsCvwF7AogBfgKIAX4CiAF+AogBfgKIAX4BZAGLAogBWgI6AWkCOgFpAjoBaQI6AWkCIQFZAgcBYgIoAYQBdACpAXQAqQF0AKkBdACpAXQAqQF0AKkCEQCpAQ8AtAEEALABBACwAQQAsAEEALAAlACxAJgAtQCYAKgAmAC1Ac4BdwF1AKkBVgCiAVYAogFWAKIBVgCiAVYAogECAQIBVgB+AXoAxAF6AMQBegDEAXoAxAFJALUCJQFRAUkAtQHWAEoBBP/fAQMBowDZAY0BTQGiAVMBsQFsARQCTQEXAg4AHgPoAAACfP+JAAAAAQABAQEBAQAMAPgI/wAIAAf//QAJAAj//QAKAAn//AALAAn//AAMAAr//AANAAv/+wAOAAz/+wAPAA3/+wAQAA7/+gARAA7/+gASAA//+gATABD/+QAUABH/+QAVABL/+QAWABL/+AAXABP/+AAYABT/+AAZABX/9wAaABb/9wAbABb/9wAcABf/9gAdABj/9gAeABn/9gAfABr/9QAgABv/9QAhABv/9QAiABz/9AAjAB3/9AAkAB7/9AAlAB//8wAmAB//8wAnACD/8wAoACH/8gApACL/8gAqACP/8gArACP/8QAsACT/8QAtACX/8QAuACb/8AAvACf/8AAwACj/8AAxACj/7wAyACn/7wAzACr/7wA0ACv/7gA1ACz/7gA2ACz/7gA3AC3/7QA4AC7/7QA5AC//7QA6ADD/7AA7ADD/7AA8ADH/7AA9ADL/6wA+ADP/6wA/ADT/6wBAADX/6gBBADX/6gBCADb/6gBDADf/6QBEADj/6QBFADn/6QBGADn/6ABHADr/6ABIADv/6ABJADz/5wBKAD3/5wBLAD3/5wBMAD7/5gBNAD//5gBOAED/5gBPAEH/5QBQAEL/5QBRAEL/5QBSAEP/5ABTAET/5ABUAEX/5ABVAEb/4wBWAEb/4wBXAEf/4wBYAEj/4gBZAEn/4gBaAEr/4gBbAEr/4QBcAEv/4QBdAEz/4QBeAE3/4ABfAE7/4ABgAE//4ABhAE//3wBiAFD/3wBjAFH/3wBkAFL/3gBlAFP/3gBmAFP/3gBnAFT/3QBoAFX/3QBpAFb/3QBqAFf/3ABrAFf/3ABsAFj/3ABtAFn/2wBuAFr/2wBvAFv/2wBwAFz/2gBxAFz/2gByAF3/2gBzAF7/2QB0AF//2QB1AGD/2QB2AGD/2AB3AGH/2AB4AGL/2AB5AGP/1wB6AGT/1wB7AGT/1wB8AGX/1gB9AGb/1gB+AGf/1gB/AGj/1QCAAGn/1QCBAGn/1QCCAGr/1ACDAGv/1ACEAGz/1ACFAG3/0wCGAG3/0wCHAG7/0wCIAG//0gCJAHD/0gCKAHH/0gCLAHL/0QCMAHL/0QCNAHP/0QCOAHT/0ACPAHX/0ACQAHb/0ACRAHb/zwCSAHf/zwCTAHj/zwCUAHn/zgCVAHr/zgCWAHr/zgCXAHv/zQCYAHz/zQCZAH3/zQCaAH7/zACbAH//zACcAH//zACdAID/ywCeAIH/ywCfAIL/ywCgAIP/ygChAIP/ygCiAIT/ygCjAIX/yQCkAIb/yQClAIf/yQCmAIf/yACnAIj/yACoAIn/yACpAIr/xwCqAIv/xwCrAIz/xwCsAIz/xgCtAI3/xgCuAI7/xgCvAI//xQCwAJD/xQCxAJD/xQCyAJH/xACzAJL/xAC0AJP/xAC1AJT/wwC2AJT/wwC3AJX/wwC4AJb/wgC5AJf/wgC6AJj/wgC7AJn/wQC8AJn/wQC9AJr/wQC+AJv/wAC/AJz/wADAAJ3/wADBAJ3/vwDCAJ7/vwDDAJ//vwDEAKD/vgDFAKH/vgDGAKH/vgDHAKL/vQDIAKP/vQDJAKT/vQDKAKX/vADLAKb/vADMAKb/vADNAKf/uwDOAKj/uwDPAKn/uwDQAKr/ugDRAKr/ugDSAKv/ugDTAKz/uQDUAK3/uQDVAK7/uQDWAK7/uADXAK//uADYALD/uADZALH/twDaALL/twDbALP/twDcALP/tgDdALT/tgDeALX/tgDfALb/tQDgALf/tQDhALf/tQDiALj/tADjALn/tADkALr/tADlALv/swDmALv/swDnALz/swDoAL3/sgDpAL7/sgDqAL//sgDrAMD/sQDsAMD/sQDtAMH/sQDuAML/sADvAMP/sADwAMT/sADxAMT/rwDyAMX/rwDzAMb/rwD0AMf/rgD1AMj/rgD2AMj/rgD3AMn/rQD4AMr/rQD5AMv/rQD6AMz/rAD7AM3/rAD8AM3/rAD9AM7/qwD+AM//qwD/AND/qwAAAAMAAAADAAACUAABAAAAAAAcAAMAAQAAAeAABgHEAAAAIADdAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgAGQAaABsAHAAdAB4AHwAgACEAIgAjACQAJQAmACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAOgA7ADwAPQA+AD8AQABBAEIAQwBEAEUARgBHAEgASQBKAEsATABNAE4ATwBQAFEAUgBTAFQAVQBWAFcAWABZAFoAWwBcAF0AXgBfAGAAYQAAAIQAhQCHAIkAkQCWAJwAoQCgAKIApACjAKUApwCpAKgAqgCrAK0ArACuAK8AsQCzALIAtAC2ALUAugC5ALsAvAAAAHAAYwBkAGgAAAB2AJ8AbgBqAMgAdABpAAAAhgCYAAAAcQAAAAAAZgB1AAAAAAAAAAAAAABrAHoAAACmALgAfwBiAG0AAAAAAAAAAABsAHsAAAAAAIAAgwCVAMAAwQAAAAAAxADFAMIAwwC3AAAAvwAAAAAAZQAAAAAAAAAAAAAAdwAAAAAAxgCCAIoAgQCLAIgAjQCOAI8AjACTAJQAygCSAJoAmwCZAAAAAAAAAG8AAAAAAAAAeAAEAHAAAAAYABAAAwAIAH4ArAD/AVMgGSAdIDAgrCEiMAD4////AAAAIAChAK4BUiAYIBwgMCCsISIwAPj/////4//B/8D/buCq4KjgluAb36bQyQfLAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABABwAAAAGAAQAAMACAB+AKwA/wFTIBkgHSAwIKwhIjAA+P///wAAACAAoQCuAVIgGCAcIDAgrCEiMAD4/////+P/wf/A/27gquCo4JbgG9+m0MkHywABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAIQAAASoCmgADAAcAADczESMDESERQsfHIQEJIQJY/YcCmv1mAAACAWMAHwGoAokAEQAaAAABBgcGBw4BLgE1Njc2Nz4BHgEDFhQGIiY0NjIBpwcCAwEBEBYPAQMCBwERFw4XCBAWEBAWAmtQgboaCw8BEAsdtYJTDA4CEf3XCBYQEBYQAAACAZoCFwJIArAADQAbAAABFAcOAS4BNzY1NDYyFhcGBw4BLgE3Njc+AR4BAdwLAhIWDQELEBYQaQkFARIWDgEGCgISFg0ClSJECw0DEgtAHgsQEBMuLwsOAhILMTALDQUSAAAAAgCKACACMQH2AE0AVwAAATY1NDYyFhUUBzY3Nh4BBgcGBwYVBhU2MzIWFAYjIgcWFxYOASYnJicGBwYHDgEuATc2NwcGLgE2PwE2NwcGLgE2PwE2NTQ2MhYVFAc2FwYHBgc2NzQ3NAG1BRAWEAQSEQsTBA0LGBgCARcVCxAQCxQWBA0DChYTBA4FO00KDQQTFgoDCghICxICDgtZBwU9CxECDwtFAhAWEAJCLjFDBAZFNwEBZFIlCxAQCyVKAgQCDRYTAgQDGRMaFwEQFhABNSgLEwcKCy49AwcvKgsKBxMLICMIAQ4WEgEJKiwFAQ8WEQEFLC4LEBALLCkGMQYFLCkGAxgcEAAAAwDQ/88COwJPADcAQwBPAAABLgEHBgcGFxYXHgEXHgMHBgcGBwYmJyY+ARYXHgE3Njc2NzYmLwEmJyYnJjc2NzYWFx4BDgEDFxYOASYvASY+ARYDFxYOASYvASY+ARYB7BJHIyAMCQoIJQ87CxokKA4HCjMqOjprGQUGFBUGDkwvLiEeBQYlMCoeDzUQGh4WMidjHQoFDBY7BQENFhICBQENFhISBAENFhICBAENFhIBsAsECQoPDRUPEwcZBQsXJDMeLR0YBgUjLQoVCwYKGhkEBBMRFhwpFRINBxogMigeDg0GEgYWEwX+ZiELEgMNCyELEgMNAhwcCxIDDQscCxIDDQADART/8wI/AioADQAWAB8AAAEGAw4BLgE3Ejc+AR4BBxYUBiImNDYyExYUBiImNDYyAjpSngUVFAgEn1MFFhMH3AgQFhAQFqMIEBYQEBYCAZ/+owoICRUKAV+fCgcKFg8IFhAQFhD+RwgWEBAWEAAAAwDK/+ECbQILAAoAMwA9AAAlJicGBwYXHgE3NjcXHgEOAScmJwYHDgEmJyY3NjcmJyY3Njc2FxYHBgcWFzY3PgEeAQcGJzY3NicmBwYHBgHMRSYoERwNEUszEmk+CQMNFwgnJR0eJUdJFiUwFzYFBBMFCUc0JDIqFkMkUCoOBRUUBwUS4S8RFhIPGSEFBE5FPi4dLhEWBRIHATQGFxEDBx0iEAsOCRQcME0lPwwMQjdYEAwfK08oTUROHx0KBwoVCibMOB8oEAwFCDEpAAAAAAEBkgIVAdQCswAPAAABDgEHDgEuATc+ATc+AR4BAdMCBQMCEhYNAQMGAQESFg4ClAxIEwsNAxILE0UNCw4CEgABAML/hgFPAoUAEwAAAQ4CFhcWDgEmJy4BPgE3PgEeAQFEHiUIJioGBRMWBi8qCiYgBBQVCQJeTbK5s0EKFgwFCUrDxrpRCgkIFAAAAQEj/4oBtAKIABMAAAU+AScmJyY+ARYXHgEOAQcOAS4BASctLAwLNQYGExUGLSUOKyIFFBUITmfuf39YChUMBglLxMW6TwoICRQAAAEBGwF7AhQCdgAwAAABDgIuATc2NwYHBi4BNjc2NyYnLgE+AR8BJicmPgEWFxYXNzYeAQYPARYXHgEOAScBtwECEBcPAQEBHh4KFQsGCiEiHRkJAw0WCS4BAwENFxECAwErCRYNAwk/JhoJAw0WCQG3FRgPAhALDxgUEAUGFBUGERcYEQcWEgMGIxoYCxEDDQwYHCEGAxIWBy8fEwcWEgMGAAAAAQD2AIMB5AFZAB8AAAE2MzU0NjIWHQEyNzIWFAYjBiMVFAYiJj0BIgciJjQ2ARAaJxAWECYbCxEPCxsnEBYQJhoLEQ8BBgE3CxAQCzgBDxYRATILEBALMwEPFhEAAAAAAQEJ/6QBfgBFAA8AACUOAQcGLgE2Nz4BNz4BHgEBfQUhIQkWDgIJGRcDAhEWDiYpNxsHAhIWBxUlHQsOAxEAAAEBGgCxAeAA6QAPAAAlFjYzMhYUBiMiBiciJjQ2ATYNdQ0LEBALDXcNCw8R6AECEBYQAgERFg8AAQEsAAABYgA2AAgAACUWFAYiJjQ2MgFaCBAWEBAWLggWEBAWEAAAAAEA1f/VAigCLAANAAAzNhM+AR4BBwIDDgEuAduYfwUVFAgEfp0GFhMF+gEgCggJFQr+5P78CgUMFgAAAAIBQf/sArsCBQAPACkAAAEGBwYHBgcGFxY3PgEnLgEnHgIXFg4CBwYnJjc2NzY3Njc2OwE2NzYB/A8JKh8gAgIgIEFESwMCSxMvRSACARUrTTJhMigCAiUpPwkOBgcFDQIQAcoBAxBERlBUMTMEBHhWU3Y2D1NlNi9YTjIDBk1AZF1PWBcEAgMBAQIAAQGD//4ByQHzAA0AAAECBxQGIiY1NhM+AR4BAckMBBAXDwQMARAWDwHX/uinCw8QDKcBGAsPARAAAAAAAQFB/+wC9wIBAEAAAAE+ARcWFxYHBgcGDwE2NzYXHgEOAScmBwYjIgcGBwYnLgE0Nj8BNjc2NzI/ATM/AzY3Njc2JyYnJgYHDgEuAQGsIGgwOhsdFRZZMl0eFXRrQwwPAhALQWmHJgEFCgQhCwEBAQEBAQEBAQEBAQECChwtWy9QEg4ODB8kUhgHFxACAbEkLAEDJipHSFwzThkBBAUEARAXDwEEBQUBAQEDGQMIBQQBAQMCAQIBAQMIFyRMMFI9LhQQAgEjGwgCDxcAAQFo//MC/gIGAEUAAAE+ATc2FxYXFgcGBxYXFhUUBgcGJicuAT4BFx4BNz4BNTQnJgciBwYnJicmNz4BPwE2NzI3Njc2NzYnJicmBw4BBwYuATYBkxZQKTQmNRckRRAWMiEqWEQ8gi4JBQwWCiRsMzU8GCpTARIXEwkFCQgCBQICAgUBDhkONxwmDgkaGyolSBIJFg0DAbARKQwQAwUnPUIPEAkdJkFIVg8MFR0GFhMFBhgRCgs8MSkWJQ0HCQYDCQ0OBAUBAQICBQoIHxokGBACAgwLJQ0HAxIWAAIBUP/3AvECEwALADsAACU3NjUGDwIzFhcWExYPATMyFhQGKwEGBxQGIiY1NjciJyYnJicmJyYnLgE3Njc2NzY/ATY3Njc2MzIWAkMDBiBHRwQCJEEeYQQIA10LEBALYAQBEBcPAQQjHT0qFwsIBQQECggDAQICBQcQR3MWBgoHCQsQyD5jQStXVwUCAQEBMVubPBAWEEs1Cw8QDDRLAQECAQIBAQECBRIKBAQGBwsUV40pCQQGDwABAXv//gMPAfQAXwAAASYHKwEVFB4BFRQeAR0BNzY3NhcWBwYHDgEnLgE+ARcWMzY3Njc2JyYHBgcGBwYjIicmJyY1NCc9ASY1NCc0LgE9AS4BJzQ3NDc2Nz4BMzcyMzc7BjYXHgEOAQKiNX8nBgIBAQEHMSGFOjEbGEg8mDILCAgVCihCQDQ0DhAiKGUcLRUHBwUOCAUDAQEBAQEBAQEBAQICBgMHAgIBAgIBAQEBBxMlgTcMDwIQAbsDAxcKFQ4BAw8YCAsCCwMMXk8/Nh0XARUEFRUIBBEBFBQhJThBCAMLBAIBBwQGAgIBAgMDAwYKEggXEAMIBxYJFQ4JBwsHAwUBAQMDARAXDwAAAgFp/9gC+AH7ABIANAAAJRYXFjc2Nz4BJyYnJg4BBwYHBhMiBgcGFxU2Nz4BNzYXFhcWBgcOAScmJyY3Njc2MzIWFAYByA0SHSkoIyUiBwgUETg8EygPApsvYhobCxAfGEsnMCMoDQw0MC1nLUwRDR4eOEFICxAQMA4HDAUGFRY8ISUMCgwpGDMlBQGSb1NTQQEdJx4zCQoVGDs3WhwbDhEfXk5gXUBKEBYQAAEBWP/9AugB7wAvAAABMxYXFhcWFxYXFg8BFAcUBg8DBgcGBw4BLgE3Njc2PwIiJyYnIwYnLgE+ARYBuXJGKBkPCgcMBgQBAgICAggYLE0xNCAEFRUIBCM2Mk8sCQUFJkRwPAwLDwIRFgHuAQMCBAIDBgoICQYCAgEDAgoeNl9HTE4LCAgVClRQSWE2CwEDAQEBAREWDwIAAwFV//cC1AHrAA0ANwBIAAABNj8BJiMiBgcGFxYXFjczNh4BBg8CBgceAxcWBgcGJicmJyY3NjcnJicmNjc+ATMyFh8BFgcGBwYXFhcWFxY3PgEnLgEnAeQtPiszIxI1Fi8KBh4M1AEJFg4DCCczNSMWHyQVAgQ8LSZeHyAFBREXPRQsDAwnIh1DGRgwDSQGt0EUCgICDhIgHyAhIgICLC8BIScuHyAPDRwgFRUIiwcDERYHHCYnHgwUICgXLkMPDwUWGCMfJC87DSAmKD4VEBMPCBUE3DwrFQ4NCg0BAgsLJxcYKBgAAAIBdf/TAvsCAgAQADIAAAEmJyYGBwYXFhcWNzY3Njc2AzI2NzYnBg8BDgMmJyYnJjc+ARcWFxYHBgcGIyImNDYCmg0TMmEeHAUFJyQcGyggEwKUL2AZGQsTHBcJIBwkJxZGCQgoJoVGTREPHhw3QEgLEBABoA4HEycrKCIhDQ0PDysiOwX+bXBTUj8qHRgJHA0LAgcZQjc5NzYbHV9OYF5BSxAWEAAAAAIBkAA9AcoBJQAIABEAAAEWFAYiJjQ2MhcWFAYiJjQ2MgHCCBAWEBAWBAgQFhAQFgEdCBYQEBYQuggWEBAWEAACAU3/wgHHAT0ADwAYAAAlDgEHBiImNDc+ATc+AR4BJxYUBiImNDYyAcAIHx4HFxAIGRcFAxIWDQMIEBYQEBZGJzYfCA8XCBooHgsNBRLkCBYQEBYQAAAAAQDVAGICBAGCACcAAD8BPgE3PgEeAQcOAQcXHgEfAR4BDgEnJi8CJicmLwEmJyYnJjc2N/xEFkMUBxYRAwceUTg5FkIUGwoKBxQLBxM0NjMbEQoKBAMHAgIOBgrxKQ41GggDDhYJJjwiEQcSBggEFBUKAwMGDhAPCQYEBQMCBwoSDAUDAAAAAAIBBwCNAgUBIAALABkAAAEzMhYUBisBIiY0Nhc2MzIWFAYjIgciJjQ2ASPHCxAQC8cLEBAJdlILEBALUnQLEQ8BIBAWEBAWEF0DEBYQAw8WEQAAAAEA6QB0AgYBlQAwAAA3PgE/ATY/AT4BNzMvAS4BPgEfAx4BFxYXFgcGBw4CBwYPAg4CDwEOASImNPYLFw8ZChIZByoEAS2ECgcKFQqERBUFBgMCAgUECSAGCwYCBhEYFQ8OGQgRChEWD6MKEgkPBgkMAxICF0AFFRQHBUAhDAMFAgMECgsZBwIBAgECBwsKBwgNBg0HDxEWAAAAAAIBJgAFAmUCdwAmAC8AAAE+ATc2FxYXFgcGBw4BFRQGIiY1ND4BNzY3NicmJyYHDgEHDgEuARMWFAYiJjQ2MgEoC1U1OCwyCwcjDDkvMxAWECYoIDcLFwQGGholJz0HAhMWDXQIEBYQEBYB1DpRDAwWGz0qNRJGOV4zCxAQCy1eOidDESMUJA4NCAk6KQsNBBP+aggWEBAWEAAAAAIAqP/GAskCLQARAFgAAAEmBwYHBhcWFxY3Njc2NzY3NhcGBwYHBicmJyY3Njc2FxYXHQEOAQcGFxYXFjc2JyYnLgEGBwYXHgEXFjY3PgEeAQcOAicuAScmNz4CFhcWFxYGBw4BJgHIFBMWFRcBARgJBgkKEwsEBwEbDA4TFx4fNAECHiAvPCcMAgEBAQMBAiAbFhkFCycnenAdKQcFb05OgxkDFBULAxVhcz5djAYIMBpib3QpMQ0DEA8SOUQBOyYEBiksLSsNBQIEDRknCzAOfBsSGgkMER1KOjk/Cw9MBw0HBwEKAxURLQkIJCclWS8uEDw3UHJJZwwNSlcLCwYUCkpdHgkPgV6BXTNGGSIxOmoZPBodIBQAAAAAAgDi/+MC6QKsAAkASQAAJTY3LgI2PQEHAwcOAS4BPwEGIyImNDYzMj8BPgE/ATY3Njc2FxYXFhcWFxUUBhUUBh4BFzc2HgEGDwEWFxY3Nh4BBgcGJyYnBgGNRUcFBgEBJXJDBBUUCQQ5Hx8LEBALKSxlDCcFFQMCBgsPCwgEAgEBAQEBAQUGKQsTBA0LKQ0VHjELEgIOC1EwHA9Z0gULJmE4YQIPYP7npAoJCBUKjQEQFhAC+xtoDDcJAwsCBAoHDwgLEhweEBcCBF82XCUIAg0WEwIHNR4tBgEOFhIBCUcoQg0AAwCX//UCdQKrAA4AHQBNAAABNzY3Njc2JyYHDgEHBg8BBgceAjY3PgEnLgEnJjcWFx4BBgcOAScmJwcOAS4BNzY3Jj8BNjc0NzY1NDYyFhUUBzY3PgEWFx4BBwYHBgEVL0AqdQwGGTJRIzwQBQIZERMPRl5YFy0EKhdRJDlQXzYrGyMsImk3WzMIAxQWCgMhGgQJEwMFARIQFhAFISYfPUUbGRUFEY0VAU8SFxU7QSAUJioRNhsfD5leSxUdCg0QHGMfEhkEBi4PKCBfXB0VEAUJKBsLCgYUC2yRDQt8ESACA286CxAQCygvHhMPDgoWEjgeXEYKAAABALr/7wKbAqMAKQAAATYnJicmBw4BBwYWFxY2Nz4BHgEHDgEnJicmNzY3Njc2FxYXFgcOAS4BAfQaHAoNDRMzaxUWODg5jz0GFhMFBkSwT1EjJBoXPT1DJiAjEiMcAhIWDQFzmT4UBgUHE55nc4sREUxgCgUMFglsXxgaWViCc1pbGA8NDSlNqAsNAxIAAAAEALP//QLxAsYACABAAE4AWQAAJTcGBwYHBhcWBQYHBgcGIwcOAS4BPwEmJyY3Njc2NxI3BgcGLgE2NzY/AT4BHgEPARYXHgEXFgYHFhcWDgEmJyYnPgEnLgEnJicGAzYzNhcmByIPATY3Njc2ARwJBwYZBwIHCAFOFxpFYBsYAQISFg0BAS4VHhkRKBIXNw0XHgsTBA0LKR4CAhIWDQEBNTJhcQQDNzggFwYDEhYHFyM1MwMEXlQqLw8zCAd1L09TChELEBZZPQZXMwICCQkECQoFDAoaCQMHCw0DEgsFCRwoJBcPBwUBSVsCBgINFhMCBwIOCw0DEgsGBBUqn1tDey0ZHwkWDQMJH1klajpLhSQTAmb+ygEFWyQEA0QBAgkWAwAAAQDU/+sCwgKNAFMAAAE2Jy4BJyYiDgEHBhcWFzIXMhcyFxYXFgcGBwYHIyInJi8BBgcGBwYHBhcWNzY3Nh4BBgcGBwYnLgE2NzY3JicuATc2NzY3PgEWFx4BFxYHBi4BNgIeLwQBFBMVMTUzEyAhEDoUFQIBAQIFBAoEAwsEBgQEBwQSBCIhIBgdAQIcPnFbYwoWDAMJbWWQUx4PFRcfLQgHGA4GBw4YISJGQx0eKgQJUAoVCwYB/hkWCBMHBw4pHjQeDggFAQECBQsNDAYCAQEBAgECFRUkKywtIkYZFEYGAxMWBk0WIF4hVk4jLxwFBhY5GBgXKBoaFAEKCycbOywFBhQVAAAAAQC9/+8DPQKTAGUAAAE2FxYXNjc2NzY3IicmIyYGBw4BLgE3PgEXMhcWOwEyNzY/ATY/ATYeAQYPAQ4CBwYjBgcGBwYHFhcWNzY3PgEeAQcGBwYvAQYHDgEHBiYnJj4BFhcWNz4BNzY3JyYnJgcGLgE2AX9XPw0TAQEEAwshDxVqHklmIAcWEgMGKoBSH2suFgoYEwoLFAgOFwoUBwoLFQ4UHQwREyULBAMCAgcGFQ4RDwcWEgIHGyQdIwMSOh1YLDNUFAQIFRUEGEwkRhYyDgIhDStDCxQHCgExHBoGCggSQBlRWQIHASIsCQMNFgk5KwEHAwIBAwUDBQgDChUUBAcFBgcCAl1UGjogFAMCCAMDEwkCDhYJIgcGDQFbOh0nBAMnLwsVCAgKOQYDHxYzVQETBRMXAwoVFAAAAAEA6v//AvACowBGAAAlNhcWFxY3MhYUBiMGJwYHBicmJyY3Njc2NzYXHgEXHgIdARQGIiY1NCY0JicmJyYGBwYHBgcGFxYXFjc2NyYjJgcOAS4BAZo4aBY7MBkLEQ8LHCs6QjlDayYcDQYYFyJcbiUzCwcIAQ8WEQEGBRAjJ08kHxYVBQsWGksuKDQvEA5PJwgWEALWPQMBBgYBDxYRAQV4MSoIDVtDZzFCQTubAwEwIRQxKhcnCxEPCxUsJScQLQEBQj01PT0qWjU+CQYeJl0CAysIAhAWAAMAl//lAsYCmAAQABgAaQAAJTY3JisCIg4CBwYXFhcWBSYnJicGBxYTBgcVNzYeAQYPAR0HBxQVBgcGBwYnJicmJyYnJjUnJicGBw4BLgE3NjcmJyYnJjc+AxYzMhc2NTQ2MhYVFAcWFxYXNjc+AR4BATkMBw8QDgwDCwUGBB8KCisRAQ0JC0ZZCA5a/SkGFQsRAg4MGQEBAQQHDQ0MCAUCAQEBCn1mFiIFFBUIBCIVHBk6EBc9CRMXCxoBEhEEEBYQBXVUCQcIJgISFg3tQUoCAQEEAxobHB4LTBcTeB9QRyQBx/HSCgIBDhcRAQIdEBANDgQCAQICAgMCBwQHBAMMChEFEgsDKAQoWk8KCAkUC05bDhInLT4zBwoEAQECSlkLEBALX04jkA8QyeULDQMSAAAAAgDF/+oCMQKZACUAVgAAATUmNjc2NzYXFhcWBw4BBwYHBgcGJyYnJicmNTY3Njc+ATc2NzIHFBcWFxYXFjc2NzY3PgE3NicmJyYHBgcOARcVNjc2HgEGBwYHFhcWDgEmJyYnBgciARQDExQZJDI+NA8JBAMgGR0hLDE1JRoOCwMBAQEBAQQODggNCg0BAgoLEhEUHB8eGxgfAgMHCBYfGhwVEhIDRQUMEQIOCwg8CBsECBQVBSAJEAsFAQwBJYc8SyU0FBFCJTcplkdWNUYKCyweNyktEg0IBQQDCQkCAgE3BwknJCsWEwQGMjBRRI4mLh4kBwobHT83fCADAgEBDhcRAQEBFzoKFQkICkUgAQEAAAAAAwCh/zoCdQJ/ACUAPABIAAAlBgcGBw4BJicmNzY3NjcGJyY3PgE3Njc2FxYXFgc2NzYeAQYHBiczNzYnJicmBwYHDgEHBhcWNz4CNzYHBgcGBwYXFjc2NzYB+hIqHTcVKzgYORsPKycqSiowAwJDLh8lPyMrDwwGLCoLEgMNCy9oAQIGCw0eCRwdGCc7AQIcI08QHxEWBANRTiUMDhsgLSwXINuwYUIrERIFEy1PKzczLAQlKlNFlSweER0kLGBNZxUGAQ0WEgIHAhxmSVAfCQ0NFyaCOjkaHhADDgsRA0c/ZDEiLBUZJCM2SQACAG3/7gKJAs4ADABbAAABBgcGBxU2NzY3NicmBxYXMzc2NzY3NhcWBwYHBg8BNjc2Nz4BNz4BHgEHBgcWFx4GFx4BDgEnLgIvAS4CLwEmJwYHBgcGBw4BLgE3Nj8BJicmPgEWAWMICgwPAwQiDQsLBsgoLQYJDw4SGCYlIRYSLRoeGh8eAQJIdB4FFBUIBD6eAgUPEB8YJSQxHAsNBRILGzEnEyANIBAOEgYMJSUDBBgcAxQWCgMdHB1ENwcCEhYCigQXHEIEAwMeJx8LB2EyAShIICcNFSYjPzQoFwuTFBcBATmHRQoICRQLjn8GCiUkPyIuGhcFAxIWDQIGFBYTIQ0zHB4qDB4bFQIBhFsLCgYUC12epANECRYOAgAAAAADAHn/fALdAtMADAAWAGIAAAE2Nz4BNzYnJicmBwYDJgcGBwYXFjc2EyYnLgE+ARcWFzY3NhcWFxYHDgEHBgcGDwEOAQcGBwYHFhcWFx4CNzYeAQYHDgEuAicmLwEGBw4BJy4BNz4BNzYXNj8BNj8CNgIsGBURHAUFBQQMGhsOyiw3Qw8NGyAoNqNHUQoKBxQLT0MOFC5DJw8LCAguISIoAggMBA8ICAkUFRQbOwgYKTQbCxQICQoaMigoHxAKOyIvQB1DGx4XDA5ELEk8EhAPCAgKDAkCHQIHBSIWEwwKAwY0HP4eFwgJMSkPERceAcMGHAQUFQoDHAU3JloQCSMdJCE5CgoCCyU5FUAcHBs5KxMhSAgaGgoMBAkVFAQKAwoXGhELSCZHJBAEDxA+KSowBgogJS8yGSEvOSoAAQCL/2oDaQKlAI8AABM2NzY3Njc2FxYXFhc2NzY3NhcWFxYHNjc2NzYXFhcWBwYPAQYHBhYXFjc2MhYUBw4BJy4BNzY3Njc2NzYnJicmBwYHBgcGDwEGBw4BFQ4BBwYnLgEvASY1Jjc2NzY3Njc2JyYnJgcGBw4BBxQHBgcGBw4BLgE3Njc2NzQ3Jjc0NzYnJjUHBgcGBwYHDgEuAY4EGRkdJB0YFxoMAwILCyIiLiEPBAIDKCYbGiEaIwEBDwoUGBYCARUPJTYIFhAIJU0kIyMCAhgBFhUJDgEBDwcHDBAjJyMYBAUCAQIBAwMNFQUHAQEBBAYEBwIBDgQEAgIHDg4PFRIeBgEGFyA4AxQVCgQ2HxYGAQICAQILAQEVHxsXFwQCExYMAYAUNzYvPBYSBQYfBwcPDCQEBi0WLh0oRiMYBgcWHUg0TTRLWGVCJywHEDYIEBYIJRoOD0szRmsIUk8tSC0vDQYCAw4gSEFEDh8OAxACCQkDEwoCBwMDAwMRHhIWEAdWNi4eHwkTAQIWEzUUCQtFYomdCgoHFAuZh19BAwQFBgMDOR4BAQEQMy0xMw8LDAUTAAABALP/dQL0ArAATwAAEzY3NhcWFzY3Njc2FxYPAQYHBgcGFxY3Nh4BBgcGJyY3Njc+ATc2Jy4CIwYHDgEHDgEPAQ4BLgE/AT4BNzQ3NDc2NzYnJicmBwYHDgEuAbowKjAlMAgcHDUtPxweIRIMBgYBAxgZOgsTBgwKYC4hAwEGBxoEHxkHDwkGGSYhOgoJMBU3BRUUCAQ1FS0JAQEFAQIJCg8MFR8oBxcRAgJMOhQWGB9hKh42BARRVrNWPiYkIEglJg4DDBUTAxhHM1khKSh/FaZHEhQDAigiYR5BnDSDCggJFQp9MpA7BQQDBCAfOCIjCggKDzAJAg4XAAADALb/1wLMAqoADwAaAD4AAAEGJyYnBgcGFxYXFjc2NzYnJicmBwYHFxYXFicWFxYXNzYeAQYHBgcWBwYHBicmJyY3Njc2NzY3Njc2MzYzMgJYSkpXHywYHQ8QPkpFQyQbCRJBJDIYGwIOUD5aOCdTGRsJFg0DCScMByEpTlxqWhURHx44DAwEDBYrBgYICAUBpwwaH0JLYXRVWBgcPDtyVolgJBQCBx0OPRwW1wMVLnEUBgMSFgccBmNogERSKCJ3YH93VhIPEw4aBwECAAAAAgCXAAYC6ALEAA8AMQAAARYHBgc2NzY3Njc2JyYnJgU2FxYXFgcOAQcGBwYPAQYHDgEuAT8BPgM3BgcGLgE2AZYGAxwQVzg0IyISIyAeSET+wtK+XCowMRE/GBkkQWkJBQIBERYPAQkGBw4SC05RCRYOAgJeCQt+sQ4ZFxcYID4zMhMSWKwyGEVOWR41DQ4QHQ9kQh4LDwIRC2pRTYJsNB5CBwISFgAAAwC2/6gCzAKqABkAJABTAAABBicmJwYHBhcWFxY3JyY+ARYXFhc2NzY3NicmJyYHBgcXFhcWAwYnJicmNzY3Njc2NzY3NjM2MzIXFhcWFzc2HgEGBwYHFgcGBwYHFhceAQ4BJyYCWEpKVx8sGB0PED4lJSYHAxEXBhoVCQlDJBsJEkEkMhgbAg5QPlhBRVoVER8eOAwMBAwWKwYGCAgFBTgnUxkbCRYNAwknDAchKU4HCDMzCgsGFAtFAacMGh9CS2F0VVgYDggvCRcNAwgiFwYIO3JWiWAkFAIHHQ49HBb+LhsaIndgf3dWEg8TDhoHAQIBAxUucRQGAxIWBxwGY2iARAcGLg8DFBULAxUAAAACAJ3/lgLkApkADQBHAAABFAcGBzY3Njc2JyYnJgU+ARcWFxYHBgcGBxYfAxYfARYXHgEOAScmLwEmLwQmJwcGBw4BLgE/AT4DNwYHBiImNAF3ARoPSTNYGRsZGDk4/vNIs1hPJCYoIWoyPQUQFhYXCQ4ZYXILDgIRDIZvFgsMEhYSEg8DCAYCAREWDwEIBgcNEQo7NwgWDwJNAwR1nAsXKi8zLSwQEElCRBkXP0dNPTIXDAcZIiAiDBAfbQsBERcOAQ19GQ0QGx4bHhcEaEMdCw8CEQtoTEx8ajMcMgcRFgAAAAACAIL/8QKDArUAEgBLAAABBgcOAQcGFRQXHgE2Nz4BJicmEyYnJgYHBhcWFxYXFhc2MzIWFAYjIgcXFgYHBiYnJjc0Nz4BNzY3JyYnJicmNjc2NzYXFhcWDgEmAcg+NSFLFxkgJldKHRwfBRoFfh48GEggRQoBFxIrQgovMQsQEAscHQQuHUE5okU3ASgdVSYqMDAuEiIECDQtKC4uJksnBwMRFwEmChMNKxgZFRcXHBgJERE1UzEKASAnFwkIESM2BxoUK0ILBhAWEAIGXo0nJA4yKDMqKR0yDRAKMC0VJRYxTBYVBgUOGzMJFw0DAAABAKj/5QMwAssAVwAAAQYmJyY2NzY3Njc2NzY3Nj8CNjczMhcWFxYHBgcOAhQjBgcGBwYHDgMHDgEuAicmNDYyFx4BNz4BNzY3Njc2NwYHBgcGBwYHBgcOARcWNzYeAQYBGyY3CwsOGRxBLVEFfEYcFDUiDAMCBgQECQYKCAMIBAQCAUEVCgcIBgcVJDwoHjovMSQUCBAXBzJVMTs6CwYIBg0TMSITHkloGEotMxEOBwYLIgsSAw0BlAUlIBtFGBkRCwoBDAcFBREMAwEBAQMIEBEIBwMEAQFeTCdWaSQmPz4wDgsBDh4fFQgXDwgzJhEWW0ciZlkuRk4LAwcHCgMIDAwRDCQOIQUBDRYSAAAAAAEAy//uApsCtAA5AAABBwYPAQYHBhcWFx4BDgEnJicmNwYHBgcGJyYnJhI3PgEeAQcGBwYXHgE3Njc2NzY3PgEeAQcVFA4BAn4KBwMIBQIIDAwlCAMNFwk0EQkCIyQ2OEwuIQMEPiwGFRQGBSkeHQQCLyclKycoPiMCExYMAwIOAgwyIhg4IRxiQUgcBhcRAwcoXDdJWDlWEhc/LUNnAU1TCgYLFQpLn6BhMkAMC0Y9a6WjCwwFEwsCBApCAAAAAAEAmP/7AyYCsABEAAATNjc2NzYXFhcWFxYXFhc3PgE3PgE3PgEeAQcGBwYHBg8CBgcGBwYHBicmJyYnJicmJyYnJicmJyYnJgcGBwYHDgEuAZsVJRsdLiYTEw0PERMIBA4HCwE4dFUHFhEDB1M3ODcBDBYYBgUDAgYGEA4GAwIBAQICAQIMFQ0ODg4MCAoQFSATAxQWCgGtRDwsERknFTkpRlBzNiYmFBsEi9RtCAMOFglqZWeIAyI5Ow0IBQQHBAgLBAYEBgcLECAuSoM9QCkuCwoFCiE1PgsKBhQAAAAAAQCY//MDswKhAHsAABM+ATc2NzYXFhcWFxYXFhcWFx0DNzY3Njc2NzYXFhcWFxYXFhcWFzY3Nj8BNjc2NzYyFhQHBg8BDgEHBgcGBwYHBgcGJyYnJicmJyYvAQcGDwIGBwYHBgcGBwYnJicmJyY9AyYnJicmJyYnNSYHBgcOAQcOAS4BmwQdExkbKCMIBQQDBgYJCQ8CIR0RDAgGBQ0QDAkFBAcIBhwWDQUHBQYKBANBjQgXEAeEPgcECwUKBwUFBAQJDQ4MBwYJCg0XGwYDAxEcKw4EAgECAQIHCRMNBwUFAgECDwkJBQUCAgkJDhAQFwQCExYMAdgUPhkhCxAcBg0ICxQiN1ugVQQKCQlPRCMXDQgFDAIDDAUJDRgPV0QeFCIWHzYWCv2UCA8XCIrvHxU+FTEaEQoHBQsBAQoGCQ0YIEZUEQcGIkJmIgcEAwIDAgYCAg4IDRAaEhcJCARUnlk2HhEIBAEGBAUWFDMPCwwFEwAAAQD0//MCegKcADMAAAEvAi4BLwEmJyY+ARYXHgcXNjc+AR4BBwYHHgEXHgEOAScuAScGBw4BLgE3NgF0CxUXBxkHEAkGAwsWEwMEDAgRBhYFGwFPaQcWEgIHc1EvUjoIAg8WCThTKC4nBBQVCgMvATIWLCwOOBItGhgLEwYLCxEiGScQLwk3A5uGCQIOFgmTqV9+MwcWEQIIMHlPaXoLCgcUCpUAAAAAAQDF/w8CjAJ1AFkAAAEGDwEGBwYHBhcWFxY3Njc2NzY3Njc+ATU2NzYzMh8BHQEOAgcGBw4EBwYHBgcGJy4BPgEXFjc2Nz4BPwE+Aj8CBgcGBwYnJicmNzY/Az4BHgEBWQEEDAgFGwwQDQYLChRGRyU1CR4BBAICAgQIDA8IBAEPGgQIGgEIAgkHBgYHNHxMOwoICRUKLz5dJgUJAwYDBgIDBBENDVNiLB4YCg8RDBwNCwcCEhYNAjkJEi4dF21SbjYbCgkDC4VFlht7BhsLBgIFBAkMCwQEK157Fym3AzkRMBsSERBwCwYaBRUUCAQVBQhTCxgPGAslEBYdeB0ZnRAHGhYsQXdScjMuGQsNBRIAAAAAAgBx/v8DJQJXAA8AZwAAJSYjIgYHBgcGFxY3Njc+AQE2NzYzFhcWBwYHBgc2FhceAQcUBxYXHgEOAScmJwYHBgcGBwYnJjc2Nz4BMzIXNicmBwYHBgcGIyYnJjc2NzY3Njc2PwE+Ajc2NzYnJiciBwYHDgEuAQJbICRCgCwvICUSGj4/Tjpd/pNEPTApNiMeCgcgFSo9YSAfFwcBSi4IAg8WCSU/Gjg3Q1tKXSwoQSc4MoxILikOMjNfFCYtGAQEDQgIAwEDAgYHDwQSGAorJA0XBAUQEhsaJDY+BxcQAgoDGxYYJCcaKAMDKyBWAe5LJBwBLiguIiYZIwsnKyhuOQMCEigHFhECCB8QODY0JTIDBUI9RyscGR4FZ0JEEwUSFwUBAQkLDQQEBQUHDAQPFAkiIBAbFRYVGAEVIEQIAg8XAAAAAQC9ABoCeQIGACUAAAE2NzY3NhcWFRQHBgcGBwYnJicmJyYvAiYvAS4CJyY+ARcWFwGiCgoVGiYtQSIeKRQSGRcIBwMDBAcdLQUVHwshFwcQIUknLiEBWx0ZMxooDxdZQFpNPh4SGAIBBAIDBAYeLwUWIg0pJhMpSR8MDzoAAAABAMb/3gI1AiQADQAABQInJj4BFhcWExYOASYCAJ2XBgMSFgeZnwUHFBURATrPCRYNAwnT/sIKFQoHAAACAGcAFAJoAg8AJABIAAABNjc+ARceARcWDwIOAQcOAScmJyYnJicmJyYnJicmPgIXFhcmJyYnJg4BFxYXFhcWFxYXNj8CNicmJyYHDgEHFxYGBwYmAWQYNRs7GxwiAwVHHBwKFgYEFAsCAQgFNFEMGR8LOBANFjZKKB4kDAMrIh40HAsJJwoeGw5DMwoOIBs/BAMcHR4bIwYDBgMJCRUBdVIpFQoLCzMiRIIxMRMvEgoKAwEBAgY4OQgNEQciLydMLA8WEHwGDTcSDQ82Hh0YBhAPCi4xFhk6MHQ0JgwMGBVJKAMJFgcGAgAAAAEBIwGCAf4CfgAmAAABNjc2NzY3Njc2FxYXFhcWFxYfARYXFg4BJicmLwIGBwYHDgEuAQEmCxwPCwcFBAUMEAkHBAMGBgsPFw0BBAkVFAQBDRcSCAoaCwMUFQsBpyRHKRcOCAcDDAQCCAQGCA4XJj4kAgsUCAkKAiQ+LBIaRCQKCwYUAAEBSv+LAsT/ygARAAAFNh4BFzIWFAYjLgIHIiY0NgFkMWSdFAsPEQsWmGMxDBAPNwECBgERFg8BBgIBDxcQAAABAV4B3QHAAmEAGAAAAR8CHgEfARYOASYnJi8BLgMnJj4BFgGTCgUDAwIFCwYGExUGBQYHAQYBCwQFBxQVAlAUCwcFAgkSChUMBgkJCQwBDAMUCgoVCgcAAgCp/94CcwFzAD4AXAAAATIXFhcWBxQPAQYVBgcGFRQXFhcWNzY3Njc2Nz4BHgEHBgcGBwYHBicmJyYnBgcGBwYnJjc2NzY3NhcWFxYXByYnJic2JyYHBgcGBwYWNzY3Njc2NzY3NTY3NDc0AaQBAQgBAQQFAQYCAQIICxYUERISDQ4TAgQUFQkEARIPDxYcJy8yEwMCCAkfIi8mHAMDGBonNTkgCQMCMwECAQEBERoZHBQVAgIeDRAVExAQBgEBAwMBARQBCAwJDAIKBSABERETAygYGwYFDxAnHTA8BQsJCBQKBDsyIjEYIg0ONQcJDgsqCg4tIUQ6PEEfKB8TFAkNIAcSBwICCQ8TFjMyMy8iBAUcGSMiFQQDBxoQAwIBAAAAAAIAwf/nAgwCpQAJAFAAAAE2NzY3NicmBwYTFgcGBwYnJicmJyY3Njc2Nz4BFx4BBwYHBgcGBwYHBhcWFxYzFjc2NzYnNCYnJjc2FxYXFhcWNzYzNh4BBgcGDwEGBwYnJgEPHRQzCQQNDA4sUQEBBBckOiESCwQCAgMdJ0AXNBYVEgcMRClDAwMOAgICAgcDBBUUEwMBAwICDBEUGg0QGQcGDCIBCxQGCwoFBAoGBRoVFgGaHBk9KhgJCQ0n/o0QDTQyTwUDIBQhEkpziro2FAQODjMdPEwuOwMBX0dFDxYLBwIsKioOFgEDBBoSFQkEEBgBAQUOAwsVFAMBAgQDAgsDBAAAAQC0/+gCFgFmACgAACUuAS8BJgcGBwYXFhcWNzY3PgEeAQcGBw4BJy4BJyY2NzYXFhcWDgEmAWICCAMECxgeEhIJCC8xIj4iAxMWCwMmShpHIiQ1CAstJi4rMAgBDhcR9BQaAgMDGiE1NC0qCwseN4QLCwYTC5RBFxAHCTAnO4EqMQsOVQsRAg4AAAADAKf/7AJ5AqwAEwAoAF0AACUmJyYnJjUmIyIHBgcGFxY3Njc2NxYXFBc2NzQ1NDY1NicmIyYHBgcGByY3Njc2Fx4BFxYHFAYVFAcGBxcWFxYzMjc2Nz4BHgEHBgcGIicmJwcGBwYmJyY3Njc2NzIBdgUECwEBFxUYGBsFBhUQHiAXDygFBAEcFQICBAQICwwcBAMwBQIHNSMrGCMJBwIDAy1CCA8QBAQGCToaAhMWDQIeShkwFBYRByAvGT8WIAcHISg2EIgTFjYCBAQfJyw2NhwWDA0gFYwJDAEBaZEDAgYgCBsNFAEUL3VUATk4kEErAwEgGxcmCSQIBQbnhxsqDgQHLY4LDQQTC6I5ExEUKQssEw0MHSxMQzY/AQAAAAACALD/0gINAWUACwAxAAA3Fjc2NzYnJicmBwYHFhcWNzY3PgI3PgEeAQ8BDgEHBgcGJyY3Njc+ARcWFxYHBgcG8hgZHxcWAgEXGx0hCwMMGT0yHAoQEgcEFBUJBA4KEgsnS2EtJA0LKhc8IjkDAyAhMSKdDggLIyIeGgcKJyt7HRIlDgw1Eyk2EwoJCBQLKhwwFUoRF0Q1V1E3Hh0LFD4wMTMQCwAAAAADAIv+5QIKAjUADQAfAF4AAAEGBwYHBgcGBzY3NicmAzY3Njc2JyYnBwYPAQ4BBwYXAyYnJjY3MzY3Njc2NzY3NhcWFxYXFgcGBxY3Njc2Nz4BHgEHBgcGBwYnFhcWBwYHBgcGJyYnJjc2NzY/ATY1AWYGBg0NGBkNCUUkCQEBnwsKDAYLCgUHEQEDBAMFAQIFFQYCBAkKARAQGhkPEBQYFBIPCAoBAQsoVRooKh0cFwUVFAcFGiQlNy0hBgUKDAcPGCgYEQ0GCQMBAwMCBgIB9wUKFCQ9cDgwQ54nMhb9MwEVGCxPOSATZwMOGw4mECYSAR8FBgsUBFhGb0UqFyEICAkIEhUnOC6zTgINDRsaLgoHChUKNSMjEQ4BFB1BVzQgLwUDDwwUHC8SFBUOHQ4BAAAAAAMAqP7lAlQBZAAOAE8AZQAABQcGBwYHBhcWNzY3Njc2NwYHBgcGJyY3Njc2NzYXFhcyFxYfAhUWBzY3Nj8BPgE1PgEeAQcUDgEHBgcOAQcGBwYHBgcGJyY3Njc+AT8BNicmJyYHBgcGBwYXFjc+Ajc2NzQ3JgGGEBsNFggIEgwJCAgUCQYLEBQgIysmLQ8NLC8zIhsWDgEBBAIDAQgFOBcCBQIBAgISFg0BAgMBBgQTSSgFCgwgFhodHS8QDSQRPgsEAgYKDAcKHyQlCwoXExMRJx4GBwYBAlgIDwsSIh8NCQEBBxMlGskbEyAFBSIpVEQ/RAwJEw8fAQQECAIDV5o5NAQcEAgOAQsNAxILAQ4RByQKKlghVig1HhQDAxUiQjQeDSMIAyjwGQgFAggzNjg2FRECAiY5GCA2AggDAAAAAgC4/+kChwJ+AA4AYAAAEzY3PgE3NicmJyYHBgcGAzY1Njc0NzY3PgEXFhcWBw4BBwYHBgcGBzc2NzYXFhcWBwYXFhcWNzY3Njc2Nz4BHgEHBgcGBwYHBicmJyY3NicmByYHBgcOAQcdARQGIyInJvoDBQoeCQsCAQgPDg4FBkUBAQEUCBMPMyQrBAMQDSgPEQ0GFAIBCxwdKScqCAMCAQYGDSEiDREFCQoGBBQVCQQFCQkHEhA0QzMOCAECAwQGDBQWGBUgBRALDwgHAYYDCA06HiIUDwMFIB8pKP5WJwYWC++PNyogKA4PMyIxJkwTFQgECCUpEi0XIgoKQRhNPxoZAQQ5FiwOHyARCwkIFAoPHyERLxtWBwY+IUVIFh4BAxASJiFIEwJSCxANCAAAAAIAtf/oAaQB4wAnADAAAAEGBwYHBhceARcyNzY3Njc+AR4BBwYHBgcGJyYnJicmNz4BNz4BHgE3FhQGIiY0NjIBCAEJCQQGAQIMBAMGExgXJAQUFQoDJhkeHRcXGRQTAwEGBBIBAhEXDQUIEBYQEBYBNAg2MiYyHSAOAQQOLi1oCgoHFAtsMDkVEQMCFxYyIzYibAcMDQMRnAgWEBAWEAADAB/+vgGdAecAJwA1AD4AABc+ATc+AR4BBw4BBzY3PgEeAQcOAwcGBxQOAgcOAScuATc2NzYXBgcGBwYWNz4CPwE2ExYUBiImNDYyvQQEAwERFg8BAwMCaQcBEhYOAQQfNi8jCBEHBQsIETUaHB4CAzcXQh4TKgICKREEBgMDBQpLCBAWEBAWEDbZNgsPAhELL7glaEkLDgISCyJEQzEgVkQCHhEaCRcTCAk1JS08Gg0XESUWHgoRBQwJChEhAmQIFhAQFhAAAAMAyP/pAlICkQAOABsAUwAAATY3PgE3NicmJyYHBgcGBwYVMzY3NicmJyYHBhcWNzY3Njc+AR4BBwYHBgcGJxUUBiImNTQ+ATc2Nz4BFxYXFgcOAQcGBwYPATY3PgEWFxYXFgcGAQcDBQkaCQoCAQcODQwFBQsBATIwMgQCCh4rKAs+QSQpHhQDExYLAxUhNTxZURAWEAEJCggTDzMkKwQDEA0oDxENBhQCDAwUKzUYHAQHTS0BfwQID0MiJhcRBAYlIy8u8xUYBiEiJBAIGCEgjT4PCVA9RwsLBhMLTUFnDhVLHQsQEAt1XLdJNyogKA4PMyIxJkwTFQgECB0MCRARBRMWJkQ1HgAAAAACAKj/3AHaApoAEQA8AAA3Njc2JyYnJgcGBwYHBgcGBwYXFhcWFxY3Njc2Nz4BHgEHBgcGBwYnJicmNzY3Njc2NzY3NhcWFxYHBgcG4lYkBwQBBAIEBQoMDBEQHAsCCwQOEhQcFhQRHAkBEhcOAQogFyIrNSkcKRQNIhQVEREaGyQWDwQGDDGLA+B5niAbDQUCAQENDxskNl1cDWEwGh0GCA0NITZXCw4CEgtgPy4VGw8MMUWVamY+KiMVHgUFGREeJyzQnQQAAAIAov/gAxoBYgB6AHwAAAE2NzYXFhceAQ8BBhUGFxYXFjc2Nz4BNzY3PgEeAQcGBwYHBgcGBwYnJicmNz4CJicmJyYHBgcOAwcGBwYHBicmJyYnJjU3NjU2JyYnBiMGBwYHBgcGFQ4BBw4CJy4CNSY9AjY3Njc2NzY3NDYzMhc2NzYXFgMVAZQhMyUcGQYDAQEDAgMCAggHChAWFSYHFQYCERYOAQcaCRYWGSEeLBwQBAIDAQMCAQEDBwYKLR4IDQwFAgEBBQgKCQgFAwEBBAkFAwQPBQgiGxEKBgsBAQICAgURCAYIAgEBAgcEAgMFARAMDgckLicSFAIBBj4SDBQSIwwmDSgcBysYHAoKAgQUEjIPLS8LDgMRCzc3Ex4dFh0HCSYXKhwvDDMXHgkOBQQED1QXMj8TAwMCBwMEBAMHBQUEBRxDAy0kLxEBAy4fKTtVBAIEBwMCBAgFAgkFAQIDBQQLGD8eCww5MgsPDCkEAxQX/v4BAAABAKn/4wJ3AWYAXwAAAQYHBgcGBwYHBgcGBxQHFAcGBwYnJicmPQI2NzY3Njc+AR4BBhU2NzYXFhcWFxQGFQYXHgE3Njc2NzY/ATU3PgE1PwE+AR4BDwEVBgcGBwYHBgcGJyYnJjc+ATUmJyYBXwQHExcTERAEAgIHCAECAgMOEQsDAQEEBgUNBgERFg8CGRYrIxIHBQEDAQoEDQ0UCgcQFhQGAQEBBBQFFBUIBAwCExYYFA4XJiAXFAoNAQECAQMCASACBg8mICIjDQUKKigEAgQEAwMOCAUMAgMFBQkUIhdYWwsPAhEWCigTJRoNHBMdElIIPRoMCQECCAcZIjIRAggBAwEHMAoICRQLGwIHMTcnHwwTBAMQDhwjSAlOExcMCAAAAwCi/9MCYAFoAAsAGgBIAAAlJy4BNwYHBhcWFxY3Njc2JyYnJgciBwYHBhY3FxYXFgcGBxYXFjc+BTc+AR4BBw4FBwYnJicGJyYnJjc2NzY3NgFOBCAnARAJEQoKIyM/FgIDFwgKCAwBAQMEFhsiChsSHwQDIQ8PJBwHCwYIBAgCAhMWDAMBCQMJCA0HLUYgIDBBRBMOFRQpLjQPHQQlZTEeHzgnIwgHNyc7RScQAwQHAgYJLHTqBAogNlRONQgBAjIMGBAdDCUHCwwFEwsGJg4gFBwNTwMCFCUODUQ2R0IzOQkCAAAAAAIAtP67Al8BZAASAEkAADcyFxY3PgEnLgEnJgcGBwYHBgcXBicGFAcUBiImNTYSNz4BNzQ2MhYVNjc2Fx4BFxYGBzY3PgU3PgEeAQ8DDgIHDgHvBARmKhIKCQgfEBEVIB4EBgMBezZJAQIRFg8BAgQBCwERFg8NDSgrJzMKCgoVIBMFCwgLBg8DBBQVCgMKDAoGCg4IGlE9AiQ4GEskJSsCAxUdRAcFHhV4EBgrzjgLDxELMgEhThlyHgsPEAoRDCYGBkcvJ14jCBYHEg8gEC4LCgoHFAsfIBwRFBkJHxoAAwCj/qoCPgFaAA4AUQBrAAAFBgcGFxYfATY3Njc2JyYnBgcGJicmNzY3Njc2FxYXFhcWFxQXFAcGBwYHBg8BFzIWMxY3Njc2Nz4BHgEHBgcGBwYHFhcWBwYHBgcGJyYnJjc2EyYnJgcGBwYHBhceATc+BDc2Nz4BNyYBiwkFCgQFDwgCAgoDBAgERAclIkMPFRgVLDAvIBgOCgwHBQIBAgMEBgMHBA8FAQMBDwghFA4JAhEXDQEKEBs1CAkQBAgEBRANFBYZLAcGCwY1BwoGCRojJRIRDQcgDwUQBwgFAhkPAg0EAhktJk0uLAYCAQMQKDFOKTMDCQkjIjJIPzI4BwQTCxMBCAUHBAQHDhEcIgwYE0MFAwIEEDooRAsNAxEMSS1PGQQCIipTNzUaFQcHCxNMNFMrATkWBwUBBCgrNDUeERADAgMCAgMCGUoHShIDAAAAAAEAxv/jAigBZQBJAAABFhczNjM2FxYVFAcGDwEGBwYHBhceATc2NzY3PgEeAQcGBwYHBi4BNzY3Nj8CJicHBgcGDwEGBw4BLgE3PgM/ATQ3NDc+AQEJKikBAgcYDAYBAQQKBwMMBAYGBBILJCAZDwETFA0DEBstRB8uEQcEDQQGCQIhHwQDAgECBwUGBBMUCQQFCQQCAggBAQISAWIKAwEDEQgMBQgJEiUaDTEgJxENEAECRTVGCw0FEwpNO2IEAik3MyM0DRokCAIGFg0GBAUUDQ4LCQgUCg8ZCQgLJAICBQQLDAAAAAACAIL/0QJtAWoADABUAAAlJyYnJicmBwYXFhcWJzY/ATY3PgE3Njc2FxYXFhcWFxYHBgcXFjc2Nz4BHgEHBgcGLwIGBwYnJicmNjc2FxYXFhceARc2NzYnJicmJwcGBw4BLgEBIRIUDxMNCQUHBg0gHT8BFQ4DAgICAQMFFhgMDRQUFAkMCgQEEjcsGiQDFBUKBCUeQ10RFxEVLzUwFgwEFhsjFxwQFxQFAwYEAwgIEhIRCBYCBRUUBxwQFAoPAwMEBgsXDg3VAjIgCAQCBAEFAw4SCRMfNTItNhgKCQUSQiZlCgoHFAtrLWMeBQgNBg0YFSYSMxEVCgYUDRUTBAIJCwkmKC8wGRI0AwoHChUAAAEAef/aAc4CYQAzAAATJicuAT4BFxYXNjc+AR4BBwYHNjc2HgEGBwYHBhceARcWNzY3PgEeAQcGBw4BJyYnJicm1iElCwwFEwslIBMbAxQVCwMZESAlCxMFDAsxLCILBBcNHiEkFQMSFg0CGCkaQyMfFBMFDAFpAwkCExYMAwgDUlwKCwYUC1JMAggDDBYTAgsCpVshJwULNzxvCw0FEgt5RCslDQwhISxjAAABAMT/3QJ1AVgAQwAAAQYHFBcWNzY3Njc0NzY3NDc2NzYzFh8BHQIGBwYHBhcWFxY3Njc+ATc+AR4BBw4BBwYHBicmJwYHBicmNTY3PgEeAQEQFQEMCRMiHBMPCwMCAQIECA0PCAMBBwkDBQMCCBMRFBYTHQQCEhYNAQUgFh4jMi4RByQyOxoRARcDExYLATRSVjcaFAMFPitFAzwTBgQCBQQJAQ0LAgIGCi4xHzAcHggSCQomIVcaCw0DEgsfYCY0EhkrEB04CQo6JkNcWQsLBhMAAAIAxv/UAnoBcwALADsAAAEGBwYXFhc2NzYnJicGBwYXFhcWNzY/ASYnJjc2NzYXFgcGBzI3Nh4BBgcGJwcGBwYnJicmNzY3PgEeAQGTAgIJEAUHBQEBEQN+FQICCQkQHCIlHAUeERgPCBYaIDIDAQkqOAoXDgIJU0UFIS4/PScQCgIDFgIUFg0BNgMGHyYMCRgULAkBAVlFMSAeCA0cHz8LFSU4MRwNDg8XTyAlLAcCEhYHQQoLSigzHRM1JzpKXgsMBRMAAAAAAgDH/9kDDAFuAAwAdQAAAQYHBgcGFxYXNTYnJiUPAQYPAQ4CFBcWFxY3Nj8BNj8BPgE3Njc2Nz4BHgEHBgcGBxQHFQYXFjc2NzY3JicmNzY3NhcyFxYXFgcGBzMyNzYeAQYHBiMiJwYHBgcGJicmJwYHBicuAScmND4CPwM+AR4BAl0LCBACCygICgsIBv7NCgsEBQoDBwICBhcXHAYGCQQFCAIPAQIJCAEBERYPAQELBgIBAxQMDiwhDgkXEBkGAxEVIx0NBgMEBQIBAiE1CxQJCAo/LQgHCxAsRxwqDAkGDA0zORojBQIDBwgGCgoKBBQVCgE2AQQJFC4hCAUDIjIZGh8fDBMgDSMcHg4oBwgeBggMBgoPAxwDERodDwsPAhELFCMWDAQEAjMjFAIJQBsgDhspNSASGgEiEhwtIAkJFwQIFRQEGwEkHlcNBhwVDxISDjcSCTAhESQiJx0VISAbCwoHEwAAAQDJ/9kCZAFoADsAABM2NzYWFxYXNjc+AR4BBwYHFhceATc2Nz4BHgEHBgcGJyYnJicGBw4BLgE3NjcnJicGJy4BPwE+Ajc06QQPCxQDGg0eIgUUFQkELyscGQ0XDy45BBUVCQQ9OyAjHhwYFiAgBhcTBAcrJwIKDAkTDA0DBQMDAQIBRxAFAwsKWSY9TgoICRQLa1BDGw4CDCeRCgkIFAueLxsEAxwZLzYuCQQNFgo9RgQcJREEAhMKHA0LBiQFAAAAAAIAtf7qAkkBRwALAGAAAAUHBgcGFhcWPgE3NgMOARcWFxY3Njc2NzY3Njc2NzY3Njc2MzYXHgEXHQEGBwYVBhYHPgE3PgEeAQcOAQcGBwYHDgEnLgE3Njc2PwE0NzY1BwYHBgcGJyYnJjc2Nz4BHgEBfBw2BQILBwQMFQkQZxkICgQFBAkMDw8QEhkGCwUBAgECBQgJDgkCAwEBAQMBAQEjJRECExYMAxMyNQoMCBsTOB8dIQQISBApCgEBDRMUGx4fFxQKDgQEGwITFgxSFCosDRACAQMUFCMBsnN0GwoDAwIDExQkJk4TKxIGBQMGBQcBCwMHAgITCRIoBhh2JSRXRQsMBRMLUmwuCQllOSglBwY0H0M4DBsHCgsmPB8pGSMGBw4NHCVFP3cLDAUTAAACAJz/AgI8AV8ADgBgAAAFBgciBwYHBgcGFxY3PgEDNjc2FxYHBgcWFxYXPgM3NjIWFAcOBA8BFQ4BBwYnJjc2Nz4BNzY3LgEnJiMHBgcGJyYnJjc2NzY/ATY3NicmBwYHBgcGBw4BLgE+AQGhBQcDHB0PUQ8OEBEnKUjDID8qGT4+BQUFBVcOBwwIEgcIFhEHBhUJEhUOAglkPkEmLBwZbg88Ag8KAiMgCwsHCQcLCwwGBQYBAwIDDhcNJR4IESESCAoMBQUVFAgJGDsBAQQEAg0gHgwMBwg2AX4+BQMZPVwGBwECImkECggVBwkPFggGGAkQDAcBA05mDg4gJ0lCFwMJAQIDJzoNBAcIAgUEBQwMDAMDAgQPGBM2HgcBAyMOHCMMCggJFRRCAAABAJv/SQFZAlYATwAAASIHBhcUHgUXFgcGBxYXFgcGDwEGFxYXHgEOAScmJyY3Njc2NzYnJicmJy4BJyY2NzY3Nj8BNjc2NzYnJi8BLgMnJjc2MzIWFAYBPiwfHgkCBQMIAwsCJAUFJyYICAsDBggmBgdGCgkIFAtjCwkuAwYFAQMCAhkBFAYGAggDCwQGAgQHBAMVAQMYAQcIAwsGBgINLC5JCxAQAiAtLTEEBwgGCwUOAzMnIRobGRoZBgsNUSgtHAQUFQkEJ0w5YAYLCAMGBwgRAQ0EBQIKGQkDAwEDBAICDgkRIQIJDAMRDRAIR0BEEBYQAAAAAAEBWP/CAZACQQARAAABBhQWFRQGIiY1NCY0NzQ2MhYBkAICEBYQAgIQFw8CJVbD7kELEBALQe/DVwsPEAAAAAABAOD/TAG1AlkARwAAFxY3NicmJyY3NjcmJyY3Njc2NzYnJicuAT4BFxYXFgcGBwYHBhcWHwIWFxYHBgcGDwEGBwYXHgEfAR4CFxYHDgEnLgE+Af8rISMGAR0gCQcpJQUGDgMHBgEtAwNECgcKFQpgBQMzAwcGAgQBAhgUCQMCBwMCDAQHFRYCBBYBCwMGBQUFAQgwF0ElCw4CEnoEKisxDy42JyAWHhoZGgYKCQNPJy4hBRUUBwUuTThcBgoIBAgFCBMPBwMDCwwMCAIECgwIESQCEQQOCA0RCEc9HSEEARIWDgABAGQBQAHsAhMAKAAAEzY3NhcWHwEWFx4CNzY3PgEeAQcGBwYnLgEnJi8BJicmBwYHDgEuAWcPIDI2GRAKCAEJFi4SDQ8EFBUKAxISJDcoLA4BCAgHCBMXGAsEFBUKAYwvIjYYDB0XEgMUFQQaFC4LCgcUCjYbNAUEKR8DExINAwkZGiMLCgcUAAAAAAIBr/+jAfQB6AARABoAAAEGBwYHDgEuATU2NzY3PgEeAScWFAYiJjQ2MgHyBwIDAQEQFg8BAwIHAREXDgcIEBYQEBYBYlCBuhoLDwEQCx21glMMDgIRcwgWEBAWEAAAAAIAwP/9AeIB8wAIADUAACU2JyIHBgcGFhMWFx4BDgEnJicWBzY3Nh4BBgcGBxUUBiImPQEuAjY3Njc2NyYnJj4BFhcWATIFAgEBIxIRHV8nJwgCEBYIFRMBBCAuCRYNAwk+MhAWECc1FAEKGj0ICQIDAQ4WEgEDgK42AQw0MWABBQwjCBYQAggTCTSxAiIGAxIWBywCKQsQEAswCjZFRyBNFQMCHRwLEgIOCyEAAAAAAQDf/+IChgJZAFsAAAEmJyYHBgcGBzI3Nh4BBgcGIxUGBwYHNhcWFxYXFjc2Nz4BHgEHBgcGJyYnJicmBgcOAQcGBwYnIicmPwE+AjU2NzY3NS4BIyImNDYyFhc2NzY3NhcWFxYOASYB3REKCA0uDAIBHRkLEAIPDBogAQMEByYbGSYlCxMLEhIGFRQGBRwkIScPKR4RCSILAgMBBgcJCgwJFRAEAQIBCwUDAQgrDAsPEBgrCAECDUElJxcZBwMRFgH+FQUDCyd6FhQBAQ8XEAEBCkYaJyALCAcYGQUIBQYjCgYLFQo0DgwRBxoUBQMGBgIHAQoFBwEIFB4HAwICASg1GEMJAQEQFw8BARkWkDYfDwogCRYOAwAAAAACASoAGALKAdkAOQBLAAABLwEmNDYyHwE2PwE2NzYXFhc3NjIWFA8BFxYGBxYXFg4BJicmJzQnBw4BJyYnBw4BLgE/ASYnJjc2Nw4BFxYXFjc+AScmJyYHBiMGAWICLggPFwgrDAwEBAZOQyMZJggXDwgvARYLIxQXCAIRFgcVFAECH1IkGxYmBhYSBQcoEgkUGQhiJCYPDz8+Ky0YFhUnLTgBAQQBaQIsCBcQBysLBwIFAykcDx4lCBAXBy4BL3kuExoJFg8CCBgSAQECFgwKBgw3CQUNFgk7FRo9TBsmFXgtMA8PHyBuLTAREh0BBAABAQL/9wJfAiYASwAAARYfAjc2PwE2Nz4BHgEHBg8BBg8BNjMyFhQGIyIHFTYzMhYUBiMiBxUUBiImPQEGBwYuATY3Njc1BgcGLgE2NzY3JyYnJicmPgEWATgWNy0BAQwUIBAGBBUVCAQFECAUDQIuMgsQEAtAODUoCxAQCykzEBYQSx4LEQIPCx5OPDkLEQIPCzI1ARAfPBIECBUVAgg0cVoBAiA+ZzYOCwgIFQoMNGg/IgUBEBYQAjQEEBYQBD4LEBALOQcCAQ8WEQECBzcCBQEPFhEBBAMBHUB8LAoVCAgAAAACAX7/9wHMAeIAEQAfAAABBgcGBw4BLgE3Njc2Nz4BHgEDFAcOAS4BNzY1NDYyFgHLAgMCBAIRFg4BAwMDAgERFg8SBQERFg8BBRAWEAHEFj83IQsOAxELGjpBFgsPAhH+3VFKCw8CEQtITwsQEAAAAgD8/9gCFQIWABYAWwAAASYGBwYXFhcyFxYfAh4COwEyNicmNyYnJgcOARcWFzIfAhYfAR4CFxYGBxYXFgcGBwYmJy4BPgEXHgE3Njc2JyYvASYnJicmNzY3JicmNjc2FxYXFg4BJgGeGDAICgYFEAYGAwkKCQYHCwULEhIJCw4OEg4PEQ8HCisBCQoKBwMKBggJAxozLxQJGw8OLyFUHwkGCxYKF0AWEgQGEAgbGhQJIwsRGxInDAcPHSAkJSkYBQcUFQEhBwQLEA8NEAICAwUDAwEDHg8UsBoGBAoKKBIZHwYIBgYDCQUJDAYsUgEVEjglJAoHEhIFFhMGBg0OBQQJDyIPGRYRCSAcKicbCA8RJ0sUFgoMMAoVCgcAAAAAAgFqAZUCJgHOAAgAEQAAARYUBiImNDYyFxYUBiImNDYyAZgIEBYQEBaOCBAWEBAWAcYIFhAQFhALCBYQEBYQAAMA2v+1At4CWAAPACUASwAAAQYHBgcGFxY3PgInLgInNhYXFg4CBwYnJjc2NzY3Mjc2NzYXJicmBw4BBwYXHgE3PgEeAQcOAScuAScmNjc+ATc2FxYXFg4BJgGXLSQtBAUsL2FGay4MCVJ0JmiyEQkaQGxCg0M2BQUyLT0BAQ4OBjsGBwECBxQIIhAJLhsGFhIFBxQ2HR4nCAgLEwwkFh4XFAoDCxYTAgwXSVpucz5DEQxxmEg8XiUqEYhqPYZ2VgwWX06EeGZbHgEGAwLnFQYCAQIWEUtSLwgmCQUNFgkeIAQFMyctZioZKAYIFBElCxMGCwACASwA4gKpAhIAJgA7AAABBgcGBwYnJjc2NzY3NhcWBzYXFhcWFRQHBhcWFxY3Nh4BBgcGJyYnJgcGBwYHBhcWNzY3Nj8BPgI3BgH8AgIeKjwoIA8LIyYqOSALDw0JBwIBAQIEBQ4ULwoUBgsLRCghIg0RGRobCQgNEBkbFgYSDAMEAwISATYDAicQFy0jPDErLwoONxIPAgoHDAUHBBQjEhcHDA0DCxUUAxMWE7QVBAYhISUhDhEKChwIKBwHBgQCAgAAAgFjAAQCtgFKAB8APgAAAQYHBgcWFxYXFhceAQ4BJyYnJicuAT8BNjc2Nz4BHgEXBg8BBg8BFh8BFg4BJi8BJicmNzY/ATY3Njc+AR4BAhlEKgQLAwQLFA01CQIOFgk2DhgNFAIUCQMCKEIHFxEChR4kCgcCAgQIVAgCEBcHVA8GCQQDDAoHAyAcBRYTBgEdUSoECAUGDRMMKgcWEgIHKw4VERoqEAYCAihPCQIOFww1KAsHAwEFCVoIFw8CCFoQCxERDQ0KBwUjLwoGCxYAAAEBKgCUArkBVgAnAAABMj8BNjc7BDIXFhcWBwYVFAYiJjU0NzYnJicjBg8BBiMiJjQ2AUUPl2YWCwoDAQECBAUnBAICARAWEAECAQIIBAsWZpgQCxAQAUkHBAEBAxNEExofAQsQEAsDHxgPHgoBAQQHEBYQAAAAAAQA2v+1At4CWAAPACUAMwBnAAABBgcGBwYXFjc+AicuAic2FhcWDgIHBicmNzY3NjcyNzY3NhcUBzc2NzYnJgcOAQcGBzU0Nj0ENjU2NzY3Nhc2NzYXFhcWBwYPARUWFxYXFg4BJi8BJi8BBgcOAS4BNzY3JgGXLSQtBAUsL2FGay4MCVJ0JmiyEQkaQGxCg0M2BQUyLT0BAQ4OBggCDxcSMQwGHREfBgE4AQEBAgUJBwcdJh8cHAsWSRQbAQoXPQUHAxIWBj0ZDAcDBQERFw4BCwEBAgwXSVpucz5DEQxxmEg8XiUqEYhqPYZ2VgwWX06EeGZbHgEGAwLMPjILEREzJRIGAxIJAgIGAwkDCAEBAwICAgMIAwMBGAcGCwoiREoUFAEBCxc7BwkWDQMJOxgOCUA5Cw4CEQx1oQQAAAAAAQFGAggCswJBAA8AAAEyNhcyFhQGIyYGIyImNDYBYSDcPAsPEAw72yALEBACPgMBEBcPAQMQFhAAAAAAAgGGAQECTgINABEAIAAAATQ2MzYXFhcWBwYHBicmJyY2Fw4BFxYXFjc2NzYnJicGAawPCzcgIQgIDxEoMiMcCAcQRQ8PBQUODRYNCAkFCSsBAfALEAIiIi8tJi0LDiAaLyNKBQo3Hh0NDAYEFBgeNwsBAAACAOAAVQJRAbMAIwA1AAABNjM2Nz4BHgEHBgcWMzIWFAYjIicGBw4BLgE3NjciBwYuATYHNhcWNzIWFAYjBicmBwYuATYBUR4mAQIBERYPAQIBMhULEBALFTMCAgERFw4BAgIkHQsQAg9MPmJ9HwsRDwshfWI4DBECDgFaAiUYCw8CEQsYIgEQFhABJhsMDgIRCxsjAgEPFxDNBgEBAQ8WEQEBAQYBDhcRAAAAAQFRAK8CSAIOADIAAAE+ARcWFxYHBgcGBzY3Nh4BBgcGByMiDgEHBicmNzY3Nj8BPgE3Njc2JyYnJgYHDgEuAQFxGEUgKBAPDgs4DSIPZwsQAg8MeB8CAQEGBBwPDAgDCAEHAwk2DjAHCQcEChAsEAcWEgIB0B4gBAUjITMoPRAiAgUBDxcQAQYGAQIBCRMQEgcHAQYCCjgQNBsgDwgCAhUUCQIOFgAAAQFYAKwCSwIQAEAAAAE2NzYXFgcGDwEWFxYHBgcGBwYuATY3Njc2NzYnJgciBwYPASMHKwMuATc2NzY/AjY3Njc2JyYHBgcOAS4BAV0TKDgnGwsGFQEzExoRDSY0RQsSAg4LOioXBQYLBiIOEAQFAwEBAQEDBQoOAgECAQIFChILDgQCAgwVGgsFFhQGAbojFh0kGSYXHAECIConHRYeCAEOFhIBBxgNDQ0SCgIDAQEBAQISDAQEAgMFDBIOFA0HAgsMDhUKBgoWAAAAAQGuAWsCLwIKAA0AAAEGBw4BLgE3Njc+AR4BAioWNQcWEgIHMhMFFhQGAeAoQgkCDhYJPiQKBgoWAAAAAQEb/2UC4wGHAEMAAAEWBxYXFhcWNzY3PgI3PgEeAQcGBw4BBwYHFhcWFx4BDgEnJicmJwYHBiYnJicGBw4BLgE3NjcmJyYnJj4BFhcUFxYBmQQEAQILLA0ZSBoHCAUBAREXDgEBAgMJBwECCAsNIAsLBhQKNRkCASdGFS8QGhASHwQTFgoDOwoBAQMDAQ0XEQIBBgFWOj8UFG0pDgQJeSFNVxALDgIRDA4qLFMjBQUsExgJAxQVCwMPKwMDRQoDDA8aJVhkCwoHEwu9lxIjPBkLEQMNDAMFBwAAAAMBBv/QAsECLQAHADEAPgAAJRY3NicmJwYHJicmJyY3Njc+ARYXFhcWFxYGBwYHFgIVFAYiJjU0NwYnBhUUBiImNTQTJgcGBwYXFhcyFzY3AjUbIAIDFBkJOwkIYT9HHxlTJ1ZbIxMEDgoGBQoGBgIFEBYQAiAbBBAWEBI0MT8REi41UQMEAwnrAQKLXg8HrIUCAhdBSU1AJBEMERkCEw4RChUGAwFU/soxCxAQCziTAgFrXAsQEAteAagBFhwrLS82FAFVqgAAAQGYAMMBzgD5AAgAACUWFAYiJjQ2MgHGCBAWEBAW8QgWEBAWEAAAAAIBZv9GAgAAHAADADUAAAUUNyY3BgcGBxYXFhcWBwYHBgciJy4BPgEXMhYzNjc2NyYjLgEnJicmJyY3Njc2NzY3PgEeAQHEAgELFAsDAw8GGQ4ZCQgiExkBIAsPAhELBREFEAsEAgMEBhQECgcOBwkCAQQFDQsWBxYSAn0DAgFsGQ8GBAEBAwsTIR4NBwECAREWDwECAQQBAgEBAQEBAgQJDA8JCg0SERsJAg4WAAAAAQGjANkB8QIIAA0AAAEUBw4BLgE3NjU0NjIWAfEWAxIWDQIWEBYQAe2FdwsNBRILcoALEBAAAAACAVsA4AJTAiIADwAdAAABNhceAQcGBwYnLgE3PgE3Fw4CFhcWNzY3NiYnBgHRDRI5Kg0OKjE+KhoJCTcqCBMjDhATIhkYCQkYHgYCEw8IGXE4OxwhGhJZLy5LBjYCLkYzCA8RECclSBEFAAACAXUABQK5AVcAKwBPAAABFh8CFhcWFxYHFAYPAQYHBg8DBgcGIiY0NzY/BCcmLwImPgEWHwEWFxYXFhcWBwYHBgcGBwYHBiImNDc2NzY/ASYvAiY0NjIBpgMYLy0KBQQCBAIEAQICAwUKKhwbCgMIFw8IAwsbHSkFBg4cLx4HAhEWg08gDgoGBAIFAQEIBAgNFigWCBYPCRMnFQwFBAQsTwgQFgFNBBgxMQ0IBgQLCQQHAgEDAwYJJxoYCQIIEBcHAwoYGiYFBxEeMB4JFg8CEU0fEAwIBQUJCQoMBgoQFysUBxEWCBIqFg4GBAYtTQgWEAAABAFt/+MDPgI0AAgAGAAmAFQAACUnJicPARYXMgEOARUUBiImNTQ2NzQ2MhY3AgcOAS4BNzYTPgEeARcWFxQXMzIWFAYrARYXFg4BJicmJyYjJicmIyYnIicmJyY3NDc2PwM2FzYWAt4BAwMgIxIaDv7eAQgQFhAIARAXD+qSQwQUFQoDRZIFFRQIagoFAQ8LEBALDQIDAQ4XEQEDAhIQJRYNBwUDAwMIBQYBAgEDDSlDCRAKEZ8SMCIsNAIBAUchmCkLEBALKZohCw8QGf66zgsKBxQK0gFICggJFc07WgoNEBYQJx0LEQIODB4sAQICAQEBAQMICAsEBAQGFzxfDAEBDQADAW3/4wMpAjQADwAdAFAAAAEOARUUBiImNTQ2NzQ2MhY3AgcOAS4BNzYTPgEeAQM+ATMyFxYHBg8BBgcGBzsBFjc2HgEGBwYnIwYjIicmNzY3Nj8BNjc2JyYjIgYHDgEuAQGsAQgQFhAIARAXD+qSQwQUFQoDRZIFFRQIMhNBHygTExAHJEAmDQICBAQ3RAsSAg4LSTwFCQMYDA4GBA0RKT8cAwYEAwsRKAwGFRMGAechmCkLEBALKZohCw8QGf66zgsKBxQK0gFICggJFf7eHyUbHS0UJD0kEwQDBAcBDhYSAQgFARASGQ8TGCc8HAgTBgQXEwkGDBUAAAAEARH/4wM/AjQACAAWAEQAigAAJScmJw8BFhcyAwIHDgEuATc2Ez4BHgEXFhcUFzMyFhQGKwEWFxYOASYnJicmIyYnJiMmJyInJicmNzQ3Nj8DNhc2FiU2FxYXFgcGDwEWFxYHBgcGJy4BPgEXFjc2NzYnJgciByIGIgcGJyYnJjUmNzI3OwE1Mz8BNjc2Nz4BPwE1JicmBwYuATYC3wEDAyAjEhoOOJJDBBQVCgNFkgUVFAhqCgUBDwsQEAsNAgMBDhcRAQMCEhAlFg0HBQMDAwgFBgECAQMNKUMJEAoR/k0vJiESGgsFFggPChsWECo3RQwPAhALOy0YBgUKCxIEBgEFAwIKCAsHBgENAQEBAQECChAOEgsDBAEBBQ4dJgsTBgyfEjAiLDQCAQFs/rrOCwoHFArSAUgKCAkVzTtaCg0QFhAnHQsRAg4MHiwBAgIBAQEBAwgICwQEBAYXPF8MAQENuwwDAg8XKBARBgoSLSQbDhQEARAXDwEDEAgKCBESAwICAQIBAwgICw0KAQEBBQgICggDAwEBBQMBAgkDDBUTAAACAXD/QwKuAdoAJgAvAAAFDgEHBicmJyY3Njc+ASc0NjIWFRYOAQcGBwYXFhcWNz4BNz4BHgEDFhQGIiY0NjICrQlUNTgsMwwIIgw3LjACDxYRASInHzYKFwUGGxolJzwGAhIWDUQIEBYQEBYUO1MNDhYZPSo2FEY5XzMLEQ8LLl47KEQRIxYjDQ0JCjwpCw0DEgHbCBYQEBYQAAADAar/4wOxAx0ACQBJAFUAACU2Ny4CNj0BBwMHDgEuAT8BBiMiJjQ2MzI/AT4BPwE2NzY3NhcWFxYXFhcVFAYVFAYeARc3Nh4BBg8BFhcWNzYeAQYHBicmJwYTFx4BDgEvAS4BPgECVUVHBQYBASVyQwQVFAkEOR8fCxAQCyksZQwnBRUDAgYLDwsIBAIBAQEBAQEFBikLEwQNCykNFR4xCxICDgtRMBwPWUNHCQMNFwhJCQIOF9IFCyZhOGECD2D+56QKCQgVCo0BEBYQAvsbaAw3CQMLAgQKBw8ICxIcHhAXAgRfNlwlCAINFhMCBzUeLQYBDhYSAQlHKEINAnY6BhcRAwc6BxcRAgAAAwGq/+MDsQMWAAkASQBXAAAlNjcuAjY9AQcDBw4BLgE/AQYjIiY0NjMyPwE+AT8BNjc2NzYXFhcWFxYXFRQGFRQGHgEXNzYeAQYPARYXFjc2HgEGBwYnJicGEzY3Nh4BBgcGBwYuATYCVUVHBQYBASVyQwQVFAkEOR8fCxAQCyksZQwnBRUDAgYLDwsIBAIBAQEBAQEFBikLEwQNCykNFR4xCxICDgtRMBwPWQlJFAoWDAUJFksJFgsG0gULJmE4YQIPYP7npAoJCBUKjQEQFhAC+xtoDDcJAwsCBAoHDwgLEhweEBcCBF82XCUIAg0WEwIHNR4tBgEOFhIBCUcoQg0COCoOBgUTFgYOKgYGExYAAAAAAwGq/+MDsQMbAAkASQBqAAAlNjcuAjY9AQcDBw4BLgE/AQYjIiY0NjMyPwE+AT8BNjc2NzYXFhcWFxYXFRQGFRQGHgEXNzYeAQYPARYXFjc2HgEGBwYnJicGEzY/AjY3NhYXFhcWHwEWDgEmLwEmLwEHBg8CBi4BNgJVRUcFBgEBJXJDBBUUCQQ5Hx8LEBALKSxlDCcFFQMCBgsPCwgEAgEBAQEBAQUGKQsTBA0LKQ0VHjELEgIOC1EwHA9ZCAoJEgsLCA4dDAYIBAsVBQYUFQYTDAQCAQQJEhMIFw8C0gULJmE4YQIPYP7npAoJCBUKjQEQFhAC+xtoDDcJAwsCBAoHDwgLEhweEBcCBF82XCUIAg0WEwIHNR4tBgEOFhIBCUcoQg0CNQkJEQsKBQkEDQcOBxYmChULBgomFgcCAQMJERIIAhAXAAMBqv/jA7EDLQAJAEkAaQAAJTY3LgI2PQEHAwcOAS4BPwEGIyImNDYzMj8BPgE/ATY3Njc2FxYXFhcWFxUUBhUUBh4BFzc2HgEGDwEWFxY3Nh4BBgcGJyYnBhM2NzY3NhcWHwEWFzY3PgEeAQcGBwYnJicHBgcOAS4BAlVFRwUGAQElckMEFRQJBDkfHwsQEAspLGUMJwUVAwIGCw8LCAQCAQEBAQEBBQYpCxMEDQspDRUeMQsSAg4LUTAcD1kDFQoPEBoWDgUCBAMGBgUVFAgEEhkoIAUDBgcSBxUTBdIFCyZhOGECD2D+56QKCQgVCo0BEBYQAvsbaAw3CQMLAgQKBw8ICxIcHhAXAgRfNlwlCAINFhMCBzUeLQYBDhYSAQlHKEINAkEgChEGCxEKFgoGBAcOCggJFQooCxEzCA8GBx0JBQ0VAAAEAar/4wOxAwUACQBJAFIAWwAAJTY3LgI2PQEHAwcOAS4BPwEGIyImNDYzMj8BPgE/ATY3Njc2FxYXFhcWFxUUBhUUBh4BFzc2HgEGDwEWFxY3Nh4BBgcGJyYnBhMWFAYiJjQ2MhcWFAYiJjQ2MgJVRUcFBgEBJXJDBBUUCQQ5Hx8LEBALKSxlDCcFFQMCBgsPCwgEAgEBAQEBAQUGKQsTBA0LKQ0VHjELEgIOC1EwHA9ZQggQFhAQFl8IEBYQEBbSBQsmYThhAg9g/uekCgkIFQqNARAWEAL7G2gMNwkDCwIECgcPCAsSHB4QFwIEXzZcJQgCDRYTAgc1Hi0GAQ4WEgEJRyhCDQJdCBYQEBYQCwgWEBAWEAAAAwGq/+MDsQMyAAwAFgBZAAABPgEnJgcOAQcGFz4BAzY3LgI2PQEHAwcOAS4BPwEGIyImNDYzMj8BPgE/AS4BNz4BNzYWFxYGBxUWFxUUBhUUBh4BFzc2HgEGDwEWFxY3Nh4BBgcGJyYnBgLuFRUBAjAVFgECIQULk0VHBQYBASVyQwQVFAkEOR8fCxAQCyksZQwnBQofIQICNCotOgMCJCABAQEBAQUGKQsTBA0LKQ0VHjELEgIOC1EwHA9ZAqkLIA0bAgEWDyEQBAP+KAULJmE4YQIPYP7npAoJCBUKjQEQFhAC+xtoDBoPOB4kMwICKSQeOhICEhweEBcCBF82XCUIAg0WEwIHNR4tBgEOFhIBCUcoQg0AAAIA2v/RA2kCpQALAFkAAAE2Ny4BNj0BNDY1DwIOAS4BPwEjIiY0NjMyPwE+AT8BNjc2NzYXNjc2HgEGBwYHFhUWBhUUFzY3Nh4BBgcGBxYXFhceAT4CNzYeAQYHDgMmJyYnJicGAYsvMgIBAQEmUWQEFRQJBFsgCxAQCxsbRAwnBRUDAgYLCAh3TAsSAw0LSWgBAQIBXmkLEwUMC21hAwMbYhIUKhgqCwoUBQwLBisbMxwYhiMDAkEBEgMGHz9QCAsHFwlixvcKCQgVCuAQFhABqBtoDDcJAwsCAgIDCwENFhICCgMVIRdBApcYDRYDDBYTAhcODxOVEAEBCAYMAgMMFRQCAgwGCgEBGLkSEwcAAQGB/2MDYgKiAD0AAAE2JyYnJgcGBwYHBhcWFxY3Nhc+ATc+AR4BBwYHBgcWBwYHBi4BNjc2NzYnJicuATc+ATc2FxYXFgcOAS4BArsaHQkODBMzNjQVFx0dOBYYBgUzai0GFRMGBiw3NzoNCw4+CRYKBwopCAYMHBpRSRkXe0MmISISIhsCEhYNAW2cQBUFBQcTUVBqdUZHEgYBAgEGUUsJBgwVCkovLg8pICogBQcTFgUWFhEeAQgatYJ0uRoODQ0qTqsLDQMSAAAAAgFo/+sDVgMCAFMAYQAAATYnLgEnJiIOAQcGFxYXMhcyFzIXFhcWBwYHBgcjIicmLwEGBwYHBgcGFxY3Njc2HgEGBwYHBicuATY3NjcmJy4BNzY3Njc+ARYXHgEXFgcGLgE2AxYXHgEOAScmJy4BPgECsi8EARQTFTE1MxMgIRA6FBUCAQECBQQKBAMLBAYEBAcEEgQiISAYHQECHD5xW2MKFgwDCW1lkFMeDxUXHy0IBxgOBgcOGCEiRkMdHioECVAKFQsGdyc4CQYLFgozIgoKBxQB/hkWCBMHBw4pHjQeDggFAQECBQsNDAYCAQEBAgECFRUkKywtIkYZFEYGAxMWBk0WIF4hVk4jLxwFBhY5GBgXKBoaFAEKCycbOywFBhQVAQcNIgUWEwYGHgsEFBUKAAACAWj/6wNWAxEAUwBhAAABNicuAScmIg4BBwYXFhcyFzIXMhcWFxYHBgcGByMiJyYvAQYHBgcGBwYXFjc2NzYeAQYHBgcGJy4BNjc2NyYnLgE3Njc2Nz4BFhceARcWBwYuATYnNjc2HgEGBwYHBi4BNgKyLwQBFBMVMTUzEyAhEDoUFQIBAQIFBAoEAwsEBgQEBwQSBCIhIBgdAQIcPnFbYwoWDAMJbWWQUx4PFRcfLQgHGA4GBw4YISJGQx0eKgQJUAoVCwaDJy0JFw0DCC8pCRYNBQH+GRYIEwcHDikeNB4OCAUBAQIFCw0MBgIBAQECAQIVFSQrLC0iRhkURgYDExYGTRYgXiFWTiMvHAUGFjkYGBcoGhoUAQoLJxs7LAUGFBXUGyMHAxEXBiUbBwUSFgAAAAIBaP/rA1YDHwBTAGwAAAE2Jy4BJyYiDgEHBhcWFzIXMhcyFxYXFgcGBwYHIyInJi8BBgcGBwYHBhcWNzY3Nh4BBgcGBwYnLgE2NzY3JicuATc2NzY3PgEWFx4BFxYHBi4BNic2NzYWFxYXFg4BJicmJyYnBgcGBw4BLgECsi8EARQTFTE1MxMgIRA6FBUCAQECBQQKBAMLBAYEBAcEEgQiISAYHQECHD5xW2MKFgwDCW1lkFMeDxUXHy0IBxgOBgcOGCEiRkMdHioECVAKFQsGkyUNHDIXDB4GBhMVBhwLBQUEBwskBxYRAgH+GRYIEwcHDikeNB4OCAUBAQIFCw0MBgIBAQECAQIVFSQrLC0iRhkURgYDExYGTRYgXiFWTiMvHAUGFjkYGBcoGhoUAQoLJxs7LAUGFBXWKwwaBB8QMQoVDAYJLw0IAwIHCikIAg8WAAADAWj/6wNWAuEAUwBcAGUAAAE2Jy4BJyYiDgEHBhcWFzIXMhcyFxYXFgcGBwYHIyInJi8BBgcGBwYHBhcWNzY3Nh4BBgcGBwYnLgE2NzY3JicuATc2NzY3PgEWFx4BFxYHBi4BNicWFAYiJjQ2MhcWFAYiJjQ2MgKyLwQBFBMVMTUzEyAhEDoUFQIBAQIFBAoEAwsEBgQEBwQSBCIhIBgdAQIcPnFbYwoWDAMJbWWQUx4PFRcfLQgHGA4GBw4YISJGQx0eKgQJUAoVCwZICBAWEBAWawgQFhAQFgH+GRYIEwcHDikeNB4OCAUBAQIFCw0MBgIBAQECAQIVFSQrLC0iRhkURgYDExYGTRYgXiFWTiMvHAUGFjkYGBcoGhoUAQoLJxs7LAUGFBXfCBYQEBYQBggWEBAWEAADAWD/6gLMAvEAJQBWAGwAAAE1JjY3Njc2FxYXFgcOAQcGBwYHBicmJyYnJjU2NzY3PgE3NjcyBxQXFhcWFxY3Njc2Nz4BNzYnJicmBwYHDgEXFTY3Nh4BBgcGBxYXFg4BJicmJwYHIhMeAR8BFh8BHgEXHgEOAScmJy4BPgEBrwMTFBkkMj40DwkEAyAZHSEsMTUlGg4LAwEBAQEBBA4OCA0KDQECCgsSERQcHx4bGB8CAwcIFh8aHBUSEgNFBQwRAg4LCDwIGwQIFBUFIAkQCwW2CRAJDwULDQMXAgkDDBYKPx0LCQgUAQwBJYc8SyU0FBFCJTcplkdWNUYKCyweNyktEg0IBQQDCQkCAgE3BwknJCsWEwQGMjBRRI4mLh4kBwobHT83fCADAgEBDhcRAQEBFzoKFQkICkUgAQECGAMHBQgDBwkCEQEGFhMDBi0LBBQVCQAAAAMBYP/qAswDAwAlAFYAZgAAATUmNjc2NzYXFhcWBw4BBwYHBgcGJyYnJicmNTY3Njc+ATc2NzIHFBcWFxYXFjc2NzY3PgE3NicmJyYHBgcOARcVNjc2HgEGBwYHFhcWDgEmJyYnBgciEz4BNzYeAQYHBg8BBi4BNgGvAxMUGSQyPjQPCQQDIBkdISwxNSUaDgsDAQEBAQEEDg4IDQoNAQIKCxIRFBwfHhsYHwIDBwgWHxocFRISA0UFDBECDgsIPAgbBAgUFQUgCRALBYQTQAoJFg0DCQogMwoWDQQBDAElhzxLJTQUEUIlNymWR1Y1RgoLLB43KS0SDQgFBAMJCQICATcHCSckKxYTBAYyMFFEjiYuHiQHChsdPzd8IAMCAQEOFxEBAQEXOgoVCQgKRSABAQHjDTEHBgMSFgcHGCYHBBMWAAQBYP/qAs8DHwAlAFYAWwB2AAABNSY2NzY3NhcWFxYHDgEHBgcGBwYnJicmJyY1Njc2Nz4BNzY3MgcUFxYXFhcWNzY3Njc+ATc2JyYnJgcGBw4BFxU2NzYeAQYHBgcWFxYOASYnJicGByITJicHBgc2NzY3Njc2FxYXFh8BFg4BJi8BBwYHBiImNAGvAxMUGSQyPjQPCQQDIBkdISwxNSUaDgsDAQEBAQEEDg4IDQoNAQIKCxIRFBwfHhsYHwIDBwgWHxocFRISA0UFDBECDgsIPAgbBAgUFQUgCRALBdkCAQUCURIiCwcNDhEOBggDDBYFBhQVBiMDIxQIFhABDAElhzxLJTQUEUIlNymWR1Y1RgoLLB43KS0SDQgFBAMJCQICATcHCSckKxYTBAYyMFFEjiYuHiQHChsdPzd8IAMCAQEOFxEBAQEXOgoVCQgKRSABAQITAwECAiISJw0GCwEBDwcOBxcpChULBgpFAygUCBAWAAQBYP/qAswC4gAlAFYAXwBoAAABNSY2NzY3NhcWFxYHDgEHBgcGBwYnJicmJyY1Njc2Nz4BNzY3MgcUFxYXFhcWNzY3Njc+ATc2JyYnJgcGBw4BFxU2NzYeAQYHBgcWFxYOASYnJicGByITFhQGIiY0NjIXFhQGIiY0NjIBrwMTFBkkMj40DwkEAyAZHSEsMTUlGg4LAwEBAQEBBA4OCA0KDQECCgsSERQcHx4bGB8CAwcIFh8aHBUSEgNFBQwRAg4LCDwIGwQIFBUFIAkQCwXDCBAWEBAWaAgQFhAQFgEMASWHPEslNBQRQiU3KZZHVjVGCgssHjcpLRINCAUEAwkJAgIBNwcJJyQrFhMEBjIwUUSOJi4eJAcKGx0/N3wgAwIBAQ4XEQEBARc6ChUJCApFIAEBAgUIFhAQFhALCBYQEBYQAAQBe//9A7kCxgAIACAAKwBtAAAlNwYHBgcGFxYlPgEnLgEnJicGBxYXHgEOAScmJwc2MzYXJgciDwE2NzY3NiU2MzY3BgcGLgE2NzY/AT4BHgEPARYXHgEXFgYHFhcWDgEmJyYnBgcGBwYjBw4BLgE/ASYnJjc2NzY/ASIHBi4BNgHkCQcGGQcCBwgBTjUzAwReVCovDhkaKAwPAhALLRwSCAd1L09TChELEBZZPQb++h0hGA4XHgsTBA0LKR4CAhIWDQEBNTJhcQQDNzggFwYDEhYHFyMXGkVgGxgBAhIWDQEBLhUeGREoEhcVGxgLEAIQVzMCAgkJBAkKOyVqOkuFJBMCZJMBAgEQFw8BAgFvAQVbJAQDRAECCRYD/AGSYwIGAg0WEwIHAg4LDQMSCwYEFSqfW0N7LRkfCRYNAwkfGQwKGgkDBwsNAxILBQkcKCQXDwcFeQEBEBYQAAIBe/91A7wDCgBPAGkAAAE2NzYXFhc2NzY3NhcWDwEGBwYHBhcWNzYeAQYHBicmNzY3PgE3NicuAiMGBw4BBw4BDwEOAS4BPwE+ATc0NzQ3Njc2JyYnJgcGBw4BLgElNjc2FxYXFjc2HgEGBwYnJicmIwYHDgEuAQGCMCowJTAIHBw1LT8cHiESDAYGAQMYGToLEwYMCmAuIQMBBgcaBB8ZBw8JBhkmIToKCTAVNwUVFAgENRUtCQEBBQECCQoPDBUfKAcXEQIBDx4gFh0SBwwTCRYOAgklIhMdDQMJEQYXEQMCTDoUFhgfYSoeNgQEUVazVj4mJCBIJSYOAwwVEwMYRzNZISkofxWmRxIUAwIoImEeQZw0gwoICRUKfTKQOwUEAwQgHzgiIwoICg8wCQIOF5knBAISDAEBDwcCEhYHHQQCEggBFggDDRcABAF+/9cDlAMNAA8AGgA+AEoAAAEGJyYnBgcGFxYXFjc2NzYnJicmBwYHFxYXFicWFxYXNzYeAQYHBgcWBwYHBicmJyY3Njc2NzY3Njc2MzYzMicXHgEOAS8BLgE+AQMgSkpXHywYHQ8QPkpFQyQbCRJBJDIYGwIOUD5aOCdTGRsJFg0DCScMByEpTlxqWhURHx44DAwEDBYrBgYICAUQWAoICRUKWAoICRUBpwwaH0JLYXRVWBgcPDtyVolgJBQCBx0OPRwW1wMVLnEUBgMSFgccBmNogERSKCJ3YH93VhIPEw4aBwECXykFFRQIBCkFFRQIAAQBfv/XA5QDIwAPABoAPgBMAAABBicmJwYHBhcWFxY3Njc2JyYnJgcGBxcWFxYnFhcWFzc2HgEGBwYHFgcGBwYnJicmNzY3Njc2NzY3NjM2MzInNjc2HgEGBwYHBi4BNgMgSkpXHywYHQ8QPkpFQyQbCRJBJDIYGwIOUD5aOCdTGRsJFg0DCScMByEpTlxqWhURHx44DAwEDBYrBgYICAUYIC8KFgsGCTQjCxQICQGnDBofQkthdFVYGBw8O3JWiWAkFAIHHQ49HBbXAxUucRQGAxIWBxwGY2iARFIoIndgf3dWEg8TDhoHAQJLDRsGBhMWBR4OBAkVFAAAAAQBfv/XA5QDLQAPABoAPgBYAAABBicmJwYHBhcWFxY3Njc2JyYnJgcGBxcWFxYnFhcWFzc2HgEGBwYHFgcGBwYnJicmNzY3Njc2NzY3NjM2MzInNjc2FxYXFhcWFAYiJyYnJicGBwYHBiImNAMgSkpXHywYHQ8QPkpFQyQbCRJBJDIYGwIOUD5aOCdTGRsJFg0DCScMByEpTlxqWhURHx44DAwEDBYrBgYICAVRKA8dGhAYHxEIEBYIEyALBQIDDCQIFxABpwwaH0JLYXRVWBgcPDtyVolgJBQCBx0OPRwW1wMVLnEUBgMSFgccBmNogERSKCJ3YH93VhIPEw4aBwECOCkMFgoGHCQRCBYQCBMlDQQBAgknCA8XAAAABAF+/9cDlAMdAA8AGgA+AGUAAAEGJyYnBgcGFxYXFjc2NzYnJicmBwYHFxYXFicWFxYXNzYeAQYHBgcWBwYHBicmJyY3Njc2NzY3Njc2MzYzMic2NzYfAR4CNzY3Mjc2HgEGBwYHBgcGLgIvASYnJgcGBw4BLgEDIEpKVx8sGB0PED5KRUMkGwkSQSQyGBsCDlA+WjgnUxkbCRYNAwknDAchKU5caloVER8eOAwMBAwWKwYGCAgFbx8dHB0RCwgOCAQMARgJFg4CCRkBGQ4MGhEUBQwHAQgDCxMHFhIDAacMGh9CS2F0VVgYHDw7claJYCQUAgcdDj0cFtcDFS5xFAYDEhYHHAZjaIBEUigid2B/d1YSDxMOGgcBAjoqCAcVDgkFBAICCRMHAhIWBxQBEgMDBQUMBQoFAQYBAhsJAw0WAAAABQF+/9cDlAL3AA8AGgA+AEcAUAAAAQYnJicGBwYXFhcWNzY3NicmJyYHBgcXFhcWJxYXFhc3Nh4BBgcGBxYHBgcGJyYnJjc2NzY3Njc2NzYzNjMyJxYUBiImNDYyFxYUBiImNDYyAyBKSlcfLBgdDxA+SkVDJBsJEkEkMhgbAg5QPlo4J1MZGwkWDQMJJwwHISlOXGpaFREfHjgMDAQMFisGBggIBSIIEBYQEBZ3CBAWEBAWAacMGh9CS2F0VVgYHDw7claJYCQUAgcdDj0cFtcDFS5xFAYDEhYHHAZjaIBEUigid2B/d1YSDxMOGgcBAkUIFhAQFhALCBYQEBYQAAEBiwCHAmABYwAhAAAlJicmPgEWFxYXNz4BHgEPARYXFg4BJicmJwYHBi4BNjc2AdUiFgYDEhYHEh0kBxYSAwYqJhUHAxEWBxQhHyIJFg8CCCD2JRwJFg0DCRggLgkDDRYJNikaCRYOAwgZJCIeCAIRFgcdAAAAAAUBWv/JA4UCxAALABAAGwAkAFoAAAE3JicmBwYHFxYXFhcWNyYnBwMWFxY3Njc2JwYnJicGBwYXFhcVBw4BLgE/ASYnJjc2NzY3Njc2NzYzNjMyFxYXFhc3PgEeAQ8BFhc3Nh4BBgcGBxYHBgcGJyYCl0EPESQyGBsCDlAEPR8cBgxJ1xEZSkVDJBsDL2lTHywYHQ8DBC4GFhMFBjkRCBEfHjgMDAQMFisGBggIBQU4JxMRKwYWEwQHMxkLGwkWDQMJJwwHISlOXGodAeVkDwkUAgcdDj0cAQwDBSEbcf6mFAkcPDtyVlMHFh9BS2F0VQ8NZkgJBQwWClghKmB/d1YSDxMOGgcBAgEDFQsPPwoEDRYJTCY0FAYDEhYHHAZjaIBEUigLAAAAAgFp/+4DOQMVADkARwAAAQcGDwEGBwYXFhceAQ4BJyYnJjcGBwYHBicmJyYSNz4BHgEHBgcGFx4BNzY3Njc2Nz4BHgEHFRQOAScWFx4BDgEnJicuAT4BAxwKBwMIBQIIDAwlCAMNFwk0EQkCIyQ2OEwuIQMEPiwGFRQGBSkeHQQCLyclKycoPiMCExYMAwIOkh0tCQIOFgkvHQgCEBYCDDIiGDghHGJBSBwGFxEDByhcN0lYOVYSFz8tQ2cBTVMKBgsVCkufoGEyQAwLRj1rpaMLDAUTCwIECkLxGiUHFhICByYbCBYQAgAAAAACAWn/7gM5AxoAOQBLAAABBwYPAQYHBhcWFx4BDgEnJicmNwYHBgcGJyYnJhI3PgEeAQcGBwYXHgE3Njc2NzY3PgEeAQcVFA4BJzY3Njc2HgEGBwYHBgcGLgE2AxwKBwMIBQIIDAwlCAMNFwk0EQkCIyQ2OEwuIQMEPiwGFRQGBSkeHQQCLyclKycoPiMCExYMAwIOtQ8ZGg0JFg4CCQ4ZGg4JFg4DAgwyIhg4IRxiQUgcBhcRAwcoXDdJWDlWEhc/LUNnAU1TCgYLFQpLn6BhMkAMC0Y9a6WjCwwFEwsCBApCtAsXFwoHAhIWBwsWFwsHAxEWAAAAAAIBaf/uAzkDOwA5AFIAAAEHBg8BBgcGFxYXHgEOAScmJyY3BgcGBwYnJicmEjc+AR4BBwYHBhceATc2NzY3Njc+AR4BBxUUDgEnNjc2NzYXFhcWDgEmJyYvAQYHBgcOAS4BAxwKBwMIBQIIDAwlCAMNFwk0EQkCIyQ2OEwuIQMEPiwGFRQGBSkeHQQCLyclKycoPiMCExYMAwIO5CAGFxQgGhQUBAgVFAUQDQIHCwUfBxYSAwIMMiIYOCEcYkFIHAYXEQMHKFw3SVg5VhIXPy1DZwFNUwoGCxUKS5+gYTJADAtGPWulowsMBRMLAgQKQr8rBxwHCxwULwsUCQgKJw0CAw4GKgkDDRYAAAADAWn/7gM5AvQAOQBCAEsAAAEHBg8BBgcGFxYXHgEOAScmJyY3BgcGBwYnJicmEjc+AR4BBwYHBhceATc2NzY3Njc+AR4BBxUUDgEnFhQGIiY0NjIXFhQGIiY0NjIDHAoHAwgFAggMDCUIAw0XCTQRCQIjJDY4TC4hAwQ+LAYVFAYFKR4dBAIvJyUrJyg+IwITFgwDAg6/CBAWEBAWdwgQFhAQFgIMMiIYOCEcYkFIHAYXEQMHKFw3SVg5VhIXPy1DZwFNUwoGCxUKS5+gYTJADAtGPWulowsMBRMLAgQKQtAIFhAQFhAMCBYQEBYQAAACAVn/DwMgAs4AWQBlAAABBg8BBgcGBwYXFhcWNzY3Njc2NzY3PgE1Njc2MzIfAR0BDgIHBgcOBAcGBwYHBicuAT4BFxY3Njc+AT8BPgI/AgYHBgcGJyYnJjc2PwM+AR4BPwE2HgEGDwEGLgE2Ae0BBAwIBRsMEA0GCwoURkclNQkeAQQCAgIECAwPCAQBDxoECBoBCAIJBwYGBzR8TDsKCAkVCi8+XSYFCQMGAwYCAwQRDQ1TYiweGAoPEQwcDQsHAhIWDUlSCBcOAglSCRYOAgI5CRIuHRdtUm42GwoJAwuFRZYbewYbCwYCBQQJDAsEBCteexcptwM5ETAbEhEQcAsGGgUVFAgEFQUIUwsYDxgLJRAWHXgdGZ0QBxoWLEF3UnIzLhkLDQUSQUIHAhEXB0IHAhIWAAACAWL/qQMMAp8AHAArAAAlBw4BLgE3NhI2NTQ2MhYVFAc+ARcWFxYHBgcGBxMGBz4BNzYnJicmBw4BBwGsEwESFg4BBywVEBYQCkOCKzQHCn4yOjsyGgkSK2QqZgcFGhcqKVgYWZcLDgISCzoBPdxpCxAQC15wOioYHVVyYSYbGgkBCUuHCS4gT1Y4Dw0ODkAeAAAAAQGE/8IDMAK7AFMAAAU2NCY2NzY3NhcWFxYHBgcGDwEWFxYXFhcWFxYHDgMnLgEnJjc2HgEGBwYXFhcWPgI3NicmJyYvASYnJj8BNjc2JyYnJgcGBw4BFhQHDgEuAQGFAgITFBspPlJABgQaCiMLBAQCGQMhGRAzEBUhEjo+QRocKQMFTgoWCwYJMQICIBEuLCsNGQ0KJQ0XJTIFAgkSIgkVAwIcMSkhFxQRAgIBEBcPIDqPfZI+Ty9HFRA/KUAaRRcLCgcNAhEMCyEsOU0pOhcGCgkmHDkuBgYTFgUdFxIKBwQRKx85JBwXCQsTHCEOFyZEFzQcGQcNLyZGOoh3jUILDwIQAAAAAwCp/94CcwH1AD4AXABqAAABMhcWFxYHFA8BBhUGBwYVFBcWFxY3Njc2NzY3PgEeAQcGBwYHBgcGJyYnJicGBwYHBicmNzY3Njc2FxYXFhcHJicmJzYnJgcGBwYHBhY3Njc2NzY3Njc1Njc0NzQnFhceAQ4BJyYnLgE+AQGkAQEIAQEEBQEGAgECCAsWFBESEg0OEwIEFBUJBAESDw8WHCcvMhMDAggJHyIvJhwDAxgaJzU5IAkDAjMBAgEBAREaGRwUFQICHg0QFRMQEAYBAQMDATk+FwoGCxUKGj8KBA0WARQBCAwJDAIKBSABERETAygYGwYFDxAnHTA8BQsJCBQKBDsyIjEYIg0ONQcJDgsqCg4tIUQ6PEEfKB8TFAkNIAcSBwICCQ8TFjMyMy8iBAUcGSMiFQQDBxoQAwIB9yoNBhUUBgUPLAYWEwQAAAAAAwCp/94CcwH/AD4AXABuAAABMhcWFxYHFA8BBhUGBwYVFBcWFxY3Njc2NzY3PgEeAQcGBwYHBgcGJyYnJicGBwYHBicmNzY3Njc2FxYXFhcHJicmJzYnJgcGBwYHBhY3Njc2NzY3Njc1Njc0NzQnNjc2NzYeAQYHBgcGBwYuATYBpAEBCAEBBAUBBgIBAggLFhQREhINDhMCBBQVCQQBEg8PFhwnLzITAwIICR8iLyYcAwMYGic1OSAJAwIzAQIBAQERGhkcFBUCAh4NEBUTEBAGAQEDAwFbFSMmBgkWDQMJBiQiFgkWDgIBFAEIDAkMAgoFIAERERMDKBgbBgUPECcdMDwFCwkIFAoEOzIiMRgiDQ41BwkOCyoKDi0hRDo8QR8oHxMUCQ0gBxIHAgIJDxMWMzIzLyIEBRwZIyIVBAMHGhADAgG5EBobBAYDEhYHBBoYEQcCEhYAAAAAAwCp/94CcwIRAD4AXAB5AAABMhcWFxYHFA8BBhUGBwYVFBcWFxY3Njc2NzY3PgEeAQcGBwYHBgcGJyYnJicGBwYHBicmNzY3Njc2FxYXFhcHJicmJzYnJgcGBwYHBhY3Njc2NzY3Njc1Njc0NzQnNjc2NzYzNhcWFxYfARYOASYvAwcGBwYiJjQBpAEBCAEBBAUBBgIBAggLFhQREhINDhMCBBQVCQQBEg8PFhwnLzITAwIICR8iLyYcAwMYGic1OSAJAwIzAQIBAQERGhkcFBUCAh4NEBUTEBAGAQEDAwGNESQLBw0OEQ0HCAQNFgYGExYFFhEBBCQSCBcPARQBCAwJDAIKBSABERETAygYGwYFDxAnHTA8BQsJCBQKBDsyIjEYIg0ONQcJDgsqCg4tIUQ6PEEfKB8TFAkNIAcSBwICCQ8TFjMyMy8iBAUcGSMiFQQDBxoQAwIBxhAmDAYLAQ4HDwYXKQkWCwYKJx4BBCgSBxAXAAAAAAMAqf/eAnMB/AA+AFwAeQAAATIXFhcWBxQPAQYVBgcGFRQXFhcWNzY3Njc2Nz4BHgEHBgcGBwYHBicmJyYnBgcGBwYnJjc2NzY3NhcWFxYXByYnJic2JyYHBgcGBwYWNzY3Njc2NzY3NTY3NDc0JzY3NhcWFxYfATY3PgEeAQcGIyInJicGBw4BLgEBpAEBCAEBBAUBBgIBAggLFhQREhINDhMCBBQVCQQBEg8PFhwnLzITAwIICR8iLyYcAwMYGic1OSAJAwIzAQIBAQERGhkcFBUCAh4NEBUTEBAGAQEDAwGGEA8TFhEPBQwNCRYGFhMFBicmHBwJAwgMBRYTBgEUAQgMCQwCCgUgAREREwMoGBsGBQ8QJx0wPAULCQgUCgQ7MiIxGCINDjUHCQ4LKgoOLSFEOjxBHygfExQJDSAHEgcCAgkPExYzMjMvIgQFHBkjIhUEAwcaEAMCAckdDRIDAw8FEA8DIgoFDBYJPyQNAwgTCgYLFgAEAKn/3gJzAdEAPgBcAGUAbgAAATIXFhcWBxQPAQYVBgcGFRQXFhcWNzY3Njc2Nz4BHgEHBgcGBwYHBicmJyYnBgcGBwYnJjc2NzY3NhcWFxYXByYnJic2JyYHBgcGBwYWNzY3Njc2NzY3NTY3NDc0JxYUBiImNDYyFxYUBiImNDYyAaQBAQgBAQQFAQYCAQIICxYUERISDQ4TAgQUFQkEARIPDxYcJy8yEwMCCAkfIi8mHAMDGBonNTkgCQMCMwECAQEBERoZHBQVAgIeDRAVExAQBgEBAwMBRQgQFhAQFmEIEBYQEBYBFAEIDAkMAgoFIAERERMDKBgbBgUPECcdMDwFCwkIFAoEOzIiMRgiDQ41BwkOCyoKDi0hRDo8QR8oHxMUCQ0gBxIHAgIJDxMWMzIzLyIEBRwZIyIVBAMHGhADAgHSCBYQEBYQDQgWEBAWEAAABACp/94CcwJGAD4ASQBeAHwAAAEyFxYXFgcUDwEGFQYHBhUUFxYXFjc2NzY3Njc+AR4BBwYHBgcGBwYnJicmJwYHBgcGJyY3Njc2NzYXFhcWFycWNjc2JicmBgcGByY3PgEXHgEHBgcGJwYnJicmJy4BFyYnJic2JyYHBgcGBwYWNzY3Njc2NzY3NTY3NDc0AaQBAQgBAQQFAQYCAQIICxYUERISDQ4TAgQUFQkEARIPDxYcJy8yEwMCCAkfIi8mHAMDGBonNTkgCQMCYxMYBAULCQsUBgkrDA4LOCIkGwoNJRIXDAsGBQgHCglsAQIBAQERGhkcFBUCAh4NEBUTEBAGAQEDAwEBFAEIDAkMAgoFIAERERMDKBgbBgUPECcdMDwFCwkIFAoEOzIiMRgiDQ41BwkOCyoKDi0hRDo8QR8oHxMUCA6zBAkNEBsCAw0PFxkhIx4kCQpGIScOBwIFBgMDAwMEE78HEgcCAgkPExYzMjMvIgQFHBkjIhUEAwcaEAMCAQAAAAADAKn/4AMQAXMAFABuAIwAACU2JyYjJgcOAQcGFzY3Nj8BND8BNicyFxYXFgcUDwEGFQYHBhUUFxYXMhcmNz4BNzYXFhcWDwEGBwYHFjc+Az8BPgE3PgEeAQ8CDgMHDgEnJicGJyYnJicGBwYHBicmNzY3Njc2FxYXFhcHJicmJzYnJgcGBwYHBhY3Njc2NzY3Njc1Njc0NzQCPQwIAgIEBxw2AQEaCgsNDgkCAwSWAQEIAQEEBQEGAgECCAsWAgIgAQJFLxkXGQsSHA0QDgoLOywIDg0IBggCDAIEFBUKAwgLAxIOFwwjXCgHBiIoMhMDAggJHyIvJhwDAxgaJzU5IAkDAjMBAgEBAREaGRwUFQICHg0QFRMQEAYBAQMDAe4qEgQCAwtfSSkXDxcdMB0EBAgNLQEIDAkMAgoFIAERERMDKBgbBgEmNld9EQoHCRorTCs2HhURCSYHERcREBYHJgULCgcUChohCSoYHwseFAwCAxcLDjUHCQ4LKgoOLSFEOjxBHygfExQJDSAHEgcCAgkPExYzMjMvIgQFHBkjIhUEAwcaEAMCAQAAAAEAtP+DAhYBZgA0AAAlLgEvASYHBgcGFxYXFjc2Nz4BHgEHBgcGBxYHBgcGLgE2Nz4BJyYnJicmNjc2FxYXFg4BJgFiAggDBAsYHhISCQgvMSI+IgMTFgsDJkoiMQkHCjIKFQgICxkGDwICQg0LLSYuKzAIAQ4XEfQUGgIDAxohNTQtKgsLHjeECwsGEwuUQR8EGBYjFAQIFRUEChQXAwQYQjuBKjELDlULEQIOAAAAAwCw/9ICDQHzAAsAMQA/AAA3Fjc2NzYnJicmBwYHFhcWNzY3PgI3PgEeAQ8BDgEHBgcGJyY3Njc+ARcWFxYHBgcGExYXHgEOAScmJyY0NjLyGBkfFxYCARcbHSELAwwZPTIcChASBwQUFQkEDgoSCydLYS0kDQsqFzwiOQMDICExIi4bMwoFDBUKOSEHEBedDggLIyIeGgcKJyt7HRIlDgw1Eyk2EwoJCBQLKhwwFUoRF0Q1V1E3Hh0LFD4wMTMQCwGSHR8GFRQFBiMhCBcPAAMAsP/SAg0CEAALADEAPwAANxY3Njc2JyYnJgcGBxYXFjc2Nz4CNz4BHgEPAQ4BBwYHBicmNzY3PgEXFhcWBwYHBhM2Nz4BHgEHBgcGLgE28hgZHxcWAgEXGx0hCwMMGT0yHAoQEgcEFBUJBA4KEgsnS2EtJA0LKhc8IjkDAyAhMSIERBYHFxACCBlHCRYOA50OCAsjIh4aBwonK3sdEiUODDUTKTYTCgkIFAsqHDAVShEXRDVXUTceHQsUPjAxMxALAV81GQgCDxcIHDgHAxEWAAAAAwCw/9ICDQIyAAsAMQBTAAA3Fjc2NzYnJicmBwYHFhcWNzY3PgI3PgEeAQ8BDgEHBgcGJyY3Njc+ARcWFxYHBgcGAzY3Njc2PwE2FxYXFhcWHwEWFxYOASYnJi8BBwYHDgEuAfIYGR8XFgIBFxsdIQsDDBk9MhwKEBIHBBQVCQQOChILJ0thLSQNCyoXPCI5AwMgITEiFwceDwoGBAYKDQoIAwMDBhUXCQQIFRUEBRoKDR0GBBUVB50OCAsjIh4aBwonK3sdEiUODDUTKTYTCgkIFAsqHDAVShEXRDVXUTceHQsUPjAxMxALAVYOMhgOCQUGCQEBCAMEBQknLxYKFQgICw0zFBQvDQoHCRUAAAAEALD/0gINAdkACwAxADoAQwAANxY3Njc2JyYnJgcGBxYXFjc2Nz4CNz4BHgEPAQ4BBwYHBicmNzY3PgEXFhcWBwYHBhMWFAYiJjQ2MhcWFAYiJjQ2MvIYGR8XFgIBFxsdIQsDDBk9MhwKEBIHBBQVCQQOChILJ0thLSQNCyoXPCI5AwMgITEiKwgQFhAQFlsIEBYQEBadDggLIyIeGgcKJyt7HRIlDgw1Eyk2EwoJCBQLKhwwFUoRF0Q1V1E3Hh0LFD4wMTMQCwF4CBYQEBYQCggWEBAWEAACALH/6AGmAd4AJwA5AAABBgcGBwYXHgEXMjc2NzY3PgEeAQcGBwYHBicmJyYnJjc+ATc+AR4BJxYXFhceAQ4BJyYnJicuAT4BAQoBCQkEBgECDAQDBhMYFyQEFBUKAyYZHh0XFxkUEwMBBgQSAQIRFw0xCyIcDwoICRQLEhwlBwoHChUBNAg2MiYyHSAOAQQOLi1oCgoHFAtsMDkVEQMCFxYyIzYibAcMDQMRmgUSDwYFFBUIBAgPFAMFFRQHAAACALX/6AGkAe4AJwA7AAABBgcGBwYXHgEXMjc2NzY3PgEeAQcGBwYHBicmJyYnJjc+ATc+AR4BJz4DNzYeAQYPAwYHBi4BNgEIAQkJBAYBAgwEAwYTGBckBBQVCgMmGR4dFxcZFBMDAQYEEgECERcNPwoUDRkGCRcNAwgTFBQMCwoVCwYBNAg2MiYyHSAOAQQOLi1oCgoHFAtsMDkVEQMCFxYyIzYibAcMDQMRcwUNChUEBwMRFwYPEA4IBgUGFBUAAAAAAgCo/+gBpQIBACcAQgAAAQYHBgcGFx4BFzI3Njc2Nz4BHgEHBgcGBwYnJicmJyY3PgE3PgEeASc2NzY3NhcWFxYXFhUWFxYOASYnJicHDgEuAQEJAQkJBAYBAgwEAwYTGBckBBQVCgMmGR4dFxcZFBMDAQYEEgECERcNXCQPDQ0PCwcDBAIEBwsGBRMWBg8IGgYWEwUBNAg2MiYyHSAOAQQOLi1oCgoHFAtsMDkVEQMCFxYyIzYibAcMDQMRYTwQEAIDCQUJBw4UAh0SCRYMBQoYISkKBQwWAAAAAAMAtf/oAaQB1AAnADAAOQAAAQYHBgcGFx4BFzI3Njc2Nz4BHgEHBgcGBwYnJicmJyY3PgE3PgEeAScWFAYiJjQ2MhcWFAYiJjQ2MgEIAQkJBAYBAgwEAwYTGBckBBQVCgMmGR4dFxcZFBMDAQYEEgECERcNHwgQFhAQFlEIEBYQEBYBNAg2MiYyHSAOAQQOLi1oCgoHFAtsMDkVEQMCFxYyIzYibAcMDQMRjQgWEBAWEA0IFhAQFhAAAAAAAgF3/+AC5QIVAA0ARgAAAQYHBgcGFxY3Njc2JyYnBgcGLgE2NzY3JicuAT4BFxYXNjc2HgEGBwYHFhc2NzYeAQYHBgcWFxYHDgEHBicmJyY3Njc2NyYCcSAdXBQRExMsPyEgCgNTKyUKFQsGChwfICULDQMSCzkwKxAJFg4CCQ4jJxkcFwsTBgsLFBgKBAgOD1I/KB4fEB8bGmsiIxYBHA8TOTUuJSMFBzs7UhqSJBQFBhQVBg8YEAUCEhYNAQgdJg0HAhIWBwsgIzILBgMLFhMDBQofIj84OVUHBRARHztFREQWECoAAAIAqf/fAnEB5wBOAG4AAAEGBwYHBgcGBwYHBgcUBxQHBgcGJyYnJj0CNjc2NzY3PgEeAQYVNjc2FxYXFgcGFxYXFjc2NzY3Njc+AR4BBwYHBgcGBwYnJicmNzYnJic2NzYXFhcWFxY+ATc+AR4BBwYnJicmJyYjBgcOAS4BAV4DBxMXExEQBAICBwgBAgIDDhELAwEBBAYFDQYBERYPAhkWKyMZBAECAQQFDgsKCg0ZFiEOAxQVCwMPJBsfGhsjHR0HBQECAQKBFycREwkOFgYBAwoHBhUUBgUgKxciDAUBAQcKAxUVCQEgAgYPJiAiIw0FCiooBAIEBAMDDggFDAIDBQUJFCIXWFsLDwIRFgooEyUaEzUURjkdJQ0KAQIMFi1EMAsLBhQKNUk2HRgDBRsaOCI+QhIYiEIEAQsGDBMBAQEMDAoGCxUKOQUDHgoDAQgZCwkHFQAABACi/9MCYAHmAAsAGgBIAFYAACUnLgE3BgcGFxYXFjc2NzYnJicmByIHBgcGFjcXFhcWBwYHFhcWNz4FNz4BHgEHDgUHBicmJwYnJicmNzY3Njc2JxYXHgEOAScmJy4BPgEBTgQgJwEQCREKCiMjPxYCAxcICggMAQEDBBYbIgobEh8EAyEPDyQcBwsGCAQIAgITFgwDAQkDCQgNBy1GICAwQUQTDhUUKS40DyI9IgoHChYJJkEJAw0WHQQlZTEeHzgnIwgHNyc7RScQAwQHAgYJLHTqBAogNlRONQgBAjIMGBAdDCUHCwwFEwsGJg4gFBwNTwMCFCUODUQ2R0IzOQkCeCwSBRYTBwUULgcWEgMAAAAABACi/9MCYAH+AAsAGgBIAFYAACUnLgE3BgcGFxYXFjc2NzYnJicmByIHBgcGFjcXFhcWBwYHFhcWNz4FNz4BHgEHDgUHBicmJwYnJicmNzY3Njc2JzY3PgEeAQcGBw4BLgEBTgQgJwEQCREKCiMjPxYCAxcICggMAQEDBBYbIgobEh8EAyEPDyQcBwsGCAQIAgITFgwDAQkDCQgNBy1GICAwQUQTDhUUKS40D0IYKQgWEAIIKBcGFxEDHQQlZTEeHzgnIwgHNyc7RScQAwQHAgYJLHTqBAogNlRONQgBAjIMGBAdDCUHCwwFEwsGJg4gFBwNTwMCFCUODUQ2R0IzOQkCQB8tCAIQFggsHggDDRcAAAAABACi/9MCYAIGAAsAGgBIAF8AACUnLgE3BgcGFxYXFjc2NzYnJicmByIHBgcGFjcXFhcWBwYHFhcWNz4FNz4BHgEHDgUHBicmJwYnJicmNzY3Njc2JzY3Njc2HwEWDgEmJyYvAQcUBw4BLgEBTgQgJwEQCREKCiMjPxYCAxcICggMAQEDBBYbIgobEh8EAyEPDyQcBwsGCAQIAgITFgwDAQkDCQgNBy1GICAwQUQTDhUUKS40D04mARYVGBYkBgUTFgYbBgEDJQcWEgMdBCVlMR4fOCcjCAc3JztFJxADBAcCBgksdOoECiA2VE41CAECMgwYEB0MJQcLDAUTCwYmDiAUHA1PAwIUJQ4NRDZHQjM5CQJNMwEbAQEcNgoWDAUJKwgBAwExCQMNFgAABACi/9MCYAHqAAsAGgBIAGYAACUnLgE3BgcGFxYXFjc2NzYnJicmByIHBgcGFjcXFhcWBwYHFhcWNz4FNz4BHgEHDgUHBicmJwYnJicmNzY3Njc2JzY3Mh8BFhc2Nz4BHgEHBgcGJyYnJi8BBgcOAS4BAU4EICcBEAkRCgojIz8WAgMXCAoIDAEBAwQWGyIKGxIfBAMhDw8kHAcLBggECAICExYMAwEJAwkIDQctRiAgMEFEEw4VFCkuNA9nHCYRERQJBAgJBBUVCAQbJRERCAwKBAEICQUVFAgdBCVlMR4fOCcjCAc3JztFJxADBAcCBgksdOoECiA2VE41CAECMgwYEB0MJQcLDAUTCwYmDiAUHA1PAwIUJQ4NRDZHQjM5CQI+PQEMEgoDCBcKCAgVCz4CAQwGDAoDAQcWCggJFQAFAKL/0wJgAdcACwAaAEgAUQBaAAAlJy4BNwYHBhcWFxY3Njc2JyYnJgciBwYHBhY3FxYXFgcGBxYXFjc+BTc+AR4BBw4FBwYnJicGJyYnJjc2NzY3NicWFAYiJjQ2MhcWFAYiJjQ2MgFOBCAnARAJEQoKIyM/FgIDFwgKCAwBAQMEFhsiChsSHwQDIQ8PJBwHCwYIBAgCAhMWDAMBCQMJCA0HLUYgIDBBRBMOFRQpLjQPJwgQFhAQFmIIEBYQEBYdBCVlMR4fOCcjCAc3JztFJxADBAcCBgksdOoECiA2VE41CAECMgwYEB0MJQcLDAUTCwYmDiAUHA1PAwIUJQ4NRDZHQjM5CQJnCBYQEBYQCwgWEBAWEAAAAwECAHYB/AFHAA0AFgAfAAAlMjcyFhQGIwYjIiY0NjcWFAYiJjQ2MhcWFAYiJjQ2MgEdCLsMEA8LvQgLEBB/CBAWEBAWBwgQFhAQFvMEDxcQBBAWEEwIFhAQFhCjCBYQEBYQAAUAfv+eAlIBiQAMABQAHgAkAGYAACU3JicmJyYHIgcGBwYXFhc2NzY1DwEmNwYHBhcWFzYXBxY3JyYHBgcGLgE2NzY3JicmNzY3Njc2HwEWFzY3PgEeAQcGBxYHBgcWFxY3PgU3PgEeAQcOBQcGJyYnBicmATQ+BAUICggMAQEDBBgqCw4WAgEiThkBEAkRCgMGFjYbGxUECUofHwgWDwEIGhoRCA4VFCkuNA8KChkRHhoHFhICByIoCAIDIQ8PJBwHCwYIBAgCAhMWDAMBCQMJCA0HLUYgIDBBCKNeCggQAwQHAgYJLX4TDyg6BQUzEjk3Hh84JwsIHBEkAwwEC0cjHQcBEBYIGB0UHDZHQjM5CQIMBAkbKiAJAg4WCSo7Ji1NNggBAjIMGBAdDCUHCwwFEwsGJg4gFBwNTwMCFCUOAQAAAAIAxP/dAnUB9AATAFcAAAEeAxceAQ4BJy4CLwEmPgEWBwYHFBcWNzY3Njc0NzY3NDc2NzYzFh8BHQIGBwYHBhcWFxY3Njc+ATc+AR4BBw4BBwYHBicmJwYHBicmNTY3PgEeAQFNBhQLEQgJAg4WCQoWDQoPBwISFjYVAQwJEyIcEw8LAwIBAgQIDQ8IAwEHCQMFAwIIExEUFhMdBAISFg0BBSAWHiMyLhEHJDI7GhEBFwMTFgsB6QcaDRIHBxYSAgcJFg8OEwkWDgK+UlY3GhQDBT4rRQM8EwYEAgUECQENCwICBgouMR8wHB4IEgkKJiFXGgsNAxILH2AmNBIZKxAdOAkKOiZDXFkLCwYTAAAAAgDE/90CdQHzAA8AUwAAATc2NzYeAQYHBg8BBi4BNgcGBxQXFjc2NzY3NDc2NzQ3Njc2MxYfAR0CBgcGBwYXFhcWNzY3PgE3PgEeAQcOAQcGBwYnJicGBwYnJjU2Nz4BHgEBNTMgBQkWDwIIBSIzCRYOAhwVAQwJEyIcEw8LAwIBAgQIDQ8IAwEHCQMFAwIIExEUFhMdBAISFg0BBSAWHiMyLhEHJDI7GhEBFwMTFgsBniwcBQgCERYHBR4sBwISFmNSVjcaFAMFPitFAzwTBgQCBQQJAQ0LAgIGCi4xHzAcHggSCQomIVcaCw0DEgsfYCY0EhkrEB04CQo6JkNcWQsLBhMAAAAAAgDE/90CdQHuABoAXgAAATc2NzY3NjM2FxYXFg4BJicmLwIPAQYiJjQXBgcUFxY3Njc2NzQ3Njc0NzY3NjMWHwEdAgYHBgcGFxYXFjc2Nz4BNz4BHgEHDgEHBgcGJyYnBgcGJyY1Njc+AR4BARMZDgIJBwwNFxQCIQYFExYGBQcLCAIpCBYRBBUBDAkTIhwTDwsDAgECBAgNDwgDAQcJAwUDAggTERQWEx0EAhIWDQEFIBYeIzIuEQckMjsaEQEXAxMWCwGkHBEBCwUKAh0CMwoWDAUJCQsSDAIuCQ8WaFJWNxoUAwU+K0UDPBMGBAIFBAkBDQsCAgYKLjEfMBweCBIJCiYhVxoLDQMSCx9gJjQSGSsQHTgJCjomQ1xZCwsGEwAAAAMAxP/dAnUB4QBDAEwAVQAAAQYHFBcWNzY3Njc0NzY3NDc2NzYzFh8BHQIGBwYHBhcWFxY3Njc+ATc+AR4BBw4BBwYHBicmJwYHBicmNTY3PgEeATcWFAYiJjQ2MhcWFAYiJjQ2MgEQFQEMCRMiHBMPCwMCAQIECA0PCAMBBwkDBQMCCBMRFBYTHQQCEhYNAQUgFh4jMi4RByQyOxoRARcDExYLRQgQFhAQFlYIEBYQEBYBNFJWNxoUAwU+K0UDPBMGBAIFBAkBDQsCAgYKLjEfMBweCBIJCiYhVxoLDQMSCx9gJjQSGSsQHTgJCjomQ1xZCwsGE5oIFhAQFhATCBYQEBYQAAAAAAMAtf7qAkkBzwALAGAAbAAABQcGBwYWFxY+ATc2Aw4BFxYXFjc2NzY3Njc2NzY3Njc2NzYzNhceARcdAQYHBhUGFgc+ATc+AR4BBw4BBwYHBgcOAScuATc2NzY/ATQ3NjUHBgcGBwYnJicmNzY3PgEeAT8BPgEeAQ8BBiImNAF8HDYFAgsHBAwVCRBnGQgKBAUECQwPDxASGQYLBQECAQIFCAkOCQIDAQEBAwEBASMlEQITFgwDEzI1CgwIGxM4Hx0hBAhIECkKAQENExQbHh8XFAoOBAQbAhMWDCdKBxYRAghKCBYRUhQqLA0QAgEDFBQjAbJzdBsKAwMCAxMUJCZOEysSBgUDBgUHAQsDBwICEwkSKAYYdiUkV0ULDAUTC1JsLgkJZTkoJQcGNB9DOAwbBwoLJjwfKRkjBgcODRwlRT93CwwFE0ZQCAIPFglSCA8WAAACAVH/dAMiAfYAJwA5AAAFBwYHIwYHDgEuATcSETQ2MhYVFAc2NzYWFxYGBzY3PgEeAQcGBwYHJzY3PgEnLgEHDgEHBgcGBzM2AdoMGxENBgcCEhYNASsQFhADIy00VQ4MIiZkLAQUFQoDPZoIYAsmCDM5DAoyHyAzBgIDBggJEQgCBQEyMgsNAxILASsBHAsQEAtMTR4HCTo/M2knGYYKCgcUC7YRAQE2CAMUajQqIgUFMSQGBVBQAQAAAAQAtf7qAkkBnAALAGAAaQByAAAFBwYHBhYXFj4BNzYDDgEXFhcWNzY3Njc2NzY3Njc2NzY3NjM2Fx4BFx0BBgcGFQYWBz4BNz4BHgEHDgEHBgcGBw4BJy4BNzY3Nj8BNDc2NQcGBwYHBicmJyY3Njc+AR4BNxYUBiImNDYyFxYUBiImNDYyAXwcNgUCCwcEDBUJEGcZCAoEBQQJDA8PEBIZBgsFAQIBAgUICQ4JAgMBAQEDAQEBIyURAhMWDAMTMjUKDAgbEzgfHSEECEgQKQoBAQ0TFBseHxcUCg4EBBsCExYMOggQFhAQFlEIEBYQEBZSFCosDRACAQMUFCMBsnN0GwoDAwIDExQkJk4TKxIGBQMGBQcBCwMHAgITCRIoBhh2JSRXRQsMBRMLUmwuCQllOSglBwY0H0M4DBsHCgsmPB8pGSMGBw4NHCVFP3cLDAUTYwgWEBAWEAYIFhAQFhAAAAAAAwBK/+kC4QKnAA8AGgBkAAABBicmJwYHBhcWFxY3Njc2JyYnJgcGBxcWFxY3MhYzFjc2HgEGBwYnIiYnFhc3Nh4BBgcGBxYHFjc2HgEGBwYnBwYHNhcyFhQGIyYHIicGJyYnJjc2NzY3Njc2NzYzNjMyFxYfAQHsSkpXHywYHQ8QPkpFQyQbCRJBJDIYGwIOUD4eGFYNRzAMEQIOCzVJDjkEGQsbCRYNAwknDAUNTE8MEQIOC1lUBidLiakLDxEL4K4FBDIyWhURHx44DAwEDBYrBgYICAUFOCcWAaQMGh9CS2F0VVgYHDw7claJYCQUAgcdDj0cFrECAQUBDhcRAQUBAQEnNBQGAxIWBxwGPkQGCAEOFxEBCAcUfEUDBREWDwYGAQkTIndgf3dWEg8TDhoHAQIBAxUOAAAAAAP/3//VAgEBbwALABsASAAANxY3Njc2JyYnJgcGJyYHBgcOARceATcyNyY3Njc2FxYXFgcGBwYnFhcWNzY3PgI3PgEeAQ8BDgEHBgcGJwYjBiYnJjY3Njc25hgZHxcWAgEXGx0hJTEqJhkbARwPKhQoDgsIBjA0QDkDAyAhMSIhAwwZPTIcChASBwQUFQkEDgoSCydLVy4gMiJAFigCIyg/PZ0OCAsjIh4aBwonKx4qBAMmJ2goExUBJis2MFlEFRQ+MDEzEAsKHRIlDgw1Eyk2EwoJCBQLKhwwFUoRFDQkASEdOYg1OgYFAAAAAQGjAioCAgK/AA0AAAEGBw4BLgE3Njc+AR4BAf8PGAQWFAcFFg0EFBUKApotMgoHCRYKLikLCgcUAAAAAQGNAiEB1gLCAA0AAAEWFxQGIiY1JicmPgEWAcQQAg8WEQIOAwoVFAKtMT8LEQ8LNysKFAcKAAACAaICHgJNAroADQAfAAABBgcOAS4BNzY3PgEeARcGBwYHDgEuATc0NzY3PgEeAQIBKAEEFBUJBAEoBRQVCEUHDA8DBBQVCQQTCwUEFBUKApJdAQoJCBQLAl4KCAkUEhIcJAgKCQgUCwEsGhEKCgcUAAAAAAIBsQILAlICugARACEAAAEWFxYXFg4BJicmJyYnJj4BFjceARcWDgEmJy4BJyY+ARYB6AUKDgQDCxUUAwMOCwUDDBYTSAEaBgMLFRQDBhkCAwoVFAKUEx0nDQsUBgsKDCYgFgsTBQwHBUsTCxQGCwoUSAULFAcKAAQBFP/zAmoCKgANABYAHwAoAAABBgMOAS4BNxI3PgEeAQcWFAYiJjQ2MgEWFAYiJjQ2MgcWFAYiJjQ2MgI6Up4FFRQIBJ9TBRYTB9wIEBYQEBYBBwgQFhAQFlwIEBYQEBYCAZ/+owoICRUKAV+fCgcKFg8IFhAQFhD+QwgWEBAWEAQIFhAQFhAAAAAAAQEX//kDSQKhAFIAAAE2JyYnJgcOAQc2NzYeAQYHBiMHBgc2MzIWFAYjIgceARcWNjc+AR4BBwYHBicmJyYnBgciJjQ2MzY3NjcmJy4BPgEXFhc+ATc2FxYXFgcOAS4BAqIZHAkODRMrXhohHAoUBgsLKDEBBgIqIAsQEAsgKgY2JzmQOwYWEwUGQ1hWUDokJAcsGgsRDwsaLQEHISALDAUTCyEhHHE7JyAiEiMbAhIWDQF3ljwUBgUID3lSAggDCxUUAwwBIx8CEBYQAj1KCxFLXgoFDBYJai8vGBEyM00DAQ8WEQEDIiYDCAITFgwDBwNhlRYODA0oTaQLDQMSAAIAHgCpAwoCkgBAAI4AABMWNj8CNhceAR8BFhcWFxYXFhcWFxYHBgcGJyYnJjc2NzY3Nh4BBgcGBwYHFjMWNzY3NicmJyYvAQ4BJyImNDYlFh8CNTY/ATY1Njc2NzYXFhcWHwEWFxYfAh4BFxYXHgEOAScmLwEGBx0BBh0BBhUGBwYnJicmJyYvARYXFAYiJjUuAicmNjc2FxY6GSEdAQURFAUIAQICAQMDBwgUERYHCxMUOjMsGhAbAgIXFCYJFg0DCSIQBAMFBiIrKQkGBwcUEBMGITAkCw8RAR0MHDQcAwsBAQIFBgoLCgcFAQECAQECBBAMBgYBQXMLCgYUC4xKEgIBAQEDCwwPBQYIDBIfGCUCDxYRARInBgMMCw4LBAIMAQ0UAgQSBQEFAgICAwQGDBMuMT0sPhsbEhABAQgOHhUZFhwGAxIWBxgSBQMBAQ0NDQgoJjswKgwWEgERFg89CyI9IBt8CwQJAgsICQMDBAMGAQIEAgQGCjEhFBQCqSMDFBYKAyvBNxgeOxMFAgQCAgoGBwcCBQYMEiQdj1QLEQ8LMWKVGgsTAgQLAgAAAAn/if8PA3oCrQA2AEEAUABdAGYAagB8ATcBQAAAEzQnJjc2NzYeAQYHBgcGFxYfAhYHBgcGJyYvASYnJicuBS8BJi8CJj4BFhceAR8BFgcWFzY3NicmJyYHBQYHBgcWFxYGBxY3Njc2JxQHBgcXPgE3JicmBwE2JyYnBhcWFwc2NwYlJicmJwcGFhcWFxYXNjc2JyYnNjc2FxYXFhcWFxYXNi8BJicmNzY3NhcWHwEeATMWFxY3NicmJyYvAS4BJyY3Nh8BFhc0NzY3Nh8BNjc2HgEGBwYHFhcWFxYHBgcGJyYnJicmNyYnJgcGBwYfARYXFhceAQcGBwYnJicGBwYvARYHBgcGJyYnFQYHBgcGJyYnFh8BFhcWDgEmJyYnDgEHBgcGJyY3JicmJwYHDgEuATc2NyY2NzYXNzYXFhcWBzYXFhcnJicuATc+ARcWJxYUBiImNDYyXwENFx5VCxQICQo9FhQMAQQKCAMDAg0PDgYHBwMBDicCEwYRBg8ECQYDCAkDChYTBAkgDCUFcRM4DQgPAQEYHywBTDU0NxwNCAMICQwUJSc/qgQIJAskdDoOKzIvApkBBAcQAQYFDxgCAwL+Uw4GDwwCCgYQDAoMCQQCAgYFAwIDEA8GBAcHCQwXEgIOCQcDDAUDCw0NBwgHAgIBJgcRCAoDAgkEDQgDAQEBDA4PBg0LAQQmLTQGGCoJFg8CCCwTDAkcCgwVCg4QEBIPEwYPEgcGEw8TAwMLEioVJg8JBAUHEjsvHRQBFiMzAw0QCxgQEg8RAwwKEBETBAQKBQJPKAcCEhYHGDIGNCQxMj4hLRsRITcRCQMCExYMAwcZBAcKBwgHRkI3AgEEOjwiGgENDRcHDgghFxJYCBAWEBAWAVsEA2FRayAECRUUBBdRRlUHEyUnFw0PBggKBAkLBQESQQQfCR0MGwgUDAoWFwsTBwoLH0MVPgn0HUEUFCsVGAsOL5MBEhMdGBgJEwQFBAcfMW4IBw4aDiAoAhwBAhoBXA8XICMbHRYZ1AEDAj8DDR8KBBJNHRQNDwQJFR4yB10CAQkLBQkPNQ0NGQkOGRAKBxkWDQcHBgMIBwIDHAMICAgsHioQHREFBgQOCQoIBAwUDg1VICUhBCkkCAIRFgcmKA8RMTI8Hg4FBgcIGiAeSTsHBAsMED4zPRUwHTUdEhgJEAIHRyxDLxUhGAIlIhYCAgoHDhAlExEFBwgBAg4RCgwyCRYOAgkeCypNHSYKDCc0ORknPxgTDQsMBRMLICkKFAUEAQdLHRk5ERUdAgENARAZJ2UeFBoIBR0IFhAQFhAAAAAAFAAUABQAFABEAHYA+gF8AbQCHAI8AmICiALaAwoDKgNGA1oDeAO+A9wEQgSwBQwFkgXoBjQGqAb8BxwHSAeMB7YIBAhSCOAJUgnOChYKqAssC8oMNgzQDVoN0A5gDv4P2hBYEMARFBGcEg4ShhMOE24T3hSYFOwVdhYYFlgWdhbsFy4XThd6GAwYjhjUGWQZuBpSGvIbihvaHD4cxB0oHeQedh7qH1ogBCB4IQAhViHAIiQi2CM6I9IkaCTkJQQldiW8JewmRCbSJ0onvCf0KIQopCkeKYAp6CokKsQq4iscK3IrxiwsLEosuC0cLTAtiC2kLdouVC7WL1QwJjB0MPoxhDIoMswzWDPkNGw00jVsNgY2sDdMN/g4mjlUOfY6pDtKO8Q8QjzQPXI98j4uPsI/OD+0QDpAskFOQZhCHELEQ3JELkTqRZRGWEcuR4ZH7khYSOBJTEmsSg5KfEraS05L+kyETQ5NpE5ETtBPAk+kUCxQsFFCUcZScFLOU4BUHlSUVLJUzlUIVURVilYKVuJW4ljOAAAAAQAAGAgAAQP/DAAACQv6AEQARv/xAEQASf/1AEQASv/tAEQASwALAEQATwAPAEQAUAALAEQAUv/1AEQAVP/pAEQAVf/4AEQAVwAIAEQAWf/4AEQAWv/tAEQAW//pAEQAXQAHAEQAp//tAEQAqP/1AEQAqf/4AEQAqv/1AEQAq//5AEQAsv/1AEQAs//1AEQAtP/4AEQAtf/4AEQAtv/xAEQAuf/8AEUARAALAEUARwALAEUATAAIAEUAUAAPAEUAVQAEAEUAVgAPAEUAVwALAEUAWAALAEUAXAALAEUAXQAiAEUAoAALAEUAoQAPAEUAogALAEUAowALAEUApAAPAEUApQAPAEUApgAIAEUArAAIAEUArQALAEUArgAIAEUArwAIAEUAvQAPAEYARv/1AEYASv/xAEYAUv/8AEYAVP/tAEYAVgAIAEYAWv/1AEYAW//1AEYAXQATAEYAoAAIAEYApgAEAEYAp//1AEYArAALAEYArQALAEYArgALAEYArwALAEYAuQAIAEYAugAIAEYAuwAIAEYAvAAIAEcARv/xAEcASv/tAEcAUv/4AEcAVP/tAEcAVgAEAEcAVwAPAEcAWv/xAEcAW//xAEcAXQATAEcApQAEAEcApgAEAEcAqP/8AEcAqf/8AEcAqv/8AEcAq//8AEcArAAIAEcArQAIAEcArgAIAEcArwAIAEcAsv/4AEcAs//4AEcAtP/4AEcAtf/4AEcAtv/4AEcAuQAEAEgARAATAEgARQAPAEgARwAPAEgASAALAEgASQAEAEgASv/8AEgASwATAEgATAATAEgATQAPAEgATgALAEgATwAaAEgAUAAXAEgAUQALAEgAUgAIAEgAUwAIAEgAVP/8AEgAVQAIAEgAVgATAEgAVwAXAEgAWAAPAEgAWQAIAEgAWv/8AEgAW//8AEgAXAAPAEgAXQAbAEgAoAAPAEgAoQATAEgAogAPAEgAowAPAEgApAAPAEgApQATAEgApgAPAEgAqAAIAEgAqQALAEgAqgALAEgAqwAIAEgArAATAEgArQATAEgArgAPAEgArwAXAEgAsgAEAEgAuQAPAEgAugALAEgAuwALAEgAvAAPAEgAvQAPAEgAwQDzAEkARAAEAEkASv/xAEkAVP/xAEkAVf/8AEkAVgAEAEkAVwAIAEkAWv/xAEkAW//xAEkAXQAIAEkAvv9gAEkAwQDcAEoARAAXAEoARQAPAEoARwAXAEoASgAEAEoATAATAEoATQAPAEoAUAAbAEoAVQALAEoAVgATAEoAVwATAEoAWAALAEoAWQAEAEoAW//4AEoAXAAPAEoAXQAiAEoAoAATAEoAoQATAEoAogAXAEoAowATAEoApAAXAEoApQAXAEoApgAXAEoAqAAPAEoAqQAIAEoAqgALAEoAqwALAEoArAALAEoArQAPAEoArgAPAEoArwATAEoAuQALAEoAugALAEoAuwALAEoAvAAIAEoAvQAPAEoAvv9gAEoAvwAPAEoAwQDvAEsARQATAEsARwAEAEsASv/1AEsASwAeAEsATAAXAEsATQAbAEsAVP/tAEsAVQAIAEsAVgALAEsAVwAXAEsAWAAPAEsAWv/8AEsAW//8AEsAXQAXAEsAoAAPAEsAoQAPAEsAogALAEsAowAPAEsApAAPAEsApQALAEsApgAPAEsAqwAEAEsArAAPAEsArQATAEsArgAXAEsArwAXAEsAtgAEAEsAuQALAEsAugAPAEsAuwATAEsAvAAPAEsAvQAPAEsAvv9sAEsAvwAPAEsAwQDsAEwARAAPAEwARQAPAEwASv/4AEwATAAXAEwATQAXAEwAVP/4AEwAVQAIAEwAVgAPAEwAVwAXAEwAWAAPAEwAWQAIAEwAWv/8AEwAW//8AEwAXAAPAEwAXQAXAEwAoAAPAEwAoQAPAEwAogALAEwAowAPAEwApAAPAEwApQALAEwApgAPAEwAp//8AEwAqAAEAEwAqQAIAEwArAATAEwArQAPAEwArgATAEwArwATAEwAuQAPAEwAugALAEwAuwALAEwAvAALAEwAvQAPAEwAvwAPAEwAwQDsAE0ARAAIAE0ASv/1AE0AVP/xAE0AWf/4AE0AWv/xAE0AW//xAE0AXQAPAE0AogAEAE0AwQDgAE4ARP/1AE4ARQAEAE4ARv/iAE4AR//xAE4ASP/tAE4ASf/4AE4ASv/aAE4ASwATAE4ATAAEAE4ATQALAE4ATgAEAE4ATwAPAE4AUv/pAE4AVP/WAE4AVf/1AE4AVv/8AE4AVwAIAE4AWf/4AE4AWv/pAE4AW//pAE4AXQAIAE4AoP/1AE4Aof/4AE4Aov/1AE4Ao//4AE4ApP/1AE4Apf/4AE4Apv/1AE4Ap//lAE4AqP/xAE4Aqf/xAE4Aqv/tAE4Aq//xAE4ArAAEAE4Asv/pAE4As//pAE4AtP/pAE4Atf/pAE4Atv/pAE4AuP/1AE4AwQDNAE8ARv/pAE8ASf/tAE8ASv/lAE8AVf/1AE8AWf/xAE8AWv/lAE8AW//lAE8AXP/4AE8AXQAIAE8AoP/4AE8Aof/4AE8Aov/4AE8Ao//4AE8ApP/4AE8Apf/4AE8Apv/1AE8AqP/1AE8Aqf/1AE8Aqv/xAE8Aq//xAE8Ar//8AE8Asv/xAE8As//xAE8AtP/xAE8Atf/xAE8Atv/xAE8Auf/1AE8Auv/1AE8Au//1AE8AvP/1AE8Avv9VAE8Av//1AE8AwQDZAFAARv/tAFAASv/pAFAAUAAIAFAAUv/1AFAAVP/pAFAAVf/4AFAAWP/4AFAAWf/1AFAAWv/pAFAAW//pAFAAXP/8AFAAXQALAFAAp//tAFAAqP/4AFAAqf/xAFAAqv/xAFAAq//4AFAAsv/1AFAAs//1AFAAtP/1AFAAtf/1AFAAtv/xAFAAuf/4AFAAuv/4AFAAu//4AFAAvP/4AFAAvf/8AFAAvv9ZAFAAv//8AFAAwQDcAFEARP/8AFEASv/pAFEAVP/pAFEAVf/1AFEAVv/8AFEAWv/pAFEAW//mAFEAXQAEAFEAqP/xAFEAqf/1AFEAqv/1AFEAsv/xAFEAs//xAFEAtP/xAFEAtf/1AFEAtv/tAFEAvv9RAFEAwQDRAFIARAATAFIARwAXAFIATAATAFIATQALAFIAUAAXAFIAVQALAFIAVgATAFIAVwATAFIAWAALAFIAWQAIAFIAWv/8AFIAW//8AFIAXAAPAFIAXQAeAFIAoAAXAFIAoQATAFIAogAXAFIAowAXAFIApAAXAFIApQAXAFIApgAPAFIAqAALAFIAqQAPAFIAqgAQAFIAqwALAFIArAAPAFIArQAPAFIArgAPAFIArwATAFIAsgAIAFIAuQALAFIAugAIAFIAuwALAFIAvAAPAFIAvQAPAFIAvv9kAFIAvwAPAFIAwQDsAFMARv/xAFMASP/4AFMASf/0AFMASv/tAFMAUf/1AFMAUv/1AFMAVP/tAFMAVf/4AFMAWP/8AFMAWf/1AFMAWv/tAFMAW//tAFMAXQAIAFMAqP/4AFMAqf/4AFMAqv/4AFMAq//1AFMAsv/1AFMAs//1AFMAtP/8AFMAtf/1AFMAtv/4AFMAvv9ZAFMAwQDVAFQARv/tAFQASP/xAFQASf/1AFQASv/tAFQATv/4AFQAUv/1AFQAVP/pAFQAVf/4AFQAVv/8AFQAWP/4AFQAWf/xAFQAWv/pAFQAW//pAFQAXP/8AFQAXQALAFQApv/8AFQAp//tAFQAqP/1AFQAqv/1AFQAq//1AFQAsf/4AFQAsv/1AFQAs//1AFQAtP/4AFQAtf/1AFQAtv/1AFQAuf/4AFQAuv/4AFQAu//4AFQAvP/1AFQAvf/8AFQAvv9RAFQAv//8AFQAwQDZAFUARAAIAFUARQAEAFUARv/4AFUARwAIAFUASf/9AFUASv/xAFUASwALAFUATAAIAFUATQAIAFUATgAEAFUATwATAFUAUAALAFUAUQAEAFUAUv/8AFUAVP/1AFUAVgAIAFUAVwAIAFUAWv/xAFUAW//xAFUAXQATAFUAoAAIAFUArAAIAFUArQAIAFUArgAIAFUArwAIAFUAwQDcAFYARAAEAFYARv/1AFYARwAEAFYASP/8AFYASf/4AFYASv/xAFYATAAEAFYATwALAFYAUAAIAFYAVP/xAFYAVf/8AFYAVgAEAFYAVwAEAFYAWf/4AFYAWv/tAFYAW//xAFYAXQALAFYAvv9RAFYAwQDgAFcARP/8AFcARv/pAFcAR//5AFcASP/xAFcASf/1AFcASv/iAFcASwAIAFcATwALAFcAUAAIAFcAUv/tAFcAVP/iAFcAVf/1AFcAVv/8AFcAVwAIAFcAWP/4AFcAWf/1AFcAWv/pAFcAW//pAFcAXP/8AFcAXQAHAFcApv/4AFcAqP/1AFcAqf/xAFcAqv/xAFcAq//xAFcAsv/xAFcAs//tAFcAtP/xAFcAtf/tAFcAtv/xAFcAuf/8AFcAwQDZAFgARP/4AFgARv/pAFgASP/1AFgASv/lAFgAUv/xAFgAVP/lAFgAVf/1AFgAVv/8AFgAWf/1AFgAWv/lAFgAW//lAFgAXP/4AFgAXQAIAFgApv/4AFgAqP/xAFgAqf/xAFgAqv/xAFgAq//xAFgAsv/xAFgAs//xAFgAtP/xAFgAtf/tAFgAtv/xAFgAuP/8AFgAuf/4AFgAuv/1AFgAu//4AFgAvP/4AFgAvf/4AFgAvv9RAFgAv//8AFgAwQDVAFkARAATAFkARQAPAFkARwATAFkATAAPAFkATQALAFkAUAAXAFkAVQALAFkAVgATAFkAVwATAFkAWAALAFkAXAALAFkAXQAeAFkAoAATAFkAoQATAFkAogAPAFkAowAPAFkApAAPAFkApQAPAFkApgAPAFkAqAALAFkAqQALAFkAqgALAFkAqwALAFkArAAPAFkArQAPAFkArgAXAFkArwAPAFkAsP8cAFkAuQALAFkAugALAFkAuwALAFkAvAALAFkAvQALAFkAvv9zAFkAvwAXAFkAwQDsAFoARAATAFoARwAPAFoATAAIAFoAUAATAFoAVQAIAFoAVgAbAFoAVwALAFoAW//tAFoAXQAXAFoAoAAPAFoAoQALAFoAogAPAFoAowALAFoApAAPAFoApQALAFoApgAPAFoArAAIAFoArQALAFoArgAPAFoArwALAFwARv/1AFwASf/5AFwASv/xAFwAUv/4AFwAVP/xAFwAVf/8AFwAWf/4AFwAWv/xAFwAW//tAFwAXQAPAFwAsv/8AFwAs//4AFwAtP/4AFwAtf/8AFwAtv/4AKAARv/xAKAASP/4AKAASf/1AKAASv/pAKAASwALAKAATwAPAKAAUAAIAKAAUv/4AKAAVP/pAKAAVf/4AKAAVwAIAKAAWf/4AKAAWv/tAKAAW//pAKAAXQAMAKEARv/tAKEASP/4AKEASf/1AKEASv/pAKEAUv/4AKEAVP/pAKEAW//pAKEAXQALAKIARv/tAKIASf/xAKIASv/pAKIAUv/1AKIAVP/pAKIAVf/4AKIAW//pAKIAXQAIAKMARv/tAKMASP/4AKMASf/1AKMASv/pAKMAUv/1AKMAVP/pAKMAVf/4AKMAW//pAKMAXQALAKQARv/pAKQASf/xAKQASv/pAKQAUv/xAKQAVP/pAKQAVf/4AKQAW//pAKQAXQAIAKUARv/tAKUASf/xAKUASv/pAKUAVP/pAKUAVf/4AKUAW//pAKUAXQALAKYARAALAKYARv/4AKYARwALAKYASf/8AKYASv/4AKYATAAIAKYATQAEAKYAUAAPAKYAVP/4AKYAVgAIAKYAVwALAKYAWv/1AKYAW//1AKYAXAAEAKYAXQAXAKgARAATAKgARQAPAKgARwATAKgASAAIAKgASQAIAKgASwAPAKgATAATAKgATQAPAKgATgALAKgATwAeAKgAUAAbAKgAUQALAKgAUgALAKgAUwALAKgAVP/8AKgAVQAIAKgAVgATAKgAVwAeAKgAWAAPAKgAWQAIAKgAW//8AKgAXAAPAKgAXQAbAKkARAATAKkARQAPAKkARwATAKkASAAIAKkASQAIAKkASv/8AKkASwATAKkATAAXAKkATQAXAKkATgAIAKkATwAeAKkAUAATAKkAUgAIAKkAVQAIAKkAVgAPAKkAVwAXAKkAWAALAKkAWQAIAKkAWv/8AKkAW//4AKkAXAALAKkAXQAbAKoARAATAKoARQAPAKoARwAPAKoASAALAKoASQAIAKoATAAXAKoATQATAKoAUAAeAKoAUgAIAKoAVQAIAKoAVgATAKoAVwAbAKoAWAALAKoAWQALAKoAW//4AKoAXAAPAKoAXQAbAKsARAATAKsARQATAKsATAAXAKsATQAPAKsAUAAbAKsAUQAPAKsAUgAIAKsAVQAIAKsAVgATAKsAVwAXAKsAWAAPAKsAWQAIAKsAW//4AKsAXAAPAKsAXQAbAKwARAAPAKwARQATAKwARwAPAKwASAAIAKwASQALAKwASv/4AKwASwAiAKwATAAXAKwATQAXAKwATgAIAKwATwAiAKwAUAAbAKwAUQATAKwAVP/4AKwAVQAIAKwAVgATAKwAVwAmAKwAWAATAKwAWQAIAKwAXAAXAKwAXQAaAK0ARAALAK0ARQALAK0ARv/4AK0ARwAHAK0ASv/1AK0ASwAbAK0ATAAPAK0ATQATAK0ATgALAK0ATwAbAK0AUAAXAK0AUQALAK0AUwATAK0AVP/1AK0AVQAEAK0AVgALAK0AVwATAK0AWAALAK0AWQAEAK0AWv/4AK0AW//4AK0AXAALAK0AXQATAK4ARAALAK4ARQAPAK4ARv/8AK4ARwALAK4ASAAEAK4ASQAEAK4ASv/1AK4ASwAXAK4ATAATAK4ATQATAK4ATgALAK4ATwAiAK4AUwATAK4AVP/xAK4AVQAEAK4AVgALAK4AVwAXAK4AWAALAK4AWv/4AK4AW//4AK4AXAAPAK4AXQATAK8ARAALAK8ARQALAK8ARv/8AK8ARwALAK8ASv/1AK8ASwAbAK8ATAAPAK8ATQAPAK8ATgAPAK8ATwAiAK8AUAAXAK8AUQALAK8AUwALAK8AVP/1AK8AVQAEAK8AVgALAK8AVwATAK8AWAAMAK8AWQAEAK8AWv/4AK8AW//xAK8AXAALAK8AXQATALEASv/tALEAVP/tALEAVf/4ALEAVwAIALEAWv/tALEAW//tALEAXQALALIARAAXALIARgAEALIARwAXALIATAATALIATQAPALIAUAAbALIAVQALALIAVgATALIAVwATALIAWAALALIAWv/8ALIAW//4ALIAXAAPALIAXQAeALMARAATALMARwAXALMATAATALMATQAPALMAUAAXALMAVQALALMAVgATALMAVwATALMAWAALALMAW//4ALMAXAAPALMAXQAeALQARAATALQARwATALQATAAPALQATQAPALQAUAAXALQAVQALALQAVgATALQAVwATALQAWAALALQAWv/8ALQAW//8ALQAXAAPALQAXQAeALUARAAXALUARwAXALUATAAPALUATQALALUAUAAbALUAVQALALUAVgATALUAVwATALUAWAALALUAW//4ALUAXAAPALUAXQAeALYARAATALYARwAXALYATAATALYATQAPALYAUAAXALYAVQALALYAVgATALYAVwATALYAWAALALYAW//8ALYAXAAPALYAXQAeALkARP/4ALkARv/pALkASP/1ALkASv/iALkAUv/tALkAVP/lALkAVf/1ALkAVv/8ALkAWf/xALkAWv/lALkAW//lALkAXP/8ALkAXQAIALoARP/4ALoARv/pALoASP/1ALoASv/iALoAUv/tALoAVP/eALoAVf/1ALoAVv/8ALoAWf/xALoAWv/lALoAW//pALoAXP/8ALoAXQAIALsARP/4ALsARv/lALsASP/xALsASv/lALsAUv/tALsAVP/iALsAVf/1ALsAVv/8ALsAWf/xALsAWv/lALsAW//pALsAXP/4ALsAXQAIALwARP/4ALwARv/pALwASP/xALwASv/iALwAUv/xALwAVP/lALwAVf/1ALwAVv/8ALwAWf/xALwAWv/lALwAW//pALwAXP/4ALwAXQAIAAAADgCuAAEAAAAAAAAAIQAAAAEAAAAAAAEAEgAhAAEAAAAAAAIABwAzAAEAAAAAAAMAEwA6AAEAAAAAAAQAEgBNAAEAAAAAAAUAEABfAAEAAAAAAAYADwBvAAMAAQQJAAAAQgB+AAMAAQQJAAEAJADAAAMAAQQJAAIADgDkAAMAAQQJAAMAJgDyAAMAAQQJAAQAJAEYAAMAAQQJAAUAIAE8AAMAAQQJAAYAHgFcVmFuZXNzYSBCYXlzIEAgQnlUaGVCdXR0ZXJmbHkuY29tQWx3YXlzIEluIE15IEhlYXJ0UmVndWxhclZhbmVzc2EgQmF5cyAtIEFJTUhBbHdheXMgSW4gTXkgSGVhcnRWZXJzaW9uIDAwMS4wMDAgQWx3YXlzSW5NeUhlYXJ0AFYAYQBuAGUAcwBzAGEAIABCAGEAeQBzACAAQAAgAEIAeQBUAGgAZQBCAHUAdAB0AGUAcgBmAGwAeQAuAGMAbwBtAEEAbAB3AGEAeQBzACAASQBuACAATQB5ACAASABlAGEAcgB0AFIAZQBnAHUAbABhAHIAVgBhAG4AZQBzAHMAYQAgAEIAYQB5AHMAIAAtACAAQQBJAE0ASABBAGwAdwBhAHkAcwAgAEkAbgAgAE0AeQAgAEgAZQBhAHIAdABWAGUAcgBzAGkAbwBuACAAMAAwADEALgAwADAAMAAgAEEAbAB3AGEAeQBzAEkAbgBNAHkASABlAGEAcgB0AAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAAywAAAQIAAgADAAQABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBgAGEAowCEAIUAvQCWAOgAhgCOAIsAnQCpAKQAigDaAIMAkwEDAQQAjQEFAIgAwwDeAQYAngCqAPUA9AD2AKIArQDJAMcArgBiAGMAkABkAMsAZQDIAMoAzwDMAM0AzgDpAGYA0wDQANEArwBnAPAAkQDWANQA1QBoAOsA7QCJAGoAaQBrAG0AbABuAKAAbwBxAHAAcgBzAHUAdAB2AHcA6gB4AHoAeQB7AH0AfAC4AKEAfwB+AIAAgQDsAO4AugCwALEAtgC3ALQAtQDGAQcAjAEIAQkETlVMTAd1bmkwMEIyB3VuaTAwQjMHdW5pMDBCNQd1bmkwMEI5BEV1cm8HdW5pMzAwMAd1bmlGOEZGAAAAAAAB//8AAgABAAAADgAAABgAIAAAAAIAAQABAMoAAQAEAAAAAgAAAAEAAAABAAAAAQAAAAoAHgAsAAFsYXRuAAgABAAAAAD//wABAAAAAWtlcm4ACAAAAAEAAAABAAQAAgAAAAEACAABEMoABAAAADEAbADSASwBegHgAp4CzANmA/QEhgSsBVIF2AZSBpwHNgeYCCIIjAjaCVwJ3gpwCsILAAs+C2ALgguoC8oL6AwmDIQM3g0kDWINuA4WDnAOzg7sDyYPWA+OD8AP8hAoEF4QlAAZAEb/8QBJ//UASv/tAEsACwBPAA8AUAALAFL/9QBU/+kAVf/4AFcACABZ//gAWv/tAFv/6QBdAAcAp//tAKj/9QCp//gAqv/1AKv/+QCy//UAs//1ALT/+AC1//gAtv/xALn//AAWAEQACwBHAAsATAAIAFAADwBVAAQAVgAPAFcACwBYAAsAXAALAF0AIgCgAAsAoQAPAKIACwCjAAsApAAPAKUADwCmAAgArAAIAK0ACwCuAAgArwAIAL0ADwATAEb/9QBK//EAUv/8AFT/7QBWAAgAWv/1AFv/9QBdABMAoAAIAKYABACn//UArAALAK0ACwCuAAsArwALALkACAC6AAgAuwAIALwACAAZAEb/8QBK/+0AUv/4AFT/7QBWAAQAVwAPAFr/8QBb//EAXQATAKUABACmAAQAqP/8AKn//ACq//wAq//8AKwACACtAAgArgAIAK8ACACy//gAs//4ALT/+AC1//gAtv/4ALkABAAvAEQAEwBFAA8ARwAPAEgACwBJAAQASv/8AEsAEwBMABMATQAPAE4ACwBPABoAUAAXAFEACwBSAAgAUwAIAFT//ABVAAgAVgATAFcAFwBYAA8AWQAIAFr//ABb//wAXAAPAF0AGwCgAA8AoQATAKIADwCjAA8ApAAPAKUAEwCmAA8AqAAIAKkACwCqAAsAqwAIAKwAEwCtABMArgAPAK8AFwCyAAQAuQAPALoACwC7AAsAvAAPAL0ADwDBAPMACwBEAAQASv/xAFT/8QBV//wAVgAEAFcACABa//EAW//xAF0ACAC+/2AAwQDcACYARAAXAEUADwBHABcASgAEAEwAEwBNAA8AUAAbAFUACwBWABMAVwATAFgACwBZAAQAW//4AFwADwBdACIAoAATAKEAEwCiABcAowATAKQAFwClABcApgAXAKgADwCpAAgAqgALAKsACwCsAAsArQAPAK4ADwCvABMAuQALALoACwC7AAsAvAAIAL0ADwC+/2AAvwAPAMEA7wAjAEUAEwBHAAQASv/1AEsAHgBMABcATQAbAFT/7QBVAAgAVgALAFcAFwBYAA8AWv/8AFv//ABdABcAoAAPAKEADwCiAAsAowAPAKQADwClAAsApgAPAKsABACsAA8ArQATAK4AFwCvABcAtgAEALkACwC6AA8AuwATALwADwC9AA8Avv9sAL8ADwDBAOwAJABEAA8ARQAPAEr/+ABMABcATQAXAFT/+ABVAAgAVgAPAFcAFwBYAA8AWQAIAFr//ABb//wAXAAPAF0AFwCgAA8AoQAPAKIACwCjAA8ApAAPAKUACwCmAA8Ap//8AKgABACpAAgArAATAK0ADwCuABMArwATALkADwC6AAsAuwALALwACwC9AA8AvwAPAMEA7AAJAEQACABK//UAVP/xAFn/+ABa//EAW//xAF0ADwCiAAQAwQDgACkARP/1AEUABABG/+IAR//xAEj/7QBJ//gASv/aAEsAEwBMAAQATQALAE4ABABPAA8AUv/pAFT/1gBV//UAVv/8AFcACABZ//gAWv/pAFv/6QBdAAgAoP/1AKH/+ACi//UAo//4AKT/9QCl//gApv/1AKf/5QCo//EAqf/xAKr/7QCr//EArAAEALL/6QCz/+kAtP/pALX/6QC2/+kAuP/1AMEAzQAhAEb/6QBJ/+0ASv/lAFX/9QBZ//EAWv/lAFv/5QBc//gAXQAIAKD/+ACh//gAov/4AKP/+ACk//gApf/4AKb/9QCo//UAqf/1AKr/8QCr//EAr//8ALL/8QCz//EAtP/xALX/8QC2//EAuf/1ALr/9QC7//UAvP/1AL7/VQC///UAwQDZAB4ARv/tAEr/6QBQAAgAUv/1AFT/6QBV//gAWP/4AFn/9QBa/+kAW//pAFz//ABdAAsAp//tAKj/+ACp//EAqv/xAKv/+ACy//UAs//1ALT/9QC1//UAtv/xALn/+AC6//gAu//4ALz/+AC9//wAvv9ZAL///ADBANwAEgBE//wASv/pAFT/6QBV//UAVv/8AFr/6QBb/+YAXQAEAKj/8QCp//UAqv/1ALL/8QCz//EAtP/xALX/9QC2/+0Avv9RAMEA0QAmAEQAEwBHABcATAATAE0ACwBQABcAVQALAFYAEwBXABMAWAALAFkACABa//wAW//8AFwADwBdAB4AoAAXAKEAEwCiABcAowAXAKQAFwClABcApgAPAKgACwCpAA8AqgAQAKsACwCsAA8ArQAPAK4ADwCvABMAsgAIALkACwC6AAgAuwALALwADwC9AA8Avv9kAL8ADwDBAOwAGABG//EASP/4AEn/9ABK/+0AUf/1AFL/9QBU/+0AVf/4AFj//ABZ//UAWv/tAFv/7QBdAAgAqP/4AKn/+ACq//gAq//1ALL/9QCz//UAtP/8ALX/9QC2//gAvv9ZAMEA1QAiAEb/7QBI//EASf/1AEr/7QBO//gAUv/1AFT/6QBV//gAVv/8AFj/+ABZ//EAWv/pAFv/6QBc//wAXQALAKb//ACn/+0AqP/1AKr/9QCr//UAsf/4ALL/9QCz//UAtP/4ALX/9QC2//UAuf/4ALr/+AC7//gAvP/1AL3//AC+/1EAv//8AMEA2QAaAEQACABFAAQARv/4AEcACABJ//0ASv/xAEsACwBMAAgATQAIAE4ABABPABMAUAALAFEABABS//wAVP/1AFYACABXAAgAWv/xAFv/8QBdABMAoAAIAKwACACtAAgArgAIAK8ACADBANwAEwBEAAQARv/1AEcABABI//wASf/4AEr/8QBMAAQATwALAFAACABU//EAVf/8AFYABABXAAQAWf/4AFr/7QBb//EAXQALAL7/UQDBAOAAIABE//wARv/pAEf/+QBI//EASf/1AEr/4gBLAAgATwALAFAACABS/+0AVP/iAFX/9QBW//wAVwAIAFj/+ABZ//UAWv/pAFv/6QBc//wAXQAHAKb/+ACo//UAqf/xAKr/8QCr//EAsv/xALP/7QC0//EAtf/tALb/8QC5//wAwQDZACAARP/4AEb/6QBI//UASv/lAFL/8QBU/+UAVf/1AFb//ABZ//UAWv/lAFv/5QBc//gAXQAIAKb/+ACo//EAqf/xAKr/8QCr//EAsv/xALP/8QC0//EAtf/tALb/8QC4//wAuf/4ALr/9QC7//gAvP/4AL3/+AC+/1EAv//8AMEA1QAkAEQAEwBFAA8ARwATAEwADwBNAAsAUAAXAFUACwBWABMAVwATAFgACwBcAAsAXQAeAKAAEwChABMAogAPAKMADwCkAA8ApQAPAKYADwCoAAsAqQALAKoACwCrAAsArAAPAK0ADwCuABcArwAPALD/HAC5AAsAugALALsACwC8AAsAvQALAL7/cwC/ABcAwQDsABQARAATAEcADwBMAAgAUAATAFUACABWABsAVwALAFv/7QBdABcAoAAPAKEACwCiAA8AowALAKQADwClAAsApgAPAKwACACtAAsArgAPAK8ACwAPAEb/9QBJ//kASv/xAFL/+ABU//EAVf/8AFn/+ABa//EAW//tAF0ADwCy//wAs//4ALT/+AC1//wAtv/4AA8ARv/xAEj/+ABJ//UASv/pAEsACwBPAA8AUAAIAFL/+ABU/+kAVf/4AFcACABZ//gAWv/tAFv/6QBdAAwACABG/+0ASP/4AEn/9QBK/+kAUv/4AFT/6QBb/+kAXQALAAgARv/tAEn/8QBK/+kAUv/1AFT/6QBV//gAW//pAF0ACAAJAEb/7QBI//gASf/1AEr/6QBS//UAVP/pAFX/+ABb/+kAXQALAAgARv/pAEn/8QBK/+kAUv/xAFT/6QBV//gAW//pAF0ACAAHAEb/7QBJ//EASv/pAFT/6QBV//gAW//pAF0ACwAPAEQACwBG//gARwALAEn//ABK//gATAAIAE0ABABQAA8AVP/4AFYACABXAAsAWv/1AFv/9QBcAAQAXQAXABcARAATAEUADwBHABMASAAIAEkACABLAA8ATAATAE0ADwBOAAsATwAeAFAAGwBRAAsAUgALAFMACwBU//wAVQAIAFYAEwBXAB4AWAAPAFkACABb//wAXAAPAF0AGwAWAEQAEwBFAA8ARwATAEgACABJAAgASv/8AEsAEwBMABcATQAXAE4ACABPAB4AUAATAFIACABVAAgAVgAPAFcAFwBYAAsAWQAIAFr//ABb//gAXAALAF0AGwARAEQAEwBFAA8ARwAPAEgACwBJAAgATAAXAE0AEwBQAB4AUgAIAFUACABWABMAVwAbAFgACwBZAAsAW//4AFwADwBdABsADwBEABMARQATAEwAFwBNAA8AUAAbAFEADwBSAAgAVQAIAFYAEwBXABcAWAAPAFkACABb//gAXAAPAF0AGwAVAEQADwBFABMARwAPAEgACABJAAsASv/4AEsAIgBMABcATQAXAE4ACABPACIAUAAbAFEAEwBU//gAVQAIAFYAEwBXACYAWAATAFkACABcABcAXQAaABcARAALAEUACwBG//gARwAHAEr/9QBLABsATAAPAE0AEwBOAAsATwAbAFAAFwBRAAsAUwATAFT/9QBVAAQAVgALAFcAEwBYAAsAWQAEAFr/+ABb//gAXAALAF0AEwAWAEQACwBFAA8ARv/8AEcACwBIAAQASQAEAEr/9QBLABcATAATAE0AEwBOAAsATwAiAFMAEwBU//EAVQAEAFYACwBXABcAWAALAFr/+ABb//gAXAAPAF0AEwAXAEQACwBFAAsARv/8AEcACwBK//UASwAbAEwADwBNAA8ATgAPAE8AIgBQABcAUQALAFMACwBU//UAVQAEAFYACwBXABMAWAAMAFkABABa//gAW//xAFwACwBdABMABwBK/+0AVP/tAFX/+ABXAAgAWv/tAFv/7QBdAAsADgBEABcARgAEAEcAFwBMABMATQAPAFAAGwBVAAsAVgATAFcAEwBYAAsAWv/8AFv/+ABcAA8AXQAeAAwARAATAEcAFwBMABMATQAPAFAAFwBVAAsAVgATAFcAEwBYAAsAW//4AFwADwBdAB4ADQBEABMARwATAEwADwBNAA8AUAAXAFUACwBWABMAVwATAFgACwBa//wAW//8AFwADwBdAB4ADABEABcARwAXAEwADwBNAAsAUAAbAFUACwBWABMAVwATAFgACwBb//gAXAAPAF0AHgAMAEQAEwBHABcATAATAE0ADwBQABcAVQALAFYAEwBXABMAWAALAFv//ABcAA8AXQAeAA0ARP/4AEb/6QBI//UASv/iAFL/7QBU/+UAVf/1AFb//ABZ//EAWv/lAFv/5QBc//wAXQAIAA0ARP/4AEb/6QBI//UASv/iAFL/7QBU/94AVf/1AFb//ABZ//EAWv/lAFv/6QBc//wAXQAIAA0ARP/4AEb/5QBI//EASv/lAFL/7QBU/+IAVf/1AFb//ABZ//EAWv/lAFv/6QBc//gAXQAIAA0ARP/4AEb/6QBI//EASv/iAFL/8QBU/+UAVf/1AFb//ABZ//EAWv/lAFv/6QBc//gAXQAIAAIABgBEAFoAAABcAFwAFwCgAKYAGACoAK8AHwCxALYAJwC5ALwALQAA"}]);
src/routes.js
gcwelborn/canary-feelings
import React from 'react'; import { Router, Route, hashHistory } from 'react-router' import HomePage from './pages/HomePage'; import NoMatch from './pages/404'; import Attributions from './pages/Attributions'; import App from './components/App'; const onChange = obj => window.ga && window.ga('send', 'pageview', obj.url); const Routes = () => ( <Router history={hashHistory} onChange={onChange}> <Route path="/" component={HomePage} /> <Route path="/user/:twitterHandle" component={App} /> <Route path="/attributions" component={Attributions} /> <Route path="*" component={NoMatch} /> </Router> ); export default Routes;
docs/app/Examples/modules/Dropdown/Content/DropdownExampleLabel.js
ben174/Semantic-UI-React
import React from 'react' import { Dropdown } from 'semantic-ui-react' const DropdownExampleLabel = () => ( <Dropdown text='Filter' floating labeled button className='icon'> {/* <i class="filter icon"></i> */} <Dropdown.Menu> <Dropdown.Header icon='tags' content='Filter by tag' /> <Dropdown.Divider /> <Dropdown.Item label={{ color: 'red', empty: true, circular: true }} text='Important' /> <Dropdown.Item label={{ color: 'blue', empty: true, circular: true }} text='Announcement' /> <Dropdown.Item label={{ color: 'black', empty: true, circular: true }} text='Discussion' /> </Dropdown.Menu> </Dropdown> ) export default DropdownExampleLabel
packages/television/src/components/Analytics.js
accosine/poltergeist
import React from 'react'; export default ({ accountId }) => ( <amp-analytics type="googleanalytics" id="analytics1"> {/* set innerHTML to stringified JSON for minification */} <script type="application/json" dangerouslySetInnerHTML={{ __html: JSON.stringify({ vars: { account: `${accountId}`, }, triggers: { trackPageview: { on: 'visible', request: 'pageview', }, }, }), }} /> </amp-analytics> );
ajax/libs/primereact/7.0.0/galleria/galleria.js
cdnjs/cdnjs
this.primereact = this.primereact || {}; this.primereact.galleria = (function (exports, React, utils, ripple, csstransition, portal, PrimeReact) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var React__default = /*#__PURE__*/_interopDefaultLegacy(React); var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var GalleriaItemComponent = /*#__PURE__*/function (_Component) { _inherits(GalleriaItemComponent, _Component); var _super = _createSuper$2(GalleriaItemComponent); function GalleriaItemComponent(props) { var _this; _classCallCheck(this, GalleriaItemComponent); _this = _super.call(this, props); _this.navForward = _this.navForward.bind(_assertThisInitialized(_this)); _this.navBackward = _this.navBackward.bind(_assertThisInitialized(_this)); _this.next = _this.next.bind(_assertThisInitialized(_this)); _this.prev = _this.prev.bind(_assertThisInitialized(_this)); return _this; } _createClass(GalleriaItemComponent, [{ key: "step", value: function step(index) { if (this.itemsContainer) { this.itemsContainer.style.transform = this.isVertical() ? "translate3d(0, ".concat(index * 100, "%, 0)") : "translate3d(".concat(index * 100, "%, 0, 0)"); this.itemsContainer.style.transition = 'transform 500ms ease 0s'; } } }, { key: "next", value: function next() { var nextItemIndex = this.props.activeItemIndex + 1; this.props.onActiveItemChange({ index: this.props.circular && this.props.value.length - 1 === this.props.activeItemIndex ? 0 : nextItemIndex }); } }, { key: "prev", value: function prev() { var prevItemIndex = this.props.activeItemIndex !== 0 ? this.props.activeItemIndex - 1 : 0; this.props.onActiveItemChange({ index: this.props.circular && this.props.activeItemIndex === 0 ? this.props.value.length - 1 : prevItemIndex }); } }, { key: "stopSlideShow", value: function stopSlideShow() { if (this.props.slideShowActive && this.props.stopSlideShow) { this.props.stopSlideShow(); } } }, { key: "navBackward", value: function navBackward(e) { this.stopSlideShow(); this.prev(); if (e && e.cancelable) { e.preventDefault(); } } }, { key: "navForward", value: function navForward(e) { this.stopSlideShow(); this.next(); if (e && e.cancelable) { e.preventDefault(); } } }, { key: "onIndicatorClick", value: function onIndicatorClick(index) { this.stopSlideShow(); this.props.onActiveItemChange({ index: index }); } }, { key: "onIndicatorMouseEnter", value: function onIndicatorMouseEnter(index) { if (this.props.changeItemOnIndicatorHover) { this.stopSlideShow(); this.props.onActiveItemChange({ index: index }); } } }, { key: "onIndicatorKeyDown", value: function onIndicatorKeyDown(event, index) { if (event.which === 13) { this.stopSlideShow(); this.props.onActiveItemChange({ index: index }); } } }, { key: "componentDidMount", value: function componentDidMount() { if (this.props.autoPlay) { this.props.startSlideShow(); } } }, { key: "renderBackwardNavigator", value: function renderBackwardNavigator() { if (this.props.showItemNavigators) { var isDisabled = !this.props.circular && this.props.activeItemIndex === 0; var buttonClassName = utils.classNames('p-galleria-item-prev p-galleria-item-nav p-link', { 'p-disabled': isDisabled }); return /*#__PURE__*/React__default["default"].createElement("button", { type: "button", className: buttonClassName, onClick: this.navBackward, disabled: isDisabled }, /*#__PURE__*/React__default["default"].createElement("span", { className: "p-galleria-item-prev-icon pi pi-chevron-left" }), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null)); } return null; } }, { key: "renderForwardNavigator", value: function renderForwardNavigator() { if (this.props.showItemNavigators) { var isDisabled = !this.props.circular && this.props.activeItemIndex === this.props.value.length - 1; var buttonClassName = utils.classNames('p-galleria-item-next p-galleria-item-nav p-link', { 'p-disabled': isDisabled }); return /*#__PURE__*/React__default["default"].createElement("button", { type: "button", className: buttonClassName, onClick: this.navForward, disabled: isDisabled }, /*#__PURE__*/React__default["default"].createElement("span", { className: "p-galleria-item-next-icon pi pi-chevron-right" }), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null)); } return null; } }, { key: "renderCaption", value: function renderCaption() { if (this.props.caption) { var content = this.props.caption(this.props.value[this.props.activeItemIndex]); return /*#__PURE__*/React__default["default"].createElement("div", { className: "p-galleria-caption" }, content); } return null; } }, { key: "renderIndicator", value: function renderIndicator(index) { var _this2 = this; var indicator = this.props.indicator && this.props.indicator(index); var isActive = this.props.activeItemIndex === index; var indicatorItemClassName = utils.classNames('p-galleria-indicator', { 'p-highlight': isActive }); if (!indicator) { indicator = /*#__PURE__*/React__default["default"].createElement("button", { type: "button", tabIndex: -1, className: "p-link" }, /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null)); } return /*#__PURE__*/React__default["default"].createElement("li", { className: indicatorItemClassName, key: 'p-galleria-indicator-' + index, tabIndex: 0, onClick: function onClick() { return _this2.onIndicatorClick(index); }, onMouseEnter: function onMouseEnter() { return _this2.onIndicatorMouseEnter(index); }, onKeyDown: function onKeyDown(e) { return _this2.onIndicatorKeyDown(e, index); } }, indicator); } }, { key: "renderIndicators", value: function renderIndicators() { if (this.props.showIndicators) { var indicatorsContentClassName = utils.classNames('p-galleria-indicators p-reset', this.props.indicatorsContentClassName); var indicators = []; for (var i = 0; i < this.props.value.length; i++) { indicators.push(this.renderIndicator(i)); } return /*#__PURE__*/React__default["default"].createElement("ul", { className: indicatorsContentClassName }, indicators); } return null; } }, { key: "render", value: function render() { var _this3 = this; var content = this.props.itemTemplate && this.props.itemTemplate(this.props.value[this.props.activeItemIndex]); var backwardNavigator = this.renderBackwardNavigator(); var forwardNavigator = this.renderForwardNavigator(); var caption = this.renderCaption(); var indicators = this.renderIndicators(); return /*#__PURE__*/React__default["default"].createElement("div", { ref: function ref(el) { return _this3.props.forwardRef(el); }, className: "p-galleria-item-wrapper" }, /*#__PURE__*/React__default["default"].createElement("div", { className: "p-galleria-item-container" }, backwardNavigator, /*#__PURE__*/React__default["default"].createElement("div", { className: "p-galleria-item" }, content), forwardNavigator, caption), indicators); } }]); return GalleriaItemComponent; }(React.Component); var GalleriaItem = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) { return /*#__PURE__*/React__default["default"].createElement(GalleriaItemComponent, _extends({ forwardRef: ref }, props)); }); function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var GalleriaThumbnailItem = /*#__PURE__*/function (_Component) { _inherits(GalleriaThumbnailItem, _Component); var _super = _createSuper$1(GalleriaThumbnailItem); function GalleriaThumbnailItem(props) { var _this; _classCallCheck(this, GalleriaThumbnailItem); _this = _super.call(this, props); _this.onItemClick = _this.onItemClick.bind(_assertThisInitialized(_this)); _this.onItemKeyDown = _this.onItemKeyDown.bind(_assertThisInitialized(_this)); return _this; } _createClass(GalleriaThumbnailItem, [{ key: "onItemClick", value: function onItemClick(event) { this.props.onItemClick({ originalEvent: event, index: this.props.index }); } }, { key: "onItemKeyDown", value: function onItemKeyDown(event) { if (event.which === 13) { this.props.onItemClick({ originalEvent: event, index: this.props.index }); } } }, { key: "render", value: function render() { var content = this.props.template && this.props.template(this.props.item); var itemClassName = utils.classNames(this.props.className, 'p-galleria-thumbnail-item', { 'p-galleria-thumbnail-item-current': this.props.current, 'p-galleria-thumbnail-item-active': this.props.active, 'p-galleria-thumbnail-item-start': this.props.start, 'p-galleria-thumbnail-item-end': this.props.end }); return /*#__PURE__*/React__default["default"].createElement("div", { className: itemClassName }, /*#__PURE__*/React__default["default"].createElement("div", { className: "p-galleria-thumbnail-item-content", tabIndex: this.props.active ? 0 : null, onClick: this.onItemClick, onKeyDown: this.onItemKeyDown }, content)); } }]); return GalleriaThumbnailItem; }(React.Component); _defineProperty(GalleriaThumbnailItem, "defaultProps", { index: null, template: null, item: null, current: false, active: false, start: false, end: false, className: null, onItemClick: null }); var GalleriaThumbnails = /*#__PURE__*/function (_Component2) { _inherits(GalleriaThumbnails, _Component2); var _super2 = _createSuper$1(GalleriaThumbnails); function GalleriaThumbnails(props) { var _this2; _classCallCheck(this, GalleriaThumbnails); _this2 = _super2.call(this, props); _this2.state = { numVisible: props.numVisible, totalShiftedItems: 0, page: 0 }; _this2.navForward = _this2.navForward.bind(_assertThisInitialized(_this2)); _this2.navBackward = _this2.navBackward.bind(_assertThisInitialized(_this2)); _this2.onTransitionEnd = _this2.onTransitionEnd.bind(_assertThisInitialized(_this2)); _this2.onTouchStart = _this2.onTouchStart.bind(_assertThisInitialized(_this2)); _this2.onTouchMove = _this2.onTouchMove.bind(_assertThisInitialized(_this2)); _this2.onTouchEnd = _this2.onTouchEnd.bind(_assertThisInitialized(_this2)); _this2.onItemClick = _this2.onItemClick.bind(_assertThisInitialized(_this2)); _this2.attributeSelector = utils.UniqueComponentId(); return _this2; } _createClass(GalleriaThumbnails, [{ key: "step", value: function step(dir) { var totalShiftedItems = this.state.totalShiftedItems + dir; if (dir < 0 && -1 * totalShiftedItems + this.state.numVisible > this.props.value.length - 1) { totalShiftedItems = this.state.numVisible - this.props.value.length; } else if (dir > 0 && totalShiftedItems > 0) { totalShiftedItems = 0; } if (this.props.circular) { if (dir < 0 && this.props.value.length - 1 === this.props.activeItemIndex) { totalShiftedItems = 0; } else if (dir > 0 && this.props.activeItemIndex === 0) { totalShiftedItems = this.state.numVisible - this.props.value.length; } } if (this.itemsContainer) { utils.DomHandler.removeClass(this.itemsContainer, 'p-items-hidden'); this.itemsContainer.style.transform = this.props.isVertical ? "translate3d(0, ".concat(totalShiftedItems * (100 / this.state.numVisible), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / this.state.numVisible), "%, 0, 0)"); this.itemsContainer.style.transition = 'transform 500ms ease 0s'; } this.setState({ totalShiftedItems: totalShiftedItems }); } }, { key: "stopSlideShow", value: function stopSlideShow() { if (this.props.slideShowActive && this.props.stopSlideShow) { this.props.stopSlideShow(); } } }, { key: "getMedianItemIndex", value: function getMedianItemIndex() { var index = Math.floor(this.state.numVisible / 2); return this.state.numVisible % 2 ? index : index - 1; } }, { key: "navBackward", value: function navBackward(e) { this.stopSlideShow(); var prevItemIndex = this.props.activeItemIndex !== 0 ? this.props.activeItemIndex - 1 : 0; var diff = prevItemIndex + this.state.totalShiftedItems; if (this.state.numVisible - diff - 1 > this.getMedianItemIndex() && (-1 * this.state.totalShiftedItems !== 0 || this.props.circular)) { this.step(1); } this.props.onActiveItemChange({ index: this.props.circular && this.props.activeItemIndex === 0 ? this.props.value.length - 1 : prevItemIndex }); if (e.cancelable) { e.preventDefault(); } } }, { key: "navForward", value: function navForward(e) { this.stopSlideShow(); var nextItemIndex = this.props.activeItemIndex + 1; if (nextItemIndex + this.state.totalShiftedItems > this.getMedianItemIndex() && (-1 * this.state.totalShiftedItems < this.getTotalPageNumber() - 1 || this.props.circular)) { this.step(-1); } this.props.onActiveItemChange({ index: this.props.circular && this.props.value.length - 1 === this.props.activeItemIndex ? 0 : nextItemIndex }); if (e.cancelable) { e.preventDefault(); } } }, { key: "onItemClick", value: function onItemClick(event) { this.stopSlideShow(); var selectedItemIndex = event.index; if (selectedItemIndex !== this.props.activeItemIndex) { var diff = selectedItemIndex + this.state.totalShiftedItems; var dir = 0; if (selectedItemIndex < this.props.activeItemIndex) { dir = this.state.numVisible - diff - 1 - this.getMedianItemIndex(); if (dir > 0 && -1 * this.state.totalShiftedItems !== 0) { this.step(dir); } } else { dir = this.getMedianItemIndex() - diff; if (dir < 0 && -1 * this.state.totalShiftedItems < this.getTotalPageNumber() - 1) { this.step(dir); } } this.props.onActiveItemChange({ index: selectedItemIndex }); } } }, { key: "onTransitionEnd", value: function onTransitionEnd(e) { if (this.itemsContainer && e.propertyName === 'transform') { utils.DomHandler.addClass(this.itemsContainer, 'p-items-hidden'); this.itemsContainer.style.transition = ''; } } }, { key: "onTouchStart", value: function onTouchStart(e) { var touchobj = e.changedTouches[0]; this.startPos = { x: touchobj.pageX, y: touchobj.pageY }; } }, { key: "onTouchMove", value: function onTouchMove(e) { if (e.cancelable) { e.preventDefault(); } } }, { key: "onTouchEnd", value: function onTouchEnd(e) { var touchobj = e.changedTouches[0]; if (this.props.isVertical) { this.changePageOnTouch(e, touchobj.pageY - this.startPos.y); } else { this.changePageOnTouch(e, touchobj.pageX - this.startPos.x); } } }, { key: "changePageOnTouch", value: function changePageOnTouch(e, diff) { if (diff < 0) { // left this.navForward(e); } else { // right this.navBackward(e); } } }, { key: "getTotalPageNumber", value: function getTotalPageNumber() { return this.props.value.length > this.state.numVisible ? this.props.value.length - this.state.numVisible + 1 : 0; } }, { key: "createStyle", value: function createStyle() { if (!this.thumbnailsStyle) { this.thumbnailsStyle = document.createElement('style'); document.body.appendChild(this.thumbnailsStyle); } var innerHTML = "\n .p-galleria-thumbnail-items[".concat(this.attributeSelector, "] .p-galleria-thumbnail-item {\n flex: 1 0 ").concat(100 / this.state.numVisible, "%\n }\n "); if (this.props.responsiveOptions) { this.responsiveOptions = _toConsumableArray(this.props.responsiveOptions); this.responsiveOptions.sort(function (data1, data2) { var value1 = data1.breakpoint; var value2 = data2.breakpoint; var result = null; if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, { numeric: true });else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0; return -1 * result; }); for (var i = 0; i < this.responsiveOptions.length; i++) { var res = this.responsiveOptions[i]; innerHTML += "\n @media screen and (max-width: ".concat(res.breakpoint, ") {\n .p-galleria-thumbnail-items[").concat(this.attributeSelector, "] .p-galleria-thumbnail-item {\n flex: 1 0 ").concat(100 / res.numVisible, "%\n }\n }\n "); } } this.thumbnailsStyle.innerHTML = innerHTML; } }, { key: "calculatePosition", value: function calculatePosition() { if (this.itemsContainer && this.responsiveOptions) { var windowWidth = window.innerWidth; var matchedResponsiveData = { numVisible: this.props.numVisible }; for (var i = 0; i < this.responsiveOptions.length; i++) { var res = this.responsiveOptions[i]; if (parseInt(res.breakpoint, 10) >= windowWidth) { matchedResponsiveData = res; } } if (this.state.numVisible !== matchedResponsiveData.numVisible) { this.setState({ numVisible: matchedResponsiveData.numVisible }); } } } }, { key: "bindDocumentListeners", value: function bindDocumentListeners() { var _this3 = this; if (!this.documentResizeListener) { this.documentResizeListener = function () { _this3.calculatePosition(); }; window.addEventListener('resize', this.documentResizeListener); } } }, { key: "unbindDocumentListeners", value: function unbindDocumentListeners() { if (this.documentResizeListener) { window.removeEventListener('resize', this.documentResizeListener); this.documentResizeListener = null; } } }, { key: "componentDidMount", value: function componentDidMount() { if (this.itemsContainer) { this.itemsContainer.setAttribute(this.attributeSelector, ''); } this.createStyle(); this.calculatePosition(); if (this.props.responsiveOptions) { this.bindDocumentListeners(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { var totalShiftedItems = this.state.totalShiftedItems; if (prevState.numVisible !== this.state.numVisible || prevProps.activeItemIndex !== this.props.activeItemIndex) { if (this.props.activeItemIndex <= this.getMedianItemIndex()) { totalShiftedItems = 0; } else if (this.props.value.length - this.state.numVisible + this.getMedianItemIndex() < this.props.activeItemIndex) { totalShiftedItems = this.state.numVisible - this.props.value.length; } else if (this.props.value.length - this.state.numVisible < this.props.activeItemIndex && this.state.numVisible % 2 === 0) { totalShiftedItems = this.props.activeItemIndex * -1 + this.getMedianItemIndex() + 1; } else { totalShiftedItems = this.props.activeItemIndex * -1 + this.getMedianItemIndex(); } if (totalShiftedItems !== this.state.totalShiftedItems) { this.setState({ totalShiftedItems: totalShiftedItems }); } this.itemsContainer.style.transform = this.props.isVertical ? "translate3d(0, ".concat(totalShiftedItems * (100 / this.state.numVisible), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / this.state.numVisible), "%, 0, 0)"); if (prevProps.activeItemIndex !== this.props.activeItemIndex) { utils.DomHandler.removeClass(this.itemsContainer, 'p-items-hidden'); this.itemsContainer.style.transition = 'transform 500ms ease 0s'; } } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.props.responsiveOptions) { this.unbindDocumentListeners(); } } }, { key: "renderItems", value: function renderItems() { var _this4 = this; return this.props.value.map(function (item, index) { var firstIndex = _this4.state.totalShiftedItems * -1, lastIndex = firstIndex + _this4.state.numVisible - 1, isActive = firstIndex <= index && lastIndex >= index, start = firstIndex === index, end = lastIndex === index, current = _this4.props.activeItemIndex === index; return /*#__PURE__*/React__default["default"].createElement(GalleriaThumbnailItem, { key: index, index: index, template: _this4.props.itemTemplate, item: item, active: isActive, start: start, end: end, onItemClick: _this4.onItemClick, current: current }); }); } }, { key: "renderBackwardNavigator", value: function renderBackwardNavigator() { if (this.props.showThumbnailNavigators) { var isDisabled = !this.props.circular && this.props.activeItemIndex === 0 || this.props.value.length <= this.state.numVisible; var buttonClassName = utils.classNames('p-galleria-thumbnail-prev p-link', { 'p-disabled': isDisabled }), iconClassName = utils.classNames('p-galleria-thumbnail-prev-icon pi', { 'pi-chevron-left': !this.props.isVertical, 'pi-chevron-up': this.props.isVertical }); return /*#__PURE__*/React__default["default"].createElement("button", { className: buttonClassName, onClick: this.navBackward, disabled: isDisabled }, /*#__PURE__*/React__default["default"].createElement("span", { className: iconClassName }), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null)); } return null; } }, { key: "renderForwardNavigator", value: function renderForwardNavigator() { if (this.props.showThumbnailNavigators) { var isDisabled = !this.props.circular && this.props.activeItemIndex === this.props.value.length - 1 || this.props.value.length <= this.state.numVisible; var buttonClassName = utils.classNames('p-galleria-thumbnail-next p-link', { 'p-disabled': isDisabled }), iconClassName = utils.classNames('p-galleria-thumbnail-next-icon pi', { 'pi-chevron-right': !this.props.isVertical, 'pi-chevron-down': this.props.isVertical }); return /*#__PURE__*/React__default["default"].createElement("button", { className: buttonClassName, onClick: this.navForward, disabled: isDisabled }, /*#__PURE__*/React__default["default"].createElement("span", { className: iconClassName }), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null)); } return null; } }, { key: "renderContent", value: function renderContent() { var _this5 = this; var items = this.renderItems(); var height = this.props.isVertical ? this.props.contentHeight : ''; var backwardNavigator = this.renderBackwardNavigator(); var forwardNavigator = this.renderForwardNavigator(); return /*#__PURE__*/React__default["default"].createElement("div", { className: "p-galleria-thumbnail-container" }, backwardNavigator, /*#__PURE__*/React__default["default"].createElement("div", { className: "p-galleria-thumbnail-items-container", style: { 'height': height } }, /*#__PURE__*/React__default["default"].createElement("div", { ref: function ref(el) { return _this5.itemsContainer = el; }, className: "p-galleria-thumbnail-items", onTransitionEnd: this.onTransitionEnd, onTouchStart: this.onTouchStart, onTouchMove: this.onTouchMove, onTouchEnd: this.onTouchEnd }, items)), forwardNavigator); } }, { key: "render", value: function render() { var content = this.renderContent(); return /*#__PURE__*/React__default["default"].createElement("div", { className: "p-galleria-thumbnail-wrapper" }, content); } }]); return GalleriaThumbnails; }(React.Component); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Galleria = /*#__PURE__*/function (_Component) { _inherits(Galleria, _Component); var _super = _createSuper(Galleria); function Galleria(props) { var _this; _classCallCheck(this, Galleria); _this = _super.call(this, props); _this.state = { visible: false, numVisible: props.numVisible, slideShowActive: false }; if (!_this.props.onItemChange) { _this.state = _objectSpread(_objectSpread({}, _this.state), {}, { activeIndex: props.activeIndex }); } _this.onActiveItemChange = _this.onActiveItemChange.bind(_assertThisInitialized(_this)); _this.show = _this.show.bind(_assertThisInitialized(_this)); _this.hide = _this.hide.bind(_assertThisInitialized(_this)); _this.startSlideShow = _this.startSlideShow.bind(_assertThisInitialized(_this)); _this.stopSlideShow = _this.stopSlideShow.bind(_assertThisInitialized(_this)); _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this)); _this.onEntering = _this.onEntering.bind(_assertThisInitialized(_this)); _this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this)); _this.onExit = _this.onExit.bind(_assertThisInitialized(_this)); _this.onExited = _this.onExited.bind(_assertThisInitialized(_this)); _this.galleriaRef = /*#__PURE__*/React__default["default"].createRef(); return _this; } _createClass(Galleria, [{ key: "activeItemIndex", get: function get() { return this.props.onItemChange ? this.props.activeIndex : this.state.activeIndex; } }, { key: "onActiveItemChange", value: function onActiveItemChange(event) { if (this.props.onItemChange) { this.props.onItemChange(event); } else { this.setState({ activeIndex: event.index }); } } }, { key: "show", value: function show() { this.setState({ visible: true }); } }, { key: "hide", value: function hide() { this.setState({ visible: false }); } }, { key: "onEnter", value: function onEnter() { utils.DomHandler.addClass(document.body, 'p-overflow-hidden'); } }, { key: "onEntering", value: function onEntering() { utils.ZIndexUtils.set('modal', this.mask, PrimeReact__default["default"].autoZIndex, this.props.baseZIndex || PrimeReact__default["default"].zIndex['modal']); utils.DomHandler.addMultipleClasses(this.mask, 'p-component-overlay p-component-overlay-enter'); } }, { key: "onEntered", value: function onEntered() { this.props.onShow && this.props.onShow(); } }, { key: "onExit", value: function onExit() { utils.DomHandler.removeClass(document.body, 'p-overflow-hidden'); utils.DomHandler.addClass(this.mask, 'p-component-overlay-leave'); } }, { key: "onExited", value: function onExited() { utils.ZIndexUtils.clear(this.mask); this.props.onHide && this.props.onHide(); } }, { key: "isAutoPlayActive", value: function isAutoPlayActive() { return this.state.slideShowActive; } }, { key: "startSlideShow", value: function startSlideShow() { var _this2 = this; this.interval = setInterval(function () { var activeIndex = _this2.props.circular && _this2.props.value.length - 1 === _this2.activeItemIndex ? 0 : _this2.activeItemIndex + 1; _this2.onActiveItemChange({ index: activeIndex }); }, this.props.transitionInterval); this.setState({ slideShowActive: true }); } }, { key: "stopSlideShow", value: function stopSlideShow() { if (this.interval) { clearInterval(this.interval); } this.setState({ slideShowActive: false }); } }, { key: "getPositionClassName", value: function getPositionClassName(preClassName, position) { var positions = ['top', 'left', 'bottom', 'right']; var pos = positions.find(function (item) { return item === position; }); return pos ? "".concat(preClassName, "-").concat(pos) : ''; } }, { key: "isVertical", value: function isVertical() { return this.props.thumbnailsPosition === 'left' || this.props.thumbnailsPosition === 'right'; } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { if (prevProps.value !== this.props.value) { if (this.props.value && this.props.value.length < this.state.numVisible) { this.setState({ numVisible: this.props.value.length }); } } if (prevProps.numVisible !== this.props.numVisible) { this.setState({ numVisible: this.props.numVisible }); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.state.slideShowActive) { this.stopSlideShow(); } utils.ZIndexUtils.clear(this.mask); } }, { key: "renderHeader", value: function renderHeader() { if (this.props.header) { return /*#__PURE__*/React__default["default"].createElement("div", { className: "p-galleria-header" }, this.props.header); } return null; } }, { key: "renderFooter", value: function renderFooter() { if (this.props.footer) { return /*#__PURE__*/React__default["default"].createElement("div", { className: "p-galleria-footer" }, this.props.footer); } return null; } }, { key: "renderElement", value: function renderElement() { var _this3 = this; var isVertical = this.isVertical(); var thumbnailsPosClassName = this.props.showThumbnails && this.getPositionClassName('p-galleria-thumbnails', this.props.thumbnailsPosition); var indicatorPosClassName = this.props.showIndicators && this.getPositionClassName('p-galleria-indicators', this.props.indicatorsPosition); var galleriaClassName = utils.classNames('p-galleria p-component', this.props.className, { 'p-galleria-fullscreen': this.props.fullScreen, 'p-galleria-indicator-onitem': this.props.showIndicatorsOnItem, 'p-galleria-item-nav-onhover': this.props.showItemNavigatorsOnHover && !this.props.fullScreen }, thumbnailsPosClassName, indicatorPosClassName); var closeIcon = this.props.fullScreen && /*#__PURE__*/React__default["default"].createElement("button", { type: "button", className: "p-galleria-close p-link", onClick: this.hide }, /*#__PURE__*/React__default["default"].createElement("span", { className: "p-galleria-close-icon pi pi-times" }), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null)); var header = this.renderHeader(); var footer = this.renderFooter(); var element = /*#__PURE__*/React__default["default"].createElement("div", { ref: this.galleriaRef, id: this.props.id, className: galleriaClassName, style: this.props.style }, closeIcon, header, /*#__PURE__*/React__default["default"].createElement("div", { className: "p-galleria-content" }, /*#__PURE__*/React__default["default"].createElement(GalleriaItem, { ref: function ref(el) { return _this3.previewContent = el; }, value: this.props.value, activeItemIndex: this.activeItemIndex, onActiveItemChange: this.onActiveItemChange, itemTemplate: this.props.item, circular: this.props.circular, caption: this.props.caption, showIndicators: this.props.showIndicators, changeItemOnIndicatorHover: this.props.changeItemOnIndicatorHover, indicator: this.props.indicator, showItemNavigators: this.props.showItemNavigators, autoPlay: this.props.autoPlay, slideShowActive: this.state.slideShowActive, startSlideShow: this.startSlideShow, stopSlideShow: this.stopSlideShow }), this.props.showThumbnails && /*#__PURE__*/React__default["default"].createElement(GalleriaThumbnails, { value: this.props.value, activeItemIndex: this.activeItemIndex, onActiveItemChange: this.onActiveItemChange, itemTemplate: this.props.thumbnail, numVisible: this.state.numVisible, responsiveOptions: this.props.responsiveOptions, circular: this.props.circular, isVertical: isVertical, contentHeight: this.props.verticalThumbnailViewPortHeight, showThumbnailNavigators: this.props.showThumbnailNavigators, autoPlay: this.props.autoPlay, slideShowActive: this.state.slideShowActive, stopSlideShow: this.stopSlideShow })), footer); return element; } }, { key: "renderGalleria", value: function renderGalleria() { var _this4 = this; var element = this.renderElement(); if (this.props.fullScreen) { var maskClassName = utils.classNames('p-galleria-mask', { 'p-galleria-visible': this.state.visible }); var galleriaWrapper = /*#__PURE__*/React__default["default"].createElement("div", { ref: function ref(el) { return _this4.mask = el; }, className: maskClassName }, /*#__PURE__*/React__default["default"].createElement(csstransition.CSSTransition, { nodeRef: this.galleriaRef, classNames: "p-galleria", in: this.state.visible, timeout: { enter: 150, exit: 150 }, options: this.props.transitionOptions, unmountOnExit: true, onEnter: this.onEnter, onEntering: this.onEntering, onEntered: this.onEntered, onExit: this.onExit, onExited: this.onExited }, element)); return /*#__PURE__*/React__default["default"].createElement(portal.Portal, { element: galleriaWrapper }); } else { return element; } } }, { key: "render", value: function render() { return this.props.value && this.props.value.length > 0 && this.renderGalleria(); } }]); return Galleria; }(React.Component); _defineProperty(Galleria, "defaultProps", { id: null, value: null, activeIndex: 0, fullScreen: false, item: null, thumbnail: null, indicator: null, caption: null, className: null, style: null, header: null, footer: null, numVisible: 3, responsiveOptions: null, showItemNavigators: false, showThumbnailNavigators: true, showItemNavigatorsOnHover: false, changeItemOnIndicatorHover: false, circular: false, autoPlay: false, transitionInterval: 4000, showThumbnails: true, thumbnailsPosition: "bottom", verticalThumbnailViewPortHeight: "300px", showIndicators: false, showIndicatorsOnItem: false, indicatorsPosition: "bottom", baseZIndex: 0, transitionOptions: null, onItemChange: null }); exports.Galleria = Galleria; Object.defineProperty(exports, '__esModule', { value: true }); return exports; })({}, React, primereact.utils, primereact.ripple, primereact.csstransition, primereact.portal, primereact.api);
frontend/src/components/PostList.js
raymestalez/django-react-blog
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import MetaTags from 'react-meta-tags'; import { fetchSettings, fetchPosts } from '../actions/index'; import Post from './Post'; import Pagination from './Pagination'; class PostList extends Component { fetchAndFilterPosts () { const page = this.props.location.query.page; var filter = {category: "", tag: "", currentPage: page }; if (this.props.params.category) { filter.category = this.props.params.category; } if (this.props.params.tag) { filter.tag = this.props.params.tag; } this.props.fetchPosts(filter); } componentWillMount() { /* console.log(">>>> src/components/post_list.js:"); console.log("Calling fetchPosts() action creator."); */ /* Fetch posts when the app loads */ this.fetchAndFilterPosts(); this.props.fetchSettings(); } componentDidUpdate(nextProps) { if ((this.props.route.path !== nextProps.route.path) || (nextProps.params.category !== this.props.params.category) || (nextProps.location.query.page !== this.props.location.query.page)) { /* If the route has changed - refetch the posts. Gotta check if route is different with the if statement, without the if statement it will fetch posts, which will update props, which will fetch them again, in infinite loop. comparing route.path's checks if I've switched between "/" and "/category/some-category" copmaring params checks if I've switched between "/category/" and "/category/some-other-category" */ this.fetchAndFilterPosts(); } } renderPosts() { const posts = this.props.posts.results; /* console.log(">>>> src/components/post_list.js:"); console.log("Rendering posts."); */ /* If there are no posts in the state (haven't fetched them yet) - render an empty div in their place. */ if (!posts) { return ( <div></div> ); }; return posts.map((post) => { if (post.published || this.props.authenticated) { /* Generate the list of posts. */ /* Published posts are visible to everyone, authenticated user can see both published and drafts */ return ( <Post key={post.slug} title={post.title} slug={post.slug} body={post.body} published={post.published} authenticated={this.props.authenticated} category={post.category} tags={post.tags} truncate={100} link={`/post/${post.slug}`}/> ) } }); } renderMetaInfo () { const settings = this.props.settings; if (!settings.title ) { return null; } return ( <MetaTags> {/* Main */} <title>{settings.title}</title> <meta name="author" content={settings.author} /> <meta name="description" content={settings.description} /> <meta name="keywords" content={settings.keywords} /> {/* Facebook */} <meta property="og:title" content={settings.title} /> <meta property="og:image" content={settings.image_social} /> {/* Twitter */} <meta property="twitter:card" content="summary_large_image" /> <meta property="twitter:image" content={settings.image_social} /> </MetaTags> ); } render() { return ( <div> { this.renderMetaInfo() } { this.renderPosts() } <Pagination next={this.props.posts.next} prev={this.props.posts.previous} location={this.props.location}/> </div> ); } } function mapStateToProps(state) { return { posts: state.posts.all, settings: state.settings.all, authenticated: state.auth.authenticated}; } /* First argument connects redux state to the component, allowing to access it with "this.props.posts" */ /* Second argument connects the actions to the component, allowing me to fire them like "this.props.fetchPosts()" */ export default connect(mapStateToProps, { fetchPosts, fetchSettings })(PostList);
src/components/projectTeaser.js
RadLikeWhoa/radlikewhoa.github.io
import React from 'react' import PropTypes from 'prop-types' import IconWell from './iconWell' const ProjectTeaser = ({ project, onClickFilter }) => { const start = +project.frontmatter.date.split('.').splice(-1).pop() return ( <article className="post-inline project-inline"> <div data-grid> <div data-col="M1-3"> <IconWell title={project.frontmatter.title} path={project.frontmatter.path} pattern={project.frontmatter.pattern} background={project.frontmatter.background} icon={project.frontmatter.icon.publicURL} /> </div> <div data-col="M2-3"> <h3 className="project-title"> <a href={project.frontmatter.path}>{project.frontmatter.title}</a> </h3> <div className="project-intro"> <p> <span className="faded"> {!project.frontmatter.end && 'since '} {start} {project.frontmatter.end && project.frontmatter.end !== start && ` – ${project.frontmatter.end}`} {' '}—{' '} </span> {project.frontmatter.teaser} </p> </div> <ul data-tags> {project.frontmatter.tags.map(tag => ( <li className="tag" key={tag} onClick={onClickFilter(tag)}> {tag} </li> ))} </ul> </div> </div> </article> ) } ProjectTeaser.propTypes = { project: PropTypes.object.isRequired, onClickFilter: PropTypes.func.isRequired } export default ProjectTeaser
client/src/app-components/article-add-modal.js
ivandiazwm/opensupports
import React from 'react'; import _ from 'lodash'; import {connect} from 'react-redux'; import i18n from 'lib-app/i18n'; import API from 'lib-app/api-call'; import ModalContainer from 'app-components/modal-container'; import Header from 'core-components/header'; import Form from 'core-components/form'; import FormField from 'core-components/form-field'; import SubmitButton from 'core-components/submit-button'; import Button from 'core-components/button'; import TextEditor from 'core-components/text-editor'; class ArticleAddModal extends React.Component { static propTypes = { topicId: React.PropTypes.number.isRequired, topicName: React.PropTypes.string.isRequired, position: React.PropTypes.number.isRequired, allowAttachments: React.PropTypes.bool }; state = { loading: false }; render() { return ( <div className="article-add-modal"> <Header title={i18n('ADD_ARTICLE')} description={i18n('ADD_ARTICLE_DESCRIPTION', {category: this.props.topicName})} /> <Form onSubmit={this.onAddNewArticleFormSubmit.bind(this)} loading={this.state.loading}> <FormField name="title" label={i18n('TITLE')} field="input" fieldProps={{size: 'large'}} validation="TITLE" required/> <FormField name="content" label={i18n('CONTENT')} field="textarea" validation="TEXT_AREA" required fieldProps={{allowImages: this.props.allowAttachments}}/> <SubmitButton type="secondary">{i18n('ADD_ARTICLE')}</SubmitButton> <Button className="article-add-modal__cancel-button" type="link" onClick={(event) => { event.preventDefault(); ModalContainer.closeModal(); }}>{i18n('CANCEL')}</Button> </Form> </div> ); } onAddNewArticleFormSubmit(form) { this.setState({ loading: true }); API.call({ path: '/article/add', dataAsForm: true, data: _.extend(TextEditor.getContentFormData(form.content), { title: form.title, topicId: this.props.topicId, position: this.props.position }) }).then(() => { ModalContainer.closeModal(); if(this.props.onChange) { this.props.onChange(); } }).catch(() => { this.setState({ loading: false }); }); } } export default connect((store) => { return { allowAttachments: store.config['allow-attachments'] }; })(ArticleAddModal);
src/pages/index.js
mirego/mirego-open-web
import {graphql} from 'gatsby'; import React from 'react'; import Layout from '../components/Layout'; import Intro from '../components/Intro'; import Header from '../components/Header'; import Title from '../components/Title'; import Subtitle from '../components/Subtitle'; import Projects from '../components/Projects'; import ExternalProjects from '../components/ExternalProjects'; import Outro from '../components/Outro'; import Footer from '../components/Footer'; import Gem from '../components/Gem'; import Wrapper from '../components/Wrapper'; export default ({data}) => ( <Layout> <Gem /> <Wrapper> <Header /> <Intro /> <Title title="Giving back to the community<span class='punctuation'>.</span>"> <p>These are the open source projects we actively develop, maintain and support.</p> </Title> <Subtitle>✨ Featured projects ✨</Subtitle> <Projects projects={data.featuredProjects.edges} /> <Subtitle>Other projects</Subtitle> <Projects projects={data.otherProjects.edges} /> <Title title="“Standing on the shoulders of giants<span class='punctuation'>.</span>”"> <p>We leverage several open source projects to build world-class products.</p> </Title> <ExternalProjects projects={data.externalProjects.edges} /> <Title title="But wait, there’s more<span class='punctuation'>.</span>"> <Outro /> </Title> <Footer /> </Wrapper> </Layout> ); export const pageQuery = graphql` fragment projectData on Project { description id logo name slug starCount createdAt(formatString: "YYYY") tags } query IndexQuery { featuredProjects: allProject(filter: {featured: {eq: true}}, sort: {fields: [starCount, name], order: DESC}) { edges { node { ...projectData } } } otherProjects: allProject(filter: {featured: {eq: false}}, sort: {fields: [starCount, name], order: DESC}) { edges { node { ...projectData } } } externalProjects: allExternalProject { edges { node { id logo name url } } } } `;
client/src/components/auth/logout.js
joshuaslate/mern-starter
import React, { Component } from 'react'; import { connect } from 'react-redux'; import * as actions from '../../actions/auth'; class Logout extends Component { componentWillMount() { this.props.logoutUser(); } render() { return <div>Sorry to see you go!</div>; } } export default connect(null, actions)(Logout);
ajax/libs/react-bootstrap-typeahead/0.1.5/react-bootstrap-typeahead.min.js
brix/cdnjs
!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=o(r),s=n(11),i=o(s),l=n(12),u=o(l),d=n(13),p=o(d),c=n(9),f=n(2),h=n(7),v=o(h),m=a["default"].PropTypes;n(8);var y=a["default"].createClass({displayName:"Typeahead",mixins:[v["default"]],propTypes:{defaultSelected:m.array,emptyLabel:m.string,labelKey:m.string,maxHeight:m.number,multiple:m.bool,options:m.array.isRequired,placeholder:m.string,selected:m.array},getDefaultProps:function(){return{defaultSelected:[],labelKey:"label",multiple:!1,selected:[]}},getInitialState:function(){var e=this.props,t=e.defaultSelected,n=e.selected;return{activeIndex:0,selected:(0,c.isEmpty)(t)?n:t,showMenu:!1,text:""}},componentWillReceiveProps:function(e){(0,c.isEqual)(this.props.selected,e.selected)||this.setState({selected:e.selected}),this.props.multiple!==e.multiple&&this.setState({text:""})},render:function(){var e=this.props,t=e.labelKey,n=e.multiple,o=e.options,r=this.state,s=r.activeIndex,l=r.selected,d=r.text,f=o.filter(function(e){return!(-1===e[t].toLowerCase().indexOf(d.toLowerCase())||n&&(0,c.find)(l,e))}),h=void 0;this.state.showMenu&&(h=a["default"].createElement(p["default"],{activeIndex:s,emptyLabel:this.props.emptyLabel,labelKey:t,maxHeight:this.props.maxHeight,onClick:this._handleAddOption,options:f}));var v=i["default"];return n||(v=u["default"],l=(0,c.head)(l),d=l&&l[t]||d),a["default"].createElement("div",{className:"bootstrap-typeahead open",style:{position:"relative"}},a["default"].createElement(v,{filteredOptions:f,labelKey:t,onAdd:this._handleAddOption,onChange:this._handleTextChange,onFocus:this._handleFocus,onKeyDown:this._handleKeydown.bind(null,f),onRemove:this._handleRemoveOption,placeholder:this.props.placeholder,ref:"input",selected:l,text:d}),h)},_handleFocus:function(){this.setState({showMenu:!0})},_handleTextChange:function(e){this.setState({activeIndex:0,showMenu:!0,text:e.target.value})},_handleKeydown:function(e,t){var n=this.state.activeIndex;switch(t.keyCode){case f.BACKSPACE:t.stopPropagation();break;case f.UP:t.preventDefault(),n--,0>n&&(n=e.length-1),this.setState({activeIndex:n});break;case f.DOWN:case f.TAB:t.preventDefault(),n++,n===e.length&&(n=0),this.setState({activeIndex:n});break;case f.ESC:t.stopPropagation(),this._hideDropdown();break;case f.RETURN:var o=e[n];o&&this._handleAddOption(o)}},_handleAddOption:function(e){var t=this.props,n=t.multiple,o=t.labelKey,r=t.onChange,a=void 0,s=void 0;n?(a=this.state.selected.concat(e),s=""):(a=[e],s=e[o]),this.setState({activeIndex:0,selected:a,showMenu:!1,text:s}),r&&r(a)},_handleRemoveOption:function(e){var t=this.state.selected.slice();t=t.filter(function(t){return!(0,c.isEqual)(t,e)}),this.setState({activeIndex:0,selected:t,showMenu:!1}),this.props.onChange&&this.props.onChange(t)},handleClickOutside:function(e){this._hideDropdown()},_hideDropdown:function(){this.setState({activeIndex:0,showMenu:!1})}});t["default"]=y},function(e,t){e.exports=React},function(e,t){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40}},function(e,t,n){var o;/*! Copyright (c) 2015 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e+=" "+n;else if(Array.isArray(n))e+=" "+r.apply(null,n);else if("object"===o)for(var s in n)a.call(n,s)&&n[s]&&(e+=" "+s)}}return e.substr(1)}var a={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=r:(o=function(){return r}.call(t,n,t,e),!(void 0!==o&&(e.exports=o)))}()},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 o={},r=0;r<this.length;r++){var a=this[r][0];"number"==typeof a&&(o[a]=!0)}for(r=0;r<t.length;r++){var s=t[r];"number"==typeof s[0]&&o[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},function(e,t,n){function o(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=f[o.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](o.parts[a]);for(;a<o.parts.length;a++)r.parts.push(u(o.parts[a],t))}else{for(var s=[],a=0;a<o.parts.length;a++)s.push(u(o.parts[a],t));f[o.id]={id:o.id,refs:1,parts:s}}}}function r(e){for(var t=[],n={},o=0;o<e.length;o++){var r=e[o],a=r[0],s=r[1],i=r[2],l=r[3],u={css:s,media:i,sourceMap:l};n[a]?n[a].parts.push(u):t.push(n[a]={id:a,parts:[u]})}return t}function a(e,t){var n=m(),o=g[g.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.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 s(e){e.parentNode.removeChild(e);var t=g.indexOf(e);t>=0&&g.splice(t,1)}function i(e){var t=document.createElement("style");return t.type="text/css",a(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",a(e,t),t}function u(e,t){var n,o,r;if(t.singleton){var a=b++;n=y||(y=i(t)),o=d.bind(null,n,a,!1),r=d.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),o=c.bind(null,n),r=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=i(t),o=p.bind(null,n),r=function(){s(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}function d(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=x(t,r);else{var a=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(a,s[t]):e.appendChild(a)}}function p(e,t){var n=t.css,o=t.media;t.sourceMap;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function c(e,t){var n=t.css,o=(t.media,t.sourceMap);o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var r=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(r),a&&URL.revokeObjectURL(a)}var f={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},v=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=h(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,b=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=v()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=r(e);return o(n,t),function(e){for(var a=[],s=0;s<n.length;s++){var i=n[s],l=f[i.id];l.refs--,a.push(l)}if(e){var u=r(e);o(u,t)}for(var s=0;s<a.length;s++){var l=a[s];if(0===l.refs){for(var d=0;d<l.parts.length;d++)l.parts[d]();delete f[l.id]}}}};var x=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=ReactDOM},function(e,t){e.exports=onClickOutside},function(e,t,n){var o=n(16);"string"==typeof o&&(o=[[e.id,o,""]]);n(5)(o,{});o.locals&&(e.exports=o.locals)},function(e,t){e.exports=lodash},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=o(r),s=n(6),i=n(3),l=o(i),u=n(2),d=o(u),p=n(7),c=o(p);n(17);var f=a["default"].createClass({displayName:"Token",mixins:[c["default"]],propTypes:{onRemove:a["default"].PropTypes.func},getInitialState:function(){return{selected:!1}},render:function(){return this.props.onRemove?this._renderRemoveableToken():this._renderToken()},_renderRemoveableToken:function(){return a["default"].createElement("button",{className:(0,l["default"])("token","token-removeable",{"token-selected":this.state.selected},this.props.className),onBlur:this._handleBlur,onClick:this._handleSelect,onFocus:this._handleSelect,onKeyDown:this._handleKeyDown,tabIndex:0},this.props.children,a["default"].createElement("span",{className:"token-close-button",onClick:this._handleRemove},"×"))},_renderToken:function(){var e=(0,l["default"])("token",this.props.className);return this.props.href?a["default"].createElement("a",{className:e,href:this.props.href},this.props.children):a["default"].createElement("div",{className:e},this.props.children)},_handleBlur:function(e){(0,s.findDOMNode)(this).blur(),this.setState({selected:!1})},_handleKeyDown:function(e){switch(e.keyCode){case d["default"].BACKSPACE:this.state.selected&&(e.preventDefault(),this._handleRemove())}},handleClickOutside:function(e){this._handleBlur()},_handleRemove:function(e){this.props.onRemove&&this.props.onRemove()},_handleSelect:function(e){e.stopPropagation(),this.setState({selected:!0})}});t["default"]=f},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(19),s=o(a),i=n(1),l=o(i),u=n(10),d=o(u),p=n(3),c=o(p),f=n(6),h=n(2),v=o(h),m=l["default"].PropTypes;n(18);var y=l["default"].createClass({displayName:"TokenizerInput",propTypes:{labelKey:m.string,placeholder:m.string,selected:m.array},render:function(){var e=this.props,t=e.className,n=e.placeholder,o=e.selected,a=e.text;return l["default"].createElement("div",{className:(0,c["default"])("bootstrap-tokenizer","form-control","clearfix",t),onClick:this._handleInputFocus,onFocus:this._handleInputFocus,tabIndex:0},o.map(this._renderToken),l["default"].createElement(s["default"],r({},this.props,{className:"bootstrap-tokenizer-input",inputStyle:{backgroundColor:"inherit",border:0,outline:"none",padding:0},onKeyDown:this._handleKeydown,placeholder:o.length?null:n,ref:"input",type:"text",value:a})))},_renderToken:function(e,t){var n=this.props,o=n.onRemove,r=n.labelKey;return l["default"].createElement(d["default"],{key:t,onRemove:o.bind(null,e)},e[r])},_handleKeydown:function(e){switch(e.keyCode){case v["default"].LEFT:case v["default"].RIGHT:break;case v["default"].BACKSPACE:var t=(0,f.findDOMNode)(this.refs.input);if(t&&t.contains(document.activeElement)&&!this.props.text){var n=t.previousSibling;n&&n.focus()}}this.props.onKeyDown&&this.props.onKeyDown(e)},_handleInputFocus:function(e){this.refs.input.focus()}});t["default"]=y},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=o(a),i=n(3),l=o(i),u=n(9),d=n(2),p=o(d),c=n(7),f=o(c),h=s["default"].PropTypes;n(8);var v=s["default"].createClass({displayName:"TypeaheadInput",mixins:[f["default"]],propTypes:{filteredOptions:h.array,labelKey:h.string,onChange:h.func,selected:h.object,text:h.string},render:function(){return s["default"].createElement("div",{className:(0,l["default"])("bootstrap-typeahead-input",this.props.className),onClick:this._handleInputFocus,onFocus:this._handleInputFocus,tabIndex:0},s["default"].createElement("input",r({},this.props,{className:(0,l["default"])("bootstrap-typeahead-input-main","form-control",{"has-selection":!this.props.selected}),onKeyDown:this._handleKeydown,ref:"input",style:{backgroundColor:"transparent",display:"block",position:"relative",zIndex:1},type:"text",value:this._getInputValue()})),s["default"].createElement("input",{className:"bootstrap-typeahead-input-hint form-control",style:{borderColor:"transparent",bottom:0,display:"block",position:"absolute",top:0,width:"100%",zIndex:0},value:this._getHintText()}))},_getInputValue:function(){var e=this.props,t=e.labelKey,n=e.selected,o=e.text;return n?n[t]:o},_getHintText:function(){var e=this.props,t=e.filteredOptions,n=e.labelKey,o=e.text,r=(0,u.head)(t);return this.refs.input===document.activeElement&&o&&r&&0===r[n].indexOf(o)?r[n]:void 0},_handleInputFocus:function(e){this.refs.input.focus()},_handleKeydown:function(e){var t=this.props,n=t.filteredOptions,o=t.onAdd,r=t.onRemove,a=t.selected;switch(e.keyCode){case p["default"].ESC:this.refs.input.blur();break;case p["default"].RIGHT:this._getHintText()&&!a&&o&&o((0,u.head)(n));break;case p["default"].BACKSPACE:a&&r&&r(a)}this.props.onKeyDown&&this.props.onKeyDown(e)},handleClickOutside:function(e){this.refs.input.blur()}});t["default"]=v},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=o(a),i=n(6),l=n(3),u=o(l),d=s["default"].PropTypes,p=s["default"].createClass({displayName:"Menu",render:function(){return s["default"].createElement("ul",r({},this.props,{className:(0,u["default"])("dropdown-menu",this.props.className)}),this.props.children)}}),c=s["default"].createClass({displayName:"MenuItem",componentWillReceiveProps:function(e){e.active&&(0,i.findDOMNode)(this).firstChild.focus()},render:function(){return s["default"].createElement("li",{className:(0,u["default"])({active:this.props.active,disabled:this.props.disabled})},s["default"].createElement("a",{href:"#",onClick:this._handleClick},this.props.children))},_handleClick:function(e){e.preventDefault(),this.props.onClick&&this.props.onClick()}}),f=s["default"].createClass({displayName:"TypeaheadMenu",propTypes:{activeIndex:d.number,emptyLabel:d.string,labelKey:d.string.isRequired,maxHeight:d.number,options:d.array},getDefaultProps:function(){return{emptyLabel:"No matches found.",maxHeight:300}},render:function(){var e=this.props,t=e.maxHeight,n=e.options,o=n.length?n.map(this._renderDropdownItem):s["default"].createElement(c,{disabled:!0},this.props.emptyLabel);return s["default"].createElement(p,{style:{maxHeight:t+"px",right:0}},o)},_renderDropdownItem:function(e,t){var n=this.props,o=n.activeIndex,r=n.onClick;return s["default"].createElement(c,{active:t===o,key:t,onClick:r.bind(null,e)},e[this.props.labelKey])}});t["default"]=f},function(e,t,n){t=e.exports=n(4)(),t.push([e.id,".token{background-color:#e7f4ff;border:0;border-radius:2px;color:#1f8dd6;display:inline-block;line-height:1em;padding:4px 7px;position:relative}.token-removeable,.token:focus{padding-right:21px}.token-selected{background-color:#1f8dd6;color:#fff;outline:none;text-decoration:none}.bootstrap-tokenizer .token{margin:0 3px 3px 0}.token-close-button{bottom:0;padding:3px 7px;position:absolute;right:0;top:0}",""])},function(e,t,n){t=e.exports=n(4)(),t.push([e.id,".bootstrap-tokenizer{cursor:text;height:auto;padding:5px 12px 2px}.bootstrap-tokenizer-input{margin:1px 0 4px}",""])},function(e,t,n){t=e.exports=n(4)(),t.push([e.id,".bootstrap-typeahead .dropdown-menu{overflow:scroll}.bootstrap-typeahead .dropdown-menu>li a:focus{outline:none}.bootstrap-typeahead-input-hint{color:#aaa}",""])},function(e,t,n){var o=n(14);"string"==typeof o&&(o=[[e.id,o,""]]);n(5)(o,{});o.locals&&(e.exports=o.locals)},function(e,t,n){var o=n(15);"string"==typeof o&&(o=[[e.id,o,""]]);n(5)(o,{});o.locals&&(e.exports=o.locals)},function(e,t){e.exports=AutosizeInput}]); //# sourceMappingURL=react-bootstrap-typeahead.min.js.map
src/containers/person/PersonProfile.js
Hylozoic/hylo-redux
/* eslint-disable camelcase */ import React from 'react' import { compose } from 'redux' import { connect } from 'react-redux' import { prefetch, defer } from 'react-fetcher' import { commentUrl, peopleUrl } from '../../routes' import { FETCH_PERSON } from '../../actions/constants' import { navigate, showDirectMessage, fetchContributions, fetchPerson, fetchThanks, saveCurrentCommunityId, findError } from '../../actions' import { capitalize, compact, some, includes } from 'lodash' import { isNull, isUndefined, map, omitBy, sortBy, get } from 'lodash/fp' import { STARTED_MESSAGE, VIEWED_PERSON, VIEWED_SELF, trackEvent } from '../../util/analytics' import PostList from '../../components/PostList' import Post from '../../components/Post' import A from '../../components/A' import { fetch, ConnectedPostList } from '../ConnectedPostList' import { refetch } from '../../util/caching' import AccessErrorMessage from '../../components/AccessErrorMessage' import CoverImagePage from '../../components/CoverImagePage' import Icon from '../../components/Icon' import Comment from '../../components/Comment' import { normalizeUrl } from '../../util/text' import Avatar from '../../components/Avatar' import moment from 'moment' import { getPost } from '../../models/post' import { getCurrentCommunity } from '../../models/community' import { defaultBanner } from '../../models/person' import { DIRECT_MESSAGES, CONTRIBUTORS } from '../../config/featureFlags' import { hasFeature } from '../../models/currentUser' const { func, object } = React.PropTypes const spacer = <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span> const subject = 'person' const getFetchOpts = (query, fetchingPosts = true) => { const defaults = {tag: null, type: null} if (query['check-join-requests']) { defaults['check-join-requests'] = 1 } if (!fetchingPosts) return defaults switch (query.show) { case 'request': return {...defaults, tag: 'request'} case 'offer': return {...defaults, tag: 'offer'} case 'event': return {...defaults, type: 'event'} default: return defaults } } const initialFetch = (id, query) => { switch (query.show) { case 'thank': return fetchThanks(id, getFetchOpts(query, false)) case 'contribution': return fetchContributions(id, getFetchOpts(query, false)) default: return fetch(subject, id, getFetchOpts(query)) } } const PersonProfile = compose( prefetch(({ store, dispatch, params: { id }, query }) => Promise.all([ dispatch(fetchPerson(id, query)) .then(({ payload: { shared_communities }, error }) => { if (error || !shared_communities) return let { currentCommunityId } = store.getState() if (includes(shared_communities, currentCommunityId)) return return saveCurrentCommunityId(dispatch, shared_communities[0] || 'all', true) }), dispatch(initialFetch(id, query)) ])), defer(({ store, params: { id }, currentUser }) => { let state = store.getState() let person = state.people[id] if (!person) return if (get('id', currentUser) === person.id) { return trackEvent(VIEWED_SELF) } else { return trackEvent(VIEWED_PERSON, {person}) } }), connect((state, { params: { id } }) => { const person = state.people[id] return omitBy(x => isNull(x) || isUndefined(x), { person, currentUser: state.people.current, community: getCurrentCommunity(state), error: findError(state.errors, FETCH_PERSON, 'people', id), recentRequest: getPost(get('recent_request_id', person), state), recentOffer: getPost(get('recent_offer_id', person), state) }) }) )(props => { const { person, currentUser, error, dispatch } = props if (error) return <AccessErrorMessage error={error} /> if (!person || !person.grouped_post_count) return <div>Loading...</div> const isSelf = person.id === get('id', currentUser) const { params: { id }, location: { query }, recentRequest, recentOffer, community } = props const category = query.show const { banner_url, bio, tags, location, created_at, facebook_url, linkedin_url, twitter_name } = person const url = normalizeUrl(person.url) const joinDate = moment(created_at).format('MMMM YYYY') const requestCount = person.grouped_post_count.request || 0 const offerCount = person.grouped_post_count.offer || 0 const TabLink = setupTabLink(props) const postsToHide = category ? [] : map('id', compact([recentRequest, recentOffer])) const startMessage = () => { trackEvent(STARTED_MESSAGE, {context: 'profile'}) return dispatch(showDirectMessage(person.id, person.name)) } const activityItems = (category, person) => { switch (category) { case 'thank': return <Thanks person={person} /> case 'contribution': if (hasFeature(currentUser, CONTRIBUTORS)) { return <Contributions person={person} /> } break default: return <ConnectedPostList {...{subject, id, query: getFetchOpts(query)}} hide={postsToHide} hideMobileSearch /> } } let sectionLinks const scrollIntoView = (e) => { if (sectionLinks.firstChild === e.target) sectionLinks.scrollLeft = 0 else if (sectionLinks.lastChild === e.target) sectionLinks.scrollLeft = e.target.offsetLeft } return <CoverImagePage id='person' image={banner_url || defaultBanner} person={isSelf ? currentUser : null}> <div className='opener'> <Avatar person={isSelf ? currentUser : person} showEdit={isSelf} isLink={false} /> <h2> {person.name} <div className='social-media'> {facebook_url && <SocialMediaIcon type='facebook' value={facebook_url} />} {twitter_name && <SocialMediaIcon type='twitter' value={twitter_name} />} {linkedin_url && <SocialMediaIcon type='linkedin' value={linkedin_url} />} </div> </h2> <p className='meta'> {location && <span>{location}{spacer}</span>} {url && <span> <a href={url.format()} target='_blank'>{url.hostname}</a> {spacer} </span>} Joined {joinDate} </p> <p className='bio'>{bio}</p> {currentUser && !isSelf && hasFeature(currentUser, DIRECT_MESSAGES) && <button onClick={startMessage} className='dm-user'> <Icon name='Message-Smile' /> Message </button>} </div> {some(tags) && <div className='skills'> <h3>Skills</h3> {tags.map(tag => <A key={tag} to={peopleUrl(community) + `?search=%23${tag}`}> #{tag} </A>)} </div>} <div className={`section-links ${hasFeature(currentUser, CONTRIBUTORS) ? 'contributions-feature' : ''}`} ref={div => sectionLinks = div} onClick={scrollIntoView}> <TabLink category='offer' count={offerCount} /> <TabLink category='request' count={requestCount} /> <TabLink category='thank' count={person.thank_count} /> <TabLink category='event' count={person.event_count} /> {hasFeature(currentUser, CONTRIBUTORS) && <TabLink category='contribution' count={person.contribution_count} /> } </div> {!category && recentRequest && <div> <p className='section-label'>Recent request</p> <PostList posts={[recentRequest]} hideMobileSearch /> </div>} {!category && recentOffer && <div> <p className='section-label'>Recent offer</p> <PostList posts={[recentOffer]} hideMobileSearch /> </div>} <ListLabel category={category} /> {activityItems(category, person)} </CoverImagePage> }) PersonProfile.propTypes = { params: object, person: object, error: object, location: object, dispatch: func, recentRequest: object, recentOffer: object } export default PersonProfile const setupTabLink = (props) => { const { location, dispatch } = props const { query } = location const TabLink = ({ category, count }) => { const isActive = category === query.show let cssClasses = [category] if (isActive) { cssClasses.push('active') } const toggle = () => dispatch(refetch({show: isActive ? null : category}, location)) return <a className={cssClasses.join(' ')} onClick={toggle}> {count} {capitalize(category)}{Number(count) === 1 ? '' : 's'} </a> } return TabLink } const ListLabel = ({ category }) => { let label switch (category) { case 'offer': label = 'Offers'; break case 'request': label = 'Requests'; break case 'thank': label = 'Thanks'; break case 'contribution': label = 'Contributions'; break case 'event': label = 'Events'; break default: label = 'Recent posts' } return <p className='section-label'>{label}</p> } const SocialMediaIcon = ({ type, value }) => { let href switch (type) { case 'facebook': case 'linkedin': href = value break case 'twitter': href = `http://twitter.com/${value}` } return <a target='_blank' className={type} href={href}> <Icon name={type} /> </a> } const Thanks = connect((state, {person}) => ({ thanks: sortBy(t => -t.created_at, state.thanks[person.id]) }))(({ thanks, person, dispatch }) => { const visit = comment => dispatch(navigate(commentUrl(comment))) return <div className='thanks'> {thanks.map(thank => <div key={thank.id}> <span> <A to={`/u/${thank.thankedBy.id}`}>{thank.thankedBy.name}</A> &nbsp;thanked {person.name.split(' ')[0]} for: </span> <Comment comment={{...thank.comment, user: person}} truncate expand={() => visit(thank.comment)} /> </div>)} </div> }) const Contributions = connect((state, {person}) => ({ contributions: sortBy(contribution => -contribution.created_at, state.contributions[person.id]) }))(({ contributions, person, dispatch }) => { return <div className='contributions'> {contributions.map(({ post }) => <div key={post.id}> <span> {person.name.split(' ')[0]} helped {post.user.name} complete their request, <A to={`/p/${post.id}`}>"{post.name}"</A>. </span> </div>)} </div> })
client/components/Message/Attachments/components/Image.stories.js
VoiSmart/Rocket.Chat
import React from 'react'; import Retry from './Retry'; export default { title: 'components/Image', component: Image, }; // export const Default = () => <Image />; export const RetryImage = () => <Retry />;
node_modules/debug/src/browser.js
komun-community/akrostis
/** * This is the web browser implementation of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = require('./debug'); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = 'undefined' != typeof chrome && 'undefined' != typeof chrome.storage ? chrome.storage.local : localstorage(); /** * Colors. */ exports.colors = [ 'lightseagreen', 'forestgreen', 'goldenrod', 'dodgerblue', 'darkorchid', 'crimson' ]; /** * Currently only WebKit-based Web Inspectors, Firefox >= v31, * and the Firebug extension (any Firefox version) are known * to support "%c" CSS customizations. * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ function useColors() { // NB: In an Electron preload script, document will be defined but not fully // initialized. Since we know we're in Chrome, we'll just detect this case // explicitly if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') { return true; } // is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) || // is firebug? http://stackoverflow.com/a/398120/376773 (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) || // is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || // double check webkit in userAgent just in case we are in a worker (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); } /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ exports.formatters.j = function(v) { try { return JSON.stringify(v); } catch (err) { return '[UnexpectedJSONParseError]: ' + err.message; } }; /** * Colorize log arguments if enabled. * * @api public */ function formatArgs(args) { var useColors = this.useColors; args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff); if (!useColors) return; var c = 'color: ' + this.color; args.splice(1, 0, c, 'color: inherit') // the final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into var index = 0; var lastC = 0; args[0].replace(/%[a-zA-Z%]/g, function(match) { if ('%%' === match) return; index++; if ('%c' === match) { // we only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); } /** * Invokes `console.log()` when available. * No-op when `console.log` is not a "function". * * @api public */ function log() { // this hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { try { if (null == namespaces) { exports.storage.removeItem('debug'); } else { exports.storage.debug = namespaces; } } catch(e) {} } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { try { return exports.storage.debug; } catch(e) {} // If debug isn't set in LS, and we're in Electron, try to load $DEBUG if (typeof process !== 'undefined' && 'env' in process) { return process.env.DEBUG; } } /** * Enable namespaces listed in `localStorage.debug` initially. */ exports.enable(load()); /** * Localstorage attempts to return the localstorage. * * This is necessary because safari throws * when a user disables cookies/localstorage * and you attempt to access it. * * @return {LocalStorage} * @api private */ function localstorage() { try { return window.localStorage; } catch (e) {} }
src/client/todos/buttons.react.js
sljuka/portfulio
// import {FormattedMessage} from 'react-intl'; import * as actions from '../todos/actions'; import Component from '../components/component.react'; import React from 'react'; import {msg} from '../intl/store'; class TodoButtons extends Component { static propTypes = { clearAllEnabled: React.PropTypes.bool.isRequired }; render() { return ( <div className="buttons"> <button children={msg('todos.clearAll')} disabled={!this.props.clearAllEnabled} onClick={actions.clearAll} /> <button children={msg('todos.add100')} onClick={actions.addHundredTodos} /> {/* TODO: Reimplement undo. */} {/*<button disabled={undoStates.length === 1} onClick={() => this.undo()} ><FormattedMessage message={msg('todos.undo')} steps={undoStates.length - 1} /></button>*/} </div> ); } } export default TodoButtons;
ajax/libs/forerunnerdb/1.4.59/fdb-all.min.js
jonobr1/cdnjs
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d=a("./core");a("../lib/CollectionGroup"),a("../lib/View"),a("../lib/Highchart"),a("../lib/Persist"),a("../lib/Document"),a("../lib/Overview"),a("../lib/Grid"),a("../lib/NodeApiClient"),a("../lib/BinaryLog");"undefined"!=typeof window&&(window.ForerunnerDB=d),b.exports=d},{"../lib/BinaryLog":4,"../lib/CollectionGroup":7,"../lib/Document":11,"../lib/Grid":13,"../lib/Highchart":14,"../lib/NodeApiClient":30,"../lib/Overview":33,"../lib/Persist":35,"../lib/View":42,"./core":2}],2:[function(a,b,c){var d=a("../lib/Core");a("../lib/Shim.IE8");"undefined"!=typeof window&&(window.ForerunnerDB=d),b.exports=d},{"../lib/Core":9,"../lib/Shim.IE8":41}],3:[function(a,b,c){"use strict";var d,e=a("./Shared"),f=a("./Path"),g=function(a){this._primaryKey="_id",this._keyArr=[],this._data=[],this._objLookup={},this._count=0,this._keyArr=d.parse(a,!0)};e.addModule("ActiveBucket",g),e.mixin(g.prototype,"Mixin.Sorting"),d=new f,e.synthesize(g.prototype,"primaryKey"),g.prototype.qs=function(a,b,c,d){if(!b.length)return 0;for(var e,f,g,h=-1,i=0,j=b.length-1;j>=i&&(e=Math.floor((i+j)/2),h!==e);)f=b[e],void 0!==f&&(g=d(this,a,c,f),g>0&&(i=e+1),g<0&&(j=e-1)),h=e;return g>0?e+1:e},g.prototype._sortFunc=function(a,b,c,e){var f,g,h,i=c.split(".:."),j=e.split(".:."),k=a._keyArr,l=k.length;for(f=0;f<l;f++)if(g=k[f],h=typeof d.get(b,g.path),"number"===h&&(i[f]=Number(i[f]),j[f]=Number(j[f])),i[f]!==j[f]){if(1===g.value)return a.sortAsc(i[f],j[f]);if(g.value===-1)return a.sortDesc(i[f],j[f])}},g.prototype.insert=function(a){var b,c;return b=this.documentKey(a),c=this._data.indexOf(b),c===-1?(c=this.qs(a,this._data,b,this._sortFunc),this._data.splice(c,0,b)):this._data.splice(c,0,b),this._objLookup[a[this._primaryKey]]=b,this._count++,c},g.prototype.remove=function(a){var b,c;return b=this._objLookup[a[this._primaryKey]],!!b&&(c=this._data.indexOf(b),c>-1&&(this._data.splice(c,1),delete this._objLookup[a[this._primaryKey]],this._count--,!0))},g.prototype.index=function(a){var b,c;return b=this.documentKey(a),c=this._data.indexOf(b),c===-1&&(c=this.qs(a,this._data,b,this._sortFunc)),c},g.prototype.documentKey=function(a){var b,c,e="",f=this._keyArr,g=f.length;for(b=0;b<g;b++)c=f[b],e&&(e+=".:."),e+=d.get(a,c.path);return e+=".:."+a[this._primaryKey]},g.prototype.count=function(){return this._count},e.finishModule("ActiveBucket"),b.exports=g},{"./Path":34,"./Shared":40}],4:[function(a,b,c){"use strict";var d,e,f,g,h,i,j;d=a("./Shared"),j=function(){this.init.apply(this,arguments)},j.prototype.init=function(a){var b=this;b._logCounter=0,b._parent=a,b.size(1e3)},d.addModule("BinaryLog",j),d.mixin(j.prototype,"Mixin.Common"),d.mixin(j.prototype,"Mixin.ChainReactor"),d.mixin(j.prototype,"Mixin.Events"),f=d.modules.Collection,h=d.modules.Db,e=d.modules.ReactorIO,g=f.prototype.init,i=h.prototype.init,d.synthesize(j.prototype,"name"),d.synthesize(j.prototype,"size"),j.prototype.attachIO=function(){var a=this;a._io||(a._log=new f(a._parent.name()+"-BinaryLog",{capped:!0,size:a.size()}),a._log.objectId=function(b){return b||(b=++a._logCounter),b},a._io=new e(a._parent,a,function(b){return a._log.insert({type:b.type,data:b.data}),!1}))},j.prototype.detachIO=function(){var a=this;a._io&&(a._log.drop(),a._io.drop(),delete a._log,delete a._io)},f.prototype.init=function(){g.apply(this,arguments),this._binaryLog=new j(this)},d.finishModule("BinaryLog"),b.exports=j},{"./Shared":40}],5:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=new e,g=function(a,b,c){this.init.apply(this,arguments)};g.prototype.init=function(a,b,c,d,e){this._store=[],this._keys=[],void 0!==c&&this.primaryKey(c),void 0!==b&&this.index(b),void 0!==d&&this.compareFunc(d),void 0!==e&&this.hashFunc(e),void 0!==a&&this.data(a)},d.addModule("BinaryTree",g),d.mixin(g.prototype,"Mixin.ChainReactor"),d.mixin(g.prototype,"Mixin.Sorting"),d.mixin(g.prototype,"Mixin.Common"),d.synthesize(g.prototype,"compareFunc"),d.synthesize(g.prototype,"hashFunc"),d.synthesize(g.prototype,"indexDir"),d.synthesize(g.prototype,"primaryKey"),d.synthesize(g.prototype,"keys"),d.synthesize(g.prototype,"index",function(a){return void 0!==a&&(this.debug()&&console.log("Setting index",a,f.parse(a,!0)),this.keys(f.parse(a,!0))),this.$super.call(this,a)}),g.prototype.clear=function(){delete this._data,delete this._left,delete this._right,this._store=[]},g.prototype.data=function(a){return void 0!==a?(this._data=a,this._hashFunc&&(this._hash=this._hashFunc(a)),this):this._data},g.prototype.push=function(a){return void 0!==a&&(this._store.push(a),this)},g.prototype.pull=function(a){if(void 0!==a){var b=this._store.indexOf(a);if(b>-1)return this._store.splice(b,1),this}return!1},g.prototype._compareFunc=function(a,b){var c,d,e=0;for(c=0;c<this._keys.length;c++)if(d=this._keys[c],1===d.value?e=this.sortAscIgnoreUndefined(f.get(a,d.path),f.get(b,d.path)):d.value===-1&&(e=this.sortDescIgnoreUndefined(f.get(a,d.path),f.get(b,d.path))),this.debug()&&console.log("Compared %s with %s order %d in path %s and result was %d",f.get(a,d.path),f.get(b,d.path),d.value,d.path,e),0!==e)return this.debug()&&console.log("Retuning result %d",e),e;return this.debug()&&console.log("Retuning result %d",e),e},g.prototype._hashFunc=function(a){return a[this._keys[0].path]},g.prototype.removeChildNode=function(a){this._left===a?delete this._left:this._right===a&&delete this._right},g.prototype.nodeBranch=function(a){return this._left===a?"left":this._right===a?"right":void 0},g.prototype.insert=function(a){var b,c,d,e;if(a instanceof Array){for(c=[],d=[],e=0;e<a.length;e++)this.insert(a[e])?c.push(a[e]):d.push(a[e]);return{inserted:c,failed:d}}return this.debug()&&console.log("Inserting",a),this._data?(b=this._compareFunc(this._data,a),0===b?(this.debug()&&console.log("Data is equal (currrent, new)",this._data,a),this._left?this._left.insert(a):(this._left=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._left._parent=this),!0):b===-1?(this.debug()&&console.log("Data is greater (currrent, new)",this._data,a),this._right?this._right.insert(a):(this._right=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._right._parent=this),!0):1===b&&(this.debug()&&console.log("Data is less (currrent, new)",this._data,a),this._left?this._left.insert(a):(this._left=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._left._parent=this),!0)):(this.debug()&&console.log("Node has no data, setting data",a),this.data(a),!0)},g.prototype.remove=function(a){var b,c,d,e=this.primaryKey();if(a instanceof Array){for(c=[],d=0;d<a.length;d++)this.remove(a[d])&&c.push(a[d]);return c}return this.debug()&&console.log("Removing",a),this._data[e]===a[e]?this._remove(this):(b=this._compareFunc(this._data,a),b===-1&&this._right?this._right.remove(a):!(1!==b||!this._left)&&this._left.remove(a))},g.prototype._remove=function(a){var b,c;return this._left?(b=this._left,c=this._right,this._left=b._left,this._right=b._right,this._data=b._data,this._store=b._store,c&&(b.rightMost()._right=c)):this._right?(c=this._right,this._left=c._left,this._right=c._right,this._data=c._data,this._store=c._store):this.clear(),!0},g.prototype.leftMost=function(){return this._left?this._left.leftMost():this},g.prototype.rightMost=function(){return this._right?this._right.rightMost():this},g.prototype.lookup=function(a,b,c,d){var e=this._compareFunc(this._data,a);return d=d||[],0===e&&(this._left&&this._left.lookup(a,b,c,d),d.push(this._data),this._right&&this._right.lookup(a,b,c,d)),e===-1&&this._right&&this._right.lookup(a,b,c,d),1===e&&this._left&&this._left.lookup(a,b,c,d),d},g.prototype.inOrder=function(a,b){switch(b=b||[],this._left&&this._left.inOrder(a,b),a){case"hash":b.push(this._hash);break;case"data":b.push(this._data);break;default:b.push({key:this._data,arr:this._store})}return this._right&&this._right.inOrder(a,b),b},g.prototype.startsWith=function(a,b,c,d){var e,g,h=f.get(this._data,a),i=h.substr(0,b.length);return d=d||[],void 0===d._visitedCount&&(d._visitedCount=0),d._visitedCount++,d._visitedNodes=d._visitedNodes||[],d._visitedNodes.push(h),g=this.sortAscIgnoreUndefined(i,b),e=i===b,0===g&&(this._left&&this._left.startsWith(a,b,c,d),e&&d.push(this._data),this._right&&this._right.startsWith(a,b,c,d)),g===-1&&(e&&d.push(this._data),this._right&&this._right.startsWith(a,b,c,d)),1===g&&(this._left&&this._left.startsWith(a,b,c,d),e&&d.push(this._data)),d},g.prototype.findRange=function(a,b,c,d,f,g){f=f||[],g=g||new e(b),this._left&&this._left.findRange(a,b,c,d,f,g);var h=g.value(this._data),i=this.sortAscIgnoreUndefined(h,c),j=this.sortAscIgnoreUndefined(h,d);if(!(0!==i&&1!==i||0!==j&&j!==-1))switch(a){case"hash":f.push(this._hash);break;case"data":f.push(this._data);break;default:f.push({key:this._data,arr:this._store})}return this._right&&this._right.findRange(a,b,c,d,f,g),f},g.prototype.match=function(a,b,c){var d,e,g,h=[],i=0;for(d=f.parseArr(this._index,{verbose:!0}),e=f.parseArr(a,c&&c.pathOptions?c.pathOptions:{ignore:/\$/,verbose:!0}),g=0;g<d.length;g++)e[g]===d[g]&&(i++,h.push(e[g]));return{matchedKeys:h,totalKeyCount:e.length,score:i}},d.finishModule("BinaryTree"),b.exports=g},{"./Path":34,"./Shared":40}],6:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o;d=a("./Shared");var p=function(a,b){this.init.apply(this,arguments)};p.prototype.init=function(a,b){b=b||{},this.sharedPathSolver=o,this._primaryKey=b.primaryKey||"_id",this._primaryIndex=new g("primary",{primaryKey:this.primaryKey()}),this._primaryCrc=new g("primaryCrc",{primaryKey:this.primaryKey()}),this._crcLookup=new g("crcLookup",{primaryKey:this.primaryKey()}),this._name=a,this._data=[],this._metrics=new f,this._options=b||{changeTimestamp:!1},this._options.db&&this.db(this._options.db),this._metaData={},this._deferQueue={insert:[],update:[],remove:[],upsert:[],async:[]},this._deferThreshold={insert:100,update:100,remove:100,upsert:100},this._deferTime={insert:1,update:1,remove:1,upsert:1},this._deferredCalls=!0,this.subsetOf(this)},d.addModule("Collection",p),d.mixin(p.prototype,"Mixin.Common"),d.mixin(p.prototype,"Mixin.Events"),d.mixin(p.prototype,"Mixin.ChainReactor"),d.mixin(p.prototype,"Mixin.CRUD"),d.mixin(p.prototype,"Mixin.Constants"),d.mixin(p.prototype,"Mixin.Triggers"),d.mixin(p.prototype,"Mixin.Sorting"),d.mixin(p.prototype,"Mixin.Matching"),d.mixin(p.prototype,"Mixin.Updating"),d.mixin(p.prototype,"Mixin.Tags"),f=a("./Metrics"),g=a("./KeyValueStore"),h=a("./Path"),i=a("./IndexHashMap"),j=a("./IndexBinaryTree"),k=a("./Index2d"),e=d.modules.Db,l=a("./Overload"),m=a("./ReactorIO"),n=a("./Condition"),o=new h,d.synthesize(p.prototype,"deferredCalls"),d.synthesize(p.prototype,"state"),d.synthesize(p.prototype,"name"),d.synthesize(p.prototype,"metaData"),d.synthesize(p.prototype,"capped"),d.synthesize(p.prototype,"cappedSize"),p.prototype._asyncPending=function(a){this._deferQueue.async.push(a)},p.prototype._asyncComplete=function(a){for(var b=this._deferQueue.async.indexOf(a);b>-1;)this._deferQueue.async.splice(b,1),b=this._deferQueue.async.indexOf(a);0===this._deferQueue.async.length&&this.deferEmit("ready")},p.prototype.data=function(){return this._data},p.prototype.drop=function(a){var b;if(this.isDropped())return a&&a.call(this,!1,!0),!0;if(this._db&&this._db._collection&&this._name){if(this.debug()&&console.log(this.logIdentifier()+" Dropping"),this._state="dropped",this.emit("drop",this),delete this._db._collection[this._name],this._collate)for(b in this._collate)this._collate.hasOwnProperty(b)&&this.collateRemove(b);return delete this._primaryKey,delete this._primaryIndex,delete this._primaryCrc,delete this._crcLookup,delete this._data,delete this._metrics,delete this._listeners,a&&a.call(this,!1,!0),!0}return a&&a.call(this,!1,!0),!1},p.prototype.primaryKey=function(a){if(void 0!==a){if(this._primaryKey!==a){var b=this._primaryKey;this._primaryKey=a,this._primaryIndex.primaryKey(a),this.rebuildPrimaryKeyIndex(),this.chainSend("primaryKey",{keyName:a,oldData:b})}return this}return this._primaryKey},p.prototype._onInsert=function(a,b){this.emit("insert",a,b)},p.prototype._onUpdate=function(a){this.emit("update",a)},p.prototype._onRemove=function(a){this.emit("remove",a)},p.prototype._onChange=function(){this._options.changeTimestamp&&(this._metaData.lastChange=this.serialiser.convert(new Date))},d.synthesize(p.prototype,"db",function(a){return a&&"_id"===this.primaryKey()&&(this.primaryKey(a.primaryKey()),this.debug(a.debug())),this.$super.apply(this,arguments)}),d.synthesize(p.prototype,"mongoEmulation"),p.prototype.setData=new l("Collection.prototype.setData",{"*":function(a){return this.$main.call(this,a,{})},"*, object":function(a,b){return this.$main.call(this,a,b)},"*, function":function(a,b){return this.$main.call(this,a,{},b)},"*, *, function":function(a,b,c){return this.$main.call(this,a,b,c)},"*, *, *":function(a,b,c){return this.$main.call(this,a,b,c)},$main:function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";if(a){var d=this.deferredCalls(),e=[].concat(this._data);this.deferredCalls(!1),b=this.options(b),b.$decouple&&(a=this.decouple(a)),a instanceof Array||(a=[a]),this.remove({}),this.insert(a),this.deferredCalls(d),this._onChange(),this.emit("setData",this._data,e)}return c&&c.call(this),this}}),p.prototype.rebuildPrimaryKeyIndex=function(a){a=a||{$ensureKeys:void 0,$violationCheck:void 0};var b,c,d,e,f=!a||void 0===a.$ensureKeys||a.$ensureKeys,g=!a||void 0===a.$violationCheck||a.$violationCheck,h=this._primaryIndex,i=this._primaryCrc,j=this._crcLookup,k=this._primaryKey;for(h.truncate(),i.truncate(),j.truncate(),b=this._data,c=b.length;c--;){if(d=b[c],f&&this.ensurePrimaryKey(d),g){if(!h.uniqueSet(d[k],d))throw this.logIdentifier()+" Call to setData on collection failed because your data violates the primary key unique constraint. One or more documents are using the same primary key: "+d[this._primaryKey]}else h.set(d[k],d);e=this.hash(d),i.set(d[k],e),j.set(e,d)}},p.prototype.ensurePrimaryKey=function(a){void 0===a[this._primaryKey]&&(a[this._primaryKey]=this.objectId())},p.prototype.truncate=function(){var a;if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";this.emit("truncate",this._data),this._data.length=0,this._primaryIndex=new g("primary",{primaryKey:this.primaryKey()}),this._primaryCrc=new g("primaryCrc",{primaryKey:this.primaryKey()}),this._crcLookup=new g("crcLookup",{primaryKey:this.primaryKey()});for(a in this._indexByName)this._indexByName.hasOwnProperty(a)&&this._indexByName[a].rebuild();return this._onChange(),this.emit("immediateChange",{type:"truncate"}),this.deferEmit("change",{type:"truncate"}),this},p.prototype.upsert=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";if(a){var c,d,e=this._deferQueue.upsert,f=this._deferThreshold.upsert,g={};if(a instanceof Array){if(this._deferredCalls&&a.length>f)return this._deferQueue.upsert=e.concat(a),this._asyncPending("upsert"),this.processQueue("upsert",b),{};for(g=[],d=0;d<a.length;d++)g.push(this.upsert(a[d]));return b&&b.call(this),g}switch(a[this._primaryKey]?(c={},c[this._primaryKey]=a[this._primaryKey],this._primaryIndex.lookup(c)[0]?g.op="update":g.op="insert"):g.op="insert",g.op){case"insert":g.result=this.insert(a,b);break;case"update":g.result=this.update(c,a,{},b)}return g}return b&&b.call(this),{}},p.prototype.filter=function(a,b,c){var d;return"function"==typeof a&&(c=a,a={},b={}),"function"==typeof b&&(c&&(d=c),c=b,b=d||{}),this.find(a,b).filter(c)},p.prototype.filterUpdate=function(a,b,c){var d,e,f,g,h=this.find(a,c),i=[],j=this.primaryKey();for(g=0;g<h.length;g++)d=h[g],f=b(d),f&&(e={},e[j]=d[j],i.push(this.update(e,f)));return i},p.prototype.update=function(a,b,c,d){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return this.mongoEmulation()?(this.convertToFdb(a),this.convertToFdb(b)):b=this.decouple(b),b.$replace&&(c=c||{},c.$replace=!0,b=b.$replace),b=this.transformIn(b),this._handleUpdate(a,b,c,d)},p.prototype._handleUpdate=function(a,b,c,d){var e,f,g=this,h=this._metrics.create("update"),i=function(d){var e,f,i,j=g.decouple(d);return g.willTrigger(g.TYPE_UPDATE,g.PHASE_BEFORE)||g.willTrigger(g.TYPE_UPDATE,g.PHASE_AFTER)?(e=g.decouple(d),f={type:"update",query:g.decouple(a),update:g.decouple(b),options:g.decouple(c),op:h},i=g.updateObject(e,f.update,f.query,f.options,""),g.processTrigger(f,g.TYPE_UPDATE,g.PHASE_BEFORE,d,e)!==!1?(g._removeFromIndexes(d),i=g.updateObject(d,e,f.query,f.options,""),g._insertIntoIndexes(d),g.processTrigger(f,g.TYPE_UPDATE,g.PHASE_AFTER,j,e)):i=!1):(g._removeFromIndexes(d),i=g.updateObject(d,b,a,c,""),g._insertIntoIndexes(d)),i};return h.start(),h.time("Retrieve documents to update"),e=this.find(a,{$decouple:!1}),h.time("Retrieve documents to update"),e.length?(h.time("Update documents"),f=e.filter(i),h.time("Update documents"),f.length?(this.debug()&&console.log(this.logIdentifier()+" Updated some data"),h.time("Resolve chains"),this.chainWillSend()&&this.chainSend("update",{query:a,update:b,dataSet:this.decouple(f)},c),h.time("Resolve chains"),this._onUpdate(f),this._onChange(),d&&d.call(this,f||[]),this.emit("immediateChange",{type:"update",data:f}),this.deferEmit("change",{type:"update",data:f})):d&&d.call(this,f||[])):d&&d.call(this,f||[]),h.stop(),f||[]},p.prototype._replaceObj=function(a,b){var c;this._removeFromIndexes(a);for(c in a)a.hasOwnProperty(c)&&delete a[c];for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);if(!this._insertIntoIndexes(a))throw this.logIdentifier()+" Primary key violation in update! Key violated: "+a[this._primaryKey];return this},p.prototype.updateById=function(a,b,c,d){var e,f={};return f[this._primaryKey]=a,d&&(e=function(a){d(a[0])}),this.update(f,b,c,e)[0]},p.prototype.updateObject=function(a,b,c,d,e,f){b=this.decouple(b),e=e||"","."===e.substr(0,1)&&(e=e.substr(1,e.length-1));var g,i,j,k,l,m,n,o,p,q,r,s,t=!1,u=!1;if(d&&d.$replace===!0){g=!0,n=b,o=this.primaryKey();for(m in a)a.hasOwnProperty(m)&&m!==o&&void 0===n[m]&&(this._updateUnset(a,m),t=!0);for(m in n)n.hasOwnProperty(m)&&m!==o&&(this._updateOverwrite(a,m,n[m]),t=!0);return t}for(s in b)if(b.hasOwnProperty(s)){if(g=!1,!g&&"$"===s.substr(0,1))switch(s){case"$key":case"$index":case"$data":case"$min":case"$max":g=!0;break;case"$each":for(g=!0,k=b.$each.length,j=0;j<k;j++)u=this.updateObject(a,b.$each[j],c,d,e),u&&(t=!0);t=t||u;break;case"$replace":g=!0,n=b.$replace,o=this.primaryKey();for(m in a)a.hasOwnProperty(m)&&m!==o&&void 0===n[m]&&(this._updateUnset(a,m),t=!0);for(m in n)n.hasOwnProperty(m)&&m!==o&&(this._updateOverwrite(a,m,n[m]),t=!0);break;default:g=!0,u=this.updateObject(a,b[s],c,d,e,s),t=t||u}if(!g&&this._isPositionalKey(s)&&(g=!0,s=s.substr(0,s.length-2),p=new h(e+"."+s),a[s]&&a[s]instanceof Array&&a[s].length)){for(i=[],j=0;j<a[s].length;j++)this._match(a[s][j],p.value(c)[0],d,"",{})&&i.push(j);for(j=0;j<i.length;j++)u=this.updateObject(a[s][i[j]],b[s+".$"],c,d,e+"."+s,f),t=t||u}if(!g)if(f||"object"!=typeof b[s])switch(f){case"$inc":var v=!0;b[s]>0?b.$max&&a[s]>=b.$max&&(v=!1):b[s]<0&&b.$min&&a[s]<=b.$min&&(v=!1),v&&(this._updateIncrement(a,s,b[s]),t=!0);break;case"$cast":switch(b[s]){case"array":a[s]instanceof Array||(this._updateProperty(a,s,b.$data||[]),t=!0);break;case"object":a[s]instanceof Object&&!(a[s]instanceof Array)||(this._updateProperty(a,s,b.$data||{}),t=!0);break;case"number":"number"!=typeof a[s]&&(this._updateProperty(a,s,Number(a[s])),t=!0);break;case"string":"string"!=typeof a[s]&&(this._updateProperty(a,s,String(a[s])),t=!0);break;default:throw this.logIdentifier()+" Cannot update cast to unknown type: "+b[s]}break;case"$push":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot push to a key that is not an array! ("+s+")";if(void 0!==b[s].$position&&b[s].$each instanceof Array)for(l=b[s].$position,k=b[s].$each.length,j=0;j<k;j++)this._updateSplicePush(a[s],l+j,b[s].$each[j]);else if(b[s].$each instanceof Array)for(k=b[s].$each.length,j=0;j<k;j++)this._updatePush(a[s],b[s].$each[j]);else this._updatePush(a[s],b[s]);t=!0;break;case"$pull":if(a[s]instanceof Array){for(i=[],j=0;j<a[s].length;j++)this._match(a[s][j],b[s],d,"",{})&&i.push(j);for(k=i.length;k--;)this._updatePull(a[s],i[k]),t=!0}break;case"$pullAll":if(a[s]instanceof Array){if(!(b[s]instanceof Array))throw this.logIdentifier()+" Cannot pullAll without being given an array of values to pull! ("+s+")";if(i=a[s],k=i.length,k>0)for(;k--;){for(l=0;l<b[s].length;l++)i[k]===b[s][l]&&(this._updatePull(a[s],k),k--,t=!0);if(k<0)break}}break;case"$addToSet":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot addToSet on a key that is not an array! ("+s+")";var w,x,y,z,A=a[s],B=A.length,C=!0,D=d&&d.$addToSet;for(b[s].$key?(y=!1,z=new h(b[s].$key),x=z.value(b[s])[0],delete b[s].$key):D&&D.key?(y=!1,z=new h(D.key),x=z.value(b[s])[0]):(x=this.jStringify(b[s]),y=!0),w=0;w<B;w++)if(y){if(this.jStringify(A[w])===x){C=!1;break}}else if(x===z.value(A[w])[0]){C=!1;break}C&&(this._updatePush(a[s],b[s]),t=!0);break;case"$splicePush":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot splicePush with a key that is not an array! ("+s+")";if(l=b.$index,void 0===l)throw this.logIdentifier()+" Cannot splicePush without a $index integer value!";delete b.$index,l>a[s].length&&(l=a[s].length),this._updateSplicePush(a[s],l,b[s]),t=!0;break;case"$splicePull":if(void 0!==a[s]){if(!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot splicePull from a key that is not an array! ("+s+")";if(l=b[s].$index,void 0===l)throw this.logIdentifier()+" Cannot splicePull without a $index integer value!";l<a[s].length&&(this._updateSplicePull(a[s],l),t=!0)}break;case"$move":if(!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot move on a key that is not an array! ("+s+")";for(j=0;j<a[s].length;j++)if(this._match(a[s][j],b[s],d,"",{})){var E=b.$index;if(void 0===E)throw this.logIdentifier()+" Cannot move without a $index integer value!";delete b.$index,this._updateSpliceMove(a[s],j,E),t=!0;break}break;case"$mul":this._updateMultiply(a,s,b[s]),t=!0;break;case"$rename":this._updateRename(a,s,b[s]),t=!0;break;case"$overwrite":this._updateOverwrite(a,s,b[s]),t=!0;break;case"$unset":this._updateUnset(a,s),t=!0;break;case"$clear":this._updateClear(a,s),t=!0;break;case"$pop":if(!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot pop from a key that is not an array! ("+s+")";this._updatePop(a[s],b[s])&&(t=!0);break;case"$toggle":this._updateProperty(a,s,!a[s]),t=!0;break;default:a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0)}else if(null!==a[s]&&"object"==typeof a[s])if(q=a[s]instanceof Array,r=b[s]instanceof Array,q||r)if(!r&&q)for(j=0;j<a[s].length;j++)u=this.updateObject(a[s][j],b[s],c,d,e+"."+s,f),t=t||u;else a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0);else a[s]instanceof Date?(this._updateProperty(a,s,b[s]),t=!0):(u=this.updateObject(a[s],b[s],c,d,e+"."+s,f),t=t||u);else a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0)}return t},p.prototype._isPositionalKey=function(a){return".$"===a.substr(a.length-2,2)},p.prototype.remove=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";var d,e,f,g,h,i,j,k,l=this;if("function"==typeof b&&(c=b,b={}),this.mongoEmulation()&&this.convertToFdb(a),a instanceof Array){for(g=[],f=0;f<a.length;f++)g.push(this.remove(a[f],{noEmit:!0}));return(!b||b&&!b.noEmit)&&this._onRemove(g),c&&c.call(this,!1,g),g}if(g=[],d=this.find(a,{$decouple:!1}),d.length){h=function(a){l._removeFromIndexes(a),e=l._data.indexOf(a),l._dataRemoveAtIndex(e),g.push(a)};for(var m=0;m<d.length;m++)j=d[m],l.willTrigger(l.TYPE_REMOVE,l.PHASE_BEFORE)||l.willTrigger(l.TYPE_REMOVE,l.PHASE_AFTER)?(i={type:"remove"},k=l.decouple(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_BEFORE,k,k)!==!1&&(h(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_AFTER,k,k))):h(j);g.length&&(l.chainSend("remove",{query:a,dataSet:g},b),(!b||b&&!b.noEmit)&&this._onRemove(g),this._onChange(),this.emit("immediateChange",{type:"remove",data:g}),this.deferEmit("change",{type:"remove",data:g}))}return c&&c.call(this,!1,g),g},p.prototype.removeById=function(a){var b={};return b[this._primaryKey]=a,this.remove(b)[0]},p.prototype.processQueue=function(a,b,c){var d,e,f=this,g=this._deferQueue[a],h=this._deferThreshold[a],i=this._deferTime[a];if(c=c||{deferred:!0},g.length){switch(d=g.length>h?g.splice(0,h):g.splice(0,g.length),e=f[a](d),a){case"insert":c.inserted=c.inserted||[],c.failed=c.failed||[],c.inserted=c.inserted.concat(e.inserted),c.failed=c.failed.concat(e.failed)}setTimeout(function(){f.processQueue.call(f,a,b,c)},i)}else b&&b.call(this,c),this._asyncComplete(a);this.isProcessingQueue()||this.deferEmit("queuesComplete")},p.prototype.isProcessingQueue=function(){var a;for(a in this._deferQueue)if(this._deferQueue.hasOwnProperty(a)&&this._deferQueue[a].length)return!0;return!1},p.prototype.insert=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return"function"==typeof b?(c=b,b=this._data.length):void 0===b&&(b=this._data.length),a=this.transformIn(a),this._insertHandle(a,b,c)},p.prototype._insertHandle=function(a,b,c){var d,e,f,g=this._deferQueue.insert,h=this._deferThreshold.insert,i=[],j=[];if(a instanceof Array){if(this._deferredCalls&&a.length>h)return this._deferQueue.insert=g.concat(a),this._asyncPending("insert"),void this.processQueue("insert",c);for(f=0;f<a.length;f++)d=this._insert(a[f],b+f),d===!0?i.push(a[f]):j.push({doc:a[f],reason:d})}else d=this._insert(a,b),d===!0?i.push(a):j.push({doc:a,reason:d});return e={deferred:!1,inserted:i,failed:j},this._onInsert(i,j),c&&c.call(this,e),this._onChange(),this.emit("immediateChange",{type:"insert",data:i,failed:j}),this.deferEmit("change",{type:"insert",data:i,failed:j}),e},p.prototype._insert=function(a,b){if(a){var c,d,e,f,g=this,h=this.capped(),i=this.cappedSize();if(this.ensurePrimaryKey(a),c=this.insertIndexViolation(a),e=function(a){g._insertIntoIndexes(a),b>g._data.length&&(b=g._data.length),g._dataInsertAtIndex(b,a),h&&g._data.length>i&&g.removeById(g._data[0][g._primaryKey]),g.chainWillSend()&&g.chainSend("insert",{dataSet:g.decouple([a])},{index:b})},c)return"Index violation in index: "+c;if(g.willTrigger(g.TYPE_INSERT,g.PHASE_BEFORE)||g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)){if(d={type:"insert"},g.processTrigger(d,g.TYPE_INSERT,g.PHASE_BEFORE,{},a)===!1)return"Trigger cancelled operation";e(a),g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)&&(f=g.decouple(a),g.processTrigger(d,g.TYPE_INSERT,g.PHASE_AFTER,{},f))}else e(a);return!0}return"No document passed to insert"},p.prototype._dataInsertAtIndex=function(a,b){this._data.splice(a,0,b)},p.prototype._dataRemoveAtIndex=function(a){this._data.splice(a,1)},p.prototype._dataReplace=function(a){for(;this._data.length;)this._data.pop();this._data=this._data.concat(a)},p.prototype._insertIntoIndexes=function(a){var b,c,d=this._indexByName,e=this.hash(a),f=this._primaryKey;c=this._primaryIndex.uniqueSet(a[f],a),this._primaryCrc.uniqueSet(a[f],e),this._crcLookup.uniqueSet(e,a);for(b in d)d.hasOwnProperty(b)&&d[b].insert(a);return c},p.prototype._removeFromIndexes=function(a){var b,c=this._indexByName,d=this.hash(a),e=this._primaryKey;this._primaryIndex.unSet(a[e]),this._primaryCrc.unSet(a[e]),this._crcLookup.unSet(d);for(b in c)c.hasOwnProperty(b)&&c[b].remove(a)},p.prototype._updateIndexes=function(a,b){this._removeFromIndexes(a),this._insertIntoIndexes(b)},p.prototype._rebuildIndexes=function(){var a,b=this._indexByName;for(a in b)b.hasOwnProperty(a)&&b[a].rebuild()},p.prototype.subset=function(a,b){var c,d=this.find(a,b);return c=new p,c.db(this._db),c.subsetOf(this).primaryKey(this._primaryKey).setData(d),c},d.synthesize(p.prototype,"subsetOf"),p.prototype.isSubsetOf=function(a){return this._subsetOf===a},p.prototype.distinct=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";var d,e,f=this.find(b,c),g=new h(a),i={},j=[];for(e=0;e<f.length;e++)d=g.value(f[e])[0],d&&!i[d]&&(i[d]=!0,j.push(d));return j},p.prototype.findById=function(a,b){var c={};return c[this._primaryKey]=a,this.find(c,b)[0]},p.prototype.peek=function(a,b){var c,d,e=this._data,f=e.length,g=new p,h=typeof a;if("string"===h){for(c=0;c<f;c++)d=this.jStringify(e[c]),d.indexOf(a)>-1&&g.insert(e[c]);return g.find({},b)}return this.find(a,b)},p.prototype.explain=function(a,b){var c=this.find(a,b);return c.__fdbOp._data},p.prototype.options=function(a){return a=a||{},a.$decouple=void 0===a.$decouple||a.$decouple,a.$explain=void 0!==a.$explain&&a.$explain,a},p.prototype.find=function(a,b,c){return this.mongoEmulation()&&this.convertToFdb(a),c?(c.call(this,"Callbacks for the find() operation are not yet implemented!",[]),[]):this._find.call(this,a,b,c)},p.prototype._find=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";a=a||{};var c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=this._metrics.create("find"),y=this.primaryKey(),z=this,A=!0,B={},C=[],D=[],E=[],F={},G={};if(b instanceof Array||(b=this.options(b)),w=function(c){return z._match(c,a,b,"and",F)},x.start(),a){if(a instanceof Array){for(v=this,n=0;n<a.length;n++)v=v.subset(a[n],b&&b[n]?b[n]:{});return v.find()}if(a.$findSub){if(!a.$findSub.$path)throw"$findSub missing $path property!";return this.findSub(a.$findSub.$query,a.$findSub.$path,a.$findSub.$subQuery,a.$findSub.$subOptions)}if(a.$findSubOne){if(!a.$findSubOne.$path)throw"$findSubOne missing $path property!";return this.findSubOne(a.$findSubOne.$query,a.$findSubOne.$path,a.$findSubOne.$subQuery,a.$findSubOne.$subOptions)}if(x.time("analyseQuery"),c=this._analyseQuery(z.decouple(a),b,x),x.time("analyseQuery"),x.data("analysis",c),c.hasJoin&&c.queriesJoin){for(x.time("joinReferences"),f=0;f<c.joinsOn.length;f++)m=c.joinsOn[f],j=m.key,k=m.type,l=m.id,i=new h(c.joinQueries[j]),g=i.value(a)[0],B[l]=this._db[k](j).subset(g),delete a[c.joinQueries[j]];x.time("joinReferences")}if(c.indexMatch.length&&(!b||b&&!b.$skipIndex)?(x.data("index.potential",c.indexMatch),x.data("index.used",c.indexMatch[0].index),x.time("indexLookup"),e=[].concat(c.indexMatch[0].lookup)||[],x.time("indexLookup"),c.indexMatch[0].keyData.totalKeyCount===c.indexMatch[0].keyData.score&&(A=!1)):x.flag("usedIndex",!1),A&&(e&&e.length?(d=e.length,x.time("tableScan: "+d),e=e.filter(w)):(d=this._data.length,x.time("tableScan: "+d),e=this._data.filter(w)),x.time("tableScan: "+d)),b.$orderBy&&(x.time("sort"),e=this.sort(b.$orderBy,e),x.time("sort")),void 0!==b.$page&&void 0!==b.$limit&&(G.page=b.$page,G.pages=Math.ceil(e.length/b.$limit),G.records=e.length,b.$page&&b.$limit>0&&(x.data("cursor",G),e.splice(0,b.$page*b.$limit))),b.$skip&&(G.skip=b.$skip,e.splice(0,b.$skip),x.data("skip",b.$skip)),b.$limit&&e&&e.length>b.$limit&&(G.limit=b.$limit,e.length=b.$limit,x.data("limit",b.$limit)),b.$decouple&&(x.time("decouple"),e=this.decouple(e),x.time("decouple"),x.data("flag.decouple",!0)),b.$join&&(C=C.concat(this.applyJoin(e,b.$join,B)),x.data("flag.join",!0)),C.length&&(x.time("removalQueue"),this.spliceArrayByIndexList(e,C),x.time("removalQueue")),b.$transform){for(x.time("transform"),n=0;n<e.length;n++)e.splice(n,1,b.$transform(e[n]));x.time("transform"),x.data("flag.transform",!0)}this._transformEnabled&&this._transformOut&&(x.time("transformOut"), e=this.transformOut(e),x.time("transformOut")),x.data("results",e.length)}else e=[];if(!b.$aggregate){x.time("scanFields");for(n in b)b.hasOwnProperty(n)&&0!==n.indexOf("$")&&(1===b[n]?D.push(n):0===b[n]&&E.push(n));if(x.time("scanFields"),D.length||E.length){for(x.data("flag.limitFields",!0),x.data("limitFields.on",D),x.data("limitFields.off",E),x.time("limitFields"),n=0;n<e.length;n++){t=e[n];for(o in t)t.hasOwnProperty(o)&&(D.length&&o!==y&&D.indexOf(o)===-1&&delete t[o],E.length&&E.indexOf(o)>-1&&delete t[o])}x.time("limitFields")}if(b.$elemMatch){x.data("flag.elemMatch",!0),x.time("projection-elemMatch");for(n in b.$elemMatch)if(b.$elemMatch.hasOwnProperty(n))for(q=new h(n),o=0;o<e.length;o++)if(r=q.value(e[o])[0],r&&r.length)for(p=0;p<r.length;p++)if(z._match(r[p],b.$elemMatch[n],b,"",{})){q.set(e[o],n,[r[p]]);break}x.time("projection-elemMatch")}if(b.$elemsMatch){x.data("flag.elemsMatch",!0),x.time("projection-elemsMatch");for(n in b.$elemsMatch)if(b.$elemsMatch.hasOwnProperty(n))for(q=new h(n),o=0;o<e.length;o++)if(r=q.value(e[o])[0],r&&r.length){for(s=[],p=0;p<r.length;p++)z._match(r[p],b.$elemsMatch[n],b,"",{})&&s.push(r[p]);q.set(e[o],n,s)}x.time("projection-elemsMatch")}}return b.$aggregate&&(x.data("flag.aggregate",!0),x.time("aggregate"),u=new h(b.$aggregate),e=u.value(e),x.time("aggregate")),b.$groupBy&&(x.data("flag.group",!0),x.time("group"),e=this.group(b.$groupBy,e),x.time("group")),x.stop(),e.__fdbOp=x,e.$cursor=G,e},p.prototype.findOne=function(){return this.find.apply(this,arguments)[0]},p.prototype.indexOf=function(a,b){var c,d=this.find(a,{$decouple:!1})[0];return d?!b||b&&!b.$orderBy?this._data.indexOf(d):(b.$decouple=!1,c=this.find(a,b),c.indexOf(d)):-1},p.prototype.indexOfDocById=function(a,b){var c,d;return c="object"!=typeof a?this._primaryIndex.get(a):this._primaryIndex.get(a[this._primaryKey]),c?!b||b&&!b.$orderBy?this._data.indexOf(c):(b.$decouple=!1,d=this.find({},b),d.indexOf(c)):-1},p.prototype.removeByIndex=function(a){var b,c;return b=this._data[a],void 0!==b&&(b=this.decouple(b),c=b[this.primaryKey()],this.removeById(c))},p.prototype.transform=function(a){return void 0!==a?("object"==typeof a?(void 0!==a.enabled&&(this._transformEnabled=a.enabled),void 0!==a.dataIn&&(this._transformIn=a.dataIn),void 0!==a.dataOut&&(this._transformOut=a.dataOut)):this._transformEnabled=a!==!1,this):{enabled:this._transformEnabled,dataIn:this._transformIn,dataOut:this._transformOut}},p.prototype.transformIn=function(a){if(this._transformEnabled&&this._transformIn){if(a instanceof Array){var b,c,d=[];for(c=0;c<a.length;c++)b=this._transformIn(a[c]),b instanceof Array?d=d.concat(b):d.push(b);return d}return this._transformIn(a)}return a},p.prototype.transformOut=function(a){if(this._transformEnabled&&this._transformOut){if(a instanceof Array){var b,c,d=[];for(c=0;c<a.length;c++)b=this._transformOut(a[c]),b instanceof Array?d=d.concat(b):d.push(b);return d}return this._transformOut(a)}return a},p.prototype.sort=function(a,b){var c=this,d=o.parse(a,!0);return d.length&&b.sort(function(a,b){var e,f,g=0;for(e=0;e<d.length;e++)if(f=d[e],1===f.value?g=c.sortAsc(o.get(a,f.path),o.get(b,f.path)):f.value===-1&&(g=c.sortDesc(o.get(a,f.path),o.get(b,f.path))),0!==g)return g;return g}),b},p.prototype.group=function(a,b){var c,d,e,f=o.parse(a,!0),g=new h,i={};if(f.length)for(d=0;d<f.length;d++)for(g.path(f[d].path),e=0;e<b.length;e++)c=g.get(b[e]),i[c]=i[c]||[],i[c].push(b[e]);return i},p.prototype._sort=function(a,b){var c,d=this,e=new h,f=e.parse(a,!0)[0];if(e.path(f.path),1===f.value)c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortAsc(c,f)};else{if(f.value!==-1)throw this.logIdentifier()+" $orderBy clause has invalid direction: "+f.value+", accepted values are 1 or -1 for ascending or descending!";c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortDesc(c,f)}}return b.sort(c)},p.prototype._analyseQuery=function(a,b,c){var d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u={queriesOn:[{id:"$collection."+this._name,type:"colletion",key:this._name}],indexMatch:[],hasJoin:!1,queriesJoin:!1,joinQueries:{},query:a,options:b},v=[],w=[];if(c.time("checkIndexes"),p=new h,q=p.parseArr(a,{ignore:/\$/,verbose:!0}).length){void 0!==a[this._primaryKey]&&(r=typeof a[this._primaryKey],("string"===r||"number"===r||a[this._primaryKey]instanceof Array)&&(c.time("checkIndexMatch: Primary Key"),s=[].concat(this._primaryIndex.lookup(a,b,c)),u.indexMatch.push({lookup:s,keyData:{matchedKeys:[this._primaryKey],totalKeyCount:q,score:1},index:this._primaryIndex}),c.time("checkIndexMatch: Primary Key")));for(t in this._indexById)if(this._indexById.hasOwnProperty(t)&&(m=this._indexById[t],n=m.name(),c.time("checkIndexMatch: "+n),l=m.match(a,b),l.score>0&&(o=[].concat(m.lookup(a,b,c)),u.indexMatch.push({lookup:o,keyData:l,index:m})),c.time("checkIndexMatch: "+n),l.score===q))break;c.time("checkIndexes"),u.indexMatch.length>1&&(c.time("findOptimalIndex"),u.indexMatch.sort(function(a,b){return a.keyData.score>b.keyData.score?-1:a.keyData.score<b.keyData.score?1:a.keyData.score===b.keyData.score?a.lookup.length-b.lookup.length:void 0}),c.time("findOptimalIndex"))}if(b.$join){for(u.hasJoin=!0,d=0;d<b.$join.length;d++)for(e in b.$join[d])b.$join[d].hasOwnProperty(e)&&(i=b.$join[d][e],f=i.$sourceType||"collection",g="$"+f+"."+e,v.push({id:g,type:f,key:e}),void 0!==b.$join[d][e].$as?w.push(b.$join[d][e].$as):w.push(e));for(k=0;k<w.length;k++)j=this._queryReferencesSource(a,w[k],""),j&&(u.joinQueries[v[k].key]=j,u.queriesJoin=!0);u.joinsOn=v,u.queriesOn=u.queriesOn.concat(v)}return u},p.prototype._queryReferencesSource=function(a,b,c){var d;for(d in a)if(a.hasOwnProperty(d)){if(d===b)return c&&(c+="."),c+d;if("object"==typeof a[d])return c&&(c+="."),c+=d,this._queryReferencesSource(a[d],b,c)}return!1},p.prototype.count=function(a,b){return a?this.find(a,b).length:this._data.length},p.prototype.findSub=function(a,b,c,d){return this._findSub(this.find(a),b,c,d)},p.prototype._findSub=function(a,b,c,d){var e,f,g,i=new h(b),j=a.length,k=new p("__FDB_temp_"+this.objectId()).db(this._db),l={parents:j,subDocTotal:0,subDocs:[],pathFound:!1,err:""};for(d=d||{},e=0;e<j;e++)if(f=i.value(a[e])[0]){if(k.setData(f),g=k.find(c,d),d.returnFirst&&g.length)return g[0];d.$split?l.subDocs.push(g):l.subDocs=l.subDocs.concat(g),l.subDocTotal+=g.length,l.pathFound=!0}return k.drop(),l.pathFound||(l.err="No objects found in the parent documents with a matching path of: "+b),d.$stats?l:l.subDocs},p.prototype.findSubOne=function(a,b,c,d){return this.findSub(a,b,c,d)[0]},p.prototype.insertIndexViolation=function(a){var b,c,d,e=this._indexByName;if(this._primaryIndex.get(a[this._primaryKey]))b=this._primaryIndex;else for(c in e)if(e.hasOwnProperty(c)&&(d=e[c],d.unique()&&d.violation(a))){b=d;break}return!!b&&b.name()},p.prototype.ensureIndex=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";this._indexByName=this._indexByName||{},this._indexById=this._indexById||{};var c,e={start:(new Date).getTime()};if(b)if(b.type){if(!d.index[b.type])throw this.logIdentifier()+' Cannot create index of type "'+b.type+'", type not found in the index type register (Shared.index)';c=new d.index[b.type](a,b,this)}else c=new i(a,b,this);else c=new i(a,b,this);return this._indexByName[c.name()]?{err:"Index with that name already exists"}:(c.rebuild(),this._indexByName[c.name()]=c,this._indexById[c.id()]=c,e.end=(new Date).getTime(),e.total=e.end-e.start,this._lastOp={type:"ensureIndex",stats:{time:e}},{index:c,id:c.id(),name:c.name(),state:c.state()})},p.prototype.index=function(a){if(this._indexByName)return this._indexByName[a]},p.prototype.lastOp=function(){return this._metrics.list()},p.prototype.diff=function(a){var b,c,d,e,f={insert:[],update:[],remove:[]},g=this.primaryKey();if(g!==a.primaryKey())throw this.logIdentifier()+" Diffing requires that both collections have the same primary key!";for(b=a._data;b&&!(b instanceof Array);)a=b,b=a._data;for(e=b.length,c=0;c<e;c++)d=b[c],this._primaryIndex.get(d[g])?this._primaryCrc.get(d[g])!==a._primaryCrc.get(d[g])&&f.update.push(d):f.insert.push(d);for(b=this._data,e=b.length,c=0;c<e;c++)d=b[c],a._primaryIndex.get(d[g])||f.remove.push(d);return f},p.prototype.collateAdd=new l("Collection.prototype.collateAdd",{"object, string":function(a,b){var c=this;c.collateAdd(a,function(d){var e,f;switch(d.type){case"insert":b?(e={$push:{}},e.$push[b]=c.decouple(d.data.dataSet),c.update({},e)):c.insert(d.data.dataSet);break;case"update":b?(e={},f={},e[b]=d.data.query,f[b+".$"]=d.data.update,c.update(e,f)):c.update(d.data.query,d.data.update);break;case"remove":b?(e={$pull:{}},e.$pull[b]={},e.$pull[b][c.primaryKey()]=d.data.dataSet[0][a.primaryKey()],c.update({},e)):c.remove(d.data.dataSet)}})},"object, function":function(a,b){if("string"==typeof a&&(a=this._db.collection(a,{autoCreate:!1,throwError:!1})),a)return this._collate=this._collate||{},this._collate[a.name()]=new m(a,this,b),this;throw"Cannot collate from a non-existent collection!"}}),p.prototype.collateRemove=function(a){if("object"==typeof a&&(a=a.name()),a)return this._collate[a].drop(),delete this._collate[a],this;throw"No collection name passed to collateRemove() or collection not found!"},p.prototype.when=function(a){var b=this.objectId();return this._when=this._when||{},this._when[b]=this._when[b]||new n(this,b,a),this._when[b]},e.prototype.collection=new l("Db.prototype.collection",{"":function(){return this.$main.call(this,{name:this.objectId()})},object:function(a){return a instanceof p?"droppped"!==a.state()?a:this.$main.call(this,{name:a.name()}):this.$main.call(this,a)},string:function(a){return this.$main.call(this,{name:a})},"string, string":function(a,b){return this.$main.call(this,{name:a,primaryKey:b})},"string, object":function(a,b){return b.name=a,this.$main.call(this,b)},"string, string, object":function(a,b,c){return c.name=a,c.primaryKey=b,this.$main.call(this,c)},$main:function(a){var b=this,c=a.name;if(c){if(this._collection[c])return this._collection[c];if(!a||a.autoCreate!==!1){if(this.debug()&&console.log(this.logIdentifier()+" Creating collection "+c),this._collection[c]=this._collection[c]||new p(c,a).db(this),this._collection[c].mongoEmulation(this.mongoEmulation()),void 0!==a.primaryKey&&this._collection[c].primaryKey(a.primaryKey),void 0!==a.capped){if(void 0===a.size)throw this.logIdentifier()+" Cannot create a capped collection without specifying a size!";this._collection[c].capped(a.capped),this._collection[c].cappedSize(a.size)}return b._collection[c].on("change",function(){b.emit("change",b._collection[c],"collection",c)}),b.deferEmit("create",b._collection[c],"collection",c),this._collection[c]}if(a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get collection "+c+" because it does not exist and auto-create has been disabled!"}else if(!a||a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get collection with undefined name!"}}),e.prototype.collectionExists=function(a){return Boolean(this._collection[a])},e.prototype.collections=function(a){var b,c,d=[],e=this._collection;a&&(a instanceof RegExp||(a=new RegExp(a)));for(c in e)e.hasOwnProperty(c)&&(b=e[c],a?a.exec(c)&&d.push({name:c,count:b.count(),linked:void 0!==b.isLinked&&b.isLinked()}):d.push({name:c,count:b.count(),linked:void 0!==b.isLinked&&b.isLinked()}));return d.sort(function(a,b){return a.name.localeCompare(b.name)}),d},d.finishModule("Collection"),b.exports=p},{"./Condition":8,"./Index2d":15,"./IndexBinaryTree":16,"./IndexHashMap":17,"./KeyValueStore":18,"./Metrics":19,"./Overload":32,"./Path":34,"./ReactorIO":38,"./Shared":40}],7:[function(a,b,c){"use strict";var d,e,f,g;d=a("./Shared");var h=function(){this.init.apply(this,arguments)};h.prototype.init=function(a){var b=this;b._name=a,b._data=new g("__FDB__cg_data_"+b._name),b._collections=[],b._view=[]},d.addModule("CollectionGroup",h),d.mixin(h.prototype,"Mixin.Common"),d.mixin(h.prototype,"Mixin.ChainReactor"),d.mixin(h.prototype,"Mixin.Constants"),d.mixin(h.prototype,"Mixin.Triggers"),d.mixin(h.prototype,"Mixin.Tags"),d.mixin(h.prototype,"Mixin.Events"),g=a("./Collection"),e=d.modules.Db,f=d.modules.Db.prototype.init,h.prototype.on=function(){this._data.on.apply(this._data,arguments)},h.prototype.off=function(){this._data.off.apply(this._data,arguments)},h.prototype.emit=function(){this._data.emit.apply(this._data,arguments)},h.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey=a,this):this._primaryKey},d.synthesize(h.prototype,"state"),d.synthesize(h.prototype,"db"),d.synthesize(h.prototype,"name"),h.prototype.addCollection=function(a){if(a&&this._collections.indexOf(a)===-1){if(this._collections.length){if(this._primaryKey!==a.primaryKey())throw this.logIdentifier()+" All collections in a collection group must have the same primary key!"}else this.primaryKey(a.primaryKey());this._collections.push(a),a._groups=a._groups||[],a._groups.push(this),a.chain(this),a.on("drop",function(){if(a._groups&&a._groups.length){var b,c=[];for(b=0;b<a._groups.length;b++)c.push(a._groups[b]);for(b=0;b<c.length;b++)a._groups[b].removeCollection(a)}delete a._groups}),this._data.insert(a.find())}return this},h.prototype.removeCollection=function(a){if(a){var b,c=this._collections.indexOf(a);c!==-1&&(a.unChain(this),this._collections.splice(c,1),a._groups=a._groups||[],b=a._groups.indexOf(this),b!==-1&&a._groups.splice(b,1),a.off("drop")),0===this._collections.length&&delete this._primaryKey}return this},h.prototype._chainHandler=function(a){switch(a.type){case"setData":a.data.dataSet=this.decouple(a.data.dataSet),this._data.remove(a.data.oldData),this._data.insert(a.data.dataSet);break;case"insert":a.data.dataSet=this.decouple(a.data.dataSet),this._data.insert(a.data.dataSet);break;case"update":this._data.update(a.data.query,a.data.update,a.options);break;case"remove":this._data.remove(a.data.query,a.options)}},h.prototype.insert=function(){this._collectionsRun("insert",arguments)},h.prototype.update=function(){this._collectionsRun("update",arguments)},h.prototype.updateById=function(){this._collectionsRun("updateById",arguments)},h.prototype.remove=function(){this._collectionsRun("remove",arguments)},h.prototype._collectionsRun=function(a,b){for(var c=0;c<this._collections.length;c++)this._collections[c][a].apply(this._collections[c],b)},h.prototype.find=function(a,b){return this._data.find(a,b)},h.prototype.removeById=function(a){for(var b=0;b<this._collections.length;b++)this._collections[b].removeById(a)},h.prototype.subset=function(a,b){var c=this.find(a,b);return(new g).subsetOf(this).primaryKey(this._primaryKey).setData(c)},h.prototype.drop=function(a){if(!this.isDropped()){var b,c,d;if(this._debug&&console.log(this.logIdentifier()+" Dropping"),this._state="dropped",this._collections&&this._collections.length)for(c=[].concat(this._collections),b=0;b<c.length;b++)this.removeCollection(c[b]);if(this._view&&this._view.length)for(d=[].concat(this._view),b=0;b<d.length;b++)this._removeView(d[b]);this.emit("drop",this),delete this._listeners,a&&a(!1,!0)}return!0},e.prototype.init=function(){this._collectionGroup={},f.apply(this,arguments)},e.prototype.collectionGroup=function(a){var b=this;return a?a instanceof h?a:this._collectionGroup&&this._collectionGroup[a]?this._collectionGroup[a]:(this._collectionGroup[a]=new h(a).db(this),b.deferEmit("create",b._collectionGroup[a],"collectionGroup",a),this._collectionGroup[a]):this._collectionGroup},e.prototype.collectionGroups=function(){var a,b=[];for(a in this._collectionGroup)this._collectionGroup.hasOwnProperty(a)&&b.push({name:a});return b},b.exports=h},{"./Collection":6,"./Shared":40}],8:[function(a,b,c){"use strict";var d,e;d=a("./Shared"),e=function(){this.init.apply(this,arguments)},e.prototype.init=function(a,b,c){this._dataSource=a,this._id=b,this._query=[c],this._started=!1,this._state=[!1],this._satisfied=!1,this.earlyExit(!0)},d.addModule("Condition",e),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),d.synthesize(e.prototype,"id"),d.synthesize(e.prototype,"then"),d.synthesize(e.prototype,"else"),d.synthesize(e.prototype,"earlyExit"),d.synthesize(e.prototype,"debug"),e.prototype.and=function(a){return this._query.push(a),this._state.push(!1),this},e.prototype.start=function(a){if(!this._started){var b=this;0!==arguments.length&&(this._satisfied=a),this._updateStates(),b._onChange=function(){b._updateStates()},this._dataSource.on("change",b._onChange),this._started=!0}return this},e.prototype._updateStates=function(){var a,b=!0;for(a=0;a<this._query.length&&(this._state[a]=this._dataSource.count(this._query[a])>0,this._debug&&console.log(this.logIdentifier()+" Evaluating",this._query[a],"=",this._query[a]),this._state[a]||(b=!1,!this._earlyExit));a++);this._satisfied!==b&&(b?this._then&&this._then():this._else&&this._else(),this._satisfied=b)},e.prototype.stop=function(){return this._started&&(this._dataSource.off("change",this._onChange),delete this._onChange,this._started=!1),this},e.prototype.drop=function(){return this.stop(),delete this._dataSource.when[this._id],this},d.finishModule("Condition"),b.exports=e},{"./Shared":40}],9:[function(a,b,c){"use strict";var d,e,f,g,h=[];d=a("./Shared"),g=a("./Overload");var i=function(a){this.init.apply(this,arguments)};i.prototype.init=function(a){this._db={},this._debug={},this._name=a||"ForerunnerDB",h.push(this)},i.prototype.instantiatedCount=function(){return h.length},i.prototype.instances=function(a){return void 0!==a?h[a]:h},i.prototype.namedInstances=function(a){var b,c;{if(void 0===a){for(c=[],b=0;b<h.length;b++)c.push(h[b].name);return c}for(b=0;b<h.length;b++)if(h[b].name===a)return h[b]}},i.prototype.moduleLoaded=new g({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b&&b()}},"array, function":function(a,b){var c,e;for(e=0;e<a.length;e++)if(c=a[e],void 0!==c){c=c.replace(/ /g,"");var f,g=c.split(",");for(f=0;f<g.length;f++)if(!d.modules[g[f]])return!1}b&&b()},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),i.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)&&(b&&b(),!0):d.version},i.moduleLoaded=i.prototype.moduleLoaded,i.version=i.prototype.version,i.instances=i.prototype.instances,i.instantiatedCount=i.prototype.instantiatedCount,i.shared=d,i.prototype.shared=d,d.addModule("Core",i),d.mixin(i.prototype,"Mixin.Common"),d.mixin(i.prototype,"Mixin.Constants"),e=a("./Db.js"),f=a("./Metrics.js"),d.synthesize(i.prototype,"name"),d.synthesize(i.prototype,"mongoEmulation"),i.prototype._isServer=!1,i.prototype.isClient=function(){return!this._isServer},i.prototype.isServer=function(){return this._isServer},i.prototype.collection=function(){throw"ForerunnerDB's instantiation has changed since version 1.3.36 to support multiple database instances. Please see the readme.md file for the minor change you have to make to get your project back up and running, or see the issue related to this change at https://github.com/Irrelon/ForerunnerDB/issues/44"},b.exports=i},{"./Db.js":10,"./Metrics.js":19,"./Overload":32,"./Shared":40}],10:[function(a,b,c){"use strict";var d,e,f,g,h;d=a("./Shared"),h=a("./Overload");var i=function(a,b){this.init.apply(this,arguments)};i.prototype.init=function(a,b){this.core(b),this._primaryKey="_id",this._name=a,this._collection={},this._debug={}},d.addModule("Db",i),i.prototype.moduleLoaded=new h({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b&&b()}},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),i.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)&&(b&&b(),!0):d.version},i.moduleLoaded=i.prototype.moduleLoaded,i.version=i.prototype.version,i.shared=d,i.prototype.shared=d,d.addModule("Db",i),d.mixin(i.prototype,"Mixin.Common"),d.mixin(i.prototype,"Mixin.ChainReactor"),d.mixin(i.prototype,"Mixin.Constants"),d.mixin(i.prototype,"Mixin.Tags"),d.mixin(i.prototype,"Mixin.Events"),e=d.modules.Core,f=a("./Collection.js"),g=a("./Metrics.js"),i.prototype._isServer=!1,d.synthesize(i.prototype,"core"),d.synthesize(i.prototype,"primaryKey"),d.synthesize(i.prototype,"state"),d.synthesize(i.prototype,"name"),d.synthesize(i.prototype,"mongoEmulation"),i.prototype.isClient=function(){return!this._isServer},i.prototype.isServer=function(){return this._isServer},i.prototype.isClient=function(){return!this._isServer},i.prototype.isServer=function(){return this._isServer},i.prototype.arrayToCollection=function(a){return(new f).setData(a)},i.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d="string"===e?d.concat(c.peek(a)):d.concat(c.find(a)));return d},i.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d="string"===e?d.concat(c.peek(a)):d.concat(c.find(a)));return d},i.prototype.peekCat=function(a){var b,c,d,e={},f=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],"string"===f?(d=c.peek(a),d&&d.length&&(e[c.name()]=d)):(d=c.find(a),d&&d.length&&(e[c.name()]=d)));return e},i.prototype.drop=new h({"":function(){if(!this.isDropped()){var a,b=this.collections(),c=b.length;for(this._state="dropped",a=0;a<c;a++)this.collection(b[a].name).drop(),delete this._collection[b[a].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},function:function(a){if(!this.isDropped()){var b,c=this.collections(),d=c.length,e=0,f=function(){e++,e===d&&a&&a()};for(this._state="dropped",b=0;b<d;b++)this.collection(c[b].name).drop(f),delete this._collection[c[b].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},boolean:function(a){if(!this.isDropped()){var b,c=this.collections(),d=c.length;for(this._state="dropped",b=0;b<d;b++)this.collection(c[b].name).drop(a),delete this._collection[c[b].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},"boolean, function":function(a,b){if(!this.isDropped()){var c,d=this.collections(),e=d.length,f=0,g=function(){f++,f===e&&b&&b()};for(this._state="dropped",c=0;c<e;c++)this.collection(d[c].name).drop(a,g),delete this._collection[d[c].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0}}),e.prototype.db=function(a){return a instanceof i?a:(a||(a=this.objectId()),this._db[a]=this._db[a]||new i(a,this),this._db[a].mongoEmulation(this.mongoEmulation()),this._db[a])},e.prototype.databases=function(a){var b,c,d,e=[];a&&(a instanceof RegExp||(a=new RegExp(a)));for(d in this._db)this._db.hasOwnProperty(d)&&(c=!0,a&&(a.exec(d)||(c=!1)),c&&(b={name:d,children:[]},this.shared.moduleExists("Collection")&&b.children.push({module:"collection",moduleName:"Collections",count:this._db[d].collections().length}),this.shared.moduleExists("CollectionGroup")&&b.children.push({module:"collectionGroup",moduleName:"Collection Groups",count:this._db[d].collectionGroups().length}),this.shared.moduleExists("Document")&&b.children.push({module:"document",moduleName:"Documents",count:this._db[d].documents().length}),this.shared.moduleExists("Grid")&&b.children.push({module:"grid",moduleName:"Grids",count:this._db[d].grids().length}),this.shared.moduleExists("Overview")&&b.children.push({module:"overview",moduleName:"Overviews",count:this._db[d].overviews().length}),this.shared.moduleExists("View")&&b.children.push({module:"view",moduleName:"Views",count:this._db[d].views().length}),e.push(b)));return e.sort(function(a,b){return a.name.localeCompare(b.name)}),e},d.finishModule("Db"),b.exports=i},{"./Collection.js":6,"./Metrics.js":19,"./Overload":32,"./Shared":40}],11:[function(a,b,c){"use strict";var d,e,f,g,h;d=a("./Shared");var i=function(){this.init.apply(this,arguments)};i.prototype.init=function(a){this._name=a,this._data={}},d.addModule("Document",i),d.mixin(i.prototype,"Mixin.Common"),d.mixin(i.prototype,"Mixin.Events"),d.mixin(i.prototype,"Mixin.ChainReactor"),d.mixin(i.prototype,"Mixin.Constants"),d.mixin(i.prototype,"Mixin.Triggers"),d.mixin(i.prototype,"Mixin.Matching"),d.mixin(i.prototype,"Mixin.Updating"),d.mixin(i.prototype,"Mixin.Tags"),f=a("./Overload"),e=a("./Collection"),g=d.modules.Db,h=a("./Path"),d.synthesize(i.prototype,"state"),d.synthesize(i.prototype,"db"),d.synthesize(i.prototype,"name"),i.prototype.setData=function(a,b){var c,d,e;if(a){if(b=b||{$decouple:!0},b&&b.$decouple===!0&&(a=this.decouple(a)),this._linked){e={};for(c in this._data)"jQuery"!==c.substr(0,6)&&this._data.hasOwnProperty(c)&&void 0===a[c]&&(e[c]=1);a.$unset=e,this.updateObject(this._data,a,{})}else this._data=a;d={type:"setData",data:this.decouple(this._data)},this.emit("immediateChange",d),this.deferEmit("change",d)}return this},i.prototype.find=function(a,b){var c;return c=b&&b.$decouple===!1?this._data:this.decouple(this._data)},i.prototype.findSub=function(a,b,c,d){return this._findSub([this.find(a)],b,c,d)},i.prototype._findSub=function(a,b,c,d){var f,g,i,j=new h(b),k=a.length,l=new e("__FDB_temp_"+this.objectId()).db(this._db),m={parents:k,subDocTotal:0,subDocs:[],pathFound:!1,err:""};for(d=d||{},f=0;f<k;f++)if(g=j.value(a[f])[0]){if(l.setData(g),i=l.find(c,d),d.returnFirst&&i.length)return i[0];d.$split?m.subDocs.push(i):m.subDocs=m.subDocs.concat(i),m.subDocTotal+=i.length,m.pathFound=!0}return l.drop(),m.pathFound||(m.err="No objects found in the parent documents with a matching path of: "+b),d.$stats?m:m.subDocs[0]},i.prototype.update=function(a,b,c){var d,e=this.updateObject(this._data,b,a,c);e&&(d={type:"update",data:this.decouple(this._data)},this.emit("immediateChange",d),this.deferEmit("change",d))},i.prototype.updateObject=e.prototype.updateObject,i.prototype._isPositionalKey=function(a){return".$"===a.substr(a.length-2,2)},i.prototype._updateProperty=function(a,b,c){this._linked?(window.jQuery.observable(a).setProperty(b,c),this.debug()&&console.log(this.logIdentifier()+' Setting data-bound document property "'+b+'"')):(a[b]=c,this.debug()&&console.log(this.logIdentifier()+' Setting non-data-bound document property "'+b+'" to val "'+c+'"'))},i.prototype._updateIncrement=function(a,b,c){this._linked?window.jQuery.observable(a).setProperty(b,a[b]+c):a[b]+=c},i.prototype._updateSpliceMove=function(a,b,c){this._linked?(window.jQuery.observable(a).move(b,c),this.debug()&&console.log(this.logIdentifier()+' Moving data-bound document array index from "'+b+'" to "'+c+'"')):(a.splice(c,0,a.splice(b,1)[0]),this.debug()&&console.log(this.logIdentifier()+' Moving non-data-bound document array index from "'+b+'" to "'+c+'"'))},i.prototype._updateSplicePush=function(a,b,c){a.length>b?this._linked?window.jQuery.observable(a).insert(b,c):a.splice(b,0,c):this._linked?window.jQuery.observable(a).insert(c):a.push(c)},i.prototype._updatePush=function(a,b){this._linked?window.jQuery.observable(a).insert(b):a.push(b)},i.prototype._updatePull=function(a,b){this._linked?window.jQuery.observable(a).remove(b):a.splice(b,1)},i.prototype._updateMultiply=function(a,b,c){this._linked?window.jQuery.observable(a).setProperty(b,a[b]*c):a[b]*=c},i.prototype._updateRename=function(a,b,c){var d=a[b];this._linked?(window.jQuery.observable(a).setProperty(c,d),window.jQuery.observable(a).removeProperty(b)):(a[c]=d,delete a[b])},i.prototype._updateUnset=function(a,b){this._linked?window.jQuery.observable(a).removeProperty(b):delete a[b]},i.prototype.drop=function(a){return!!this.isDropped()||!!(this._db&&this._name&&this._db&&this._db._document&&this._db._document[this._name])&&(this._state="dropped",delete this._db._document[this._name],delete this._data,this.emit("drop",this),a&&a(!1,!0),delete this._listeners,!0)},g.prototype.document=new f("Db.prototype.document",{"":function(){return this.$main.call(this,{name:this.objectId()})},object:function(a){return a instanceof i?"droppped"!==a.state()?a:this.$main.call(this,{name:a.name()}):this.$main.call(this,a)},string:function(a){return this.$main.call(this,{name:a})},"string, object":function(a,b){return b.name=a,this.$main.call(this,b)},$main:function(a){var b=this,c=a.name;if(c){if(this._document&&this._document[c])return this._document[c];if(!a||a.autoCreate!==!1)return this.debug()&&console.log(this.logIdentifier()+" Creating document "+c),this._document=this._document||{},this._document[c]=this._document[c]||new i(c,a).db(this),b._document[c].on("change",function(){b.emit("change",b._document[c],"document",c)}),b.deferEmit("create",b._document[c],"document",c),this._document[c];if(a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get document "+c+" because it does not exist and auto-create has been disabled!"}else if(!a||a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get document with undefined name!"}}),g.prototype.documents=function(){var a,b,c=[];for(b in this._document)this._document.hasOwnProperty(b)&&(a=this._document[b],c.push({name:b,linked:void 0!==a.isLinked&&a.isLinked()}));return c},d.finishModule("Document"),b.exports=i},{"./Collection":6,"./Overload":32,"./Path":34,"./Shared":40}],12:[function(a,b,c){"use strict";var d,e,f,g,h=Math.PI/180,i=180/Math.PI,j=6371;d=[16,8,4,2,1],e="0123456789bcdefghjkmnpqrstuvwxyz",f={right:{even:"bc01fg45238967deuvhjyznpkmstqrwx"},left:{even:"238967debc01fg45kmstqrwxuvhjyznp"},top:{even:"p0r21436x8zb9dcf5h7kjnmqesgutwvy"},bottom:{even:"14365h7k9dcfesgujnmqp0r2twvyx8zb"}},g={right:{even:"bcfguvyz"},left:{even:"0145hjnp"},top:{even:"prxz"},bottom:{even:"028b"}},f.bottom.odd=f.left.even,f.top.odd=f.right.even,f.left.odd=f.bottom.even,f.right.odd=f.top.even,g.bottom.odd=g.left.even,g.top.odd=g.right.even,g.left.odd=g.bottom.even,g.right.odd=g.top.even;var k=function(){};k.prototype.radians=function(a){return a*h},k.prototype.degrees=function(a){return a*i},k.prototype.refineInterval=function(a,b,c){b&c?a[0]=(a[0]+a[1])/2:a[1]=(a[0]+a[1])/2},k.prototype.calculateNeighbours=function(a,b){var c;return b&&"object"!==b.type?(c=[],c[4]=a,c[3]=this.calculateAdjacent(a,"left"),c[5]=this.calculateAdjacent(a,"right"),c[1]=this.calculateAdjacent(a,"top"),c[7]=this.calculateAdjacent(a,"bottom"),c[0]=this.calculateAdjacent(c[3],"top"),c[2]=this.calculateAdjacent(c[5],"top"),c[6]=this.calculateAdjacent(c[3],"bottom"),c[8]=this.calculateAdjacent(c[5],"bottom")):(c={center:a,left:this.calculateAdjacent(a,"left"),right:this.calculateAdjacent(a,"right"),top:this.calculateAdjacent(a,"top"),bottom:this.calculateAdjacent(a,"bottom")},c.topLeft=this.calculateAdjacent(c.left,"top"),c.topRight=this.calculateAdjacent(c.right,"top"),c.bottomLeft=this.calculateAdjacent(c.left,"bottom"),c.bottomRight=this.calculateAdjacent(c.right,"bottom")),c},k.prototype.calculateLatLngByDistanceBearing=function(a,b,c){var d=a[1],e=a[0],f=Math.asin(Math.sin(this.radians(e))*Math.cos(b/j)+Math.cos(this.radians(e))*Math.sin(b/j)*Math.cos(this.radians(c))),g=this.radians(d)+Math.atan2(Math.sin(this.radians(c))*Math.sin(b/j)*Math.cos(this.radians(e)),Math.cos(b/j)-Math.sin(this.radians(e))*Math.sin(f)),h=(g+3*Math.PI)%(2*Math.PI)-Math.PI;return{lat:this.degrees(f),lng:this.degrees(h)}},k.prototype.calculateExtentByRadius=function(a,b){var c,d,e,f,g=[],h=[];return e=this.calculateLatLngByDistanceBearing(a,b,0),d=this.calculateLatLngByDistanceBearing(a,b,90), f=this.calculateLatLngByDistanceBearing(a,b,180),c=this.calculateLatLngByDistanceBearing(a,b,270),g[0]=e.lat,g[1]=f.lat,h[0]=c.lng,h[1]=d.lng,{lat:g,lng:h}},k.prototype.calculateHashArrayByRadius=function(a,b,c){var d,e,f,g=this.calculateExtentByRadius(a,b),h=[g.lat[0],g.lng[0]],i=[g.lat[0],g.lng[1]],j=[g.lat[1],g.lng[0]],k=this.encode(h[0],h[1],c),l=this.encode(i[0],i[1],c),m=this.encode(j[0],j[1],c),n=0,o=0,p=[];for(d=k,p.push(d);d!==l;)d=this.calculateAdjacent(d,"right"),n++,p.push(d);for(d=k;d!==m;)d=this.calculateAdjacent(d,"bottom"),o++;for(e=0;e<=n;e++)for(d=p[e],f=0;f<o;f++)d=this.calculateAdjacent(d,"bottom"),p.push(d);return p},k.prototype.calculateAdjacent=function(a,b){a=a.toLowerCase();var c=a.charAt(a.length-1),d=a.length%2?"odd":"even",h=a.substring(0,a.length-1);return g[b][d].indexOf(c)!==-1&&(h=this.calculateAdjacent(h,b)),h+e[f[b][d].indexOf(c)]},k.prototype.decode=function(a){var b,c,f,g,h,i,j,k=1,l=[],m=[];for(l[0]=-90,l[1]=90,m[0]=-180,m[1]=180,i=90,j=180,b=0;b<a.length;b++)for(c=a[b],f=e.indexOf(c),g=0;g<5;g++)h=d[g],k?(j/=2,this.refineInterval(m,f,h)):(i/=2,this.refineInterval(l,f,h)),k=!k;return l[2]=(l[0]+l[1])/2,m[2]=(m[0]+m[1])/2,{lat:l,lng:m}},k.prototype.encode=function(a,b,c){var f,g=1,h=[],i=[],j=0,k=0,l="";for(c||(c=12),h[0]=-90,h[1]=90,i[0]=-180,i[1]=180;l.length<c;)g?(f=(i[0]+i[1])/2,b>f?(k|=d[j],i[0]=f):i[1]=f):(f=(h[0]+h[1])/2,a>f?(k|=d[j],h[0]=f):h[1]=f),g=!g,j<4?j++:(l+=e[k],j=0,k=0);return l},"undefined"!=typeof b&&(b.exports=k)},{}],13:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k;d=a("./Shared");var l=function(a,b,c){this.init.apply(this,arguments)};l.prototype.init=function(a,b,c){var d=this;this._baseQuery={},this._selector=a,this._template=b,this._options=c||{},this._debug={},this._id=this.objectId(),this._collectionDroppedWrap=function(){d._collectionDropped.apply(d,arguments)}},d.addModule("Grid",l),d.mixin(l.prototype,"Mixin.Common"),d.mixin(l.prototype,"Mixin.ChainReactor"),d.mixin(l.prototype,"Mixin.Constants"),d.mixin(l.prototype,"Mixin.Triggers"),d.mixin(l.prototype,"Mixin.Events"),d.mixin(l.prototype,"Mixin.Tags"),f=a("./Collection"),g=a("./CollectionGroup"),h=a("./View"),k=a("./ReactorIO"),i=f.prototype.init,e=d.modules.Db,j=e.prototype.init,d.synthesize(l.prototype,"state"),d.synthesize(l.prototype,"name"),l.prototype.insert=function(){this._from.insert.apply(this._from,arguments)},l.prototype.update=function(){this._from.update.apply(this._from,arguments)},l.prototype.updateById=function(){this._from.updateById.apply(this._from,arguments)},l.prototype.remove=function(){this._from.remove.apply(this._from,arguments)},l.prototype.from=function(a){return void 0!==a&&(this._from&&(this._from.off("drop",this._collectionDroppedWrap),this._from._removeGrid(this)),"string"==typeof a&&(a=this._db.collection(a)),this._from=a,this._from.on("drop",this._collectionDroppedWrap),"function"==typeof this._from.query&&(this._baseQuery=this._from.query()),this.refresh()),this},d.synthesize(l.prototype,"db",function(a){return a&&this.debug(a.debug()),this.$super.apply(this,arguments)}),l.prototype._collectionDropped=function(a){a&&delete this._from},l.prototype.drop=function(a){return!!this.isDropped()||!!this._from&&(this._from.unlink(this._selector,this.template()),this._from.off("drop",this._collectionDroppedWrap),this._from._removeGrid(this),(this.debug()||this._db&&this._db.debug())&&console.log(this.logIdentifier()+" Dropping grid "+this._selector),this._state="dropped",this._db&&this._selector&&delete this._db._grid[this._selector],this.emit("drop",this),a&&a(!1,!0),delete this._selector,delete this._template,delete this._from,delete this._db,delete this._listeners,!0)},l.prototype.template=function(a){return void 0!==a?(this._template=a,this):this._template},l.prototype._sortGridClick=function(a){var b,c=window.jQuery(a.currentTarget),e=c.attr("data-grid-sort")||"",f=parseInt(c.attr("data-grid-dir")||"-1",10)===-1?1:-1,g=e.split(","),h={};for(window.jQuery(this._selector).find("[data-grid-dir]").removeAttr("data-grid-dir"),c.attr("data-grid-dir",f),b=0;b<g.length;b++)h[g]=f;d.mixin(h,this._options.$orderBy),this.emit("beforeChange","sort"),this.emit("beforeSort",h),this._from.orderBy(h),this.emit("sort",h)},l.prototype.query=function(a,b){return this._baseQuery=a,this._baseQueryOptions=b,this},l.prototype.refresh=function(){if(this._from){if(!this._from.link)throw"Grid requires the AutoBind module in order to operate!";var a=this,b=window.jQuery(this._selector),c=function(){a._sortGridClick.apply(a,arguments)};if(b.html(""),a._from.orderBy&&b.off("click","[data-grid-sort]",c),a._options.$wrap=a._options.$wrap||"gridRow",a._from.link(a._selector,a.template(),a._options),a._from.orderBy&&b.on("click","[data-grid-sort]",c),a._from.query){var d=a.decouple(a._baseQuery);b.find("[data-grid-filter]").each(function(c,e){e=window.jQuery(e);var f,g,h,i,j,k=e.attr("data-grid-filter"),l=e.attr("data-grid-vartype"),m={},n=e.html(),o=a._db.view("tmpGridFilter_"+a._id+"_"+k);m[k]=1,j={$distinct:m},o.query(j).orderBy(m).from(a._from._from),i=function(){o.refresh()},a._from._from.on("change",i),a.on("drop",function(){a._from&&a._from._from&&a._from._from.off("change",i),o.drop()}),h=['<div class="dropdown" id="'+a._id+"_"+k+'">','<button class="btn btn-default dropdown-toggle" type="button" id="'+a._id+"_"+k+'_dropdownButton" data-toggle="dropdown" aria-expanded="true">',n+' <span class="caret"></span>',"</button>","</div>"],f=window.jQuery(h.join("")),g=window.jQuery('<ul class="dropdown-menu" role="menu" id="'+a._id+"_"+k+'_dropdownMenu"></ul>'),f.append(g),e.html(f),o.link(g,{template:['<li role="presentation" class="input-group" style="width: 240px; padding-left: 10px; padding-right: 10px; padding-top: 5px;">','<input type="search" class="form-control gridFilterSearch" placeholder="Search...">','<span class="input-group-btn">','<button class="btn btn-default gridFilterClearSearch" type="button"><span class="glyphicon glyphicon-remove-circle glyphicons glyphicons-remove"></span></button>',"</span>","</li>",'<li role="presentation" class="divider"></li>','<li role="presentation" data-val="$all">','<a role="menuitem" tabindex="-1">','<input type="checkbox" checked>&nbsp;All',"</a>","</li>",'<li role="presentation" class="divider"></li>',"{^{for options}}",'<li role="presentation" data-link="data-val{:'+k+'}">','<a role="menuitem" tabindex="-1">','<input type="checkbox">&nbsp;{^{:'+k+"}}","</a>","</li>","{{/for}}"].join("")},{$wrap:"options"}),b.on("keyup","#"+a._id+"_"+k+"_dropdownMenu .gridFilterSearch",function(a){var b=window.jQuery(this),c=o.query(),d=b.val();d?c[k]=new RegExp(d,"gi"):delete c[k],o.query(c)}),b.on("click","#"+a._id+"_"+k+"_dropdownMenu .gridFilterClearSearch",function(a){window.jQuery(this).parents("li").find(".gridFilterSearch").val("");var b=o.query();delete b[k],o.query(b)}),b.on("click","#"+a._id+"_"+k+"_dropdownMenu li",function(b){b.stopPropagation();var c,e,f,g,h,i=$(this),j=i.find('input[type="checkbox"]'),m=!0;if(window.jQuery(b.target).is("input")?(j.prop("checked",j.prop("checked")),e=j.is(":checked")):(j.prop("checked",!j.prop("checked")),e=j.is(":checked")),g=window.jQuery(this),c=g.attr("data-val"),"$all"===c)delete d[k],g.parent().find('li[data-val!="$all"]').find('input[type="checkbox"]').prop("checked",!1);else{switch(g.parent().find('[data-val="$all"]').find('input[type="checkbox"]').prop("checked",!1),l){case"integer":c=parseInt(c,10);break;case"float":c=parseFloat(c)}for(d[k]=d[k]||{$in:[]},f=d[k].$in,f||(f=d[k].$in=[]),h=0;h<f.length;h++)if(f[h]===c){e===!1&&f.splice(h,1),m=!1;break}m&&e&&f.push(c),f.length||delete d[k]}a.emit("beforeChange","filter"),a.emit("beforeFilter",d),a._from.queryData(d),a._from.pageFirst&&a._from.pageFirst()})})}a.emit("refresh")}return this},l.prototype.count=function(){return this._from.count()},f.prototype.grid=h.prototype.grid=function(a,b,c){if(this._db&&this._db._grid){if(void 0!==a){if(void 0!==b){if(this._db._grid[a])throw this.logIdentifier()+" Cannot create a grid because a grid with this name already exists: "+a;var d=new l(a,b,c).db(this._db).from(this);return this._grid=this._grid||[],this._grid.push(d),this._db._grid[a]=d,d}return this._db._grid[a]}return this._db._grid}},f.prototype.unGrid=h.prototype.unGrid=function(a,b,c){var d,e;if(this._db&&this._db._grid){if(a&&b){if(this._db._grid[a])return e=this._db._grid[a],delete this._db._grid[a],e.drop();throw this.logIdentifier()+" Cannot remove grid because a grid with this name does not exist: "+name}for(d in this._db._grid)this._db._grid.hasOwnProperty(d)&&(e=this._db._grid[d],delete this._db._grid[d],e.drop(),this.debug()&&console.log(this.logIdentifier()+' Removed grid binding "'+d+'"'));this._db._grid={}}},f.prototype._addGrid=g.prototype._addGrid=h.prototype._addGrid=function(a){return void 0!==a&&(this._grid=this._grid||[],this._grid.push(a)),this},f.prototype._removeGrid=g.prototype._removeGrid=h.prototype._removeGrid=function(a){if(void 0!==a&&this._grid){var b=this._grid.indexOf(a);b>-1&&this._grid.splice(b,1)}return this},e.prototype.init=function(){this._grid={},j.apply(this,arguments)},e.prototype.gridExists=function(a){return Boolean(this._grid[a])},e.prototype.grid=function(a,b,c){return this._grid[a]||(this.debug()||this._db&&this._db.debug())&&console.log(this.logIdentifier()+" Creating grid "+a),this._grid[a]=this._grid[a]||new l(a,b,c).db(this),this._grid[a]},e.prototype.unGrid=function(a,b,c){return this._grid[a]||(this.debug()||this._db&&this._db.debug())&&console.log(this.logIdentifier()+" Creating grid "+a),this._grid[a]=this._grid[a]||new l(a,b,c).db(this),this._grid[a]},e.prototype.grids=function(){var a,b,c=[];for(b in this._grid)this._grid.hasOwnProperty(b)&&(a=this._grid[b],c.push({name:b,count:a.count(),linked:void 0!==a.isLinked&&a.isLinked()}));return c},d.finishModule("Grid"),b.exports=l},{"./Collection":6,"./CollectionGroup":7,"./ReactorIO":38,"./Shared":40,"./View":42}],14:[function(a,b,c){"use strict";var d,e,f,g;d=a("./Shared"),g=a("./Overload");var h=function(a,b){this.init.apply(this,arguments)};h.prototype.init=function(a,b){if(this._options=b,this._selector=window.jQuery(this._options.selector),!this._selector[0])throw this.classIdentifier()+' "'+a.name()+'": Chart target element does not exist via selector: '+this._options.selector;this._listeners={},this._collection=a,this._options.series=[],b.chartOptions=b.chartOptions||{},b.chartOptions.credits=!1;var c,d,e;switch(this._options.type){case"pie":this._selector.highcharts(this._options.chartOptions),this._chart=this._selector.highcharts(),c=this._collection.find(),d={allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!0,format:"<b>{point.name}</b>: {y} ({point.percentage:.0f}%)",style:{color:window.Highcharts.theme&&window.Highcharts.theme.contrastTextColor||"black"}}},e=this.pieDataFromCollectionData(c,this._options.keyField,this._options.valField),window.jQuery.extend(d,this._options.seriesOptions),window.jQuery.extend(d,{name:this._options.seriesName,data:e}),this._chart.addSeries(d,!0,!0);break;case"line":case"area":case"column":case"bar":e=this.seriesDataFromCollectionData(this._options.seriesField,this._options.keyField,this._options.valField,this._options.orderBy,this._options),this._options.chartOptions.xAxis=e.xAxis,this._options.chartOptions.series=e.series,this._selector.highcharts(this._options.chartOptions),this._chart=this._selector.highcharts();break;default:throw this.classIdentifier()+' "'+a.name()+'": Chart type specified is not currently supported by ForerunnerDB: '+this._options.type}this._hookEvents()},d.addModule("Highchart",h),e=d.modules.Collection,f=e.prototype.init,d.mixin(h.prototype,"Mixin.Common"),d.mixin(h.prototype,"Mixin.Events"),d.synthesize(h.prototype,"state"),h.prototype.pieDataFromCollectionData=function(a,b,c){var d,e=[];for(d=0;d<a.length;d++)e.push([a[d][b],a[d][c]]);return e},h.prototype.seriesDataFromCollectionData=function(a,b,c,d,e){var f,g,h,i,j,k,l,m=this._collection.distinct(a),n=[],o=e&&e.chartOptions&&e.chartOptions.xAxis?e.chartOptions.xAxis:{categories:[]};for(k=0;k<m.length;k++){for(f=m[k],g={},g[a]=f,i=[],h=this._collection.find(g,{orderBy:d}),l=0;l<h.length;l++)o.categories?(o.categories.push(h[l][b]),i.push(h[l][c])):i.push([h[l][b],h[l][c]]);if(j={name:f,data:i},e.seriesOptions)for(l in e.seriesOptions)e.seriesOptions.hasOwnProperty(l)&&(j[l]=e.seriesOptions[l]);n.push(j)}return{xAxis:o,series:n}},h.prototype._hookEvents=function(){var a=this;a._collection.on("change",function(){a._changeListener.apply(a,arguments)}),a._collection.on("drop",function(){a.drop.apply(a)})},h.prototype._changeListener=function(){var a=this;if("undefined"!=typeof a._collection&&a._chart){var b,c=a._collection.find();switch(a._options.type){case"pie":a._chart.series[0].setData(a.pieDataFromCollectionData(c,a._options.keyField,a._options.valField),!0,!0);break;case"bar":case"line":case"area":case"column":var d=a.seriesDataFromCollectionData(a._options.seriesField,a._options.keyField,a._options.valField,a._options.orderBy,a._options);for(d.xAxis.categories&&a._chart.xAxis[0].setCategories(d.xAxis.categories),b=0;b<d.series.length;b++)a._chart.series[b]?a._chart.series[b].setData(d.series[b].data,!0,!0):a._chart.addSeries(d.series[b],!0,!0)}}},h.prototype.drop=function(a){return!!this.isDropped()||(this._state="dropped",this._chart&&this._chart.destroy(),this._collection&&(this._collection.off("change",this._changeListener),this._collection.off("drop",this.drop),this._collection._highcharts&&delete this._collection._highcharts[this._options.selector]),delete this._chart,delete this._options,delete this._collection,this.emit("drop",this),a&&a(!1,!0),delete this._listeners,!0)},e.prototype.init=function(){this._highcharts={},f.apply(this,arguments)},e.prototype.pieChart=new g({object:function(a){return a.type="pie",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="pie",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.selector=a,e.keyField=b,e.valField=c,e.seriesName=d,this.pieChart(e)}}),e.prototype.lineChart=new g({string:function(a){return this._highcharts[a]},object:function(a){return a.type="line",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="line",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.seriesField=b,e.selector=a,e.keyField=c,e.valField=d,this.lineChart(e)}}),e.prototype.areaChart=new g({object:function(a){return a.type="area",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="area",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.seriesField=b,e.selector=a,e.keyField=c,e.valField=d,this.areaChart(e)}}),e.prototype.columnChart=new g({object:function(a){return a.type="column",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="column",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.seriesField=b,e.selector=a,e.keyField=c,e.valField=d,this.columnChart(e)}}),e.prototype.barChart=new g({object:function(a){return a.type="bar",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="bar",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.seriesField=b,e.selector=a,e.keyField=c,e.valField=d,this.barChart(e)}}),e.prototype.stackedBarChart=new g({object:function(a){return a.type="bar",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="bar",a.plotOptions=a.plotOptions||{},a.plotOptions.series=a.plotOptions.series||{},a.plotOptions.series.stacking=a.plotOptions.series.stacking||"normal",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.seriesField=b,e.selector=a,e.keyField=c,e.valField=d,this.stackedBarChart(e)}}),e.prototype.dropChart=function(a){this._highcharts&&this._highcharts[a]&&this._highcharts[a].drop()},d.finishModule("Highchart"),b.exports=h},{"./Overload":32,"./Shared":40}],15:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=a("./BinaryTree"),g=a("./GeoHash"),h=new e,i=new g,j=[5e3,1250,156,39.1,4.89,1.22,.153,.0382,.00477,.00119,149e-6,372e-7],k=function(){this.init.apply(this,arguments)};k.prototype.init=function(a,b,c){this._btree=new f,this._btree.index(a),this._size=0,this._id=this._itemKeyHash(a,a),this._debug=!(!b||!b.debug)&&b.debug,this.unique(!(!b||!b.unique)&&b.unique),void 0!==a&&this.keys(a),void 0!==c&&(this.collection(c),this._btree.primaryKey(c.primaryKey())),this.name(b&&b.name?b.name:this._id),this._btree.debug(this._debug)},d.addModule("Index2d",k),d.mixin(k.prototype,"Mixin.Common"),d.mixin(k.prototype,"Mixin.ChainReactor"),d.mixin(k.prototype,"Mixin.Sorting"),k.prototype.id=function(){return this._id},k.prototype.state=function(){return this._state},k.prototype.size=function(){return this._size},d.synthesize(k.prototype,"data"),d.synthesize(k.prototype,"name"),d.synthesize(k.prototype,"collection"),d.synthesize(k.prototype,"type"),d.synthesize(k.prototype,"unique"),k.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=h.parse(this._keys).length,this):this._keys},k.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._btree.clear(),this._size=0,this._unique&&(this._uniqueLookup={}),a=0;a<d;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},k.prototype.insert=function(a,b){var c,d=this._unique;a=this.decouple(a),d&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a);var e,f,g,j,k,l=this._btree.keys();for(k=0;k<l.length;k++)e=h.get(a,l[k].path),e instanceof Array&&(g=e[0],j=e[1],f=i.encode(g,j),h.set(a,l[k].path,f));return!!this._btree.insert(a)&&(this._size++,!0)},k.prototype.remove=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),!!this._btree.remove(a)&&(this._size--,!0)},k.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},k.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},k.prototype.lookup=function(a,b,c){var d,e,f,g,i=this._btree.keys();for(g=0;g<i.length;g++)if(d=i[g].path,e=h.get(a,d),"object"==typeof e)return e.$near&&(f=[],f=f.concat(this.near(d,e.$near,b,c))),e.$geoWithin&&(f=[],f=f.concat(this.geoWithin(d,e.$geoWithin,b,c))),f;return this._btree.lookup(a,b)},k.prototype.near=function(a,b,c,d){var e,f,g,k,l,m,n,o,p,q,r,s,t=this,u=[],v=this._collection.primaryKey();if("km"===b.$distanceUnits){for(o=b.$maxDistance,s=0;s<j.length;s++)if(o>j[s]){n=s+1;break}}else if("miles"===b.$distanceUnits)for(o=1.60934*b.$maxDistance,s=0;s<j.length;s++)if(o>j[s]){n=s+1;break}for(0===n&&(n=1),d&&d.time("index2d.calculateHashArea"),e=i.calculateHashArrayByRadius(b.$point,o,n),d&&d.time("index2d.calculateHashArea"),d&&(d.data("index2d.near.precision",n),d.data("index2d.near.hashArea",e),d.data("index2d.near.maxDistanceKm",o),d.data("index2d.near.centerPointCoords",[b.$point[0],b.$point[1]])),m=[],f=0,k={},g=[],d&&d.time("index2d.near.getDocsInsideHashArea"),s=0;s<e.length;s++)l=this._btree.startsWith(a,e[s]),k[e[s]]=l,f+=l._visitedCount,g=g.concat(l._visitedNodes),m=m.concat(l);if(d&&(d.time("index2d.near.getDocsInsideHashArea"),d.data("index2d.near.startsWith",k),d.data("index2d.near.visitedTreeNodes",g)),d&&d.time("index2d.near.lookupDocsById"),m=this._collection._primaryIndex.lookup(m),d&&d.time("index2d.near.lookupDocsById"),b.$distanceField&&(m=this.decouple(m)),m.length){for(p={},d&&d.time("index2d.near.calculateDistanceFromCenter"),s=0;s<m.length;s++)r=h.get(m[s],a),q=p[m[s][v]]=this.distanceBetweenPoints(b.$point[0],b.$point[1],r[0],r[1]),q<=o&&(b.$distanceField&&h.set(m[s],b.$distanceField,"km"===b.$distanceUnits?q:Math.round(.621371*q)),b.$geoHashField&&h.set(m[s],b.$geoHashField,i.encode(r[0],r[1],n)),u.push(m[s]));d&&d.time("index2d.near.calculateDistanceFromCenter"),d&&d.time("index2d.near.sortResultsByDistance"),u.sort(function(a,b){return t.sortAsc(p[a[v]],p[b[v]])}),d&&d.time("index2d.near.sortResultsByDistance")}return u},k.prototype.geoWithin=function(a,b,c){return console.log("geoWithin() is currently a prototype method with no actual implementation... it just returns a blank array."),[]},k.prototype.distanceBetweenPoints=function(a,b,c,d){var e=6371,f=this.toRadians(a),g=this.toRadians(c),h=this.toRadians(c-a),i=this.toRadians(d-b),j=Math.sin(h/2)*Math.sin(h/2)+Math.cos(f)*Math.cos(g)*Math.sin(i/2)*Math.sin(i/2),k=2*Math.atan2(Math.sqrt(j),Math.sqrt(1-j));return e*k},k.prototype.toRadians=function(a){return.01747722222222*a},k.prototype.match=function(a,b){return this._btree.match(a,b)},k.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},k.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},k.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index["2d"]=k,d.finishModule("Index2d"),b.exports=k},{"./BinaryTree":5,"./GeoHash":12,"./Path":34,"./Shared":40}],16:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=a("./BinaryTree"),g=function(){this.init.apply(this,arguments)};g.prototype.init=function(a,b,c){this._btree=new f,this._btree.index(a),this._size=0,this._id=this._itemKeyHash(a,a),this._debug=!(!b||!b.debug)&&b.debug,this.unique(!(!b||!b.unique)&&b.unique),void 0!==a&&this.keys(a),void 0!==c&&(this.collection(c),this._btree.primaryKey(c.primaryKey())),this.name(b&&b.name?b.name:this._id),this._btree.debug(this._debug)},d.addModule("IndexBinaryTree",g),d.mixin(g.prototype,"Mixin.ChainReactor"),d.mixin(g.prototype,"Mixin.Sorting"),g.prototype.id=function(){return this._id},g.prototype.state=function(){return this._state},g.prototype.size=function(){return this._size},d.synthesize(g.prototype,"data"),d.synthesize(g.prototype,"name"),d.synthesize(g.prototype,"collection"),d.synthesize(g.prototype,"type"),d.synthesize(g.prototype,"unique"),g.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},g.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._btree.clear(),this._size=0,this._unique&&(this._uniqueLookup={}),a=0;a<d;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},g.prototype.insert=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),!!this._btree.insert(a)&&(this._size++,!0)},g.prototype.remove=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),!!this._btree.remove(a)&&(this._size--,!0)},g.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},g.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},g.prototype.lookup=function(a,b,c){return this._btree.lookup(a,b,c)},g.prototype.match=function(a,b){return this._btree.match(a,b)},g.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},g.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},g.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index.btree=g,d.finishModule("IndexBinaryTree"),b.exports=g},{"./BinaryTree":5,"./Path":34,"./Shared":40}],17:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a,b,c){this._crossRef={},this._size=0,this._id=this._itemKeyHash(a,a),this.data({}),this.unique(!(!b||!b.unique)&&b.unique),void 0!==a&&this.keys(a),void 0!==c&&this.collection(c),this.name(b&&b.name?b.name:this._id)},d.addModule("IndexHashMap",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.id=function(){return this._id},f.prototype.state=function(){return this._state},f.prototype.size=function(){return this._size},d.synthesize(f.prototype,"data"),d.synthesize(f.prototype,"name"),d.synthesize(f.prototype,"collection"),d.synthesize(f.prototype,"type"),d.synthesize(f.prototype,"unique"),f.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},f.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._data={},this._size=0,this._unique&&(this._uniqueLookup={}),a=0;a<d;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},f.prototype.insert=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pushToPathValue(d[e],a)},f.prototype.update=function(a,b){},f.prototype.remove=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pullFromPathValue(d[e],a)},f.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},f.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},f.prototype.pushToPathValue=function(a,b){var c=this._data[a]=this._data[a]||[];c.indexOf(b)===-1&&(c.push(b),this._size++,this.pushToCrossRef(b,c))},f.prototype.pullFromPathValue=function(a,b){var c,d=this._data[a];c=d.indexOf(b),c>-1&&(d.splice(c,1),this._size--,this.pullFromCrossRef(b,d)),d.length||delete this._data[a]},f.prototype.pull=function(a){var b,c,d=a[this._collection.primaryKey()],e=this._crossRef[d],f=e.length;for(b=0;b<f;b++)c=e[b],this._pullFromArray(c,a);this._size--,delete this._crossRef[d]},f.prototype._pullFromArray=function(a,b){for(var c=a.length;c--;)a[c]===b&&a.splice(c,1)},f.prototype.pushToCrossRef=function(a,b){var c,d=a[this._collection.primaryKey()];this._crossRef[d]=this._crossRef[d]||[],c=this._crossRef[d],c.indexOf(b)===-1&&c.push(b)},f.prototype.pullFromCrossRef=function(a,b){var c=a[this._collection.primaryKey()];delete this._crossRef[c]},f.prototype.lookup=function(a){return this._data[this._itemHash(a,this._keys)]||[]},f.prototype.match=function(a,b){var c,d=new e,f=d.parseArr(this._keys),g=d.parseArr(a),h=[],i=0;for(c=0;c<f.length;c++){if(g[c]!==f[c])return{matchedKeys:[],totalKeyCount:g.length,score:0};i++,h.push(g[c])}return{matchedKeys:h,totalKeyCount:g.length,score:i}},f.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},f.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},f.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index.hashed=f,d.finishModule("IndexHashMap"),b.exports=f},{"./Path":34,"./Shared":40}],18:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a,b){this.init.apply(this,arguments)};e.prototype.init=function(a,b){b=b||{},this._name=a,this._data={},this._primaryKey=b.primaryKey||"_id"},d.addModule("KeyValueStore",e),d.mixin(e.prototype,"Mixin.ChainReactor"),d.synthesize(e.prototype,"name"),e.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey=a,this):this._primaryKey},e.prototype.truncate=function(){return this._data={},this},e.prototype.set=function(a,b){return this._data[a]=!b||b,this},e.prototype.get=function(a){return this._data[a]},e.prototype.lookup=function(a){var b,c,d,e=this._primaryKey,f=typeof a,g=[];if("string"===f||"number"===f)return d=this.get(a),void 0!==d?[d]:[];if("object"===f){if(a instanceof Array){for(c=a.length,g=[],b=0;b<c;b++)d=this.lookup(a[b]),d&&(d instanceof Array?g=g.concat(d):g.push(d));return g}if(void 0!==a[e]&&null!==a[e])return this.lookup(a[e])}},e.prototype.unSet=function(a){return delete this._data[a],this},e.prototype.uniqueSet=function(a,b){return void 0===this._data[a]&&(this._data[a]=b,!0)},d.finishModule("KeyValueStore"),b.exports=e},{"./Shared":40}],19:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Operation"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(){this._data=[]},d.addModule("Metrics",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.create=function(a){var b=new e(a);return this._enabled&&this._data.push(b),b},f.prototype.start=function(){return this._enabled=!0,this},f.prototype.stop=function(){return this._enabled=!1,this},f.prototype.clear=function(){return this._data=[],this},f.prototype.list=function(){return this._data},d.finishModule("Metrics"),b.exports=f},{"./Operation":31,"./Shared":40}],20:[function(a,b,c){"use strict";var d={preSetData:function(){},postSetData:function(){}};b.exports=d},{}],21:[function(a,b,c){"use strict";var d={chain:function(a){this.debug&&this.debug()&&(a._reactorIn&&a._reactorOut?console.log(a._reactorIn.logIdentifier()+' Adding target "'+a._reactorOut.instanceIdentifier()+'" to the chain reactor target list'):console.log(this.logIdentifier()+' Adding target "'+a.instanceIdentifier()+'" to the chain reactor target list')),this._chain=this._chain||[];var b=this._chain.indexOf(a);b===-1&&this._chain.push(a)},unChain:function(a){if(this.debug&&this.debug()&&(a._reactorIn&&a._reactorOut?console.log(a._reactorIn.logIdentifier()+' Removing target "'+a._reactorOut.instanceIdentifier()+'" from the chain reactor target list'):console.log(this.logIdentifier()+' Removing target "'+a.instanceIdentifier()+'" from the chain reactor target list')),this._chain){var b=this._chain.indexOf(a);b>-1&&this._chain.splice(b,1)}},chainEnabled:function(a){return void 0!==a?(this._chainDisabled=!a,this):!this._chainDisabled},chainWillSend:function(){return Boolean(this._chain&&!this._chainDisabled)},chainSend:function(a,b,c){if(this._chain&&!this._chainDisabled){var d,e,f=this._chain,g=f.length,h=this.decouple(b,g);for(e=0;e<g;e++){if(d=f[e],d._state&&(!d._state||d.isDropped()))throw console.log("Reactor Data:",a,b,c),console.log("Reactor Node:",d),"Chain reactor attempting to send data to target reactor node that is in a dropped state!";this.debug&&this.debug()&&(d._reactorIn&&d._reactorOut?console.log(d._reactorIn.logIdentifier()+' Sending data down the chain reactor pipe to "'+d._reactorOut.instanceIdentifier()+'"'):console.log(this.logIdentifier()+' Sending data down the chain reactor pipe to "'+d.instanceIdentifier()+'"')), d.chainReceive&&d.chainReceive(this,a,h[e],c)}}},chainReceive:function(a,b,c,d){var e={sender:a,type:b,data:c,options:d},f=!1;this.debug&&this.debug()&&console.log(this.logIdentifier()+" Received data from parent reactor node"),this._chainHandler&&(f=this._chainHandler(e)),f||this.chainSend(e.type,e.data,e.options)}};b.exports=d},{}],22:[function(a,b,c){"use strict";var d,e,f=0,g=a("./Overload"),h=a("./Serialiser"),i=new h;e=function(){var a,b,c,d=[];for(b=0;b<256;b++){for(a=b,c=0;c<8;c++)a=1&a?3988292384^a>>>1:a>>>1;d[b]=a}return d}(),d={serialiser:i,make:function(a){return i.convert(a)},store:function(a,b){if(void 0!==a){if(void 0!==b)return this._store=this._store||{},this._store[a]=b,this;if(this._store)return this._store[a]}},unStore:function(a){return void 0!==a&&delete this._store[a],this},decouple:function(a,b){if(void 0!==a&&""!==a){if(b){var c,d=this.jStringify(a),e=[];for(c=0;c<b;c++)e.push(this.jParse(d));return e}return this.jParse(this.jStringify(a))}},jParse:function(a){return JSON.parse(a,i.reviver())},jStringify:JSON.stringify,objectId:function(a){var b,c=Math.pow(10,17);if(a){var d,e=0,g=a.length;for(d=0;d<g;d++)e+=a.charCodeAt(d)*c;b=e.toString(16)}else f++,b=(f+(Math.random()*c+Math.random()*c+Math.random()*c+Math.random()*c)).toString(16);return b},hash:function(a){return JSON.stringify(a)},debug:new g([function(){return this._debug&&this._debug.all},function(a){return void 0!==a?"boolean"==typeof a?(this._debug=this._debug||{},this._debug.all=a,this.chainSend("debug",this._debug),this):this._debug&&this._debug[a]||this._db&&this._db._debug&&this._db._debug[a]||this._debug&&this._debug.all:this._debug&&this._debug.all},function(a,b){return void 0!==a?void 0!==b?(this._debug=this._debug||{},this._debug[a]=b,this.chainSend("debug",this._debug),this):this._debug&&this._debug[b]||this._db&&this._db._debug&&this._db._debug[a]:this._debug&&this._debug.all}]),classIdentifier:function(){return"ForerunnerDB."+this.className},instanceIdentifier:function(){return"["+this.className+"]"+this.name()},logIdentifier:function(){return"ForerunnerDB "+this.instanceIdentifier()},convertToFdb:function(a){var b,c,d,e;for(e in a)if(a.hasOwnProperty(e)&&(d=a,e.indexOf(".")>-1)){for(e=e.replace(".$","[|$|]"),c=e.split(".");b=c.shift();)b=b.replace("[|$|]",".$"),c.length?d[b]={}:d[b]=a[e],d=d[b];delete a[e]}},isDropped:function(){return"dropped"===this._state},debounce:function(a,b,c){var d,e=this;e._debounce=e._debounce||{},e._debounce[a]&&clearTimeout(e._debounce[a].timeout),d={callback:b,timeout:setTimeout(function(){delete e._debounce[a],b()},c)},e._debounce[a]=d},checksum:function(a){var b,c=-1;for(b=0;b<a.length;b++)c=c>>>8^e[255&(c^a.charCodeAt(b))];return(c^-1)>>>0}},b.exports=d},{"./Overload":32,"./Serialiser":39}],23:[function(a,b,c){"use strict";var d={TYPE_INSERT:0,TYPE_UPDATE:1,TYPE_REMOVE:2,PHASE_BEFORE:0,PHASE_AFTER:1};b.exports=d},{}],24:[function(a,b,c){"use strict";var d=a("./Overload"),e={on:new d({"string, function":function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a]["*"]=this._listeners[a]["*"]||[],this._listeners[a]["*"].push(b),this},"string, *, function":function(a,b,c){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a][b]=this._listeners[a][b]||[],this._listeners[a][b].push(c),this}}),once:new d({"string, function":function(a,b){var c=this,d=!1,e=function(){d||(c.off(a,e),b.apply(c,arguments),d=!0)};return this.on(a,e)},"string, *, function":function(a,b,c){var d=this,e=!1,f=function(){e||(d.off(a,b,f),c.apply(d,arguments),e=!0)};return this.on(a,b,f)}}),off:new d({string:function(a){var b=this;return this._emitting?(this._eventRemovalQueue=this._eventRemovalQueue||[],this._eventRemovalQueue.push(function(){b.off(a)})):this._listeners&&this._listeners[a]&&a in this._listeners&&delete this._listeners[a],this},"string, function":function(a,b){var c,d,e=this;return this._emitting?(this._eventRemovalQueue=this._eventRemovalQueue||[],this._eventRemovalQueue.push(function(){e.off(a,b)})):"string"==typeof b?this._listeners&&this._listeners[a]&&this._listeners[a][b]&&delete this._listeners[a][b]:this._listeners&&a in this._listeners&&(c=this._listeners[a]["*"],d=c.indexOf(b),d>-1&&c.splice(d,1)),this},"string, *, function":function(a,b,c){var d=this;if(this._emitting)this._eventRemovalQueue=this._eventRemovalQueue||[],this._eventRemovalQueue.push(function(){d.off(a,b,c)});else if(this._listeners&&a in this._listeners&&b in this.listeners[a]){var e=this._listeners[a][b],f=e.indexOf(c);f>-1&&e.splice(f,1)}},"string, *":function(a,b){var c=this;this._emitting?(this._eventRemovalQueue=this._eventRemovalQueue||[],this._eventRemovalQueue.push(function(){c.off(a,b)})):this._listeners&&a in this._listeners&&b in this._listeners[a]&&delete this._listeners[a][b]}}),emit:function(a,b){if(this._listeners=this._listeners||{},this._emitting=!0,a in this._listeners){var c,d,e,f,g,h,i;if(this._listeners[a]["*"])for(f=this._listeners[a]["*"],d=f.length,c=0;c<d;c++)e=f[c],"function"==typeof e&&e.apply(this,Array.prototype.slice.call(arguments,1));if(b instanceof Array&&b[0]&&b[0][this._primaryKey])for(g=this._listeners[a],d=b.length,c=0;c<d;c++)if(g[b[c][this._primaryKey]])for(h=g[b[c][this._primaryKey]].length,i=0;i<h;i++)e=g[b[c][this._primaryKey]][i],"function"==typeof e&&g[b[c][this._primaryKey]][i].apply(this,Array.prototype.slice.call(arguments,1))}return this._emitting=!1,this._processRemovalQueue(),this},_processRemovalQueue:function(){var a;if(this._eventRemovalQueue&&this._eventRemovalQueue.length){for(a=0;a<this._eventRemovalQueue.length;a++)this._eventRemovalQueue[a]();this._eventRemovalQueue=[]}},deferEmit:function(a,b){var c,d=this;return this._noEmitDefer||this._db&&(!this._db||this._db._noEmitDefer)?this.emit.apply(this,arguments):(c=arguments,this._deferTimeout=this._deferTimeout||{},this._deferTimeout[a]&&clearTimeout(this._deferTimeout[a]),this._deferTimeout[a]=setTimeout(function(){d.debug()&&console.log(d.logIdentifier()+" Emitting "+c[0]),d.emit.apply(d,c)},1)),this}};b.exports=e},{"./Overload":32}],25:[function(a,b,c){"use strict";var d={_match:function(a,b,c,d,e){var f,g,h,i,j,k,l=d,m=typeof a,n=typeof b,o=!0;if("object"===m&&null===a&&(m="null"),"object"===n&&null===b&&(n="null"),e=e||{},c=c||{},e.$rootQuery||(e.$rootQuery=b),e.$rootSource||(e.$rootSource=a),e.$currentQuery=b,e.$rootData=e.$rootData||{},"string"!==m&&"number"!==m&&"null"!==m||"string"!==n&&"number"!==n&&"null"!==n){if(("string"===m||"number"===m)&&"object"===n&&b instanceof RegExp)b.test(a)||(o=!1);else for(k in b)if(b.hasOwnProperty(k)){if(e.$previousQuery=e.$parent,e.$parent={query:b[k],key:k,parent:e.$previousQuery},f=!1,j=k.substr(0,2),"//"===j)continue;if(0===j.indexOf("$")&&(i=this._matchOp(k,a,b[k],c,e),i>-1)){if(i){if("or"===d)return!0}else o=i;f=!0}if(!f&&b[k]instanceof RegExp)if(f=!0,"object"===m&&void 0!==a[k]&&b[k].test(a[k])){if("or"===d)return!0}else o=!1;if(!f)if("object"==typeof b[k])if(void 0!==a[k])if(a[k]instanceof Array&&!(b[k]instanceof Array)){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else if(!(a[k]instanceof Array)&&b[k]instanceof Array){for(g=!1,h=0;h<b[k].length&&!(g=this._match(a[k],b[k][h],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else if("object"==typeof a)if(g=this._match(a[k],b[k],c,l,e)){if("or"===d)return!0}else o=!1;else if(g=this._match(void 0,b[k],c,l,e)){if("or"===d)return!0}else o=!1;else if(b[k]&&void 0!==b[k].$exists)if(g=this._match(void 0,b[k],c,l,e)){if("or"===d)return!0}else o=!1;else o=!1;else if(a&&a[k]===b[k]){if("or"===d)return!0}else if(a&&a[k]&&a[k]instanceof Array&&b[k]&&"object"!=typeof b[k]){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else o=!1;if("and"===d&&!o)return!1}}else"number"===m||"null"===m||"null"===n?a!==b&&(o=!1):a.localeCompare(b)&&(o=!1);return o},_matchOp:function(a,b,c,d,e){switch(a){case"$gt":return b>c;case"$gte":return b>=c;case"$lt":return b<c;case"$lte":return b<=c;case"$exists":return void 0===b!==c;case"$eq":return b==c;case"$eeq":return b===c;case"$ne":return b!=c;case"$nee":return b!==c;case"$or":for(var f=0;f<c.length;f++)if(this._match(b,c[f],d,"and",e))return!0;return!1;case"$and":for(var g=0;g<c.length;g++)if(!this._match(b,c[g],d,"and",e))return!1;return!0;case"$in":if(c instanceof Array){var h,i=c,j=i.length;for(h=0;h<j;h++)if(this._match(b,i[h],d,"and",e))return!0;return!1}return"object"==typeof c?this._match(b,c,d,"and",e):(console.log(this.logIdentifier()+" Cannot use an $in operator on a non-array key: "+a,e.$rootQuery),!1);case"$nin":if(c instanceof Array){var k,l=c,m=l.length;for(k=0;k<m;k++)if(this._match(b,l[k],d,"and",e))return!1;return!0}return"object"==typeof c?this._match(b,c,d,"and",e):(console.log(this.logIdentifier()+" Cannot use a $nin operator on a non-array key: "+a,e.$rootQuery),!1);case"$fastIn":return c instanceof Array?c.indexOf(b)!==-1:(console.log(this.logIdentifier()+" Cannot use an $fastIn operator on a non-array key: "+a,e.$rootQuery),!1);case"$distinct":e.$rootData["//distinctLookup"]=e.$rootData["//distinctLookup"]||{};for(var n in c)if(c.hasOwnProperty(n))return e.$rootData["//distinctLookup"][n]=e.$rootData["//distinctLookup"][n]||{},!e.$rootData["//distinctLookup"][n][b[n]]&&(e.$rootData["//distinctLookup"][n][b[n]]=!0,!0);break;case"$count":var o,p,q;for(o in c)if(c.hasOwnProperty(o)&&(p=b[o],q="object"==typeof p&&p instanceof Array?p.length:0,!this._match(q,c[o],d,"and",e)))return!1;return!0;case"$find":case"$findOne":case"$findSub":var r,s,t,u,v,w,x="collection",y={};if(!c.$from)throw a+" missing $from property!";if(c.$fromType&&(x=c.$fromType,!this.db()[x]||"function"!=typeof this.db()[x]))throw a+' cannot operate against $fromType "'+x+'" because the database does not recognise this type of object!';if(r=c.$query||{},s=c.$options||{},"$findSub"===a){if(!c.$path)throw a+" missing $path property!";if(v=c.$path,t=c.$subQuery||{},u=c.$subOptions||{},!(e.$parent&&e.$parent.parent&&e.$parent.parent.key))return this._match(b,r,{},"and",e)&&(w=this._findSub([b],v,t,u)),w&&w.length>0;w=this.db()[x](c.$from).findSub(r,v,t,u)}else w=this.db()[x](c.$from)[a.substr(1)](r,s);return y[e.$parent.parent.key]=w,this._match(b,y,d,"and",e)}return-1},applyJoin:function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=this,y=[];for(a instanceof Array||(a=[a]),e=0;e<b.length;e++)for(f in b[e])if(b[e].hasOwnProperty(f))for(g=b[e][f],h=g.$sourceType||"collection",i="$"+h+"."+f,j=f,c[i]?k=c[i]:this._db[h]&&"function"==typeof this._db[h]&&(k=this._db[h](f)),l=0;l<a.length;l++){m={},n=!1,o=!1,p="";for(q in g)if(g.hasOwnProperty(q))if(r=g[q],"$"===q.substr(0,1))switch(q){case"$where":if(!r.$query&&!r.$options)throw'$join $where clause requires "$query" and / or "$options" keys to work!';r.$query&&(m=x.resolveDynamicQuery(r.$query,a[l])),r.$options&&(s=r.$options);break;case"$as":j=r;break;case"$multi":n=r;break;case"$require":o=r;break;case"$prefix":p=r}else m[q]=x.resolveDynamicQuery(r,a[l]);if(t=k.find(m,s),!o||o&&t[0])if("$root"===j){if(n!==!1)throw this.logIdentifier()+' Cannot combine [$as: "$root"] with [$multi: true] in $join clause!';u=t[0],v=a[l];for(w in u)u.hasOwnProperty(w)&&void 0===v[p+w]&&(v[p+w]=u[w])}else a[l][j]=n===!1?t[0]:t;else y.push(l)}return y},resolveDynamicQuery:function(a,b){var c,d,e,f,g,h=this;if("string"==typeof a)return f="$$."===a.substr(0,3)?this.sharedPathSolver.value(b,a.substr(3,a.length-3)):this.sharedPathSolver.value(b,a),f.length>1?{$in:f}:f[0];c={};for(g in a)if(a.hasOwnProperty(g))switch(d=typeof a[g],e=a[g],d){case"string":"$$."===e.substr(0,3)?c[g]=this.sharedPathSolver.value(b,e.substr(3,e.length-3))[0]:c[g]=e;break;case"object":c[g]=h.resolveDynamicQuery(e,b);break;default:c[g]=e}return c},spliceArrayByIndexList:function(a,b){var c;for(c=b.length-1;c>=0;c--)a.splice(b[c],1)}};b.exports=d},{}],26:[function(a,b,c){"use strict";var d={sortAsc:function(a,b){return"string"==typeof a&&"string"==typeof b?a.localeCompare(b):a>b?1:a<b?-1:void 0===a&&void 0!==b?-1:void 0===b&&void 0!==a?1:0},sortDesc:function(a,b){return"string"==typeof a&&"string"==typeof b?b.localeCompare(a):a>b?-1:a<b?1:void 0===a&&void 0!==b?1:void 0===b&&void 0!==a?-1:0},sortAscIgnoreUndefined:function(a,b){return"string"==typeof a&&"string"==typeof b?a.localeCompare(b):a>b?1:a<b?-1:0},sortDescIgnoreUndefined:function(a,b){return"string"==typeof a&&"string"==typeof b?b.localeCompare(a):a>b?-1:a<b?1:0}};b.exports=d},{}],27:[function(a,b,c){"use strict";var d,e={};d={tagAdd:function(a){var b,c=this,d=e[a]=e[a]||[];for(b=0;b<d.length;b++)if(d[b]===c)return!0;return d.push(c),c.on&&c.on("drop",function(){c.tagRemove(a)}),!0},tagRemove:function(a){var b,c=e[a];if(c)for(b=0;b<c.length;b++)if(c[b]===this)return c.splice(b,1),!0;return!1},tagLookup:function(a){return e[a]||[]},tagDrop:function(a,b){var c,d,e,f=this.tagLookup(a);if(c=function(){d--,b&&0===d&&b(!1)},f.length)for(d=f.length,e=f.length-1;e>=0;e--)f[e].drop(c);return!0}},b.exports=d},{}],28:[function(a,b,c){"use strict";var d=a("./Overload"),e={addTrigger:function(a,b,c,d){var e,f=this;return e=f._triggerIndexOf(a,b,c),e===-1&&(f.triggerStack={},f._trigger=f._trigger||{},f._trigger[b]=f._trigger[b]||{},f._trigger[b][c]=f._trigger[b][c]||[],f._trigger[b][c].push({id:a,method:d,enabled:!0}),!0)},removeTrigger:function(a,b,c){var d,e=this;return d=e._triggerIndexOf(a,b,c),d>-1&&e._trigger[b][c].splice(d,1),!1},ignoreTriggers:function(a){return void 0!==a?(this._ignoreTriggers=a,this):this._ignoreTriggers},addLinkIO:function(a,b){var c,d,e,f,g,h,i,j,k,l=this;if(l._linkIO=l._linkIO||{},l._linkIO[a]=b,d=b.export,e=b.import,d&&(h=l.db().collection(d.to)),e&&(i=l.db().collection(e.from)),j=[l.TYPE_INSERT,l.TYPE_UPDATE,l.TYPE_REMOVE],c=function(a,b){b(!1,!0)},d&&(d.match||(d.match=c),d.types||(d.types=j),f=function(a,b,c){d.match(c,function(b,e){!b&&e&&d.data(c,a.type,function(b,c,d){!b&&c&&(h.ignoreTriggers(!0),"remove"!==a.type?h.upsert(c,d):h.remove(c,d),h.ignoreTriggers(!1))})})}),e&&(e.match||(e.match=c),e.types||(e.types=j),g=function(a,b,c){e.match(c,function(b,d){!b&&d&&e.data(c,a.type,function(b,c,d){!b&&c&&(h.ignoreTriggers(!0),"remove"!==a.type?l.upsert(c,d):l.remove(c,d),h.ignoreTriggers(!1))})})}),d)for(k=0;k<d.types.length;k++)l.addTrigger(a+"export"+d.types[k],d.types[k],l.PHASE_AFTER,f);if(e)for(k=0;k<e.types.length;k++)i.addTrigger(a+"import"+e.types[k],e.types[k],l.PHASE_AFTER,g)},removeLinkIO:function(a){var b,c,d,e,f=this,g=f._linkIO[a];if(g){if(b=g.export,c=g.import,b)for(e=0;e<b.types.length;e++)f.removeTrigger(a+"export"+b.types[e],b.types[e],f.db.PHASE_AFTER);if(c)for(d=f.db().collection(c.from),e=0;e<c.types.length;e++)d.removeTrigger(a+"import"+c.types[e],c.types[e],f.db.PHASE_AFTER);return delete f._linkIO[a],!0}return!1},enableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!0,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!0,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!0,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1&&(d._trigger[b][c][e].enabled=!0,!0)}}),disableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!1,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!1,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!1,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1&&(d._trigger[b][c][e].enabled=!1,!0)}}),willTrigger:function(a,b){if(!this._ignoreTriggers&&this._trigger&&this._trigger[a]&&this._trigger[a][b]&&this._trigger[a][b].length){var c,d=this._trigger[a][b];for(c=0;c<d.length;c++)if(d[c].enabled)return!0}return!1},processTrigger:function(a,b,c,d,e){var f,g,h,i,j,k,l,m=this;if(!m._ignoreTriggers&&m._trigger&&m._trigger[b]&&m._trigger[b][c]){for(f=m._trigger[b][c],h=f.length,g=0;g<h;g++)if(i=f[g],i.enabled){if(m.debug()){switch(b){case this.TYPE_INSERT:k="insert";break;case this.TYPE_UPDATE:k="update";break;case this.TYPE_REMOVE:k="remove";break;default:k=""}switch(c){case this.PHASE_BEFORE:l="before";break;case this.PHASE_AFTER:l="after";break;default:l=""}console.log('Triggers: Processing trigger "'+i.id+'" for '+k+' in phase "'+l+'"')}if(m.triggerStack&&m.triggerStack[b]&&m.triggerStack[b][c]&&m.triggerStack[b][c][i.id]){m.debug()&&console.log('Triggers: Will not run trigger "'+i.id+'" for '+k+' in phase "'+l+'" as it is already in the stack!');continue}if(m.triggerStack=m.triggerStack||{},m.triggerStack[b]={},m.triggerStack[b][c]={},m.triggerStack[b][c][i.id]=!0,j=i.method.call(m,a,d,e),m.triggerStack=m.triggerStack||{},m.triggerStack[b]={},m.triggerStack[b][c]={},m.triggerStack[b][c][i.id]=!1,j===!1)return!1;if(void 0!==j&&j!==!0&&j!==!1)throw"ForerunnerDB.Mixin.Triggers: Trigger error: "+j}return!0}},_triggerIndexOf:function(a,b,c){var d,e,f,g=this;if(g._trigger&&g._trigger[b]&&g._trigger[b][c])for(d=g._trigger[b][c],e=d.length,f=0;f<e;f++)if(d[f].id===a)return f;return-1}};b.exports=e},{"./Overload":32}],29:[function(a,b,c){"use strict";var d={_updateProperty:function(a,b,c){a[b]=c,this.debug()&&console.log(this.logIdentifier()+' Setting non-data-bound document property "'+b+'" to val "'+c+'"')},_updateIncrement:function(a,b,c){a[b]+=c},_updateSpliceMove:function(a,b,c){a.splice(c,0,a.splice(b,1)[0]),this.debug()&&console.log(this.logIdentifier()+' Moving non-data-bound document array index from "'+b+'" to "'+c+'"')},_updateSplicePush:function(a,b,c){a.length>b?a.splice(b,0,c):a.push(c)},_updateSplicePull:function(a,b,c){c||(c=1),a.splice(b,c)},_updatePush:function(a,b){a.push(b)},_updatePull:function(a,b){a.splice(b,1)},_updateMultiply:function(a,b,c){a[b]*=c},_updateRename:function(a,b,c){a[c]=a[b],delete a[b]},_updateOverwrite:function(a,b,c){a[b]=c},_updateUnset:function(a,b){delete a[b]},_updateClear:function(a,b){var c,d=a[b];if(d&&"object"==typeof d)for(c in d)d.hasOwnProperty(c)&&this._updateUnset(d,c)},_updatePop:function(a,b){var c,d=!1;if(a.length>0)if(b>0){for(c=0;c<b;c++)a.pop();d=!0}else if(b<0){for(c=0;c>b;c--)a.shift();d=!0}return d}};b.exports=d},{}],30:[function(a,b,c){"use strict";var d,e,f,g,h,i=a("./Shared");g=function(){this.init.apply(this,arguments)},g.prototype.init=function(a){var b=this;b._core=a,b.rootPath("/fdb")},i.addModule("NodeApiClient",g),i.mixin(g.prototype,"Mixin.Common"),i.mixin(g.prototype,"Mixin.Events"),i.mixin(g.prototype,"Mixin.ChainReactor"),d=i.modules.Core,e=d.prototype.init,f=i.modules.Collection,h=i.overload,i.synthesize(g.prototype,"rootPath"),g.prototype.server=function(a,b){return void 0!==a?("/"===a.substr(a.length-1,1)&&(a=a.substr(0,a.length-1)),void 0!==b?this._server=a+":"+b:this._server=a,this._host=a,this._port=b,this):void 0!==b?{host:this._host,port:this._port,url:this._server}:this._server},g.prototype.http=function(a,b,c,d,e){var f,g,h,i=this,j=new XMLHttpRequest;switch(a=a.toUpperCase(),j.onreadystatechange=function(){4===j.readyState&&(200===j.status?j.responseText?e(!1,i.jParse(j.responseText)):e(!1,{}):204===j.status?e(!1,{}):(e(j.status,j.responseText),i.emit("httpError",j.status,j.responseText)))},a){case"GET":case"DELETE":case"HEAD":this._sessionData&&(c=void 0!==c?c:{},c[this._sessionData.key]=this._sessionData.obj),f=b+(void 0!==c?"?"+i.jStringify(c):""),h=null;break;case"POST":case"PUT":case"PATCH":this._sessionData&&(g={},g[this._sessionData.key]=this._sessionData.obj),f=b+(void 0!==g?"?"+i.jStringify(g):""),h=void 0!==c?i.jStringify(c):null;break;default:return!1}return j.open(a,f,!0),j.setRequestHeader("Content-Type","application/json;charset=UTF-8"),j.send(h),this},g.prototype.head=new h({"string, function":function(a,b){return this.$main.call(this,a,void 0,{},b)},"string, *, function":function(a,b,c){return this.$main.call(this,a,b,{},c)},"string, *, object, function":function(a,b,c,d){return this.$main.call(this,a,b,c,d)},$main:function(a,b,c,d){return this.http("HEAD",this.server()+this._rootPath+a,b,c,d)}}),g.prototype.get=new h({"string, function":function(a,b){return this.$main.call(this,a,void 0,{},b)},"string, *, function":function(a,b,c){return this.$main.call(this,a,b,{},c)},"string, *, object, function":function(a,b,c,d){return this.$main.call(this,a,b,c,d)},$main:function(a,b,c,d){return this.http("GET",this.server()+this._rootPath+a,b,c,d)}}),g.prototype.put=new h({"string, function":function(a,b){return this.$main.call(this,a,void 0,{},b)},"string, *, function":function(a,b,c){return this.$main.call(this,a,b,{},c)},"string, *, object, function":function(a,b,c,d){return this.$main.call(this,a,b,c,d)},$main:function(a,b,c,d){return this.http("PUT",this.server()+this._rootPath+a,b,c,d)}}),g.prototype.post=new h({"string, function":function(a,b){return this.$main.call(this,a,void 0,{},b)},"string, *, function":function(a,b,c){return this.$main.call(this,a,b,{},c)},"string, *, object, function":function(a,b,c,d){return this.$main.call(this,a,b,c,d)},$main:function(a,b,c,d){return this.http("POST",this.server()+this._rootPath+a,b,c,d)}}),g.prototype.patch=new h({"string, function":function(a,b){return this.$main.call(this,a,void 0,{},b)},"string, *, function":function(a,b,c){return this.$main.call(this,a,b,{},c)},"string, *, object, function":function(a,b,c,d){return this.$main.call(this,a,b,c,d)},$main:function(a,b,c,d){return this.http("PATCH",this.server()+this._rootPath+a,b,c,d)}}),g.prototype.postPatch=function(a,b,c,d,e){var f=this;this.head(a+"/"+b,void 0,{},function(g,h){return g?404===g?f.http("POST",f.server()+f._rootPath+a,c,d,e):void e(g,c):f.http("PATCH",f.server()+f._rootPath+a+"/"+b,c,d,e)})},g.prototype.delete=new h({"string, function":function(a,b){return this.$main.call(this,a,void 0,{},b)},"string, *, function":function(a,b,c){return this.$main.call(this,a,b,{},c)},"string, *, object, function":function(a,b,c,d){return this.$main.call(this,a,b,c,d)},$main:function(a,b,c,d){return this.http("DELETE",this.server()+this._rootPath+a,b,c,d)}}),g.prototype.session=function(a,b){return void 0!==a&&void 0!==b?(this._sessionData={key:a,obj:b},this):this._sessionData},g.prototype.sync=function(a,b,c,d,e){var f,g,h,j=this,k="",l=!0;this.debug()&&console.log(this.logIdentifier()+" Connecting to API server "+this.server()+this._rootPath+b),g=this.server()+this._rootPath+b+"/_sync",this._sessionData&&(h=h||{},this._sessionData.key?h[this._sessionData.key]=this._sessionData.obj:i.mixin(h,this._sessionData.obj)),c&&(h=h||{},h.$query=c),d&&(h=h||{},void 0===d.$initialData&&(d.$initialData=!0),h.$options=d),h&&(k=this.jStringify(h),g+="?"+k),f=new EventSource(g),a.__apiConnection=f,f.addEventListener("open",function(c){(!d||d&&d.$initialData)&&j.get(b,h,function(b,c){b||a.upsert(c)})},!1),f.addEventListener("error",function(b){2===f.readyState&&a.unSync(),l&&(l=!1,e(b))},!1),f.addEventListener("insert",function(b){var c=j.jParse(b.data);a.insert(c.dataSet)},!1),f.addEventListener("update",function(b){var c=j.jParse(b.data);a.update(c.query,c.update)},!1),f.addEventListener("remove",function(b){var c=j.jParse(b.data);a.remove(c.query)},!1),e&&f.addEventListener("connected",function(a){l&&(l=!1,e(!1))},!1)},f.prototype.sync=new h({function:function(a){this.$main.call(this,"/"+this._db.name()+"/collection/"+this.name(),null,null,a)},"string, function":function(a,b){this.$main.call(this,"/"+this._db.name()+"/collection/"+a,null,null,b)},"object, function":function(a,b){this.$main.call(this,"/"+this._db.name()+"/collection/"+this.name(),a,null,b)},"string, string, function":function(a,b,c){this.$main.call(this,"/"+this._db.name()+"/"+a+"/"+b,null,null,c)},"string, object, function":function(a,b,c){this.$main.call(this,"/"+this._db.name()+"/collection/"+a,b,null,c)},"string, string, object, function":function(a,b,c,d){this.$main.call(this,"/"+this._db.name()+"/"+a+"/"+b,c,null,d)},"object, object, function":function(a,b,c){this.$main.call(this,"/"+this._db.name()+"/collection/"+this.name(),a,b,c)},"string, object, object, function":function(a,b,c,d){this.$main.call(this,"/"+this._db.name()+"/collection/"+a,b,c,d)},"string, string, object, object, function":function(a,b,c,d,e){this.$main.call(this,"/"+this._db.name()+"/"+a+"/"+b,c,d,e)},$main:function(a,b,c,d){var e=this;if(!this._db||!this._db._core)throw this.logIdentifier()+" Cannot sync for an anonymous collection! (Collection must be attached to a database)";this.unSync(),this._db._core.api.sync(this,a,b,c,d),this.on("drop",function(){e.unSync()})}}),f.prototype.unSync=function(){return!!this.__apiConnection&&(2!==this.__apiConnection.readyState&&this.__apiConnection.close(),delete this.__apiConnection,!0)},f.prototype.http=new h({"string, function":function(a,b){this.$main.call(this,a,"/"+this._db.name()+"/collection/"+this.name(),void 0,void 0,{},b)},$main:function(a,b,c,d,e,f){if(this._db&&this._db._core)return this._db._core.api.http("GET",this._db._core.api.server()+this._rootPath+b,{$query:c,$options:d},e,f);throw this.logIdentifier()+" Cannot do HTTP for an anonymous collection! (Collection must be attached to a database)"}}),f.prototype.autoHttp=new h({"string, function":function(a,b){this.$main.call(this,a,"/"+this._db.name()+"/collection/"+this.name(),void 0,void 0,{},b)},"string, string, function":function(a,b,c){this.$main.call(this,a,"/"+this._db.name()+"/collection/"+b,void 0,void 0,{},c)},"string, string, string, function":function(a,b,c,d){this.$main.call(this,a,"/"+this._db.name()+"/"+b+"/"+c,void 0,void 0,{},d)},"string, string, string, object, function":function(a,b,c,d,e){this.$main.call(this,a,"/"+this._db.name()+"/"+b+"/"+c,d,void 0,{},e)},"string, string, string, object, object, function":function(a,b,c,d,e,f){this.$main.call(this,a,"/"+this._db.name()+"/"+b+"/"+c,d,e,{},f)},$main:function(a,b,c,d,e,f){var g=this;if(this._db&&this._db._core)return this._db._core.api.http("GET",this._db._core.api.server()+this._db._core.api._rootPath+b,{$query:c,$options:d},e,function(b,c){var d;if(!b&&c)switch(a){case"GET":g.insert(c);break;case"POST":c.inserted&&c.inserted.length&&g.insert(c.inserted);break;case"PUT":case"PATCH":if(c instanceof Array)for(d=0;d<c.length;d++)g.updateById(c[d]._id,{$overwrite:c[d]});else g.updateById(c._id,{$overwrite:c});break;case"DELETE":g.remove(c)}f(b,c)});throw this.logIdentifier()+" Cannot do HTTP for an anonymous collection! (Collection must be attached to a database)"}}),d.prototype.init=function(){e.apply(this,arguments),this.api=new g(this)},i.finishModule("NodeApiClient"),b.exports=g},{"./Shared":40}],31:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(a){this.pathSolver=new e,this.counter=0,this.init.apply(this,arguments)};f.prototype.init=function(a){this._data={operation:a,index:{potential:[],used:!1},steps:[],time:{startMs:0,stopMs:0,totalMs:0,process:{}},flag:{},log:[]}},d.addModule("Operation",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.start=function(){this._data.time.startMs=(new Date).getTime()},f.prototype.log=function(a){if(a){var b=this._log.length>0?this._data.log[this._data.log.length-1].time:0,c={event:a,time:(new Date).getTime(),delta:0};return this._data.log.push(c),b&&(c.delta=c.time-b),this}return this._data.log},f.prototype.time=function(a){if(void 0!==a){var b=this._data.time.process,c=b[a]=b[a]||{};return c.startMs?(c.stopMs=(new Date).getTime(),c.totalMs=c.stopMs-c.startMs,c.stepObj.totalMs=c.totalMs,delete c.stepObj):(c.startMs=(new Date).getTime(),c.stepObj={name:a},this._data.steps.push(c.stepObj)),this}return this._data.time},f.prototype.flag=function(a,b){return void 0===a||void 0===b?void 0!==a?this._data.flag[a]:this._data.flag:void(this._data.flag[a]=b)},f.prototype.data=function(a,b,c){return void 0!==b?(this.pathSolver.set(this._data,a,b),this):this.pathSolver.get(this._data,a)},f.prototype.pushData=function(a,b,c){this.pathSolver.push(this._data,a,b)},f.prototype.stop=function(){this._data.time.stopMs=(new Date).getTime(),this._data.time.totalMs=this._data.time.stopMs-this._data.time.startMs},d.finishModule("Operation"),b.exports=f},{"./Path":34,"./Shared":40}],32:[function(a,b,c){"use strict";var d=function(a,b){if(b||(b=a,a=void 0),b){var c,d,e,f,g,h,i=this;if(!(b instanceof Array)){e={};for(c in b)if(b.hasOwnProperty(c))if(f=c.replace(/ /g,""),f.indexOf("*")===-1)e[f]=b[c];else for(h=this.generateSignaturePermutations(f),g=0;g<h.length;g++)e[h[g]]||(e[h[g]]=b[c]);b=e}return function(){var e,f,g,h=[];if(b instanceof Array){for(d=b.length,c=0;c<d;c++)if(b[c].length===arguments.length)return i.callExtend(this,"$main",b,b[c],arguments)}else{for(c=0;c<arguments.length&&(f=typeof arguments[c],"object"===f&&arguments[c]instanceof Array&&(f="array"),1!==arguments.length||"undefined"!==f);c++)h.push(f);if(e=h.join(","),b[e])return i.callExtend(this,"$main",b,b[e],arguments);for(c=h.length;c>=0;c--)if(e=h.slice(0,c).join(","),b[e+",..."])return i.callExtend(this,"$main",b,b[e+",..."],arguments)}throw g=void 0!==a?a:"function"==typeof this.name?this.name():"Unknown",console.log("Overload Definition:",b),'ForerunnerDB.Overload "'+g+'": Overloaded method does not have a matching signature "'+e+'" for the passed arguments: '+this.jStringify(h)}}return function(){}};d.prototype.generateSignaturePermutations=function(a){var b,c,d=[],e=["array","string","object","number","function","undefined"];if(a.indexOf("*")>-1)for(c=0;c<e.length;c++)b=a.replace("*",e[c]),d=d.concat(this.generateSignaturePermutations(b));else d.push(a);return d},d.prototype.callExtend=function(a,b,c,d,e){var f,g;return a&&c[b]?(f=a[b],a[b]=c[b],g=d.apply(a,e),a[b]=f,g):d.apply(a,e)},b.exports=d},{}],33:[function(a,b,c){"use strict";var d,e,f,g;d=a("./Shared");var h=function(){this.init.apply(this,arguments)};h.prototype.init=function(a){var b=this;this._name=a,this._data=new g("__FDB__dc_data_"+this._name),this._collData=new f,this._sources=[],this._sourceDroppedWrap=function(){b._sourceDropped.apply(b,arguments)}},d.addModule("Overview",h),d.mixin(h.prototype,"Mixin.Common"),d.mixin(h.prototype,"Mixin.ChainReactor"),d.mixin(h.prototype,"Mixin.Constants"),d.mixin(h.prototype,"Mixin.Triggers"),d.mixin(h.prototype,"Mixin.Events"),d.mixin(h.prototype,"Mixin.Tags"),f=a("./Collection"),g=a("./Document"),e=d.modules.Db,d.synthesize(h.prototype,"state"),d.synthesize(h.prototype,"db"),d.synthesize(h.prototype,"name"),d.synthesize(h.prototype,"query",function(a){var b=this.$super(a);return void 0!==a&&this._refresh(),b}),d.synthesize(h.prototype,"queryOptions",function(a){var b=this.$super(a);return void 0!==a&&this._refresh(),b}),d.synthesize(h.prototype,"reduce",function(a){var b=this.$super(a);return void 0!==a&&this._refresh(),b}),h.prototype.from=function(a){return void 0!==a?("string"==typeof a&&(a=this._db.collection(a)),this._setFrom(a),this):this._sources},h.prototype.find=function(a,b,c){return this._collData.find.apply(this._collData,arguments)},h.prototype.exec=function(){var a=this.reduce();return a?a.apply(this):void 0},h.prototype.count=function(){return this._collData.count.apply(this._collData,arguments)},h.prototype._setFrom=function(a){for(;this._sources.length;)this._removeSource(this._sources[0]);return this._addSource(a),this},h.prototype._addSource=function(a){return a&&"View"===a.className&&(a=a.data(),this.debug()&&console.log(this.logIdentifier()+' Using internal private data "'+a.instanceIdentifier()+'" for IO graph linking')), this._sources.indexOf(a)===-1&&(this._sources.push(a),a.chain(this),a.on("drop",this._sourceDroppedWrap),this._refresh()),this},h.prototype._removeSource=function(a){a&&"View"===a.className&&(a=a.data(),this.debug()&&console.log(this.logIdentifier()+' Using internal private data "'+a.instanceIdentifier()+'" for IO graph linking'));var b=this._sources.indexOf(a);return b>-1&&(this._sources.splice(a,1),a.unChain(this),a.off("drop",this._sourceDroppedWrap),this._refresh()),this},h.prototype._sourceDropped=function(a){a&&this._removeSource(a)},h.prototype._refresh=function(){if(!this.isDropped()){if(this._sources&&this._sources[0]){this._collData.primaryKey(this._sources[0].primaryKey());var a,b=[];for(a=0;a<this._sources.length;a++)b=b.concat(this._sources[a].find(this._query,this._queryOptions));this._collData.setData(b)}if(this._reduce){var c=this._reduce.apply(this);this._data.setData(c)}}},h.prototype._chainHandler=function(a){switch(a.type){case"setData":case"insert":case"update":case"remove":this._refresh()}},h.prototype.data=function(){return this._data},h.prototype.drop=function(a){if(!this.isDropped()){for(this._state="dropped",delete this._data,delete this._collData;this._sources.length;)this._removeSource(this._sources[0]);delete this._sources,this._db&&this._name&&delete this._db._overview[this._name],this.emit("drop",this),a&&a(!1,!0),delete this._listeners}return!0},e.prototype.overview=function(a){var b=this;return a?a instanceof h?a:this._overview&&this._overview[a]?this._overview[a]:(this._overview=this._overview||{},this._overview[a]=new h(a).db(this),b.deferEmit("create",b._overview[a],"overview",a),this._overview[a]):this._overview||{}},e.prototype.overviews=function(){var a,b,c=[];for(b in this._overview)this._overview.hasOwnProperty(b)&&(a=this._overview[b],c.push({name:b,count:a.count(),linked:void 0!==a.isLinked&&a.isLinked()}));return c},d.finishModule("Overview"),b.exports=h},{"./Collection":6,"./Document":11,"./Shared":40}],34:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){a&&this.path(a)},d.addModule("Path",e),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),e.prototype.path=function(a){return void 0!==a?(this._path=this.clean(a),this._pathParts=this._path.split("."),this):this._path},e.prototype.hasObjectPaths=function(a,b){var c,d=!0;for(c in a)if(a.hasOwnProperty(c)){if(void 0===b[c])return!1;if("object"==typeof a[c]&&(d=this.hasObjectPaths(a[c],b[c]),!d))return!1}return d},e.prototype.countKeys=function(a){var b,c=0;for(b in a)a.hasOwnProperty(b)&&void 0!==a[b]&&("object"!=typeof a[b]?c++:c+=this.countKeys(a[b]));return c},e.prototype.countObjectPaths=function(a,b){var c,d,e={},f=0,g=0;for(d in b)b.hasOwnProperty(d)&&("object"==typeof b[d]?(c=this.countObjectPaths(a[d],b[d]),e[d]=c.matchedKeys,g+=c.totalKeyCount,f+=c.matchedKeyCount):(g++,a&&a[d]&&"object"!=typeof a[d]?(e[d]=!0,f++):e[d]=!1));return{matchedKeys:e,matchedKeyCount:f,totalKeyCount:g}},e.prototype.parse=function(a,b){var c,d,e,f=[],g="";for(d in a)if(a.hasOwnProperty(d))if(g=d,"object"==typeof a[d])if(b)for(c=this.parse(a[d],b),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path,value:c[e].value});else for(c=this.parse(a[d]),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path});else b?f.push({path:g,value:a[d]}):f.push({path:g});return f},e.prototype.parseArr=function(a,b){return b=b||{},this._parseArr(a,"",[],b)},e.prototype._parseArr=function(a,b,c,d){var e,f="";b=b||"",c=c||[];for(e in a)a.hasOwnProperty(e)&&(!d.ignore||d.ignore&&!d.ignore.test(e))&&(f=b?b+"."+e:e,"object"==typeof a[e]?(d.verbose&&c.push(f),this._parseArr(a[e],f,c,d)):c.push(f));return c},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.get=function(a,b){return this.value(a,b)[0]},e.prototype.value=function(a,b,c){var d,e,f,g,h,i,j,k,l;if(b&&b.indexOf(".")===-1)return[a[b]];if(void 0!==a&&"object"==typeof a){if((!c||c&&!c.skipArrCheck)&&a instanceof Array){for(j=[],k=0;k<a.length;k++)j.push(this.get(a[k],b));return j}for(i=[],void 0!==b&&(b=this.clean(b),d=b.split(".")),e=d||this._pathParts,f=e.length,g=a,k=0;k<f;k++){if(g=g[e[k]],h instanceof Array){for(l=0;l<h.length;l++)i=i.concat(this.value(h,l+"."+e[k],{skipArrCheck:!0}));return i}if(!g||"object"!=typeof g)break;h=g}return[g]}return[]},e.prototype.push=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;if(b=this.clean(b),d=b.split("."),e=d.shift(),d.length)a[e]=a[e]||{},this.set(a[e],d.join("."),c);else{if(a[e]=a[e]||[],!(a[e]instanceof Array))throw"ForerunnerDB.Path: Cannot push to a path whose endpoint is not an array!";a[e].push(c)}}return a},e.prototype.keyValue=function(a,b){var c,d,e,f,g,h,i;for(void 0!==b&&(b=this.clean(b),c=b.split(".")),d=c||this._pathParts,e=d.length,f=a,i=0;i<e;i++){if(f=f[d[i]],!f||"object"!=typeof f){h=d[i]+":"+f;break}g=f}return h},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.clean=function(a){return"."===a.substr(0,1)&&(a=a.substr(1,a.length-1)),a},d.finishModule("Path"),b.exports=e},{"./Shared":40}],35:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m=a("./Shared"),n=a("async"),o=a("localforage");a("./PersistCompress"),a("./PersistCrypto");k=function(){this.init.apply(this,arguments)},k.prototype.localforage=o,k.prototype.init=function(a){var b=this;this._encodeSteps=[function(){return b._encode.apply(b,arguments)}],this._decodeSteps=[function(){return b._decode.apply(b,arguments)}],a.isClient()&&void 0!==window.Storage&&(this.mode("localforage"),o.config({name:String(a.core().name()),storeName:"FDB"}))},m.addModule("Persist",k),m.mixin(k.prototype,"Mixin.ChainReactor"),m.mixin(k.prototype,"Mixin.Common"),d=m.modules.Db,e=a("./Collection"),f=e.prototype.drop,g=a("./CollectionGroup"),h=e.prototype.init,i=d.prototype.init,j=d.prototype.drop,l=m.overload,m.synthesize(k.prototype,"auto",function(a){var b=this;return void 0!==a&&(a?(this._db.on("create",function(){b._autoLoad.apply(b,arguments)}),this._db.on("change",function(){b._autoSave.apply(b,arguments)}),this._db.debug()&&console.log(this._db.logIdentifier()+" Automatic load/save enabled")):(this._db.off("create",this._autoLoad),this._db.off("change",this._autoSave),this._db.debug()&&console.log(this._db.logIdentifier()+" Automatic load/save disbled"))),this.$super.call(this,a)}),k.prototype._autoLoad=function(a,b,c){var d=this;"function"==typeof a.load?(d._db.debug()&&console.log(d._db.logIdentifier()+" Auto-loading data for "+b+":",c),a.load(function(a,b){a&&d._db.debug()&&console.log(d._db.logIdentifier()+" Automatic load failed:",a),d.emit("load",a,b)})):d._db.debug()&&console.log(d._db.logIdentifier()+" Auto-load for "+b+":",c,"no load method, skipping")},k.prototype._autoSave=function(a,b,c){var d=this;"function"==typeof a.save&&(d._db.debug()&&console.log(d._db.logIdentifier()+" Auto-saving data for "+b+":",c),a.save(function(a,b){a&&d._db.debug()&&console.log(d._db.logIdentifier()+" Automatic save failed:",a),d.emit("save",a,b)}))},k.prototype.mode=function(a){return void 0!==a?(this._mode=a,this):this._mode},k.prototype.driver=function(a){if(void 0!==a){switch(a.toUpperCase()){case"LOCALSTORAGE":o.setDriver(o.LOCALSTORAGE);break;case"WEBSQL":o.setDriver(o.WEBSQL);break;case"INDEXEDDB":o.setDriver(o.INDEXEDDB);break;default:throw"ForerunnerDB.Persist: The persistence driver you have specified is not found. Please use either IndexedDB, WebSQL or LocalStorage!"}return this}return o.driver()},k.prototype.decode=function(a,b){n.waterfall([function(b){b&&b(!1,a,{})}].concat(this._decodeSteps),b)},k.prototype.encode=function(a,b){n.waterfall([function(b){b&&b(!1,a,{})}].concat(this._encodeSteps),b)},m.synthesize(k.prototype,"encodeSteps"),m.synthesize(k.prototype,"decodeSteps"),k.prototype.addStep=new l({object:function(a){return this.$main.call(this,function(){a.encode.apply(a,arguments)},function(){a.decode.apply(a,arguments)},0)},"function, function":function(a,b){return this.$main.call(this,a,b,0)},"function, function, number":function(a,b,c){return this.$main.call(this,a,b,c)},$main:function(a,b,c){0===c||void 0===c?(this._encodeSteps.push(a),this._decodeSteps.unshift(b)):(this._encodeSteps.splice(c,0,a),this._decodeSteps.splice(this._decodeSteps.length-c,0,b))}}),k.prototype.unwrap=function(a){var b,c=a.split("::fdb::");switch(c[0]){case"json":b=this.jParse(c[1]);break;case"raw":b=c[1]}},k.prototype._decode=function(a,b,c){var d,e;if(a){switch(d=a.split("::fdb::"),d[0]){case"json":e=this.jParse(d[1]);break;case"raw":e=d[1]}e?(b.foundData=!0,b.rowCount=e.length||0):(b.foundData=!1,b.rowCount=0),c&&c(!1,e,b)}else b.foundData=!1,b.rowCount=0,c&&c(!1,a,b)},k.prototype._encode=function(a,b,c){var d=a;a="object"==typeof a?"json::fdb::"+this.jStringify(a):"raw::fdb::"+a,d?(b.foundData=!0,b.rowCount=d.length||0):(b.foundData=!1,b.rowCount=0),c&&c(!1,a,b)},k.prototype.save=function(a,b,c){switch(this.mode()){case"localforage":this.encode(b,function(b,d,e){return b?c(b):void o.setItem(a,d,function(a){if(c){if(a)return void c(a);c(!1,d,e)}})});break;default:c&&c("No data handler.")}},k.prototype.load=function(a,b){var c=this;switch(this.mode()){case"localforage":o.getItem(a,function(a,d){return a?void(b&&b(a)):void c.decode(d,b)});break;default:b&&b("No data handler or unrecognised data type.")}},k.prototype.drop=function(a,b){switch(this.mode()){case"localforage":o.removeItem(a,function(a){b&&b(a)});break;default:b&&b("No data handler or unrecognised data type.")}},k.prototype._calcSize=function(a){var b,c,d=0,e=String(a||""),f=e.length;for(c=0;c<f;c++)b=encodeURI(e[c]).split("%").length,d+=1===b?1:b-1;return d},k.prototype.persistedSize=function(a,b){function c(a,b){if(null!==a){var c=e._calcSize(a)+e._calcSize(b);d.collections.push([b,c]),d.total+=c}}var d,e=this;switch(d={total:0,collections:[]},this.mode()){case"localforage":switch((typeof a).toLowerCase()){case"string":o.getItem(a).then(function(b){c(b,a)}).then(function(){return o.getItem(a+"-metaData")}).then(function(b){c(b,a+"-metaData")}).then(function(){b&&b(null,d)}).catch(function(a){console.error(JSON.stringify(a)),b&&b(a)});break;case"object":o.iterate(function(b,d){0===d.lastIndexOf(a.name(),0)&&null!==b&&c(b,d)}).then(function(){b(null,d)}).catch(function(a){console.error(JSON.stringify(a)),b&&b(a)});break;default:b&&b("Couldn't determine target for size calculation - must be either a collection name (string) or a db reference (object)")}break;default:b&&b("No data handler or unrecognised data type.")}},e.prototype.drop=new l({"":function(){this.isDropped()||this.drop(!0)},function:function(a){this.isDropped()||this.drop(!0,a)},boolean:function(a){if(!this.isDropped()){if(a){if(!this._name)throw"ForerunnerDB.Persist: Cannot drop a collection's persistent storage when no name assigned to collection!";this._db&&(this._db.persist.drop(this._db._name+"-"+this._name),this._db.persist.drop(this._db._name+"-"+this._name+"-metaData"))}f.call(this)}},"boolean, function":function(a,b){var c=this;if(!this.isDropped()){if(!a)return f.call(this,b);if(this._name){if(this._db)return this._db.persist.drop(this._db._name+"-"+this._name,function(){c._db.persist.drop(c._db._name+"-"+c._name+"-metaData",b)}),f.call(this);b&&b("Cannot drop a collection's persistent storage when the collection is not attached to a database!")}else b&&b("Cannot drop a collection's persistent storage when no name assigned to collection!")}}}),e.prototype.save=function(a){var b,c=this;c._name?c._db?(b=function(){c._db.persist.save(c._db._name+"-"+c._name,c._data,function(b,d,e){return b?void(a&&a(b)):void c._db.persist.save(c._db._name+"-"+c._name+"-metaData",c.metaData(),function(b,f,g){c.deferEmit("save",e,g,{tableData:d,metaData:f,tableDataName:c._db._name+"-"+c._name,metaDataName:c._db._name+"-"+c._name+"-metaData"}),a&&setTimeout(function(){a(b,e,g,{tableData:d,metaData:f,tableDataName:c._db._name+"-"+c._name,metaDataName:c._db._name+"-"+c._name+"-metaData"})},1)})})},c.isProcessingQueue()?c.on("queuesComplete",function(){b()}):b()):a&&a("Cannot save a collection that is not attached to a database!"):a&&a("Cannot save a collection with no assigned name!")},e.prototype.persistedSize=function(a){var b=this;b._name?b._db?b._db.persist.persistedSize(b._db._name+"-"+b._name,a):a&&a("Cannot determine persisted size of a collection that is not attached to a database!"):a&&a("Cannot determine persisted size of a collection with no assigned name!")},e.prototype.load=function(a){var b=this;b._name?b._db?b._db.persist.load(b._db._name+"-"+b._name,function(c,d,e){c?(b.deferEmit("load",e),a&&a(c)):b.remove({},function(){d=d||[],b.insert(d,function(){b._db.persist.load(b._db._name+"-"+b._name+"-metaData",function(c,d,f){c||d&&b.metaData(d),b.deferEmit("load",e,f),a&&a(c,e,f)})})})}):a&&a("Cannot load a collection that is not attached to a database!"):a&&a("Cannot load a collection with no assigned name!")},e.prototype.saveCustom=function(a){var b,c=this,d={};c._name?c._db?(b=function(){c.encode(c._data,function(b,e,f){b?a(b):(d.data={name:c._db._name+"-"+c._name,store:e,tableStats:f},c.encode(c._data,function(b,e,f){b?a(b):(d.metaData={name:c._db._name+"-"+c._name+"-metaData",store:e,tableStats:f},a(!1,d))}))})},c.isProcessingQueue()?c.on("queuesComplete",function(){b()}):b()):a&&a("Cannot save a collection that is not attached to a database!"):a&&a("Cannot save a collection with no assigned name!")},e.prototype.loadCustom=function(a,b){var c=this;c._name?c._db?a.data&&a.data.store?a.metaData&&a.metaData.store?c.decode(a.data.store,function(d,e,f){d?b(d):e&&(c.remove({}),c.insert(e),c.decode(a.metaData.store,function(a,d,e){a?b(a):d&&(c.metaData(d),b&&b(a,f,e))}))}):b('No "metaData" key found in passed object!'):b('No "data" key found in passed object!'):b&&b("Cannot load a collection that is not attached to a database!"):b&&b("Cannot load a collection with no assigned name!")},d.prototype.init=function(){i.apply(this,arguments),this.persist=new k(this)},d.prototype.load=new l({function:function(a){this.$main.call(this,void 0,a)},"object, function":function(a,b){this.$main.call(this,a,b)},$main:function(a,b){var c,d,e,f,g,h=this;if(c=this._collection,d=Object.keys(c),e=d.length,e<=0)return b(!1);f=function(a){a?b&&b(a):(e--,e<=0&&(h.deferEmit("load"),b&&b(!1)))};for(g in c)c.hasOwnProperty(g)&&(a?c[g].loadCustom(a,f):c[g].load(f))}}),d.prototype.save=new l({function:function(a){this.$main.call(this,{},a)},"object, function":function(a,b){this.$main.call(this,a,b)},$main:function(a,b){var c,d,e,f,g,h=this;if(c=this._collection,d=Object.keys(c),e=d.length,e<=0)return b(!1);f=function(a){a?b&&b(a):(e--,e<=0&&(h.deferEmit("save"),b&&b(!1)))};for(g in c)c.hasOwnProperty(g)&&(a.custom?c[g].saveCustom(f):c[g].save(f))}}),d.prototype.persistedSize=function(a){this.persist.persistedSize(this,a)},m.finishModule("Persist"),b.exports=k},{"./Collection":6,"./CollectionGroup":7,"./PersistCompress":36,"./PersistCrypto":37,"./Shared":40,async:43,localforage:79}],36:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("pako"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a){},d.mixin(f.prototype,"Mixin.Common"),f.prototype.encode=function(a,b,c){var d,f,g,h={data:a,type:"fdbCompress",enabled:!1};d=a.length,g=e.deflate(a,{to:"string"}),f=g.length,f<d&&(h.data=g,h.enabled=!0),b.compression={enabled:h.enabled,compressedBytes:f,uncompressedBytes:d,effect:Math.round(100/d*f)+"%"},c(!1,this.jStringify(h),b)},f.prototype.decode=function(a,b,c){var d,f=!1;a?(a=this.jParse(a),a.enabled?(d=e.inflate(a.data,{to:"string"}),f=!0):(d=a.data,f=!1),b.compression={enabled:f},c&&c(!1,d,b)):c&&c(!1,d,b)},d.plugins.FdbCompress=f,b.exports=f},{"./Shared":40,pako:80}],37:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("crypto-js"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a){if(!a||!a.pass)throw'Cannot initialise persistent storage encryption without a passphrase provided in the passed options object as the "pass" field.';this._algo=a.algo||"AES",this._pass=a.pass},d.mixin(f.prototype,"Mixin.Common"),d.synthesize(f.prototype,"pass"),f.prototype.stringify=function(a){var b={ct:a.ciphertext.toString(e.enc.Base64)};return a.iv&&(b.iv=a.iv.toString()),a.salt&&(b.s=a.salt.toString()),this.jStringify(b)},f.prototype.parse=function(a){var b=this.jParse(a),c=e.lib.CipherParams.create({ciphertext:e.enc.Base64.parse(b.ct)});return b.iv&&(c.iv=e.enc.Hex.parse(b.iv)),b.s&&(c.salt=e.enc.Hex.parse(b.s)),c},f.prototype.encode=function(a,b,c){var d,f=this,g={type:"fdbCrypto"};d=e[this._algo].encrypt(a,this._pass,{format:{stringify:function(){return f.stringify.apply(f,arguments)},parse:function(){return f.parse.apply(f,arguments)}}}),g.data=d.toString(),g.enabled=!0,b.encryption={enabled:g.enabled},c&&c(!1,this.jStringify(g),b)},f.prototype.decode=function(a,b,c){var d,f=this;if(a){a=this.jParse(a);try{if(d=e[this._algo].decrypt(a.data,this._pass,{format:{stringify:function(){return f.stringify.apply(f,arguments)},parse:function(){return f.parse.apply(f,arguments)}}}).toString(e.enc.Utf8),!d)return void(c&&c("Crypto failed to decrypt data, incorrect password?",d,b))}catch(a){return void(c&&c("Crypto failed to decrypt data, incorrect password?",d,b))}c&&c(!1,d,b)}else c&&c(!1,a,b)},d.plugins.FdbCrypto=f,b.exports=f},{"./Shared":40,"crypto-js":52}],38:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a,b,c){if(!(a&&b&&c))throw"ForerunnerDB.ReactorIO: ReactorIO requires in, out and process arguments to instantiate!";if(this._reactorIn=a,this._reactorOut=b,this._chainHandler=c,!a.chain)throw"ForerunnerDB.ReactorIO: ReactorIO requires passed in and out objects to implement the ChainReactor mixin!";a.chain(this),this.chain(b)};d.addModule("ReactorIO",e),e.prototype.drop=function(){return this.isDropped()||(this._state="dropped",this._reactorIn&&this._reactorIn.unChain(this),this._reactorOut&&this.unChain(this._reactorOut),delete this._reactorIn,delete this._reactorOut,delete this._chainHandler,this.emit("drop",this),delete this._listeners),!0},d.synthesize(e.prototype,"state"),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),d.mixin(e.prototype,"Mixin.Events"),d.finishModule("ReactorIO"),b.exports=e},{"./Shared":40}],39:[function(a,b,c){"use strict";var d=function(){this.init.apply(this,arguments)};d.prototype.init=function(){var a=this;this._encoder=[],this._decoder=[],this.registerHandler("$date",function(a){return a instanceof Date&&(a.toJSON=function(){return"$date:"+this.toISOString()},!0)},function(b){if("string"==typeof b&&0===b.indexOf("$date:"))return a.convert(new Date(b.substr(6)))}),this.registerHandler("$regexp",function(a){return a instanceof RegExp&&(a.toJSON=function(){return"$regexp:"+this.source.length+":"+this.source+":"+(this.global?"g":"")+(this.ignoreCase?"i":"")},!0)},function(b){if("string"==typeof b&&0===b.indexOf("$regexp:")){var c=b.substr(8),d=c.indexOf(":"),e=Number(c.substr(0,d)),f=c.substr(d+1,e),g=c.substr(d+e+2);return a.convert(new RegExp(f,g))}})},d.prototype.registerHandler=function(a,b,c){void 0!==a&&(this._encoder.push(b),this._decoder.push(c))},d.prototype.convert=function(a){var b,c=this._encoder;for(b=0;b<c.length;b++)if(c[b](a))return a;return a},d.prototype.reviver=function(){var a=this._decoder;return function(b,c){var d,e;for(e=0;e<a.length;e++)if(d=a[e](c),void 0!==d)return d;return c}},b.exports=d},{}],40:[function(a,b,c){"use strict";var d=a("./Overload"),e={version:"1.4.59",modules:{},plugins:{},index:{},_synth:{},addModule:function(a,b){this.modules[a]=b,this.emit("moduleLoad",[a,b])},finishModule:function(a){if(!this.modules[a])throw"ForerunnerDB.Shared: finishModule called on a module that has not been registered with addModule(): "+a;this.modules[a]._fdbFinished=!0,this.modules[a].prototype?this.modules[a].prototype.className=a:this.modules[a].className=a,this.emit("moduleFinished",[a,this.modules[a]])},moduleFinished:function(a,b){this.modules[a]&&this.modules[a]._fdbFinished?b&&b(a,this.modules[a]):this.on("moduleFinished",b)},moduleExists:function(a){return Boolean(this.modules[a])},mixin:new d({"object, string":function(a,b){var c;if("string"==typeof b&&(c=this.mixins[b],!c))throw"ForerunnerDB.Shared: Cannot find mixin named: "+b;return this.$main.call(this,a,c)},"object, *":function(a,b){return this.$main.call(this,a,b)},$main:function(a,b){if(b&&"object"==typeof b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}}),synthesize:function(a,b,c){if(this._synth[b]=this._synth[b]||function(a){return void 0!==a?(this["_"+b]=a,this):this["_"+b]},c){var d=this;a[b]=function(){var a,e=this.$super;return this.$super=d._synth[b],a=c.apply(this,arguments),this.$super=e,a}}else a[b]=this._synth[b]},overload:d,mixins:{"Mixin.Common":a("./Mixin.Common"),"Mixin.Events":a("./Mixin.Events"),"Mixin.ChainReactor":a("./Mixin.ChainReactor"),"Mixin.CRUD":a("./Mixin.CRUD"),"Mixin.Constants":a("./Mixin.Constants"),"Mixin.Triggers":a("./Mixin.Triggers"),"Mixin.Sorting":a("./Mixin.Sorting"),"Mixin.Matching":a("./Mixin.Matching"),"Mixin.Updating":a("./Mixin.Updating"),"Mixin.Tags":a("./Mixin.Tags")}};e.mixin(e,"Mixin.Events"),b.exports=e},{"./Mixin.CRUD":20,"./Mixin.ChainReactor":21,"./Mixin.Common":22,"./Mixin.Constants":23,"./Mixin.Events":24,"./Mixin.Matching":25,"./Mixin.Sorting":26,"./Mixin.Tags":27,"./Mixin.Triggers":28,"./Mixin.Updating":29,"./Overload":32}],41:[function(a,b,c){Array.prototype.filter||(Array.prototype.filter=function(a){if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=[],e=arguments.length>=2?arguments[1]:void 0,f=0;f<c;f++)if(f in b){var g=b[f];a.call(e,g,f,b)&&d.push(g)}return d}),"function"!=typeof Object.create&&(Object.create=function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}()),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null===this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c<e;){if(c in d&&d[c]===a)return c;c++}return-1}),b.exports={}},{}],42:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n=a("./Overload");d=a("./Shared");var o=function(a,b,c){this.init.apply(this,arguments)};d.addModule("View",o),d.mixin(o.prototype,"Mixin.Common"),d.mixin(o.prototype,"Mixin.Matching"),d.mixin(o.prototype,"Mixin.ChainReactor"),d.mixin(o.prototype,"Mixin.Constants"),d.mixin(o.prototype,"Mixin.Tags"),f=a("./Collection"),g=a("./CollectionGroup"),k=a("./ActiveBucket"),j=a("./ReactorIO"),h=f.prototype.init,e=d.modules.Db,i=e.prototype.init,l=d.modules.Path,m=new l,o.prototype.init=function(a,b,c){var d=this;this.sharedPathSolver=m,this._name=a,this._listeners={},this._querySettings={},this._debug={},this.query(b,c,!1),this._collectionDroppedWrap=function(){d._collectionDropped.apply(d,arguments)},this._data=new f(this.name()+"_internal")},o.prototype._handleChainIO=function(a,b){var c,d,e,f,g=a.type;return("setData"===g||"insert"===g||"update"===g||"remove"===g)&&(c=Boolean(b._querySettings.options&&b._querySettings.options.$join),d=Boolean(b._querySettings.query),e=void 0!==b._data._transformIn,!!(c||d||e)&&(f={dataArr:[],removeArr:[]},"insert"===a.type?a.data.dataSet instanceof Array?f.dataArr=a.data.dataSet:f.dataArr=[a.data.dataSet]:"update"===a.type?f.dataArr=a.data.dataSet:"remove"===a.type&&(a.data.dataSet instanceof Array?f.removeArr=a.data.dataSet:f.removeArr=[a.data.dataSet]),f.dataArr instanceof Array||(console.warn("WARNING: dataArr being processed by chain reactor in View class is inconsistent!"),f.dataArr=[]),f.removeArr instanceof Array||(console.warn("WARNING: removeArr being processed by chain reactor in View class is inconsistent!"),f.removeArr=[]),c&&(this.debug()&&console.time(this.logIdentifier()+" :: _handleChainIO_ActiveJoin"),b._handleChainIO_ActiveJoin(a,f),this.debug()&&console.timeEnd(this.logIdentifier()+" :: _handleChainIO_ActiveJoin")),d&&(this.debug()&&console.time(this.logIdentifier()+" :: _handleChainIO_ActiveQuery"),b._handleChainIO_ActiveQuery(a,f),this.debug()&&console.timeEnd(this.logIdentifier()+" :: _handleChainIO_ActiveQuery")),e&&(this.debug()&&console.time(this.logIdentifier()+" :: _handleChainIO_TransformIn"),b._handleChainIO_TransformIn(a,f),this.debug()&&console.timeEnd(this.logIdentifier()+" :: _handleChainIO_TransformIn")),!f.dataArr.length&&!f.removeArr.length||(f.pk=b._data.primaryKey(),f.removeArr.length&&(this.debug()&&console.time(this.logIdentifier()+" :: _handleChainIO_RemovePackets"),b._handleChainIO_RemovePackets(this,a,f),this.debug()&&console.timeEnd(this.logIdentifier()+" :: _handleChainIO_RemovePackets")),f.dataArr.length&&(this.debug()&&console.time(this.logIdentifier()+" :: _handleChainIO_UpsertPackets"),b._handleChainIO_UpsertPackets(this,a,f),this.debug()&&console.timeEnd(this.logIdentifier()+" :: _handleChainIO_UpsertPackets")),!0)))},o.prototype._handleChainIO_ActiveJoin=function(a,b){var c,d=b.dataArr;c=this.applyJoin(d,this._querySettings.options.$join,{},{}),this.spliceArrayByIndexList(d,c),b.removeArr=b.removeArr.concat(c)},o.prototype._handleChainIO_ActiveQuery=function(a,b){var c,d=this,e=b.dataArr;for(c=e.length-1;c>=0;c--)d._match(e[c],d._querySettings.query,d._querySettings.options,"and",{})||(b.removeArr.push(e[c]),e.splice(c,1))},o.prototype._handleChainIO_TransformIn=function(a,b){var c,d=this,e=b.dataArr,f=b.removeArr,g=d._data._transformIn;for(c=0;c<e.length;c++)e[c]=g(e[c]);for(c=0;c<f.length;c++)f[c]=g(f[c])},o.prototype._handleChainIO_RemovePackets=function(a,b,c){var d,e,f=[],g=c.pk,h=c.removeArr,i={dataSet:h,query:{$or:f}};for(e=0;e<h.length;e++)d={},d[g]=h[e][g],f.push(d);a.chainSend("remove",i)},o.prototype._handleChainIO_UpsertPackets=function(a,b,c){var d,e,f,g=this._data,h=g._primaryIndex,i=g._primaryCrc,j=c.pk,k=c.dataArr,l=[],m=[];for(f=0;f<k.length;f++)d=k[f],h.get(d[j])?i.get(d[j])!==this.hash(d[j])&&m.push(d):l.push(d);if(l.length&&a.chainSend("insert",{dataSet:l}),m.length)for(f=0;f<m.length;f++)d=m[f],e={},e[j]=d[j],a.chainSend("update",{query:e,update:d,dataSet:[d]})},o.prototype.insert=function(){this._from.insert.apply(this._from,arguments)},o.prototype.update=function(a,b,c,d){var e={$and:[this.query(),a]};this._from.update.call(this._from,e,b,c,d)},o.prototype.updateById=function(){this._from.updateById.apply(this._from,arguments)},o.prototype.remove=function(){this._from.remove.apply(this._from,arguments)},o.prototype.find=function(a,b){return this._data.find(a,b)},o.prototype.findOne=function(a,b){return this._data.findOne(a,b)},o.prototype.findById=function(a,b){return this._data.findById(a,b)},o.prototype.findSub=function(a,b,c,d){return this._data.findSub(a,b,c,d)},o.prototype._findSub=function(a,b,c,d){return this._data._findSub(a,b,c,d)},o.prototype.findSubOne=function(a,b,c,d){return this._data.findSubOne(a,b,c,d)},o.prototype._findSubOne=function(a,b,c,d){return this._data._findSubOne(a,b,c,d)},o.prototype.data=function(){return this._data},o.prototype.from=function(a,b){var c=this;if(void 0!==a){this._from&&(this._from.off("drop",this._collectionDroppedWrap),delete this._from),this._io&&(this._io.drop(),delete this._io),"string"==typeof a&&(a=this._db.collection(a)),"View"===a.className&&(a=a._data,this.debug()&&console.log(this.logIdentifier()+' Using internal data "'+a.instanceIdentifier()+'" for IO graph linking')),this._from=a,this._from.on("drop",this._collectionDroppedWrap),this._io=new j(this._from,this,function(a){return c._handleChainIO.call(this,a,c)}),this._data.primaryKey(a.primaryKey());var d=a.find(this._querySettings.query,this._querySettings.options);return this._data.setData(d,{},b),this._querySettings.options&&this._querySettings.options.$orderBy?this.rebuildActiveBucket(this._querySettings.options.$orderBy):this.rebuildActiveBucket(),this}return this._from},o.prototype._chainHandler=function(a){var b,c,d,e,f,g,h,i;switch(this.debug()&&console.log(this.logIdentifier()+" Received chain reactor data: "+a.type),a.type){case"setData":this.debug()&&console.log(this.logIdentifier()+' Setting data in underlying (internal) view collection "'+this._data.name()+'"');var j=this._from.find(this._querySettings.query,this._querySettings.options);this._data.setData(j),this.rebuildActiveBucket(this._querySettings.options);break;case"insert":if(this.debug()&&console.log(this.logIdentifier()+' Inserting some data into underlying (internal) view collection "'+this._data.name()+'"'),a.data.dataSet=this.decouple(a.data.dataSet),a.data.dataSet instanceof Array||(a.data.dataSet=[a.data.dataSet]),this._querySettings.options&&this._querySettings.options.$orderBy)for(b=a.data.dataSet,c=b.length,d=0;d<c;d++)e=this._activeBucket.insert(b[d]),this._data._insertHandle(b[d],e);else e=this._data._data.length,this._data._insertHandle(a.data.dataSet,e);break;case"update":if(this.debug()&&console.log(this.logIdentifier()+' Updating some data in underlying (internal) view collection "'+this._data.name()+'"'),g=this._data.primaryKey(),f=this._data._handleUpdate(a.data.query,a.data.update,a.data.options),this._querySettings.options&&this._querySettings.options.$orderBy)for(c=f.length,d=0;d<c;d++)h=f[d],this._activeBucket.remove(h),i=this._data._data.indexOf(h),e=this._activeBucket.insert(h),i!==e&&this._data._updateSpliceMove(this._data._data,i,e);break;case"remove":if(this.debug()&&console.log(this.logIdentifier()+' Removing some data from underlying (internal) view collection "'+this._data.name()+'"'),this._data.remove(a.data.query,a.options),this._querySettings.options&&this._querySettings.options.$orderBy)for(b=a.data.dataSet,c=b.length,d=0;d<c;d++)this._activeBucket.remove(b[d])}},o.prototype._collectionDropped=function(a){a&&delete this._from},o.prototype.ensureIndex=function(){return this._data.ensureIndex.apply(this._data,arguments)},o.prototype.on=function(){return this._data.on.apply(this._data,arguments)},o.prototype.off=function(){return this._data.off.apply(this._data,arguments)},o.prototype.emit=function(){return this._data.emit.apply(this._data,arguments)},o.prototype.deferEmit=function(){return this._data.deferEmit.apply(this._data,arguments)},o.prototype.distinct=function(a,b,c){return this._data.distinct(a,b,c)},o.prototype.primaryKey=function(){return this._data.primaryKey()},o.prototype.addTrigger=function(){return this._data.addTrigger.apply(this._data,arguments)},o.prototype.removeTrigger=function(){return this._data.removeTrigger.apply(this._data,arguments)},o.prototype.ignoreTriggers=function(){return this._data.ignoreTriggers.apply(this._data,arguments)},o.prototype.addLinkIO=function(){return this._data.addLinkIO.apply(this._data,arguments)},o.prototype.removeLinkIO=function(){return this._data.removeLinkIO.apply(this._data,arguments)},o.prototype.willTrigger=function(){return this._data.willTrigger.apply(this._data,arguments)},o.prototype.processTrigger=function(){return this._data.processTrigger.apply(this._data,arguments)},o.prototype._triggerIndexOf=function(){return this._data._triggerIndexOf.apply(this._data,arguments)},o.prototype.drop=function(a){return!this.isDropped()&&(this._from&&(this._from.off("drop",this._collectionDroppedWrap),this._from._removeView(this)),(this.debug()||this._db&&this._db.debug())&&console.log(this.logIdentifier()+" Dropping"),this._state="dropped",this._io&&this._io.drop(),this._data&&this._data.drop(),this._db&&this._name&&delete this._db._view[this._name],this.emit("drop",this), a&&a(!1,!0),delete this._chain,delete this._from,delete this._data,delete this._io,delete this._listeners,delete this._querySettings,delete this._db,!0)},o.prototype.queryData=function(a,b,c){return void 0!==a&&(this._querySettings.query=a,a.$findSub&&!a.$findSub.$from&&(a.$findSub.$from=this._data.name()),a.$findSubOne&&!a.$findSubOne.$from&&(a.$findSubOne.$from=this._data.name())),void 0!==b&&(this._querySettings.options=b),void 0===a&&void 0===b||void 0!==c&&c!==!0||this.refresh(),void 0!==a&&this.emit("queryChange",a),void 0!==b&&this.emit("queryOptionsChange",b),void 0!==a||void 0!==b?this:this.decouple(this._querySettings)},o.prototype.queryAdd=function(a,b,c){this._querySettings.query=this._querySettings.query||{};var d,e=this._querySettings.query;if(void 0!==a)for(d in a)a.hasOwnProperty(d)&&(void 0===e[d]||void 0!==e[d]&&b!==!1)&&(e[d]=a[d]);void 0!==c&&c!==!0||this.refresh(),void 0!==e&&this.emit("queryChange",e)},o.prototype.queryRemove=function(a,b){var c,d=this._querySettings.query;if(d){if(void 0!==a)for(c in a)a.hasOwnProperty(c)&&delete d[c];void 0!==b&&b!==!0||this.refresh(),void 0!==d&&this.emit("queryChange",d)}},o.prototype.query=new n({"":function(){return this.decouple(this._querySettings.query)},object:function(a){return this.$main.call(this,a,void 0,!0)},"*, boolean":function(a,b){return this.$main.call(this,a,void 0,b)},"object, object":function(a,b){return this.$main.call(this,a,b,!0)},"*, *, boolean":function(a,b,c){return this.$main.call(this,a,b,c)},$main:function(a,b,c){return void 0!==a&&(this._querySettings.query=a,a.$findSub&&!a.$findSub.$from&&(a.$findSub.$from=this._data.name()),a.$findSubOne&&!a.$findSubOne.$from&&(a.$findSubOne.$from=this._data.name())),void 0!==b&&(this._querySettings.options=b),void 0===a&&void 0===b||void 0!==c&&c!==!0||this.refresh(),void 0!==a&&this.emit("queryChange",a),void 0!==b&&this.emit("queryOptionsChange",b),void 0!==a||void 0!==b?this:this.decouple(this._querySettings)}}),o.prototype.orderBy=function(a){if(void 0!==a){var b=this.queryOptions()||{};return b.$orderBy=a,this.queryOptions(b),this}return(this.queryOptions()||{}).$orderBy},o.prototype.page=function(a){if(void 0!==a){var b=this.queryOptions()||{};return a!==b.$page&&(b.$page=a,this.queryOptions(b)),this}return(this.queryOptions()||{}).$page},o.prototype.pageFirst=function(){return this.page(0)},o.prototype.pageLast=function(){var a=this.cursor().pages,b=void 0!==a?a:0;return this.page(b-1)},o.prototype.pageScan=function(a){if(void 0!==a){var b=this.cursor().pages,c=this.queryOptions()||{},d=void 0!==c.$page?c.$page:0;return d+=a,d<0&&(d=0),d>=b&&(d=b-1),this.page(d)}},o.prototype.queryOptions=function(a,b){return void 0!==a?(this._querySettings.options=a,void 0===a.$decouple&&(a.$decouple=!0),void 0===b||b===!0?this.refresh():this.rebuildActiveBucket(a.$orderBy),void 0!==a&&this.emit("queryOptionsChange",a),this):this._querySettings.options},o.prototype.rebuildActiveBucket=function(a){if(a){var b=this._data._data,c=b.length;this._activeBucket=new k(a),this._activeBucket.primaryKey(this._data.primaryKey());for(var d=0;d<c;d++)this._activeBucket.insert(b[d])}else delete this._activeBucket},o.prototype.refresh=function(){var a,b,c,d,e=this;if(this._from&&(this._data.remove(),a=this._from.find(this._querySettings.query,this._querySettings.options),this.cursor(a.$cursor),this._data.insert(a),this._data._data.$cursor=a.$cursor),this._querySettings&&this._querySettings.options&&this._querySettings.options.$join&&this._querySettings.options.$join.length){if(e.__joinChange=e.__joinChange||function(){e._joinChange()},this._joinCollections&&this._joinCollections.length)for(c=0;c<this._joinCollections.length;c++)this._db.collection(this._joinCollections[c]).off("immediateChange",e.__joinChange);for(b=this._querySettings.options.$join,this._joinCollections=[],c=0;c<b.length;c++)for(d in b[c])b[c].hasOwnProperty(d)&&this._joinCollections.push(d);if(this._joinCollections.length)for(c=0;c<this._joinCollections.length;c++)this._db.collection(this._joinCollections[c]).on("immediateChange",e.__joinChange)}return this._querySettings.options&&this._querySettings.options.$orderBy?this.rebuildActiveBucket(this._querySettings.options.$orderBy):this.rebuildActiveBucket(),this},o.prototype._joinChange=function(a,b){this.emit("joinChange"),this.refresh()},o.prototype.count=function(){return this._data.count.apply(this._data,arguments)},o.prototype.subset=function(){return this._data.subset.apply(this._data,arguments)},o.prototype.transform=function(a){var b,c;return b=this._data.transform(),this._data.transform(a),c=this._data.transform(),c.enabled&&c.dataIn&&(b.enabled!==c.enabled||b.dataIn!==c.dataIn)&&this.refresh(),c},o.prototype.filter=function(a,b,c){return this._data.filter(a,b,c)},o.prototype.data=function(){return this._data},o.prototype.indexOf=function(){return this._data.indexOf.apply(this._data,arguments)},d.synthesize(o.prototype,"db",function(a){return a&&(this._data.db(a),this.debug(a.debug()),this._data.debug(a.debug())),this.$super.apply(this,arguments)}),d.synthesize(o.prototype,"state"),d.synthesize(o.prototype,"name"),d.synthesize(o.prototype,"cursor",function(a){return void 0===a?this._cursor||{}:void this.$super.apply(this,arguments)}),f.prototype.init=function(){this._view=[],h.apply(this,arguments)},f.prototype.view=function(a,b,c){if(this._db&&this._db._view){if(this._db._view[a])throw this.logIdentifier()+" Cannot create a view using this collection because a view with this name already exists: "+a;var d=new o(a,b,c).db(this._db).from(this);return this._view=this._view||[],this._view.push(d),d}},f.prototype._addView=g.prototype._addView=function(a){return void 0!==a&&this._view.push(a),this},f.prototype._removeView=g.prototype._removeView=function(a){if(void 0!==a){var b=this._view.indexOf(a);b>-1&&this._view.splice(b,1)}return this},e.prototype.init=function(){this._view={},i.apply(this,arguments)},e.prototype.view=function(a){var b=this;return a instanceof o?a:this._view[a]?this._view[a]:((this.debug()||this._db&&this._db.debug())&&console.log(this.logIdentifier()+" Creating view "+a),this._view[a]=new o(a).db(this),b.deferEmit("create",b._view[a],"view",a),this._view[a])},e.prototype.viewExists=function(a){return Boolean(this._view[a])},e.prototype.views=function(){var a,b,c=[];for(b in this._view)this._view.hasOwnProperty(b)&&(a=this._view[b],c.push({name:b,count:a.count(),linked:void 0!==a.isLinked&&a.isLinked()}));return c},d.finishModule("View"),b.exports=o},{"./ActiveBucket":3,"./Collection":6,"./CollectionGroup":7,"./Overload":32,"./ReactorIO":38,"./Shared":40}],43:[function(a,b,c){(function(a,d){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.async=a.async||{})}(this,function(c){"use strict";function e(a){return a}function f(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function g(a,b,c){return b=hb(void 0===b?a.length-1:b,0),function(){for(var d=arguments,e=-1,g=hb(d.length-b,0),h=Array(g);++e<g;)h[e]=d[b+e];e=-1;for(var i=Array(b+1);++e<b;)i[e]=d[e];return i[b]=c(h),f(a,this,i)}}function h(a){return function(){return a}}function i(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function j(a){var b=i(a)?mb.call(a):"";return b==ib||b==jb||b==kb}function k(a){return!!rb&&rb in a}function l(a){if(null!=a){try{return tb.call(a)}catch(a){}try{return a+""}catch(a){}}return""}function m(a){if(!i(a)||k(a))return!1;var b=j(a)?Ab:vb;return b.test(l(a))}function n(a,b){return null==a?void 0:a[b]}function o(a,b){var c=n(a,b);return m(c)?c:void 0}function p(a){var b=0,c=0;return function(){var d=Fb(),e=Eb-(d-c);if(c=d,e>0){if(++b>=Db)return arguments[0]}else b=0;return a.apply(void 0,arguments)}}function q(a,b){return Gb(g(a,b,e),a+"")}function r(a){return q(function(b,c){var d=Hb(function(c,d){var e=this;return a(b,function(a,b){a.apply(e,c.concat([b]))},d)});return c.length?d.apply(this,c):d})}function s(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=Ib}function t(a){return null!=a&&s(a.length)&&!j(a)}function u(){}function v(a){return function(){if(null!==a){var b=a;a=null,b.apply(this,arguments)}}}function w(a,b){for(var c=-1,d=Array(a);++c<a;)d[c]=b(c);return d}function x(a){return null!=a&&"object"==typeof a}function y(a){return x(a)&&Nb.call(a)==Lb}function z(){return!1}function A(a,b){return b=null==b?Zb:b,!!b&&("number"==typeof a||$b.test(a))&&a>-1&&a%1==0&&a<b}function B(a){return x(a)&&s(a.length)&&!!xc[Ac.call(a)]}function C(a){return function(b){return a(b)}}function D(a,b){var c=Sb(a),d=!c&&Rb(a),e=!c&&!d&&Yb(a),f=!c&&!d&&!e&&Hc(a),g=c||d||e||f,h=g?w(a.length,String):[],i=h.length;for(var j in a)!b&&!Jc.call(a,j)||g&&("length"==j||e&&("offset"==j||"parent"==j)||f&&("buffer"==j||"byteLength"==j||"byteOffset"==j)||A(j,i))||h.push(j);return h}function E(a){var b=a&&a.constructor,c="function"==typeof b&&b.prototype||Kc;return a===c}function F(a,b){return function(c){return a(b(c))}}function G(a){if(!E(a))return Lc(a);var b=[];for(var c in Object(a))Nc.call(a,c)&&"constructor"!=c&&b.push(c);return b}function H(a){return t(a)?D(a):G(a)}function I(a){var b=-1,c=a.length;return function(){return++b<c?{value:a[b],key:b}:null}}function J(a){var b=-1;return function(){var c=a.next();return c.done?null:(b++,{value:c.value,key:b})}}function K(a){var b=H(a),c=-1,d=b.length;return function(){var e=b[++c];return c<d?{value:a[e],key:e}:null}}function L(a){if(t(a))return I(a);var b=Kb(a);return b?J(b):K(a)}function M(a){return function(){if(null===a)throw new Error("Callback was already called.");var b=a;a=null,b.apply(this,arguments)}}function N(a){return function(b,c,d){function e(a,b){if(i-=1,a)h=!0,d(a);else{if(b===Oc||h&&i<=0)return h=!0,d(null);f()}}function f(){for(;i<a&&!h;){var b=g();if(null===b)return h=!0,void(i<=0&&d(null));i+=1,c(b.value,b.key,M(e))}}if(d=v(d||u),a<=0||!b)return d(null);var g=L(b),h=!1,i=0;f()}}function O(a,b,c,d){N(b)(a,c,d)}function P(a,b){return function(c,d,e){return a(c,b,d,e)}}function Q(a,b,c){function d(a){a?c(a):++f===g&&c(null)}c=v(c||u);var e=0,f=0,g=a.length;for(0===g&&c(null);e<g;e++)b(a[e],e,M(d))}function R(a){return function(b,c,d){return a(Qc,b,c,d)}}function S(a,b,c,d){d=v(d||u),b=b||[];var e=[],f=0;a(b,function(a,b,d){var g=f++;c(a,function(a,b){e[g]=b,d(a)})},function(a){d(a,e)})}function T(a){return function(b,c,d,e){return a(N(c),b,d,e)}}function U(a){return Hb(function(b,c){var d;try{d=a.apply(this,b)}catch(a){return c(a)}i(d)&&"function"==typeof d.then?d.then(function(a){c(null,a)},function(a){c(a.message?a:new Error(a))}):c(null,d)})}function V(a,b){for(var c=-1,d=a?a.length:0;++c<d&&b(a[c],c,a)!==!1;);return a}function W(a){return function(b,c,d){for(var e=-1,f=Object(b),g=d(b),h=g.length;h--;){var i=g[a?h:++e];if(c(f[i],i,f)===!1)break}return b}}function X(a,b){return a&&Xc(a,b,H)}function Y(a,b,c,d){for(var e=a.length,f=c+(d?1:-1);d?f--:++f<e;)if(b(a[f],f,a))return f;return-1}function Z(a){return a!==a}function $(a,b,c){for(var d=c-1,e=a.length;++d<e;)if(a[d]===b)return d;return-1}function _(a,b,c){return b===b?$(a,b,c):Y(a,Z,c)}function aa(a,b){for(var c=-1,d=a?a.length:0,e=Array(d);++c<d;)e[c]=b(a[c],c,a);return e}function ba(a,b){var c=-1,d=a.length;for(b||(b=Array(d));++c<d;)b[c]=a[c];return b}function ca(a){return"symbol"==typeof a||x(a)&&ad.call(a)==$c}function da(a){if("string"==typeof a)return a;if(Sb(a))return aa(a,da)+"";if(ca(a))return dd?dd.call(a):"";var b=a+"";return"0"==b&&1/a==-bd?"-0":b}function ea(a,b,c){var d=-1,e=a.length;b<0&&(b=-b>e?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d<e;)f[d]=a[d+b];return f}function fa(a,b,c){var d=a.length;return c=void 0===c?d:c,!b&&c>=d?a:ea(a,b,c)}function ga(a,b){for(var c=a.length;c--&&_(b,a[c],0)>-1;);return c}function ha(a,b){for(var c=-1,d=a.length;++c<d&&_(b,a[c],0)>-1;);return c}function ia(a){return a.split("")}function ja(a){return jd.test(a)}function ka(a){return a.match(Bd)||[]}function la(a){return ja(a)?ka(a):ia(a)}function ma(a){return null==a?"":da(a)}function na(a,b,c){if(a=ma(a),a&&(c||void 0===b))return a.replace(Cd,"");if(!a||!(b=da(b)))return a;var d=la(a),e=la(b),f=ha(d,e),g=ga(d,e)+1;return fa(d,f,g).join("")}function oa(a){return a=a.toString().replace(Gd,""),a=a.match(Dd)[2].replace(" ",""),a=a?a.split(Ed):[],a=a.map(function(a){return na(a.replace(Fd,""))})}function pa(a,b){var c={};X(a,function(a,b){function d(b,c){var d=aa(e,function(a){return b[a]});d.push(c),a.apply(null,d)}var e;if(Sb(a))e=ba(a),a=e.pop(),c[b]=e.concat(e.length>0?d:a);else if(1===a.length)c[b]=a;else{if(e=oa(a),0===a.length&&0===e.length)throw new Error("autoInject task functions require explicit parameters.");e.pop(),c[b]=e.concat(d)}}),Yc(c,b)}function qa(a){setTimeout(a,0)}function ra(a){return q(function(b,c){a(function(){b.apply(null,c)})})}function sa(){this.head=this.tail=null,this.length=0}function ta(a,b){a.length=1,a.head=a.tail=b}function ua(a,b,c){function d(a,b,c){if(null!=c&&"function"!=typeof c)throw new Error("task callback must be a function");if(h.started=!0,Sb(a)||(a=[a]),0===a.length&&h.idle())return Jd(function(){h.drain()});for(var d=0,e=a.length;d<e;d++){var f={data:a[d],callback:c||u};b?h._tasks.unshift(f):h._tasks.push(f)}Jd(h.process)}function e(a){return q(function(b){f-=1;for(var c=0,d=a.length;c<d;c++){var e=a[c],i=_(g,e,0);i>=0&&g.splice(i),e.callback.apply(e,b),null!=b[0]&&h.error(b[0],e.data)}f<=h.concurrency-h.buffer&&h.unsaturated(),h.idle()&&h.drain(),h.process()})}if(null==b)b=1;else if(0===b)throw new Error("Concurrency must not be zero");var f=0,g=[],h={_tasks:new sa,concurrency:b,payload:c,saturated:u,unsaturated:u,buffer:b/4,empty:u,drain:u,error:u,started:!1,paused:!1,push:function(a,b){d(a,!1,b)},kill:function(){h.drain=u,h._tasks.empty()},unshift:function(a,b){d(a,!0,b)},process:function(){for(;!h.paused&&f<h.concurrency&&h._tasks.length;){var b=[],c=[],d=h._tasks.length;h.payload&&(d=Math.min(d,h.payload));for(var i=0;i<d;i++){var j=h._tasks.shift();b.push(j),c.push(j.data)}0===h._tasks.length&&h.empty(),f+=1,g.push(b[0]),f===h.concurrency&&h.saturated();var k=M(e(b));a(c,k)}},length:function(){return h._tasks.length},running:function(){return f},workersList:function(){return g},idle:function(){return h._tasks.length+f===0},pause:function(){h.paused=!0},resume:function(){if(h.paused!==!1){h.paused=!1;for(var a=Math.min(h.concurrency,h._tasks.length),b=1;b<=a;b++)Jd(h.process)}}};return h}function va(a,b){return ua(a,1,b)}function wa(a,b,c,d){d=v(d||u),Ld(a,function(a,d,e){c(b,a,function(a,c){b=c,e(a)})},function(a){d(a,b)})}function xa(a,b,c,d){var e=[];a(b,function(a,b,d){c(a,function(a,b){e=e.concat(b||[]),d(a)})},function(a){d(a,e)})}function ya(a){return function(b,c,d){return a(Ld,b,c,d)}}function za(a,b,c){return function(d,e,f,g){function h(){g&&g(null,c(!1))}function i(a,d,e){return g?void f(a,function(d,h){g&&(d||b(h))?(d?g(d):g(d,c(!0,a)),g=f=!1,e(d,Oc)):e()}):e()}arguments.length>3?(g=g||u,a(d,e,i,h)):(g=f,g=g||u,f=e,a(d,i,h))}}function Aa(a,b){return b}function Ba(a){return q(function(b,c){b.apply(null,c.concat([q(function(b,c){"object"==typeof console&&(b?console.error&&console.error(b):console[a]&&V(c,function(b){console[a](b)}))})]))})}function Ca(a,b,c){function d(b,d){return b?c(b):d?void a(e):c(null)}c=M(c||u);var e=q(function(a,e){return a?c(a):(e.push(d),void b.apply(this,e))});d(null,!0)}function Da(a,b,c){c=M(c||u);var d=q(function(e,f){return e?c(e):b.apply(this,f)?a(d):void c.apply(null,[null].concat(f))});a(d)}function Ea(a,b,c){Da(a,function(){return!b.apply(this,arguments)},c)}function Fa(a,b,c){function d(b){return b?c(b):void a(e)}function e(a,e){return a?c(a):e?void b(d):c(null)}c=M(c||u),a(e)}function Ga(a){return function(b,c,d){return a(b,d)}}function Ha(a,b,c){Qc(a,Ga(b),c)}function Ia(a,b,c,d){N(b)(a,Ga(c),d)}function Ja(a){return Hb(function(b,c){var d=!0;b.push(function(){var a=arguments;d?Jd(function(){c.apply(null,a)}):c.apply(null,a)}),a.apply(this,b),d=!1})}function Ka(a){return!a}function La(a){return function(b){return null==b?void 0:b[a]}}function Ma(a,b,c,d){d=v(d||u);var e=[];a(b,function(a,b,d){c(a,function(c,f){c?d(c):(f&&e.push({index:b,value:a}),d())})},function(a){a?d(a):d(null,aa(e.sort(function(a,b){return a.index-b.index}),La("value")))})}function Na(a,b){function c(a){return a?d(a):void e(c)}var d=M(b||u),e=Ja(a);c()}function Oa(a,b,c,d){d=v(d||u);var e={};O(a,b,function(a,b,d){c(a,b,function(a,c){return a?d(a):(e[b]=c,void d())})},function(a){d(a,e)})}function Pa(a,b){return b in a}function Qa(a,b){var c=Object.create(null),d=Object.create(null);b=b||e;var f=Hb(function(e,f){var g=b.apply(null,e);Pa(c,g)?Jd(function(){f.apply(null,c[g])}):Pa(d,g)?d[g].push(f):(d[g]=[f],a.apply(null,e.concat([q(function(a){c[g]=a;var b=d[g];delete d[g];for(var e=0,f=b.length;e<f;e++)b[e].apply(null,a)})])))});return f.memo=c,f.unmemoized=a,f}function Ra(a,b,c){c=c||u;var d=t(b)?[]:{};a(b,function(a,b,c){a(q(function(a,e){e.length<=1&&(e=e[0]),d[b]=e,c(a)}))},function(a){c(a,d)})}function Sa(a,b){Ra(Qc,a,b)}function Ta(a,b,c){Ra(N(b),a,c)}function Ua(a,b){if(b=v(b||u),!Sb(a))return b(new TypeError("First argument to race must be an array of functions"));if(!a.length)return b();for(var c=0,d=a.length;c<d;c++)a[c](b)}function Va(a,b,c,d){var e=ge.call(a).reverse();wa(e,b,c,d)}function Wa(a){return Hb(function(b,c){return b.push(q(function(a,b){if(a)c(null,{error:a});else{var d=null;1===b.length?d=b[0]:b.length>1&&(d=b),c(null,{value:d})}})),a.apply(this,b)})}function Xa(a,b,c,d){Ma(a,b,function(a,b){c(a,function(a,c){a?b(a):b(null,!c)})},d)}function Ya(a){var b;return Sb(a)?b=aa(a,Wa):(b={},X(a,function(a,c){b[c]=Wa.call(this,a)})),b}function Za(a,b,c){function d(a,b){if("object"==typeof b)a.times=+b.times||f,a.intervalFunc="function"==typeof b.interval?b.interval:h(+b.interval||g),a.errorFilter=b.errorFilter;else{if("number"!=typeof b&&"string"!=typeof b)throw new Error("Invalid arguments for async.retry");a.times=+b||f}}function e(){b(function(a){a&&j++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(a))?setTimeout(e,i.intervalFunc(j)):c.apply(null,arguments)})}var f=5,g=0,i={times:f,intervalFunc:h(g)};if(arguments.length<3&&"function"==typeof a?(c=b||u,b=a):(d(i,a),c=c||u),"function"!=typeof b)throw new Error("Invalid arguments for async.retry");var j=1;e()}function $a(a,b){Ra(Ld,a,b)}function _a(a,b,c){function d(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}Rc(a,function(a,c){b(a,function(b,d){return b?c(b):void c(null,{value:a,criteria:d})})},function(a,b){return a?c(a):void c(null,aa(b.sort(d),La("value")))})}function ab(a,b,c){function d(){h||(f.apply(null,arguments),clearTimeout(g))}function e(){var b=a.name||"anonymous",d=new Error('Callback function "'+b+'" timed out.');d.code="ETIMEDOUT",c&&(d.info=c),h=!0,f(d)}var f,g,h=!1;return Hb(function(c,h){f=h,g=setTimeout(e,b),a.apply(null,c.concat(d))})}function bb(a,b,c,d){for(var e=-1,f=pe(oe((b-a)/(c||1)),0),g=Array(f);f--;)g[d?f:++e]=a,a+=c;return g}function cb(a,b,c,d){Tc(bb(0,a,1),b,c,d)}function db(a,b,c,d){3===arguments.length&&(d=c,c=b,b=Sb(a)?[]:{}),d=v(d||u),Qc(a,function(a,d,e){c(b,a,d,e)},function(a){d(a,b)})}function eb(a){return function(){return(a.unmemoized||a).apply(null,arguments)}}function fb(a,b,c){if(c=M(c||u),!a())return c(null);var d=q(function(e,f){return e?c(e):a()?b(d):void c.apply(null,[null].concat(f))});b(d)}function gb(a,b,c){fb(function(){return!a.apply(this,arguments)},b,c)}var hb=Math.max,ib="[object Function]",jb="[object GeneratorFunction]",kb="[object Proxy]",lb=Object.prototype,mb=lb.toString,nb="object"==typeof d&&d&&d.Object===Object&&d,ob="object"==typeof self&&self&&self.Object===Object&&self,pb=nb||ob||Function("return this")(),qb=pb["__core-js_shared__"],rb=function(){var a=/[^.]+$/.exec(qb&&qb.keys&&qb.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),sb=Function.prototype,tb=sb.toString,ub=/[\\^$.*+?()[\]{}|]/g,vb=/^\[object .+?Constructor\]$/,wb=Function.prototype,xb=Object.prototype,yb=wb.toString,zb=xb.hasOwnProperty,Ab=RegExp("^"+yb.call(zb).replace(ub,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bb=function(){try{var a=o(Object,"defineProperty");return a({},"",{}),a}catch(a){}}(),Cb=Bb?function(a,b){return Bb(a,"toString",{configurable:!0,enumerable:!1,value:h(b),writable:!0})}:e,Db=500,Eb=16,Fb=Date.now,Gb=p(Cb),Hb=function(a){return q(function(b){var c=b.pop();a.call(this,b,c)})},Ib=9007199254740991,Jb="function"==typeof Symbol&&Symbol.iterator,Kb=function(a){return Jb&&a[Jb]&&a[Jb]()},Lb="[object Arguments]",Mb=Object.prototype,Nb=Mb.toString,Ob=Object.prototype,Pb=Ob.hasOwnProperty,Qb=Ob.propertyIsEnumerable,Rb=y(function(){return arguments}())?y:function(a){return x(a)&&Pb.call(a,"callee")&&!Qb.call(a,"callee")},Sb=Array.isArray,Tb="object"==typeof c&&c&&!c.nodeType&&c,Ub=Tb&&"object"==typeof b&&b&&!b.nodeType&&b,Vb=Ub&&Ub.exports===Tb,Wb=Vb?pb.Buffer:void 0,Xb=Wb?Wb.isBuffer:void 0,Yb=Xb||z,Zb=9007199254740991,$b=/^(?:0|[1-9]\d*)$/,_b="[object Arguments]",ac="[object Array]",bc="[object Boolean]",cc="[object Date]",dc="[object Error]",ec="[object Function]",fc="[object Map]",gc="[object Number]",hc="[object Object]",ic="[object RegExp]",jc="[object Set]",kc="[object String]",lc="[object WeakMap]",mc="[object ArrayBuffer]",nc="[object DataView]",oc="[object Float32Array]",pc="[object Float64Array]",qc="[object Int8Array]",rc="[object Int16Array]",sc="[object Int32Array]",tc="[object Uint8Array]",uc="[object Uint8ClampedArray]",vc="[object Uint16Array]",wc="[object Uint32Array]",xc={};xc[oc]=xc[pc]=xc[qc]=xc[rc]=xc[sc]=xc[tc]=xc[uc]=xc[vc]=xc[wc]=!0,xc[_b]=xc[ac]=xc[mc]=xc[bc]=xc[nc]=xc[cc]=xc[dc]=xc[ec]=xc[fc]=xc[gc]=xc[hc]=xc[ic]=xc[jc]=xc[kc]=xc[lc]=!1;var yc,zc=Object.prototype,Ac=zc.toString,Bc="object"==typeof c&&c&&!c.nodeType&&c,Cc=Bc&&"object"==typeof b&&b&&!b.nodeType&&b,Dc=Cc&&Cc.exports===Bc,Ec=Dc&&nb.process,Fc=function(){try{return Ec&&Ec.binding("util")}catch(a){}}(),Gc=Fc&&Fc.isTypedArray,Hc=Gc?C(Gc):B,Ic=Object.prototype,Jc=Ic.hasOwnProperty,Kc=Object.prototype,Lc=F(Object.keys,Object),Mc=Object.prototype,Nc=Mc.hasOwnProperty,Oc={},Pc=P(O,1/0),Qc=function(a,b,c){var d=t(a)?Q:Pc;d(a,b,c)},Rc=R(S),Sc=r(Rc),Tc=T(S),Uc=P(Tc,1),Vc=r(Uc),Wc=q(function(a,b){return q(function(c){return a.apply(null,b.concat(c))})}),Xc=W(),Yc=function(a,b,c){function d(a,b){r.push(function(){h(a,b)})}function e(){if(0===r.length&&0===n)return c(null,m);for(;r.length&&n<b;){var a=r.shift();a()}}function f(a,b){var c=p[a];c||(c=p[a]=[]),c.push(b)}function g(a){var b=p[a]||[];V(b,function(a){a()}),e()}function h(a,b){if(!o){var d=M(q(function(b,d){if(n--,d.length<=1&&(d=d[0]),b){var e={};X(m,function(a,b){e[b]=a}),e[a]=d,o=!0,p=[],c(b,e)}else m[a]=d,g(a)}));n++;var e=b[b.length-1];b.length>1?e(m,d):e(d)}}function i(){for(var a,b=0;s.length;)a=s.pop(),b++,V(j(a),function(a){0===--t[a]&&s.push(a)});if(b!==l)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function j(b){var c=[];return X(a,function(a,d){Sb(a)&&_(a,b,0)>=0&&c.push(d)}),c}"function"==typeof b&&(c=b,b=null),c=v(c||u);var k=H(a),l=k.length;if(!l)return c(null);b||(b=l);var m={},n=0,o=!1,p={},r=[],s=[],t={};X(a,function(b,c){if(!Sb(b))return d(c,[b]),void s.push(c);var e=b.slice(0,b.length-1),g=e.length;return 0===g?(d(c,b),void s.push(c)):(t[c]=g,void V(e,function(h){if(!a[h])throw new Error("async.auto task `"+c+"` has a non-existent dependency in "+e.join(", "));f(h,function(){g--,0===g&&d(c,b)})}))}),i(),e()},Zc=pb.Symbol,$c="[object Symbol]",_c=Object.prototype,ad=_c.toString,bd=1/0,cd=Zc?Zc.prototype:void 0,dd=cd?cd.toString:void 0,ed="\\ud800-\\udfff",fd="\\u0300-\\u036f\\ufe20-\\ufe23",gd="\\u20d0-\\u20f0",hd="\\ufe0e\\ufe0f",id="\\u200d",jd=RegExp("["+id+ed+fd+gd+hd+"]"),kd="\\ud800-\\udfff",ld="\\u0300-\\u036f\\ufe20-\\ufe23",md="\\u20d0-\\u20f0",nd="\\ufe0e\\ufe0f",od="["+kd+"]",pd="["+ld+md+"]",qd="\\ud83c[\\udffb-\\udfff]",rd="(?:"+pd+"|"+qd+")",sd="[^"+kd+"]",td="(?:\\ud83c[\\udde6-\\uddff]){2}",ud="[\\ud800-\\udbff][\\udc00-\\udfff]",vd="\\u200d",wd=rd+"?",xd="["+nd+"]?",yd="(?:"+vd+"(?:"+[sd,td,ud].join("|")+")"+xd+wd+")*",zd=xd+wd+yd,Ad="(?:"+[sd+pd+"?",pd,td,ud,od].join("|")+")",Bd=RegExp(qd+"(?="+qd+")|"+Ad+zd,"g"),Cd=/^\s+|\s+$/g,Dd=/^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,Ed=/,/,Fd=/(=.+)?(\s*)$/,Gd=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Hd="function"==typeof setImmediate&&setImmediate,Id="object"==typeof a&&"function"==typeof a.nextTick;yc=Hd?setImmediate:Id?a.nextTick:qa;var Jd=ra(yc);sa.prototype.removeLink=function(a){return a.prev?a.prev.next=a.next:this.head=a.next,a.next?a.next.prev=a.prev:this.tail=a.prev,a.prev=a.next=null,this.length-=1,a},sa.prototype.empty=sa,sa.prototype.insertAfter=function(a,b){b.prev=a,b.next=a.next,a.next?a.next.prev=b:this.tail=b,a.next=b,this.length+=1},sa.prototype.insertBefore=function(a,b){b.prev=a.prev,b.next=a,a.prev?a.prev.next=b:this.head=b,a.prev=b,this.length+=1},sa.prototype.unshift=function(a){this.head?this.insertBefore(this.head,a):ta(this,a)},sa.prototype.push=function(a){this.tail?this.insertAfter(this.tail,a):ta(this,a)},sa.prototype.shift=function(){return this.head&&this.removeLink(this.head)},sa.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)};var Kd,Ld=P(O,1),Md=q(function(a){return q(function(b){var c=this,d=b[b.length-1];"function"==typeof d?b.pop():d=u,wa(a,b,function(a,b,d){b.apply(c,a.concat([q(function(a,b){d(a,b)})]))},function(a,b){d.apply(c,[a].concat(b))})})}),Nd=q(function(a){return Md.apply(null,a.reverse())}),Od=R(xa),Pd=ya(xa),Qd=q(function(a){var b=[null].concat(a);return Hb(function(a,c){return c.apply(this,b)})}),Rd=za(Qc,e,Aa),Sd=za(O,e,Aa),Td=za(Ld,e,Aa),Ud=Ba("dir"),Vd=P(Ia,1),Wd=za(Qc,Ka,Ka),Xd=za(O,Ka,Ka),Yd=P(Xd,1),Zd=R(Ma),$d=T(Ma),_d=P($d,1),ae=Ba("log"),be=P(Oa,1/0),ce=P(Oa,1);Kd=Id?a.nextTick:Hd?setImmediate:qa;var de=ra(Kd),ee=function(a,b){return ua(function(b,c){a(b[0],c)},b,1)},fe=function(a,b){var c=ee(a,b);return c.push=function(a,b,d){if(null==d&&(d=u),"function"!=typeof d)throw new Error("task callback must be a function");if(c.started=!0,Sb(a)||(a=[a]),0===a.length)return Jd(function(){c.drain()});b=b||0;for(var e=c._tasks.head;e&&b>=e.priority;)e=e.next;for(var f=0,g=a.length;f<g;f++){var h={data:a[f],priority:b,callback:d};e?c._tasks.insertBefore(e,h):c._tasks.push(h)}Jd(c.process)},delete c.unshift,c},ge=Array.prototype.slice,he=R(Xa),ie=T(Xa),je=P(ie,1),ke=function(a,b){return b||(b=a,a=null),Hb(function(c,d){function e(a){b.apply(null,c.concat([a]))}a?Za(a,e,d):Za(e,d)})},le=za(Qc,Boolean,e),me=za(O,Boolean,e),ne=P(me,1),oe=Math.ceil,pe=Math.max,qe=P(cb,1/0),re=P(cb,1),se=function(a,b){function c(e){if(d===a.length)return b.apply(null,[null].concat(e));var f=M(q(function(a,d){return a?b.apply(null,[a].concat(d)):void c(d)}));e.push(f);var g=a[d++];g.apply(null,e)}if(b=v(b||u),!Sb(a))return b(new Error("First argument to waterfall must be an array of functions"));if(!a.length)return b();var d=0;c([])},te={applyEach:Sc,applyEachSeries:Vc,apply:Wc,asyncify:U,auto:Yc,autoInject:pa,cargo:va,compose:Nd,concat:Od,concatSeries:Pd,constant:Qd,detect:Rd,detectLimit:Sd,detectSeries:Td,dir:Ud,doDuring:Ca,doUntil:Ea,doWhilst:Da,during:Fa,each:Ha,eachLimit:Ia,eachOf:Qc,eachOfLimit:O,eachOfSeries:Ld,eachSeries:Vd,ensureAsync:Ja,every:Wd,everyLimit:Xd,everySeries:Yd,filter:Zd,filterLimit:$d,filterSeries:_d,forever:Na,log:ae,map:Rc,mapLimit:Tc,mapSeries:Uc,mapValues:be,mapValuesLimit:Oa,mapValuesSeries:ce,memoize:Qa,nextTick:de,parallel:Sa,parallelLimit:Ta,priorityQueue:fe,queue:ee,race:Ua,reduce:wa,reduceRight:Va,reflect:Wa,reflectAll:Ya,reject:he,rejectLimit:ie,rejectSeries:je,retry:Za,retryable:ke,seq:Md,series:$a,setImmediate:Jd,some:le,someLimit:me,someSeries:ne,sortBy:_a,timeout:ab,times:qe,timesLimit:cb,timesSeries:re,transform:db,unmemoize:eb,until:gb,waterfall:se,whilst:fb,all:Wd,any:le,forEach:Ha,forEachSeries:Vd,forEachLimit:Ia,forEachOf:Qc,forEachOfSeries:Ld,forEachOfLimit:O,inject:wa,foldl:wa,foldr:Va,select:Zd,selectLimit:$d,selectSeries:_d,wrapSync:U};c.default=te,c.applyEach=Sc,c.applyEachSeries=Vc,c.apply=Wc,c.asyncify=U,c.auto=Yc,c.autoInject=pa,c.cargo=va,c.compose=Nd,c.concat=Od,c.concatSeries=Pd,c.constant=Qd,c.detect=Rd,c.detectLimit=Sd,c.detectSeries=Td,c.dir=Ud,c.doDuring=Ca,c.doUntil=Ea,c.doWhilst=Da,c.during=Fa,c.each=Ha,c.eachLimit=Ia,c.eachOf=Qc,c.eachOfLimit=O,c.eachOfSeries=Ld,c.eachSeries=Vd,c.ensureAsync=Ja,c.every=Wd,c.everyLimit=Xd,c.everySeries=Yd,c.filter=Zd,c.filterLimit=$d,c.filterSeries=_d,c.forever=Na,c.log=ae,c.map=Rc,c.mapLimit=Tc,c.mapSeries=Uc,c.mapValues=be,c.mapValuesLimit=Oa,c.mapValuesSeries=ce,c.memoize=Qa,c.nextTick=de,c.parallel=Sa,c.parallelLimit=Ta,c.priorityQueue=fe,c.queue=ee,c.race=Ua,c.reduce=wa,c.reduceRight=Va,c.reflect=Wa,c.reflectAll=Ya,c.reject=he,c.rejectLimit=ie,c.rejectSeries=je,c.retry=Za,c.retryable=ke,c.seq=Md,c.series=$a,c.setImmediate=Jd,c.some=le,c.someLimit=me,c.someSeries=ne,c.sortBy=_a,c.timeout=ab,c.times=qe,c.timesLimit=cb,c.timesSeries=re,c.transform=db,c.unmemoize=eb,c.until=gb,c.waterfall=se,c.whilst=fb,c.all=Wd,c.allLimit=Xd,c.allSeries=Yd,c.any=le,c.anyLimit=me,c.anySeries=ne,c.find=Rd,c.findLimit=Sd,c.findSeries=Td,c.forEach=Ha,c.forEachSeries=Vd,c.forEachLimit=Ia,c.forEachOf=Qc,c.forEachOfSeries=Ld,c.forEachOfLimit=O,c.inject=wa,c.foldl=wa,c.foldr=Va,c.select=Zd,c.selectLimit=$d,c.selectSeries=_d,c.wrapSync=U,Object.defineProperty(c,"__esModule",{value:!0})})}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:78}],44:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var a=this._keyPriorReset=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h<e;h++)if(h<c)g[h]=b[h];else{var i=g[h-1];h%c?c>6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k<e;k++){var h=e-k;if(k%4)var i=g[h];else var i=g[h-4];k<4||h<=4?j[k]=i:j[k]=l[f[i>>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o<i;o++){var p=d[j>>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++]; a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),a.AES})},{"./cipher-core":45,"./core":46,"./enc-base64":47,"./evpkdf":49,"./md5":54}],45:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){a.lib.Cipher||function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=d.BufferedBlockAlgorithm,h=c.enc,i=(h.Utf8,h.Base64),j=c.algo,k=j.EvpKDF,l=d.Cipher=g.extend({cfg:e.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c),this._xformMode=a,this._key=b,this.reset()},reset:function(){g.reset.call(this),this._doReset()},process:function(a){return this._append(a),this._process()},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function a(a){return"string"==typeof a?x:u}return function(b){return{encrypt:function(c,d,e){return a(d).encrypt(b,c,d,e)},decrypt:function(c,d,e){return a(d).decrypt(b,c,d,e)}}}}()}),m=(d.StreamCipher=l.extend({_doFinalize:function(){var a=this._process(!0);return a},blockSize:1}),c.mode={}),n=d.BlockCipherMode=e.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a,this._iv=b}}),o=m.CBC=function(){function a(a,c,d){var e=this._iv;if(e){var f=e;this._iv=b}else var f=this._prevBlock;for(var g=0;g<d;g++)a[c+g]^=f[g]}var c=n.extend();return c.Encryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize;a.call(this,b,c,e),d.encryptBlock(b,c),this._prevBlock=b.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize,f=b.slice(c,c+e);d.decryptBlock(b,c),a.call(this,b,c,e),this._prevBlock=f}}),c}(),p=c.pad={},q=p.Pkcs7={pad:function(a,b){for(var c=4*b,d=c-a.sigBytes%c,e=d<<24|d<<16|d<<8|d,g=[],h=0;h<d;h+=4)g.push(e);var i=f.create(g,d);a.concat(i)},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}()})},{"./core":46}],46:[function(a,b,c){!function(a,d){"object"==typeof c?b.exports=c=d():"function"==typeof define&&define.amd?define([],d):a.CryptoJS=d()}(this,function(){var a=a||function(a,b){var c=Object.create||function(){function a(){}return function(b){var c;return a.prototype=b,c=new a,a.prototype=null,c}}(),d={},e=d.lib={},f=e.Base=function(){return{extend:function(a){var b=c(this);return a&&b.mixIn(a),b.hasOwnProperty("init")&&this.init!==b.init||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=e.WordArray=f.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f<e;f++){var g=c[f>>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else for(var f=0;f<e;f+=4)b[d+f>>>2]=c[f>>>2];return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c,d=[],e=function(b){var b=b,c=987654321,d=4294967295;return function(){c=36969*(65535&c)+(c>>16)&d,b=18e3*(65535&b)+(b>>16)&d;var e=(c<<16)+b&d;return e/=4294967296,e+=.5,e*(a.random()>.5?1:-1)}},f=0;f<b;f+=4){var h=e(4294967296*(c||a.random()));c=987654071*h(),d.push(4294967296*h()|0)}return new g.init(d,b)}}),h=d.enc={},i=h.Hex={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e<c;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e<c;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(a){throw new Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=e.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=4*f,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*f,k=a.min(4*j,e);if(j){for(var l=0;l<j;l+=f)this._doProcessBlock(d,l);var m=d.splice(0,j);c.sigBytes-=k}return new g.init(m,k)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),m=(e.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}}),d.algo={});return d}(Math);return a})},{}],47:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(a,b,c){for(var d=[],f=0,g=0;g<b;g++)if(g%4){var h=c[a.charCodeAt(g-1)]<<g%4*2,i=c[a.charCodeAt(g)]>>>6-g%4*2;d[f>>>2]|=(h|i)<<24-f%4*8,f++}return e.create(d,f)}var c=a,d=c.lib,e=d.WordArray,f=c.enc;f.Base64={stringify:function(a){var b=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var e=[],f=0;f<c;f+=3)for(var g=b[f>>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k<c;k++)e.push(d.charAt(j>>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var c=a.length,d=this._map,e=this._reverseMap;if(!e){e=this._reverseMap=[];for(var f=0;f<d.length;f++)e[d.charCodeAt(f)]=f}var g=d.charAt(64);if(g){var h=a.indexOf(g);h!==-1&&(c=h)}return b(a,c,e)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),a.enc.Base64})},{"./core":46}],48:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(a){return a<<8&4278255360|a>>>8&16711935}var c=a,d=c.lib,e=d.WordArray,f=c.enc;f.Utf16=f.Utf16BE={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e<c;e+=2){var f=b[e>>>2]>>>16-e%4*8&65535;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d++)c[d>>>1]|=a.charCodeAt(d)<<16-d%2*16;return e.create(c,2*b)}};f.Utf16LE={stringify:function(a){for(var c=a.words,d=a.sigBytes,e=[],f=0;f<d;f+=2){var g=b(c[f>>>2]>>>16-f%4*8&65535);e.push(String.fromCharCode(g))}return e.join("")},parse:function(a){for(var c=a.length,d=[],f=0;f<c;f++)d[f>>>1]|=b(a.charCodeAt(f)<<16-f%2*16);return e.create(d,2*c)}}}(),a.enc.Utf16})},{"./core":46}],49:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha1"),a("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length<h;){j&&d.update(j);var j=d.update(a).finalize(b);d.reset();for(var k=1;k<i;k++)j=d.finalize(j),d.reset();f.concat(j)}return f.sigBytes=4*h,f}});b.EvpKDF=function(a,b,c){return h.create(c).compute(a,b)}}(),a.EvpKDF})},{"./core":46,"./hmac":51,"./sha1":70}],50:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.CipherParams,f=c.enc,g=f.Hex,h=c.format;h.Hex={stringify:function(a){return a.ciphertext.toString(g)},parse:function(a){var b=g.parse(a);return e.create({ciphertext:b})}}}(),a.format.Hex})},{"./cipher-core":45,"./core":46}],51:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){!function(){var b=a,c=b.lib,d=c.Base,e=b.enc,f=e.Utf8,g=b.algo;g.HMAC=d.extend({init:function(a,b){a=this._hasher=new a.init,"string"==typeof b&&(b=f.parse(b));var c=a.blockSize,d=4*c;b.sigBytes>d&&(b=a.finalize(b)),b.clamp();for(var e=this._oKey=b.clone(),g=this._iKey=b.clone(),h=e.words,i=g.words,j=0;j<c;j++)h[j]^=1549556828,i[j]^=909522486;e.sigBytes=g.sigBytes=d,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var b=this._hasher,c=b.finalize(a);b.reset();var d=b.finalize(this._oKey.clone().concat(c));return d}})}()})},{"./core":46}],52:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core"),a("./lib-typedarrays"),a("./enc-utf16"),a("./enc-base64"),a("./md5"),a("./sha1"),a("./sha256"),a("./sha224"),a("./sha512"),a("./sha384"),a("./sha3"),a("./ripemd160"),a("./hmac"),a("./pbkdf2"),a("./evpkdf"),a("./cipher-core"),a("./mode-cfb"),a("./mode-ctr"),a("./mode-ctr-gladman"),a("./mode-ofb"),a("./mode-ecb"),a("./pad-ansix923"),a("./pad-iso10126"),a("./pad-iso97971"),a("./pad-zeropadding"),a("./pad-nopadding"),a("./format-hex"),a("./aes"),a("./tripledes"),a("./rc4"),a("./rabbit"),a("./rabbit-legacy")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy"],e):d.CryptoJS=e(d.CryptoJS)}(this,function(a){return a})},{"./aes":44,"./cipher-core":45,"./core":46,"./enc-base64":47,"./enc-utf16":48,"./evpkdf":49,"./format-hex":50,"./hmac":51,"./lib-typedarrays":53,"./md5":54,"./mode-cfb":55,"./mode-ctr":57,"./mode-ctr-gladman":56,"./mode-ecb":58,"./mode-ofb":59,"./pad-ansix923":60,"./pad-iso10126":61,"./pad-iso97971":62,"./pad-nopadding":63,"./pad-zeropadding":64,"./pbkdf2":65,"./rabbit":67,"./rabbit-legacy":66,"./rc4":68,"./ripemd160":69,"./sha1":70,"./sha224":71,"./sha256":72,"./sha3":73,"./sha384":74,"./sha512":75,"./tripledes":76,"./x64-core":77}],53:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){if("function"==typeof ArrayBuffer){var b=a,c=b.lib,d=c.WordArray,e=d.init,f=d.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var b=a.byteLength,c=[],d=0;d<b;d++)c[d>>>2]|=a[d]<<24-d%4*8;e.call(this,c,b)}else e.apply(this,arguments)};f.prototype=d}}(),a.lib.WordArray})},{"./core":46}],54:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<<f|h>>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<<f|h>>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<<f|h>>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<<f|h>>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),a.MD5})},{"./core":46}],55:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.CFB=function(){function b(a,b,c,d){var e=this._iv;if(e){var f=e.slice(0);this._iv=void 0}else var f=this._prevBlock;d.encryptBlock(f,0);for(var g=0;g<c;g++)a[b+g]^=f[g]}var c=a.lib.BlockCipherMode.extend();return c.Encryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize;b.call(this,a,c,e,d),this._prevBlock=a.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize,f=a.slice(c,c+e);b.call(this,a,c,e,d),this._prevBlock=f}}),c}(),a.mode.CFB})},{"./cipher-core":45,"./core":46}],56:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.CTRGladman=function(){function b(a){if(255===(a>>24&255)){var b=a>>16&255,c=a>>8&255,d=255&a;255===b?(b=0,255===c?(c=0,255===d?d=0:++d):++c):++b,a=0,a+=b<<16,a+=c<<8,a+=d}else a+=1<<24;return a}function c(a){return 0===(a[0]=b(a[0]))&&(a[1]=b(a[1])),a}var d=a.lib.BlockCipherMode.extend(),e=d.Encryptor=d.extend({processBlock:function(a,b){var d=this._cipher,e=d.blockSize,f=this._iv,g=this._counter;f&&(g=this._counter=f.slice(0),this._iv=void 0),c(g);var h=g.slice(0);d.encryptBlock(h,0);for(var i=0;i<e;i++)a[b+i]^=h[i]}});return d.Decryptor=e,d}(),a.mode.CTRGladman})},{"./cipher-core":45,"./core":46}],57:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.CTR=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._counter;e&&(f=this._counter=e.slice(0),this._iv=void 0);var g=f.slice(0);c.encryptBlock(g,0),f[d-1]=f[d-1]+1|0;for(var h=0;h<d;h++)a[b+h]^=g[h]}});return b.Decryptor=c,b}(),a.mode.CTR})},{"./cipher-core":45,"./core":46}],58:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),a.mode.ECB})},{"./cipher-core":45,"./core":46}],59:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.OFB=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._keystream;e&&(f=this._keystream=e.slice(0),this._iv=void 0),c.encryptBlock(f,0);for(var g=0;g<d;g++)a[b+g]^=f[g]}});return b.Decryptor=c,b}(),a.mode.OFB})},{"./cipher-core":45,"./core":46}],60:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.AnsiX923={pad:function(a,b){var c=a.sigBytes,d=4*b,e=d-c%d,f=c+e-1;a.clamp(),a.words[f>>>2]|=e<<24-f%4*8,a.sigBytes+=e},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Ansix923})},{"./cipher-core":45,"./core":46}],61:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.Iso10126={pad:function(b,c){var d=4*c,e=d-b.sigBytes%d;b.concat(a.lib.WordArray.random(e-1)).concat(a.lib.WordArray.create([e<<24],1))},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso10126})},{"./cipher-core":45,"./core":46}],62:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.Iso97971={pad:function(b,c){b.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(b,c)},unpad:function(b){a.pad.ZeroPadding.unpad(b),b.sigBytes--}},a.pad.Iso97971})},{"./cipher-core":45,"./core":46}],63:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.NoPadding={pad:function(){},unpad:function(){}},a.pad.NoPadding})},{"./cipher-core":45,"./core":46}],64:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.ZeroPadding={pad:function(a,b){var c=4*b;a.clamp(),a.sigBytes+=c-(a.sigBytes%c||c)},unpad:function(a){for(var b=a.words,c=a.sigBytes-1;!(b[c>>>2]>>>24-c%4*8&255);)c--;a.sigBytes=c+1}},a.pad.ZeroPadding})},{"./cipher-core":45,"./core":46}],65:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha1"),a("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.SHA1,h=f.HMAC,i=f.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=h.create(c.hasher,a),f=e.create(),g=e.create([1]),i=f.words,j=g.words,k=c.keySize,l=c.iterations;i.length<k;){var m=d.update(b).finalize(g);d.reset();for(var n=m.words,o=n.length,p=m,q=1;q<l;q++){p=d.finalize(p),d.reset();for(var r=p.words,s=0;s<o;s++)n[s]^=r[s]}f.concat(m),j[0]++}return f.sigBytes=4*k,f}});b.PBKDF2=function(a,b,c){return i.create(c).compute(a,b)}}(),a.PBKDF2})},{"./core":46,"./hmac":51,"./sha1":70}],66:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._X,b=this._C,c=0;c<8;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0<h[0]>>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0<h[1]>>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0<h[2]>>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0<h[3]>>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0<h[4]>>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0<h[5]>>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0<h[6]>>>0?1:0)|0,this._b=b[7]>>>0<h[7]>>>0?1:0;for(var c=0;c<8;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.RabbitLegacy=e.extend({_doReset:function(){var a=this._key.words,c=this.cfg.iv,d=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],e=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var f=0;f<4;f++)b.call(this);for(var f=0;f<8;f++)e[f]^=d[f+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;e[0]^=j,e[1]^=l,e[2]^=k,e[3]^=m,e[4]^=j,e[5]^=l,e[6]^=k,e[7]^=m;for(var f=0;f<4;f++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;e<4;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.RabbitLegacy=e._createHelper(j)}(),a.RabbitLegacy})},{"./cipher-core":45,"./core":46,"./enc-base64":47,"./evpkdf":49,"./md5":54}],67:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._X,b=this._C,c=0;c<8;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0<h[0]>>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0<h[1]>>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0<h[2]>>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0<h[3]>>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0<h[4]>>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0<h[5]>>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0<h[6]>>>0?1:0)|0,this._b=b[7]>>>0<h[7]>>>0?1:0;for(var c=0;c<8;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.Rabbit=e.extend({_doReset:function(){for(var a=this._key.words,c=this.cfg.iv,d=0;d<4;d++)a[d]=16711935&(a[d]<<8|a[d]>>>24)|4278255360&(a[d]<<24|a[d]>>>8);var e=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],f=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var d=0;d<4;d++)b.call(this);for(var d=0;d<8;d++)f[d]^=e[d+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;f[0]^=j,f[1]^=l,f[2]^=k,f[3]^=m,f[4]^=j,f[5]^=l,f[6]^=k,f[7]^=m;for(var d=0;d<4;d++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;e<4;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.Rabbit=e._createHelper(j)}(),a.Rabbit})},{"./cipher-core":45,"./core":46,"./enc-base64":47,"./evpkdf":49,"./md5":54}],68:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._S,b=this._i,c=this._j,d=0,e=0;e<4;e++){b=(b+1)%256,c=(c+a[b])%256;var f=a[b];a[b]=a[c],a[c]=f,d|=a[(a[b]+a[c])%256]<<24-8*e}return this._i=b,this._j=c,d}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=f.RC4=e.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes,d=this._S=[],e=0;e<256;e++)d[e]=e;for(var e=0,f=0;e<256;e++){var g=e%c,h=b[g>>>2]>>>24-g%4*8&255;f=(f+d[e]+h)%256;var i=d[e];d[e]=d[f],d[f]=i}this._i=this._j=0},_doProcessBlock:function(a,c){a[c]^=b.call(this)},keySize:8,ivSize:0});c.RC4=e._createHelper(g);var h=f.RC4Drop=g.extend({cfg:g.cfg.extend({drop:192}),_doReset:function(){g._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)b.call(this)}});c.RC4Drop=e._createHelper(h)}(),a.RC4})},{"./cipher-core":45,"./core":46,"./enc-base64":47,"./evpkdf":49,"./md5":54}],69:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){function c(a,b,c){return a^b^c}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return(a|~b)^c}function f(a,b,c){return a&c|b&~c}function g(a,b,c){return a^(b|~c)}function h(a,b){return a<<b|a>>>32-b}var i=a,j=i.lib,k=j.WordArray,l=j.Hasher,m=i.algo,n=k.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=k.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=k.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),q=k.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),r=k.create([0,1518500249,1859775393,2400959708,2840853838]),s=k.create([1352829926,1548603684,1836072691,2053994217,0]),t=m.RIPEMD160=l.extend({_doReset:function(){this._hash=k.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var i=0;i<16;i++){var j=b+i,k=a[j];a[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}var l,m,t,u,v,w,x,y,z,A,B=this._hash.words,C=r.words,D=s.words,E=n.words,F=o.words,G=p.words,H=q.words; w=l=B[0],x=m=B[1],y=t=B[2],z=u=B[3],A=v=B[4];for(var I,i=0;i<80;i+=1)I=l+a[b+E[i]]|0,I+=i<16?c(m,t,u)+C[0]:i<32?d(m,t,u)+C[1]:i<48?e(m,t,u)+C[2]:i<64?f(m,t,u)+C[3]:g(m,t,u)+C[4],I|=0,I=h(I,G[i]),I=I+v|0,l=v,v=u,u=h(t,10),t=m,m=I,I=w+a[b+F[i]]|0,I+=i<16?g(x,y,z)+D[0]:i<32?f(x,y,z)+D[1]:i<48?e(x,y,z)+D[2]:i<64?d(x,y,z)+D[3]:c(x,y,z)+D[4],I|=0,I=h(I,H[i]),I=I+A|0,w=A,A=z,z=h(y,10),y=x,x=I;I=B[1]+t+z|0,B[1]=B[2]+u+A|0,B[2]=B[3]+v+w|0,B[3]=B[4]+l+x|0,B[4]=B[0]+m+y|0,B[0]=I},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),a.sigBytes=4*(b.length+1),this._process();for(var e=this._hash,f=e.words,g=0;g<5;g++){var h=f[g];f[g]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return e},clone:function(){var a=l.clone.call(this);return a._hash=this._hash.clone(),a}});i.RIPEMD160=l._createHelper(t),i.HmacRIPEMD160=l._createHmacHelper(t)}(Math),a.RIPEMD160})},{"./core":46}],70:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.WordArray,e=c.Hasher,f=b.algo,g=[],h=f.SHA1=e.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],h=c[3],i=c[4],j=0;j<80;j++){if(j<16)g[j]=0|a[b+j];else{var k=g[j-3]^g[j-8]^g[j-14]^g[j-16];g[j]=k<<1|k>>>31}var l=(d<<5|d>>>27)+i+g[j];l+=j<20?(e&f|~e&h)+1518500249:j<40?(e^f^h)+1859775393:j<60?(e&f|e&h|f&h)-1894007588:(e^f^h)-899497514,i=h,h=f,f=e<<30|e>>>2,e=d,d=l}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});b.SHA1=e._createHelper(h),b.HmacSHA1=e._createHmacHelper(h)}(),a.SHA1})},{"./core":46}],71:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha256")):"function"==typeof define&&define.amd?define(["./core","./sha256"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.WordArray,e=b.algo,f=e.SHA256,g=e.SHA224=f.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=f._doFinalize.call(this);return a.sigBytes-=4,a}});b.SHA224=f._createHelper(g),b.HmacSHA224=f._createHmacHelper(g)}(),a.SHA224})},{"./core":46,"./sha256":72}],72:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.algo,h=[],i=[];!function(){function a(a){for(var c=b.sqrt(a),d=2;d<=c;d++)if(!(a%d))return!1;return!0}function c(a){return 4294967296*(a-(0|a))|0}for(var d=2,e=0;e<64;)a(d)&&(e<8&&(h[e]=c(b.pow(d,.5))),i[e]=c(b.pow(d,1/3)),e++),d++}();var j=[],k=g.SHA256=f.extend({_doReset:function(){this._hash=new e.init(h.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],k=c[5],l=c[6],m=c[7],n=0;n<64;n++){if(n<16)j[n]=0|a[b+n];else{var o=j[n-15],p=(o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3,q=j[n-2],r=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;j[n]=p+j[n-7]+r+j[n-16]}var s=h&k^~h&l,t=d&e^d&f^e&f,u=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),v=(h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25),w=m+v+s+i[n]+j[n],x=u+t;m=l,l=k,k=h,h=g+w|0,g=f,f=e,e=d,d=w+x|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+g|0,c[4]=c[4]+h|0,c[5]=c[5]+k|0,c[6]=c[6]+l|0,c[7]=c[7]+m|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;return c[e>>>5]|=128<<24-e%32,c[(e+64>>>9<<4)+14]=b.floor(d/4294967296),c[(e+64>>>9<<4)+15]=d,a.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=f.clone.call(this);return a._hash=this._hash.clone(),a}});c.SHA256=f._createHelper(k),c.HmacSHA256=f._createHmacHelper(k)}(Math),a.SHA256})},{"./core":46}],73:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.x64,h=g.Word,i=c.algo,j=[],k=[],l=[];!function(){for(var a=1,b=0,c=0;c<24;c++){j[a+5*b]=(c+1)*(c+2)/2%64;var d=b%5,e=(2*a+3*b)%5;a=d,b=e}for(var a=0;a<5;a++)for(var b=0;b<5;b++)k[a+5*b]=b+(2*a+3*b)%5*5;for(var f=1,g=0;g<24;g++){for(var i=0,m=0,n=0;n<7;n++){if(1&f){var o=(1<<n)-1;o<32?m^=1<<o:i^=1<<o-32}128&f?f=f<<1^113:f<<=1}l[g]=h.create(i,m)}}();var m=[];!function(){for(var a=0;a<25;a++)m[a]=h.create()}();var n=i.SHA3=f.extend({cfg:f.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],b=0;b<25;b++)a[b]=new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,d=this.blockSize/2,e=0;e<d;e++){var f=a[b+2*e],g=a[b+2*e+1];f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),g=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8);var h=c[e];h.high^=g,h.low^=f}for(var i=0;i<24;i++){for(var n=0;n<5;n++){for(var o=0,p=0,q=0;q<5;q++){var h=c[n+5*q];o^=h.high,p^=h.low}var r=m[n];r.high=o,r.low=p}for(var n=0;n<5;n++)for(var s=m[(n+4)%5],t=m[(n+1)%5],u=t.high,v=t.low,o=s.high^(u<<1|v>>>31),p=s.low^(v<<1|u>>>31),q=0;q<5;q++){var h=c[n+5*q];h.high^=o,h.low^=p}for(var w=1;w<25;w++){var h=c[w],x=h.high,y=h.low,z=j[w];if(z<32)var o=x<<z|y>>>32-z,p=y<<z|x>>>32-z;else var o=y<<z-32|x>>>64-z,p=x<<z-32|y>>>64-z;var A=m[k[w]];A.high=o,A.low=p}var B=m[0],C=c[0];B.high=C.high,B.low=C.low;for(var n=0;n<5;n++)for(var q=0;q<5;q++){var w=n+5*q,h=c[w],D=m[w],E=m[(n+1)%5+5*q],F=m[(n+2)%5+5*q];h.high=D.high^~E.high&F.high,h.low=D.low^~E.low&F.low}var h=c[0],G=l[i];h.high^=G.high,h.low^=G.low}},_doFinalize:function(){var a=this._data,c=a.words,d=(8*this._nDataBytes,8*a.sigBytes),f=32*this.blockSize;c[d>>>5]|=1<<24-d%32,c[(b.ceil((d+1)/f)*f>>>5)-1]|=128,a.sigBytes=4*c.length,this._process();for(var g=this._state,h=this.cfg.outputLength/8,i=h/8,j=[],k=0;k<i;k++){var l=g[k],m=l.high,n=l.low;m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),j.push(n),j.push(m)}return new e.init(j,h)},clone:function(){for(var a=f.clone.call(this),b=a._state=this._state.slice(0),c=0;c<25;c++)b[c]=b[c].clone();return a}});c.SHA3=f._createHelper(n),c.HmacSHA3=f._createHmacHelper(n)}(Math),a.SHA3})},{"./core":46,"./x64-core":77}],74:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core"),a("./sha512")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./sha512"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.x64,d=c.Word,e=c.WordArray,f=b.algo,g=f.SHA512,h=f.SHA384=g.extend({_doReset:function(){this._hash=new e.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)])},_doFinalize:function(){var a=g._doFinalize.call(this);return a.sigBytes-=16,a}});b.SHA384=g._createHelper(h),b.HmacSHA384=g._createHmacHelper(h)}(),a.SHA384})},{"./core":46,"./sha512":75,"./x64-core":77}],75:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){return g.create.apply(g,arguments)}var c=a,d=c.lib,e=d.Hasher,f=c.x64,g=f.Word,h=f.WordArray,i=c.algo,j=[b(1116352408,3609767458),b(1899447441,602891725),b(3049323471,3964484399),b(3921009573,2173295548),b(961987163,4081628472),b(1508970993,3053834265),b(2453635748,2937671579),b(2870763221,3664609560),b(3624381080,2734883394),b(310598401,1164996542),b(607225278,1323610764),b(1426881987,3590304994),b(1925078388,4068182383),b(2162078206,991336113),b(2614888103,633803317),b(3248222580,3479774868),b(3835390401,2666613458),b(4022224774,944711139),b(264347078,2341262773),b(604807628,2007800933),b(770255983,1495990901),b(1249150122,1856431235),b(1555081692,3175218132),b(1996064986,2198950837),b(2554220882,3999719339),b(2821834349,766784016),b(2952996808,2566594879),b(3210313671,3203337956),b(3336571891,1034457026),b(3584528711,2466948901),b(113926993,3758326383),b(338241895,168717936),b(666307205,1188179964),b(773529912,1546045734),b(1294757372,1522805485),b(1396182291,2643833823),b(1695183700,2343527390),b(1986661051,1014477480),b(2177026350,1206759142),b(2456956037,344077627),b(2730485921,1290863460),b(2820302411,3158454273),b(3259730800,3505952657),b(3345764771,106217008),b(3516065817,3606008344),b(3600352804,1432725776),b(4094571909,1467031594),b(275423344,851169720),b(430227734,3100823752),b(506948616,1363258195),b(659060556,3750685593),b(883997877,3785050280),b(958139571,3318307427),b(1322822218,3812723403),b(1537002063,2003034995),b(1747873779,3602036899),b(1955562222,1575990012),b(2024104815,1125592928),b(2227730452,2716904306),b(2361852424,442776044),b(2428436474,593698344),b(2756734187,3733110249),b(3204031479,2999351573),b(3329325298,3815920427),b(3391569614,3928383900),b(3515267271,566280711),b(3940187606,3454069534),b(4118630271,4000239992),b(116418474,1914138554),b(174292421,2731055270),b(289380356,3203993006),b(460393269,320620315),b(685471733,587496836),b(852142971,1086792851),b(1017036298,365543100),b(1126000580,2618297676),b(1288033470,3409855158),b(1501505948,4234509866),b(1607167915,987167468),b(1816402316,1246189591)],k=[];!function(){for(var a=0;a<80;a++)k[a]=b()}();var l=i.SHA512=e.extend({_doReset:function(){this._hash=new h.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],i=c[5],l=c[6],m=c[7],n=d.high,o=d.low,p=e.high,q=e.low,r=f.high,s=f.low,t=g.high,u=g.low,v=h.high,w=h.low,x=i.high,y=i.low,z=l.high,A=l.low,B=m.high,C=m.low,D=n,E=o,F=p,G=q,H=r,I=s,J=t,K=u,L=v,M=w,N=x,O=y,P=z,Q=A,R=B,S=C,T=0;T<80;T++){var U=k[T];if(T<16)var V=U.high=0|a[b+2*T],W=U.low=0|a[b+2*T+1];else{var X=k[T-15],Y=X.high,Z=X.low,$=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,_=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),aa=k[T-2],ba=aa.high,ca=aa.low,da=(ba>>>19|ca<<13)^(ba<<3|ca>>>29)^ba>>>6,ea=(ca>>>19|ba<<13)^(ca<<3|ba>>>29)^(ca>>>6|ba<<26),fa=k[T-7],ga=fa.high,ha=fa.low,ia=k[T-16],ja=ia.high,ka=ia.low,W=_+ha,V=$+ga+(W>>>0<_>>>0?1:0),W=W+ea,V=V+da+(W>>>0<ea>>>0?1:0),W=W+ka,V=V+ja+(W>>>0<ka>>>0?1:0);U.high=V,U.low=W}var la=L&N^~L&P,ma=M&O^~M&Q,na=D&F^D&H^F&H,oa=E&G^E&I^G&I,pa=(D>>>28|E<<4)^(D<<30|E>>>2)^(D<<25|E>>>7),qa=(E>>>28|D<<4)^(E<<30|D>>>2)^(E<<25|D>>>7),ra=(L>>>14|M<<18)^(L>>>18|M<<14)^(L<<23|M>>>9),sa=(M>>>14|L<<18)^(M>>>18|L<<14)^(M<<23|L>>>9),ta=j[T],ua=ta.high,va=ta.low,wa=S+sa,xa=R+ra+(wa>>>0<S>>>0?1:0),wa=wa+ma,xa=xa+la+(wa>>>0<ma>>>0?1:0),wa=wa+va,xa=xa+ua+(wa>>>0<va>>>0?1:0),wa=wa+W,xa=xa+V+(wa>>>0<W>>>0?1:0),ya=qa+oa,za=pa+na+(ya>>>0<qa>>>0?1:0);R=P,S=Q,P=N,Q=O,N=L,O=M,M=K+wa|0,L=J+xa+(M>>>0<K>>>0?1:0)|0,J=H,K=I,H=F,I=G,F=D,G=E,E=wa+ya|0,D=xa+za+(E>>>0<wa>>>0?1:0)|0}o=d.low=o+E,d.high=n+D+(o>>>0<E>>>0?1:0),q=e.low=q+G,e.high=p+F+(q>>>0<G>>>0?1:0),s=f.low=s+I,f.high=r+H+(s>>>0<I>>>0?1:0),u=g.low=u+K,g.high=t+J+(u>>>0<K>>>0?1:0),w=h.low=w+M,h.high=v+L+(w>>>0<M>>>0?1:0),y=i.low=y+O,i.high=x+N+(y>>>0<O>>>0?1:0),A=l.low=A+Q,l.high=z+P+(A>>>0<Q>>>0?1:0),C=m.low=C+S,m.high=B+R+(C>>>0<S>>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+128>>>10<<5)+30]=Math.floor(c/4294967296),b[(d+128>>>10<<5)+31]=c,a.sigBytes=4*b.length,this._process();var e=this._hash.toX32();return e},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a},blockSize:32});c.SHA512=e._createHelper(l),c.HmacSHA512=e._createHmacHelper(l)}(),a.SHA512})},{"./core":46,"./x64-core":77}],76:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(a,b){var c=(this._lBlock>>>a^this._rBlock)&b;this._rBlock^=c,this._lBlock^=c<<a}function c(a,b){var c=(this._rBlock>>>a^this._lBlock)&b;this._lBlock^=c,this._rBlock^=c<<a}var d=a,e=d.lib,f=e.WordArray,g=e.BlockCipher,h=d.algo,i=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],j=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],k=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],n=h.DES=g.extend({_doReset:function(){for(var a=this._key,b=a.words,c=[],d=0;d<56;d++){var e=i[d]-1;c[d]=b[e>>>5]>>>31-e%32&1}for(var f=this._subKeys=[],g=0;g<16;g++){for(var h=f[g]=[],l=k[g],d=0;d<24;d++)h[d/6|0]|=c[(j[d]-1+l)%28]<<31-d%6,h[4+(d/6|0)]|=c[28+(j[d+24]-1+l)%28]<<31-d%6;h[0]=h[0]<<1|h[0]>>>31;for(var d=1;d<7;d++)h[d]=h[d]>>>4*(d-1)+3;h[7]=h[7]<<5|h[7]>>>27}for(var m=this._invSubKeys=[],d=0;d<16;d++)m[d]=f[15-d]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._subKeys)},decryptBlock:function(a,b){this._doCryptBlock(a,b,this._invSubKeys)},_doCryptBlock:function(a,d,e){this._lBlock=a[d],this._rBlock=a[d+1],b.call(this,4,252645135),b.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),b.call(this,1,1431655765);for(var f=0;f<16;f++){for(var g=e[f],h=this._lBlock,i=this._rBlock,j=0,k=0;k<8;k++)j|=l[k][((i^g[k])&m[k])>>>0];this._lBlock=i,this._rBlock=h^j}var n=this._lBlock;this._lBlock=this._rBlock,this._rBlock=n,b.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),b.call(this,16,65535),b.call(this,4,252645135),a[d]=this._lBlock,a[d+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=g._createHelper(n);var o=h.TripleDES=g.extend({_doReset:function(){var a=this._key,b=a.words;this._des1=n.createEncryptor(f.create(b.slice(0,2))),this._des2=n.createEncryptor(f.create(b.slice(2,4))),this._des3=n.createEncryptor(f.create(b.slice(4,6)))},encryptBlock:function(a,b){this._des1.encryptBlock(a,b),this._des2.decryptBlock(a,b),this._des3.encryptBlock(a,b)},decryptBlock:function(a,b){this._des3.decryptBlock(a,b),this._des2.encryptBlock(a,b),this._des1.decryptBlock(a,b)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=g._createHelper(o)}(),a.TripleDES})},{"./cipher-core":45,"./core":46,"./enc-base64":47,"./evpkdf":49,"./md5":54}],77:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=c.x64={};g.Word=e.extend({init:function(a,b){this.high=a,this.low=b}}),g.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=8*a.length},toX32:function(){for(var a=this.words,b=a.length,c=[],d=0;d<b;d++){var e=a[d];c.push(e.high),c.push(e.low)}return f.create(c,this.sigBytes)},clone:function(){for(var a=e.clone.call(this),b=a.words=this.words.slice(0),c=b.length,d=0;d<c;d++)b[d]=b[d].clone();return a}})}(),a})},{"./core":46}],78:[function(a,b,c){function d(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function f(a){if(l===setTimeout)return setTimeout(a,0);if((l===d||!l)&&setTimeout)return l=setTimeout,setTimeout(a,0);try{return l(a,0)}catch(b){try{return l.call(null,a,0)}catch(b){return l.call(this,a,0)}}}function g(a){if(m===clearTimeout)return clearTimeout(a);if((m===e||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(a);try{return m(a)}catch(b){try{return m.call(null,a)}catch(b){return m.call(this,a)}}}function h(){q&&o&&(q=!1,o.length?p=o.concat(p):r=-1,p.length&&i())}function i(){if(!q){var a=f(h);q=!0;for(var b=p.length;b;){for(o=p,p=[];++r<b;)o&&o[r].run();r=-1,b=p.length}o=null,q=!1,g(a)}}function j(a,b){this.fun=a,this.array=b}function k(){}var l,m,n=b.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:d}catch(a){l=d}try{m="function"==typeof clearTimeout?clearTimeout:e}catch(a){m=e}}();var o,p=[],q=!1,r=-1;n.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];p.push(new j(a,b)),1!==p.length||q||f(i)},j.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=k,n.addListener=k,n.once=k,n.off=k,n.removeListener=k,n.removeAllListeners=k,n.emit=k,n.binding=function(a){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(a){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],79:[function(a,b,c){(function(d){!function(a){if("object"==typeof c&&"undefined"!=typeof b)b.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof d?d:"undefined"!=typeof self?self:this,e.localforage=a()}}(function(){return function b(c,d,e){function f(h,i){if(!d[h]){if(!c[h]){var j="function"==typeof a&&a;if(!i&&j)return j(h,!0);if(g)return g(h,!0);var k=new Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k}var l=d[h]={exports:{}};c[h][0].call(l.exports,function(a){var b=c[h][1][a];return f(b?b:a)},l,l.exports,b,c,d,e)}return d[h].exports}for(var g="function"==typeof a&&a,h=0;h<e.length;h++)f(e[h]);return f}({1:[function(a,b,c){"use strict";function d(){}function e(a){if("function"!=typeof a)throw new TypeError("resolver must be a function");this.state=s,this.queue=[],this.outcome=void 0,a!==d&&i(this,a)}function f(a,b,c){this.promise=a,"function"==typeof b&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),"function"==typeof c&&(this.onRejected=c,this.callRejected=this.otherCallRejected)}function g(a,b,c){o(function(){var d;try{d=b(c)}catch(b){return p.reject(a,b)}d===a?p.reject(a,new TypeError("Cannot resolve promise with itself")):p.resolve(a,d)})}function h(a){var b=a&&a.then;if(a&&"object"==typeof a&&"function"==typeof b)return function(){b.apply(a,arguments)}}function i(a,b){function c(b){f||(f=!0,p.reject(a,b))}function d(b){f||(f=!0,p.resolve(a,b))}function e(){b(d,c)}var f=!1,g=j(e);"error"===g.status&&c(g.value)}function j(a,b){var c={};try{c.value=a(b),c.status="success"}catch(a){c.status="error",c.value=a}return c}function k(a){return a instanceof this?a:p.resolve(new this(d),a)}function l(a){var b=new this(d);return p.reject(b,a)}function m(a){function b(a,b){function d(a){g[b]=a,++h!==e||f||(f=!0,p.resolve(j,g))}c.resolve(a).then(d,function(a){f||(f=!0,p.reject(j,a))})}var c=this;if("[object Array]"!==Object.prototype.toString.call(a))return this.reject(new TypeError("must be an array"));var e=a.length,f=!1;if(!e)return this.resolve([]);for(var g=new Array(e),h=0,i=-1,j=new this(d);++i<e;)b(a[i],i);return j}function n(a){function b(a){c.resolve(a).then(function(a){f||(f=!0,p.resolve(h,a))},function(a){f||(f=!0,p.reject(h,a))})}var c=this;if("[object Array]"!==Object.prototype.toString.call(a))return this.reject(new TypeError("must be an array"));var e=a.length,f=!1;if(!e)return this.resolve([]);for(var g=-1,h=new this(d);++g<e;)b(a[g]);return h}var o=a(2),p={},q=["REJECTED"],r=["FULFILLED"],s=["PENDING"];b.exports=c=e,e.prototype.catch=function(a){return this.then(null,a)},e.prototype.then=function(a,b){if("function"!=typeof a&&this.state===r||"function"!=typeof b&&this.state===q)return this;var c=new this.constructor(d);if(this.state!==s){var e=this.state===r?a:b;g(c,e,this.outcome)}else this.queue.push(new f(c,a,b));return c},f.prototype.callFulfilled=function(a){p.resolve(this.promise,a)},f.prototype.otherCallFulfilled=function(a){g(this.promise,this.onFulfilled,a)},f.prototype.callRejected=function(a){p.reject(this.promise,a)},f.prototype.otherCallRejected=function(a){g(this.promise,this.onRejected,a)},p.resolve=function(a,b){var c=j(h,b);if("error"===c.status)return p.reject(a,c.value);var d=c.value;if(d)i(a,d);else{a.state=r,a.outcome=b;for(var e=-1,f=a.queue.length;++e<f;)a.queue[e].callFulfilled(b)}return a},p.reject=function(a,b){a.state=q,a.outcome=b;for(var c=-1,d=a.queue.length;++c<d;)a.queue[c].callRejected(b);return a},c.resolve=k,c.reject=l,c.all=m,c.race=n},{2:2}],2:[function(a,b,c){(function(a){"use strict";function c(){k=!0;for(var a,b,c=l.length;c;){for(b=l,l=[],a=-1;++a<c;)b[a]();c=l.length}k=!1}function d(a){1!==l.push(a)||k||e()}var e,f=a.MutationObserver||a.WebKitMutationObserver;if(f){var g=0,h=new f(c),i=a.document.createTextNode("");h.observe(i,{characterData:!0}),e=function(){i.data=g=++g%2}}else if(a.setImmediate||"undefined"==typeof a.MessageChannel)e="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var b=a.document.createElement("script");b.onreadystatechange=function(){c(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},a.document.documentElement.appendChild(b)}:function(){setTimeout(c,0)};else{var j=new a.MessageChannel;j.port1.onmessage=c,e=function(){j.port2.postMessage(0)}}var k,l=[];b.exports=d}).call(this,"undefined"!=typeof d?d:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(a,b,c){(function(b){"use strict";"function"!=typeof b.Promise&&(b.Promise=a(1))}).call(this,"undefined"!=typeof d?d:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(a){}}function f(){try{return!!fa&&(!("undefined"!=typeof openDatabase&&"undefined"!=typeof navigator&&navigator.userAgent&&/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent))&&(fa&&"function"==typeof fa.open&&"undefined"!=typeof IDBKeyRange))}catch(a){return!1}}function g(){return"function"==typeof openDatabase}function h(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&localStorage.setItem}catch(a){return!1}}function i(a,b){a=a||[],b=b||{};try{return new Blob(a,b)}catch(f){if("TypeError"!==f.name)throw f;for(var c="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder,d=new c,e=0;e<a.length;e+=1)d.append(a[e]);return d.getBlob(b.type)}}function j(a,b){b&&a.then(function(a){b(null,a)},function(a){b(a)})}function k(a,b,c){"function"==typeof b&&a.then(b),"function"==typeof c&&a.catch(c)}function l(a){for(var b=a.length,c=new ArrayBuffer(b),d=new Uint8Array(c),e=0;e<b;e++)d[e]=a.charCodeAt(e);return c}function m(a){return new ia(function(b){var c=i([""]);a.objectStore(ja).put(c,"key"),a.onabort=function(a){a.preventDefault(),a.stopPropagation(),b(!1)},a.oncomplete=function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/),c=navigator.userAgent.match(/Edge\//);b(c||!a||parseInt(a[1],10)>=43)}}).catch(function(){return!1})}function n(a){return"boolean"==typeof ga?ia.resolve(ga):m(a).then(function(a){return ga=a})}function o(a){var b=ha[a.name],c={};c.promise=new ia(function(a){c.resolve=a}),b.deferredOperations.push(c),b.dbReady?b.dbReady=b.dbReady.then(function(){ return c.promise}):b.dbReady=c.promise}function p(a){var b=ha[a.name],c=b.deferredOperations.pop();c&&c.resolve()}function q(a,b){return new ia(function(c,d){if(a.db){if(!b)return c(a.db);o(a),a.db.close()}var e=[a.name];b&&e.push(a.version);var f=fa.open.apply(fa,e);b&&(f.onupgradeneeded=function(b){var c=f.result;try{c.createObjectStore(a.storeName),b.oldVersion<=1&&c.createObjectStore(ja)}catch(c){if("ConstraintError"!==c.name)throw c;console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),f.onerror=function(){d(f.error)},f.onsuccess=function(){c(f.result),p(a)}})}function r(a){return q(a,!1)}function s(a){return q(a,!0)}function t(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.version<a.db.version,e=a.version>a.db.version;if(d&&(a.version!==b&&console.warn('The database "'+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),e||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function u(a){return new ia(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function v(a){var b=l(atob(a.data));return i([b],{type:a.type})}function w(a){return a&&a.__local_forage_encoded_blob}function x(a){var b=this,c=b._initReady().then(function(){var a=ha[b._dbInfo.name];if(a&&a.dbReady)return a.dbReady});return k(c,a,a),c}function y(a){function b(){return ia.resolve()}var c=this,d={db:null};if(a)for(var e in a)d[e]=a[e];ha||(ha={});var f=ha[d.name];f||(f={forages:[],db:null,dbReady:null,deferredOperations:[]},ha[d.name]=f),f.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=x);for(var g=[],h=0;h<f.forages.length;h++){var i=f.forages[h];i!==c&&g.push(i._initReady().catch(b))}var j=f.forages.slice(0);return ia.all(g).then(function(){return d.db=f.db,r(d)}).then(function(a){return d.db=a,t(d,c._defaultConfig.version)?s(d):a}).then(function(a){d.db=f.db=a,c._dbInfo=d;for(var b=0;b<j.length;b++){var e=j[b];e!==c&&(e._dbInfo.db=d.db,e._dbInfo.version=d.version)}})}function z(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ia(function(b,d){c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=f.get(a);g.onsuccess=function(){var a=g.result;void 0===a&&(a=null),w(a)&&(a=v(a)),b(a)},g.onerror=function(){d(g.error)}}).catch(d)});return j(d,b),d}function A(a,b){var c=this,d=new ia(function(b,d){c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=f.openCursor(),h=1;g.onsuccess=function(){var c=g.result;if(c){var d=c.value;w(d)&&(d=v(d));var e=a(d,c.key,h++);void 0!==e?b(e):c.continue()}else b()},g.onerror=function(){d(g.error)}}).catch(d)});return j(d,b),d}function B(a,b,c){var d=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=new ia(function(c,e){var f;d.ready().then(function(){return f=d._dbInfo,"[object Blob]"===ka.call(b)?n(f.db).then(function(a){return a?b:u(b)}):b}).then(function(b){var d=f.db.transaction(f.storeName,"readwrite"),g=d.objectStore(f.storeName);null===b&&(b=void 0),d.oncomplete=function(){void 0===b&&(b=null),c(b)},d.onabort=d.onerror=function(){var a=h.error?h.error:h.transaction.error;e(a)};var h=g.put(b,a)}).catch(e)});return j(e,c),e}function C(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ia(function(b,d){c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readwrite"),g=f.objectStore(e.storeName),h=g.delete(a);f.oncomplete=function(){b()},f.onerror=function(){d(h.error)},f.onabort=function(){var a=h.error?h.error:h.transaction.error;d(a)}}).catch(d)});return j(d,b),d}function D(a){var b=this,c=new ia(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readwrite"),f=e.objectStore(d.storeName),g=f.clear();e.oncomplete=function(){a()},e.onabort=e.onerror=function(){var a=g.error?g.error:g.transaction.error;c(a)}}).catch(c)});return j(c,a),c}function E(a){var b=this,c=new ia(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readonly").objectStore(d.storeName),f=e.count();f.onsuccess=function(){a(f.result)},f.onerror=function(){c(f.error)}}).catch(c)});return j(c,a),c}function F(a,b){var c=this,d=new ia(function(b,d){return a<0?void b(null):void c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=!1,h=f.openCursor();h.onsuccess=function(){var c=h.result;return c?void(0===a?b(c.key):g?b(c.key):(g=!0,c.advance(a))):void b(null)},h.onerror=function(){d(h.error)}}).catch(d)});return j(d,b),d}function G(a){var b=this,c=new ia(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readonly").objectStore(d.storeName),f=e.openCursor(),g=[];f.onsuccess=function(){var b=f.result;return b?(g.push(b.key),void b.continue()):void a(g)},f.onerror=function(){c(f.error)}}).catch(c)});return j(c,a),c}function H(a){var b,c,d,e,f,g=.75*a.length,h=a.length,i=0;"="===a[a.length-1]&&(g--,"="===a[a.length-2]&&g--);var j=new ArrayBuffer(g),k=new Uint8Array(j);for(b=0;b<h;b+=4)c=ma.indexOf(a[b]),d=ma.indexOf(a[b+1]),e=ma.indexOf(a[b+2]),f=ma.indexOf(a[b+3]),k[i++]=c<<2|d>>4,k[i++]=(15&d)<<4|e>>2,k[i++]=(3&e)<<6|63&f;return j}function I(a){var b,c=new Uint8Array(a),d="";for(b=0;b<c.length;b+=3)d+=ma[c[b]>>2],d+=ma[(3&c[b])<<4|c[b+1]>>4],d+=ma[(15&c[b+1])<<2|c[b+2]>>6],d+=ma[63&c[b+2]];return c.length%3===2?d=d.substring(0,d.length-1)+"=":c.length%3===1&&(d=d.substring(0,d.length-2)+"=="),d}function J(a,b){var c="";if(a&&(c=Da.call(a)),a&&("[object ArrayBuffer]"===c||a.buffer&&"[object ArrayBuffer]"===Da.call(a.buffer))){var d,e=pa;a instanceof ArrayBuffer?(d=a,e+=ra):(d=a.buffer,"[object Int8Array]"===c?e+=ta:"[object Uint8Array]"===c?e+=ua:"[object Uint8ClampedArray]"===c?e+=va:"[object Int16Array]"===c?e+=wa:"[object Uint16Array]"===c?e+=ya:"[object Int32Array]"===c?e+=xa:"[object Uint32Array]"===c?e+=za:"[object Float32Array]"===c?e+=Aa:"[object Float64Array]"===c?e+=Ba:b(new Error("Failed to get type for BinaryArray"))),b(e+I(d))}else if("[object Blob]"===c){var f=new FileReader;f.onload=function(){var c=na+a.type+"~"+I(this.result);b(pa+sa+c)},f.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(c){console.error("Couldn't convert value into a JSON string: ",a),b(null,c)}}function K(a){if(a.substring(0,qa)!==pa)return JSON.parse(a);var b,c=a.substring(Ca),d=a.substring(qa,Ca);if(d===sa&&oa.test(c)){var e=c.match(oa);b=e[1],c=c.substring(e[0].length)}var f=H(c);switch(d){case ra:return f;case sa:return i([f],{type:b});case ta:return new Int8Array(f);case ua:return new Uint8Array(f);case va:return new Uint8ClampedArray(f);case wa:return new Int16Array(f);case ya:return new Uint16Array(f);case xa:return new Int32Array(f);case za:return new Uint32Array(f);case Aa:return new Float32Array(f);case Ba:return new Float64Array(f);default:throw new Error("Unkown type: "+d)}}function L(a){var b=this,c={db:null};if(a)for(var d in a)c[d]="string"!=typeof a[d]?a[d].toString():a[d];var e=new ia(function(a,d){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(a){return d(a)}c.db.transaction(function(e){e.executeSql("CREATE TABLE IF NOT EXISTS "+c.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){b._dbInfo=c,a()},function(a,b){d(b)})})});return c.serializer=Ea,e}function M(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ia(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName+" WHERE key = ? LIMIT 1",[a],function(a,c){var d=c.rows.length?c.rows.item(0).value:null;d&&(d=e.serializer.deserialize(d)),b(d)},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function N(a,b){var c=this,d=new ia(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName,[],function(c,d){for(var f=d.rows,g=f.length,h=0;h<g;h++){var i=f.item(h),j=i.value;if(j&&(j=e.serializer.deserialize(j)),j=a(j,i.key,h+1),void 0!==j)return void b(j)}b()},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function O(a,b,c){var d=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=new ia(function(c,e){d.ready().then(function(){void 0===b&&(b=null);var f=b,g=d._dbInfo;g.serializer.serialize(b,function(b,d){d?e(d):g.db.transaction(function(d){d.executeSql("INSERT OR REPLACE INTO "+g.storeName+" (key, value) VALUES (?, ?)",[a,b],function(){c(f)},function(a,b){e(b)})},function(a){a.code===a.QUOTA_ERR&&e(a)})})}).catch(e)});return j(e,c),e}function P(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ia(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("DELETE FROM "+e.storeName+" WHERE key = ?",[a],function(){b()},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function Q(a){var b=this,c=new ia(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("DELETE FROM "+d.storeName,[],function(){a()},function(a,b){c(b)})})}).catch(c)});return j(c,a),c}function R(a){var b=this,c=new ia(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT COUNT(key) as c FROM "+d.storeName,[],function(b,c){var d=c.rows.item(0).c;a(d)},function(a,b){c(b)})})}).catch(c)});return j(c,a),c}function S(a,b){var c=this,d=new ia(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT key FROM "+e.storeName+" WHERE id = ? LIMIT 1",[a+1],function(a,c){var d=c.rows.length?c.rows.item(0).key:null;b(d)},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function T(a){var b=this,c=new ia(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT key FROM "+d.storeName,[],function(b,c){for(var d=[],e=0;e<c.rows.length;e++)d.push(c.rows.item(e).key);a(d)},function(a,b){c(b)})})}).catch(c)});return j(c,a),c}function U(a){var b=this,c={};if(a)for(var d in a)c[d]=a[d];return c.keyPrefix=c.name+"/",c.storeName!==b._defaultConfig.storeName&&(c.keyPrefix+=c.storeName+"/"),b._dbInfo=c,c.serializer=Ea,ia.resolve()}function V(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo.keyPrefix,c=localStorage.length-1;c>=0;c--){var d=localStorage.key(c);0===d.indexOf(a)&&localStorage.removeItem(d)}});return j(c,a),c}function W(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=c.ready().then(function(){var b=c._dbInfo,d=localStorage.getItem(b.keyPrefix+a);return d&&(d=b.serializer.deserialize(d)),d});return j(d,b),d}function X(a,b){var c=this,d=c.ready().then(function(){for(var b=c._dbInfo,d=b.keyPrefix,e=d.length,f=localStorage.length,g=1,h=0;h<f;h++){var i=localStorage.key(h);if(0===i.indexOf(d)){var j=localStorage.getItem(i);if(j&&(j=b.serializer.deserialize(j)),j=a(j,i.substring(e),g++),void 0!==j)return j}}});return j(d,b),d}function Y(a,b){var c=this,d=c.ready().then(function(){var b,d=c._dbInfo;try{b=localStorage.key(a)}catch(a){b=null}return b&&(b=b.substring(d.keyPrefix.length)),b});return j(d,b),d}function Z(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo,c=localStorage.length,d=[],e=0;e<c;e++)0===localStorage.key(e).indexOf(a.keyPrefix)&&d.push(localStorage.key(e).substring(a.keyPrefix.length));return d});return j(c,a),c}function $(a){var b=this,c=b.keys().then(function(a){return a.length});return j(c,a),c}function _(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=c.ready().then(function(){var b=c._dbInfo;localStorage.removeItem(b.keyPrefix+a)});return j(d,b),d}function aa(a,b,c){var d=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=d.ready().then(function(){void 0===b&&(b=null);var c=b;return new ia(function(e,f){var g=d._dbInfo;g.serializer.serialize(b,function(b,d){if(d)f(d);else try{localStorage.setItem(g.keyPrefix+a,b),e(c)}catch(a){"QuotaExceededError"!==a.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==a.name||f(a),f(a)}})})});return j(e,c),e}function ba(a,b){a[b]=function(){var c=arguments;return a.ready().then(function(){return a[b].apply(a,c)})}}function ca(){for(var a=1;a<arguments.length;a++){var b=arguments[a];if(b)for(var c in b)b.hasOwnProperty(c)&&(Na(b[c])?arguments[0][c]=b[c].slice():arguments[0][c]=b[c])}return arguments[0]}function da(a){for(var b in Ia)if(Ia.hasOwnProperty(b)&&Ia[b]===a)return!0;return!1}var ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},fa=e();"undefined"==typeof Promise&&"undefined"!=typeof a&&a(3);var ga,ha,ia=Promise,ja="local-forage-detect-blob-support",ka=Object.prototype.toString,la={_driver:"asyncStorage",_initStorage:y,iterate:A,getItem:z,setItem:B,removeItem:C,clear:D,length:E,key:F,keys:G},ma="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",na="~~local_forage_type~",oa=/^~~local_forage_type~([^~]+)~/,pa="__lfsc__:",qa=pa.length,ra="arbf",sa="blob",ta="si08",ua="ui08",va="uic8",wa="si16",xa="si32",ya="ur16",za="ui32",Aa="fl32",Ba="fl64",Ca=qa+ra.length,Da=Object.prototype.toString,Ea={serialize:J,deserialize:K,stringToBuffer:H,bufferToString:I},Fa={_driver:"webSQLStorage",_initStorage:L,iterate:N,getItem:M,setItem:O,removeItem:P,clear:Q,length:R,key:S,keys:T},Ga={_driver:"localStorageWrapper",_initStorage:U,iterate:X,getItem:W,setItem:aa,removeItem:_,clear:V,length:$,key:Y,keys:Z},Ha={},Ia={INDEXEDDB:"asyncStorage",LOCALSTORAGE:"localStorageWrapper",WEBSQL:"webSQLStorage"},Ja=[Ia.INDEXEDDB,Ia.WEBSQL,Ia.LOCALSTORAGE],Ka=["clear","getItem","iterate","key","keys","length","removeItem","setItem"],La={description:"",driver:Ja.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},Ma={};Ma[Ia.INDEXEDDB]=f(),Ma[Ia.WEBSQL]=g(),Ma[Ia.LOCALSTORAGE]=h();var Na=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},Oa=function(){function a(b){d(this,a),this.INDEXEDDB=Ia.INDEXEDDB,this.LOCALSTORAGE=Ia.LOCALSTORAGE,this.WEBSQL=Ia.WEBSQL,this._defaultConfig=ca({},La),this._config=ca({},this._defaultConfig,b),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver)}return a.prototype.config=function(a){if("object"===("undefined"==typeof a?"undefined":ea(a))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var b in a)"storeName"===b&&(a[b]=a[b].replace(/\W/g,"_")),this._config[b]=a[b];return"driver"in a&&a.driver&&this.setDriver(this._config.driver),!0}return"string"==typeof a?this._config[a]:this._config},a.prototype.defineDriver=function(a,b,c){var d=new ia(function(b,c){try{var d=a._driver,e=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),f=new Error("Custom driver name already in use: "+a._driver);if(!a._driver)return void c(e);if(da(a._driver))return void c(f);for(var g=Ka.concat("_initStorage"),h=0;h<g.length;h++){var i=g[h];if(!i||!a[i]||"function"!=typeof a[i])return void c(e)}var j=ia.resolve(!0);"_support"in a&&(j=a._support&&"function"==typeof a._support?a._support():ia.resolve(!!a._support)),j.then(function(c){Ma[d]=c,Ha[d]=a,b()},c)}catch(a){c(a)}});return k(d,b,c),d},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(a,b,c){var d=this,e=ia.resolve().then(function(){if(!da(a)){if(Ha[a])return Ha[a];throw new Error("Driver not found.")}switch(a){case d.INDEXEDDB:return la;case d.LOCALSTORAGE:return Ga;case d.WEBSQL:return Fa}});return k(e,b,c),e},a.prototype.getSerializer=function(a){var b=ia.resolve(Ea);return k(b,a),b},a.prototype.ready=function(a){var b=this,c=b._driverSet.then(function(){return null===b._ready&&(b._ready=b._initDriver()),b._ready});return k(c,a,a),c},a.prototype.setDriver=function(a,b,c){function d(){f._config.driver=f.driver()}function e(a){return function(){function b(){for(;c<a.length;){var e=a[c];return c++,f._dbInfo=null,f._ready=null,f.getDriver(e).then(function(a){return f._extend(a),d(),f._ready=f._initStorage(f._config),f._ready}).catch(b)}d();var g=new Error("No available storage method found.");return f._driverSet=ia.reject(g),f._driverSet}var c=0;return b()}}var f=this;Na(a)||(a=[a]);var g=this._getSupportedDrivers(a),h=null!==this._driverSet?this._driverSet.catch(function(){return ia.resolve()}):ia.resolve();return this._driverSet=h.then(function(){var a=g[0];return f._dbInfo=null,f._ready=null,f.getDriver(a).then(function(a){f._driver=a._driver,d(),f._wrapLibraryMethodsWithReady(),f._initDriver=e(g)})}).catch(function(){d();var a=new Error("No available storage method found.");return f._driverSet=ia.reject(a),f._driverSet}),k(this._driverSet,b,c),this._driverSet},a.prototype.supports=function(a){return!!Ma[a]},a.prototype._extend=function(a){ca(this,a)},a.prototype._getSupportedDrivers=function(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c];this.supports(e)&&b.push(e)}return b},a.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0;a<Ka.length;a++)ba(this,Ka[a])},a.prototype.createInstance=function(b){return new a(b)},a}(),Pa=new Oa;b.exports=Pa},{3:3}]},{},[4])(4)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],80:[function(a,b,c){"use strict";var d=a("./lib/utils/common").assign,e=a("./lib/deflate"),f=a("./lib/inflate"),g=a("./lib/zlib/constants"),h={};d(h,e,f,g),b.exports=h},{"./lib/deflate":81,"./lib/inflate":82,"./lib/utils/common":83,"./lib/zlib/constants":86}],81:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=i.assign({level:s,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:t,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=h.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==p)throw new Error(k[c]);if(b.header&&h.deflateSetHeader(this.strm,b.header),b.dictionary){var e;if(e="string"==typeof b.dictionary?j.string2buf(b.dictionary):"[object ArrayBuffer]"===m.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary,c=h.deflateSetDictionary(this.strm,e),c!==p)throw new Error(k[c]);this._dict_set=!0}}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}function g(a,b){return b=b||{},b.gzip=!0,e(a,b)}var h=a("./zlib/deflate"),i=a("./utils/common"),j=a("./utils/strings"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=Object.prototype.toString,n=0,o=4,p=0,q=1,r=2,s=-1,t=0,u=8;d.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?o:n,"string"==typeof a?e.input=j.string2buf(a):"[object ArrayBuffer]"===m.call(a)?e.input=new Uint8Array(a):e.input=a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new i.Buf8(f),e.next_out=0,e.avail_out=f),c=h.deflate(e,d),c!==q&&c!==p)return this.onEnd(c),this.ended=!0,!1;0!==e.avail_out&&(0!==e.avail_in||d!==o&&d!==r)||("string"===this.options.to?this.onData(j.buf2binstring(i.shrinkBuf(e.output,e.next_out))):this.onData(i.shrinkBuf(e.output,e.next_out)))}while((e.avail_in>0||0===e.avail_out)&&c!==q);return d===o?(c=h.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===p):d!==r||(this.onEnd(p),e.avail_out=0,!0)},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=d,c.deflate=e,c.deflateRaw=f,c.gzip=g},{"./utils/common":83,"./utils/strings":84,"./zlib/deflate":88,"./zlib/messages":93,"./zlib/zstream":95}],82:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=g.inflateInit2(this.strm,b.windowBits);if(c!==j.Z_OK)throw new Error(k[c]);this.header=new m,g.inflateGetHeader(this.strm,this.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}var g=a("./zlib/inflate"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/constants"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=a("./zlib/gzheader"),n=Object.prototype.toString;d.prototype.push=function(a,b){var c,d,e,f,k,l,m=this.strm,o=this.options.chunkSize,p=this.options.dictionary,q=!1;if(this.ended)return!1;d=b===~~b?b:b===!0?j.Z_FINISH:j.Z_NO_FLUSH,"string"==typeof a?m.input=i.binstring2buf(a):"[object ArrayBuffer]"===n.call(a)?m.input=new Uint8Array(a):m.input=a,m.next_in=0,m.avail_in=m.input.length;do{if(0===m.avail_out&&(m.output=new h.Buf8(o),m.next_out=0,m.avail_out=o),c=g.inflate(m,j.Z_NO_FLUSH),c===j.Z_NEED_DICT&&p&&(l="string"==typeof p?i.string2buf(p):"[object ArrayBuffer]"===n.call(p)?new Uint8Array(p):p,c=g.inflateSetDictionary(this.strm,l)),c===j.Z_BUF_ERROR&&q===!0&&(c=j.Z_OK,q=!1),c!==j.Z_STREAM_END&&c!==j.Z_OK)return this.onEnd(c),this.ended=!0,!1;m.next_out&&(0!==m.avail_out&&c!==j.Z_STREAM_END&&(0!==m.avail_in||d!==j.Z_FINISH&&d!==j.Z_SYNC_FLUSH)||("string"===this.options.to?(e=i.utf8border(m.output,m.next_out),f=m.next_out-e,k=i.buf2string(m.output,e),m.next_out=f,m.avail_out=o-f,f&&h.arraySet(m.output,m.output,e,f,0),this.onData(k)):this.onData(h.shrinkBuf(m.output,m.next_out)))),0===m.avail_in&&0===m.avail_out&&(q=!0)}while((m.avail_in>0||0===m.avail_out)&&c!==j.Z_STREAM_END);return c===j.Z_STREAM_END&&(d=j.Z_FINISH),d===j.Z_FINISH?(c=g.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===j.Z_OK):d!==j.Z_SYNC_FLUSH||(this.onEnd(j.Z_OK),m.avail_out=0,!0)},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===j.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=d,c.inflate=e,c.inflateRaw=f,c.ungzip=e},{"./utils/common":83,"./utils/strings":84,"./zlib/constants":86,"./zlib/gzheader":89,"./zlib/inflate":91,"./zlib/messages":93,"./zlib/zstream":95}],83:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;f<d;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;b<c;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;b<c;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;f<d;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],84:[function(a,b,c){"use strict";function d(a,b){if(b<65537&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;d<b;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(a){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(a){g=!1}for(var h=new e.Buf8(256),i=0;i<256;i++)h[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1;h[254]=h[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;f<h;f++)c=a.charCodeAt(f),55296===(64512&c)&&f+1<h&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=c<128?1:c<2048?2:c<65536?3:4;for(b=new e.Buf8(i),g=0,f=0;g<i;f++)c=a.charCodeAt(f),55296===(64512&c)&&f+1<h&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),c<128?b[g++]=c:c<2048?(b[g++]=192|c>>>6,b[g++]=128|63&c):c<65536?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;c<d;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,i=b||a.length,j=new Array(2*i);for(e=0,c=0;c<i;)if(f=a[c++],f<128)j[e++]=f;else if(g=h[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&c<i;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:f<65536?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return c<0?b:0===c?b:c+h[a[c]]>b?c:b}},{"./common":83}],85:[function(a,b,c){"use strict";function d(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=d},{}],86:[function(a,b,c){"use strict";b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],87:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=f,g=d+c;a^=-1;for(var h=d;h<g;h++)a=a>>>8^e[255&(a^b[h])];return a^-1}var f=d();b.exports=e},{}],88:[function(a,b,c){"use strict";function d(a,b){return a.msg=I[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(E.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){F._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,E.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=G(a.adler,b,e,c):2===a.state.wrap&&(a.adler=H(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-la?a.strstart-(a.w_size-la):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ka,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&f<m);if(d=ka-(m-f),f=m-ka,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-la)){E.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ja)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+ja-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<ja)););}while(a.lookahead<la&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===J)return ua;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return ua;if(a.strstart-a.block_start>=a.w_size-la&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?ua:ua}function o(a,b){for(var c,d;;){if(a.lookahead<la){if(m(a),a.lookahead<la&&b===J)return ua;if(0===a.lookahead)break}if(c=0,a.lookahead>=ja&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-la&&(a.match_length=l(a,c)),a.match_length>=ja)if(d=F._tr_tally(a,a.strstart-a.match_start,a.match_length-ja),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ja){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=a.strstart<ja-1?a.strstart:ja-1,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function p(a,b){for(var c,d,e;;){if(a.lookahead<la){if(m(a),a.lookahead<la&&b===J)return ua;if(0===a.lookahead)break}if(c=0,a.lookahead>=ja&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=ja-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-la&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===U||a.match_length===ja&&a.strstart-a.match_start>4096)&&(a.match_length=ja-1)),a.prev_length>=ja&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ja,d=F._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ja),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h], a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=ja-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return ua}else if(a.match_available){if(d=F._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return ua}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=F._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<ja-1?a.strstart:ja-1,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ka){if(m(a),a.lookahead<=ka&&b===J)return ua;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=ja&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ka;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&e<f);a.match_length=ka-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ja?(c=F._tr_tally(a,1,a.match_length-ja),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===J)return ua;break}if(a.match_length=0,c=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function s(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e}function t(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=D[a.level].max_lazy,a.good_match=D[a.level].good_length,a.nice_match=D[a.level].nice_length,a.max_chain_length=D[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ja-1,a.match_available=0,a.ins_h=0}function u(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E.Buf16(2*ha),this.dyn_dtree=new E.Buf16(2*(2*fa+1)),this.bl_tree=new E.Buf16(2*(2*ga+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E.Buf16(ia+1),this.heap=new E.Buf16(2*ea+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E.Buf16(2*ea+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function v(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=Z,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?na:sa,a.adler=2===b.wrap?0:1,b.last_flush=J,F._tr_init(b),O):d(a,Q)}function w(a){var b=v(a);return b===O&&t(a.state),b}function x(a,b){return a&&a.state?2!==a.state.wrap?Q:(a.state.gzhead=b,O):Q}function y(a,b,c,e,f,g){if(!a)return Q;var h=1;if(b===T&&(b=6),e<0?(h=0,e=-e):e>15&&(h=2,e-=16),f<1||f>_||c!==$||e<8||e>15||b<0||b>9||g<0||g>X)return d(a,Q);8===e&&(e=9);var i=new u;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+ja-1)/ja),i.window=new E.Buf8(2*i.w_size),i.head=new E.Buf16(i.hash_size),i.prev=new E.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new E.Buf8(i.pending_buf_size),i.d_buf=1*i.lit_bufsize,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,w(a)}function z(a,b){return y(a,b,$,aa,ba,Y)}function A(a,b){var c,h,k,l;if(!a||!a.state||b>N||b<0)return a?d(a,Q):Q;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===ta&&b!==M)return d(a,0===a.avail_out?S:Q);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===na)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=V||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=H(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=oa):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=V||h.level<2?4:0),i(h,ya),h.status=sa);else{var m=$+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=V||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=ma),m+=31-m%31,h.status=sa,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===oa)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=pa)}else h.status=pa;if(h.status===pa)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=qa)}else h.status=qa;if(h.status===qa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=ra)}else h.status=ra;if(h.status===ra&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=sa)):h.status=sa),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,O}else if(0===a.avail_in&&e(b)<=e(c)&&b!==M)return d(a,S);if(h.status===ta&&0!==a.avail_in)return d(a,S);if(0!==a.avail_in||0!==h.lookahead||b!==J&&h.status!==ta){var o=h.strategy===V?r(h,b):h.strategy===W?q(h,b):D[h.level].func(h,b);if(o!==wa&&o!==xa||(h.status=ta),o===ua||o===wa)return 0===a.avail_out&&(h.last_flush=-1),O;if(o===va&&(b===K?F._tr_align(h):b!==N&&(F._tr_stored_block(h,0,0,!1),b===L&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,O}return b!==M?O:h.wrap<=0?P:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?O:P)}function B(a){var b;return a&&a.state?(b=a.state.status,b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra&&b!==sa&&b!==ta?d(a,Q):(a.state=null,b===sa?d(a,R):O)):Q}function C(a,b){var c,d,e,g,h,i,j,k,l=b.length;if(!a||!a.state)return Q;if(c=a.state,g=c.wrap,2===g||1===g&&c.status!==na||c.lookahead)return Q;for(1===g&&(a.adler=G(a.adler,b,l,0)),c.wrap=0,l>=c.w_size&&(0===g&&(f(c.head),c.strstart=0,c.block_start=0,c.insert=0),k=new E.Buf8(c.w_size),E.arraySet(k,b,l-c.w_size,c.w_size,0),b=k,l=c.w_size),h=a.avail_in,i=a.next_in,j=a.input,a.avail_in=l,a.next_in=0,a.input=b,m(c);c.lookahead>=ja;){d=c.strstart,e=c.lookahead-(ja-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[d+ja-1])&c.hash_mask,c.prev[d&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=d,d++;while(--e);c.strstart=d,c.lookahead=ja-1,m(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=ja-1,c.match_available=0,a.next_in=i,a.input=j,a.avail_in=h,c.wrap=g,O}var D,E=a("../utils/common"),F=a("./trees"),G=a("./adler32"),H=a("./crc32"),I=a("./messages"),J=0,K=1,L=3,M=4,N=5,O=0,P=1,Q=-2,R=-3,S=-5,T=-1,U=1,V=2,W=3,X=4,Y=0,Z=2,$=8,_=9,aa=15,ba=8,ca=29,da=256,ea=da+1+ca,fa=30,ga=19,ha=2*ea+1,ia=15,ja=3,ka=258,la=ka+ja+1,ma=32,na=42,oa=69,pa=73,qa=91,ra=103,sa=113,ta=666,ua=1,va=2,wa=3,xa=4,ya=3;D=[new s(0,0,0,0,n),new s(4,4,8,4,o),new s(4,5,16,8,o),new s(4,6,32,32,o),new s(4,4,16,16,p),new s(8,16,32,32,p),new s(8,16,128,128,p),new s(8,32,128,256,p),new s(32,128,258,1024,p),new s(32,258,258,4096,p)],c.deflateInit=z,c.deflateInit2=y,c.deflateReset=w,c.deflateResetKeep=v,c.deflateSetHeader=x,c.deflate=A,c.deflateEnd=B,c.deflateSetDictionary=C,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":83,"./adler32":85,"./crc32":87,"./messages":93,"./trees":94}],89:[function(a,b,c){"use strict";function d(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=d},{}],90:[function(a,b,c){"use strict";var d=30,e=12;b.exports=function(a,b){var c,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;c=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=c.dmax,l=c.wsize,m=c.whave,n=c.wnext,o=c.window,p=c.hold,q=c.bits,r=c.lencode,s=c.distcode,t=(1<<c.lenbits)-1,u=(1<<c.distbits)-1;a:do{q<15&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){c.mode=e;break a}a.msg="invalid literal/length code",c.mode=d;break a}x=65535&v,w&=15,w&&(q<w&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),q<15&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",c.mode=d;break a}if(y=65535&v,w&=15,q<w&&(p+=B[f++]<<q,q+=8,q<w&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",c.mode=d;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&c.sane){a.msg="invalid distance too far back",c.mode=d;break a}if(z=0,A=o,0===n){if(z+=l-w,w<x){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(n<w){if(z+=l+n-w,w-=n,w<x){x-=w;do C[h++]=o[z++];while(--w);if(z=0,n<x){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,w<x){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(f<g&&h<j);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=f<g?5+(g-f):5-(f-g),a.avail_out=h<j?257+(j-h):257-(h-j),c.hold=p,c.bits=q}},{}],91:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=L,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new s.Buf32(pa),b.distcode=b.distdyn=new s.Buf32(qa),b.sane=1,b.back=-1,D):G}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):G}function h(a,b){var c,d;return a&&a.state?(d=a.state,b<0?(c=0,b=-b):(c=(b>>4)+1,b<48&&(b&=15)),b&&(b<8||b>15)?G:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):G}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==D&&(a.state=null),c):G}function j(a){return i(a,sa)}function k(a){if(ta){var b;for(q=new s.Buf32(512),r=new s.Buf32(32),b=0;b<144;)a.lens[b++]=8;for(;b<256;)a.lens[b++]=9;for(;b<280;)a.lens[b++]=7;for(;b<288;)a.lens[b++]=8;for(w(y,a.lens,0,288,q,0,a.work,{bits:9}),b=0;b<32;)a.lens[b++]=5;w(z,a.lens,0,32,r,0,a.work,{bits:5}),ta=!1}a.lencode=q,a.lenbits=9,a.distcode=r,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new s.Buf8(f.wsize)),d>=f.wsize?(s.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),s.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(s.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,r,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa=0,Ba=new s.Buf8(4),Ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return G;c=a.state,c.mode===W&&(c.mode=X),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xa=D;a:for(;;)switch(c.mode){case L:if(0===c.wrap){c.mode=X;break}for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0),m=0,n=0,c.mode=M;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=ma;break}if((15&m)!==K){a.msg="unknown compression method",c.mode=ma;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=ma;break}c.dmax=1<<wa,a.adler=c.check=1,c.mode=512&m?U:W,m=0,n=0;break;case M:for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==K){a.msg="unknown compression method",c.mode=ma;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=ma;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0,c.mode=N;case N:for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=u(c.check,Ba,4,0)),m=0,n=0,c.mode=O;case O:for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0,c.mode=P;case P:if(1024&c.flags){for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=Q;case Q:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),s.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=R;case R:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&q<i);if(512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=S;case S:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&q<i);if(512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=T;case T:if(512&c.flags){for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=ma;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=W;break;case U:for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=V;case V:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,F;a.adler=c.check=1,c.mode=W;case W:if(b===B||b===C)break a;case X:if(c.last){m>>>=7&n,n-=7&n,c.mode=ja;break}for(;n<3;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=Y;break;case 1:if(k(c),c.mode=ca,b===C){m>>>=2,n-=2;break a}break;case 2:c.mode=_;break;case 3:a.msg="invalid block type",c.mode=ma}m>>>=2,n-=2;break;case Y:for(m>>>=7&n,n-=7&n;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=ma;break}if(c.length=65535&m,m=0,n=0,c.mode=Z,b===C)break a;case Z:c.mode=$;case $:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;s.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=W;break;case _:for(;n<14;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=ma;break}c.have=0,c.mode=aa;case aa:for(;c.have<c.ncode;){for(;n<3;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Ca[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=w(x,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=ma;break}c.have=0,c.mode=ba;case ba:for(;c.have<c.nlen+c.ndist;){for(;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(sa<16)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=ma;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=ma;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===ma)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=ma;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=w(y,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=ma;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=w(z,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=ma;break}if(c.mode=ca,b===C)break a;case ca:c.mode=da;case da:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,v(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===W&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(ra&&0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.lencode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(ta+qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ia;break}if(32&ra){c.back=-1,c.mode=W;break}if(64&ra){a.msg="invalid literal/length code",c.mode=ma;break}c.extra=15&ra,c.mode=ea;case ea:if(c.extra){for(za=c.extra;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=fa;case fa:for(;Aa=c.distcode[m&(1<<c.distbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.distcode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(ta+qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=ma;break}c.offset=sa,c.extra=15&ra,c.mode=ga;case ga:if(c.extra){for(za=c.extra;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=ma;break}c.mode=ha;case ha:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=ma;break}q>c.wnext?(q-=c.wnext,r=c.wsize-q):r=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,r=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[r++];while(--q);0===c.length&&(c.mode=da);break;case ia:if(0===j)break a;f[h++]=c.length,j--,c.mode=da;break;case ja:if(c.wrap){for(;n<32;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?u(c.check,f,p,h-p):t(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=ma;break}m=0,n=0}c.mode=ka;case ka:if(c.wrap&&c.flags){for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=ma;break}m=0,n=0}c.mode=la;case la:xa=E;break a;case ma:xa=H;break a;case na:return I;case oa:default:return G}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<ma&&(c.mode<ja||b!==A))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=na,I):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?u(c.check,f,p,a.next_out-p):t(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===W?128:0)+(c.mode===ca||c.mode===Z?256:0),(0===o&&0===p||b===A)&&xa===D&&(xa=J),xa)}function n(a){if(!a||!a.state)return G;var b=a.state;return b.window&&(b.window=null),a.state=null,D}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?G:(c.head=b,b.done=!1,D)):G}function p(a,b){var c,d,e,f=b.length;return a&&a.state?(c=a.state,0!==c.wrap&&c.mode!==V?G:c.mode===V&&(d=1,d=t(d,b,f,0),d!==c.check)?H:(e=l(a,b,f,f))?(c.mode=na,I):(c.havedict=1,D)):G}var q,r,s=a("../utils/common"),t=a("./adler32"),u=a("./crc32"),v=a("./inffast"),w=a("./inftrees"),x=0,y=1,z=2,A=4,B=5,C=6,D=0,E=1,F=2,G=-2,H=-3,I=-4,J=-5,K=8,L=1,M=2,N=3,O=4,P=5,Q=6,R=7,S=8,T=9,U=10,V=11,W=12,X=13,Y=14,Z=15,$=16,_=17,aa=18,ba=19,ca=20,da=21,ea=22,fa=23,ga=24,ha=25,ia=26,ja=27,ka=28,la=29,ma=30,na=31,oa=32,pa=852,qa=592,ra=15,sa=ra,ta=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateSetDictionary=p,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":83,"./adler32":85,"./crc32":87,"./inffast":90,"./inftrees":92}],92:[function(a,b,c){"use strict";var d=a("../utils/common"),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;D<=e;D++)P[D]=0;for(E=0;E<o;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;F<G&&0===P[F];F++);for(H<F&&(H=F),K=1,D=1;D<=e;D++)if(K<<=1,K-=P[D],K<0)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;D<e;D++)Q[D+1]=Q[D]+P[D];for(E=0;E<o;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===i&&L>f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;I+J<G&&(K-=P[I+J],!(K<=0));)I++,K<<=1;if(L+=1<<I,a===i&&L>f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":83}],93:[function(a,b,c){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],94:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length}function f(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b}function g(a){return a<256?ia[a]:ia[256+(a>>>7)]}function h(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function i(a,b,c){a.bi_valid>X-c?(a.bi_buf|=b<<a.bi_valid&65535,h(a,a.bi_buf),a.bi_buf=b>>X-a.bi_valid,a.bi_valid+=c-X):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function j(a,b,c){i(a,c[2*b],c[2*b+1])}function k(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function l(a){16===a.bi_valid?(h(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function m(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;f<=W;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;c<V;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function n(a,b,c){var d,e,f=new Array(W+1),g=0;for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2*e]=k(f[h]++,h))}}function o(){var a,b,c,d,f,g=new Array(W+1);for(c=0,d=0;d<Q-1;d++)for(ka[d]=c,a=0;a<1<<ba[d];a++)ja[c++]=d;for(ja[c-1]=d,f=0,d=0;d<16;d++)for(la[d]=f,a=0;a<1<<ca[d];a++)ia[f++]=d;for(f>>=7;d<T;d++)for(la[d]=f<<7,a=0;a<1<<ca[d]-7;a++)ia[256+f++]=d;for(b=0;b<=W;b++)g[b]=0;for(a=0;a<=143;)ga[2*a+1]=8,a++,g[8]++;for(;a<=255;)ga[2*a+1]=9,a++,g[9]++;for(;a<=279;)ga[2*a+1]=7,a++,g[7]++;for(;a<=287;)ga[2*a+1]=8,a++,g[8]++;for(n(ga,S+1,g),a=0;a<T;a++)ha[2*a+1]=5,ha[2*a]=k(a,5);ma=new e(ga,ba,R+1,S,W),na=new e(ha,ca,0,T,W),oa=new e(new Array(0),da,0,U,Y)}function p(a){var b;for(b=0;b<S;b++)a.dyn_ltree[2*b]=0;for(b=0;b<T;b++)a.dyn_dtree[2*b]=0;for(b=0;b<U;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*Z]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function q(a){a.bi_valid>8?h(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function r(a,b,c,d){q(a),d&&(h(a,c),h(a,~c)),G.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function s(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function t(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&s(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!s(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function u(a,b,c){var d,e,f,h,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],e=a.pending_buf[a.l_buf+k],k++,0===d?j(a,e,b):(f=ja[e],j(a,f+R+1,b),h=ba[f],0!==h&&(e-=ka[f],i(a,e,h)),d--,f=g(d),j(a,f,c),h=ca[f],0!==h&&(d-=la[f],i(a,d,h)));while(k<a.last_lit);j(a,Z,b)}function v(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=V,c=0;c<i;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=j<2?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)t(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],t(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,t(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],m(a,b),n(f,j,a.bl_count)}function w(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;d<=c;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(h<j?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*$]++):h<=10?a.bl_tree[2*_]++:a.bl_tree[2*aa]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function x(a,b,c){var d,e,f=-1,g=b[1],h=0,k=7,l=4;for(0===g&&(k=138,l=3),d=0;d<=c;d++)if(e=g,g=b[2*(d+1)+1],!(++h<k&&e===g)){if(h<l){do j(a,e,a.bl_tree);while(0!==--h)}else 0!==e?(e!==f&&(j(a,e,a.bl_tree),h--),j(a,$,a.bl_tree),i(a,h-3,2)):h<=10?(j(a,_,a.bl_tree),i(a,h-3,3)):(j(a,aa,a.bl_tree),i(a,h-11,7));h=0,f=e,0===g?(k=138,l=3):e===g?(k=6,l=3):(k=7,l=4)}}function y(a){var b;for(w(a,a.dyn_ltree,a.l_desc.max_code),w(a,a.dyn_dtree,a.d_desc.max_code),v(a,a.bl_desc),b=U-1;b>=3&&0===a.bl_tree[2*ea[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function z(a,b,c,d){var e;for(i(a,b-257,5),i(a,c-1,5),i(a,d-4,4),e=0;e<d;e++)i(a,a.bl_tree[2*ea[e]+1],3);x(a,a.dyn_ltree,b-1),x(a,a.dyn_dtree,c-1)}function A(a){var b,c=4093624447;for(b=0;b<=31;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return I;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return J;for(b=32;b<R;b++)if(0!==a.dyn_ltree[2*b])return J;return I}function B(a){pa||(o(),pa=!0),a.l_desc=new f(a.dyn_ltree,ma),a.d_desc=new f(a.dyn_dtree,na),a.bl_desc=new f(a.bl_tree,oa),a.bi_buf=0,a.bi_valid=0,p(a)}function C(a,b,c,d){i(a,(L<<1)+(d?1:0),3),r(a,b,c,!0)}function D(a){i(a,M<<1,3),j(a,Z,ga),l(a)}function E(a,b,c,d){var e,f,g=0;a.level>0?(a.strm.data_type===K&&(a.strm.data_type=A(a)),v(a,a.l_desc),v(a,a.d_desc),g=y(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,f<=e&&(e=f)):e=f=c+5,c+4<=e&&b!==-1?C(a,b,c,d):a.strategy===H||f===e?(i(a,(M<<1)+(d?1:0),3),u(a,ga,ha)):(i(a,(N<<1)+(d?1:0),3),z(a,a.l_desc.max_code+1,a.d_desc.max_code+1,g+1),u(a,a.dyn_ltree,a.dyn_dtree)),p(a),d&&q(a)}function F(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ja[c]+R+1)]++,a.dyn_dtree[2*g(b)]++),a.last_lit===a.lit_bufsize-1}var G=a("../utils/common"),H=4,I=0,J=1,K=2,L=0,M=1,N=2,O=3,P=258,Q=29,R=256,S=R+1+Q,T=30,U=19,V=2*S+1,W=15,X=16,Y=7,Z=256,$=16,_=17,aa=18,ba=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ca=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],da=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ea=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fa=512,ga=new Array(2*(S+2));d(ga);var ha=new Array(2*T);d(ha);var ia=new Array(fa);d(ia);var ja=new Array(P-O+1);d(ja);var ka=new Array(Q);d(ka);var la=new Array(T);d(la);var ma,na,oa,pa=!1;c._tr_init=B,c._tr_stored_block=C,c._tr_flush_block=E, c._tr_tally=F,c._tr_align=D},{"../utils/common":83}],95:[function(a,b,c){"use strict";function d(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=d},{}]},{},[1]);
app/javascript/mastodon/features/direct_timeline/components/conversations_list.js
pinfort/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ConversationContainer from '../containers/conversation_container'; import ScrollableList from '../../../components/scrollable_list'; import { debounce } from 'lodash'; export default class ConversationsList extends ImmutablePureComponent { static propTypes = { conversations: ImmutablePropTypes.list.isRequired, scrollKey: PropTypes.string.isRequired, hasMore: PropTypes.bool, isLoading: PropTypes.bool, onLoadMore: PropTypes.func, shouldUpdateScroll: PropTypes.func, }; getCurrentIndex = id => this.props.conversations.findIndex(x => x.get('id') === id) handleMoveUp = id => { const elementIndex = this.getCurrentIndex(id) - 1; this._selectChild(elementIndex, true); } handleMoveDown = id => { const elementIndex = this.getCurrentIndex(id) + 1; this._selectChild(elementIndex, false); } _selectChild (index, align_top) { const container = this.node.node; const element = container.querySelector(`article:nth-of-type(${index + 1}) .focusable`); if (element) { if (align_top && container.scrollTop > element.offsetTop) { element.scrollIntoView(true); } else if (!align_top && container.scrollTop + container.clientHeight < element.offsetTop + element.offsetHeight) { element.scrollIntoView(false); } element.focus(); } } setRef = c => { this.node = c; } handleLoadOlder = debounce(() => { const last = this.props.conversations.last(); if (last && last.get('last_status')) { this.props.onLoadMore(last.get('last_status')); } }, 300, { leading: true }) render () { const { conversations, onLoadMore, ...other } = this.props; return ( <ScrollableList {...other} onLoadMore={onLoadMore && this.handleLoadOlder} ref={this.setRef}> {conversations.map(item => ( <ConversationContainer key={item.get('id')} conversationId={item.get('id')} onMoveUp={this.handleMoveUp} onMoveDown={this.handleMoveDown} scrollKey={this.props.scrollKey} /> ))} </ScrollableList> ); } }
src/renderers/dom/shared/__tests__/CSSPropertyOperations-test.js
negativetwelve/react
/** * 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. * * @emails react-core */ 'use strict'; var React = require('React'); describe('CSSPropertyOperations', function() { var CSSPropertyOperations; beforeEach(function() { require('mock-modules').dumpCache(); CSSPropertyOperations = require('CSSPropertyOperations'); }); it('should create markup for simple styles', function() { expect(CSSPropertyOperations.createMarkupForStyles({ backgroundColor: '#3b5998', display: 'none', })).toBe('background-color:#3b5998;display:none;'); }); it('should ignore undefined styles', function() { expect(CSSPropertyOperations.createMarkupForStyles({ backgroundColor: undefined, display: 'none', })).toBe('display:none;'); }); it('should ignore null styles', function() { expect(CSSPropertyOperations.createMarkupForStyles({ backgroundColor: null, display: 'none', })).toBe('display:none;'); }); it('should return null for no styles', function() { expect(CSSPropertyOperations.createMarkupForStyles({ backgroundColor: null, display: null, })).toBe(null); }); it('should automatically append `px` to relevant styles', function() { expect(CSSPropertyOperations.createMarkupForStyles({ left: 0, margin: 16, opacity: 0.5, padding: '4px', })).toBe('left:0;margin:16px;opacity:0.5;padding:4px;'); }); it('should trim values so `px` will be appended correctly', function() { expect(CSSPropertyOperations.createMarkupForStyles({ margin: '16 ', opacity: 0.5, padding: ' 4 ', })).toBe('margin:16px;opacity:0.5;padding:4px;'); }); it('should not append `px` to styles that might need a number', function() { var CSSProperty = require('CSSProperty'); var unitlessProperties = Object.keys(CSSProperty.isUnitlessNumber); unitlessProperties.forEach(function(property) { var styles = {}; styles[property] = 1; expect(CSSPropertyOperations.createMarkupForStyles(styles)) .toMatch(/:1;$/); }); }); it('should create vendor-prefixed markup correctly', function() { expect(CSSPropertyOperations.createMarkupForStyles({ msTransition: 'none', MozTransition: 'none', })).toBe('-ms-transition:none;-moz-transition:none;'); }); it('should set style attribute when styles exist', function() { var styles = { backgroundColor: '#000', display: 'none', }; var div = <div style={styles} />; var root = document.createElement('div'); div = React.render(div, root); expect(/style=".*"/.test(root.innerHTML)).toBe(true); }); it('should not set style attribute when no styles exist', function() { var styles = { backgroundColor: null, display: null, }; var div = <div style={styles} />; var root = document.createElement('div'); React.render(div, root); expect(/style=".*"/.test(root.innerHTML)).toBe(false); }); it('should warn when using hyphenated style names', function() { spyOn(console, 'error'); expect(CSSPropertyOperations.createMarkupForStyles({ 'background-color': 'crimson', })).toBe('background-color:crimson;'); expect(console.error.argsForCall.length).toBe(1); expect(console.error.argsForCall[0][0]).toContain('backgroundColor'); }); it('should warn when updating hyphenated style names', function() { spyOn(console, 'error'); var root = document.createElement('div'); var styles = { '-ms-transform': 'translate3d(0, 0, 0)', '-webkit-transform': 'translate3d(0, 0, 0)', }; React.render(<div />, root); React.render(<div style={styles} />, root); expect(console.error.argsForCall.length).toBe(2); expect(console.error.argsForCall[0][0]).toContain('msTransform'); expect(console.error.argsForCall[1][0]).toContain('WebkitTransform'); }); it('warns when miscapitalizing vendored style names', function() { spyOn(console, 'error'); CSSPropertyOperations.createMarkupForStyles({ msTransform: 'translate3d(0, 0, 0)', oTransform: 'translate3d(0, 0, 0)', webkitTransform: 'translate3d(0, 0, 0)', }); // msTransform is correct already and shouldn't warn expect(console.error.argsForCall.length).toBe(2); expect(console.error.argsForCall[0][0]).toContain('oTransform'); expect(console.error.argsForCall[0][0]).toContain('OTransform'); expect(console.error.argsForCall[1][0]).toContain('webkitTransform'); expect(console.error.argsForCall[1][0]).toContain('WebkitTransform'); }); it('should warn about style having a trailing semicolon', function() { spyOn(console, 'error'); CSSPropertyOperations.createMarkupForStyles({ fontFamily: 'Helvetica, arial', backgroundImage: 'url(foo;bar)', backgroundColor: 'blue;', color: 'red; ', }); expect(console.error.calls.length).toBe(2); expect(console.error.argsForCall[0][0]).toContain('Try "backgroundColor: blue" instead'); expect(console.error.argsForCall[1][0]).toContain('Try "color: red" instead'); }); });
packages/react-codemod/test/pure-render-mixin-test2.output.js
ridixcr/react
var React = require('react/addons'); var MyComponent = React.createClass({ shouldComponentUpdate: function(nextProps, nextState) { return React.addons.shallowCompare(this, nextProps, nextState); }, render: function() { return <div />; } }); module.exports = MyComponent;
src/renderers/shared/reconciler/__tests__/refs-destruction-test.js
mingyaaaa/react
/** * 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. * * @emails react-core */ 'use strict'; var React; var ReactTestUtils; var TestComponent; describe('refs-destruction', function() { beforeEach(function() { require('mock-modules').dumpCache(); React = require('React'); ReactTestUtils = require('ReactTestUtils'); TestComponent = React.createClass({ render: function() { return ( <div> {this.props.destroy ? null : <div ref="theInnerDiv"> Lets try to destroy this. </div> } </div> ); }, }); }); it('should remove refs when destroying the parent', function() { var container = document.createElement('div'); var testInstance = React.render(<TestComponent />, container); expect(ReactTestUtils.isDOMComponent(testInstance.refs.theInnerDiv)) .toBe(true); expect(Object.keys(testInstance.refs || {}).length).toEqual(1); React.unmountComponentAtNode(container); expect(Object.keys(testInstance.refs || {}).length).toEqual(0); }); it('should remove refs when destroying the child', function() { var container = document.createElement('div'); var testInstance = React.render(<TestComponent />, container); expect(ReactTestUtils.isDOMComponent(testInstance.refs.theInnerDiv)) .toBe(true); expect(Object.keys(testInstance.refs || {}).length).toEqual(1); React.render(<TestComponent destroy={true} />, container); expect(Object.keys(testInstance.refs || {}).length).toEqual(0); }); });
templates/rubix/rubix-bootstrap/src/Progress.js
jeffthemaximum/Teachers-Dont-Pay-Jeff
import React from 'react'; import classNames from 'classnames'; import ProgressBar from './BProgressBar'; ProgressBar.propTypes.children = React.PropTypes.arrayOf(React.PropTypes.element); export default class Progress extends React.Component { static propTypes = { value: React.PropTypes.number, success: React.PropTypes.bool, info: React.PropTypes.bool, warning: React.PropTypes.bool, danger: React.PropTypes.bool, color: React.PropTypes.string, fgColor: React.PropTypes.string, collapseBottom: React.PropTypes.bool, }; get value() { return this.props.value || this.props.now; } get min() { return this.props.min; } get max() { return this.props.max; } getValue() { console.warn("Progress.getValue() is deprecated in favor of Progress.value"); return this.value; } getMin() { console.warn("Progress.getMin() is deprecated in favor of Progress.min"); return this.min; } getMax() { console.warn("Progress.getMax() is deprecated in favor of Progress.max"); return this.max; } render() { let props = { ...this.props }; if (props.value) { props.now = props.value; delete props.value; } if (props.success) { props.bsStyle = 'success'; } if (props.info) { props.bsStyle = 'info'; } if (props.warning) { props.bsStyle = 'warning'; } if (props.danger) { props.bsStyle = 'danger'; } if (props.fgColor) { props.style = { ...props.style, color: props.fgColor }; } if (props.collapseBottom) { props.className = classNames(props.className, 'progress-collapse-bottom'); } return <ProgressBar {...props} />; } }
ajax/libs/analytics.js/1.3.6/analytics.js
joeyparrish/cdnjs
;(function(){ /** * Require the given path. * * @param {String} path * @return {Object} exports * @api public */ function require(path, parent, orig) { var resolved = require.resolve(path); // lookup failed if (null == resolved) { orig = orig || path; parent = parent || 'root'; var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); err.path = orig; err.parent = parent; err.require = true; throw err; } var module = require.modules[resolved]; // perform real require() // by invoking the module's // registered function if (!module._resolving && !module.exports) { var mod = {}; mod.exports = {}; mod.client = mod.component = true; module._resolving = true; module.call(this, mod.exports, require.relative(resolved), mod); delete module._resolving; module.exports = mod.exports; } return module.exports; } /** * Registered modules. */ require.modules = {}; /** * Registered aliases. */ require.aliases = {}; /** * Resolve `path`. * * Lookup: * * - PATH/index.js * - PATH.js * - PATH * * @param {String} path * @return {String} path or null * @api private */ require.resolve = function(path) { if (path.charAt(0) === '/') path = path.slice(1); var paths = [ path, path + '.js', path + '.json', path + '/index.js', path + '/index.json' ]; for (var i = 0; i < paths.length; i++) { var path = paths[i]; if (require.modules.hasOwnProperty(path)) return path; if (require.aliases.hasOwnProperty(path)) return require.aliases[path]; } }; /** * Normalize `path` relative to the current path. * * @param {String} curr * @param {String} path * @return {String} * @api private */ require.normalize = function(curr, path) { var segs = []; if ('.' != path.charAt(0)) return path; curr = curr.split('/'); path = path.split('/'); for (var i = 0; i < path.length; ++i) { if ('..' == path[i]) { curr.pop(); } else if ('.' != path[i] && '' != path[i]) { segs.push(path[i]); } } return curr.concat(segs).join('/'); }; /** * Register module at `path` with callback `definition`. * * @param {String} path * @param {Function} definition * @api private */ require.register = function(path, definition) { require.modules[path] = definition; }; /** * Alias a module definition. * * @param {String} from * @param {String} to * @api private */ require.alias = function(from, to) { if (!require.modules.hasOwnProperty(from)) { throw new Error('Failed to alias "' + from + '", it does not exist'); } require.aliases[to] = from; }; /** * Return a require function relative to the `parent` path. * * @param {String} parent * @return {Function} * @api private */ require.relative = function(parent) { var p = require.normalize(parent, '..'); /** * lastIndexOf helper. */ function lastIndexOf(arr, obj) { var i = arr.length; while (i--) { if (arr[i] === obj) return i; } return -1; } /** * The relative require() itself. */ function localRequire(path) { var resolved = localRequire.resolve(path); return require(resolved, parent, path); } /** * Resolve relative to the parent. */ localRequire.resolve = function(path) { var c = path.charAt(0); if ('/' == c) return path.slice(1); if ('.' == c) return require.normalize(p, path); // resolve deps by returning // the dep in the nearest "deps" // directory var segs = parent.split('/'); var i = lastIndexOf(segs, 'deps') + 1; if (!i) i = 0; path = segs.slice(0, i + 1).join('/') + '/deps/' + path; return path; }; /** * Check if module is defined at `path`. */ localRequire.exists = function(path) { return require.modules.hasOwnProperty(localRequire.resolve(path)); }; return localRequire; }; require.register("avetisk-defaults/index.js", function(exports, require, module){ 'use strict'; /** * Merge default values. * * @param {Object} dest * @param {Object} defaults * @return {Object} * @api public */ var defaults = function (dest, src, recursive) { for (var prop in src) { if (recursive && dest[prop] instanceof Object && src[prop] instanceof Object) { dest[prop] = defaults(dest[prop], src[prop], true); } else if (! (prop in dest)) { dest[prop] = src[prop]; } } return dest; }; /** * Expose `defaults`. */ module.exports = defaults; }); require.register("component-type/index.js", function(exports, require, module){ /** * toString ref. */ var toString = Object.prototype.toString; /** * Return the type of `val`. * * @param {Mixed} val * @return {String} * @api public */ module.exports = function(val){ switch (toString.call(val)) { case '[object Function]': return 'function'; case '[object Date]': return 'date'; case '[object RegExp]': return 'regexp'; case '[object Arguments]': return 'arguments'; case '[object Array]': return 'array'; case '[object String]': return 'string'; } if (val === null) return 'null'; if (val === undefined) return 'undefined'; if (val && val.nodeType === 1) return 'element'; if (val === Object(val)) return 'object'; return typeof val; }; }); require.register("component-clone/index.js", function(exports, require, module){ /** * Module dependencies. */ var type; try { type = require('type'); } catch(e){ type = require('type-component'); } /** * Module exports. */ module.exports = clone; /** * Clones objects. * * @param {Mixed} any object * @api public */ function clone(obj){ switch (type(obj)) { case 'object': var copy = {}; for (var key in obj) { if (obj.hasOwnProperty(key)) { copy[key] = clone(obj[key]); } } return copy; case 'array': var copy = new Array(obj.length); for (var i = 0, l = obj.length; i < l; i++) { copy[i] = clone(obj[i]); } return copy; case 'regexp': // from millermedeiros/amd-utils - MIT var flags = ''; flags += obj.multiline ? 'm' : ''; flags += obj.global ? 'g' : ''; flags += obj.ignoreCase ? 'i' : ''; return new RegExp(obj.source, flags); case 'date': return new Date(obj.getTime()); default: // string, number, boolean, … return obj; } } }); require.register("component-cookie/index.js", function(exports, require, module){ /** * Encode. */ var encode = encodeURIComponent; /** * Decode. */ var decode = decodeURIComponent; /** * Set or get cookie `name` with `value` and `options` object. * * @param {String} name * @param {String} value * @param {Object} options * @return {Mixed} * @api public */ module.exports = function(name, value, options){ switch (arguments.length) { case 3: case 2: return set(name, value, options); case 1: return get(name); default: return all(); } }; /** * Set cookie `name` to `value`. * * @param {String} name * @param {String} value * @param {Object} options * @api private */ function set(name, value, options) { options = options || {}; var str = encode(name) + '=' + encode(value); if (null == value) options.maxage = -1; if (options.maxage) { options.expires = new Date(+new Date + options.maxage); } if (options.path) str += '; path=' + options.path; if (options.domain) str += '; domain=' + options.domain; if (options.expires) str += '; expires=' + options.expires.toGMTString(); if (options.secure) str += '; secure'; document.cookie = str; } /** * Return all cookies. * * @return {Object} * @api private */ function all() { return parse(document.cookie); } /** * Get cookie `name`. * * @param {String} name * @return {String} * @api private */ function get(name) { return all()[name]; } /** * Parse cookie `str`. * * @param {String} str * @return {Object} * @api private */ function parse(str) { var obj = {}; var pairs = str.split(/ *; */); var pair; if ('' == pairs[0]) return obj; for (var i = 0; i < pairs.length; ++i) { pair = pairs[i].split('='); obj[decode(pair[0])] = decode(pair[1]); } return obj; } }); require.register("component-each/index.js", function(exports, require, module){ /** * Module dependencies. */ var type = require('type'); /** * HOP reference. */ var has = Object.prototype.hasOwnProperty; /** * Iterate the given `obj` and invoke `fn(val, i)`. * * @param {String|Array|Object} obj * @param {Function} fn * @api public */ module.exports = function(obj, fn){ switch (type(obj)) { case 'array': return array(obj, fn); case 'object': if ('number' == typeof obj.length) return array(obj, fn); return object(obj, fn); case 'string': return string(obj, fn); } }; /** * Iterate string chars. * * @param {String} obj * @param {Function} fn * @api private */ function string(obj, fn) { for (var i = 0; i < obj.length; ++i) { fn(obj.charAt(i), i); } } /** * Iterate object keys. * * @param {Object} obj * @param {Function} fn * @api private */ function object(obj, fn) { for (var key in obj) { if (has.call(obj, key)) { fn(key, obj[key]); } } } /** * Iterate array-ish. * * @param {Array|Object} obj * @param {Function} fn * @api private */ function array(obj, fn) { for (var i = 0; i < obj.length; ++i) { fn(obj[i], i); } } }); require.register("component-indexof/index.js", function(exports, require, module){ module.exports = function(arr, obj){ if (arr.indexOf) return arr.indexOf(obj); for (var i = 0; i < arr.length; ++i) { if (arr[i] === obj) return i; } return -1; }; }); require.register("component-emitter/index.js", function(exports, require, module){ /** * Module dependencies. */ var index = require('indexof'); /** * 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); } fn._off = on; 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 i = index(callbacks, fn._off || fn); if (~i) callbacks.splice(i, 1); 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; }; }); require.register("component-event/index.js", function(exports, require, module){ /** * Bind `el` event `type` to `fn`. * * @param {Element} el * @param {String} type * @param {Function} fn * @param {Boolean} capture * @return {Function} * @api public */ exports.bind = function(el, type, fn, capture){ if (el.addEventListener) { el.addEventListener(type, fn, capture || false); } else { el.attachEvent('on' + type, fn); } return fn; }; /** * Unbind `el` event `type`'s callback `fn`. * * @param {Element} el * @param {String} type * @param {Function} fn * @param {Boolean} capture * @return {Function} * @api public */ exports.unbind = function(el, type, fn, capture){ if (el.removeEventListener) { el.removeEventListener(type, fn, capture || false); } else { el.detachEvent('on' + type, fn); } return fn; }; }); require.register("component-inherit/index.js", function(exports, require, module){ module.exports = function(a, b){ var fn = function(){}; fn.prototype = b.prototype; a.prototype = new fn; a.prototype.constructor = a; }; }); require.register("component-object/index.js", function(exports, require, module){ /** * HOP ref. */ var has = Object.prototype.hasOwnProperty; /** * Return own keys in `obj`. * * @param {Object} obj * @return {Array} * @api public */ exports.keys = Object.keys || function(obj){ var keys = []; for (var key in obj) { if (has.call(obj, key)) { keys.push(key); } } return keys; }; /** * Return own values in `obj`. * * @param {Object} obj * @return {Array} * @api public */ exports.values = function(obj){ var vals = []; for (var key in obj) { if (has.call(obj, key)) { vals.push(obj[key]); } } return vals; }; /** * Merge `b` into `a`. * * @param {Object} a * @param {Object} b * @return {Object} a * @api public */ exports.merge = function(a, b){ for (var key in b) { if (has.call(b, key)) { a[key] = b[key]; } } return a; }; /** * Return length of `obj`. * * @param {Object} obj * @return {Number} * @api public */ exports.length = function(obj){ return exports.keys(obj).length; }; /** * Check if `obj` is empty. * * @param {Object} obj * @return {Boolean} * @api public */ exports.isEmpty = function(obj){ return 0 == exports.length(obj); }; }); require.register("component-trim/index.js", function(exports, require, module){ exports = module.exports = trim; function trim(str){ if (str.trim) return str.trim(); return str.replace(/^\s*|\s*$/g, ''); } exports.left = function(str){ if (str.trimLeft) return str.trimLeft(); return str.replace(/^\s*/, ''); }; exports.right = function(str){ if (str.trimRight) return str.trimRight(); return str.replace(/\s*$/, ''); }; }); require.register("component-querystring/index.js", function(exports, require, module){ /** * Module dependencies. */ var trim = require('trim'); /** * Parse the given query `str`. * * @param {String} str * @return {Object} * @api public */ exports.parse = function(str){ if ('string' != typeof str) return {}; str = trim(str); if ('' == str) return {}; var obj = {}; var pairs = str.split('&'); for (var i = 0; i < pairs.length; i++) { var parts = pairs[i].split('='); obj[parts[0]] = null == parts[1] ? '' : decodeURIComponent(parts[1]); } return obj; }; /** * Stringify the given `obj`. * * @param {Object} obj * @return {String} * @api public */ exports.stringify = function(obj){ if (!obj) return ''; var pairs = []; for (var key in obj) { pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key])); } return pairs.join('&'); }; }); require.register("component-url/index.js", function(exports, require, module){ /** * Parse the given `url`. * * @param {String} str * @return {Object} * @api public */ exports.parse = function(url){ var a = document.createElement('a'); a.href = url; return { href: a.href, host: a.host, port: a.port, hash: a.hash, hostname: a.hostname, pathname: a.pathname, protocol: a.protocol, search: a.search, query: a.search.slice(1) } }; /** * Check if `url` is absolute. * * @param {String} url * @return {Boolean} * @api public */ exports.isAbsolute = function(url){ if (0 == url.indexOf('//')) return true; if (~url.indexOf('://')) return true; return false; }; /** * Check if `url` is relative. * * @param {String} url * @return {Boolean} * @api public */ exports.isRelative = function(url){ return ! exports.isAbsolute(url); }; /** * Check if `url` is cross domain. * * @param {String} url * @return {Boolean} * @api public */ exports.isCrossDomain = function(url){ url = exports.parse(url); return url.hostname != location.hostname || url.port != location.port || url.protocol != location.protocol; }; }); require.register("component-bind/index.js", function(exports, require, module){ /** * Slice reference. */ var slice = [].slice; /** * Bind `obj` to `fn`. * * @param {Object} obj * @param {Function|String} fn or string * @return {Function} * @api public */ module.exports = function(obj, fn){ if ('string' == typeof fn) fn = obj[fn]; if ('function' != typeof fn) throw new Error('bind() requires a function'); var args = slice.call(arguments, 2); return function(){ return fn.apply(obj, args.concat(slice.call(arguments))); } }; }); require.register("segmentio-bind-all/index.js", function(exports, require, module){ try { var bind = require('bind'); var type = require('type'); } catch (e) { var bind = require('bind-component'); var type = require('type-component'); } module.exports = function (obj) { for (var key in obj) { var val = obj[key]; if (type(val) === 'function') obj[key] = bind(obj, obj[key]); } return obj; }; }); require.register("ianstormtaylor-bind/index.js", function(exports, require, module){ try { var bind = require('bind'); } catch (e) { var bind = require('bind-component'); } var bindAll = require('bind-all'); /** * Expose `bind`. */ module.exports = exports = bind; /** * Expose `bindAll`. */ exports.all = bindAll; /** * Expose `bindMethods`. */ exports.methods = bindMethods; /** * Bind `methods` on `obj` to always be called with the `obj` as context. * * @param {Object} obj * @param {String} methods... */ function bindMethods (obj, methods) { methods = [].slice.call(arguments, 1); for (var i = 0, method; method = methods[i]; i++) { obj[method] = bind(obj, obj[method]); } return obj; } }); require.register("timoxley-next-tick/index.js", function(exports, require, module){ "use strict" if (typeof setImmediate == 'function') { module.exports = function(f){ setImmediate(f) } } // legacy node.js else if (typeof process != 'undefined' && typeof process.nextTick == 'function') { module.exports = process.nextTick } // fallback for other environments / postMessage behaves badly on IE8 else if (typeof window == 'undefined' || window.ActiveXObject || !window.postMessage) { module.exports = function(f){ setTimeout(f) }; } else { var q = []; window.addEventListener('message', function(){ var i = 0; while (i < q.length) { try { q[i++](); } catch (e) { q = q.slice(i); window.postMessage('tic!', '*'); throw e; } } q.length = 0; }, true); module.exports = function(fn){ if (!q.length) window.postMessage('tic!', '*'); q.push(fn); } } }); require.register("ianstormtaylor-callback/index.js", function(exports, require, module){ var next = require('next-tick'); /** * Expose `callback`. */ module.exports = callback; /** * Call an `fn` back synchronously if it exists. * * @param {Function} fn */ function callback (fn) { if ('function' === typeof fn) fn(); } /** * Call an `fn` back asynchronously if it exists. If `wait` is ommitted, the * `fn` will be called on next tick. * * @param {Function} fn * @param {Number} wait (optional) */ callback.async = function (fn, wait) { if ('function' !== typeof fn) return; if (!wait) return next(fn); setTimeout(fn, wait); }; /** * Symmetry. */ callback.sync = callback; }); require.register("ianstormtaylor-is-empty/index.js", function(exports, require, module){ /** * Expose `isEmpty`. */ module.exports = isEmpty; /** * Has. */ var has = Object.prototype.hasOwnProperty; /** * Test whether a value is "empty". * * @param {Mixed} val * @return {Boolean} */ function isEmpty (val) { if (null == val) return true; if ('number' == typeof val) return 0 === val; if (undefined !== val.length) return 0 === val.length; for (var key in val) if (has.call(val, key)) return false; return true; } }); require.register("ianstormtaylor-is/index.js", function(exports, require, module){ var isEmpty = require('is-empty'); try { var typeOf = require('type'); } catch (e) { var typeOf = require('component-type'); } /** * Types. */ var types = [ 'arguments', 'array', 'boolean', 'date', 'element', 'function', 'null', 'number', 'object', 'regexp', 'string', 'undefined' ]; /** * Expose type checkers. * * @param {Mixed} value * @return {Boolean} */ for (var i = 0, type; type = types[i]; i++) exports[type] = generate(type); /** * Add alias for `function` for old browsers. */ exports.fn = exports['function']; /** * Expose `empty` check. */ exports.empty = isEmpty; /** * Expose `nan` check. */ exports.nan = function (val) { return exports.number(val) && val != val; }; /** * Generate a type checker. * * @param {String} type * @return {Function} */ function generate (type) { return function (value) { return type === typeOf(value); }; } }); require.register("segmentio-after/index.js", function(exports, require, module){ module.exports = function after (times, func) { // After 0, really? if (times <= 0) return func(); // That's more like it. return function() { if (--times < 1) { return func.apply(this, arguments); } }; }; }); require.register("yields-slug/index.js", function(exports, require, module){ /** * Generate a slug from the given `str`. * * example: * * generate('foo bar'); * // > foo-bar * * @param {String} str * @param {Object} options * @config {String|RegExp} [replace] characters to replace, defaulted to `/[^a-z0-9]/g` * @config {String} [separator] separator to insert, defaulted to `-` * @return {String} */ module.exports = function (str, options) { options || (options = {}); return str.toLowerCase() .replace(options.replace || /[^a-z0-9]/g, ' ') .replace(/^ +| +$/g, '') .replace(/ +/g, options.separator || '-') }; }); require.register("segmentio-analytics.js-integration/lib/index.js", function(exports, require, module){ var bind = require('bind'); var callback = require('callback'); var clone = require('clone'); var debug = require('debug'); var defaults = require('defaults'); var protos = require('./protos'); var slug = require('slug'); var statics = require('./statics'); /** * Expose `createIntegration`. */ module.exports = createIntegration; /** * Create a new Integration constructor. * * @param {String} name */ function createIntegration (name) { /** * Initialize a new `Integration`. * * @param {Object} options */ function Integration (options) { this.debug = debug('analytics:integration:' + slug(name)); this.options = defaults(clone(options) || {}, this.defaults); this._queue = []; this.once('ready', bind(this, this.flush)); Integration.emit('construct', this); this._wrapInitialize(); this._wrapLoad(); this._wrapPage(); this._wrapTrack(); } Integration.prototype.defaults = {}; Integration.prototype.globals = []; Integration.prototype.name = name; for (var key in statics) Integration[key] = statics[key]; for (var key in protos) Integration.prototype[key] = protos[key]; return Integration; } }); require.register("segmentio-analytics.js-integration/lib/protos.js", function(exports, require, module){ var after = require('after'); var callback = require('callback'); var Emitter = require('emitter'); var tick = require('next-tick'); var events = require('./events'); /** * Mixin emitter. */ Emitter(exports); /** * Initialize. */ exports.initialize = function () { this.load(); }; /** * Loaded? * * @return {Boolean} * @api private */ exports.loaded = function () { return false; }; /** * Load. * * @param {Function} cb */ exports.load = function (cb) { callback.async(cb); }; /** * Page. * * @param {Page} page */ exports.page = function(page){}; /** * Track. * * @param {Track} track */ exports.track = function(track){}; /** * Invoke a `method` that may or may not exist on the prototype with `args`, * queueing or not depending on whether the integration is "ready". Don't * trust the method call, since it contains integration party code. * * @param {String} method * @param {Mixed} args... * @api private */ exports.invoke = function (method) { if (!this[method]) return; var args = [].slice.call(arguments, 1); if (!this._ready) return this.queue(method, args); try { this.debug('%s with %o', method, args); this[method].apply(this, args); } catch (e) { this.debug('error %o calling %s with %o', e, method, args); } }; /** * Queue a `method` with `args`. If the integration assumes an initial * pageview, then let the first call to `page` pass through. * * @param {String} method * @param {Array} args * @api private */ exports.queue = function (method, args) { if ('page' == method && this._assumesPageview && !this._initialized) { return this.page.apply(this, args); } this._queue.push({ method: method, args: args }); }; /** * Flush the internal queue. * * @api private */ exports.flush = function () { this._ready = true; var call; while (call = this._queue.shift()) this[call.method].apply(this, call.args); }; /** * Reset the integration, removing its global variables. * * @api private */ exports.reset = function () { for (var i = 0, key; key = this.globals[i]; i++) window[key] = undefined; }; /** * Wrap the initialize method in an exists check, so we don't have to do it for * every single integration. * * @api private */ exports._wrapInitialize = function () { var initialize = this.initialize; this.initialize = function () { this.debug('initialize'); this._initialized = true; initialize.apply(this, arguments); this.emit('initialize'); var self = this; if (this._readyOnInitialize) { tick(function () { self.emit('ready'); }); } }; if (this._assumesPageview) this.initialize = after(2, this.initialize); }; /** * Wrap the load method in `debug` calls, so every integration gets them * automatically. * * @api private */ exports._wrapLoad = function () { var load = this.load; this.load = function (callback) { var self = this; this.debug('loading'); if (this.loaded()) { this.debug('already loaded'); tick(function () { if (self._readyOnLoad) self.emit('ready'); callback && callback(); }); return; } load.call(this, function (err, e) { self.debug('loaded'); self.emit('load'); if (self._readyOnLoad) self.emit('ready'); callback && callback(err, e); }); }; }; /** * Wrap the page method to call `initialize` instead if the integration assumes * a pageview. * * @api private */ exports._wrapPage = function () { var page = this.page; this.page = function () { if (this._assumesPageview && !this._initialized) { return this.initialize({ category: arguments[0], name: arguments[1], properties: arguments[2], options: arguments[3] }); } page.apply(this, arguments); }; }; /** * Wrap the track method to call other ecommerce methods if * available depending on the `track.event()`. * * @api private */ exports._wrapTrack = function(){ var t = this.track; this.track = function(track){ var event = track.event(); var called; for (var method in events) { var regexp = events[method]; if (!this[method]) continue; if (!regexp.test(event)) continue; this[method].apply(this, arguments); called = true; break; } if (!called) t.apply(this, arguments); }; }; }); require.register("segmentio-analytics.js-integration/lib/events.js", function(exports, require, module){ /** * Expose `events` */ module.exports = { removedProduct: /removed product/i, viewedProduct: /viewed product/i, addedProduct: /added product/i, completedOrder: /completed order/i }; }); require.register("segmentio-analytics.js-integration/lib/statics.js", function(exports, require, module){ var after = require('after'); var Emitter = require('emitter'); /** * Mixin emitter. */ Emitter(exports); /** * Add a new option to the integration by `key` with default `value`. * * @param {String} key * @param {Mixed} value * @return {Integration} */ exports.option = function (key, value) { this.prototype.defaults[key] = value; return this; }; /** * Register a new global variable `key` owned by the integration, which will be * used to test whether the integration is already on the page. * * @param {String} global * @return {Integration} */ exports.global = function (key) { this.prototype.globals.push(key); return this; }; /** * Mark the integration as assuming an initial pageview, so to defer loading * the script until the first `page` call, noop the first `initialize`. * * @return {Integration} */ exports.assumesPageview = function () { this.prototype._assumesPageview = true; return this; }; /** * Mark the integration as being "ready" once `load` is called. * * @return {Integration} */ exports.readyOnLoad = function () { this.prototype._readyOnLoad = true; return this; }; /** * Mark the integration as being "ready" once `load` is called. * * @return {Integration} */ exports.readyOnInitialize = function () { this.prototype._readyOnInitialize = true; return this; }; }); require.register("component-domify/index.js", function(exports, require, module){ /** * Expose `parse`. */ module.exports = parse; /** * Wrap map from jquery. */ var map = { legend: [1, '<fieldset>', '</fieldset>'], tr: [2, '<table><tbody>', '</tbody></table>'], col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], _default: [0, '', ''] }; map.td = map.th = [3, '<table><tbody><tr>', '</tr></tbody></table>']; map.option = map.optgroup = [1, '<select multiple="multiple">', '</select>']; map.thead = map.tbody = map.colgroup = map.caption = map.tfoot = [1, '<table>', '</table>']; map.text = map.circle = map.ellipse = map.line = map.path = map.polygon = map.polyline = map.rect = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>']; /** * Parse `html` and return the children. * * @param {String} html * @return {Array} * @api private */ function parse(html) { if ('string' != typeof html) throw new TypeError('String expected'); html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace // tag name var m = /<([\w:]+)/.exec(html); if (!m) return document.createTextNode(html); var tag = m[1]; // body support if (tag == 'body') { var el = document.createElement('html'); el.innerHTML = html; return el.removeChild(el.lastChild); } // wrap map var wrap = map[tag] || map._default; var depth = wrap[0]; var prefix = wrap[1]; var suffix = wrap[2]; var el = document.createElement('div'); el.innerHTML = prefix + html + suffix; while (depth--) el = el.lastChild; // one element if (el.firstChild == el.lastChild) { return el.removeChild(el.firstChild); } // several elements var fragment = document.createDocumentFragment(); while (el.firstChild) { fragment.appendChild(el.removeChild(el.firstChild)); } return fragment; } }); require.register("component-once/index.js", function(exports, require, module){ /** * Identifier. */ var n = 0; /** * Global. */ var global = (function(){ return this })(); /** * Make `fn` callable only once. * * @param {Function} fn * @return {Function} * @api public */ module.exports = function(fn) { var id = n++; function once(){ // no receiver if (this == global) { if (once.called) return; once.called = true; return fn.apply(this, arguments); } // receiver var key = '__called_' + id + '__'; if (this[key]) return; this[key] = true; return fn.apply(this, arguments); } return once; }; }); require.register("segmentio-alias/index.js", function(exports, require, module){ var type = require('type'); try { var clone = require('clone'); } catch (e) { var clone = require('clone-component'); } /** * Expose `alias`. */ module.exports = alias; /** * Alias an `object`. * * @param {Object} obj * @param {Mixed} method */ function alias (obj, method) { switch (type(method)) { case 'object': return aliasByDictionary(clone(obj), method); case 'function': return aliasByFunction(clone(obj), method); } } /** * Convert the keys in an `obj` using a dictionary of `aliases`. * * @param {Object} obj * @param {Object} aliases */ function aliasByDictionary (obj, aliases) { for (var key in aliases) { if (undefined === obj[key]) continue; obj[aliases[key]] = obj[key]; delete obj[key]; } return obj; } /** * Convert the keys in an `obj` using a `convert` function. * * @param {Object} obj * @param {Function} convert */ function aliasByFunction (obj, convert) { // have to create another object so that ie8 won't infinite loop on keys var output = {}; for (var key in obj) output[convert(key)] = obj[key]; return output; } }); require.register("segmentio-convert-dates/index.js", function(exports, require, module){ var is = require('is'); try { var clone = require('clone'); } catch (e) { var clone = require('clone-component'); } /** * Expose `convertDates`. */ module.exports = convertDates; /** * Recursively convert an `obj`'s dates to new values. * * @param {Object} obj * @param {Function} convert * @return {Object} */ function convertDates (obj, convert) { obj = clone(obj); for (var key in obj) { var val = obj[key]; if (is.date(val)) obj[key] = convert(val); if (is.object(val)) obj[key] = convertDates(val, convert); } return obj; } }); require.register("segmentio-global-queue/index.js", function(exports, require, module){ /** * Expose `generate`. */ module.exports = generate; /** * Generate a global queue pushing method with `name`. * * @param {String} name * @param {Object} options * @property {Boolean} wrap * @return {Function} */ function generate (name, options) { options = options || {}; return function (args) { args = [].slice.call(arguments); window[name] || (window[name] = []); options.wrap === false ? window[name].push.apply(window[name], args) : window[name].push(args); }; } }); require.register("segmentio-load-date/index.js", function(exports, require, module){ /* * Load date. * * For reference: http://www.html5rocks.com/en/tutorials/webperformance/basics/ */ var time = new Date() , perf = window.performance; if (perf && perf.timing && perf.timing.responseEnd) { time = new Date(perf.timing.responseEnd); } module.exports = time; }); require.register("segmentio-load-script/index.js", function(exports, require, module){ var type = require('type'); module.exports = function loadScript (options, callback) { if (!options) throw new Error('Cant load nothing...'); // Allow for the simplest case, just passing a `src` string. if (type(options) === 'string') options = { src : options }; var https = document.location.protocol === 'https:' || document.location.protocol === 'chrome-extension:'; // If you use protocol relative URLs, third-party scripts like Google // Analytics break when testing with `file:` so this fixes that. if (options.src && options.src.indexOf('//') === 0) { options.src = https ? 'https:' + options.src : 'http:' + options.src; } // Allow them to pass in different URLs depending on the protocol. if (https && options.https) options.src = options.https; else if (!https && options.http) options.src = options.http; // Make the `<script>` element and insert it before the first script on the // page, which is guaranteed to exist since this Javascript is running. var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true; script.src = options.src; var firstScript = document.getElementsByTagName('script')[0]; firstScript.parentNode.insertBefore(script, firstScript); // If we have a callback, attach event handlers, even in IE. Based off of // the Third-Party Javascript script loading example: // https://github.com/thirdpartyjs/thirdpartyjs-code/blob/master/examples/templates/02/loading-files/index.html if (callback && type(callback) === 'function') { if (script.addEventListener) { script.addEventListener('load', function (event) { callback(null, event); }, false); script.addEventListener('error', function (event) { callback(new Error('Failed to load the script.'), event); }, false); } else if (script.attachEvent) { script.attachEvent('onreadystatechange', function (event) { if (/complete|loaded/.test(script.readyState)) { callback(null, event); } }); } } // Return the script element in case they want to do anything special, like // give it an ID or attributes. return script; }; }); require.register("segmentio-on-body/index.js", function(exports, require, module){ var each = require('each'); /** * Cache whether `<body>` exists. */ var body = false; /** * Callbacks to call when the body exists. */ var callbacks = []; /** * Export a way to add handlers to be invoked once the body exists. * * @param {Function} callback A function to call when the body exists. */ module.exports = function onBody (callback) { if (body) { call(callback); } else { callbacks.push(callback); } }; /** * Set an interval to check for `document.body`. */ var interval = setInterval(function () { if (!document.body) return; body = true; each(callbacks, call); clearInterval(interval); }, 5); /** * Call a callback, passing it the body. * * @param {Function} callback The callback to call. */ function call (callback) { callback(document.body); } }); require.register("segmentio-on-error/index.js", function(exports, require, module){ /** * Expose `onError`. */ module.exports = onError; /** * Callbacks. */ var callbacks = []; /** * Preserve existing handler. */ if ('function' == typeof window.onerror) callbacks.push(window.onerror); /** * Bind to `window.onerror`. */ window.onerror = handler; /** * Error handler. */ function handler () { for (var i = 0, fn; fn = callbacks[i]; i++) fn.apply(this, arguments); } /** * Call a `fn` on `window.onerror`. * * @param {Function} fn */ function onError (fn) { callbacks.push(fn); if (window.onerror != handler) { callbacks.push(window.onerror); window.onerror = handler; } } }); require.register("segmentio-to-iso-string/index.js", function(exports, require, module){ /** * Expose `toIsoString`. */ module.exports = toIsoString; /** * Turn a `date` into an ISO string. * * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString * * @param {Date} date * @return {String} */ function toIsoString (date) { return date.getUTCFullYear() + '-' + pad(date.getUTCMonth() + 1) + '-' + pad(date.getUTCDate()) + 'T' + pad(date.getUTCHours()) + ':' + pad(date.getUTCMinutes()) + ':' + pad(date.getUTCSeconds()) + '.' + String((date.getUTCMilliseconds()/1000).toFixed(3)).slice(2, 5) + 'Z'; } /** * Pad a `number` with a ten's place zero. * * @param {Number} number * @return {String} */ function pad (number) { var n = number.toString(); return n.length === 1 ? '0' + n : n; } }); require.register("segmentio-to-unix-timestamp/index.js", function(exports, require, module){ /** * Expose `toUnixTimestamp`. */ module.exports = toUnixTimestamp; /** * Convert a `date` into a Unix timestamp. * * @param {Date} * @return {Number} */ function toUnixTimestamp (date) { return Math.floor(date.getTime() / 1000); } }); require.register("segmentio-use-https/index.js", function(exports, require, module){ /** * Protocol. */ module.exports = function (url) { switch (arguments.length) { case 0: return check(); case 1: return transform(url); } }; /** * Transform a protocol-relative `url` to the use the proper protocol. * * @param {String} url * @return {String} */ function transform (url) { return check() ? 'https:' + url : 'http:' + url; } /** * Check whether `https:` be used for loading scripts. * * @return {Boolean} */ function check () { return ( location.protocol == 'https:' || location.protocol == 'chrome-extension:' ); } }); require.register("visionmedia-batch/index.js", function(exports, require, module){ /** * Module dependencies. */ try { var EventEmitter = require('events').EventEmitter; } catch (err) { var Emitter = require('emitter'); } /** * Noop. */ function noop(){} /** * Expose `Batch`. */ module.exports = Batch; /** * Create a new Batch. */ function Batch() { if (!(this instanceof Batch)) return new Batch; this.fns = []; this.concurrency(Infinity); this.throws(true); for (var i = 0, len = arguments.length; i < len; ++i) { this.push(arguments[i]); } } /** * Inherit from `EventEmitter.prototype`. */ if (EventEmitter) { Batch.prototype.__proto__ = EventEmitter.prototype; } else { Emitter(Batch.prototype); } /** * Set concurrency to `n`. * * @param {Number} n * @return {Batch} * @api public */ Batch.prototype.concurrency = function(n){ this.n = n; return this; }; /** * Queue a function. * * @param {Function} fn * @return {Batch} * @api public */ Batch.prototype.push = function(fn){ this.fns.push(fn); return this; }; /** * Set wether Batch will or will not throw up. * * @param {Boolean} throws * @return {Batch} * @api public */ Batch.prototype.throws = function(throws) { this.e = !!throws; return this; }; /** * Execute all queued functions in parallel, * executing `cb(err, results)`. * * @param {Function} cb * @return {Batch} * @api public */ Batch.prototype.end = function(cb){ var self = this , total = this.fns.length , pending = total , results = [] , errors = [] , cb = cb || noop , fns = this.fns , max = this.n , throws = this.e , index = 0 , done; // empty if (!fns.length) return cb(null, results); // process function next() { var i = index++; var fn = fns[i]; if (!fn) return; var start = new Date; try { fn(callback); } catch (err) { callback(err); } function callback(err, res){ if (done) return; if (err && throws) return done = true, cb(err); var complete = total - pending + 1; var end = new Date; results[i] = res; errors[i] = err; self.emit('progress', { index: i, value: res, error: err, pending: pending, total: total, complete: complete, percent: complete / total * 100 | 0, start: start, end: end, duration: end - start }); if (--pending) next() else if(!throws) cb(errors, results); else cb(null, results); } } // concurrency for (var i = 0; i < fns.length; i++) { if (i == max) break; next(); } return this; }; }); require.register("segmentio-substitute/index.js", function(exports, require, module){ /** * Expose `substitute` */ module.exports = substitute; /** * Substitute `:prop` with the given `obj` in `str` * * @param {String} str * @param {Object} obj * @param {RegExp} expr * @return {String} * @api public */ function substitute(str, obj, expr){ if (!obj) throw new TypeError('expected an object'); expr = expr || /:(\w+)/g; return str.replace(expr, function(_, prop){ return null != obj[prop] ? obj[prop] : _; }); } }); require.register("segmentio-load-pixel/index.js", function(exports, require, module){ /** * Module dependencies. */ var stringify = require('querystring').stringify; var sub = require('substitute'); /** * Factory function to create a pixel loader. * * @param {String} path * @return {Function} * @api public */ module.exports = function(path){ return function(query, obj, fn){ if ('function' == typeof obj) fn = obj, obj = {}; obj = obj || {}; fn = fn || function(){}; var url = sub(path, obj); var img = new Image; img.onerror = error(fn, 'failed to load pixel', img); img.onload = function(){ fn(); }; query = stringify(query); if (query) query = '?' + query; img.src = url + query; img.width = 1; img.height = 1; return img; }; }; /** * Create an error handler. * * @param {Fucntion} fn * @param {String} message * @param {Image} img * @return {Function} * @api private */ function error(fn, message, img){ return function(e){ e = e || window.event; var err = new Error(message); err.event = e; err.source = img; fn(err); }; } }); require.register("segmentio-analytics.js-integrations/index.js", function(exports, require, module){ var integrations = require('./lib/slugs'); var each = require('each'); /** * Expose the integrations, using their own `name` from their `prototype`. */ each(integrations, function (slug) { var plugin = require('./lib/' + slug); var name = plugin.Integration.prototype.name; exports[name] = plugin; }); }); require.register("segmentio-analytics.js-integrations/lib/adroll.js", function(exports, require, module){ var integration = require('integration'); var is = require('is'); var load = require('load-script'); /** * User reference. */ var user; /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(AdRoll); user = analytics.user(); // store for later }; /** * Expose `AdRoll` integration. */ var AdRoll = exports.Integration = integration('AdRoll') .assumesPageview() .readyOnLoad() .global('__adroll_loaded') .global('adroll_adv_id') .global('adroll_pix_id') .global('adroll_custom_data') .option('advId', '') .option('pixId', ''); /** * Initialize. * * http://support.adroll.com/getting-started-in-4-easy-steps/#step-one * http://support.adroll.com/enhanced-conversion-tracking/ * * @param {Object} page */ AdRoll.prototype.initialize = function (page) { window.adroll_adv_id = this.options.advId; window.adroll_pix_id = this.options.pixId; if (user.id()) window.adroll_custom_data = { USER_ID: user.id() }; window.__adroll_loaded = true; this.load(); }; /** * Loaded? * * @return {Boolean} */ AdRoll.prototype.loaded = function () { return window.__adroll; }; /** * Load the AdRoll library. * * @param {Function} callback */ AdRoll.prototype.load = function (callback) { load({ http: 'http://a.adroll.com/j/roundtrip.js', https: 'https://s.adroll.com/j/roundtrip.js' }, callback); }; }); require.register("segmentio-analytics.js-integrations/lib/adwords.js", function(exports, require, module){ var load = require('load-pixel')('//www.googleadservices.com/pagead/conversion/:id'); var integration = require('integration'); /** * Expose plugin */ module.exports = exports = function(analytics){ analytics.addIntegration(AdWords); }; /** * Expose `load`. */ exports.load = load; /** * HOP */ var has = Object.prototype.hasOwnProperty; /** * Expose `AdWords` */ var AdWords = exports.Integration = integration('AdWords') .readyOnInitialize() .option('conversionId', '') .option('events', {}); /** * Track. * * @param {Track} */ AdWords.prototype.track = function(track){ var id = this.options.conversionId; var events = this.options.events; var event = track.event(); if (!has.call(events, event)) return; return exports.load({ value: track.revenue() || 0, label: events[event], script: 0 }, { id: id }); }; }); require.register("segmentio-analytics.js-integrations/lib/amplitude.js", function(exports, require, module){ var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Amplitude); }; /** * Expose `Amplitude` integration. */ var Amplitude = exports.Integration = integration('Amplitude') .assumesPageview() .readyOnInitialize() .global('amplitude') .option('apiKey', '') .option('trackAllPages', false) .option('trackNamedPages', true) .option('trackCategorizedPages', true); /** * Initialize. * * https://github.com/amplitude/Amplitude-Javascript * * @param {Object} page */ Amplitude.prototype.initialize = function (page) { (function(e,t){var r=e.amplitude||{}; r._q=[];function i(e){r[e]=function(){r._q.push([e].concat(Array.prototype.slice.call(arguments,0)));};} var s=["init","logEvent","setUserId","setGlobalUserProperties","setVersionName"]; for(var c=0;c<s.length;c++){i(s[c]);}e.amplitude=r;})(window,document); window.amplitude.init(this.options.apiKey); this.load(); }; /** * Loaded? * * @return {Boolean} */ Amplitude.prototype.loaded = function () { return !! (window.amplitude && window.amplitude.options); }; /** * Load the Amplitude library. * * @param {Function} callback */ Amplitude.prototype.load = function (callback) { load('https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-1.0-min.js', callback); }; /** * Page. * * @param {Page} page */ Amplitude.prototype.page = function (page) { var properties = page.properties(); var category = page.category(); var name = page.fullName(); var opts = this.options; // all pages if (opts.trackAllPages) { this.track(page.track()); } // categorized pages if (category && opts.trackCategorizedPages) { this.track(page.track(category)); } // named pages if (name && opts.trackNamedPages) { this.track(page.track(name)); } }; /** * Identify. * * @param {Facade} identify */ Amplitude.prototype.identify = function (identify) { var id = identify.userId(); var traits = identify.traits(); if (id) window.amplitude.setUserId(id); if (traits) window.amplitude.setGlobalUserProperties(traits); }; /** * Track. * * @param {Track} event */ Amplitude.prototype.track = function (track) { var props = track.properties(); var event = track.event(); window.amplitude.logEvent(event, props); }; }); require.register("segmentio-analytics.js-integrations/lib/awesm.js", function(exports, require, module){ var integration = require('integration'); var load = require('load-script'); /** * User reference. */ var user; /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Awesm); user = analytics.user(); // store for later }; /** * Expose `Awesm` integration. */ var Awesm = exports.Integration = integration('awe.sm') .assumesPageview() .readyOnLoad() .global('AWESM') .option('apiKey', '') .option('events', {}); /** * Initialize. * * http://developers.awe.sm/guides/javascript/ * * @param {Object} page */ Awesm.prototype.initialize = function (page) { window.AWESM = { api_key: this.options.apiKey }; this.load(); }; /** * Loaded? * * @return {Boolean} */ Awesm.prototype.loaded = function () { return !! window.AWESM._exists; }; /** * Load. * * @param {Function} callback */ Awesm.prototype.load = function (callback) { var key = this.options.apiKey; load('//widgets.awe.sm/v3/widgets.js?key=' + key + '&async=true', callback); }; /** * Track. * * @param {Track} track */ Awesm.prototype.track = function (track) { var event = track.event(); var goal = this.options.events[event]; if (!goal) return; window.AWESM.convert(goal, track.cents(), null, user.id()); }; }); require.register("segmentio-analytics.js-integrations/lib/awesomatic.js", function(exports, require, module){ var integration = require('integration'); var is = require('is'); var load = require('load-script'); var noop = function(){}; var onBody = require('on-body'); /** * User reference. */ var user; /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Awesomatic); user = analytics.user(); // store for later }; /** * Expose `Awesomatic` integration. */ var Awesomatic = exports.Integration = integration('Awesomatic') .assumesPageview() .global('Awesomatic') .global('AwesomaticSettings') .global('AwsmSetup') .global('AwsmTmp') .option('appId', ''); /** * Initialize. * * @param {Object} page */ Awesomatic.prototype.initialize = function (page) { var self = this; var id = user.id(); var options = user.traits(); options.appId = this.options.appId; if (id) options.user_id = id; this.load(function () { window.Awesomatic.initialize(options, function () { self.emit('ready'); // need to wait for initialize to callback }); }); }; /** * Loaded? * * @return {Boolean} */ Awesomatic.prototype.loaded = function () { return is.object(window.Awesomatic); }; /** * Load the Awesomatic library. * * @param {Function} callback */ Awesomatic.prototype.load = function (callback) { var url = 'https://1c817b7a15b6941337c0-dff9b5f4adb7ba28259631e99c3f3691.ssl.cf2.rackcdn.com/gen/embed.js'; load(url, callback); }; }); require.register("segmentio-analytics.js-integrations/lib/bing-ads.js", function(exports, require, module){ var integration = require('integration'); /** * Expose plugin */ module.exports = exports = function(analytics){ analytics.addIntegration(Bing); }; /** * HOP */ var has = Object.prototype.hasOwnProperty; /** * Expose `Bing` */ var Bing = exports.Integration = integration('Bing Ads') .readyOnInitialize() .option('siteId', '') .option('domainId', '') .option('goals', {}); /** * Track. * * @param {Track} track */ Bing.prototype.track = function(track){ var goals = this.options.goals; var traits = track.traits(); var event = track.event(); if (!has.call(goals, event)) return; var goal = goals[event]; return exports.load(goal, track.revenue(), this.options); }; /** * Load conversion. * * @param {Mixed} goal * @param {Number} revenue * @param {String} currency * @return {IFrame} * @api private */ exports.load = function(goal, revenue, options){ var iframe = document.createElement('iframe'); iframe.src = '//flex.msn.com/mstag/tag/' + options.siteId + '/analytics.html' + '?domainId=' + options.domainId + '&revenue=' + revenue || 0 + '&actionid=' + goal; + '&dedup=1' + '&type=1' iframe.width = 1; iframe.height = 1; return iframe; }; }); require.register("segmentio-analytics.js-integrations/lib/bronto.js", function(exports, require, module){ /** * Module dependencies. */ var integration = require('integration'); var Track = require('facade').Track; var load = require('load-script'); var each = require('each'); /** * Expose plugin. */ module.exports = exports = function(analytics){ analytics.addIntegration(Bronto); }; /** * Expose `Bronto` integration. */ var Bronto = exports.Integration = integration('Bronto') .readyOnLoad() .global('__bta') .option('siteId', '') .option('host', ''); /** * Initialize. * * http://bronto.com/product-blog/features/using-conversion-tracking-private-domain#.Ut_Vk2T8KqB * http://bronto.com/product-blog/features/javascript-conversion-tracking-setup-and-reporting#.Ut_VhmT8KqB * * @param {Object} page */ Bronto.prototype.initialize = function(page){ this.load(); }; /** * Loaded? * * @return {Boolean} */ Bronto.prototype.loaded = function(){ return this.bta; }; /** * Load the Bronto library. * * @param {Function} fn */ Bronto.prototype.load = function(fn){ var self = this; load('//p.bm23.com/bta.js', function(err){ if (err) return fn(err); var opts = self.options; self.bta = new window.__bta(opts.siteId); if (opts.host) self.bta.setHost(opts.host); fn(); }); }; /** * Track. * * @param {Track} event */ Bronto.prototype.track = function(track){ var revenue = track.revenue(); var event = track.event(); var type = 'number' == typeof revenue ? '$' : 't'; this.bta.addConversionLegacy(type, event, revenue); }; /** * Completed order. * * @param {Track} track * @api private */ Bronto.prototype.completedOrder = function(track){ var products = track.products(); var props = track.properties(); var items = []; // items each(products, function(product){ var track = new Track({ properties: product }); items.push({ item_id: track.id() || track.sku(), desc: product.description || track.name(), quantity: track.quantity(), amount: track.price(), }); }); // add conversion this.bta.addConversion({ order_id: track.orderId(), date: props.date || new Date, items: items }); }; }); require.register("segmentio-analytics.js-integrations/lib/bugherd.js", function(exports, require, module){ var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(BugHerd); }; /** * Expose `BugHerd` integration. */ var BugHerd = exports.Integration = integration('BugHerd') .assumesPageview() .readyOnLoad() .global('BugHerdConfig') .global('_bugHerd') .option('apiKey', '') .option('showFeedbackTab', true); /** * Initialize. * * http://support.bugherd.com/home * * @param {Object} page */ BugHerd.prototype.initialize = function (page) { window.BugHerdConfig = { feedback: { hide: !this.options.showFeedbackTab }}; this.load(); }; /** * Loaded? * * @return {Boolean} */ BugHerd.prototype.loaded = function () { return !! window._bugHerd; }; /** * Load the BugHerd library. * * @param {Function} callback */ BugHerd.prototype.load = function (callback) { load('//www.bugherd.com/sidebarv2.js?apikey=' + this.options.apiKey, callback); }; }); require.register("segmentio-analytics.js-integrations/lib/bugsnag.js", function(exports, require, module){ var integration = require('integration'); var is = require('is'); var extend = require('extend'); var load = require('load-script'); var onError = require('on-error'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Bugsnag); }; /** * Expose `Bugsnag` integration. */ var Bugsnag = exports.Integration = integration('Bugsnag') .readyOnLoad() .global('Bugsnag') .option('apiKey', ''); /** * Initialize. * * https://bugsnag.com/docs/notifiers/js * * @param {Object} page */ Bugsnag.prototype.initialize = function (page) { this.load(); }; /** * Loaded? * * @return {Boolean} */ Bugsnag.prototype.loaded = function () { return is.object(window.Bugsnag); }; /** * Load. * * @param {Function} callback (optional) */ Bugsnag.prototype.load = function (callback) { var apiKey = this.options.apiKey; load('//d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js', function(err){ if (err) return callback(err); window.Bugsnag.apiKey = apiKey; callback(); }); }; /** * Identify. * * @param {Identify} identify */ Bugsnag.prototype.identify = function (identify) { window.Bugsnag.metaData = window.Bugsnag.metaData || {}; extend(window.Bugsnag.metaData, identify.traits()); }; }); require.register("segmentio-analytics.js-integrations/lib/chartbeat.js", function(exports, require, module){ var integration = require('integration'); var onBody = require('on-body'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Chartbeat); }; /** * Expose `Chartbeat` integration. */ var Chartbeat = exports.Integration = integration('Chartbeat') .assumesPageview() .readyOnLoad() .global('_sf_async_config') .global('_sf_endpt') .global('pSUPERFLY') .option('domain', '') .option('uid', null); /** * Initialize. * * http://chartbeat.com/docs/configuration_variables/ * * @param {Object} page */ Chartbeat.prototype.initialize = function (page) { window._sf_async_config = this.options; onBody(function () { window._sf_endpt = new Date().getTime(); }); this.load(); }; /** * Loaded? * * @return {Boolean} */ Chartbeat.prototype.loaded = function () { return !! window.pSUPERFLY; }; /** * Load the Chartbeat library. * * http://chartbeat.com/docs/adding_the_code/ * * @param {Function} callback */ Chartbeat.prototype.load = function (callback) { load({ https: 'https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/js/chartbeat.js', http: 'http://static.chartbeat.com/js/chartbeat.js' }, callback); }; /** * Page. * * http://chartbeat.com/docs/handling_virtual_page_changes/ * * @param {Page} page */ Chartbeat.prototype.page = function (page) { var props = page.properties(); var name = page.fullName(); window.pSUPERFLY.virtualPage(props.path, name || props.title); }; }); require.register("segmentio-analytics.js-integrations/lib/churnbee.js", function(exports, require, module){ /** * Module dependencies. */ var push = require('global-queue')('_cbq'); var integration = require('integration'); var load = require('load-script'); /** * HOP */ var has = Object.prototype.hasOwnProperty; /** * Supported events */ var supported = { activation: true, changePlan: true, register: true, refund: true, charge: true, cancel: true, login: true, }; /** * Expose plugin. */ module.exports = exports = function(analytics){ analytics.addIntegration(ChurnBee); }; /** * Expose `ChurnBee` integration. */ var ChurnBee = exports.Integration = integration('ChurnBee') .readyOnInitialize() .global('_cbq') .global('ChurnBee') .option('events', {}) .option('apiKey', ''); /** * Initialize. * * https://churnbee.com/docs * * @param {Object} page */ ChurnBee.prototype.initialize = function(page){ push('_setApiKey', this.options.apiKey); this.load(); }; /** * Loaded? * * @return {Boolean} */ ChurnBee.prototype.loaded = function(){ return !! window.ChurnBee; }; /** * Load the ChurnBee library. * * @param {Function} fn */ ChurnBee.prototype.load = function(fn){ load('//api.churnbee.com/cb.js', fn); }; /** * Track. * * @param {Track} event */ ChurnBee.prototype.track = function(track){ var events = this.options.events; var event = track.event(); if (has.call(events, event)) event = events[event]; if (true != supported[event]) return; push(event, track.properties({ revenue: 'amount' })); }; }); require.register("segmentio-analytics.js-integrations/lib/clicktale.js", function(exports, require, module){ var date = require('load-date'); var domify = require('domify'); var each = require('each'); var integration = require('integration'); var is = require('is'); var useHttps = require('use-https'); var load = require('load-script'); var onBody = require('on-body'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(ClickTale); }; /** * Expose `ClickTale` integration. */ var ClickTale = exports.Integration = integration('ClickTale') .assumesPageview() .readyOnLoad() .global('WRInitTime') .global('ClickTale') .global('ClickTaleSetUID') .global('ClickTaleField') .global('ClickTaleEvent') .option('httpCdnUrl', 'http://s.clicktale.net/WRe0.js') .option('httpsCdnUrl', '') .option('projectId', '') .option('recordingRatio', 0.01) .option('partitionId', ''); /** * Initialize. * * http://wiki.clicktale.com/Article/JavaScript_API * * @param {Object} page */ ClickTale.prototype.initialize = function (page) { var options = this.options; window.WRInitTime = date.getTime(); onBody(function (body) { body.appendChild(domify('<div id="ClickTaleDiv" style="display: none;">')); }); this.load(function () { window.ClickTale(options.projectId, options.recordingRatio, options.partitionId); }); }; /** * Loaded? * * @return {Boolean} */ ClickTale.prototype.loaded = function () { return is.fn(window.ClickTale); }; /** * Load the ClickTale library. * * @param {Function} callback */ ClickTale.prototype.load = function (callback) { var http = this.options.httpCdnUrl; var https = this.options.httpsCdnUrl; if (useHttps() && !https) return this.debug('https option required'); load({ http: http, https: https }, callback); }; /** * Identify. * * http://wiki.clicktale.com/Article/ClickTaleTag#ClickTaleSetUID * http://wiki.clicktale.com/Article/ClickTaleTag#ClickTaleField * * @param {Identify} identify */ ClickTale.prototype.identify = function (identify) { var id = identify.userId(); window.ClickTaleSetUID(id); each(identify.traits(), function (key, value) { window.ClickTaleField(key, value); }); }; /** * Track. * * http://wiki.clicktale.com/Article/ClickTaleTag#ClickTaleEvent * * @param {Track} track */ ClickTale.prototype.track = function (track) { window.ClickTaleEvent(track.event()); }; }); require.register("segmentio-analytics.js-integrations/lib/clicky.js", function(exports, require, module){ var Identify = require('facade').Identify; var extend = require('extend'); var integration = require('integration'); var is = require('is'); var load = require('load-script'); /** * User reference. */ var user; /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Clicky); user = analytics.user(); // store for later }; /** * Expose `Clicky` integration. */ var Clicky = exports.Integration = integration('Clicky') .assumesPageview() .readyOnLoad() .global('clicky') .global('clicky_site_ids') .global('clicky_custom') .option('siteId', null); /** * Initialize. * * http://clicky.com/help/customization * * @param {Object} page */ Clicky.prototype.initialize = function (page) { window.clicky_site_ids = window.clicky_site_ids || [this.options.siteId]; this.identify(new Identify({ userId: user.id(), traits: user.traits() })); this.load(); }; /** * Loaded? * * @return {Boolean} */ Clicky.prototype.loaded = function () { return is.object(window.clicky); }; /** * Load the Clicky library. * * @param {Function} callback */ Clicky.prototype.load = function (callback) { load('//static.getclicky.com/js', callback); }; /** * Page. * * http://clicky.com/help/customization#/help/custom/manual * * @param {Page} page */ Clicky.prototype.page = function (page) { var properties = page.properties(); var category = page.category(); var name = page.fullName(); window.clicky.log(properties.path, name || properties.title); }; /** * Identify. * * @param {Identify} id (optional) */ Clicky.prototype.identify = function (identify) { window.clicky_custom = window.clicky_custom || {}; window.clicky_custom.session = window.clicky_custom.session || {}; extend(window.clicky_custom.session, identify.traits()); }; /** * Track. * * http://clicky.com/help/customization#/help/custom/manual * * @param {Track} event */ Clicky.prototype.track = function (track) { window.clicky.goal(track.event(), track.revenue()); }; }); require.register("segmentio-analytics.js-integrations/lib/comscore.js", function(exports, require, module){ var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Comscore); }; /** * Expose `Comscore` integration. */ var Comscore = exports.Integration = integration('comScore') .assumesPageview() .readyOnLoad() .global('_comscore') .global('COMSCORE') .option('c1', '2') .option('c2', ''); /** * Initialize. * * @param {Object} page */ Comscore.prototype.initialize = function (page) { window._comscore = window._comscore || [this.options]; this.load(); }; /** * Loaded? * * @return {Boolean} */ Comscore.prototype.loaded = function () { return !! window.COMSCORE; }; /** * Load. * * @param {Function} callback */ Comscore.prototype.load = function (callback) { load({ http: 'http://b.scorecardresearch.com/beacon.js', https: 'https://sb.scorecardresearch.com/beacon.js' }, callback); }; }); require.register("segmentio-analytics.js-integrations/lib/crazy-egg.js", function(exports, require, module){ var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(CrazyEgg); }; /** * Expose `CrazyEgg` integration. */ var CrazyEgg = exports.Integration = integration('Crazy Egg') .assumesPageview() .readyOnLoad() .global('CE2') .option('accountNumber', ''); /** * Initialize. * * @param {Object} page */ CrazyEgg.prototype.initialize = function (page) { this.load(); }; /** * Loaded? * * @return {Boolean} */ CrazyEgg.prototype.loaded = function () { return !! window.CE2; }; /** * Load the Crazy Egg library. * * @param {Function} callback */ CrazyEgg.prototype.load = function (callback) { var number = this.options.accountNumber; var path = number.slice(0,4) + '/' + number.slice(4); var cache = Math.floor(new Date().getTime()/3600000); var url = '//dnn506yrbagrg.cloudfront.net/pages/scripts/' + path + '.js?' + cache; load(url, callback); }; }); require.register("segmentio-analytics.js-integrations/lib/curebit.js", function(exports, require, module){ var push = require('global-queue')('_curebitq'); var Identify = require('facade').Identify; var integration = require('integration'); var Track = require('facade').Track; var iso = require('to-iso-string'); var load = require('load-script'); var extend = require('extend'); var clone = require('clone'); var each = require('each'); /** * User reference */ var user; /** * Expose plugin */ module.exports = exports = function(analytics){ analytics.addIntegration(Curebit); user = analytics.user(); }; /** * Expose `Curebit` integration */ var Curebit = exports.Integration = integration('Curebit') .readyOnInitialize() .global('_curebitq') .global('curebit') .option('siteId', '') .option('iframeWidth', 0) .option('iframeHeight', 0) .option('iframeBorder', 0) .option('iframeId', '') .option('responsive', true) .option('device', '') .option('server', 'https://www.curebit.com'); /** * Initialize * * @param {Object} page */ Curebit.prototype.initialize = function(){ push('init', { site_id: this.options.siteId, server: this.options.server }); this.load(); }; /** * Loaded? * * @return {Boolean} */ Curebit.prototype.loaded = function(){ return !! window.curebit; }; /** * Load * * @param {Function} fn * @api private */ Curebit.prototype.load = function(fn){ load('//d2jjzw81hqbuqv.cloudfront.net/assets/api/all-0.6.js', fn); }; /** * Identify. * * http://www.curebit.com/docs/affiliate/registration * * @param {Identify} identify * @api public */ Curebit.prototype.identify = function(identify){ push('register_affiliate', { responsive: this.options.responsive, device: this.options.device, iframe: { width: this.options.iframeWidth, height: this.options.iframeHeight, id: this.options.iframeId, frameborder: this.options.iframeBorder }, affiliate_member: { email: identify.email(), first_name: identify.firstName(), last_name: identify.lastName(), customer_id: identify.userId() }, }); }; /** * Completed order * * https://www.curebit.com/docs/ecommerce/custom * * @param {Track} track * @api private */ Curebit.prototype.completedOrder = function(track){ var orderId = track.orderId(); var products = track.products(); var props = track.properties(); var items = []; // identify var identify = new Identify({ traits: user.traits(), userId: user.id() }); // items each(products, function(product){ var track = new Track({ properties: product }); items.push({ product_id: track.id() || track.sku(), quantity: track.quantity(), image_url: product.image, price: track.price(), title: track.name(), url: product.url, }); }); // transaction push('register_purchase', { order_date: iso(props.date || new Date), order_number: orderId, coupon_code: track.coupon(), subtotal: track.total(), customer_id: identify.userId(), first_name: identify.firstName(), last_name: identify.lastName(), email: identify.email(), items: items }); }; }); require.register("segmentio-analytics.js-integrations/lib/customerio.js", function(exports, require, module){ var alias = require('alias'); var callback = require('callback'); var convertDates = require('convert-dates'); var Identify = require('facade').Identify; var integration = require('integration'); var load = require('load-script'); /** * User reference. */ var user; /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Customerio); user = analytics.user(); // store for later }; /** * Expose `Customerio` integration. */ var Customerio = exports.Integration = integration('Customer.io') .assumesPageview() .readyOnInitialize() .global('_cio') .option('siteId', ''); /** * Initialize. * * http://customer.io/docs/api/javascript.html * * @param {Object} page */ Customerio.prototype.initialize = function (page) { window._cio = window._cio || []; (function() {var a,b,c; a = function (f) {return function () {window._cio.push([f].concat(Array.prototype.slice.call(arguments,0))); }; }; b = ['identify', 'track']; for (c = 0; c < b.length; c++) {window._cio[b[c]] = a(b[c]); } })(); this.load(); }; /** * Loaded? * * @return {Boolean} */ Customerio.prototype.loaded = function () { return !! (window._cio && window._cio.pageHasLoaded); }; /** * Load. * * @param {Function} callback */ Customerio.prototype.load = function (callback) { var script = load('https://assets.customer.io/assets/track.js', callback); script.id = 'cio-tracker'; script.setAttribute('data-site-id', this.options.siteId); }; /** * Identify. * * http://customer.io/docs/api/javascript.html#section-Identify_customers * * @param {Identify} identify */ Customerio.prototype.identify = function (identify) { if (!identify.userId()) return this.debug('user id required'); var traits = identify.traits({ created: 'created_at' }); traits = convertDates(traits, convertDate); window._cio.identify(traits); }; /** * Group. * * @param {Group} group */ Customerio.prototype.group = function (group) { var traits = group.traits(); traits = alias(traits, function (trait) { return 'Group ' + trait; }); this.identify(new Identify({ userId: user.id(), traits: traits })); }; /** * Track. * * http://customer.io/docs/api/javascript.html#section-Track_a_custom_event * * @param {Track} track */ Customerio.prototype.track = function (track) { var properties = track.properties(); properties = convertDates(properties, convertDate); window._cio.track(track.event(), properties); }; /** * Convert a date to the format Customer.io supports. * * @param {Date} date * @return {Number} */ function convertDate (date) { return Math.floor(date.getTime() / 1000); } }); require.register("segmentio-analytics.js-integrations/lib/drip.js", function(exports, require, module){ var alias = require('alias'); var integration = require('integration'); var is = require('is'); var load = require('load-script'); var push = require('global-queue')('_dcq'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Drip); }; /** * Expose `Drip` integration. */ var Drip = exports.Integration = integration('Drip') .assumesPageview() .readyOnLoad() .global('dc') .global('_dcq') .global('_dcs') .option('account', ''); /** * Initialize. * * @param {Object} page */ Drip.prototype.initialize = function (page) { window._dcq = window._dcq || []; window._dcs = window._dcs || {}; window._dcs.account = this.options.account; this.load(); }; /** * Loaded? * * @return {Boolean} */ Drip.prototype.loaded = function () { return is.object(window.dc); }; /** * Load. * * @param {Function} callback */ Drip.prototype.load = function (callback) { load('//tag.getdrip.com/' + this.options.account + '.js', callback); }; /** * Track. * * @param {Track} track */ Drip.prototype.track = function (track) { var props = track.properties(); var cents = Math.round(track.cents()); props.action = track.event(); if (cents) props.value = cents; delete props.revenue; push('track', props); }; }); require.register("segmentio-analytics.js-integrations/lib/errorception.js", function(exports, require, module){ var callback = require('callback'); var extend = require('extend'); var integration = require('integration'); var load = require('load-script'); var onError = require('on-error'); var push = require('global-queue')('_errs'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Errorception); }; /** * Expose `Errorception` integration. */ var Errorception = exports.Integration = integration('Errorception') .assumesPageview() .readyOnInitialize() .global('_errs') .option('projectId', '') .option('meta', true); /** * Initialize. * * https://github.com/amplitude/Errorception-Javascript * * @param {Object} page */ Errorception.prototype.initialize = function (page) { window._errs = window._errs || [this.options.projectId]; onError(push); this.load(); }; /** * Loaded? * * @return {Boolean} */ Errorception.prototype.loaded = function () { return !! (window._errs && window._errs.push !== Array.prototype.push); }; /** * Load the Errorception library. * * @param {Function} callback */ Errorception.prototype.load = function (callback) { load('//beacon.errorception.com/' + this.options.projectId + '.js', callback); }; /** * Identify. * * http://blog.errorception.com/2012/11/capture-custom-data-with-your-errors.html * * @param {Object} identify */ Errorception.prototype.identify = function (identify) { if (!this.options.meta) return; var traits = identify.traits(); window._errs = window._errs || []; window._errs.meta = window._errs.meta || {}; extend(window._errs.meta, traits); }; }); require.register("segmentio-analytics.js-integrations/lib/evergage.js", function(exports, require, module){ var each = require('each'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_aaq'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Evergage); }; /** * Expose `Evergage` integration.integration. */ var Evergage = exports.Integration = integration('Evergage') .assumesPageview() .readyOnInitialize() .global('_aaq') .option('account', '') .option('dataset', ''); /** * Initialize. * * @param {Object} page */ Evergage.prototype.initialize = function (page) { var account = this.options.account; var dataset = this.options.dataset; window._aaq = window._aaq || []; push('setEvergageAccount', account); push('setDataset', dataset); push('setUseSiteConfig', true); this.load(); }; /** * Loaded? * * @return {Boolean} */ Evergage.prototype.loaded = function () { return !! (window._aaq && window._aaq.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ Evergage.prototype.load = function (callback) { var account = this.options.account; var dataset = this.options.dataset; var url = '//cdn.evergage.com/beacon/' + account + '/' + dataset + '/scripts/evergage.min.js'; load(url, callback); }; /** * Page. * * @param {Page} page */ Evergage.prototype.page = function (page) { var props = page.properties(); var name = page.name(); if (name) push('namePage', name); each(props, function(key, value) { push('setCustomField', key, value, 'page'); }); window.Evergage.init(true); }; /** * Identify. * * @param {Identify} identify */ Evergage.prototype.identify = function (identify) { var id = identify.userId(); if (!id) return; push('setUser', id); var traits = identify.traits({ email: 'userEmail', name: 'userName' });; each(traits, function (key, value) { push('setUserField', key, value, 'page'); }); }; /** * Group. * * @param {Group} group */ Evergage.prototype.group = function (group) { var props = group.traits(); var id = group.groupId(); if (!id) return; push('setCompany', id); each(props, function(key, value) { push('setAccountField', key, value, 'page'); }); }; /** * Track. * * @param {Track} track */ Evergage.prototype.track = function (track) { push('trackAction', track.event(), track.properties()); }; }); require.register("segmentio-analytics.js-integrations/lib/facebook-ads.js", function(exports, require, module){ var load = require('load-pixel')('//www.facebook.com/offsite_event.php'); var integration = require('integration'); /** * Expose plugin */ module.exports = exports = function(analytics){ analytics.addIntegration(Facebook); }; /** * Expose `load`. */ exports.load = load; /** * HOP */ var has = Object.prototype.hasOwnProperty; /** * Expose `Facebook` */ var Facebook = exports.Integration = integration('Facebook Ads') .readyOnInitialize() .option('currency', 'USD') .option('events', {}); /** * Track. * * @param {Track} track */ Facebook.prototype.track = function(track){ var events = this.options.events; var traits = track.traits(); var event = track.event(); if (!has.call(events, event)) return; return exports.load({ currency: this.options.currency, value: track.revenue() || 0, id: events[event] }); }; }); require.register("segmentio-analytics.js-integrations/lib/foxmetrics.js", function(exports, require, module){ var push = require('global-queue')('_fxm'); var integration = require('integration'); var Track = require('facade').Track; var callback = require('callback'); var load = require('load-script'); var each = require('each'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(FoxMetrics); }; /** * Expose `FoxMetrics` integration. */ var FoxMetrics = exports.Integration = integration('FoxMetrics') .assumesPageview() .readyOnInitialize() .global('_fxm') .option('appId', ''); /** * Initialize. * * http://foxmetrics.com/documentation/apijavascript * * @param {Object} page */ FoxMetrics.prototype.initialize = function(page){ window._fxm = window._fxm || []; this.load(); }; /** * Loaded? * * @return {Boolean} */ FoxMetrics.prototype.loaded = function(){ return !! (window._fxm && window._fxm.appId); }; /** * Load the FoxMetrics library. * * @param {Function} callback */ FoxMetrics.prototype.load = function(callback){ var id = this.options.appId; load('//d35tca7vmefkrc.cloudfront.net/scripts/' + id + '.js', callback); }; /** * Page. * * @param {Page} page */ FoxMetrics.prototype.page = function(page){ var properties = page.proxy('properties'); var category = page.category(); var name = page.name(); this._category = category; // store for later push( '_fxm.pages.view', properties.title, // title name, // name category, // category properties.url, // url properties.referrer // referrer ); }; /** * Identify. * * @param {Identify} identify */ FoxMetrics.prototype.identify = function(identify){ var id = identify.userId(); if (!id) return; push( '_fxm.visitor.profile', id, // user id identify.firstName(), // first name identify.lastName(), // last name identify.email(), // email identify.address(), // address undefined, // social undefined, // partners identify.traits() // attributes ); }; /** * Track. * * @param {Track} track */ FoxMetrics.prototype.track = function(track){ var props = track.properties(); var category = this._category || props.category; push(track.event(), category, props); }; /** * Viewed product. * * @param {Track} track * @api private */ FoxMetrics.prototype.viewedProduct = function(track){ ecommerce('productview', track); }; /** * Removed product. * * @param {Track} track * @api private */ FoxMetrics.prototype.removedProduct = function(track){ ecommerce('removecartitem', track); }; /** * Added product. * * @param {Track} track * @api private */ FoxMetrics.prototype.addedProduct = function(track){ ecommerce('cartitem', track); }; /** * Completed Order. * * @param {Track} track * @api private */ FoxMetrics.prototype.completedOrder = function(track){ var orderId = track.orderId(); // transaction push('_fxm.ecommerce.order' , orderId , track.subtotal() , track.shipping() , track.tax() , track.city() , track.state() , track.zip() , track.quantity()); // items each(track.products(), function(product){ var track = new Track({ properties: product }); ecommerce('purchaseitem', track, [ track.quantity(), track.price(), orderId ]); }); }; /** * Track ecommerce `event` with `track` * with optional `arr` to append. * * @param {String} event * @param {Track} track * @param {Array} arr * @api private */ function ecommerce(event, track, arr){ push.apply(null, [ '_fxm.ecommerce.' + event, track.id() || track.sku(), track.name(), track.category() ].concat(arr || [])); }; }); require.register("segmentio-analytics.js-integrations/lib/gauges.js", function(exports, require, module){ var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_gauges'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Gauges); }; /** * Expose `Gauges` integration. */ var Gauges = exports.Integration = integration('Gauges') .assumesPageview() .readyOnInitialize() .global('_gauges') .option('siteId', ''); /** * Initialize Gauges. * * http://get.gaug.es/documentation/tracking/ * * @param {Object} page */ Gauges.prototype.initialize = function (page) { window._gauges = window._gauges || []; this.load(); }; /** * Loaded? * * @return {Boolean} */ Gauges.prototype.loaded = function () { return !! (window._gauges && window._gauges.push !== Array.prototype.push); }; /** * Load the Gauges library. * * @param {Function} callback */ Gauges.prototype.load = function (callback) { var id = this.options.siteId; var script = load('//secure.gaug.es/track.js', callback); script.id = 'gauges-tracker'; script.setAttribute('data-site-id', id); }; /** * Page. * * @param {Page} page */ Gauges.prototype.page = function (page) { push('track'); }; }); require.register("segmentio-analytics.js-integrations/lib/get-satisfaction.js", function(exports, require, module){ var integration = require('integration'); var load = require('load-script'); var onBody = require('on-body'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(GetSatisfaction); }; /** * Expose `GetSatisfaction` integration. */ var GetSatisfaction = exports.Integration = integration('Get Satisfaction') .assumesPageview() .readyOnLoad() .global('GSFN') .option('widgetId', ''); /** * Initialize. * * https://console.getsatisfaction.com/start/101022?signup=true#engage * * @param {Object} page */ GetSatisfaction.prototype.initialize = function (page) { var widget = this.options.widgetId; var div = document.createElement('div'); var id = div.id = 'getsat-widget-' + widget; onBody(function (body) { body.appendChild(div); }); // usually the snippet is sync, so wait for it before initializing the tab this.load(function () { window.GSFN.loadWidget(widget, { containerId: id }); }); }; /** * Loaded? * * @return {Boolean} */ GetSatisfaction.prototype.loaded = function () { return !! window.GSFN; }; /** * Load the Get Satisfaction library. * * @param {Function} callback */ GetSatisfaction.prototype.load = function (callback) { load('https://loader.engage.gsfn.us/loader.js', callback); }; }); require.register("segmentio-analytics.js-integrations/lib/google-analytics.js", function(exports, require, module){ var callback = require('callback'); var canonical = require('canonical'); var each = require('each'); var integration = require('integration'); var is = require('is'); var load = require('load-script'); var push = require('global-queue')('_gaq'); var Track = require('facade').Track; var type = require('type'); var url = require('url'); var user; /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(GA); user = analytics.user(); }; /** * Expose `GA` integration. * * http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867 * https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._setSiteSpeedSampleRate */ var GA = exports.Integration = integration('Google Analytics') .readyOnLoad() .global('ga') .global('gaplugins') .global('_gaq') .global('GoogleAnalyticsObject') .option('anonymizeIp', false) .option('classic', false) .option('domain', 'none') .option('doubleClick', false) .option('enhancedLinkAttribution', false) .option('ignoreReferrer', null) .option('includeSearch', false) .option('siteSpeedSampleRate', null) .option('trackingId', '') .option('trackNamedPages', true) .option('trackCategorizedPages', true) .option('sendUserId', false); /** * When in "classic" mode, on `construct` swap all of the method to point to * their classic counterparts. */ GA.on('construct', function (integration) { if (!integration.options.classic) return; integration.initialize = integration.initializeClassic; integration.load = integration.loadClassic; integration.loaded = integration.loadedClassic; integration.page = integration.pageClassic; integration.track = integration.trackClassic; integration.completedOrder = integration.completedOrderClassic; }); /** * Initialize. * * https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced */ GA.prototype.initialize = function () { var opts = this.options; // setup the tracker globals window.GoogleAnalyticsObject = 'ga'; window.ga = window.ga || function () { window.ga.q = window.ga.q || []; window.ga.q.push(arguments); }; window.ga.l = new Date().getTime(); window.ga('create', opts.trackingId, { cookieDomain: opts.domain || GA.prototype.defaults.domain, // to protect against empty string siteSpeedSampleRate: opts.siteSpeedSampleRate, allowLinker: true }); // send global id if (this.options.sendUserId && user.id()) { window.ga('set', '&uid', user.id()); } // anonymize after initializing, otherwise a warning is shown // in google analytics debugger if (opts.anonymizeIp) window.ga('set', 'anonymizeIp', true); this.load(); }; /** * Loaded? * * @return {Boolean} */ GA.prototype.loaded = function () { return !! window.gaplugins; }; /** * Load the Google Analytics library. * * @param {Function} callback */ GA.prototype.load = function (callback) { load('//www.google-analytics.com/analytics.js', callback); }; /** * Page. * * https://developers.google.com/analytics/devguides/collection/analyticsjs/pages * * @param {Page} page */ GA.prototype.page = function (page) { var category = page.category(); var props = page.properties(); var name = page.fullName(); var track; this._category = category; // store for later window.ga('send', 'pageview', { page: path(props, this.options), title: name || props.title, location: props.url }); // categorized pages if (category && this.options.trackCategorizedPages) { track = page.track(category); this.track(track, { noninteraction: true }); } // named pages if (name && this.options.trackNamedPages) { track = page.track(name); this.track(track, { noninteraction: true }); } }; /** * Track. * * https://developers.google.com/analytics/devguides/collection/analyticsjs/events * https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference * * @param {Track} event */ GA.prototype.track = function (track, options) { var opts = options || track.options(this.name); var props = track.properties(); var revenue = track.revenue(); var event = track.event(); window.ga('send', 'event', { eventAction: event, eventCategory: this._category || props.category || 'All', eventLabel: props.label, eventValue: formatValue(props.value || revenue), nonInteraction: props.noninteraction || opts.noninteraction }); }; /** * Completed order. * * https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce * * @param {Track} track * @api private */ GA.prototype.completedOrder = function(track){ var orderId = track.orderId(); var products = track.products(); var props = track.properties(); // orderId is required. if (!orderId) return; // require ecommerce if (!this.ecommerce) { window.ga('require', 'ecommerce', 'ecommerce.js'); this.ecommerce = true; } // add transaction window.ga('ecommerce:addTransaction', { affiliation: props.affiliation, shipping: track.shipping(), revenue: track.total(), tax: track.tax(), id: orderId }); // add products each(products, function(product){ var track = new Track({ properties: product }); window.ga('ecommerce:addItem', { category: track.category(), quantity: track.quantity(), price: track.price(), name: track.name(), sku: track.sku(), id: orderId }); }); // send window.ga('ecommerce:send'); }; /** * Initialize (classic). * * https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration */ GA.prototype.initializeClassic = function () { var opts = this.options; var anonymize = opts.anonymizeIp; var db = opts.doubleClick; var domain = opts.domain; var enhanced = opts.enhancedLinkAttribution; var ignore = opts.ignoreReferrer; var sample = opts.siteSpeedSampleRate; window._gaq = window._gaq || []; push('_setAccount', opts.trackingId); push('_setAllowLinker', true); if (anonymize) push('_gat._anonymizeIp'); if (domain) push('_setDomainName', domain); if (sample) push('_setSiteSpeedSampleRate', sample); if (enhanced) { var protocol = 'https:' === document.location.protocol ? 'https:' : 'http:'; var pluginUrl = protocol + '//www.google-analytics.com/plugins/ga/inpage_linkid.js'; push('_require', 'inpage_linkid', pluginUrl); } if (ignore) { if (!is.array(ignore)) ignore = [ignore]; each(ignore, function (domain) { push('_addIgnoredRef', domain); }); } this.load(); }; /** * Loaded? (classic) * * @return {Boolean} */ GA.prototype.loadedClassic = function () { return !! (window._gaq && window._gaq.push !== Array.prototype.push); }; /** * Load the classic Google Analytics library. * * @param {Function} callback */ GA.prototype.loadClassic = function (callback) { if (this.options.doubleClick) { load('//stats.g.doubleclick.net/dc.js', callback); } else { load({ http: 'http://www.google-analytics.com/ga.js', https: 'https://ssl.google-analytics.com/ga.js' }, callback); } }; /** * Page (classic). * * https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration * * @param {Page} page */ GA.prototype.pageClassic = function (page) { var opts = page.options(this.name); var category = page.category(); var props = page.properties(); var name = page.fullName(); var track; push('_trackPageview', path(props, this.options)); // categorized pages if (category && this.options.trackCategorizedPages) { track = page.track(category); this.track(track, { noninteraction: true }); } // named pages if (name && this.options.trackNamedPages) { track = page.track(name); this.track(track, { noninteraction: true }); } }; /** * Track (classic). * * https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiEventTracking * * @param {Track} track */ GA.prototype.trackClassic = function (track, options) { var opts = options || track.options(this.name); var props = track.properties(); var revenue = track.revenue(); var event = track.event(); var category = this._category || props.category || 'All'; var label = props.label; var value = formatValue(revenue || props.value); var noninteraction = props.noninteraction || opts.noninteraction; push('_trackEvent', category, event, label, value, noninteraction); }; /** * Completed order. * * https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingEcommerce * * @param {Track} track * @api private */ GA.prototype.completedOrderClassic = function(track){ var orderId = track.orderId(); var products = track.products() || []; var props = track.properties(); // required if (!orderId) return; // add transaction push('_addTrans' , orderId , props.affiliation , track.total() , track.tax() , track.shipping() , track.city() , track.state() , track.country()); // add items each(products, function(product){ var track = new Track({ properties: product }); push('_addItem' , orderId , track.sku() , track.name() , track.category() , track.price() , track.quantity()); }) // send push('_trackTrans'); }; /** * Return the path based on `properties` and `options`. * * @param {Object} properties * @param {Object} options */ function path (properties, options) { if (!properties) return; var str = properties.path; if (options.includeSearch && properties.search) str += properties.search; return str; } /** * Format the value property to Google's liking. * * @param {Number} value * @return {Number} */ function formatValue (value) { if (!value || value < 0) return 0; return Math.round(value); } }); require.register("segmentio-analytics.js-integrations/lib/google-tag-manager.js", function(exports, require, module){ var push = require('global-queue')('dataLayer', { wrap: false }); var integration = require('integration'); var load = require('load-script'); /** * Expose plugin */ module.exports = exports = function(analytics){ analytics.addIntegration(GTM); }; /** * Expose `GTM` */ var GTM = exports.Integration = integration('Google Tag Manager') .assumesPageview() .readyOnLoad() .global('dataLayer') .global('google_tag_manager') .option('containerId', '') .option('trackNamedPages', true) .option('trackCategorizedPages', true) /** * Initialize * * https://developers.google.com/tag-manager * * @param {Object} page */ GTM.prototype.initialize = function(){ this.load(); }; /** * Loaded * * @return {Boolean} */ GTM.prototype.loaded = function(){ return !! (window.dataLayer && [].push != window.dataLayer.push); }; /** * Load. * * @param {Function} fn */ GTM.prototype.load = function(fn){ var id = this.options.containerId; push({ 'gtm.start': +new Date, event: 'gtm.js' }); load('//www.googletagmanager.com/gtm.js?id=' + id + '&l=dataLayer', fn); }; /** * Page. * * @param {Page} page * @api public */ GTM.prototype.page = function(page){ var category = page.category(); var props = page.properties(); var name = page.fullName(); var opts = this.options; var track; // all if (opts.trackAllPages) { this.track(page.track()); } // categorized if (category && opts.trackCategorizedPages) { this.track(page.track(category)); } // named if (name && opts.trackNamedPages) { this.track(page.track(name)); } }; /** * Track. * * https://developers.google.com/tag-manager/devguide#events * * @param {Track} track * @api public */ GTM.prototype.track = function(track){ var props = track.properties(); props.event = track.event(); push(props); }; }); require.register("segmentio-analytics.js-integrations/lib/gosquared.js", function(exports, require, module){ var Identify = require('facade').Identify; var Track = require('facade').Track; var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); var onBody = require('on-body'); var each = require('each'); /** * User reference. */ var user; /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(GoSquared); user = analytics.user(); // store reference for later }; /** * Expose `GoSquared` integration. */ var GoSquared = exports.Integration = integration('GoSquared') .assumesPageview() .readyOnLoad() .global('_gs') .option('siteToken', '') .option('anonymizeIP', false) .option('cookieDomain', null) .option('useCookies', true) .option('trackHash', false) .option('trackLocal', false) .option('trackParams', true); /** * Initialize. * * https://www.gosquared.com/developer/tracker * Options: https://www.gosquared.com/developer/tracker/configuration * * @param {Object} page */ GoSquared.prototype.initialize = function (page) { var self = this; var options = this.options; push(options.siteToken); each(options, function(name, value){ if ('siteToken' == name) return; if (null == value) return; push('set', name, value); }); self.identify(new Identify({ traits: user.traits(), userId: user.id() })); self.load(); }; /** * Loaded? (checks if the tracker version is set) * * @return {Boolean} */ GoSquared.prototype.loaded = function () { return !! (window._gs && window._gs.v); }; /** * Load the GoSquared library. * * @param {Function} callback */ GoSquared.prototype.load = function (callback) { load('//d1l6p2sc9645hc.cloudfront.net/tracker.js', callback); }; /** * Page. * * https://www.gosquared.com/developer/tracker/pageviews * * @param {Page} page */ GoSquared.prototype.page = function (page) { var props = page.properties(); var name = page.fullName(); push('track', props.path, name || props.title) }; /** * Identify. * * https://www.gosquared.com/developer/tracker/tagging * * @param {Identify} identify */ GoSquared.prototype.identify = function (identify) { var traits = identify.traits({ userId: 'userID' }); var username = identify.username(); var email = identify.email(); var id = identify.userId(); if (id) push('set', 'visitorID', id); var name = email || username || id; if (name) push('set', 'visitorName', name); push('set', 'visitor', traits); }; /** * Track. * * https://www.gosquared.com/developer/tracker/events * * @param {Track} track */ GoSquared.prototype.track = function (track) { push('event', track.event(), track.properties()); }; /** * Checked out. * * @param {Track} track * @api private */ GoSquared.prototype.completedOrder = function(track){ var products = track.products(); var items = []; each(products, function(product){ var track = new Track({ properties: product }); items.push({ category: track.category(), quantity: track.quantity(), price: track.price(), name: track.name(), }); }) push('transaction', track.orderId(), { revenue: track.total(), track: true }, items); }; /** * Push to `_gs.q`. * * @param {...} args * @api private */ function push(){ var _gs = window._gs = window._gs || function(){ (_gs.q = _gs.q || []).push(arguments); }; _gs.apply(null, arguments); } }); require.register("segmentio-analytics.js-integrations/lib/heap.js", function(exports, require, module){ var alias = require('alias'); var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Heap); }; /** * Expose `Heap` integration. */ var Heap = exports.Integration = integration('Heap') .assumesPageview() .readyOnInitialize() .global('heap') .global('_heapid') .option('apiKey', ''); /** * Initialize. * * https://heapanalytics.com/docs#installWeb * * @param {Object} page */ Heap.prototype.initialize = function (page) { window.heap=window.heap||[];window.heap.load=function(a){window._heapid=a;var d=function(a){return function(){window.heap.push([a].concat(Array.prototype.slice.call(arguments,0)));};},e=["identify","track"];for(var f=0;f<e.length;f++)window.heap[e[f]]=d(e[f]);}; window.heap.load(this.options.apiKey); this.load(); }; /** * Loaded? * * @return {Boolean} */ Heap.prototype.loaded = function () { return (window.heap && window.heap.appid); }; /** * Load the Heap library. * * @param {Function} callback */ Heap.prototype.load = function (callback) { load('//d36lvucg9kzous.cloudfront.net', callback); }; /** * Identify. * * https://heapanalytics.com/docs#identify * * @param {Identify} identify */ Heap.prototype.identify = function (identify) { var traits = identify.traits(); var username = identify.username(); var id = identify.userId(); var handle = username || id; if (handle) traits.handle = handle; delete traits.username; window.heap.identify(traits); }; /** * Track. * * https://heapanalytics.com/docs#track * * @param {Track} track */ Heap.prototype.track = function (track) { window.heap.track(track.event(), track.properties()); }; }); require.register("segmentio-analytics.js-integrations/lib/hittail.js", function(exports, require, module){ var integration = require('integration'); var is = require('is'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(HitTail); }; /** * Expose `HitTail` integration. */ var HitTail = exports.Integration = integration('HitTail') .assumesPageview() .readyOnLoad() .global('htk') .option('siteId', ''); /** * Initialize. * * @param {Object} page */ HitTail.prototype.initialize = function (page) { this.load(); }; /** * Loaded? * * @return {Boolean} */ HitTail.prototype.loaded = function () { return is.fn(window.htk); }; /** * Load the HitTail library. * * @param {Function} callback */ HitTail.prototype.load = function (callback) { var id = this.options.siteId; load('//' + id + '.hittail.com/mlt.js', callback); }; }); require.register("segmentio-analytics.js-integrations/lib/hubspot.js", function(exports, require, module){ var callback = require('callback'); var convert = require('convert-dates'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_hsq'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(HubSpot); }; /** * Expose `HubSpot` integration. */ var HubSpot = exports.Integration = integration('HubSpot') .assumesPageview() .readyOnInitialize() .global('_hsq') .option('portalId', null); /** * Initialize. * * @param {Object} page */ HubSpot.prototype.initialize = function (page) { window._hsq = []; this.load(); }; /** * Loaded? * * @return {Boolean} */ HubSpot.prototype.loaded = function () { return !! (window._hsq && window._hsq.push !== Array.prototype.push); }; /** * Load the HubSpot library. * * @param {Function} fn */ HubSpot.prototype.load = function (fn) { if (document.getElementById('hs-analytics')) return callback.async(fn); var id = this.options.portalId; var cache = Math.ceil(new Date() / 300000) * 300000; var url = 'https://js.hs-analytics.net/analytics/' + cache + '/' + id + '.js'; var script = load(url, fn); script.id = 'hs-analytics'; }; /** * Page. * * @param {String} category (optional) * @param {String} name (optional) * @param {Object} properties (optional) * @param {Object} options (optional) */ HubSpot.prototype.page = function (page) { push('_trackPageview'); }; /** * Identify. * * @param {Identify} identify */ HubSpot.prototype.identify = function (identify) { if (!identify.email()) return; var traits = identify.traits(); traits = convertDates(traits); push('identify', traits); }; /** * Track. * * @param {Track} track */ HubSpot.prototype.track = function (track) { var props = track.properties(); props = convertDates(props); push('trackEvent', track.event(), props); }; /** * Convert all the dates in the HubSpot properties to millisecond times * * @param {Object} properties */ function convertDates (properties) { return convert(properties, function (date) { return date.getTime(); }); } }); require.register("segmentio-analytics.js-integrations/lib/improvely.js", function(exports, require, module){ var alias = require('alias'); var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Improvely); }; /** * Expose `Improvely` integration. */ var Improvely = exports.Integration = integration('Improvely') .assumesPageview() .readyOnInitialize() .global('_improvely') .global('improvely') .option('domain', '') .option('projectId', null); /** * Initialize. * * http://www.improvely.com/docs/landing-page-code * * @param {Object} page */ Improvely.prototype.initialize = function (page) { window._improvely = []; window.improvely = {init: function (e, t) { window._improvely.push(["init", e, t]); }, goal: function (e) { window._improvely.push(["goal", e]); }, label: function (e) { window._improvely.push(["label", e]); } }; var domain = this.options.domain; var id = this.options.projectId; window.improvely.init(domain, id); this.load(); }; /** * Loaded? * * @return {Boolean} */ Improvely.prototype.loaded = function () { return !! (window.improvely && window.improvely.identify); }; /** * Load the Improvely library. * * @param {Function} callback */ Improvely.prototype.load = function (callback) { var domain = this.options.domain; load('//' + domain + '.iljmp.com/improvely.js', callback); }; /** * Identify. * * http://www.improvely.com/docs/labeling-visitors * * @param {Identify} identify */ Improvely.prototype.identify = function (identify) { var id = identify.userId(); if (id) window.improvely.label(id); }; /** * Track. * * http://www.improvely.com/docs/conversion-code * * @param {Track} track */ Improvely.prototype.track = function (track) { var props = track.properties({ revenue: 'amount' }); props.type = track.event(); window.improvely.goal(props); }; }); require.register("segmentio-analytics.js-integrations/lib/inspectlet.js", function(exports, require, module){ var integration = require('integration'); var alias = require('alias'); var clone = require('clone'); var load = require('load-script'); var push = require('global-queue')('__insp'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Inspectlet); }; /** * Expose `Inspectlet` integration. */ var Inspectlet = exports.Integration = integration('Inspectlet') .assumesPageview() .readyOnLoad() .global('__insp') .global('__insp_') .option('wid', ''); /** * Initialize. * * https://www.inspectlet.com/dashboard/embedcode/1492461759/initial * * @param {Object} page */ Inspectlet.prototype.initialize = function (page) { push('wid', this.options.wid); this.load(); }; /** * Loaded? * * @return {Boolean} */ Inspectlet.prototype.loaded = function () { return !! window.__insp_; }; /** * Load the Inspectlet library. * * @param {Function} callback */ Inspectlet.prototype.load = function (callback) { load('//www.inspectlet.com/inspectlet.js', callback); }; /** * Track. * * http://www.inspectlet.com/docs/tags * * @param {Track} track */ Inspectlet.prototype.track = function (track) { push('tagSession', track.event()); }; }); require.register("segmentio-analytics.js-integrations/lib/intercom.js", function(exports, require, module){ var alias = require('alias'); var convertDates = require('convert-dates'); var integration = require('integration'); var each = require('each'); var is = require('is'); var isEmail = require('is-email'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Intercom); }; /** * Expose `Intercom` integration. */ var Intercom = exports.Integration = integration('Intercom') .assumesPageview() .readyOnLoad() .global('Intercom') .option('activator', '#IntercomDefaultWidget') .option('appId', '') .option('inbox', false); /** * Initialize. * * http://docs.intercom.io/ * http://docs.intercom.io/#IntercomJS * * @param {Object} page */ Intercom.prototype.initialize = function (page) { this.load(); }; /** * Loaded? * * @return {Boolean} */ Intercom.prototype.loaded = function () { return is.fn(window.Intercom); }; /** * Load the Intercom library. * * @param {Function} callback */ Intercom.prototype.load = function (callback) { load('https://static.intercomcdn.com/intercom.v1.js', callback); }; /** * Identify. * * http://docs.intercom.io/#IntercomJS * * @param {Identify} identify */ Intercom.prototype.identify = function (identify) { var traits = identify.traits({ userId: 'user_id' }); var opts = identify.options(this.name); var companyCreated = identify.companyCreated(); var created = identify.created(); var email = identify.email(); var name = identify.name(); var id = identify.userId(); if (!id && !traits.email) return; // one is required traits.app_id = this.options.appId; // name if (name) traits.name = name; // handle dates if (companyCreated) traits.company.created = companyCreated; if (created) traits.created = created; // convert dates traits = convertDates(traits, formatDate); traits = alias(traits, { created: 'created_at'}); // company if (traits.company) { traits.company = alias(traits.company, { created: 'created_at' }); } // handle options if (opts.increments) traits.increments = opts.increments; if (opts.userHash) traits.user_hash = opts.userHash; if (opts.user_hash) traits.user_hash = opts.user_hash; if (this.options.inbox) { traits.widget = { activator: this.options.activator }; } var method = this._id !== id ? 'boot': 'update'; this._id = id; // cache for next time window.Intercom(method, traits); }; /** * Group. * * @param {Group} group */ Intercom.prototype.group = function (group) { var props = group.properties(); var id = group.groupId(); if (id) props.id = id; window.Intercom('update', { company: props }); }; /** * Track. * * @param {Track} track */ Intercom.prototype.track = function(track){ window.Intercom('trackUserEvent', track.event(), track.traits()); }; /** * Format a date to Intercom's liking. * * @param {Date} date * @return {Number} */ function formatDate (date) { return Math.floor(date / 1000); } }); require.register("segmentio-analytics.js-integrations/lib/keen-io.js", function(exports, require, module){ var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Keen); }; /** * Expose `Keen IO` integration. */ var Keen = exports.Integration = integration('Keen IO') .readyOnInitialize() .global('Keen') .option('projectId', '') .option('readKey', '') .option('writeKey', '') .option('trackNamedPages', true) .option('trackAllPages', false) .option('trackCategorizedPages', true); /** * Initialize. * * https://keen.io/docs/ */ Keen.prototype.initialize = function () { var options = this.options; window.Keen = window.Keen||{configure:function(e){this._cf=e;},addEvent:function(e,t,n,i){this._eq=this._eq||[],this._eq.push([e,t,n,i]);},setGlobalProperties:function(e){this._gp=e;},onChartsReady:function(e){this._ocrq=this._ocrq||[],this._ocrq.push(e);}}; window.Keen.configure({ projectId: options.projectId, writeKey: options.writeKey, readKey: options.readKey }); this.load(); }; /** * Loaded? * * @return {Boolean} */ Keen.prototype.loaded = function () { return !! (window.Keen && window.Keen.Base64); }; /** * Load the Keen IO library. * * @param {Function} callback */ Keen.prototype.load = function (callback) { load('//dc8na2hxrj29i.cloudfront.net/code/keen-2.1.0-min.js', callback); }; /** * Page. * * @param {Page} page */ Keen.prototype.page = function (page) { var category = page.category(); var props = page.properties(); var name = page.fullName(); var opts = this.options; // all pages if (opts.trackAllPages) { this.track(page.track()); } // named pages if (name && opts.trackNamedPages) { this.track(page.track(name)); } // categorized pages if (category && opts.trackCategorizedPages) { this.track(page.track(category)); } }; /** * Identify. * * TODO: migrate from old `userId` to simpler `id` * * @param {Identify} identify */ Keen.prototype.identify = function (identify) { var traits = identify.traits(); var id = identify.userId(); var user = {}; if (id) user.userId = id; if (traits) user.traits = traits; window.Keen.setGlobalProperties(function() { return { user: user }; }); }; /** * Track. * * @param {Track} track */ Keen.prototype.track = function (track) { window.Keen.addEvent(track.event(), track.properties()); }; }); require.register("segmentio-analytics.js-integrations/lib/kissmetrics.js", function(exports, require, module){ var alias = require('alias'); var Batch = require('batch'); var callback = require('callback'); var integration = require('integration'); var is = require('is'); var load = require('load-script'); var push = require('global-queue')('_kmq'); var Track = require('facade').Track; var each = require('each'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(KISSmetrics); }; /** * Expose `KISSmetrics` integration. */ var KISSmetrics = exports.Integration = integration('KISSmetrics') .assumesPageview() .readyOnInitialize() .global('_kmq') .global('KM') .global('_kmil') .option('apiKey', '') .option('trackNamedPages', true) .option('trackCategorizedPages', true); /** * Initialize. * * http://support.kissmetrics.com/apis/javascript * * @param {Object} page */ KISSmetrics.prototype.initialize = function (page) { window._kmq = []; this.load(); }; /** * Loaded? * * @return {Boolean} */ KISSmetrics.prototype.loaded = function () { return is.object(window.KM); }; /** * Load. * * @param {Function} callback */ KISSmetrics.prototype.load = function (callback) { var key = this.options.apiKey; var useless = '//i.kissmetrics.com/i.js'; var library = '//doug1izaerwt3.cloudfront.net/' + key + '.1.js'; new Batch() .push(function (done) { load(useless, done); }) // :) .push(function (done) { load(library, done); }) .end(callback); }; /** * Page. * * @param {String} category (optional) * @param {String} name (optional) * @param {Object} properties (optional) * @param {Object} options (optional) */ KISSmetrics.prototype.page = function (page) { var category = page.category(); var name = page.fullName(); var opts = this.options; // named pages if (name && opts.trackNamedPages) { this.track(page.track(name)); } // categorized pages if (category && opts.trackCategorizedPages) { this.track(page.track(category)); } }; /** * Identify. * * @param {Identify} identify */ KISSmetrics.prototype.identify = function (identify) { var traits = identify.traits(); var id = identify.userId(); if (id) push('identify', id); if (traits) push('set', traits); }; /** * Track. * * @param {Track} track */ KISSmetrics.prototype.track = function (track) { var props = track.properties({ revenue: 'Billing Amount' }); push('record', track.event(), props); }; /** * Alias. * * @param {Alias} to */ KISSmetrics.prototype.alias = function (alias) { push('alias', alias.to(), alias.from()); }; /** * Viewed product. * * @param {Track} track * @api private */ KISSmetrics.prototype.viewedProduct = function(track){ push('record', 'Product Viewed', toProduct(track)); }; /** * Product added. * * @param {Track} track * @api private */ KISSmetrics.prototype.addedProduct = function(track){ push('record', 'Product Added', toProduct(track)); }; /** * Completed order. * * @param {Track} track * @api private */ KISSmetrics.prototype.completedOrder = function(track){ var orderId = track.orderId(); var products = track.products(); // transaction push('record', 'Purchased', { 'Order ID': track.orderId(), 'Order Total': track.total() }); // items window._kmq.push(function(){ var km = window.KM; each(products, function(product, i){ var track = new Track({ properties: product }); var item = toProduct(track); item['Order ID'] = orderId; item._t = km.ts() + i; item._d = 1; km.set(item); }); }); }; /** * Get a product from the given `track`. * * @param {Track} track * @return {Object} * @api private */ function toProduct(track){ return { Quantity: track.quantity(), Price: track.price(), Name: track.name(), SKU: track.sku() }; } }); require.register("segmentio-analytics.js-integrations/lib/klaviyo.js", function(exports, require, module){ var alias = require('alias'); var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_learnq'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Klaviyo); }; /** * Expose `Klaviyo` integration. */ var Klaviyo = exports.Integration = integration('Klaviyo') .assumesPageview() .readyOnInitialize() .global('_learnq') .option('apiKey', ''); /** * Initialize. * * https://www.klaviyo.com/docs/getting-started * * @param {Object} page */ Klaviyo.prototype.initialize = function (page) { push('account', this.options.apiKey); this.load(); }; /** * Loaded? * * @return {Boolean} */ Klaviyo.prototype.loaded = function () { return !! (window._learnq && window._learnq.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ Klaviyo.prototype.load = function (callback) { load('//a.klaviyo.com/media/js/learnmarklet.js', callback); }; /** * Trait aliases. */ var aliases = { id: '$id', email: '$email', firstName: '$first_name', lastName: '$last_name', phone: '$phone_number', title: '$title' }; /** * Identify. * * @param {Identify} identify */ Klaviyo.prototype.identify = function (identify) { var traits = identify.traits(aliases); if (!traits.$id && !traits.$email) return; push('identify', traits); }; /** * Group. * * @param {Group} group */ Klaviyo.prototype.group = function (group) { var props = group.properties(); if (!props.name) return; push('identify', { $organization: props.name }); }; /** * Track. * * @param {Track} track */ Klaviyo.prototype.track = function (track) { push('track', track.event(), track.properties()); }; }); require.register("segmentio-analytics.js-integrations/lib/leadlander.js", function(exports, require, module){ var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(LeadLander); }; /** * Expose `LeadLander` integration. */ var LeadLander = exports.Integration = integration('LeadLander') .assumesPageview() .readyOnLoad() .global('llactid') .global('trackalyzer') .option('accountId', null); /** * Initialize. * * @param {Object} page */ LeadLander.prototype.initialize = function (page) { window.llactid = this.options.accountId; this.load(); }; /** * Loaded? * * @return {Boolean} */ LeadLander.prototype.loaded = function () { return !! window.trackalyzer; }; /** * Load. * * @param {Function} callback */ LeadLander.prototype.load = function (callback) { load('http://t6.trackalyzer.com/trackalyze-nodoc.js', callback); }; }); require.register("segmentio-analytics.js-integrations/lib/livechat.js", function(exports, require, module){ var each = require('each'); var integration = require('integration'); var load = require('load-script'); var clone = require('clone'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(LiveChat); }; /** * Expose `LiveChat` integration. */ var LiveChat = exports.Integration = integration('LiveChat') .assumesPageview() .readyOnLoad() .global('__lc') .option('group', 0) .option('license', ''); /** * Initialize. * * http://www.livechatinc.com/api/javascript-api * * @param {Object} page */ LiveChat.prototype.initialize = function (page) { window.__lc = clone(this.options); this.isLoaded = false; this.load(); }; /** * Loaded? * * @return {Boolean} */ LiveChat.prototype.loaded = function () { return this.isLoaded; }; /** * Load. * * @param {Function} callback */ LiveChat.prototype.load = function (callback) { var self = this; load('//cdn.livechatinc.com/tracking.js', function(err){ if (err) return callback(err); self.isLoaded = true; callback(); }); }; /** * Identify. * * @param {Identify} identify */ LiveChat.prototype.identify = function (identify) { var traits = identify.traits({ userId: 'User ID' }); window.LC_API.set_custom_variables(convert(traits)); }; /** * Convert a traits object into the format LiveChat requires. * * @param {Object} traits * @return {Array} */ function convert (traits) { var arr = []; each(traits, function (key, value) { arr.push({ name: key, value: value }); }); return arr; } }); require.register("segmentio-analytics.js-integrations/lib/lucky-orange.js", function(exports, require, module){ var Identify = require('facade').Identify; var integration = require('integration'); var load = require('load-script'); /** * User ref */ var user; /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(LuckyOrange); user = analytics.user(); }; /** * Expose `LuckyOrange` integration. */ var LuckyOrange = exports.Integration = integration('Lucky Orange') .assumesPageview() .readyOnLoad() .global('_loq') .global('__wtw_watcher_added') .global('__wtw_lucky_site_id') .global('__wtw_lucky_is_segment_io') .global('__wtw_custom_user_data') .option('siteId', null); /** * Initialize. * * @param {Object} page */ LuckyOrange.prototype.initialize = function (page) { window._loq || (window._loq = []); window.__wtw_lucky_site_id = this.options.siteId; this.identify(new Identify({ traits: user.traits(), userId: user.id() })); this.load(); }; /** * Loaded? * * @return {Boolean} */ LuckyOrange.prototype.loaded = function () { return !! window.__wtw_watcher_added; }; /** * Load. * * @param {Function} callback */ LuckyOrange.prototype.load = function (callback) { var cache = Math.floor(new Date().getTime() / 60000); load({ http: 'http://www.luckyorange.com/w.js?' + cache, https: 'https://ssl.luckyorange.com/w.js?' + cache }, callback); }; /** * Identify. * * @param {Identify} identify */ LuckyOrange.prototype.identify = function (identify) { var traits = window.__wtw_custom_user_data = identify.traits(); var email = identify.email(); var name = identify.name(); if (name) traits.name = name; if (email) traits.email = email; }; }); require.register("segmentio-analytics.js-integrations/lib/lytics.js", function(exports, require, module){ var alias = require('alias'); var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Lytics); }; /** * Expose `Lytics` integration. */ var Lytics = exports.Integration = integration('Lytics') .readyOnInitialize() .global('jstag') .option('cid', '') .option('cookie', 'seerid') .option('delay', 2000) .option('sessionTimeout', 1800) .option('url', '//c.lytics.io'); /** * Options aliases. */ var aliases = { sessionTimeout: 'sessecs' }; /** * Initialize. * * http://admin.lytics.io/doc#jstag * * @param {Object} page */ Lytics.prototype.initialize = function (page) { var options = alias(this.options, aliases); window.jstag = (function () {var t = {_q: [], _c: options, ts: (new Date()).getTime() }; t.send = function() {this._q.push([ 'ready', 'send', Array.prototype.slice.call(arguments) ]); return this; }; return t; })(); this.load(); }; /** * Loaded? * * @return {Boolean} */ Lytics.prototype.loaded = function () { return !! (window.jstag && window.jstag.bind); }; /** * Load the Lytics library. * * @param {Function} callback */ Lytics.prototype.load = function (callback) { load('//c.lytics.io/static/io.min.js', callback); }; /** * Page. * * @param {Page} page */ Lytics.prototype.page = function (page) { window.jstag.send(page.properties()); }; /** * Idenfity. * * @param {Identify} identify */ Lytics.prototype.identify = function (identify) { var traits = identify.traits({ userId: '_uid' }); window.jstag.send(traits); }; /** * Track. * * @param {String} event * @param {Object} properties (optional) * @param {Object} options (optional) */ Lytics.prototype.track = function (track) { var props = track.properties(); props._e = track.event(); window.jstag.send(props); }; }); require.register("segmentio-analytics.js-integrations/lib/mixpanel.js", function(exports, require, module){ var alias = require('alias'); var clone = require('clone'); var dates = require('convert-dates'); var integration = require('integration'); var iso = require('to-iso-string'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Mixpanel); }; /** * Expose `Mixpanel` integration. */ var Mixpanel = exports.Integration = integration('Mixpanel') .readyOnLoad() .global('mixpanel') .option('cookieName', '') .option('nameTag', true) .option('pageview', false) .option('people', false) .option('token', '') .option('trackAllPages', false) .option('trackNamedPages', true) .option('trackCategorizedPages', true); /** * Options aliases. */ var optionsAliases = { cookieName: 'cookie_name' }; /** * Initialize. * * https://mixpanel.com/help/reference/javascript#installing * https://mixpanel.com/help/reference/javascript-full-api-reference#mixpanel.init */ Mixpanel.prototype.initialize = function () { (function (c, a) {window.mixpanel = a; var b, d, h, e; a._i = []; a.init = function (b, c, f) {function d(a, b) {var c = b.split('.'); 2 == c.length && (a = a[c[0]], b = c[1]); a[b] = function () {a.push([b].concat(Array.prototype.slice.call(arguments, 0))); }; } var g = a; 'undefined' !== typeof f ? g = a[f] = [] : f = 'mixpanel'; g.people = g.people || []; h = ['disable', 'track', 'track_pageview', 'track_links', 'track_forms', 'register', 'register_once', 'unregister', 'identify', 'alias', 'name_tag', 'set_config', 'people.set', 'people.increment', 'people.track_charge', 'people.append']; for (e = 0; e < h.length; e++) d(g, h[e]); a._i.push([b, c, f]); }; a.__SV = 1.2; })(document, window.mixpanel || []); var options = alias(this.options, optionsAliases); window.mixpanel.init(options.token, options); this.load(); }; /** * Loaded? * * @return {Boolean} */ Mixpanel.prototype.loaded = function () { return !! (window.mixpanel && window.mixpanel.config); }; /** * Load. * * @param {Function} callback */ Mixpanel.prototype.load = function (callback) { load('//cdn.mxpnl.com/libs/mixpanel-2.2.min.js', callback); }; /** * Page. * * https://mixpanel.com/help/reference/javascript-full-api-reference#mixpanel.track_pageview * * @param {String} category (optional) * @param {String} name (optional) * @param {Object} properties (optional) * @param {Object} options (optional) */ Mixpanel.prototype.page = function (page) { var category = page.category(); var name = page.fullName(); var opts = this.options; // all pages if (opts.trackAllPages) { this.track(page.track()); } // categorized pages if (category && opts.trackCategorizedPages) { this.track(page.track(category)); } // named pages if (name && opts.trackNamedPages) { this.track(page.track(name)); } }; /** * Trait aliases. */ var traitAliases = { created: '$created', email: '$email', firstName: '$first_name', lastName: '$last_name', lastSeen: '$last_seen', name: '$name', username: '$username', phone: '$phone' }; /** * Identify. * * https://mixpanel.com/help/reference/javascript#super-properties * https://mixpanel.com/help/reference/javascript#user-identity * https://mixpanel.com/help/reference/javascript#storing-user-profiles * * @param {Identify} identify */ Mixpanel.prototype.identify = function (identify) { var username = identify.username(); var email = identify.email(); var id = identify.userId(); // id if (id) window.mixpanel.identify(id); // name tag var nametag = email || username || id; if (nametag) window.mixpanel.name_tag(nametag); // traits traits = identify.traits(traitAliases); window.mixpanel.register(traits); if (this.options.people) window.mixpanel.people.set(traits); }; /** * Track. * * https://mixpanel.com/help/reference/javascript#sending-events * https://mixpanel.com/help/reference/javascript#tracking-revenue * * @param {Track} track */ Mixpanel.prototype.track = function (track) { var props = track.properties(); var revenue = track.revenue(); props = dates(props, iso); window.mixpanel.track(track.event(), props); if (revenue && this.options.people) { window.mixpanel.people.track_charge(revenue); } }; /** * Alias. * * https://mixpanel.com/help/reference/javascript#user-identity * https://mixpanel.com/help/reference/javascript-full-api-reference#mixpanel.alias * * @param {Alias} alias */ Mixpanel.prototype.alias = function (alias) { var mp = window.mixpanel; var to = alias.to(); if (mp.get_distinct_id && mp.get_distinct_id() === to) return; // HACK: internal mixpanel API to ensure we don't overwrite if (mp.get_property && mp.get_property('$people_distinct_id') === to) return; // although undocumented, mixpanel takes an optional original id mp.alias(to, alias.from()); }; }); require.register("segmentio-analytics.js-integrations/lib/mojn.js", function(exports, require, module){ /** * Module dependencies. */ var integration = require('integration'); var load = require('load-script'); var is = require('is'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Mojn); }; /** * Expose `Mojn` */ var Mojn = exports.Integration = integration('Mojn') .option('customerCode', '') .global('_agTrack') .readyOnInitialize(); /** * Initialize. * * @param {Object} page */ Mojn.prototype.initialize = function(){ window._agTrack = window._agTrack || []; window._agTrack.push({ cid: this.options.customerCode }); this.load(); }; /** * Load the Mojn script. * * @param {Function} fn */ Mojn.prototype.load = function(fn) { load('https://track.idtargeting.com/' + this.options.customerCode + '/track.js', fn); }; /** * Loaded? * * @return {Boolean} */ Mojn.prototype.loaded = function () { return is.object(window._agTrack); }; /** * Identify. * * @param {Identify} identify */ Mojn.prototype.identify = function(identify) { var email = identify.email(); if (!email) return; var img = new Image(); img.src = '//matcher.idtargeting.com/analytics.gif?cid=' + this.options.customerCode + '&_mjnctid='+email; img.width = 1; img.height = 1; return img; }; /** * Track. * * @param {Track} event */ Mojn.prototype.track = function(track) { var properties = track.properties(); var revenue = properties.revenue; var currency = properties.currency || ''; var conv = currency + revenue; if (!revenue) return; window._agTrack.push({ conv: conv }); return conv; }; }); require.register("segmentio-analytics.js-integrations/lib/mouseflow.js", function(exports, require, module){ var push = require('global-queue')('_mfq'); var integration = require('integration'); var load = require('load-script'); var each = require('each'); /** * Expose plugin */ module.exports = exports = function(analytics){ analytics.addIntegration(Mouseflow); }; /** * Expose `Mouseflow` */ var Mouseflow = exports.Integration = integration('Mouseflow') .assumesPageview() .readyOnLoad() .global('mouseflow') .global('_mfq') .option('apiKey', '') .option('mouseflowHtmlDelay', 0); /** * Iniitalize * * @param {Object} page */ Mouseflow.prototype.initialize = function(page){ this.load(); }; /** * Loaded? * * @return {Boolean} */ Mouseflow.prototype.loaded = function(){ return !! (window._mfq && [].push != window._mfq.push); }; /** * Load mouseflow. * * @param {Function} fn */ Mouseflow.prototype.load = function(fn){ var apiKey = this.options.apiKey; window.mouseflowHtmlDelay = this.options.mouseflowHtmlDelay; load('//cdn.mouseflow.com/projects/' + apiKey + '.js', fn); }; /** * Page. * * //mouseflow.zendesk.com/entries/22528817-Single-page-websites * * @param {Page} page */ Mouseflow.prototype.page = function(page){ if (!window.mouseflow) return; if ('function' != typeof mouseflow.newPageView) return; mouseflow.newPageView(); }; /** * Identify. * * //mouseflow.zendesk.com/entries/24643603-Custom-Variables-Tagging * * @param {Identify} identify */ Mouseflow.prototype.identify = function(identify){ set(identify.traits()); }; /** * Track. * * //mouseflow.zendesk.com/entries/24643603-Custom-Variables-Tagging * * @param {Track} track */ Mouseflow.prototype.track = function(track){ var props = track.properties(); props.event = track.event(); set(props); }; /** * Push the given `hash`. * * @param {Object} hash */ function set(hash){ each(hash, function(k, v){ push('setVariable', k, v); }); } }); require.register("segmentio-analytics.js-integrations/lib/mousestats.js", function(exports, require, module){ var each = require('each'); var integration = require('integration'); var is = require('is'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(MouseStats); }; /** * Expose `MouseStats` integration. */ var MouseStats = exports.Integration = integration('MouseStats') .assumesPageview() .readyOnLoad() .global('msaa') .option('accountNumber', ''); /** * Initialize. * * http://www.mousestats.com/docs/pages/allpages * * @param {Object} page */ MouseStats.prototype.initialize = function (page) { this.load(); }; /** * Loaded? * * @return {Boolean} */ MouseStats.prototype.loaded = function () { return is.fn(window.msaa); }; /** * Load. * * @param {Function} callback */ MouseStats.prototype.load = function (callback) { var number = this.options.accountNumber; var path = number.slice(0,1) + '/' + number.slice(1,2) + '/' + number; var cache = Math.floor(new Date().getTime() / 60000); var partial = '.mousestats.com/js/' + path + '.js?' + cache; var http = 'http://www2' + partial; var https = 'https://ssl' + partial; load({ http: http, https: https }, callback); }; /** * Identify. * * http://www.mousestats.com/docs/wiki/7/how-to-add-custom-data-to-visitor-playbacks * * @param {Identify} identify */ MouseStats.prototype.identify = function (identify) { each(identify.traits(), function (key, value) { window.MouseStatsVisitorPlaybacks.customVariable(key, value); }); }; }); require.register("segmentio-analytics.js-integrations/lib/olark.js", function(exports, require, module){ var callback = require('callback'); var integration = require('integration'); var https = require('use-https'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Olark); }; /** * Expose `Olark` integration. */ var Olark = exports.Integration = integration('Olark') .assumesPageview() .readyOnInitialize() .global('olark') .option('identify', true) .option('page', true) .option('siteId', '') .option('track', false); /** * Initialize. * * http://www.olark.com/documentation * * @param {Object} page */ Olark.prototype.initialize = function (page) { window.olark||(function(c){var f=window,d=document,l=https()?"https:":"http:",z=c.name,r="load";var nt=function(){f[z]=function(){(a.s=a.s||[]).push(arguments)};var a=f[z]._={},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={0:+new Date};a.P=function(u){a.p[u]=new Date-a.p[0]};function s(){a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){hd="head";return["<",hd,"></",hd,"><",i,' onl' + 'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d[i];if(!m){return setTimeout(ld,100)}a.P(1);var j="appendChild",h="createElement",k="src",n=d[h]("div"),v=n[j](d[h](z)),b=d[h]("iframe"),g="document",e="domain",o;n.style.display="none";m.insertBefore(n,m.firstChild).id=z;b.frameBorder="0";b.id=z+"-loader";if(/MSIE[ ]+6/.test(navigator.userAgent)){b.src="javascript:false"}b.allowTransparency="true";v[j](b);try{b.contentWindow[g].open()}catch(w){c[e]=d[e];o="javascript:var d="+g+".open();d.domain='"+d.domain+"';";b[k]=o+"void(0);"}try{var t=b.contentWindow[g];t.write(p());t.close()}catch(x){b[k]=o+'d.write("'+p().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};ld()};nt()})({loader: "static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]}); window.olark.identify(this.options.siteId); // keep track of the widget's open state var self = this; box('onExpand', function () { self._open = true; }); box('onShrink', function () { self._open = false; }); }; /** * Page. * * @param {Page} page */ Olark.prototype.page = function (page) { if (!this.options.page || !this._open) return; var props = page.properties(); var name = page.fullName(); if (!name && !props.url) return; var msg = name ? name.toLowerCase() + ' page' : props.url; chat('sendNotificationToOperator', { body: 'looking at ' + msg // lowercase since olark does }); }; /** * Identify. * * @param {String} id (optional) * @param {Object} traits (optional) * @param {Object} options (optional) */ Olark.prototype.identify = function (identify) { if (!this.options.identify) return; var username = identify.username(); var traits = identify.traits(); var id = identify.userId(); var email = identify.email(); var phone = identify.phone(); var name = identify.name() || identify.firstName(); visitor('updateCustomFields', traits); if (email) visitor('updateEmailAddress', { emailAddress: email }); if (phone) visitor('updatePhoneNumber', { phoneNumber: phone }); // figure out best name if (name) visitor('updateFullName', { fullName: name }); // figure out best nickname var nickname = name || email || username || id; if (name && email) nickname += ' (' + email + ')'; if (nickname) chat('updateVisitorNickname', { snippet: nickname }); }; /** * Track. * * @param {String} event * @param {Object} properties (optional) * @param {Object} options (optional) */ Olark.prototype.track = function (track) { if (!this.options.track || !this._open) return; chat('sendNotificationToOperator', { body: 'visitor triggered "' + track.event() + '"' // lowercase since olark does }); }; /** * Helper method for Olark box API calls. * * @param {String} action * @param {Object} value */ function box (action, value) { window.olark('api.box.' + action, value); } /** * Helper method for Olark visitor API calls. * * @param {String} action * @param {Object} value */ function visitor (action, value) { window.olark('api.visitor.' + action, value); } /** * Helper method for Olark chat API calls. * * @param {String} action * @param {Object} value */ function chat (action, value) { window.olark('api.chat.' + action, value); } }); require.register("segmentio-analytics.js-integrations/lib/optimizely.js", function(exports, require, module){ var bind = require('bind'); var callback = require('callback'); var each = require('each'); var integration = require('integration'); var push = require('global-queue')('optimizely'); var tick = require('next-tick'); /** * Analytics reference. */ var analytics; /** * Expose plugin. */ module.exports = exports = function (ajs) { ajs.addIntegration(Optimizely); analytics = ajs; // store for later }; /** * Expose `Optimizely` integration. */ var Optimizely = exports.Integration = integration('Optimizely') .readyOnInitialize() .option('variations', true) .option('trackNamedPages', true) .option('trackCategorizedPages', true); /** * Initialize. * * https://www.optimizely.com/docs/api#function-calls */ Optimizely.prototype.initialize = function () { if (this.options.variations) tick(this.replay); }; /** * Track. * * https://www.optimizely.com/docs/api#track-event * * @param {Track} track */ Optimizely.prototype.track = function (track) { var props = track.properties(); if (props.revenue) props.revenue *= 100; push('trackEvent', track.event(), props); }; /** * Page. * * https://www.optimizely.com/docs/api#track-event * * @param {Page} page */ Optimizely.prototype.page = function (page) { var category = page.category(); var name = page.fullName(); var opts = this.options; // categorized pages if (category && opts.trackCategorizedPages) { this.track(page.track(category)); } // named pages if (name && opts.trackNamedPages) { this.track(page.track(name)); } }; /** * Replay experiment data as traits to other enabled providers. * * https://www.optimizely.com/docs/api#data-object */ Optimizely.prototype.replay = function () { if (!window.optimizely) return; // in case the snippet isnt on the page var data = window.optimizely.data; if (!data) return; var experiments = data.experiments; var map = data.state.variationNamesMap; var traits = {}; each(map, function (experimentId, variation) { var experiment = experiments[experimentId].name; traits['Experiment: ' + experiment] = variation; }); analytics.identify(traits); }; }); require.register("segmentio-analytics.js-integrations/lib/perfect-audience.js", function(exports, require, module){ var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(PerfectAudience); }; /** * Expose `PerfectAudience` integration. */ var PerfectAudience = exports.Integration = integration('Perfect Audience') .assumesPageview() .readyOnLoad() .global('_pa') .option('siteId', ''); /** * Initialize. * * https://www.perfectaudience.com/docs#javascript_api_autoopen * * @param {Object} page */ PerfectAudience.prototype.initialize = function (page) { window._pa = window._pa || {}; this.load(); }; /** * Loaded? * * @return {Boolean} */ PerfectAudience.prototype.loaded = function () { return !! (window._pa && window._pa.track); }; /** * Load. * * @param {Function} callback */ PerfectAudience.prototype.load = function (callback) { var id = this.options.siteId; load('//tag.perfectaudience.com/serve/' + id + '.js', callback); }; /** * Track. * * @param {Track} event */ PerfectAudience.prototype.track = function (track) { window._pa.track(track.event(), track.properties()); }; }); require.register("segmentio-analytics.js-integrations/lib/pingdom.js", function(exports, require, module){ var date = require('load-date'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_prum'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Pingdom); }; /** * Expose `Pingdom` integration. */ var Pingdom = exports.Integration = integration('Pingdom') .assumesPageview() .readyOnLoad() .global('_prum') .option('id', ''); /** * Initialize. * * @param {Object} page */ Pingdom.prototype.initialize = function (page) { window._prum = window._prum || []; push('id', this.options.id); push('mark', 'firstbyte', date.getTime()); this.load(); }; /** * Loaded? * * @return {Boolean} */ Pingdom.prototype.loaded = function () { return !! (window._prum && window._prum.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ Pingdom.prototype.load = function (callback) { load('//rum-static.pingdom.net/prum.min.js', callback); }; }); require.register("segmentio-analytics.js-integrations/lib/preact.js", function(exports, require, module){ var alias = require('alias'); var callback = require('callback'); var convertDates = require('convert-dates'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_lnq'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Preact); }; /** * Expose `Preact` integration. */ var Preact = exports.Integration = integration('Preact') .assumesPageview() .readyOnInitialize() .global('_lnq') .option('projectCode', ''); /** * Initialize. * * http://www.preact.io/api/javascript * * @param {Object} page */ Preact.prototype.initialize = function (page) { window._lnq = window._lnq || []; push('_setCode', this.options.projectCode); this.load(); }; /** * Loaded? * * @return {Boolean} */ Preact.prototype.loaded = function () { return !! (window._lnq && window._lnq.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ Preact.prototype.load = function (callback) { load('//d2bbvl6dq48fa6.cloudfront.net/js/ln-2.4.min.js', callback); }; /** * Identify. * * @param {Identify} identify */ Preact.prototype.identify = function (identify) { if (!identify.userId()) return; var traits = identify.traits({ created: 'created_at' }); traits = convertDates(traits, convertDate); push('_setPersonData', { name: identify.name(), email: identify.email(), uid: identify.userId(), properties: traits }); }; /** * Group. * * @param {String} id * @param {Object} properties (optional) * @param {Object} options (optional) */ Preact.prototype.group = function (group) { if (!group.groupId()) return; push('_setAccount', group.traits()); }; /** * Track. * * @param {Track} track */ Preact.prototype.track = function (track) { var props = track.properties(); var revenue = track.revenue(); var event = track.event(); var special = { name: event }; if (revenue) { special.revenue = revenue * 100; delete props.revenue; } if (props.note) { special.note = props.note; delete props.note; } push('_logEvent', special, props); }; /** * Convert a `date` to a format Preact supports. * * @param {Date} date * @return {Number} */ function convertDate (date) { return Math.floor(date / 1000); } }); require.register("segmentio-analytics.js-integrations/lib/qualaroo.js", function(exports, require, module){ var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_kiq'); var Facade = require('facade'); var Identify = Facade.Identify; /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Qualaroo); }; /** * Expose `Qualaroo` integration. */ var Qualaroo = exports.Integration = integration('Qualaroo') .assumesPageview() .readyOnInitialize() .global('_kiq') .option('customerId', '') .option('siteToken', '') .option('track', false); /** * Initialize. * * @param {Object} page */ Qualaroo.prototype.initialize = function (page) { window._kiq = window._kiq || []; this.load(); }; /** * Loaded? * * @return {Boolean} */ Qualaroo.prototype.loaded = function () { return !! (window._kiq && window._kiq.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ Qualaroo.prototype.load = function (callback) { var token = this.options.siteToken; var id = this.options.customerId; load('//s3.amazonaws.com/ki.js/' + id + '/' + token + '.js', callback); }; /** * Identify. * * http://help.qualaroo.com/customer/portal/articles/731085-identify-survey-nudge-takers * http://help.qualaroo.com/customer/portal/articles/731091-set-additional-user-properties * * @param {Identify} identify */ Qualaroo.prototype.identify = function (identify) { var traits = identify.traits(); var id = identify.userId(); var email = identify.email(); if (email) id = email; if (id) push('identify', id); if (traits) push('set', traits); }; /** * Track. * * @param {String} event * @param {Object} properties (optional) * @param {Object} options (optional) */ Qualaroo.prototype.track = function (track) { if (!this.options.track) return; var event = track.event(); var traits = {}; traits['Triggered: ' + event] = true; this.identify(new Identify({ traits: traits })); }; }); require.register("segmentio-analytics.js-integrations/lib/quantcast.js", function(exports, require, module){ var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_qevents', { wrap: false }); /** * User reference. */ var user; /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Quantcast); user = analytics.user(); // store for later }; /** * Expose `Quantcast` integration. */ var Quantcast = exports.Integration = integration('Quantcast') .assumesPageview() .readyOnInitialize() .global('_qevents') .global('__qc') .option('pCode', null) .option('labelPages', false); /** * Initialize. * * https://www.quantcast.com/learning-center/guides/using-the-quantcast-asynchronous-tag/ * https://www.quantcast.com/help/cross-platform-audience-measurement-guide/ * * @param {Object} page */ Quantcast.prototype.initialize = function (page) { page = page || {}; window._qevents = window._qevents || []; var opts = this.options; var settings = { qacct: opts.pCode }; if (user.id()) settings.uid = user.id(); push(settings); this.load(); }; /** * Loaded? * * @return {Boolean} */ Quantcast.prototype.loaded = function () { return !! window.__qc; }; /** * Load. * * @param {Function} callback */ Quantcast.prototype.load = function (callback) { load({ http: 'http://edge.quantserve.com/quant.js', https: 'https://secure.quantserve.com/quant.js' }, callback); }; /** * Page. * * https://cloudup.com/cBRRFAfq6mf * * @param {Page} page */ Quantcast.prototype.page = function (page) { var settings = { event: 'refresh', qacct: this.options.pCode, }; if (user.id()) settings.uid = user.id(); push(settings); }; /** * Identify. * * https://www.quantcast.com/help/cross-platform-audience-measurement-guide/ * * @param {String} id (optional) */ Quantcast.prototype.identify = function (identify) { // edit the initial quantcast settings var id = identify.userId(); if (id) window._qevents[0].uid = id; }; /** * Track. * * https://cloudup.com/cBRRFAfq6mf * * @param {Track} track */ Quantcast.prototype.track = function (track) { var settings = { event: 'click', qacct: this.options.pCode }; if (user.id()) settings.uid = user.id(); push(settings); }; }); require.register("segmentio-analytics.js-integrations/lib/rollbar.js", function(exports, require, module){ var callback = require('callback'); var clone = require('clone'); var extend = require('extend'); var integration = require('integration'); var load = require('load-script'); var onError = require('on-error'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Rollbar); }; /** * Expose `Rollbar` integration. */ var Rollbar = exports.Integration = integration('Rollbar') .readyOnInitialize() .assumesPageview() .global('_rollbar') .option('accessToken', '') .option('identify', true); /** * Initialize. * * https://rollbar.com/docs/notifier/rollbar.js/ * * @param {Object} page */ Rollbar.prototype.initialize = function (page) { var options = this.options; window._rollbar = window._rollbar || window._ratchet || [options.accessToken, options]; onError(function() { window._rollbar.push.apply(window._rollbar, arguments); }); this.load(); }; /** * Loaded? * * @return {Boolean} */ Rollbar.prototype.loaded = function () { return !! (window._rollbar && window._rollbar.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ Rollbar.prototype.load = function (callback) { load('//d37gvrvc0wt4s1.cloudfront.net/js/1/rollbar.min.js', callback); }; /** * Identify. * * @param {Identify} identify */ Rollbar.prototype.identify = function (identify) { if (!this.options.identify) return; var traits = identify.traits(); var rollbar = window._rollbar; var params = rollbar.shift ? rollbar[1] = rollbar[1] || {} : rollbar.extraParams = rollbar.extraParams || {}; params.person = params.person || {}; extend(params.person, traits); }; }); require.register("segmentio-analytics.js-integrations/lib/saasquatch.js", function(exports, require, module){ /** * Module dependencies. */ var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function(analytics){ analytics.addIntegration(SaaSquatch); }; /** * Expose `SaaSquatch` integration. */ var SaaSquatch = exports.Integration = integration('SaaSquatch') .readyOnInitialize() .option('tenantAlias', '') .global('_sqh'); /** * Initialize * * @param {Page} page */ SaaSquatch.prototype.initialize = function(page){}; /** * Loaded? * * @return {Boolean} */ SaaSquatch.prototype.loaded = function(){ return window._sqh && window._sqh.push != [].push; }; /** * Load the SaaSquatch library. * * @param {Function} fn */ SaaSquatch.prototype.load = function(fn){ load('//d2rcp9ak152ke1.cloudfront.net/assets/javascripts/squatch.min.js', fn); }; /** * Identify. * * @param {Facade} identify */ SaaSquatch.prototype.identify = function(identify){ var sqh = window._sqh = window._sqh || []; var accountId = identify.proxy('traits.accountId'); var image = identify.proxy('traits.referralImage'); var opts = identify.options(this.name); var id = identify.userId(); var email = identify.email(); if (!(id || email)) return; if (this.called) return; var init = { tenant_alias: this.options.tenantAlias, first_name: identify.firstName(), last_name: identify.lastName(), user_image: identify.avatar(), email: email, user_id: id, }; if (accountId) init.account_id = accountId; if (opts.checksum) init.checksum = opts.checksum; if (image) init.fb_share_image = image; sqh.push(['init', init]); this.called = true; this.load(); }; }); require.register("segmentio-analytics.js-integrations/lib/sentry.js", function(exports, require, module){ var integration = require('integration'); var is = require('is'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Sentry); }; /** * Expose `Sentry` integration. */ var Sentry = exports.Integration = integration('Sentry') .readyOnLoad() .global('Raven') .option('config', ''); /** * Initialize. * * http://raven-js.readthedocs.org/en/latest/config/index.html */ Sentry.prototype.initialize = function () { var config = this.options.config; this.load(function () { // for now, raven basically requires `install` to be called // https://github.com/getsentry/raven-js/blob/master/src/raven.js#L113 window.Raven.config(config).install(); }); }; /** * Loaded? * * @return {Boolean} */ Sentry.prototype.loaded = function () { return is.object(window.Raven); }; /** * Load. * * @param {Function} callback */ Sentry.prototype.load = function (callback) { load('//cdn.ravenjs.com/1.1.10/native/raven.min.js', callback); }; /** * Identify. * * @param {Identify} identify */ Sentry.prototype.identify = function (identify) { window.Raven.setUser(identify.traits()); }; }); require.register("segmentio-analytics.js-integrations/lib/snapengage.js", function(exports, require, module){ var integration = require('integration'); var is = require('is'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(SnapEngage); }; /** * Expose `SnapEngage` integration. */ var SnapEngage = exports.Integration = integration('SnapEngage') .assumesPageview() .readyOnLoad() .global('SnapABug') .option('apiKey', ''); /** * Initialize. * * http://help.snapengage.com/installation-guide-getting-started-in-a-snap/ * * @param {Object} page */ SnapEngage.prototype.initialize = function (page) { this.load(); }; /** * Loaded? * * @return {Boolean} */ SnapEngage.prototype.loaded = function () { return is.object(window.SnapABug); }; /** * Load. * * @param {Function} callback */ SnapEngage.prototype.load = function (callback) { var key = this.options.apiKey; var url = '//commondatastorage.googleapis.com/code.snapengage.com/js/' + key + '.js'; load(url, callback); }; /** * Identify. * * @param {Identify} identify */ SnapEngage.prototype.identify = function (identify) { var email = identify.email(); if (!email) return; window.SnapABug.setUserEmail(email); }; }); require.register("segmentio-analytics.js-integrations/lib/spinnakr.js", function(exports, require, module){ var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Spinnakr); }; /** * Expose `Spinnakr` integration. */ var Spinnakr = exports.Integration = integration('Spinnakr') .assumesPageview() .readyOnLoad() .global('_spinnakr_site_id') .global('_spinnakr') .option('siteId', ''); /** * Initialize. * * @param {Object} page */ Spinnakr.prototype.initialize = function (page) { window._spinnakr_site_id = this.options.siteId; this.load(); }; /** * Loaded? * * @return {Boolean} */ Spinnakr.prototype.loaded = function () { return !! window._spinnakr; }; /** * Load. * * @param {Function} callback */ Spinnakr.prototype.load = function (callback) { load('//d3ojzyhbolvoi5.cloudfront.net/js/so.js', callback); }; }); require.register("segmentio-analytics.js-integrations/lib/tapstream.js", function(exports, require, module){ var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); var slug = require('slug'); var push = require('global-queue')('_tsq'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Tapstream); }; /** * Expose `Tapstream` integration. */ var Tapstream = exports.Integration = integration('Tapstream') .assumesPageview() .readyOnInitialize() .global('_tsq') .option('accountName', '') .option('trackAllPages', true) .option('trackNamedPages', true) .option('trackCategorizedPages', true); /** * Initialize. * * @param {Object} page */ Tapstream.prototype.initialize = function (page) { window._tsq = window._tsq || []; push('setAccountName', this.options.accountName); this.load(); }; /** * Loaded? * * @return {Boolean} */ Tapstream.prototype.loaded = function () { return !! (window._tsq && window._tsq.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ Tapstream.prototype.load = function (callback) { load('//cdn.tapstream.com/static/js/tapstream.js', callback); }; /** * Page. * * @param {Page} page */ Tapstream.prototype.page = function (page) { var category = page.category(); var opts = this.options; var name = page.fullName(); // all pages if (opts.trackAllPages) { this.track(page.track()); } // named pages if (name && opts.trackNamedPages) { this.track(page.track(name)); } // categorized pages if (category && opts.trackCategorizedPages) { this.track(page.track(category)); } }; /** * Track. * * @param {Track} track */ Tapstream.prototype.track = function (track) { var props = track.properties(); push('fireHit', slug(track.event()), [props.url]); // needs events as slugs }; }); require.register("segmentio-analytics.js-integrations/lib/trakio.js", function(exports, require, module){ var alias = require('alias'); var callback = require('callback'); var clone = require('clone'); var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Trakio); }; /** * Expose `Trakio` integration. */ var Trakio = exports.Integration = integration('trak.io') .assumesPageview() .readyOnInitialize() .global('trak') .option('token', '') .option('trackNamedPages', true) .option('trackCategorizedPages', true); /** * Options aliases. */ var optionsAliases = { initialPageview: 'auto_track_page_view' }; /** * Initialize. * * https://docs.trak.io * * @param {Object} page */ Trakio.prototype.initialize = function (page) { var self = this; var options = this.options; window.trak = window.trak || []; window.trak.io = window.trak.io || {}; window.trak.io.load = function(e) {self.load(); var r = function(e) {return function() {window.trak.push([e].concat(Array.prototype.slice.call(arguments,0))); }; } ,i=["initialize","identify","track","alias","channel","source","host","protocol","page_view"]; for (var s=0;s<i.length;s++) window.trak.io[i[s]]=r(i[s]); window.trak.io.initialize.apply(window.trak.io,arguments); }; window.trak.io.load(options.token, alias(options, optionsAliases)); this.load(); }; /** * Loaded? * * @return {Boolean} */ Trakio.prototype.loaded = function () { return !! (window.trak && window.trak.loaded); }; /** * Load the trak.io library. * * @param {Function} callback */ Trakio.prototype.load = function (callback) { load('//d29p64779x43zo.cloudfront.net/v1/trak.io.min.js', callback); }; /** * Page. * * @param {Page} page */ Trakio.prototype.page = function (page) { var category = page.category(); var props = page.properties(); var name = page.fullName(); window.trak.io.page_view(props.path, name || props.title); // named pages if (name && this.options.trackNamedPages) { this.track(page.track(name)); } // categorized pages if (category && this.options.trackCategorizedPages) { this.track(page.track(category)); } }; /** * Trait aliases. * * http://docs.trak.io/properties.html#special */ var traitAliases = { avatar: 'avatar_url', firstName: 'first_name', lastName: 'last_name' }; /** * Identify. * * @param {Identify} identify */ Trakio.prototype.identify = function (identify) { var traits = identify.traits(traitAliases); var id = identify.userId(); if (id) { window.trak.io.identify(id, traits); } else { window.trak.io.identify(traits); } }; /** * Group. * * @param {String} id (optional) * @param {Object} properties (optional) * @param {Object} options (optional) * * TODO: add group * TODO: add `trait.company/organization` from trak.io docs http://docs.trak.io/properties.html#special */ /** * Track. * * @param {Track} track */ Trakio.prototype.track = function (track) { window.trak.io.track(track.event(), track.properties()); }; /** * Alias. * * @param {Alias} alias */ Trakio.prototype.alias = function (alias) { if (!window.trak.io.distinct_id) return; var from = alias.from(); var to = alias.to(); if (to === window.trak.io.distinct_id()) return; if (from) { window.trak.io.alias(from, to); } else { window.trak.io.alias(to); } }; }); require.register("segmentio-analytics.js-integrations/lib/twitter-ads.js", function(exports, require, module){ var pixel = require('load-pixel')('//analytics.twitter.com/i/adsct'); var integration = require('integration'); /** * Expose plugin */ module.exports = exports = function(analytics){ analytics.addIntegration(TwitterAds); }; /** * Expose `load` */ exports.load = pixel; /** * HOP */ var has = Object.prototype.hasOwnProperty; /** * Expose `TwitterAds` */ var TwitterAds = exports.Integration = integration('Twitter Ads') .readyOnInitialize() .option('events', {}); /** * Track. * * @param {Track} track */ TwitterAds.prototype.track = function(track){ var events = this.options.events; var event = track.event(); if (!has.call(events, event)) return; return exports.load({ txn_id: events[event], p_id: 'Twitter' }); }; }); require.register("segmentio-analytics.js-integrations/lib/usercycle.js", function(exports, require, module){ var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_uc'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Usercycle); }; /** * Expose `Usercycle` integration. */ var Usercycle = exports.Integration = integration('USERcycle') .assumesPageview() .readyOnInitialize() .global('_uc') .option('key', ''); /** * Initialize. * * http://docs.usercycle.com/javascript_api * * @param {Object} page */ Usercycle.prototype.initialize = function (page) { push('_key', this.options.key); this.load(); }; /** * Loaded? * * @return {Boolean} */ Usercycle.prototype.loaded = function () { return !! (window._uc && window._uc.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ Usercycle.prototype.load = function (callback) { load('//api.usercycle.com/javascripts/track.js', callback); }; /** * Identify. * * @param {Identify} identify */ Usercycle.prototype.identify = function (identify) { var traits = identify.traits(); var id = identify.userId(); if (id) push('uid', id); // there's a special `came_back` event used for retention and traits push('action', 'came_back', traits); }; /** * Track. * * @param {Track} track */ Usercycle.prototype.track = function (track) { push('action', track.event(), track.properties({ revenue: 'revenue_amount' })); }; }); require.register("segmentio-analytics.js-integrations/lib/userfox.js", function(exports, require, module){ var alias = require('alias'); var callback = require('callback'); var convertDates = require('convert-dates'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_ufq'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Userfox); }; /** * Expose `Userfox` integration. */ var Userfox = exports.Integration = integration('userfox') .assumesPageview() .readyOnInitialize() .global('_ufq') .option('clientId', ''); /** * Initialize. * * https://www.userfox.com/docs/ * * @param {Object} page */ Userfox.prototype.initialize = function (page) { window._ufq = []; this.load(); }; /** * Loaded? * * @return {Boolean} */ Userfox.prototype.loaded = function () { return !! (window._ufq && window._ufq.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ Userfox.prototype.load = function (callback) { load('//d2y71mjhnajxcg.cloudfront.net/js/userfox-stable.js', callback); }; /** * Identify. * * https://www.userfox.com/docs/#custom-data * * @param {Identify} identify */ Userfox.prototype.identify = function (identify) { var traits = identify.traits({ created: 'signup_date' }); var email = identify.email(); if (!email) return; // initialize the library with the email now that we have it push('init', { clientId: this.options.clientId, email: email }); traits = convertDates(traits, formatDate); push('track', traits); }; /** * Convert a `date` to a format userfox supports. * * @param {Date} date * @return {String} */ function formatDate (date) { return Math.round(date.getTime() / 1000).toString(); } }); require.register("segmentio-analytics.js-integrations/lib/uservoice.js", function(exports, require, module){ var alias = require('alias'); var callback = require('callback'); var clone = require('clone'); var convertDates = require('convert-dates'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('UserVoice'); var unix = require('to-unix-timestamp'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(UserVoice); }; /** * Expose `UserVoice` integration. */ var UserVoice = exports.Integration = integration('UserVoice') .assumesPageview() .readyOnInitialize() .global('UserVoice') .global('showClassicWidget') .option('apiKey', '') .option('classic', false) .option('forumId', null) .option('showWidget', true) .option('mode', 'contact') .option('accentColor', '#448dd6') .option('smartvote', true) .option('trigger', null) .option('triggerPosition', 'bottom-right') .option('triggerColor', '#ffffff') .option('triggerBackgroundColor', 'rgba(46, 49, 51, 0.6)') // BACKWARDS COMPATIBILITY: classic options .option('classicMode', 'full') .option('primaryColor', '#cc6d00') .option('linkColor', '#007dbf') .option('defaultMode', 'support') .option('tabLabel', 'Feedback & Support') .option('tabColor', '#cc6d00') .option('tabPosition', 'middle-right') .option('tabInverted', false); /** * When in "classic" mode, on `construct` swap all of the method to point to * their classic counterparts. */ UserVoice.on('construct', function (integration) { if (!integration.options.classic) return; integration.group = undefined; integration.identify = integration.identifyClassic; integration.initialize = integration.initializeClassic; }); /** * Initialize. * * @param {Object} page */ UserVoice.prototype.initialize = function (page) { var options = this.options; var opts = formatOptions(options); push('set', opts); push('autoprompt', {}); if (options.showWidget) { options.trigger ? push('addTrigger', options.trigger, opts) : push('addTrigger', opts); } this.load(); }; /** * Loaded? * * @return {Boolean} */ UserVoice.prototype.loaded = function () { return !! (window.UserVoice && window.UserVoice.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ UserVoice.prototype.load = function (callback) { var key = this.options.apiKey; load('//widget.uservoice.com/' + key + '.js', callback); }; /** * Identify. * * @param {Identify} identify */ UserVoice.prototype.identify = function (identify) { var traits = identify.traits({ created: 'created_at' }); traits = convertDates(traits, unix); push('identify', traits); }; /** * Group. * * @param {Group} group */ UserVoice.prototype.group = function (group) { var traits = group.traits({ created: 'created_at' }); traits = convertDates(traits, unix); push('identify', { account: traits }); }; /** * Initialize (classic). * * @param {Object} options * @param {Function} ready */ UserVoice.prototype.initializeClassic = function () { var options = this.options; window.showClassicWidget = showClassicWidget; // part of public api if (options.showWidget) showClassicWidget('showTab', formatClassicOptions(options)); this.load(); }; /** * Identify (classic). * * @param {Identify} identify */ UserVoice.prototype.identifyClassic = function (identify) { push('setCustomFields', identify.traits()); }; /** * Format the options for UserVoice. * * @param {Object} options * @return {Object} */ function formatOptions (options) { return alias(options, { forumId: 'forum_id', accentColor: 'accent_color', smartvote: 'smartvote_enabled', triggerColor: 'trigger_color', triggerBackgroundColor: 'trigger_background_color', triggerPosition: 'trigger_position' }); } /** * Format the classic options for UserVoice. * * @param {Object} options * @return {Object} */ function formatClassicOptions (options) { return alias(options, { forumId: 'forum_id', classicMode: 'mode', primaryColor: 'primary_color', tabPosition: 'tab_position', tabColor: 'tab_color', linkColor: 'link_color', defaultMode: 'default_mode', tabLabel: 'tab_label', tabInverted: 'tab_inverted' }); } /** * Show the classic version of the UserVoice widget. This method is usually part * of UserVoice classic's public API. * * @param {String} type ('showTab' or 'showLightbox') * @param {Object} options (optional) */ function showClassicWidget (type, options) { type = type || 'showLightbox'; push(type, 'classic_widget', options); } }); require.register("segmentio-analytics.js-integrations/lib/vero.js", function(exports, require, module){ var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); var push = require('global-queue')('_veroq'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Vero); }; /** * Expose `Vero` integration. */ var Vero = exports.Integration = integration('Vero') .assumesPageview() .readyOnInitialize() .global('_veroq') .option('apiKey', ''); /** * Initialize. * * https://github.com/getvero/vero-api/blob/master/sections/js.md * * @param {Object} page */ Vero.prototype.initialize = function (pgae) { push('init', { api_key: this.options.apiKey }); this.load(); }; /** * Loaded? * * @return {Boolean} */ Vero.prototype.loaded = function () { return !! (window._veroq && window._veroq.push !== Array.prototype.push); }; /** * Load. * * @param {Function} callback */ Vero.prototype.load = function (callback) { load('//d3qxef4rp70elm.cloudfront.net/m.js', callback); }; /** * Identify. * * https://github.com/getvero/vero-api/blob/master/sections/js.md#user-identification * * @param {Identify} identify */ Vero.prototype.identify = function (identify) { var traits = identify.traits(); var email = identify.email(); var id = identify.userId(); if (!id || !email) return; // both required push('user', traits); }; /** * Track. * * https://github.com/getvero/vero-api/blob/master/sections/js.md#tracking-events * * @param {Track} track */ Vero.prototype.track = function (track) { push('track', track.event(), track.properties()); }; }); require.register("segmentio-analytics.js-integrations/lib/visual-website-optimizer.js", function(exports, require, module){ var callback = require('callback'); var each = require('each'); var integration = require('integration'); var tick = require('next-tick'); /** * Analytics reference. */ var analytics; /** * Expose plugin. */ module.exports = exports = function (ajs) { ajs.addIntegration(VWO); analytics = ajs; }; /** * Expose `VWO` integration. */ var VWO = exports.Integration = integration('Visual Website Optimizer') .readyOnInitialize() .option('replay', true); /** * Initialize. * * http://v2.visualwebsiteoptimizer.com/tools/get_tracking_code.php */ VWO.prototype.initialize = function () { if (this.options.replay) this.replay(); }; /** * Replay the experiments the user has seen as traits to all other integrations. * Wait for the next tick to replay so that the `analytics` object and all of * the integrations are fully initialized. */ VWO.prototype.replay = function () { tick(function () { experiments(function (err, traits) { if (traits) analytics.identify(traits); }); }); }; /** * Get dictionary of experiment keys and variations. * * http://visualwebsiteoptimizer.com/knowledge/integration-of-vwo-with-kissmetrics/ * * @param {Function} callback * @return {Object} */ function experiments (callback) { enqueue(function () { var data = {}; var ids = window._vwo_exp_ids; if (!ids) return callback(); each(ids, function (id) { var name = variation(id); if (name) data['Experiment: ' + id] = name; }); callback(null, data); }); } /** * Add a `fn` to the VWO queue, creating one if it doesn't exist. * * @param {Function} fn */ function enqueue (fn) { window._vis_opt_queue = window._vis_opt_queue || []; window._vis_opt_queue.push(fn); } /** * Get the chosen variation's name from an experiment `id`. * * http://visualwebsiteoptimizer.com/knowledge/integration-of-vwo-with-kissmetrics/ * * @param {String} id * @return {String} */ function variation (id) { var experiments = window._vwo_exp; if (!experiments) return null; var experiment = experiments[id]; var variationId = experiment.combination_chosen; return variationId ? experiment.comb_n[variationId] : null; } }); require.register("segmentio-analytics.js-integrations/lib/webengage.js", function(exports, require, module){ var integration = require('integration'); var load = require('load-script'); /** * Expose plugin */ module.exports = exports = function(analytics){ analytics.addIntegration(WebEngage); }; /** * Expose `WebEngage` integration */ var WebEngage = exports.Integration = integration('WebEngage') .assumesPageview() .readyOnLoad() .global('_weq') .global('webengage') .option('widgetVersion', '4.0') .option('licenseCode', ''); /** * Initialize. * * @param {Object} page */ WebEngage.prototype.initialize = function(page){ var _weq = window._weq = window._weq || {}; _weq['webengage.licenseCode'] = this.options.licenseCode; _weq['webengage.widgetVersion'] = this.options.widgetVersion; this.load(); }; /** * Loaded? * * @return {Boolean} */ WebEngage.prototype.loaded = function(){ return !! window.webengage; }; /** * Load * * @param {Function} fn */ WebEngage.prototype.load = function(fn){ var path = '/js/widget/webengage-min-v-4.0.js'; load({ https: 'https://ssl.widgets.webengage.com' + path, http: 'http://cdn.widgets.webengage.com' + path }, fn); }; }); require.register("segmentio-analytics.js-integrations/lib/woopra.js", function(exports, require, module){ var each = require('each'); var extend = require('extend'); var integration = require('integration'); var isEmail = require('is-email'); var load = require('load-script'); var type = require('type'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Woopra); }; /** * Expose `Woopra` integration. */ var Woopra = exports.Integration = integration('Woopra') .readyOnLoad() .global('woopra') .option('domain', ''); /** * Initialize. * * http://www.woopra.com/docs/setup/javascript-tracking/ * * @param {Object} page */ Woopra.prototype.initialize = function (page) { (function () {var i, s, z, w = window, d = document, a = arguments, q = 'script', f = ['config', 'track', 'identify', 'visit', 'push', 'call'], c = function () {var i, self = this; self._e = []; for (i = 0; i < f.length; i++) {(function (f) {self[f] = function () {self._e.push([f].concat(Array.prototype.slice.call(arguments, 0))); return self; }; })(f[i]); } }; w._w = w._w || {}; for (i = 0; i < a.length; i++) { w._w[a[i]] = w[a[i]] = w[a[i]] || new c(); } })('woopra'); window.woopra.config({ domain: this.options.domain }); this.load(); }; /** * Loaded? * * @return {Boolean} */ Woopra.prototype.loaded = function () { return !! (window.woopra && window.woopra.loaded); }; /** * Load. * * @param {Function} callback */ Woopra.prototype.load = function (callback) { load('//static.woopra.com/js/w.js', callback); }; /** * Page. * * @param {String} category (optional) */ Woopra.prototype.page = function (page) { var props = page.properties(); var name = page.fullName(); if (name) props.title = name; window.woopra.track('pv', props); }; /** * Identify. * * @param {Identify} identify */ Woopra.prototype.identify = function (identify) { window.woopra.identify(identify.traits()).push(); // `push` sends it off async }; /** * Track. * * @param {Track} track */ Woopra.prototype.track = function (track) { window.woopra.track(track.event(), track.properties()); }; }); require.register("segmentio-analytics.js-integrations/lib/yandex-metrica.js", function(exports, require, module){ var callback = require('callback'); var integration = require('integration'); var load = require('load-script'); /** * Expose plugin. */ module.exports = exports = function (analytics) { analytics.addIntegration(Yandex); }; /** * Expose `Yandex` integration. */ var Yandex = exports.Integration = integration('Yandex Metrica') .assumesPageview() .readyOnInitialize() .global('yandex_metrika_callbacks') .global('Ya') .option('counterId', null); /** * Initialize. * * http://api.yandex.com/metrika/ * https://metrica.yandex.com/22522351?step=2#tab=code * * @param {Object} page */ Yandex.prototype.initialize = function (page) { var id = this.options.counterId; push(function () { window['yaCounter' + id] = new window.Ya.Metrika({ id: id }); }); this.load(); }; /** * Loaded? * * @return {Boolean} */ Yandex.prototype.loaded = function () { return !! (window.Ya && window.Ya.Metrika); }; /** * Load. * * @param {Function} callback */ Yandex.prototype.load = function (callback) { load('//mc.yandex.ru/metrika/watch.js', callback); }; /** * Push a new callback on the global Yandex queue. * * @param {Function} callback */ function push (callback) { window.yandex_metrika_callbacks = window.yandex_metrika_callbacks || []; window.yandex_metrika_callbacks.push(callback); } }); require.register("segmentio-canonical/index.js", function(exports, require, module){ module.exports = function canonical () { var tags = document.getElementsByTagName('link'); for (var i = 0, tag; tag = tags[i]; i++) { if ('canonical' == tag.getAttribute('rel')) return tag.getAttribute('href'); } }; }); require.register("segmentio-extend/index.js", function(exports, require, module){ module.exports = function extend (object) { // Takes an unlimited number of extenders. var args = Array.prototype.slice.call(arguments, 1); // For each extender, copy their properties on our object. for (var i = 0, source; source = args[i]; i++) { if (!source) continue; for (var property in source) { object[property] = source[property]; } } return object; }; }); require.register("camshaft-require-component/index.js", function(exports, require, module){ /** * Require a module with a fallback */ module.exports = function(parent) { function require(name, fallback) { try { return parent(name); } catch (e) { try { return parent(fallback || name+"-component"); } catch(e2) { throw e; } } }; // Merge the old properties for (var key in parent) { require[key] = parent[key]; } return require; }; }); require.register("ianstormtaylor-to-camel-case/index.js", function(exports, require, module){ var toSpace = require('to-space-case'); /** * Expose `toCamelCase`. */ module.exports = toCamelCase; /** * Convert a `string` to camel case. * * @param {String} string * @return {String} */ function toCamelCase (string) { return toSpace(string).replace(/\s(\w)/g, function (matches, letter) { return letter.toUpperCase(); }); } }); require.register("ianstormtaylor-to-capital-case/index.js", function(exports, require, module){ var clean = require('to-no-case'); /** * Expose `toCapitalCase`. */ module.exports = toCapitalCase; /** * Convert a `string` to capital case. * * @param {String} string * @return {String} */ function toCapitalCase (string) { return clean(string).replace(/(^|\s)(\w)/g, function (matches, previous, letter) { return previous + letter.toUpperCase(); }); } }); require.register("ianstormtaylor-to-constant-case/index.js", function(exports, require, module){ var snake = require('to-snake-case'); /** * Expose `toConstantCase`. */ module.exports = toConstantCase; /** * Convert a `string` to constant case. * * @param {String} string * @return {String} */ function toConstantCase (string) { return snake(string).toUpperCase(); } }); require.register("ianstormtaylor-to-dot-case/index.js", function(exports, require, module){ var toSpace = require('to-space-case'); /** * Expose `toDotCase`. */ module.exports = toDotCase; /** * Convert a `string` to slug case. * * @param {String} string * @return {String} */ function toDotCase (string) { return toSpace(string).replace(/\s/g, '.'); } }); require.register("ianstormtaylor-to-no-case/index.js", function(exports, require, module){ /** * Expose `toNoCase`. */ module.exports = toNoCase; /** * Test whether a string is camel-case. */ var hasSpace = /\s/; var hasCamel = /[a-z][A-Z]/; var hasSeparator = /[\W_]/; /** * Remove any starting case from a `string`, like camel or snake, but keep * spaces and punctuation that may be important otherwise. * * @param {String} string * @return {String} */ function toNoCase (string) { if (hasSpace.test(string)) return string.toLowerCase(); if (hasSeparator.test(string)) string = unseparate(string); if (hasCamel.test(string)) string = uncamelize(string); return string.toLowerCase(); } /** * Separator splitter. */ var separatorSplitter = /[\W_]+(.|$)/g; /** * Un-separate a `string`. * * @param {String} string * @return {String} */ function unseparate (string) { return string.replace(separatorSplitter, function (m, next) { return next ? ' ' + next : ''; }); } /** * Camelcase splitter. */ var camelSplitter = /(.)([A-Z]+)/g; /** * Un-camelcase a `string`. * * @param {String} string * @return {String} */ function uncamelize (string) { return string.replace(camelSplitter, function (m, previous, uppers) { return previous + ' ' + uppers.toLowerCase().split('').join(' '); }); } }); require.register("ianstormtaylor-to-pascal-case/index.js", function(exports, require, module){ var toSpace = require('to-space-case'); /** * Expose `toPascalCase`. */ module.exports = toPascalCase; /** * Convert a `string` to pascal case. * * @param {String} string * @return {String} */ function toPascalCase (string) { return toSpace(string).replace(/(?:^|\s)(\w)/g, function (matches, letter) { return letter.toUpperCase(); }); } }); require.register("ianstormtaylor-to-sentence-case/index.js", function(exports, require, module){ var clean = require('to-no-case'); /** * Expose `toSentenceCase`. */ module.exports = toSentenceCase; /** * Convert a `string` to camel case. * * @param {String} string * @return {String} */ function toSentenceCase (string) { return clean(string).replace(/[a-z]/i, function (letter) { return letter.toUpperCase(); }); } }); require.register("ianstormtaylor-to-slug-case/index.js", function(exports, require, module){ var toSpace = require('to-space-case'); /** * Expose `toSlugCase`. */ module.exports = toSlugCase; /** * Convert a `string` to slug case. * * @param {String} string * @return {String} */ function toSlugCase (string) { return toSpace(string).replace(/\s/g, '-'); } }); require.register("ianstormtaylor-to-snake-case/index.js", function(exports, require, module){ var toSpace = require('to-space-case'); /** * Expose `toSnakeCase`. */ module.exports = toSnakeCase; /** * Convert a `string` to snake case. * * @param {String} string * @return {String} */ function toSnakeCase (string) { return toSpace(string).replace(/\s/g, '_'); } }); require.register("ianstormtaylor-to-space-case/index.js", function(exports, require, module){ var clean = require('to-no-case'); /** * Expose `toSpaceCase`. */ module.exports = toSpaceCase; /** * Convert a `string` to space case. * * @param {String} string * @return {String} */ function toSpaceCase (string) { return clean(string).replace(/[\W_]+(.|$)/g, function (matches, match) { return match ? ' ' + match : ''; }); } }); require.register("component-escape-regexp/index.js", function(exports, require, module){ /** * Escape regexp special characters in `str`. * * @param {String} str * @return {String} * @api public */ module.exports = function(str){ return String(str).replace(/([.*+?=^!:${}()|[\]\/\\])/g, '\\$1'); }; }); require.register("ianstormtaylor-map/index.js", function(exports, require, module){ var each = require('each'); /** * Map an array or object. * * @param {Array|Object} obj * @param {Function} iterator * @return {Mixed} */ module.exports = function map (obj, iterator) { var arr = []; each(obj, function (o) { arr.push(iterator.apply(null, arguments)); }); return arr; }; }); require.register("ianstormtaylor-title-case-minors/index.js", function(exports, require, module){ module.exports = [ 'a', 'an', 'and', 'as', 'at', 'but', 'by', 'en', 'for', 'from', 'how', 'if', 'in', 'neither', 'nor', 'of', 'on', 'only', 'onto', 'out', 'or', 'per', 'so', 'than', 'that', 'the', 'to', 'until', 'up', 'upon', 'v', 'v.', 'versus', 'vs', 'vs.', 'via', 'when', 'with', 'without', 'yet' ]; }); require.register("ianstormtaylor-to-title-case/index.js", function(exports, require, module){ var capital = require('to-capital-case') , escape = require('escape-regexp') , map = require('map') , minors = require('title-case-minors'); /** * Expose `toTitleCase`. */ module.exports = toTitleCase; /** * Minors. */ var escaped = map(minors, escape); var minorMatcher = new RegExp('[^^]\\b(' + escaped.join('|') + ')\\b', 'ig'); var colonMatcher = /:\s*(\w)/g; /** * Convert a `string` to camel case. * * @param {String} string * @return {String} */ function toTitleCase (string) { return capital(string) .replace(minorMatcher, function (minor) { return minor.toLowerCase(); }) .replace(colonMatcher, function (letter) { return letter.toUpperCase(); }); } }); require.register("ianstormtaylor-case/lib/index.js", function(exports, require, module){ var cases = require('./cases'); /** * Expose `determineCase`. */ module.exports = exports = determineCase; /** * Determine the case of a `string`. * * @param {String} string * @return {String|Null} */ function determineCase (string) { for (var key in cases) { if (key == 'none') continue; var convert = cases[key]; if (convert(string) == string) return key; } return null; } /** * Define a case by `name` with a `convert` function. * * @param {String} name * @param {Object} convert */ exports.add = function (name, convert) { exports[name] = cases[name] = convert; }; /** * Add all the `cases`. */ for (var key in cases) { exports.add(key, cases[key]); } }); require.register("ianstormtaylor-case/lib/cases.js", function(exports, require, module){ var camel = require('to-camel-case') , capital = require('to-capital-case') , constant = require('to-constant-case') , dot = require('to-dot-case') , none = require('to-no-case') , pascal = require('to-pascal-case') , sentence = require('to-sentence-case') , slug = require('to-slug-case') , snake = require('to-snake-case') , space = require('to-space-case') , title = require('to-title-case'); /** * Camel. */ exports.camel = camel; /** * Pascal. */ exports.pascal = pascal; /** * Dot. Should precede lowercase. */ exports.dot = dot; /** * Slug. Should precede lowercase. */ exports.slug = slug; /** * Snake. Should precede lowercase. */ exports.snake = snake; /** * Space. Should precede lowercase. */ exports.space = space; /** * Constant. Should precede uppercase. */ exports.constant = constant; /** * Capital. Should precede sentence and title. */ exports.capital = capital; /** * Title. */ exports.title = title; /** * Sentence. */ exports.sentence = sentence; /** * Convert a `string` to lower case from camel, slug, etc. Different that the * usual `toLowerCase` in that it will try to break apart the input first. * * @param {String} string * @return {String} */ exports.lower = function (string) { return none(string).toLowerCase(); }; /** * Convert a `string` to upper case from camel, slug, etc. Different that the * usual `toUpperCase` in that it will try to break apart the input first. * * @param {String} string * @return {String} */ exports.upper = function (string) { return none(string).toUpperCase(); }; /** * Invert each character in a `string` from upper to lower and vice versa. * * @param {String} string * @return {String} */ exports.inverse = function (string) { for (var i = 0, char; char = string[i]; i++) { if (!/[a-z]/i.test(char)) continue; var upper = char.toUpperCase(); var lower = char.toLowerCase(); string[i] = char == upper ? lower : upper; } return string; }; /** * None. */ exports.none = none; }); require.register("segmentio-obj-case/index.js", function(exports, require, module){ var Case = require('case'); var cases = [ Case.upper, Case.lower, Case.snake, Case.pascal, Case.camel, Case.constant, Case.title, Case.capital, Case.sentence ]; /** * Module exports, export */ module.exports = module.exports.find = multiple(find); /** * Export the replacement function, return the modified object */ module.exports.replace = function (obj, key, val) { multiple(replace).apply(this, arguments); return obj; }; /** * Export the delete function, return the modified object */ module.exports.del = function (obj, key) { multiple(del).apply(this, arguments); return obj; }; /** * Compose applying the function to a nested key */ function multiple (fn) { return function (obj, key, val) { var keys = key.split('.'); if (keys.length === 0) return; while (keys.length > 1) { key = keys.shift(); obj = find(obj, key); if (obj === null || obj === undefined) return; } key = keys.shift(); return fn(obj, key, val); }; } /** * Find an object by its key * * find({ first_name : 'Calvin' }, 'firstName') */ function find (obj, key) { for (var i = 0; i < cases.length; i++) { var cased = cases[i](key); if (obj.hasOwnProperty(cased)) return obj[cased]; } } /** * Delete a value for a given key * * del({ a : 'b', x : 'y' }, 'X' }) -> { a : 'b' } */ function del (obj, key) { for (var i = 0; i < cases.length; i++) { var cased = cases[i](key); if (obj.hasOwnProperty(cased)) delete obj[cased]; } return obj; } /** * Replace an objects existing value with a new one * * replace({ a : 'b' }, 'a', 'c') -> { a : 'c' } */ function replace (obj, key, val) { for (var i = 0; i < cases.length; i++) { var cased = cases[i](key); if (obj.hasOwnProperty(cased)) obj[cased] = val; } return obj; } }); require.register("segmentio-facade/lib/index.js", function(exports, require, module){ var Facade = require('./facade'); /** * Expose `Facade` facade. */ module.exports = Facade; /** * Expose specific-method facades. */ Facade.Alias = require('./alias'); Facade.Group = require('./group'); Facade.Identify = require('./identify'); Facade.Track = require('./track'); Facade.Page = require('./page'); }); require.register("segmentio-facade/lib/alias.js", function(exports, require, module){ var Facade = require('./facade'); var component = require('require-component')(require); var inherit = component('inherit'); /** * Expose `Alias` facade. */ module.exports = Alias; /** * Initialize a new `Alias` facade with a `dictionary` of arguments. * * @param {Object} dictionary * @property {String} from * @property {String} to * @property {Object} options */ function Alias (dictionary) { Facade.call(this, dictionary); } /** * Inherit from `Facade`. */ inherit(Alias, Facade); /** * Return type of facade. * * @return {String} */ Alias.prototype.action = function () { return 'alias'; }; /** * Setup some basic proxies. */ Alias.prototype.from = Facade.field('from'); Alias.prototype.to = Facade.field('to'); }); require.register("segmentio-facade/lib/facade.js", function(exports, require, module){ var component = require('require-component')(require); var clone = component('clone'); var isEnabled = component('./is-enabled'); var objCase = component('obj-case'); /** * Expose `Facade`. */ module.exports = Facade; /** * Initialize a new `Facade` with an `obj` of arguments. * * @param {Object} obj */ function Facade (obj) { if (!obj.hasOwnProperty('timestamp')) obj.timestamp = new Date(); else obj.timestamp = new Date(obj.timestamp); this.obj = obj; } /** * Return a proxy function for a `field` that will attempt to first use methods, * and fallback to accessing the underlying object directly. You can specify * deeply nested fields too like: * * this.proxy('options.Librato'); * * @param {String} field */ Facade.prototype.proxy = function (field) { var fields = field.split('.'); field = fields.shift(); // Call a function at the beginning to take advantage of facaded fields var obj = this[field] || this.field(field); if (!obj) return obj; if (typeof obj === 'function') obj = obj.call(this) || {}; if (fields.length === 0) return clone(obj); obj = objCase(obj, fields.join('.')); return clone(obj); }; /** * Directly access a specific `field` from the underlying object, returning a * clone so outsiders don't mess with stuff. * * @param {String} field * @return {Mixed} */ Facade.prototype.field = function (field) { return clone(this.obj[field]); }; /** * Utility method to always proxy a particular `field`. You can specify deeply * nested fields too like: * * Facade.proxy('options.Librato'); * * @param {String} field * @return {Function} */ Facade.proxy = function (field) { return function () { return this.proxy(field); }; }; /** * Utility method to directly access a `field`. * * @param {String} field * @return {Function} */ Facade.field = function (field) { return function () { return this.field(field); }; }; /** * Get the basic json object of this facade. * * @return {Object} */ Facade.prototype.json = function () { return clone(this.obj); }; /** * Get the options of a call (formerly called "context"). If you pass an * integration name, it will get the options for that specific integration, or * undefined if the integration is not enabled. * * @param {String} integration (optional) * @return {Object or Null} */ Facade.prototype.options = function (integration) { var options = clone(this.obj.options || this.obj.context) || {}; if (!integration) return clone(options); if (!this.enabled(integration)) return; options = options[integration] || objCase(options, integration) || {}; return typeof options === 'boolean' ? {} : clone(options); }; /** * Check whether an integration is enabled. * * @param {String} integration * @return {Boolean} */ Facade.prototype.enabled = function (integration) { var allEnabled = this.proxy('options.providers.all'); if (typeof allEnabled !== 'boolean') allEnabled = this.proxy('options.all'); if (typeof allEnabled !== 'boolean') allEnabled = true; var enabled = allEnabled && isEnabled(integration); var options = this.options(); // If the integration is explicitly enabled or disabled, use that // First, check options.providers for backwards compatibility if (options.providers && options.providers.hasOwnProperty(integration)) { enabled = options.providers[integration]; } // Next, check for the integration's existence in 'options' to enable it. // If the settings are a boolean, use that, otherwise it should be enabled. if (options.hasOwnProperty(integration)) { var settings = options[integration]; if (typeof settings === 'boolean') { enabled = settings; } else { enabled = true; } } return enabled ? true : false; }; /** * Get the `userAgent` option. * * @return {String} */ Facade.prototype.userAgent = function () {}; /** * Check whether the user is active. * * @return {Boolean} */ Facade.prototype.active = function () { var active = this.proxy('options.active'); if (active === null || active === undefined) active = true; return active; }; /** * Setup some basic proxies. */ Facade.prototype.channel = Facade.field('channel'); Facade.prototype.timestamp = Facade.field('timestamp'); Facade.prototype.ip = Facade.proxy('options.ip'); }); require.register("segmentio-facade/lib/group.js", function(exports, require, module){ var Facade = require('./facade'); var component = require('require-component')(require); var inherit = component('inherit'); var newDate = component('new-date'); /** * Expose `Group` facade. */ module.exports = Group; /** * Initialize a new `Group` facade with a `dictionary` of arguments. * * @param {Object} dictionary * @param {String} userId * @param {String} groupId * @param {Object} properties * @param {Object} options */ function Group (dictionary) { Facade.call(this, dictionary); } /** * Inherit from `Facade` */ inherit(Group, Facade); /** * Get the facade's action. */ Group.prototype.action = function () { return 'group'; }; /** * Setup some basic proxies. */ Group.prototype.groupId = Facade.field('groupId'); Group.prototype.userId = Facade.field('userId'); /** * Get created or createdAt. * * @return {Date} */ Group.prototype.created = function(){ var created = this.proxy('traits.createdAt') || this.proxy('traits.created') || this.proxy('properties.createdAt') || this.proxy('properties.created'); if (created) return newDate(created); }; /** * Get the group's traits. * * @param {Object} aliases * @return {Object} */ Group.prototype.traits = function (aliases) { var ret = this.properties(); var id = this.groupId(); aliases = aliases || {}; if (id) ret.id = id; for (var alias in aliases) { var value = null == this[alias] ? this.proxy('traits.' + alias) : this[alias](); if (null == value) continue; ret[aliases[alias]] = value; delete ret[alias]; } return ret; }; /** * Get traits or properties. * * TODO: remove me * * @return {Object} */ Group.prototype.properties = function(){ return this.field('traits') || this.field('properties') || {}; }; }); require.register("segmentio-facade/lib/page.js", function(exports, require, module){ var component = require('require-component')(require); var Facade = component('./facade'); var inherit = component('inherit'); var Track = require('./track'); /** * Expose `Page` facade */ module.exports = Page; /** * Initialize new `Page` facade with `dictionary`. * * @param {Object} dictionary * @param {String} category * @param {String} name * @param {Object} traits * @param {Object} options */ function Page(dictionary){ Facade.call(this, dictionary); } /** * Inherit from `Facade` */ inherit(Page, Facade); /** * Get the facade's action. * * @return {String} */ Page.prototype.action = function(){ return 'page'; }; /** * Proxies */ Page.prototype.category = Facade.field('category'); Page.prototype.name = Facade.field('name'); /** * Get the page properties mixing `category` and `name`. * * @return {Object} */ Page.prototype.properties = function(){ var props = this.field('properties') || {}; var category = this.category(); var name = this.name(); if (category) props.category = category; if (name) props.name = name; return props; }; /** * Get the page fullName. * * @return {String} */ Page.prototype.fullName = function(){ var category = this.category(); var name = this.name(); return name && category ? category + ' ' + name : name; }; /** * Get event with `name`. * * @return {String} */ Page.prototype.event = function(name){ return name ? 'Viewed ' + name + ' Page' : 'Loaded a Page'; }; /** * Convert this Page to a Track facade with `name`. * * @param {String} name * @return {Track} */ Page.prototype.track = function(name){ var props = this.properties(); return new Track({ event: this.event(name), properties: props }); }; }); require.register("segmentio-facade/lib/identify.js", function(exports, require, module){ var component = require('require-component')(require); var clone = component('clone'); var Facade = component('./facade'); var inherit = component('inherit'); var isEmail = component('is-email'); var newDate = component('new-date'); var trim = component('trim'); /** * Expose `Idenfity` facade. */ module.exports = Identify; /** * Initialize a new `Identify` facade with a `dictionary` of arguments. * * @param {Object} dictionary * @param {String} userId * @param {String} sessionId * @param {Object} traits * @param {Object} options */ function Identify (dictionary) { Facade.call(this, dictionary); } /** * Inherit from `Facade`. */ inherit(Identify, Facade); /** * Get the facade's action. */ Identify.prototype.action = function () { return 'identify'; }; /** * Setup some basic proxies. */ Identify.prototype.userId = Facade.field('userId'); Identify.prototype.sessionId = Facade.field('sessionId'); /** * Get the user's traits. * * @param {Object} aliases * @return {Object} */ Identify.prototype.traits = function (aliases) { var ret = this.field('traits') || {}; var id = this.userId(); aliases = aliases || {}; if (id) ret.id = id; for (var alias in aliases) { var value = null == this[alias] ? this.proxy('traits.' + alias) : this[alias](); if (null == value) continue; ret[aliases[alias]] = value; delete ret[alias]; } return ret; }; /** * Get the user's email, falling back to their user ID if it's a valid email. * * @return {String} */ Identify.prototype.email = function () { var email = this.proxy('traits.email'); if (email) return email; var userId = this.userId(); if (isEmail(userId)) return userId; }; /** * Get the user's created date, optionally looking for `createdAt` since lots of * people do that instead. * * @return {Date or Undefined} */ Identify.prototype.created = function () { var created = this.proxy('traits.created') || this.proxy('traits.createdAt'); if (created) return newDate(created); }; /** * Get the company created date. * * @return {Date or undefined} */ Identify.prototype.companyCreated = function(){ var created = this.proxy('traits.company.created') || this.proxy('traits.company.createdAt'); if (created) return newDate(created); }; /** * Get the user's name, optionally combining a first and last name if that's all * that was provided. * * @return {String or Undefined} */ Identify.prototype.name = function () { var name = this.proxy('traits.name'); if (typeof name === 'string') return trim(name); var firstName = this.firstName(); var lastName = this.lastName(); if (firstName && lastName) return trim(firstName + ' ' + lastName); }; /** * Get the user's first name, optionally splitting it out of a single name if * that's all that was provided. * * @return {String or Undefined} */ Identify.prototype.firstName = function () { var firstName = this.proxy('traits.firstName'); if (typeof firstName === 'string') return trim(firstName); var name = this.proxy('traits.name'); if (typeof name === 'string') return trim(name).split(' ')[0]; }; /** * Get the user's last name, optionally splitting it out of a single name if * that's all that was provided. * * @return {String or Undefined} */ Identify.prototype.lastName = function () { var lastName = this.proxy('traits.lastName'); if (typeof lastName === 'string') return trim(lastName); var name = this.proxy('traits.name'); if (typeof name !== 'string') return; var space = trim(name).indexOf(' '); if (space === -1) return; return trim(name.substr(space + 1)); }; /** * Get the user's unique id. * * @return {String or undefined} */ Identify.prototype.uid = function(){ return this.userId() || this.username() || this.email(); }; /** * Get description. * * @return {String} */ Identify.prototype.description = function(){ return this.proxy('traits.description') || this.proxy('traits.background'); }; /** * Setup sme basic "special" trait proxies. */ Identify.prototype.username = Facade.proxy('traits.username'); Identify.prototype.website = Facade.proxy('traits.website'); Identify.prototype.phone = Facade.proxy('traits.phone'); Identify.prototype.address = Facade.proxy('traits.address'); Identify.prototype.avatar = Facade.proxy('traits.avatar'); }); require.register("segmentio-facade/lib/is-enabled.js", function(exports, require, module){ /** * A few integrations are disabled by default. They must be explicitly * enabled by setting options[Provider] = true. */ var disabled = { Salesforce: true, Marketo: true }; /** * Check whether an integration should be enabled by default. * * @param {String} integration * @return {Boolean} */ module.exports = function (integration) { return ! disabled[integration]; }; }); require.register("segmentio-facade/lib/track.js", function(exports, require, module){ var component = require('require-component')(require); var clone = component('clone'); var Facade = component('./facade'); var Identify = component('./identify'); var inherit = component('inherit'); var isEmail = component('is-email'); var traverse = component('isodate-traverse'); /** * Expose `Track` facade. */ module.exports = Track; /** * Initialize a new `Track` facade with a `dictionary` of arguments. * * @param {object} dictionary * @property {String} event * @property {String} userId * @property {String} sessionId * @property {Object} properties * @property {Object} options */ function Track (dictionary) { Facade.call(this, dictionary); } /** * Inherit from `Facade`. */ inherit(Track, Facade); /** * Return the facade's action. * * @return {String} */ Track.prototype.action = function () { return 'track'; }; /** * Setup some basic proxies. */ Track.prototype.userId = Facade.field('userId'); Track.prototype.sessionId = Facade.field('sessionId'); Track.prototype.event = Facade.field('event'); Track.prototype.value = Facade.proxy('properties.value'); /** * Misc */ Track.prototype.category = Facade.proxy('properties.category'); Track.prototype.country = Facade.proxy('properties.country'); Track.prototype.state = Facade.proxy('properties.state'); Track.prototype.city = Facade.proxy('properties.city'); Track.prototype.zip = Facade.proxy('properties.zip'); /** * Ecommerce */ Track.prototype.id = Facade.proxy('properties.id'); Track.prototype.sku = Facade.proxy('properties.sku'); Track.prototype.tax = Facade.proxy('properties.tax'); Track.prototype.name = Facade.proxy('properties.name'); Track.prototype.price = Facade.proxy('properties.price'); Track.prototype.total = Facade.proxy('properties.total'); Track.prototype.coupon = Facade.proxy('properties.coupon'); Track.prototype.orderId = Facade.proxy('properties.orderId'); Track.prototype.shipping = Facade.proxy('properties.shipping'); /** * Get subtotal. * * @return {Number} */ Track.prototype.subtotal = function(){ var subtotal = this.obj.properties.subtotal; var total = this.total(); var n; if (subtotal) return subtotal; if (!total) return 0; if (n = this.tax()) total -= n; if (n = this.shipping()) total -= n; return total; }; /** * Get products. * * @return {Array} */ Track.prototype.products = function(){ var props = this.obj.properties || {}; return props.products || []; }; /** * Get quantity. * * @return {Number} */ Track.prototype.quantity = function(){ var props = this.obj.properties || {}; return props.quantity || 1; }; /** * Get currency. * * @return {String} */ Track.prototype.currency = function(){ var props = this.obj.properties || {}; return props.currency || 'USD'; }; /** * BACKWARDS COMPATIBILITY: should probably re-examine where these come from. */ Track.prototype.referrer = Facade.proxy('properties.referrer'); Track.prototype.query = Facade.proxy('options.query'); /** * Get the call's properties. * * @param {Object} aliases * @return {Object} */ Track.prototype.properties = function (aliases) { var ret = this.field('properties') || {}; aliases = aliases || {}; for (var alias in aliases) { var value = null == this[alias] ? this.proxy('properties.' + alias) : this[alias](); if (null == value) continue; ret[aliases[alias]] = value; delete ret[alias]; } return clone(traverse(ret)); }; /** * Get the call's "super properties" which are just traits that have been * passed in as if from an identify call. * * @return {Object} */ Track.prototype.traits = function () { return this.proxy('options.traits') || {}; }; /** * Get the call's username. * * @return {String or Undefined} */ Track.prototype.username = function () { return this.proxy('traits.username') || this.proxy('properties.username') || this.userId() || this.sessionId(); }; /** * Get the call's email, using an the user ID if it's a valid email. * * @return {String or Undefined} */ Track.prototype.email = function () { var email = this.proxy('traits.email'); if (email) return email; var userId = this.userId(); if (isEmail(userId)) return userId; }; /** * Get the call's revenue, parsing it from a string with an optional leading * dollar sign. * * @return {String or Undefined} */ Track.prototype.revenue = function () { var revenue = this.proxy('properties.revenue'); if (!revenue) return; if (typeof revenue === 'number') return revenue; if (typeof revenue !== 'string') return; revenue = revenue.replace(/\$/g, ''); revenue = parseFloat(revenue); if (!isNaN(revenue)) return revenue; }; /** * Get cents. * * @return {Number} */ Track.prototype.cents = function(){ var revenue = this.revenue(); return 'number' != typeof revenue ? this.value() || 0 : revenue * 100; }; /** * A utility to turn the pieces of a track call into an identify. Used for * integrations with super properties or rate limits. * * TODO: remove me. * * @return {Facade} */ Track.prototype.identify = function () { var json = this.json(); json.traits = this.traits(); return new Identify(json); }; }); require.register("segmentio-is-email/index.js", function(exports, require, module){ /** * Expose `isEmail`. */ module.exports = isEmail; /** * Email address matcher. */ var matcher = /.+\@.+\..+/; /** * Loosely validate an email address. * * @param {String} string * @return {Boolean} */ function isEmail (string) { return matcher.test(string); } }); require.register("segmentio-is-meta/index.js", function(exports, require, module){ module.exports = function isMeta (e) { if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return true; // Logic that handles checks for the middle mouse button, based // on [jQuery](https://github.com/jquery/jquery/blob/master/src/event.js#L466). var which = e.which, button = e.button; if (!which && button !== undefined) { return (!button & 1) && (!button & 2) && (button & 4); } else if (which === 2) { return true; } return false; }; }); require.register("segmentio-isodate/index.js", function(exports, require, module){ /** * Matcher, slightly modified from: * * https://github.com/csnover/js-iso8601/blob/lax/iso8601.js */ var matcher = /^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/; /** * Convert an ISO date string to a date. Fallback to native `Date.parse`. * * https://github.com/csnover/js-iso8601/blob/lax/iso8601.js * * @param {String} iso * @return {Date} */ exports.parse = function (iso) { var numericKeys = [1, 5, 6, 7, 8, 11, 12]; var arr = matcher.exec(iso); var offset = 0; // fallback to native parsing if (!arr) return new Date(iso); // remove undefined values for (var i = 0, val; val = numericKeys[i]; i++) { arr[val] = parseInt(arr[val], 10) || 0; } // allow undefined days and months arr[2] = parseInt(arr[2], 10) || 1; arr[3] = parseInt(arr[3], 10) || 1; // month is 0-11 arr[2]--; // allow abitrary sub-second precision if (arr[8]) arr[8] = (arr[8] + '00').substring(0, 3); // apply timezone if one exists if (arr[4] == ' ') { offset = new Date().getTimezoneOffset(); } else if (arr[9] !== 'Z' && arr[10]) { offset = arr[11] * 60 + arr[12]; if ('+' == arr[10]) offset = 0 - offset; } var millis = Date.UTC(arr[1], arr[2], arr[3], arr[5], arr[6] + offset, arr[7], arr[8]); return new Date(millis); }; /** * Checks whether a `string` is an ISO date string. `strict` mode requires that * the date string at least have a year, month and date. * * @param {String} string * @param {Boolean} strict * @return {Boolean} */ exports.is = function (string, strict) { if (strict && false === /^\d{4}-\d{2}-\d{2}/.test(string)) return false; return matcher.test(string); }; }); require.register("segmentio-isodate-traverse/index.js", function(exports, require, module){ var is = require('is'); var isodate = require('isodate'); var each; try { each = require('each'); } catch (err) { each = require('each-component'); } /** * Expose `traverse`. */ module.exports = traverse; /** * Traverse an object or array, and return a clone with all ISO strings parsed * into Date objects. * * @param {Object} obj * @return {Object} */ function traverse (input, strict) { if (strict === undefined) strict = true; if (is.object(input)) { return object(input, strict); } else if (is.array(input)) { return array(input, strict); } } /** * Object traverser. * * @param {Object} obj * @param {Boolean} strict * @return {Object} */ function object (obj, strict) { each(obj, function (key, val) { if (isodate.is(val, strict)) { obj[key] = isodate.parse(val); } else if (is.object(val) || is.array(val)) { traverse(val, strict); } }); return obj; } /** * Array traverser. * * @param {Array} arr * @param {Boolean} strict * @return {Array} */ function array (arr, strict) { each(arr, function (val, x) { if (is.object(val)) { traverse(val, strict); } else if (isodate.is(val, strict)) { arr[x] = isodate.parse(val); } }); return arr; } }); require.register("component-json-fallback/index.js", function(exports, require, module){ /* json2.js 2014-02-04 Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. See http://www.JSON.org/js.html This code should be minified before deployment. See http://javascript.crockford.com/jsmin.html USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO NOT CONTROL. This file creates a global JSON object containing two methods: stringify and parse. JSON.stringify(value, replacer, space) value any JavaScript value, usually an object or array. replacer an optional parameter that determines how object values are stringified for objects. It can be a function or an array of strings. space an optional parameter that specifies the indentation of nested structures. If it is omitted, the text will be packed without extra whitespace. If it is a number, it will specify the number of spaces to indent at each level. If it is a string (such as '\t' or '&nbsp;'), it contains the characters used to indent at each level. This method produces a JSON text from a JavaScript value. When an object value is found, if the object contains a toJSON method, its toJSON method will be called and the result will be stringified. A toJSON method does not serialize: it returns the value represented by the name/value pair that should be serialized, or undefined if nothing should be serialized. The toJSON method will be passed the key associated with the value, and this will be bound to the value For example, this would serialize Dates as ISO strings. Date.prototype.toJSON = function (key) { function f(n) { // Format integers to have at least two digits. return n < 10 ? '0' + n : n; } return this.getUTCFullYear() + '-' + f(this.getUTCMonth() + 1) + '-' + f(this.getUTCDate()) + 'T' + f(this.getUTCHours()) + ':' + f(this.getUTCMinutes()) + ':' + f(this.getUTCSeconds()) + 'Z'; }; You can provide an optional replacer method. It will be passed the key and value of each member, with this bound to the containing object. The value that is returned from your method will be serialized. If your method returns undefined, then the member will be excluded from the serialization. If the replacer parameter is an array of strings, then it will be used to select the members to be serialized. It filters the results such that only members with keys listed in the replacer array are stringified. Values that do not have JSON representations, such as undefined or functions, will not be serialized. Such values in objects will be dropped; in arrays they will be replaced with null. You can use a replacer function to replace those with JSON values. JSON.stringify(undefined) returns undefined. The optional space parameter produces a stringification of the value that is filled with line breaks and indentation to make it easier to read. If the space parameter is a non-empty string, then that string will be used for indentation. If the space parameter is a number, then the indentation will be that many spaces. Example: text = JSON.stringify(['e', {pluribus: 'unum'}]); // text is '["e",{"pluribus":"unum"}]' text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' text = JSON.stringify([new Date()], function (key, value) { return this[key] instanceof Date ? 'Date(' + this[key] + ')' : value; }); // text is '["Date(---current time---)"]' JSON.parse(text, reviver) This method parses a JSON text to produce an object or array. It can throw a SyntaxError exception. The optional reviver parameter is a function that can filter and transform the results. It receives each of the keys and values, and its return value is used instead of the original value. If it returns what it received, then the structure is not modified. If it returns undefined then the member is deleted. Example: // Parse the text. Values that look like ISO date strings will // be converted to Date objects. myData = JSON.parse(text, function (key, value) { var a; if (typeof value === 'string') { a = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); if (a) { return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6])); } } return value; }); myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { var d; if (typeof value === 'string' && value.slice(0, 5) === 'Date(' && value.slice(-1) === ')') { d = new Date(value.slice(5, -1)); if (d) { return d; } } return value; }); This is a reference implementation. You are free to copy, modify, or redistribute. */ /*jslint evil: true, regexp: true */ /*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, lastIndex, length, parse, prototype, push, replace, slice, stringify, test, toJSON, toString, valueOf */ // Create a JSON object only if one does not already exist. We create the // methods in a closure to avoid creating global variables. if (typeof JSON !== 'object') { JSON = {}; } (function () { 'use strict'; function f(n) { // Format integers to have at least two digits. return n < 10 ? '0' + n : n; } if (typeof Date.prototype.toJSON !== 'function') { Date.prototype.toJSON = function () { return isFinite(this.valueOf()) ? this.getUTCFullYear() + '-' + f(this.getUTCMonth() + 1) + '-' + f(this.getUTCDate()) + 'T' + f(this.getUTCHours()) + ':' + f(this.getUTCMinutes()) + ':' + f(this.getUTCSeconds()) + 'Z' : null; }; String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function () { return this.valueOf(); }; } var cx, escapable, gap, indent, meta, rep; function quote(string) { // If the string contains no control characters, no quote characters, and no // backslash characters, then we can safely slap some quotes around it. // Otherwise we must also replace the offending characters with safe escape // sequences. escapable.lastIndex = 0; return escapable.test(string) ? '"' + string.replace(escapable, function (a) { var c = meta[a]; return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); }) + '"' : '"' + string + '"'; } function str(key, holder) { // Produce a string from holder[key]. var i, // The loop counter. k, // The member key. v, // The member value. length, mind = gap, partial, value = holder[key]; // If the value has a toJSON method, call it to obtain a replacement value. if (value && typeof value === 'object' && typeof value.toJSON === 'function') { value = value.toJSON(key); } // If we were called with a replacer function, then call the replacer to // obtain a replacement value. if (typeof rep === 'function') { value = rep.call(holder, key, value); } // What happens next depends on the value's type. switch (typeof value) { case 'string': return quote(value); case 'number': // JSON numbers must be finite. Encode non-finite numbers as null. return isFinite(value) ? String(value) : 'null'; case 'boolean': case 'null': // If the value is a boolean or null, convert it to a string. Note: // typeof null does not produce 'null'. The case is included here in // the remote chance that this gets fixed someday. return String(value); // If the type is 'object', we might be dealing with an object or an array or // null. case 'object': // Due to a specification blunder in ECMAScript, typeof null is 'object', // so watch out for that case. if (!value) { return 'null'; } // Make an array to hold the partial results of stringifying this object value. gap += indent; partial = []; // Is the value an array? if (Object.prototype.toString.apply(value) === '[object Array]') { // The value is an array. Stringify every element. Use null as a placeholder // for non-JSON values. length = value.length; for (i = 0; i < length; i += 1) { partial[i] = str(i, value) || 'null'; } // Join all of the elements together, separated with commas, and wrap them in // brackets. v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']'; gap = mind; return v; } // If the replacer is an array, use it to select the members to be stringified. if (rep && typeof rep === 'object') { length = rep.length; for (i = 0; i < length; i += 1) { if (typeof rep[i] === 'string') { k = rep[i]; v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ': ' : ':') + v); } } } } else { // Otherwise, iterate through all of the keys in the object. for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ': ' : ':') + v); } } } } // Join all of the member texts together, separated with commas, // and wrap them in braces. v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}'; gap = mind; return v; } } // If the JSON object does not yet have a stringify method, give it one. if (typeof JSON.stringify !== 'function') { escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; meta = { // table of character substitutions '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\' }; JSON.stringify = function (value, replacer, space) { // The stringify method takes a value and an optional replacer, and an optional // space parameter, and returns a JSON text. The replacer can be a function // that can replace values, or an array of strings that will select the keys. // A default replacer method can be provided. Use of the space parameter can // produce text that is more easily readable. var i; gap = ''; indent = ''; // If the space parameter is a number, make an indent string containing that // many spaces. if (typeof space === 'number') { for (i = 0; i < space; i += 1) { indent += ' '; } // If the space parameter is a string, it will be used as the indent string. } else if (typeof space === 'string') { indent = space; } // If there is a replacer, it must be a function or an array. // Otherwise, throw an error. rep = replacer; if (replacer && typeof replacer !== 'function' && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) { throw new Error('JSON.stringify'); } // Make a fake root object containing our value under the key of ''. // Return the result of stringifying the value. return str('', {'': value}); }; } // If the JSON object does not yet have a parse method, give it one. if (typeof JSON.parse !== 'function') { cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; JSON.parse = function (text, reviver) { // The parse method takes a text and an optional reviver function, and returns // a JavaScript value if the text is a valid JSON text. var j; function walk(holder, key) { // The walk method is used to recursively walk the resulting structure so // that modifications can be made. var k, v, value = holder[key]; if (value && typeof value === 'object') { for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = walk(value, k); if (v !== undefined) { value[k] = v; } else { delete value[k]; } } } } return reviver.call(holder, key, value); } // Parsing happens in four stages. In the first stage, we replace certain // Unicode characters with escape sequences. JavaScript handles many characters // incorrectly, either silently deleting them, or treating them as line endings. text = String(text); cx.lastIndex = 0; if (cx.test(text)) { text = text.replace(cx, function (a) { return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); }); } // In the second stage, we run the text against regular expressions that look // for non-JSON patterns. We are especially concerned with '()' and 'new' // because they can cause invocation, and '=' because it can cause mutation. // But just to be safe, we want to reject all unexpected forms. // We split the second stage into 4 regexp operations in order to work around // crippling inefficiencies in IE's and Safari's regexp engines. First we // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we // replace all simple value tokens with ']' characters. Third, we delete all // open brackets that follow a colon or comma or that begin the text. Finally, // we look to see that the remaining characters are only whitespace or ']' or // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. if (/^[\],:{}\s]*$/ .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { // In the third stage we use the eval function to compile the text into a // JavaScript structure. The '{' operator is subject to a syntactic ambiguity // in JavaScript: it can begin a block or an object literal. We wrap the text // in parens to eliminate the ambiguity. j = eval('(' + text + ')'); // In the optional fourth stage, we recursively walk the new structure, passing // each name/value pair to a reviver function for possible transformation. return typeof reviver === 'function' ? walk({'': j}, '') : j; } // If the text is not JSON parseable, then a SyntaxError is thrown. throw new SyntaxError('JSON.parse'); }; } }()); module.exports = JSON; }); require.register("segmentio-json/index.js", function(exports, require, module){ module.exports = 'undefined' == typeof JSON ? require('json-fallback') : JSON; }); require.register("segmentio-new-date/lib/index.js", function(exports, require, module){ var is = require('is'); var isodate = require('isodate'); var milliseconds = require('./milliseconds'); var seconds = require('./seconds'); /** * Returns a new Javascript Date object, allowing a variety of extra input types * over the native Date constructor. * * @param {Date|String|Number} val */ module.exports = function newDate (val) { if (is.date(val)) return val; if (is.number(val)) return new Date(toMs(val)); // date strings if (isodate.is(val)) return isodate.parse(val); if (milliseconds.is(val)) return milliseconds.parse(val); if (seconds.is(val)) return seconds.parse(val); // fallback to Date.parse return new Date(val); }; /** * If the number passed val is seconds from the epoch, turn it into milliseconds. * Milliseconds would be greater than 31557600000 (December 31, 1970). * * @param {Number} num */ function toMs (num) { if (num < 31557600000) return num * 1000; return num; } }); require.register("segmentio-new-date/lib/milliseconds.js", function(exports, require, module){ /** * Matcher. */ var matcher = /\d{13}/; /** * Check whether a string is a millisecond date string. * * @param {String} string * @return {Boolean} */ exports.is = function (string) { return matcher.test(string); }; /** * Convert a millisecond string to a date. * * @param {String} millis * @return {Date} */ exports.parse = function (millis) { millis = parseInt(millis, 10); return new Date(millis); }; }); require.register("segmentio-new-date/lib/seconds.js", function(exports, require, module){ /** * Matcher. */ var matcher = /\d{10}/; /** * Check whether a string is a second date string. * * @param {String} string * @return {Boolean} */ exports.is = function (string) { return matcher.test(string); }; /** * Convert a second string to a date. * * @param {String} seconds * @return {Date} */ exports.parse = function (seconds) { var millis = parseInt(seconds, 10) * 1000; return new Date(millis); }; }); require.register("segmentio-store.js/store.js", function(exports, require, module){ ;(function(win){ var store = {}, doc = win.document, localStorageName = 'localStorage', namespace = '__storejs__', storage store.disabled = false store.set = function(key, value) {} store.get = function(key) {} store.remove = function(key) {} store.clear = function() {} store.transact = function(key, defaultVal, transactionFn) { var val = store.get(key) if (transactionFn == null) { transactionFn = defaultVal defaultVal = null } if (typeof val == 'undefined') { val = defaultVal || {} } transactionFn(val) store.set(key, val) } store.getAll = function() {} store.serialize = function(value) { return JSON.stringify(value) } store.deserialize = function(value) { if (typeof value != 'string') { return undefined } try { return JSON.parse(value) } catch(e) { return value || undefined } } // Functions to encapsulate questionable FireFox 3.6.13 behavior // when about.config::dom.storage.enabled === false // See https://github.com/marcuswestin/store.js/issues#issue/13 function isLocalStorageNameSupported() { try { return (localStorageName in win && win[localStorageName]) } catch(err) { return false } } if (isLocalStorageNameSupported()) { storage = win[localStorageName] store.set = function(key, val) { if (val === undefined) { return store.remove(key) } storage.setItem(key, store.serialize(val)) return val } store.get = function(key) { return store.deserialize(storage.getItem(key)) } store.remove = function(key) { storage.removeItem(key) } store.clear = function() { storage.clear() } store.getAll = function() { var ret = {} for (var i=0; i<storage.length; ++i) { var key = storage.key(i) ret[key] = store.get(key) } return ret } } else if (doc.documentElement.addBehavior) { var storageOwner, storageContainer // Since #userData storage applies only to specific paths, we need to // somehow link our data to a specific path. We choose /favicon.ico // as a pretty safe option, since all browsers already make a request to // this URL anyway and being a 404 will not hurt us here. We wrap an // iframe pointing to the favicon in an ActiveXObject(htmlfile) object // (see: http://msdn.microsoft.com/en-us/library/aa752574(v=VS.85).aspx) // since the iframe access rules appear to allow direct access and // manipulation of the document element, even for a 404 page. This // document can be used instead of the current document (which would // have been limited to the current path) to perform #userData storage. try { storageContainer = new ActiveXObject('htmlfile') storageContainer.open() storageContainer.write('<s' + 'cript>document.w=window</s' + 'cript><iframe src="/favicon.ico"></iframe>') storageContainer.close() storageOwner = storageContainer.w.frames[0].document storage = storageOwner.createElement('div') } catch(e) { // somehow ActiveXObject instantiation failed (perhaps some special // security settings or otherwse), fall back to per-path storage storage = doc.createElement('div') storageOwner = doc.body } function withIEStorage(storeFunction) { return function() { var args = Array.prototype.slice.call(arguments, 0) args.unshift(storage) // See http://msdn.microsoft.com/en-us/library/ms531081(v=VS.85).aspx // and http://msdn.microsoft.com/en-us/library/ms531424(v=VS.85).aspx storageOwner.appendChild(storage) storage.addBehavior('#default#userData') storage.load(localStorageName) var result = storeFunction.apply(store, args) storageOwner.removeChild(storage) return result } } // In IE7, keys may not contain special chars. See all of https://github.com/marcuswestin/store.js/issues/40 var forbiddenCharsRegex = new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]", "g") function ieKeyFix(key) { return key.replace(forbiddenCharsRegex, '___') } store.set = withIEStorage(function(storage, key, val) { key = ieKeyFix(key) if (val === undefined) { return store.remove(key) } storage.setAttribute(key, store.serialize(val)) storage.save(localStorageName) return val }) store.get = withIEStorage(function(storage, key) { key = ieKeyFix(key) return store.deserialize(storage.getAttribute(key)) }) store.remove = withIEStorage(function(storage, key) { key = ieKeyFix(key) storage.removeAttribute(key) storage.save(localStorageName) }) store.clear = withIEStorage(function(storage) { var attributes = storage.XMLDocument.documentElement.attributes storage.load(localStorageName) for (var i=0, attr; attr=attributes[i]; i++) { storage.removeAttribute(attr.name) } storage.save(localStorageName) }) store.getAll = withIEStorage(function(storage) { var attributes = storage.XMLDocument.documentElement.attributes var ret = {} for (var i=0, attr; attr=attributes[i]; ++i) { var key = ieKeyFix(attr.name) ret[attr.name] = store.deserialize(storage.getAttribute(key)) } return ret }) } try { store.set(namespace, namespace) if (store.get(namespace) != namespace) { store.disabled = true } store.remove(namespace) } catch(e) { store.disabled = true } store.enabled = !store.disabled if (typeof module != 'undefined' && module.exports) { module.exports = store } else if (typeof define === 'function' && define.amd) { define(store) } else { win.store = store } })(this.window || global); }); require.register("segmentio-top-domain/index.js", function(exports, require, module){ var url = require('url'); // Official Grammar: http://tools.ietf.org/html/rfc883#page-56 // Look for tlds with up to 2-6 characters. module.exports = function (urlStr) { var host = url.parse(urlStr).hostname , topLevel = host.match(/[a-z0-9][a-z0-9\-]*[a-z0-9]\.[a-z\.]{2,6}$/i); return topLevel ? topLevel[0] : host; }; }); require.register("visionmedia-debug/index.js", function(exports, require, module){ if ('undefined' == typeof window) { module.exports = require('./lib/debug'); } else { module.exports = require('./debug'); } }); require.register("visionmedia-debug/debug.js", function(exports, require, module){ /** * Expose `debug()` as the module. */ module.exports = debug; /** * Create a debugger with the given `name`. * * @param {String} name * @return {Type} * @api public */ function debug(name) { if (!debug.enabled(name)) return function(){}; return function(fmt){ fmt = coerce(fmt); var curr = new Date; var ms = curr - (debug[name] || curr); debug[name] = curr; fmt = name + ' ' + fmt + ' +' + debug.humanize(ms); // This hackery is required for IE8 // where `console.log` doesn't have 'apply' window.console && console.log && Function.prototype.apply.call(console.log, console, arguments); } } /** * The currently active debug mode names. */ debug.names = []; debug.skips = []; /** * Enables a debug mode by name. This can include modes * separated by a colon and wildcards. * * @param {String} name * @api public */ debug.enable = function(name) { try { localStorage.debug = name; } catch(e){} var split = (name || '').split(/[\s,]+/) , len = split.length; for (var i = 0; i < len; i++) { name = split[i].replace('*', '.*?'); if (name[0] === '-') { debug.skips.push(new RegExp('^' + name.substr(1) + '$')); } else { debug.names.push(new RegExp('^' + name + '$')); } } }; /** * Disable debug output. * * @api public */ debug.disable = function(){ debug.enable(''); }; /** * Humanize the given `ms`. * * @param {Number} m * @return {String} * @api private */ debug.humanize = function(ms) { var sec = 1000 , min = 60 * 1000 , hour = 60 * min; if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; if (ms >= min) return (ms / min).toFixed(1) + 'm'; if (ms >= sec) return (ms / sec | 0) + 's'; return ms + 'ms'; }; /** * Returns true if the given mode name is enabled, false otherwise. * * @param {String} name * @return {Boolean} * @api public */ debug.enabled = function(name) { for (var i = 0, len = debug.skips.length; i < len; i++) { if (debug.skips[i].test(name)) { return false; } } for (var i = 0, len = debug.names.length; i < len; i++) { if (debug.names[i].test(name)) { return true; } } return false; }; /** * Coerce `val`. */ function coerce(val) { if (val instanceof Error) return val.stack || val.message; return val; } // persist try { if (window.localStorage) debug.enable(localStorage.debug); } catch(e){} }); require.register("yields-prevent/index.js", function(exports, require, module){ /** * prevent default on the given `e`. * * examples: * * anchor.onclick = prevent; * anchor.onclick = function(e){ * if (something) return prevent(e); * }; * * @param {Event} e */ module.exports = function(e){ e = e || window.event return e.preventDefault ? e.preventDefault() : e.returnValue = false; }; }); require.register("analytics/lib/index.js", function(exports, require, module){ /** * Analytics.js * * (C) 2013 Segment.io Inc. */ var Analytics = require('./analytics'); var createIntegration = require('integration'); var each = require('each'); var Integrations = require('integrations'); /** * Expose the `analytics` singleton. */ var analytics = module.exports = exports = new Analytics(); /** * Expose require */ analytics.require = require; /** * Expose `VERSION`. */ exports.VERSION = '1.3.6'; /** * Add integrations. */ each(Integrations, function (name, Integration) { analytics.use(Integration); }); }); require.register("analytics/lib/analytics.js", function(exports, require, module){ var after = require('after'); var bind = require('bind'); var callback = require('callback'); var canonical = require('canonical'); var clone = require('clone'); var cookie = require('./cookie'); var debug = require('debug'); var defaults = require('defaults'); var each = require('each'); var Emitter = require('emitter'); var group = require('./group'); var is = require('is'); var isEmail = require('is-email'); var isMeta = require('is-meta'); var newDate = require('new-date'); var on = require('event').bind; var prevent = require('prevent'); var querystring = require('querystring'); var size = require('object').length; var store = require('./store'); var url = require('url'); var user = require('./user'); var Facade = require('facade'); var Identify = Facade.Identify; var Group = Facade.Group; var Alias = Facade.Alias; var Track = Facade.Track; var Page = Facade.Page; /** * Expose `Analytics`. */ module.exports = Analytics; /** * Initialize a new `Analytics` instance. */ function Analytics () { this.Integrations = {}; this._integrations = {}; this._readied = false; this._timeout = 300; this._user = user; // BACKWARDS COMPATIBILITY bind.all(this); var self = this; this.on('initialize', function (settings, options) { if (options.initialPageview) self.page(); }); this.on('initialize', function () { self._parseQuery(); }); } /** * Event Emitter. */ Emitter(Analytics.prototype); /** * Use a `plugin`. * * @param {Function} plugin * @return {Analytics} */ Analytics.prototype.use = function (plugin) { plugin(this); return this; }; /** * Define a new `Integration`. * * @param {Function} Integration * @return {Analytics} */ Analytics.prototype.addIntegration = function (Integration) { var name = Integration.prototype.name; if (!name) throw new TypeError('attempted to add an invalid integration'); this.Integrations[name] = Integration; return this; }; /** * Initialize with the given integration `settings` and `options`. Aliased to * `init` for convenience. * * @param {Object} settings * @param {Object} options (optional) * @return {Analytics} */ Analytics.prototype.init = Analytics.prototype.initialize = function (settings, options) { settings = settings || {}; options = options || {}; this._options(options); this._readied = false; this._integrations = {}; // load user now that options are set user.load(); group.load(); // clean unknown integrations from settings var self = this; each(settings, function (name) { var Integration = self.Integrations[name]; if (!Integration) delete settings[name]; }); // make ready callback var ready = after(size(settings), function () { self._readied = true; self.emit('ready'); }); // initialize integrations, passing ready each(settings, function (name, opts) { var Integration = self.Integrations[name]; if (options.initialPageview && opts.initialPageview === false) { Integration.prototype.page = after(2, Integration.prototype.page); } var integration = new Integration(clone(opts)); integration.once('ready', ready); integration.initialize(); self._integrations[name] = integration; }); // backwards compat with angular plugin. // TODO: remove this.initialized = true; this.emit('initialize', settings, options); return this; }; /** * Identify a user by optional `id` and `traits`. * * @param {String} id (optional) * @param {Object} traits (optional) * @param {Object} options (optional) * @param {Function} fn (optional) * @return {Analytics} */ Analytics.prototype.identify = function (id, traits, options, fn) { if (is.fn(options)) fn = options, options = null; if (is.fn(traits)) fn = traits, options = null, traits = null; if (is.object(id)) options = traits, traits = id, id = user.id(); // clone traits before we manipulate so we don't do anything uncouth, and take // from `user` so that we carryover anonymous traits user.identify(id, traits); id = user.id(); traits = user.traits(); this._invoke('identify', new Identify({ options: options, traits: traits, userId: id })); // emit this.emit('identify', id, traits, options); this._callback(fn); return this; }; /** * Return the current user. * * @return {Object} */ Analytics.prototype.user = function () { return user; }; /** * Identify a group by optional `id` and `traits`. Or, if no arguments are * supplied, return the current group. * * @param {String} id (optional) * @param {Object} traits (optional) * @param {Object} options (optional) * @param {Function} fn (optional) * @return {Analytics or Object} */ Analytics.prototype.group = function (id, traits, options, fn) { if (0 === arguments.length) return group; if (is.fn(options)) fn = options, options = null; if (is.fn(traits)) fn = traits, options = null, traits = null; if (is.object(id)) options = traits, traits = id, id = group.id(); // grab from group again to make sure we're taking from the source group.identify(id, traits); id = group.id(); traits = group.traits(); this._invoke('group', new Group({ options: options, traits: traits, groupId: id })); this.emit('group', id, traits, options); this._callback(fn); return this; }; /** * Track an `event` that a user has triggered with optional `properties`. * * @param {String} event * @param {Object} properties (optional) * @param {Object} options (optional) * @param {Function} fn (optional) * @return {Analytics} */ Analytics.prototype.track = function (event, properties, options, fn) { if (is.fn(options)) fn = options, options = null; if (is.fn(properties)) fn = properties, options = null, properties = null; this._invoke('track', new Track({ properties: properties, options: options, event: event })); this.emit('track', event, properties, options); this._callback(fn); return this; }; /** * Helper method to track an outbound link that would normally navigate away * from the page before the analytics calls were sent. * * BACKWARDS COMPATIBILITY: aliased to `trackClick`. * * @param {Element or Array} links * @param {String or Function} event * @param {Object or Function} properties (optional) * @return {Analytics} */ Analytics.prototype.trackClick = Analytics.prototype.trackLink = function (links, event, properties) { if (!links) return this; if (is.element(links)) links = [links]; // always arrays, handles jquery var self = this; each(links, function (el) { on(el, 'click', function (e) { var ev = is.fn(event) ? event(el) : event; var props = is.fn(properties) ? properties(el) : properties; self.track(ev, props); if (el.href && el.target !== '_blank' && !isMeta(e)) { prevent(e); self._callback(function () { window.location.href = el.href; }); } }); }); return this; }; /** * Helper method to track an outbound form that would normally navigate away * from the page before the analytics calls were sent. * * BACKWARDS COMPATIBILITY: aliased to `trackSubmit`. * * @param {Element or Array} forms * @param {String or Function} event * @param {Object or Function} properties (optional) * @return {Analytics} */ Analytics.prototype.trackSubmit = Analytics.prototype.trackForm = function (forms, event, properties) { if (!forms) return this; if (is.element(forms)) forms = [forms]; // always arrays, handles jquery var self = this; each(forms, function (el) { function handler (e) { prevent(e); var ev = is.fn(event) ? event(el) : event; var props = is.fn(properties) ? properties(el) : properties; self.track(ev, props); self._callback(function () { el.submit(); }); } // support the events happening through jQuery or Zepto instead of through // the normal DOM API, since `el.submit` doesn't bubble up events... var $ = window.jQuery || window.Zepto; if ($) { $(el).submit(handler); } else { on(el, 'submit', handler); } }); return this; }; /** * Trigger a pageview, labeling the current page with an optional `category`, * `name` and `properties`. * * @param {String} category (optional) * @param {String} name (optional) * @param {Object or String} properties (or path) (optional) * @param {Object} options (optional) * @param {Function} fn (optional) * @return {Analytics} */ Analytics.prototype.page = function (category, name, properties, options, fn) { if (is.fn(options)) fn = options, options = null; if (is.fn(properties)) fn = properties, options = properties = null; if (is.fn(name)) fn = name, options = properties = name = null; if (is.object(category)) options = name, properties = category, name = category = null; if (is.object(name)) options = properties, properties = name, name = null; if (is.string(category) && !is.string(name)) name = category, category = null; var defs = { path: canonicalPath(), referrer: document.referrer, title: document.title, url: canonicalUrl(), search: location.search }; if (name) defs.name = name; if (category) defs.category = category; properties = clone(properties) || {}; defaults(properties, defs); this._invoke('page', new Page({ properties: properties, category: category, options: options, name: name })); this.emit('page', category, name, properties, options); this._callback(fn); return this; }; /** * BACKWARDS COMPATIBILITY: convert an old `pageview` to a `page` call. * * @param {String} url (optional) * @param {Object} options (optional) * @return {Analytics} * @api private */ Analytics.prototype.pageview = function (url, options) { var properties = {}; if (url) properties.path = url; this.page(properties); return this; }; /** * Merge two previously unassociated user identities. * * @param {String} to * @param {String} from (optional) * @param {Object} options (optional) * @param {Function} fn (optional) * @return {Analytics} */ Analytics.prototype.alias = function (to, from, options, fn) { if (is.fn(options)) fn = options, options = null; if (is.fn(from)) fn = from, options = null, from = null; if (is.object(from)) options = from, from = null; this._invoke('alias', new Alias({ options: options, from: from, to: to })); this.emit('alias', to, from, options); this._callback(fn); return this; }; /** * Register a `fn` to be fired when all the analytics services are ready. * * @param {Function} fn * @return {Analytics} */ Analytics.prototype.ready = function (fn) { if (!is.fn(fn)) return this; this._readied ? callback.async(fn) : this.once('ready', fn); return this; }; /** * Set the `timeout` (in milliseconds) used for callbacks. * * @param {Number} timeout */ Analytics.prototype.timeout = function (timeout) { this._timeout = timeout; }; /** * Enable or disable debug. * * @param {String or Boolean} str */ Analytics.prototype.debug = function(str){ if (0 == arguments.length || str) { debug.enable('analytics:' + (str || '*')); } else { debug.disable(); } }; /** * Apply options. * * @param {Object} options * @return {Analytics} * @api private */ Analytics.prototype._options = function (options) { options = options || {}; cookie.options(options.cookie); store.options(options.localStorage); user.options(options.user); group.options(options.group); return this; }; /** * Callback a `fn` after our defined timeout period. * * @param {Function} fn * @return {Analytics} * @api private */ Analytics.prototype._callback = function (fn) { callback.async(fn, this._timeout); return this; }; /** * Call `method` with `facade` on all enabled integrations. * * @param {String} method * @param {Facade} facade * @return {Analytics} * @api private */ Analytics.prototype._invoke = function (method, facade) { var options = facade.options(); each(this._integrations, function (name, integration) { if (!facade.enabled(name)) return; integration.invoke.call(integration, method, facade); }); return this; }; /** * Push `args`. * * @param {Array} args * @api private */ Analytics.prototype.push = function(args){ var method = args.shift(); if (!this[method]) return; this[method].apply(this, args); }; /** * Parse the query string for callable methods. * * @return {Analytics} * @api private */ Analytics.prototype._parseQuery = function () { // Identify and track any `ajs_uid` and `ajs_event` parameters in the URL. var q = querystring.parse(window.location.search); if (q.ajs_uid) this.identify(q.ajs_uid); if (q.ajs_event) this.track(q.ajs_event); return this; }; /** * Return the canonical path for the page. * * @return {String} */ function canonicalPath () { var canon = canonical(); if (!canon) return window.location.pathname; var parsed = url.parse(canon); return parsed.pathname; } /** * Return the canonical URL for the page, without the hash. * * @return {String} */ function canonicalUrl () { var canon = canonical(); if (canon) return canon; var url = window.location.href; var i = url.indexOf('#'); return -1 == i ? url : url.slice(0, i); } }); require.register("analytics/lib/cookie.js", function(exports, require, module){ var bind = require('bind'); var cookie = require('cookie'); var clone = require('clone'); var defaults = require('defaults'); var json = require('json'); var topDomain = require('top-domain'); /** * Initialize a new `Cookie` with `options`. * * @param {Object} options */ function Cookie (options) { this.options(options); } /** * Get or set the cookie options. * * @param {Object} options * @field {Number} maxage (1 year) * @field {String} domain * @field {String} path * @field {Boolean} secure */ Cookie.prototype.options = function (options) { if (arguments.length === 0) return this._options; options = options || {}; var domain = '.' + topDomain(window.location.href); // localhost cookies are special: http://curl.haxx.se/rfc/cookie_spec.html if (domain === '.localhost') domain = ''; defaults(options, { maxage: 31536000000, // default to a year path: '/', domain: domain }); this._options = options; }; /** * Set a `key` and `value` in our cookie. * * @param {String} key * @param {Object} value * @return {Boolean} saved */ Cookie.prototype.set = function (key, value) { try { value = json.stringify(value); cookie(key, value, clone(this._options)); return true; } catch (e) { return false; } }; /** * Get a value from our cookie by `key`. * * @param {String} key * @return {Object} value */ Cookie.prototype.get = function (key) { try { var value = cookie(key); value = value ? json.parse(value) : null; return value; } catch (e) { return null; } }; /** * Remove a value from our cookie by `key`. * * @param {String} key * @return {Boolean} removed */ Cookie.prototype.remove = function (key) { try { cookie(key, null, clone(this._options)); return true; } catch (e) { return false; } }; /** * Expose the cookie singleton. */ module.exports = bind.all(new Cookie()); /** * Expose the `Cookie` constructor. */ module.exports.Cookie = Cookie; }); require.register("analytics/lib/entity.js", function(exports, require, module){ var traverse = require('isodate-traverse'); var defaults = require('defaults'); var cookie = require('./cookie'); var store = require('./store'); var extend = require('extend'); var clone = require('clone'); /** * Expose `Entity` */ module.exports = Entity; /** * Initialize new `Entity` with `options`. * * @param {Object} options */ function Entity(options){ this.options(options); } /** * Get or set storage `options`. * * @param {Object} options * @property {Object} cookie * @property {Object} localStorage * @property {Boolean} persist (default: `true`) */ Entity.prototype.options = function (options) { if (arguments.length === 0) return this._options; options || (options = {}); defaults(options, this.defaults || {}); this._options = options; }; /** * Get or set the entity's `id`. * * @param {String} id */ Entity.prototype.id = function (id) { switch (arguments.length) { case 0: return this._getId(); case 1: return this._setId(id); } }; /** * Get the entity's id. * * @return {String} */ Entity.prototype._getId = function () { var ret = this._options.persist ? cookie.get(this._options.cookie.key) : this._id; return ret === undefined ? null : ret; }; /** * Set the entity's `id`. * * @param {String} id */ Entity.prototype._setId = function (id) { if (this._options.persist) { cookie.set(this._options.cookie.key, id); } else { this._id = id; } }; /** * Get or set the entity's `traits`. * * BACKWARDS COMPATIBILITY: aliased to `properties` * * @param {Object} traits */ Entity.prototype.properties = Entity.prototype.traits = function (traits) { switch (arguments.length) { case 0: return this._getTraits(); case 1: return this._setTraits(traits); } }; /** * Get the entity's traits. Always convert ISO date strings into real dates, * since they aren't parsed back from local storage. * * @return {Object} */ Entity.prototype._getTraits = function () { var ret = this._options.persist ? store.get(this._options.localStorage.key) : this._traits; return ret ? traverse(clone(ret)) : {}; }; /** * Set the entity's `traits`. * * @param {Object} traits */ Entity.prototype._setTraits = function (traits) { traits || (traits = {}); if (this._options.persist) { store.set(this._options.localStorage.key, traits); } else { this._traits = traits; } }; /** * Identify the entity with an `id` and `traits`. If we it's the same entity, * extend the existing `traits` instead of overwriting. * * @param {String} id * @param {Object} traits */ Entity.prototype.identify = function (id, traits) { traits || (traits = {}); var current = this.id(); if (current === null || current === id) traits = extend(this.traits(), traits); if (id) this.id(id); this.debug('identify %o, %o', id, traits); this.traits(traits); this.save(); }; /** * Save the entity to local storage and the cookie. * * @return {Boolean} */ Entity.prototype.save = function () { if (!this._options.persist) return false; cookie.set(this._options.cookie.key, this.id()); store.set(this._options.localStorage.key, this.traits()); return true; }; /** * Log the entity out, reseting `id` and `traits` to defaults. */ Entity.prototype.logout = function () { this.id(null); this.traits({}); cookie.remove(this._options.cookie.key); store.remove(this._options.localStorage.key); }; /** * Reset all entity state, logging out and returning options to defaults. */ Entity.prototype.reset = function () { this.logout(); this.options({}); }; /** * Load saved entity `id` or `traits` from storage. */ Entity.prototype.load = function () { this.id(cookie.get(this._options.cookie.key)); this.traits(store.get(this._options.localStorage.key)); }; }); require.register("analytics/lib/group.js", function(exports, require, module){ var debug = require('debug')('analytics:group'); var Entity = require('./entity'); var inherit = require('inherit'); var bind = require('bind'); /** * Group defaults */ Group.defaults = { persist: true, cookie: { key: 'ajs_group_id' }, localStorage: { key: 'ajs_group_properties' } }; /** * Initialize a new `Group` with `options`. * * @param {Object} options */ function Group (options) { this.defaults = Group.defaults; this.debug = debug; Entity.call(this, options); } /** * Inherit `Entity` */ inherit(Group, Entity); /** * Expose the group singleton. */ module.exports = bind.all(new Group()); /** * Expose the `Group` constructor. */ module.exports.Group = Group; }); require.register("analytics/lib/store.js", function(exports, require, module){ var bind = require('bind'); var defaults = require('defaults'); var store = require('store'); /** * Initialize a new `Store` with `options`. * * @param {Object} options */ function Store (options) { this.options(options); } /** * Set the `options` for the store. * * @param {Object} options * @field {Boolean} enabled (true) */ Store.prototype.options = function (options) { if (arguments.length === 0) return this._options; options = options || {}; defaults(options, { enabled : true }); this.enabled = options.enabled && store.enabled; this._options = options; }; /** * Set a `key` and `value` in local storage. * * @param {String} key * @param {Object} value */ Store.prototype.set = function (key, value) { if (!this.enabled) return false; return store.set(key, value); }; /** * Get a value from local storage by `key`. * * @param {String} key * @return {Object} */ Store.prototype.get = function (key) { if (!this.enabled) return null; return store.get(key); }; /** * Remove a value from local storage by `key`. * * @param {String} key */ Store.prototype.remove = function (key) { if (!this.enabled) return false; return store.remove(key); }; /** * Expose the store singleton. */ module.exports = bind.all(new Store()); /** * Expose the `Store` constructor. */ module.exports.Store = Store; }); require.register("analytics/lib/user.js", function(exports, require, module){ var debug = require('debug')('analytics:user'); var Entity = require('./entity'); var inherit = require('inherit'); var bind = require('bind'); var cookie = require('./cookie'); /** * User defaults */ User.defaults = { persist: true, cookie: { key: 'ajs_user_id', oldKey: 'ajs_user' }, localStorage: { key: 'ajs_user_traits' } }; /** * Initialize a new `User` with `options`. * * @param {Object} options */ function User (options) { this.defaults = User.defaults; this.debug = debug; Entity.call(this, options); } /** * Inherit `Entity` */ inherit(User, Entity); /** * Load saved user `id` or `traits` from storage. */ User.prototype.load = function () { if (this._loadOldCookie()) return; Entity.prototype.load.call(this); }; /** * BACKWARDS COMPATIBILITY: Load the old user from the cookie. * * @return {Boolean} * @api private */ User.prototype._loadOldCookie = function () { var user = cookie.get(this._options.cookie.oldKey); if (!user) return false; this.id(user.id); this.traits(user.traits); cookie.remove(this._options.cookie.oldKey); return true; }; /** * Expose the user singleton. */ module.exports = bind.all(new User()); /** * Expose the `User` constructor. */ module.exports.User = User; }); require.register("segmentio-analytics.js-integrations/lib/slugs.json", function(exports, require, module){ module.exports = [ "adroll", "adwords", "amplitude", "awesm", "awesomatic", "bing-ads", "bronto", "bugherd", "bugsnag", "chartbeat", "churnbee", "clicktale", "clicky", "comscore", "crazy-egg", "curebit", "customerio", "drip", "errorception", "evergage", "facebook-ads", "foxmetrics", "gauges", "get-satisfaction", "google-analytics", "google-tag-manager", "gosquared", "heap", "hittail", "hubspot", "improvely", "inspectlet", "intercom", "keen-io", "kissmetrics", "klaviyo", "leadlander", "livechat", "lucky-orange", "lytics", "mixpanel", "mojn", "mouseflow", "mousestats", "olark", "optimizely", "perfect-audience", "pingdom", "preact", "qualaroo", "quantcast", "rollbar", "saasquatch", "sentry", "snapengage", "spinnakr", "tapstream", "trakio", "twitter-ads", "usercycle", "userfox", "uservoice", "vero", "visual-website-optimizer", "webengage", "woopra", "yandex-metrica" ] }); require.alias("avetisk-defaults/index.js", "analytics/deps/defaults/index.js"); require.alias("avetisk-defaults/index.js", "defaults/index.js"); require.alias("component-clone/index.js", "analytics/deps/clone/index.js"); require.alias("component-clone/index.js", "clone/index.js"); require.alias("component-type/index.js", "component-clone/deps/type/index.js"); require.alias("component-cookie/index.js", "analytics/deps/cookie/index.js"); require.alias("component-cookie/index.js", "cookie/index.js"); require.alias("component-each/index.js", "analytics/deps/each/index.js"); require.alias("component-each/index.js", "each/index.js"); require.alias("component-type/index.js", "component-each/deps/type/index.js"); require.alias("component-emitter/index.js", "analytics/deps/emitter/index.js"); require.alias("component-emitter/index.js", "emitter/index.js"); require.alias("component-indexof/index.js", "component-emitter/deps/indexof/index.js"); require.alias("component-event/index.js", "analytics/deps/event/index.js"); require.alias("component-event/index.js", "event/index.js"); require.alias("component-inherit/index.js", "analytics/deps/inherit/index.js"); require.alias("component-inherit/index.js", "inherit/index.js"); require.alias("component-object/index.js", "analytics/deps/object/index.js"); require.alias("component-object/index.js", "object/index.js"); require.alias("component-querystring/index.js", "analytics/deps/querystring/index.js"); require.alias("component-querystring/index.js", "querystring/index.js"); require.alias("component-trim/index.js", "component-querystring/deps/trim/index.js"); require.alias("component-url/index.js", "analytics/deps/url/index.js"); require.alias("component-url/index.js", "url/index.js"); require.alias("ianstormtaylor-bind/index.js", "analytics/deps/bind/index.js"); require.alias("ianstormtaylor-bind/index.js", "bind/index.js"); require.alias("component-bind/index.js", "ianstormtaylor-bind/deps/bind/index.js"); require.alias("segmentio-bind-all/index.js", "ianstormtaylor-bind/deps/bind-all/index.js"); require.alias("component-bind/index.js", "segmentio-bind-all/deps/bind/index.js"); require.alias("component-type/index.js", "segmentio-bind-all/deps/type/index.js"); require.alias("ianstormtaylor-callback/index.js", "analytics/deps/callback/index.js"); require.alias("ianstormtaylor-callback/index.js", "callback/index.js"); require.alias("timoxley-next-tick/index.js", "ianstormtaylor-callback/deps/next-tick/index.js"); require.alias("ianstormtaylor-is/index.js", "analytics/deps/is/index.js"); require.alias("ianstormtaylor-is/index.js", "is/index.js"); require.alias("component-type/index.js", "ianstormtaylor-is/deps/type/index.js"); require.alias("ianstormtaylor-is-empty/index.js", "ianstormtaylor-is/deps/is-empty/index.js"); require.alias("segmentio-after/index.js", "analytics/deps/after/index.js"); require.alias("segmentio-after/index.js", "after/index.js"); require.alias("segmentio-analytics.js-integration/lib/index.js", "analytics/deps/integration/lib/index.js"); require.alias("segmentio-analytics.js-integration/lib/protos.js", "analytics/deps/integration/lib/protos.js"); require.alias("segmentio-analytics.js-integration/lib/events.js", "analytics/deps/integration/lib/events.js"); require.alias("segmentio-analytics.js-integration/lib/statics.js", "analytics/deps/integration/lib/statics.js"); require.alias("segmentio-analytics.js-integration/lib/index.js", "analytics/deps/integration/index.js"); require.alias("segmentio-analytics.js-integration/lib/index.js", "integration/index.js"); require.alias("avetisk-defaults/index.js", "segmentio-analytics.js-integration/deps/defaults/index.js"); require.alias("component-clone/index.js", "segmentio-analytics.js-integration/deps/clone/index.js"); require.alias("component-type/index.js", "component-clone/deps/type/index.js"); require.alias("component-emitter/index.js", "segmentio-analytics.js-integration/deps/emitter/index.js"); require.alias("component-indexof/index.js", "component-emitter/deps/indexof/index.js"); require.alias("ianstormtaylor-bind/index.js", "segmentio-analytics.js-integration/deps/bind/index.js"); require.alias("component-bind/index.js", "ianstormtaylor-bind/deps/bind/index.js"); require.alias("segmentio-bind-all/index.js", "ianstormtaylor-bind/deps/bind-all/index.js"); require.alias("component-bind/index.js", "segmentio-bind-all/deps/bind/index.js"); require.alias("component-type/index.js", "segmentio-bind-all/deps/type/index.js"); require.alias("ianstormtaylor-callback/index.js", "segmentio-analytics.js-integration/deps/callback/index.js"); require.alias("timoxley-next-tick/index.js", "ianstormtaylor-callback/deps/next-tick/index.js"); require.alias("segmentio-after/index.js", "segmentio-analytics.js-integration/deps/after/index.js"); require.alias("timoxley-next-tick/index.js", "segmentio-analytics.js-integration/deps/next-tick/index.js"); require.alias("yields-slug/index.js", "segmentio-analytics.js-integration/deps/slug/index.js"); require.alias("visionmedia-debug/index.js", "segmentio-analytics.js-integration/deps/debug/index.js"); require.alias("visionmedia-debug/debug.js", "segmentio-analytics.js-integration/deps/debug/debug.js"); require.alias("segmentio-analytics.js-integration/lib/index.js", "segmentio-analytics.js-integration/index.js"); require.alias("segmentio-analytics.js-integrations/index.js", "analytics/deps/integrations/index.js"); require.alias("segmentio-analytics.js-integrations/lib/adroll.js", "analytics/deps/integrations/lib/adroll.js"); require.alias("segmentio-analytics.js-integrations/lib/adwords.js", "analytics/deps/integrations/lib/adwords.js"); require.alias("segmentio-analytics.js-integrations/lib/amplitude.js", "analytics/deps/integrations/lib/amplitude.js"); require.alias("segmentio-analytics.js-integrations/lib/awesm.js", "analytics/deps/integrations/lib/awesm.js"); require.alias("segmentio-analytics.js-integrations/lib/awesomatic.js", "analytics/deps/integrations/lib/awesomatic.js"); require.alias("segmentio-analytics.js-integrations/lib/bing-ads.js", "analytics/deps/integrations/lib/bing-ads.js"); require.alias("segmentio-analytics.js-integrations/lib/bronto.js", "analytics/deps/integrations/lib/bronto.js"); require.alias("segmentio-analytics.js-integrations/lib/bugherd.js", "analytics/deps/integrations/lib/bugherd.js"); require.alias("segmentio-analytics.js-integrations/lib/bugsnag.js", "analytics/deps/integrations/lib/bugsnag.js"); require.alias("segmentio-analytics.js-integrations/lib/chartbeat.js", "analytics/deps/integrations/lib/chartbeat.js"); require.alias("segmentio-analytics.js-integrations/lib/churnbee.js", "analytics/deps/integrations/lib/churnbee.js"); require.alias("segmentio-analytics.js-integrations/lib/clicktale.js", "analytics/deps/integrations/lib/clicktale.js"); require.alias("segmentio-analytics.js-integrations/lib/clicky.js", "analytics/deps/integrations/lib/clicky.js"); require.alias("segmentio-analytics.js-integrations/lib/comscore.js", "analytics/deps/integrations/lib/comscore.js"); require.alias("segmentio-analytics.js-integrations/lib/crazy-egg.js", "analytics/deps/integrations/lib/crazy-egg.js"); require.alias("segmentio-analytics.js-integrations/lib/curebit.js", "analytics/deps/integrations/lib/curebit.js"); require.alias("segmentio-analytics.js-integrations/lib/customerio.js", "analytics/deps/integrations/lib/customerio.js"); require.alias("segmentio-analytics.js-integrations/lib/drip.js", "analytics/deps/integrations/lib/drip.js"); require.alias("segmentio-analytics.js-integrations/lib/errorception.js", "analytics/deps/integrations/lib/errorception.js"); require.alias("segmentio-analytics.js-integrations/lib/evergage.js", "analytics/deps/integrations/lib/evergage.js"); require.alias("segmentio-analytics.js-integrations/lib/facebook-ads.js", "analytics/deps/integrations/lib/facebook-ads.js"); require.alias("segmentio-analytics.js-integrations/lib/foxmetrics.js", "analytics/deps/integrations/lib/foxmetrics.js"); require.alias("segmentio-analytics.js-integrations/lib/gauges.js", "analytics/deps/integrations/lib/gauges.js"); require.alias("segmentio-analytics.js-integrations/lib/get-satisfaction.js", "analytics/deps/integrations/lib/get-satisfaction.js"); require.alias("segmentio-analytics.js-integrations/lib/google-analytics.js", "analytics/deps/integrations/lib/google-analytics.js"); require.alias("segmentio-analytics.js-integrations/lib/google-tag-manager.js", "analytics/deps/integrations/lib/google-tag-manager.js"); require.alias("segmentio-analytics.js-integrations/lib/gosquared.js", "analytics/deps/integrations/lib/gosquared.js"); require.alias("segmentio-analytics.js-integrations/lib/heap.js", "analytics/deps/integrations/lib/heap.js"); require.alias("segmentio-analytics.js-integrations/lib/hittail.js", "analytics/deps/integrations/lib/hittail.js"); require.alias("segmentio-analytics.js-integrations/lib/hubspot.js", "analytics/deps/integrations/lib/hubspot.js"); require.alias("segmentio-analytics.js-integrations/lib/improvely.js", "analytics/deps/integrations/lib/improvely.js"); require.alias("segmentio-analytics.js-integrations/lib/inspectlet.js", "analytics/deps/integrations/lib/inspectlet.js"); require.alias("segmentio-analytics.js-integrations/lib/intercom.js", "analytics/deps/integrations/lib/intercom.js"); require.alias("segmentio-analytics.js-integrations/lib/keen-io.js", "analytics/deps/integrations/lib/keen-io.js"); require.alias("segmentio-analytics.js-integrations/lib/kissmetrics.js", "analytics/deps/integrations/lib/kissmetrics.js"); require.alias("segmentio-analytics.js-integrations/lib/klaviyo.js", "analytics/deps/integrations/lib/klaviyo.js"); require.alias("segmentio-analytics.js-integrations/lib/leadlander.js", "analytics/deps/integrations/lib/leadlander.js"); require.alias("segmentio-analytics.js-integrations/lib/livechat.js", "analytics/deps/integrations/lib/livechat.js"); require.alias("segmentio-analytics.js-integrations/lib/lucky-orange.js", "analytics/deps/integrations/lib/lucky-orange.js"); require.alias("segmentio-analytics.js-integrations/lib/lytics.js", "analytics/deps/integrations/lib/lytics.js"); require.alias("segmentio-analytics.js-integrations/lib/mixpanel.js", "analytics/deps/integrations/lib/mixpanel.js"); require.alias("segmentio-analytics.js-integrations/lib/mojn.js", "analytics/deps/integrations/lib/mojn.js"); require.alias("segmentio-analytics.js-integrations/lib/mouseflow.js", "analytics/deps/integrations/lib/mouseflow.js"); require.alias("segmentio-analytics.js-integrations/lib/mousestats.js", "analytics/deps/integrations/lib/mousestats.js"); require.alias("segmentio-analytics.js-integrations/lib/olark.js", "analytics/deps/integrations/lib/olark.js"); require.alias("segmentio-analytics.js-integrations/lib/optimizely.js", "analytics/deps/integrations/lib/optimizely.js"); require.alias("segmentio-analytics.js-integrations/lib/perfect-audience.js", "analytics/deps/integrations/lib/perfect-audience.js"); require.alias("segmentio-analytics.js-integrations/lib/pingdom.js", "analytics/deps/integrations/lib/pingdom.js"); require.alias("segmentio-analytics.js-integrations/lib/preact.js", "analytics/deps/integrations/lib/preact.js"); require.alias("segmentio-analytics.js-integrations/lib/qualaroo.js", "analytics/deps/integrations/lib/qualaroo.js"); require.alias("segmentio-analytics.js-integrations/lib/quantcast.js", "analytics/deps/integrations/lib/quantcast.js"); require.alias("segmentio-analytics.js-integrations/lib/rollbar.js", "analytics/deps/integrations/lib/rollbar.js"); require.alias("segmentio-analytics.js-integrations/lib/saasquatch.js", "analytics/deps/integrations/lib/saasquatch.js"); require.alias("segmentio-analytics.js-integrations/lib/sentry.js", "analytics/deps/integrations/lib/sentry.js"); require.alias("segmentio-analytics.js-integrations/lib/snapengage.js", "analytics/deps/integrations/lib/snapengage.js"); require.alias("segmentio-analytics.js-integrations/lib/spinnakr.js", "analytics/deps/integrations/lib/spinnakr.js"); require.alias("segmentio-analytics.js-integrations/lib/tapstream.js", "analytics/deps/integrations/lib/tapstream.js"); require.alias("segmentio-analytics.js-integrations/lib/trakio.js", "analytics/deps/integrations/lib/trakio.js"); require.alias("segmentio-analytics.js-integrations/lib/twitter-ads.js", "analytics/deps/integrations/lib/twitter-ads.js"); require.alias("segmentio-analytics.js-integrations/lib/usercycle.js", "analytics/deps/integrations/lib/usercycle.js"); require.alias("segmentio-analytics.js-integrations/lib/userfox.js", "analytics/deps/integrations/lib/userfox.js"); require.alias("segmentio-analytics.js-integrations/lib/uservoice.js", "analytics/deps/integrations/lib/uservoice.js"); require.alias("segmentio-analytics.js-integrations/lib/vero.js", "analytics/deps/integrations/lib/vero.js"); require.alias("segmentio-analytics.js-integrations/lib/visual-website-optimizer.js", "analytics/deps/integrations/lib/visual-website-optimizer.js"); require.alias("segmentio-analytics.js-integrations/lib/webengage.js", "analytics/deps/integrations/lib/webengage.js"); require.alias("segmentio-analytics.js-integrations/lib/woopra.js", "analytics/deps/integrations/lib/woopra.js"); require.alias("segmentio-analytics.js-integrations/lib/yandex-metrica.js", "analytics/deps/integrations/lib/yandex-metrica.js"); require.alias("segmentio-analytics.js-integrations/index.js", "integrations/index.js"); require.alias("component-clone/index.js", "segmentio-analytics.js-integrations/deps/clone/index.js"); require.alias("component-type/index.js", "component-clone/deps/type/index.js"); require.alias("component-domify/index.js", "segmentio-analytics.js-integrations/deps/domify/index.js"); require.alias("component-each/index.js", "segmentio-analytics.js-integrations/deps/each/index.js"); require.alias("component-type/index.js", "component-each/deps/type/index.js"); require.alias("component-once/index.js", "segmentio-analytics.js-integrations/deps/once/index.js"); require.alias("component-type/index.js", "segmentio-analytics.js-integrations/deps/type/index.js"); require.alias("component-url/index.js", "segmentio-analytics.js-integrations/deps/url/index.js"); require.alias("ianstormtaylor-callback/index.js", "segmentio-analytics.js-integrations/deps/callback/index.js"); require.alias("timoxley-next-tick/index.js", "ianstormtaylor-callback/deps/next-tick/index.js"); require.alias("ianstormtaylor-bind/index.js", "segmentio-analytics.js-integrations/deps/bind/index.js"); require.alias("component-bind/index.js", "ianstormtaylor-bind/deps/bind/index.js"); require.alias("segmentio-bind-all/index.js", "ianstormtaylor-bind/deps/bind-all/index.js"); require.alias("component-bind/index.js", "segmentio-bind-all/deps/bind/index.js"); require.alias("component-type/index.js", "segmentio-bind-all/deps/type/index.js"); require.alias("ianstormtaylor-is/index.js", "segmentio-analytics.js-integrations/deps/is/index.js"); require.alias("component-type/index.js", "ianstormtaylor-is/deps/type/index.js"); require.alias("ianstormtaylor-is-empty/index.js", "ianstormtaylor-is/deps/is-empty/index.js"); require.alias("segmentio-alias/index.js", "segmentio-analytics.js-integrations/deps/alias/index.js"); require.alias("component-clone/index.js", "segmentio-alias/deps/clone/index.js"); require.alias("component-type/index.js", "component-clone/deps/type/index.js"); require.alias("component-type/index.js", "segmentio-alias/deps/type/index.js"); require.alias("segmentio-analytics.js-integration/lib/index.js", "segmentio-analytics.js-integrations/deps/integration/lib/index.js"); require.alias("segmentio-analytics.js-integration/lib/protos.js", "segmentio-analytics.js-integrations/deps/integration/lib/protos.js"); require.alias("segmentio-analytics.js-integration/lib/events.js", "segmentio-analytics.js-integrations/deps/integration/lib/events.js"); require.alias("segmentio-analytics.js-integration/lib/statics.js", "segmentio-analytics.js-integrations/deps/integration/lib/statics.js"); require.alias("segmentio-analytics.js-integration/lib/index.js", "segmentio-analytics.js-integrations/deps/integration/index.js"); require.alias("avetisk-defaults/index.js", "segmentio-analytics.js-integration/deps/defaults/index.js"); require.alias("component-clone/index.js", "segmentio-analytics.js-integration/deps/clone/index.js"); require.alias("component-type/index.js", "component-clone/deps/type/index.js"); require.alias("component-emitter/index.js", "segmentio-analytics.js-integration/deps/emitter/index.js"); require.alias("component-indexof/index.js", "component-emitter/deps/indexof/index.js"); require.alias("ianstormtaylor-bind/index.js", "segmentio-analytics.js-integration/deps/bind/index.js"); require.alias("component-bind/index.js", "ianstormtaylor-bind/deps/bind/index.js"); require.alias("segmentio-bind-all/index.js", "ianstormtaylor-bind/deps/bind-all/index.js"); require.alias("component-bind/index.js", "segmentio-bind-all/deps/bind/index.js"); require.alias("component-type/index.js", "segmentio-bind-all/deps/type/index.js"); require.alias("ianstormtaylor-callback/index.js", "segmentio-analytics.js-integration/deps/callback/index.js"); require.alias("timoxley-next-tick/index.js", "ianstormtaylor-callback/deps/next-tick/index.js"); require.alias("segmentio-after/index.js", "segmentio-analytics.js-integration/deps/after/index.js"); require.alias("timoxley-next-tick/index.js", "segmentio-analytics.js-integration/deps/next-tick/index.js"); require.alias("yields-slug/index.js", "segmentio-analytics.js-integration/deps/slug/index.js"); require.alias("visionmedia-debug/index.js", "segmentio-analytics.js-integration/deps/debug/index.js"); require.alias("visionmedia-debug/debug.js", "segmentio-analytics.js-integration/deps/debug/debug.js"); require.alias("segmentio-analytics.js-integration/lib/index.js", "segmentio-analytics.js-integration/index.js"); require.alias("segmentio-canonical/index.js", "segmentio-analytics.js-integrations/deps/canonical/index.js"); require.alias("segmentio-convert-dates/index.js", "segmentio-analytics.js-integrations/deps/convert-dates/index.js"); require.alias("component-clone/index.js", "segmentio-convert-dates/deps/clone/index.js"); require.alias("component-type/index.js", "component-clone/deps/type/index.js"); require.alias("ianstormtaylor-is/index.js", "segmentio-convert-dates/deps/is/index.js"); require.alias("component-type/index.js", "ianstormtaylor-is/deps/type/index.js"); require.alias("ianstormtaylor-is-empty/index.js", "ianstormtaylor-is/deps/is-empty/index.js"); require.alias("segmentio-extend/index.js", "segmentio-analytics.js-integrations/deps/extend/index.js"); require.alias("segmentio-facade/lib/index.js", "segmentio-analytics.js-integrations/deps/facade/lib/index.js"); require.alias("segmentio-facade/lib/alias.js", "segmentio-analytics.js-integrations/deps/facade/lib/alias.js"); require.alias("segmentio-facade/lib/facade.js", "segmentio-analytics.js-integrations/deps/facade/lib/facade.js"); require.alias("segmentio-facade/lib/group.js", "segmentio-analytics.js-integrations/deps/facade/lib/group.js"); require.alias("segmentio-facade/lib/page.js", "segmentio-analytics.js-integrations/deps/facade/lib/page.js"); require.alias("segmentio-facade/lib/identify.js", "segmentio-analytics.js-integrations/deps/facade/lib/identify.js"); require.alias("segmentio-facade/lib/is-enabled.js", "segmentio-analytics.js-integrations/deps/facade/lib/is-enabled.js"); require.alias("segmentio-facade/lib/track.js", "segmentio-analytics.js-integrations/deps/facade/lib/track.js"); require.alias("segmentio-facade/lib/index.js", "segmentio-analytics.js-integrations/deps/facade/index.js"); require.alias("camshaft-require-component/index.js", "segmentio-facade/deps/require-component/index.js"); require.alias("segmentio-isodate-traverse/index.js", "segmentio-facade/deps/isodate-traverse/index.js"); require.alias("component-each/index.js", "segmentio-isodate-traverse/deps/each/index.js"); require.alias("component-type/index.js", "component-each/deps/type/index.js"); require.alias("ianstormtaylor-is/index.js", "segmentio-isodate-traverse/deps/is/index.js"); require.alias("component-type/index.js", "ianstormtaylor-is/deps/type/index.js"); require.alias("ianstormtaylor-is-empty/index.js", "ianstormtaylor-is/deps/is-empty/index.js"); require.alias("segmentio-isodate/index.js", "segmentio-isodate-traverse/deps/isodate/index.js"); require.alias("component-clone/index.js", "segmentio-facade/deps/clone/index.js"); require.alias("component-type/index.js", "component-clone/deps/type/index.js"); require.alias("component-inherit/index.js", "segmentio-facade/deps/inherit/index.js"); require.alias("component-trim/index.js", "segmentio-facade/deps/trim/index.js"); require.alias("segmentio-is-email/index.js", "segmentio-facade/deps/is-email/index.js"); require.alias("segmentio-new-date/lib/index.js", "segmentio-facade/deps/new-date/lib/index.js"); require.alias("segmentio-new-date/lib/milliseconds.js", "segmentio-facade/deps/new-date/lib/milliseconds.js"); require.alias("segmentio-new-date/lib/seconds.js", "segmentio-facade/deps/new-date/lib/seconds.js"); require.alias("segmentio-new-date/lib/index.js", "segmentio-facade/deps/new-date/index.js"); require.alias("ianstormtaylor-is/index.js", "segmentio-new-date/deps/is/index.js"); require.alias("component-type/index.js", "ianstormtaylor-is/deps/type/index.js"); require.alias("ianstormtaylor-is-empty/index.js", "ianstormtaylor-is/deps/is-empty/index.js"); require.alias("segmentio-isodate/index.js", "segmentio-new-date/deps/isodate/index.js"); require.alias("segmentio-new-date/lib/index.js", "segmentio-new-date/index.js"); require.alias("segmentio-obj-case/index.js", "segmentio-facade/deps/obj-case/index.js"); require.alias("segmentio-obj-case/index.js", "segmentio-facade/deps/obj-case/index.js"); require.alias("ianstormtaylor-case/lib/index.js", "segmentio-obj-case/deps/case/lib/index.js"); require.alias("ianstormtaylor-case/lib/cases.js", "segmentio-obj-case/deps/case/lib/cases.js"); require.alias("ianstormtaylor-case/lib/index.js", "segmentio-obj-case/deps/case/index.js"); require.alias("ianstormtaylor-to-camel-case/index.js", "ianstormtaylor-case/deps/to-camel-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-camel-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-capital-case/index.js", "ianstormtaylor-case/deps/to-capital-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-capital-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-constant-case/index.js", "ianstormtaylor-case/deps/to-constant-case/index.js"); require.alias("ianstormtaylor-to-snake-case/index.js", "ianstormtaylor-to-constant-case/deps/to-snake-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-snake-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-dot-case/index.js", "ianstormtaylor-case/deps/to-dot-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-dot-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-pascal-case/index.js", "ianstormtaylor-case/deps/to-pascal-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-pascal-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-sentence-case/index.js", "ianstormtaylor-case/deps/to-sentence-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-sentence-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-slug-case/index.js", "ianstormtaylor-case/deps/to-slug-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-slug-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-snake-case/index.js", "ianstormtaylor-case/deps/to-snake-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-snake-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-title-case/index.js", "ianstormtaylor-case/deps/to-title-case/index.js"); require.alias("component-escape-regexp/index.js", "ianstormtaylor-to-title-case/deps/escape-regexp/index.js"); require.alias("ianstormtaylor-map/index.js", "ianstormtaylor-to-title-case/deps/map/index.js"); require.alias("component-each/index.js", "ianstormtaylor-map/deps/each/index.js"); require.alias("component-type/index.js", "component-each/deps/type/index.js"); require.alias("ianstormtaylor-title-case-minors/index.js", "ianstormtaylor-to-title-case/deps/title-case-minors/index.js"); require.alias("ianstormtaylor-to-capital-case/index.js", "ianstormtaylor-to-title-case/deps/to-capital-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-capital-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-case/lib/index.js", "ianstormtaylor-case/index.js"); require.alias("segmentio-obj-case/index.js", "segmentio-obj-case/index.js"); require.alias("segmentio-facade/lib/index.js", "segmentio-facade/index.js"); require.alias("segmentio-global-queue/index.js", "segmentio-analytics.js-integrations/deps/global-queue/index.js"); require.alias("segmentio-is-email/index.js", "segmentio-analytics.js-integrations/deps/is-email/index.js"); require.alias("segmentio-load-date/index.js", "segmentio-analytics.js-integrations/deps/load-date/index.js"); require.alias("segmentio-load-script/index.js", "segmentio-analytics.js-integrations/deps/load-script/index.js"); require.alias("component-type/index.js", "segmentio-load-script/deps/type/index.js"); require.alias("segmentio-on-body/index.js", "segmentio-analytics.js-integrations/deps/on-body/index.js"); require.alias("component-each/index.js", "segmentio-on-body/deps/each/index.js"); require.alias("component-type/index.js", "component-each/deps/type/index.js"); require.alias("segmentio-on-error/index.js", "segmentio-analytics.js-integrations/deps/on-error/index.js"); require.alias("segmentio-to-iso-string/index.js", "segmentio-analytics.js-integrations/deps/to-iso-string/index.js"); require.alias("segmentio-to-unix-timestamp/index.js", "segmentio-analytics.js-integrations/deps/to-unix-timestamp/index.js"); require.alias("segmentio-use-https/index.js", "segmentio-analytics.js-integrations/deps/use-https/index.js"); require.alias("timoxley-next-tick/index.js", "segmentio-analytics.js-integrations/deps/next-tick/index.js"); require.alias("yields-slug/index.js", "segmentio-analytics.js-integrations/deps/slug/index.js"); require.alias("visionmedia-batch/index.js", "segmentio-analytics.js-integrations/deps/batch/index.js"); require.alias("component-emitter/index.js", "visionmedia-batch/deps/emitter/index.js"); require.alias("component-indexof/index.js", "component-emitter/deps/indexof/index.js"); require.alias("visionmedia-debug/index.js", "segmentio-analytics.js-integrations/deps/debug/index.js"); require.alias("visionmedia-debug/debug.js", "segmentio-analytics.js-integrations/deps/debug/debug.js"); require.alias("segmentio-load-pixel/index.js", "segmentio-analytics.js-integrations/deps/load-pixel/index.js"); require.alias("segmentio-load-pixel/index.js", "segmentio-analytics.js-integrations/deps/load-pixel/index.js"); require.alias("component-querystring/index.js", "segmentio-load-pixel/deps/querystring/index.js"); require.alias("component-trim/index.js", "component-querystring/deps/trim/index.js"); require.alias("segmentio-substitute/index.js", "segmentio-load-pixel/deps/substitute/index.js"); require.alias("segmentio-substitute/index.js", "segmentio-load-pixel/deps/substitute/index.js"); require.alias("segmentio-substitute/index.js", "segmentio-substitute/index.js"); require.alias("segmentio-load-pixel/index.js", "segmentio-load-pixel/index.js"); require.alias("segmentio-canonical/index.js", "analytics/deps/canonical/index.js"); require.alias("segmentio-canonical/index.js", "canonical/index.js"); require.alias("segmentio-extend/index.js", "analytics/deps/extend/index.js"); require.alias("segmentio-extend/index.js", "extend/index.js"); require.alias("segmentio-facade/lib/index.js", "analytics/deps/facade/lib/index.js"); require.alias("segmentio-facade/lib/alias.js", "analytics/deps/facade/lib/alias.js"); require.alias("segmentio-facade/lib/facade.js", "analytics/deps/facade/lib/facade.js"); require.alias("segmentio-facade/lib/group.js", "analytics/deps/facade/lib/group.js"); require.alias("segmentio-facade/lib/page.js", "analytics/deps/facade/lib/page.js"); require.alias("segmentio-facade/lib/identify.js", "analytics/deps/facade/lib/identify.js"); require.alias("segmentio-facade/lib/is-enabled.js", "analytics/deps/facade/lib/is-enabled.js"); require.alias("segmentio-facade/lib/track.js", "analytics/deps/facade/lib/track.js"); require.alias("segmentio-facade/lib/index.js", "analytics/deps/facade/index.js"); require.alias("segmentio-facade/lib/index.js", "facade/index.js"); require.alias("camshaft-require-component/index.js", "segmentio-facade/deps/require-component/index.js"); require.alias("segmentio-isodate-traverse/index.js", "segmentio-facade/deps/isodate-traverse/index.js"); require.alias("component-each/index.js", "segmentio-isodate-traverse/deps/each/index.js"); require.alias("component-type/index.js", "component-each/deps/type/index.js"); require.alias("ianstormtaylor-is/index.js", "segmentio-isodate-traverse/deps/is/index.js"); require.alias("component-type/index.js", "ianstormtaylor-is/deps/type/index.js"); require.alias("ianstormtaylor-is-empty/index.js", "ianstormtaylor-is/deps/is-empty/index.js"); require.alias("segmentio-isodate/index.js", "segmentio-isodate-traverse/deps/isodate/index.js"); require.alias("component-clone/index.js", "segmentio-facade/deps/clone/index.js"); require.alias("component-type/index.js", "component-clone/deps/type/index.js"); require.alias("component-inherit/index.js", "segmentio-facade/deps/inherit/index.js"); require.alias("component-trim/index.js", "segmentio-facade/deps/trim/index.js"); require.alias("segmentio-is-email/index.js", "segmentio-facade/deps/is-email/index.js"); require.alias("segmentio-new-date/lib/index.js", "segmentio-facade/deps/new-date/lib/index.js"); require.alias("segmentio-new-date/lib/milliseconds.js", "segmentio-facade/deps/new-date/lib/milliseconds.js"); require.alias("segmentio-new-date/lib/seconds.js", "segmentio-facade/deps/new-date/lib/seconds.js"); require.alias("segmentio-new-date/lib/index.js", "segmentio-facade/deps/new-date/index.js"); require.alias("ianstormtaylor-is/index.js", "segmentio-new-date/deps/is/index.js"); require.alias("component-type/index.js", "ianstormtaylor-is/deps/type/index.js"); require.alias("ianstormtaylor-is-empty/index.js", "ianstormtaylor-is/deps/is-empty/index.js"); require.alias("segmentio-isodate/index.js", "segmentio-new-date/deps/isodate/index.js"); require.alias("segmentio-new-date/lib/index.js", "segmentio-new-date/index.js"); require.alias("segmentio-obj-case/index.js", "segmentio-facade/deps/obj-case/index.js"); require.alias("segmentio-obj-case/index.js", "segmentio-facade/deps/obj-case/index.js"); require.alias("ianstormtaylor-case/lib/index.js", "segmentio-obj-case/deps/case/lib/index.js"); require.alias("ianstormtaylor-case/lib/cases.js", "segmentio-obj-case/deps/case/lib/cases.js"); require.alias("ianstormtaylor-case/lib/index.js", "segmentio-obj-case/deps/case/index.js"); require.alias("ianstormtaylor-to-camel-case/index.js", "ianstormtaylor-case/deps/to-camel-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-camel-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-capital-case/index.js", "ianstormtaylor-case/deps/to-capital-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-capital-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-constant-case/index.js", "ianstormtaylor-case/deps/to-constant-case/index.js"); require.alias("ianstormtaylor-to-snake-case/index.js", "ianstormtaylor-to-constant-case/deps/to-snake-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-snake-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-dot-case/index.js", "ianstormtaylor-case/deps/to-dot-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-dot-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-pascal-case/index.js", "ianstormtaylor-case/deps/to-pascal-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-pascal-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-sentence-case/index.js", "ianstormtaylor-case/deps/to-sentence-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-sentence-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-slug-case/index.js", "ianstormtaylor-case/deps/to-slug-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-slug-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-snake-case/index.js", "ianstormtaylor-case/deps/to-snake-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-to-snake-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-space-case/index.js", "ianstormtaylor-case/deps/to-space-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-space-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-to-title-case/index.js", "ianstormtaylor-case/deps/to-title-case/index.js"); require.alias("component-escape-regexp/index.js", "ianstormtaylor-to-title-case/deps/escape-regexp/index.js"); require.alias("ianstormtaylor-map/index.js", "ianstormtaylor-to-title-case/deps/map/index.js"); require.alias("component-each/index.js", "ianstormtaylor-map/deps/each/index.js"); require.alias("component-type/index.js", "component-each/deps/type/index.js"); require.alias("ianstormtaylor-title-case-minors/index.js", "ianstormtaylor-to-title-case/deps/title-case-minors/index.js"); require.alias("ianstormtaylor-to-capital-case/index.js", "ianstormtaylor-to-title-case/deps/to-capital-case/index.js"); require.alias("ianstormtaylor-to-no-case/index.js", "ianstormtaylor-to-capital-case/deps/to-no-case/index.js"); require.alias("ianstormtaylor-case/lib/index.js", "ianstormtaylor-case/index.js"); require.alias("segmentio-obj-case/index.js", "segmentio-obj-case/index.js"); require.alias("segmentio-facade/lib/index.js", "segmentio-facade/index.js"); require.alias("segmentio-is-email/index.js", "analytics/deps/is-email/index.js"); require.alias("segmentio-is-email/index.js", "is-email/index.js"); require.alias("segmentio-is-meta/index.js", "analytics/deps/is-meta/index.js"); require.alias("segmentio-is-meta/index.js", "is-meta/index.js"); require.alias("segmentio-isodate-traverse/index.js", "analytics/deps/isodate-traverse/index.js"); require.alias("segmentio-isodate-traverse/index.js", "isodate-traverse/index.js"); require.alias("component-each/index.js", "segmentio-isodate-traverse/deps/each/index.js"); require.alias("component-type/index.js", "component-each/deps/type/index.js"); require.alias("ianstormtaylor-is/index.js", "segmentio-isodate-traverse/deps/is/index.js"); require.alias("component-type/index.js", "ianstormtaylor-is/deps/type/index.js"); require.alias("ianstormtaylor-is-empty/index.js", "ianstormtaylor-is/deps/is-empty/index.js"); require.alias("segmentio-isodate/index.js", "segmentio-isodate-traverse/deps/isodate/index.js"); require.alias("segmentio-json/index.js", "analytics/deps/json/index.js"); require.alias("segmentio-json/index.js", "json/index.js"); require.alias("component-json-fallback/index.js", "segmentio-json/deps/json-fallback/index.js"); require.alias("segmentio-new-date/lib/index.js", "analytics/deps/new-date/lib/index.js"); require.alias("segmentio-new-date/lib/milliseconds.js", "analytics/deps/new-date/lib/milliseconds.js"); require.alias("segmentio-new-date/lib/seconds.js", "analytics/deps/new-date/lib/seconds.js"); require.alias("segmentio-new-date/lib/index.js", "analytics/deps/new-date/index.js"); require.alias("segmentio-new-date/lib/index.js", "new-date/index.js"); require.alias("ianstormtaylor-is/index.js", "segmentio-new-date/deps/is/index.js"); require.alias("component-type/index.js", "ianstormtaylor-is/deps/type/index.js"); require.alias("ianstormtaylor-is-empty/index.js", "ianstormtaylor-is/deps/is-empty/index.js"); require.alias("segmentio-isodate/index.js", "segmentio-new-date/deps/isodate/index.js"); require.alias("segmentio-new-date/lib/index.js", "segmentio-new-date/index.js"); require.alias("segmentio-store.js/store.js", "analytics/deps/store/store.js"); require.alias("segmentio-store.js/store.js", "analytics/deps/store/index.js"); require.alias("segmentio-store.js/store.js", "store/index.js"); require.alias("segmentio-store.js/store.js", "segmentio-store.js/index.js"); require.alias("segmentio-top-domain/index.js", "analytics/deps/top-domain/index.js"); require.alias("segmentio-top-domain/index.js", "analytics/deps/top-domain/index.js"); require.alias("segmentio-top-domain/index.js", "top-domain/index.js"); require.alias("component-url/index.js", "segmentio-top-domain/deps/url/index.js"); require.alias("segmentio-top-domain/index.js", "segmentio-top-domain/index.js"); require.alias("visionmedia-debug/index.js", "analytics/deps/debug/index.js"); require.alias("visionmedia-debug/debug.js", "analytics/deps/debug/debug.js"); require.alias("visionmedia-debug/index.js", "debug/index.js"); require.alias("yields-prevent/index.js", "analytics/deps/prevent/index.js"); require.alias("yields-prevent/index.js", "prevent/index.js"); require.alias("analytics/lib/index.js", "analytics/index.js");if (typeof exports == "object") { module.exports = require("analytics"); } else if (typeof define == "function" && define.amd) { define([], function(){ return require("analytics"); }); } else { this["analytics"] = require("analytics"); }})();
sites/default/modules/contrib/jquery_update/replace/jquery/1.10/jquery.min.js
psegarel/psg
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license //@ sourceMappingURL=jquery-1.10.2.min.map */ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[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%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={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:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.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(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,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":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
src/routes/banner/index.js
benbenye/react-on-react-start-kit
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import Banner from './Banner'; export default { path: '*', async action() { const resp = await fetch('/graphql', { method: 'post', headers: { Accept: 'application/json', 'Content-Type': 'application/json', mdoe:'cors' }, body: JSON.stringify({ query: '{banner{name}}', }), credentials: 'include' }); const { data } = await resp.json(); console.log(data) if (!data || !data.banner) throw new Error('Failed to load the news feed.'); return <Banner banner={data.banner} />; }, };
src/components/ui/Button.js
elarasu/roverz-chat
/** * Buttons * <Button text={'Server is down'} /> * * React Native Starter App * https://github.com/mcnamee/react-native-starter-app */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Button } from 'react-native-elements'; // Consts and Libs import { AppColors, AppFonts, AppSizes } from '../../theme/'; import t from '../../i18n'; const buttonColor = AppColors.brand().bN_props; /* Component ==================================================================== */ class CustomButton extends Component { static propTypes = { small: PropTypes.bool, large: PropTypes.bool, outlined: PropTypes.bool, backgroundColor: PropTypes.string, onPress: PropTypes.func, icon: PropTypes.shape({ name: PropTypes.string, }), } static defaultProps = { small: false, large: false, outlined: false, icon: {}, backgroundColor: null, onPress: null, } buttonProps = () => { // Defaults const props = { title: t('lbl_coming_soon'), color: buttonColor, fontWeight: 'bold', onPress: this.props.onPress, fontFamily: AppFonts.base.family, fontSize: AppFonts.base.size, borderRadius: AppSizes.borderRadius, raised: true, buttonStyle: { padding: 12, }, containerViewStyle: { marginLeft: 0, marginRight: 0, }, ...this.props, backgroundColor: this.props.backgroundColor && this.props.backgroundColor !== 'transparent' ? this.props.backgroundColor : AppColors.brand().primary, small: false, large: false, icon: (this.props.icon && this.props.icon.name) ? { size: 14, ...this.props.icon, } : null, }; // Overrides // Size if (this.props.small) { props.fontSize = 12; props.buttonStyle.padding = 8; if (props.icon && props.icon.name) { props.icon = { size: 14, ...props.icon, }; } } if (this.props.large) { props.fontSize = 20; props.buttonStyle.padding = 15; if (props.icon && props.icon.name) { props.icon = { size: 20, ...props.icon, }; } } // Outlined if (this.props.outlined) { props.raised = false; props.backgroundColor = this.props.backgroundColor || 'transparent'; props.color = AppColors.brand().primary; props.buttonStyle.borderWidth = 1; props.buttonStyle.borderColor = AppColors.brand().primary; if (props.icon && props.icon.name) { props.icon = { color: AppColors.brand().primary, ...props.icon, }; } } return props; } render = () => <Button {...this.buttonProps()} />; } /* Export Component ==================================================================== */ export default CustomButton;
website/core/DocsSidebar.js
alantrrs/react-native
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule DocsSidebar */ var React = require('React'); var Metadata = require('Metadata'); var DocsSidebar = React.createClass({ getCategories: function() { var metadatas = Metadata.files.filter(function(metadata) { return metadata.layout === 'docs' || metadata.layout === 'autodocs'; }); // Build a hashmap of article_id -> metadata var articles = {}; for (var i = 0; i < metadatas.length; ++i) { var metadata = metadatas[i]; articles[metadata.id] = metadata; } // Build a hashmap of article_id -> previous_id var previous = {}; for (var i = 0; i < metadatas.length; ++i) { var metadata = metadatas[i]; if (metadata.next) { if (!articles[metadata.next]) { throw '`next: ' + metadata.next + '` in ' + metadata.id + ' doesn\'t exist'; } previous[articles[metadata.next].id] = metadata.id; } } // Find the first element which doesn't have any previous var first = null; for (var i = 0; i < metadatas.length; ++i) { var metadata = metadatas[i]; if (!previous[metadata.id]) { first = metadata; break; } } var categories = []; var currentCategory = null; var metadata = first; var i = 0; while (metadata && i++ < 1000) { if (!currentCategory || metadata.category !== currentCategory.name) { currentCategory && categories.push(currentCategory); currentCategory = { name: metadata.category, links: [] }; } currentCategory.links.push(metadata); metadata = articles[metadata.next]; } categories.push(currentCategory); return categories; }, getLink: function(metadata) { if (metadata.permalink.match(/^https?:/)) { return metadata.permalink; } return '/react-native/' + metadata.permalink + '#content'; }, render: function() { return <div className="nav-docs"> {this.getCategories().map((category) => <div className="nav-docs-section" key={category.name}> <h3>{category.name}</h3> <ul> {category.links.map((metadata) => <li key={metadata.id}> <a target={metadata.permalink.match(/^https?:/) && '_blank'} style={{marginLeft: metadata.indent ? 20 : 0}} className={metadata.id === this.props.metadata.id ? 'active' : ''} href={this.getLink(metadata)}> {metadata.title} </a> </li> )} </ul> </div> )} </div>; } }); module.exports = DocsSidebar;
ajax/libs/line-chart/3.0.0-beta.4/LineChart-react.min.js
ahocevar/cdnjs
(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory();else if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")exports["n3"]=factory();else root["n3"]=factory()})(this,function(){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.i=function(value){return value};__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter})}};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=124)}([function(module,exports){var process=module.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},function(module,exports,__webpack_require__){(function(global,factory){true?factory(exports):typeof define==="function"&&define.amd?define(["exports"],factory):factory(global.d3=global.d3||{})})(this,function(exports){"use strict";var version="4.7.4";var ascending=function(a,b){return a<b?-1:a>b?1:a>=b?0:NaN};var bisector=function(compare){if(compare.length===1)compare=ascendingComparator(compare);return{left:function(a,x,lo,hi){if(lo==null)lo=0;if(hi==null)hi=a.length;while(lo<hi){var mid=lo+hi>>>1;if(compare(a[mid],x)<0)lo=mid+1;else hi=mid}return lo},right:function(a,x,lo,hi){if(lo==null)lo=0;if(hi==null)hi=a.length;while(lo<hi){var mid=lo+hi>>>1;if(compare(a[mid],x)>0)hi=mid;else lo=mid+1}return lo}}};function ascendingComparator(f){return function(d,x){return ascending(f(d),x)}}var ascendingBisect=bisector(ascending);var bisectRight=ascendingBisect.right;var bisectLeft=ascendingBisect.left;var pairs=function(array,f){if(f==null)f=pair;var i=0,n=array.length-1,p=array[0],pairs=new Array(n<0?0:n);while(i<n)pairs[i]=f(p,p=array[++i]);return pairs};function pair(a,b){return[a,b]}var cross=function(a,b,f){var na=a.length,nb=b.length,c=new Array(na*nb),ia,ib,ic,va;if(f==null)f=pair;for(ia=ic=0;ia<na;++ia)for(va=a[ia],ib=0;ib<nb;++ib,++ic)c[ic]=f(va,b[ib]);return c};var descending=function(a,b){return b<a?-1:b>a?1:b>=a?0:NaN};var number=function(x){return x===null?NaN:+x};var variance=function(array,f){var n=array.length,m=0,a,d,s=0,i=-1,j=0;if(f==null){while(++i<n){if(!isNaN(a=number(array[i]))){d=a-m;m+=d/++j;s+=d*(a-m)}}}else{while(++i<n){if(!isNaN(a=number(f(array[i],i,array)))){d=a-m;m+=d/++j;s+=d*(a-m)}}}if(j>1)return s/(j-1)};var deviation=function(array,f){var v=variance(array,f);return v?Math.sqrt(v):v};var extent=function(array,f){var i=-1,n=array.length,a,b,c;if(f==null){while(++i<n)if((b=array[i])!=null&&b>=b){a=c=b;break}while(++i<n)if((b=array[i])!=null){if(a>b)a=b;if(c<b)c=b}}else{while(++i<n)if((b=f(array[i],i,array))!=null&&b>=b){a=c=b;break}while(++i<n)if((b=f(array[i],i,array))!=null){if(a>b)a=b;if(c<b)c=b}}return[a,c]};var array=Array.prototype;var slice=array.slice;var map=array.map;var constant=function(x){return function(){return x}};var identity=function(x){return x};var sequence=function(start,stop,step){start=+start,stop=+stop,step=(n=arguments.length)<2?(stop=start,start=0,1):n<3?1:+step;var i=-1,n=Math.max(0,Math.ceil((stop-start)/step))|0,range=new Array(n);while(++i<n){range[i]=start+i*step}return range};var e10=Math.sqrt(50);var e5=Math.sqrt(10);var e2=Math.sqrt(2);var ticks=function(start,stop,count){var step=tickStep(start,stop,count);return sequence(Math.ceil(start/step)*step,Math.floor(stop/step)*step+step/2,step)};function tickStep(start,stop,count){var step0=Math.abs(stop-start)/Math.max(0,count),step1=Math.pow(10,Math.floor(Math.log(step0)/Math.LN10)),error=step0/step1;if(error>=e10)step1*=10;else if(error>=e5)step1*=5;else if(error>=e2)step1*=2;return stop<start?-step1:step1}var sturges=function(values){return Math.ceil(Math.log(values.length)/Math.LN2)+1};var histogram=function(){var value=identity,domain=extent,threshold=sturges;function histogram(data){var i,n=data.length,x,values=new Array(n);for(i=0;i<n;++i){values[i]=value(data[i],i,data)}var xz=domain(values),x0=xz[0],x1=xz[1],tz=threshold(values,x0,x1);if(!Array.isArray(tz))tz=ticks(x0,x1,tz);var m=tz.length;while(tz[0]<=x0)tz.shift(),--m;while(tz[m-1]>=x1)tz.pop(),--m;var bins=new Array(m+1),bin;for(i=0;i<=m;++i){bin=bins[i]=[];bin.x0=i>0?tz[i-1]:x0;bin.x1=i<m?tz[i]:x1}for(i=0;i<n;++i){x=values[i];if(x0<=x&&x<=x1){bins[bisectRight(tz,x,0,m)].push(data[i])}}return bins}histogram.value=function(_){return arguments.length?(value=typeof _==="function"?_:constant(_),histogram):value};histogram.domain=function(_){return arguments.length?(domain=typeof _==="function"?_:constant([_[0],_[1]]),histogram):domain};histogram.thresholds=function(_){return arguments.length?(threshold=typeof _==="function"?_:Array.isArray(_)?constant(slice.call(_)):constant(_),histogram):threshold};return histogram};var threshold=function(array,p,f){if(f==null)f=number;if(!(n=array.length))return;if((p=+p)<=0||n<2)return+f(array[0],0,array);if(p>=1)return+f(array[n-1],n-1,array);var n,h=(n-1)*p,i=Math.floor(h),a=+f(array[i],i,array),b=+f(array[i+1],i+1,array);return a+(b-a)*(h-i)};var freedmanDiaconis=function(values,min,max){values=map.call(values,number).sort(ascending);return Math.ceil((max-min)/(2*(threshold(values,.75)-threshold(values,.25))*Math.pow(values.length,-1/3)))};var scott=function(values,min,max){return Math.ceil((max-min)/(3.5*deviation(values)*Math.pow(values.length,-1/3)))};var max=function(array,f){var i=-1,n=array.length,a,b;if(f==null){while(++i<n)if((b=array[i])!=null&&b>=b){a=b;break}while(++i<n)if((b=array[i])!=null&&b>a)a=b}else{while(++i<n)if((b=f(array[i],i,array))!=null&&b>=b){a=b;break}while(++i<n)if((b=f(array[i],i,array))!=null&&b>a)a=b}return a};var mean=function(array,f){var s=0,n=array.length,a,i=-1,j=n;if(f==null){while(++i<n)if(!isNaN(a=number(array[i])))s+=a;else--j}else{while(++i<n)if(!isNaN(a=number(f(array[i],i,array))))s+=a;else--j}if(j)return s/j};var median=function(array,f){var numbers=[],n=array.length,a,i=-1;if(f==null){while(++i<n)if(!isNaN(a=number(array[i])))numbers.push(a)}else{while(++i<n)if(!isNaN(a=number(f(array[i],i,array))))numbers.push(a)}return threshold(numbers.sort(ascending),.5)};var merge=function(arrays){var n=arrays.length,m,i=-1,j=0,merged,array;while(++i<n)j+=arrays[i].length;merged=new Array(j);while(--n>=0){array=arrays[n];m=array.length;while(--m>=0){merged[--j]=array[m]}}return merged};var min=function(array,f){var i=-1,n=array.length,a,b;if(f==null){while(++i<n)if((b=array[i])!=null&&b>=b){a=b;break}while(++i<n)if((b=array[i])!=null&&a>b)a=b}else{while(++i<n)if((b=f(array[i],i,array))!=null&&b>=b){a=b;break}while(++i<n)if((b=f(array[i],i,array))!=null&&a>b)a=b}return a};var permute=function(array,indexes){var i=indexes.length,permutes=new Array(i);while(i--)permutes[i]=array[indexes[i]];return permutes};var scan=function(array,compare){if(!(n=array.length))return;var i=0,n,j=0,xi,xj=array[j];if(!compare)compare=ascending;while(++i<n)if(compare(xi=array[i],xj)<0||compare(xj,xj)!==0)xj=xi,j=i;if(compare(xj,xj)===0)return j};var shuffle=function(array,i0,i1){var m=(i1==null?array.length:i1)-(i0=i0==null?0:+i0),t,i;while(m){i=Math.random()*m--|0;t=array[m+i0];array[m+i0]=array[i+i0];array[i+i0]=t}return array};var sum=function(array,f){var s=0,n=array.length,a,i=-1;if(f==null){while(++i<n)if(a=+array[i])s+=a}else{while(++i<n)if(a=+f(array[i],i,array))s+=a}return s};var transpose=function(matrix){if(!(n=matrix.length))return[];for(var i=-1,m=min(matrix,length),transpose=new Array(m);++i<m;){for(var j=-1,n,row=transpose[i]=new Array(n);++j<n;){row[j]=matrix[j][i]}}return transpose};function length(d){return d.length}var zip=function(){return transpose(arguments)};var slice$1=Array.prototype.slice;var identity$1=function(x){return x};var top=1;var right=2;var bottom=3;var left=4;var epsilon=1e-6;function translateX(x){return"translate("+x+",0)"}function translateY(y){return"translate(0,"+y+")"}function center(scale){var offset=scale.bandwidth()/2;if(scale.round())offset=Math.round(offset);return function(d){return scale(d)+offset}}function entering(){return!this.__axis}function axis(orient,scale){var tickArguments=[],tickValues=null,tickFormat=null,tickSizeInner=6,tickSizeOuter=6,tickPadding=3,k=orient===top||orient===left?-1:1,x,y=orient===left||orient===right?(x="x","y"):(x="y","x"),transform=orient===top||orient===bottom?translateX:translateY;function axis(context){var values=tickValues==null?scale.ticks?scale.ticks.apply(scale,tickArguments):scale.domain():tickValues,format=tickFormat==null?scale.tickFormat?scale.tickFormat.apply(scale,tickArguments):identity$1:tickFormat,spacing=Math.max(tickSizeInner,0)+tickPadding,range=scale.range(),range0=range[0]+.5,range1=range[range.length-1]+.5,position=(scale.bandwidth?center:identity$1)(scale.copy()),selection=context.selection?context.selection():context,path=selection.selectAll(".domain").data([null]),tick=selection.selectAll(".tick").data(values,scale).order(),tickExit=tick.exit(),tickEnter=tick.enter().append("g").attr("class","tick"),line=tick.select("line"),text=tick.select("text");path=path.merge(path.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000"));tick=tick.merge(tickEnter);line=line.merge(tickEnter.append("line").attr("stroke","#000").attr(x+"2",k*tickSizeInner).attr(y+"1",.5).attr(y+"2",.5));text=text.merge(tickEnter.append("text").attr("fill","#000").attr(x,k*spacing).attr(y,.5).attr("dy",orient===top?"0em":orient===bottom?"0.71em":"0.32em"));if(context!==selection){path=path.transition(context);tick=tick.transition(context);line=line.transition(context);text=text.transition(context);tickExit=tickExit.transition(context).attr("opacity",epsilon).attr("transform",function(d){return isFinite(d=position(d))?transform(d):this.getAttribute("transform")});tickEnter.attr("opacity",epsilon).attr("transform",function(d){var p=this.parentNode.__axis;return transform(p&&isFinite(p=p(d))?p:position(d))})}tickExit.remove();path.attr("d",orient===left||orient==right?"M"+k*tickSizeOuter+","+range0+"H0.5V"+range1+"H"+k*tickSizeOuter:"M"+range0+","+k*tickSizeOuter+"V0.5H"+range1+"V"+k*tickSizeOuter);tick.attr("opacity",1).attr("transform",function(d){return transform(position(d))});line.attr(x+"2",k*tickSizeInner);text.attr(x,k*spacing).text(format);selection.filter(entering).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",orient===right?"start":orient===left?"end":"middle");selection.each(function(){this.__axis=position})}axis.scale=function(_){return arguments.length?(scale=_,axis):scale};axis.ticks=function(){return tickArguments=slice$1.call(arguments),axis};axis.tickArguments=function(_){return arguments.length?(tickArguments=_==null?[]:slice$1.call(_),axis):tickArguments.slice()};axis.tickValues=function(_){return arguments.length?(tickValues=_==null?null:slice$1.call(_),axis):tickValues&&tickValues.slice()};axis.tickFormat=function(_){return arguments.length?(tickFormat=_,axis):tickFormat};axis.tickSize=function(_){return arguments.length?(tickSizeInner=tickSizeOuter=+_,axis):tickSizeInner};axis.tickSizeInner=function(_){return arguments.length?(tickSizeInner=+_,axis):tickSizeInner};axis.tickSizeOuter=function(_){return arguments.length?(tickSizeOuter=+_,axis):tickSizeOuter};axis.tickPadding=function(_){return arguments.length?(tickPadding=+_,axis):tickPadding};return axis}function axisTop(scale){return axis(top,scale)}function axisRight(scale){return axis(right,scale)}function axisBottom(scale){return axis(bottom,scale)}function axisLeft(scale){return axis(left,scale)}var noop={value:function(){}};function dispatch(){for(var i=0,n=arguments.length,_={},t;i<n;++i){if(!(t=arguments[i]+"")||t in _)throw new Error("illegal type: "+t);_[t]=[]}return new Dispatch(_)}function Dispatch(_){this._=_}function parseTypenames(typenames,types){return typenames.trim().split(/^|\s+/).map(function(t){var name="",i=t.indexOf(".");if(i>=0)name=t.slice(i+1),t=t.slice(0,i);if(t&&!types.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:name}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(typename,callback){var _=this._,T=parseTypenames(typename+"",_),t,i=-1,n=T.length;if(arguments.length<2){while(++i<n)if((t=(typename=T[i]).type)&&(t=get(_[t],typename.name)))return t;return}if(callback!=null&&typeof callback!=="function")throw new Error("invalid callback: "+callback);while(++i<n){if(t=(typename=T[i]).type)_[t]=set(_[t],typename.name,callback);else if(callback==null)for(t in _)_[t]=set(_[t],typename.name,null)}return this},copy:function(){var copy={},_=this._;for(var t in _)copy[t]=_[t].slice();return new Dispatch(copy)},call:function(type,that){if((n=arguments.length-2)>0)for(var args=new Array(n),i=0,n,t;i<n;++i)args[i]=arguments[i+2];if(!this._.hasOwnProperty(type))throw new Error("unknown type: "+type);for(t=this._[type],i=0,n=t.length;i<n;++i)t[i].value.apply(that,args)},apply:function(type,that,args){if(!this._.hasOwnProperty(type))throw new Error("unknown type: "+type);for(var t=this._[type],i=0,n=t.length;i<n;++i)t[i].value.apply(that,args)}};function get(type,name){for(var i=0,n=type.length,c;i<n;++i){if((c=type[i]).name===name){return c.value}}}function set(type,name,callback){for(var i=0,n=type.length;i<n;++i){if(type[i].name===name){type[i]=noop,type=type.slice(0,i).concat(type.slice(i+1));break}}if(callback!=null)type.push({name:name,value:callback});return type}var xhtml="http://www.w3.org/1999/xhtml";var namespaces={svg:"http://www.w3.org/2000/svg",xhtml:xhtml,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};var namespace=function(name){var prefix=name+="",i=prefix.indexOf(":");if(i>=0&&(prefix=name.slice(0,i))!=="xmlns")name=name.slice(i+1);return namespaces.hasOwnProperty(prefix)?{space:namespaces[prefix],local:name}:name};function creatorInherit(name){return function(){var document=this.ownerDocument,uri=this.namespaceURI;return uri===xhtml&&document.documentElement.namespaceURI===xhtml?document.createElement(name):document.createElementNS(uri,name)}}function creatorFixed(fullname){return function(){return this.ownerDocument.createElementNS(fullname.space,fullname.local)}}var creator=function(name){var fullname=namespace(name);return(fullname.local?creatorFixed:creatorInherit)(fullname)};var nextId=0;function local$1(){return new Local}function Local(){this._="@"+(++nextId).toString(36)}Local.prototype=local$1.prototype={constructor:Local,get:function(node){var id=this._;while(!(id in node))if(!(node=node.parentNode))return;return node[id]},set:function(node,value){return node[this._]=value},remove:function(node){return this._ in node&&delete node[this._]},toString:function(){return this._}};var matcher=function(selector){return function(){return this.matches(selector)}};if(typeof document!=="undefined"){var element=document.documentElement;if(!element.matches){var vendorMatches=element.webkitMatchesSelector||element.msMatchesSelector||element.mozMatchesSelector||element.oMatchesSelector;matcher=function(selector){return function(){return vendorMatches.call(this,selector)}}}}var matcher$1=matcher;var filterEvents={};exports.event=null;if(typeof document!=="undefined"){var element$1=document.documentElement;if(!("onmouseenter"in element$1)){filterEvents={mouseenter:"mouseover",mouseleave:"mouseout"}}}function filterContextListener(listener,index,group){listener=contextListener(listener,index,group);return function(event){var related=event.relatedTarget;if(!related||related!==this&&!(related.compareDocumentPosition(this)&8)){listener.call(this,event)}}}function contextListener(listener,index,group){return function(event1){var event0=exports.event;exports.event=event1;try{listener.call(this,this.__data__,index,group)}finally{exports.event=event0}}}function parseTypenames$1(typenames){return typenames.trim().split(/^|\s+/).map(function(t){var name="",i=t.indexOf(".");if(i>=0)name=t.slice(i+1),t=t.slice(0,i);return{type:t,name:name}})}function onRemove(typename){return function(){var on=this.__on;if(!on)return;for(var j=0,i=-1,m=on.length,o;j<m;++j){if(o=on[j],(!typename.type||o.type===typename.type)&&o.name===typename.name){this.removeEventListener(o.type,o.listener,o.capture)}else{on[++i]=o}}if(++i)on.length=i;else delete this.__on}}function onAdd(typename,value,capture){var wrap=filterEvents.hasOwnProperty(typename.type)?filterContextListener:contextListener;return function(d,i,group){var on=this.__on,o,listener=wrap(value,i,group);if(on)for(var j=0,m=on.length;j<m;++j){if((o=on[j]).type===typename.type&&o.name===typename.name){this.removeEventListener(o.type,o.listener,o.capture);this.addEventListener(o.type,o.listener=listener,o.capture=capture);o.value=value;return}}this.addEventListener(typename.type,listener,capture);o={type:typename.type,name:typename.name,value:value,listener:listener,capture:capture};if(!on)this.__on=[o];else on.push(o)}}var selection_on=function(typename,value,capture){var typenames=parseTypenames$1(typename+""),i,n=typenames.length,t;if(arguments.length<2){var on=this.node().__on;if(on)for(var j=0,m=on.length,o;j<m;++j){for(i=0,o=on[j];i<n;++i){if((t=typenames[i]).type===o.type&&t.name===o.name){return o.value}}}return}on=value?onAdd:onRemove;if(capture==null)capture=false;for(i=0;i<n;++i)this.each(on(typenames[i],value,capture));return this};function customEvent(event1,listener,that,args){var event0=exports.event;event1.sourceEvent=exports.event;exports.event=event1;try{return listener.apply(that,args)}finally{exports.event=event0}}var sourceEvent=function(){var current=exports.event,source;while(source=current.sourceEvent)current=source;return current};var point=function(node,event){var svg=node.ownerSVGElement||node;if(svg.createSVGPoint){var point=svg.createSVGPoint();point.x=event.clientX,point.y=event.clientY;point=point.matrixTransform(node.getScreenCTM().inverse());return[point.x,point.y]}var rect=node.getBoundingClientRect();return[event.clientX-rect.left-node.clientLeft,event.clientY-rect.top-node.clientTop]};var mouse=function(node){var event=sourceEvent();if(event.changedTouches)event=event.changedTouches[0];return point(node,event)};function none(){}var selector=function(selector){return selector==null?none:function(){return this.querySelector(selector)}};var selection_select=function(select){if(typeof select!=="function")select=selector(select);for(var groups=this._groups,m=groups.length,subgroups=new Array(m),j=0;j<m;++j){for(var group=groups[j],n=group.length,subgroup=subgroups[j]=new Array(n),node,subnode,i=0;i<n;++i){if((node=group[i])&&(subnode=select.call(node,node.__data__,i,group))){if("__data__"in node)subnode.__data__=node.__data__;subgroup[i]=subnode}}}return new Selection(subgroups,this._parents)};function empty$1(){return[]}var selectorAll=function(selector){return selector==null?empty$1:function(){return this.querySelectorAll(selector)}};var selection_selectAll=function(select){if(typeof select!=="function")select=selectorAll(select);for(var groups=this._groups,m=groups.length,subgroups=[],parents=[],j=0;j<m;++j){for(var group=groups[j],n=group.length,node,i=0;i<n;++i){if(node=group[i]){subgroups.push(select.call(node,node.__data__,i,group));parents.push(node)}}}return new Selection(subgroups,parents)};var selection_filter=function(match){if(typeof match!=="function")match=matcher$1(match);for(var groups=this._groups,m=groups.length,subgroups=new Array(m),j=0;j<m;++j){for(var group=groups[j],n=group.length,subgroup=subgroups[j]=[],node,i=0;i<n;++i){if((node=group[i])&&match.call(node,node.__data__,i,group)){subgroup.push(node)}}}return new Selection(subgroups,this._parents)};var sparse=function(update){return new Array(update.length)};var selection_enter=function(){return new Selection(this._enter||this._groups.map(sparse),this._parents)};function EnterNode(parent,datum){this.ownerDocument=parent.ownerDocument;this.namespaceURI=parent.namespaceURI;this._next=null;this._parent=parent;this.__data__=datum}EnterNode.prototype={constructor:EnterNode,appendChild:function(child){return this._parent.insertBefore(child,this._next)},insertBefore:function(child,next){return this._parent.insertBefore(child,next)},querySelector:function(selector){return this._parent.querySelector(selector)},querySelectorAll:function(selector){return this._parent.querySelectorAll(selector)}};var constant$1=function(x){return function(){return x}};var keyPrefix="$";function bindIndex(parent,group,enter,update,exit,data){var i=0,node,groupLength=group.length,dataLength=data.length;for(;i<dataLength;++i){if(node=group[i]){node.__data__=data[i];update[i]=node}else{enter[i]=new EnterNode(parent,data[i])}}for(;i<groupLength;++i){if(node=group[i]){exit[i]=node}}}function bindKey(parent,group,enter,update,exit,data,key){var i,node,nodeByKeyValue={},groupLength=group.length,dataLength=data.length,keyValues=new Array(groupLength),keyValue;for(i=0;i<groupLength;++i){if(node=group[i]){keyValues[i]=keyValue=keyPrefix+key.call(node,node.__data__,i,group);if(keyValue in nodeByKeyValue){exit[i]=node}else{nodeByKeyValue[keyValue]=node}}}for(i=0;i<dataLength;++i){keyValue=keyPrefix+key.call(parent,data[i],i,data);if(node=nodeByKeyValue[keyValue]){update[i]=node;node.__data__=data[i];nodeByKeyValue[keyValue]=null}else{enter[i]=new EnterNode(parent,data[i])}}for(i=0;i<groupLength;++i){if((node=group[i])&&nodeByKeyValue[keyValues[i]]===node){exit[i]=node}}}var selection_data=function(value,key){if(!value){data=new Array(this.size()),j=-1;this.each(function(d){data[++j]=d});return data}var bind=key?bindKey:bindIndex,parents=this._parents,groups=this._groups;if(typeof value!=="function")value=constant$1(value);for(var m=groups.length,update=new Array(m),enter=new Array(m),exit=new Array(m),j=0;j<m;++j){var parent=parents[j],group=groups[j],groupLength=group.length,data=value.call(parent,parent&&parent.__data__,j,parents),dataLength=data.length,enterGroup=enter[j]=new Array(dataLength),updateGroup=update[j]=new Array(dataLength),exitGroup=exit[j]=new Array(groupLength);bind(parent,group,enterGroup,updateGroup,exitGroup,data,key);for(var i0=0,i1=0,previous,next;i0<dataLength;++i0){if(previous=enterGroup[i0]){if(i0>=i1)i1=i0+1;while(!(next=updateGroup[i1])&&++i1<dataLength);previous._next=next||null}}}update=new Selection(update,parents);update._enter=enter;update._exit=exit;return update};var selection_exit=function(){return new Selection(this._exit||this._groups.map(sparse),this._parents)};var selection_merge=function(selection){for(var groups0=this._groups,groups1=selection._groups,m0=groups0.length,m1=groups1.length,m=Math.min(m0,m1),merges=new Array(m0),j=0;j<m;++j){for(var group0=groups0[j],group1=groups1[j],n=group0.length,merge=merges[j]=new Array(n),node,i=0;i<n;++i){if(node=group0[i]||group1[i]){merge[i]=node}}}for(;j<m0;++j){merges[j]=groups0[j]}return new Selection(merges,this._parents)};var selection_order=function(){for(var groups=this._groups,j=-1,m=groups.length;++j<m;){for(var group=groups[j],i=group.length-1,next=group[i],node;--i>=0;){if(node=group[i]){if(next&&next!==node.nextSibling)next.parentNode.insertBefore(node,next);next=node}}}return this};var selection_sort=function(compare){if(!compare)compare=ascending$1;function compareNode(a,b){return a&&b?compare(a.__data__,b.__data__):!a-!b}for(var groups=this._groups,m=groups.length,sortgroups=new Array(m),j=0;j<m;++j){for(var group=groups[j],n=group.length,sortgroup=sortgroups[j]=new Array(n),node,i=0;i<n;++i){if(node=group[i]){sortgroup[i]=node}}sortgroup.sort(compareNode)}return new Selection(sortgroups,this._parents).order()};function ascending$1(a,b){return a<b?-1:a>b?1:a>=b?0:NaN}var selection_call=function(){var callback=arguments[0];arguments[0]=this;callback.apply(null,arguments);return this};var selection_nodes=function(){var nodes=new Array(this.size()),i=-1;this.each(function(){nodes[++i]=this});return nodes};var selection_node=function(){for(var groups=this._groups,j=0,m=groups.length;j<m;++j){for(var group=groups[j],i=0,n=group.length;i<n;++i){var node=group[i];if(node)return node}}return null};var selection_size=function(){var size=0;this.each(function(){++size});return size};var selection_empty=function(){return!this.node()};var selection_each=function(callback){for(var groups=this._groups,j=0,m=groups.length;j<m;++j){for(var group=groups[j],i=0,n=group.length,node;i<n;++i){if(node=group[i])callback.call(node,node.__data__,i,group)}}return this};function attrRemove(name){return function(){this.removeAttribute(name)}}function attrRemoveNS(fullname){return function(){this.removeAttributeNS(fullname.space,fullname.local)}}function attrConstant(name,value){return function(){this.setAttribute(name,value)}}function attrConstantNS(fullname,value){return function(){this.setAttributeNS(fullname.space,fullname.local,value)}}function attrFunction(name,value){return function(){var v=value.apply(this,arguments);if(v==null)this.removeAttribute(name);else this.setAttribute(name,v)}}function attrFunctionNS(fullname,value){return function(){var v=value.apply(this,arguments);if(v==null)this.removeAttributeNS(fullname.space,fullname.local);else this.setAttributeNS(fullname.space,fullname.local,v)}}var selection_attr=function(name,value){var fullname=namespace(name);if(arguments.length<2){var node=this.node();return fullname.local?node.getAttributeNS(fullname.space,fullname.local):node.getAttribute(fullname)}return this.each((value==null?fullname.local?attrRemoveNS:attrRemove:typeof value==="function"?fullname.local?attrFunctionNS:attrFunction:fullname.local?attrConstantNS:attrConstant)(fullname,value))};var window=function(node){return node.ownerDocument&&node.ownerDocument.defaultView||node.document&&node||node.defaultView};function styleRemove(name){return function(){this.style.removeProperty(name)}}function styleConstant(name,value,priority){return function(){this.style.setProperty(name,value,priority)}}function styleFunction(name,value,priority){return function(){var v=value.apply(this,arguments);if(v==null)this.style.removeProperty(name);else this.style.setProperty(name,v,priority)}}var selection_style=function(name,value,priority){var node;return arguments.length>1?this.each((value==null?styleRemove:typeof value==="function"?styleFunction:styleConstant)(name,value,priority==null?"":priority)):window(node=this.node()).getComputedStyle(node,null).getPropertyValue(name)};function propertyRemove(name){return function(){delete this[name]}}function propertyConstant(name,value){return function(){this[name]=value}}function propertyFunction(name,value){return function(){var v=value.apply(this,arguments);if(v==null)delete this[name];else this[name]=v}}var selection_property=function(name,value){return arguments.length>1?this.each((value==null?propertyRemove:typeof value==="function"?propertyFunction:propertyConstant)(name,value)):this.node()[name]};function classArray(string){return string.trim().split(/^|\s+/)}function classList(node){return node.classList||new ClassList(node)}function ClassList(node){this._node=node;this._names=classArray(node.getAttribute("class")||"")}ClassList.prototype={add:function(name){var i=this._names.indexOf(name);if(i<0){this._names.push(name);this._node.setAttribute("class",this._names.join(" "))}},remove:function(name){var i=this._names.indexOf(name);if(i>=0){this._names.splice(i,1);this._node.setAttribute("class",this._names.join(" "))}},contains:function(name){return this._names.indexOf(name)>=0}};function classedAdd(node,names){var list=classList(node),i=-1,n=names.length;while(++i<n)list.add(names[i])}function classedRemove(node,names){var list=classList(node),i=-1,n=names.length;while(++i<n)list.remove(names[i])}function classedTrue(names){return function(){classedAdd(this,names)}}function classedFalse(names){return function(){classedRemove(this,names)}}function classedFunction(names,value){return function(){(value.apply(this,arguments)?classedAdd:classedRemove)(this,names)}}var selection_classed=function(name,value){var names=classArray(name+"");if(arguments.length<2){var list=classList(this.node()),i=-1,n=names.length;while(++i<n)if(!list.contains(names[i]))return false;return true}return this.each((typeof value==="function"?classedFunction:value?classedTrue:classedFalse)(names,value))};function textRemove(){this.textContent=""}function textConstant(value){return function(){this.textContent=value}}function textFunction(value){return function(){var v=value.apply(this,arguments);this.textContent=v==null?"":v}}var selection_text=function(value){ return arguments.length?this.each(value==null?textRemove:(typeof value==="function"?textFunction:textConstant)(value)):this.node().textContent};function htmlRemove(){this.innerHTML=""}function htmlConstant(value){return function(){this.innerHTML=value}}function htmlFunction(value){return function(){var v=value.apply(this,arguments);this.innerHTML=v==null?"":v}}var selection_html=function(value){return arguments.length?this.each(value==null?htmlRemove:(typeof value==="function"?htmlFunction:htmlConstant)(value)):this.node().innerHTML};function raise(){if(this.nextSibling)this.parentNode.appendChild(this)}var selection_raise=function(){return this.each(raise)};function lower(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}var selection_lower=function(){return this.each(lower)};var selection_append=function(name){var create=typeof name==="function"?name:creator(name);return this.select(function(){return this.appendChild(create.apply(this,arguments))})};function constantNull(){return null}var selection_insert=function(name,before){var create=typeof name==="function"?name:creator(name),select=before==null?constantNull:typeof before==="function"?before:selector(before);return this.select(function(){return this.insertBefore(create.apply(this,arguments),select.apply(this,arguments)||null)})};function remove(){var parent=this.parentNode;if(parent)parent.removeChild(this)}var selection_remove=function(){return this.each(remove)};var selection_datum=function(value){return arguments.length?this.property("__data__",value):this.node().__data__};function dispatchEvent(node,type,params){var window$$1=window(node),event=window$$1.CustomEvent;if(event){event=new event(type,params)}else{event=window$$1.document.createEvent("Event");if(params)event.initEvent(type,params.bubbles,params.cancelable),event.detail=params.detail;else event.initEvent(type,false,false)}node.dispatchEvent(event)}function dispatchConstant(type,params){return function(){return dispatchEvent(this,type,params)}}function dispatchFunction(type,params){return function(){return dispatchEvent(this,type,params.apply(this,arguments))}}var selection_dispatch=function(type,params){return this.each((typeof params==="function"?dispatchFunction:dispatchConstant)(type,params))};var root=[null];function Selection(groups,parents){this._groups=groups;this._parents=parents}function selection(){return new Selection([[document.documentElement]],root)}Selection.prototype=selection.prototype={constructor:Selection,select:selection_select,selectAll:selection_selectAll,filter:selection_filter,data:selection_data,enter:selection_enter,exit:selection_exit,merge:selection_merge,order:selection_order,sort:selection_sort,call:selection_call,nodes:selection_nodes,node:selection_node,size:selection_size,empty:selection_empty,each:selection_each,attr:selection_attr,style:selection_style,property:selection_property,classed:selection_classed,text:selection_text,html:selection_html,raise:selection_raise,lower:selection_lower,append:selection_append,insert:selection_insert,remove:selection_remove,datum:selection_datum,on:selection_on,dispatch:selection_dispatch};var select=function(selector){return typeof selector==="string"?new Selection([[document.querySelector(selector)]],[document.documentElement]):new Selection([[selector]],root)};var selectAll=function(selector){return typeof selector==="string"?new Selection([document.querySelectorAll(selector)],[document.documentElement]):new Selection([selector==null?[]:selector],root)};var touch=function(node,touches,identifier){if(arguments.length<3)identifier=touches,touches=sourceEvent().changedTouches;for(var i=0,n=touches?touches.length:0,touch;i<n;++i){if((touch=touches[i]).identifier===identifier){return point(node,touch)}}return null};var touches=function(node,touches){if(touches==null)touches=sourceEvent().touches;for(var i=0,n=touches?touches.length:0,points=new Array(n);i<n;++i){points[i]=point(node,touches[i])}return points};function nopropagation(){exports.event.stopImmediatePropagation()}var noevent=function(){exports.event.preventDefault();exports.event.stopImmediatePropagation()};var dragDisable=function(view){var root=view.document.documentElement,selection$$1=select(view).on("dragstart.drag",noevent,true);if("onselectstart"in root){selection$$1.on("selectstart.drag",noevent,true)}else{root.__noselect=root.style.MozUserSelect;root.style.MozUserSelect="none"}};function yesdrag(view,noclick){var root=view.document.documentElement,selection$$1=select(view).on("dragstart.drag",null);if(noclick){selection$$1.on("click.drag",noevent,true);setTimeout(function(){selection$$1.on("click.drag",null)},0)}if("onselectstart"in root){selection$$1.on("selectstart.drag",null)}else{root.style.MozUserSelect=root.__noselect;delete root.__noselect}}var constant$2=function(x){return function(){return x}};function DragEvent(target,type,subject,id,active,x,y,dx,dy,dispatch){this.target=target;this.type=type;this.subject=subject;this.identifier=id;this.active=active;this.x=x;this.y=y;this.dx=dx;this.dy=dy;this._=dispatch}DragEvent.prototype.on=function(){var value=this._.on.apply(this._,arguments);return value===this._?this:value};function defaultFilter$1(){return!exports.event.button}function defaultContainer(){return this.parentNode}function defaultSubject(d){return d==null?{x:exports.event.x,y:exports.event.y}:d}var drag=function(){var filter=defaultFilter$1,container=defaultContainer,subject=defaultSubject,gestures={},listeners=dispatch("start","drag","end"),active=0,mousemoving,touchending;function drag(selection$$1){selection$$1.on("mousedown.drag",mousedowned).on("touchstart.drag",touchstarted).on("touchmove.drag",touchmoved).on("touchend.drag touchcancel.drag",touchended).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function mousedowned(){if(touchending||!filter.apply(this,arguments))return;var gesture=beforestart("mouse",container.apply(this,arguments),mouse,this,arguments);if(!gesture)return;select(exports.event.view).on("mousemove.drag",mousemoved,true).on("mouseup.drag",mouseupped,true);dragDisable(exports.event.view);nopropagation();mousemoving=false;gesture("start")}function mousemoved(){noevent();mousemoving=true;gestures.mouse("drag")}function mouseupped(){select(exports.event.view).on("mousemove.drag mouseup.drag",null);yesdrag(exports.event.view,mousemoving);noevent();gestures.mouse("end")}function touchstarted(){if(!filter.apply(this,arguments))return;var touches$$1=exports.event.changedTouches,c=container.apply(this,arguments),n=touches$$1.length,i,gesture;for(i=0;i<n;++i){if(gesture=beforestart(touches$$1[i].identifier,c,touch,this,arguments)){nopropagation();gesture("start")}}}function touchmoved(){var touches$$1=exports.event.changedTouches,n=touches$$1.length,i,gesture;for(i=0;i<n;++i){if(gesture=gestures[touches$$1[i].identifier]){noevent();gesture("drag")}}}function touchended(){var touches$$1=exports.event.changedTouches,n=touches$$1.length,i,gesture;if(touchending)clearTimeout(touchending);touchending=setTimeout(function(){touchending=null},500);for(i=0;i<n;++i){if(gesture=gestures[touches$$1[i].identifier]){nopropagation();gesture("end")}}}function beforestart(id,container,point,that,args){var p=point(container,id),s,dx,dy,sublisteners=listeners.copy();if(!customEvent(new DragEvent(drag,"beforestart",s,id,active,p[0],p[1],0,0,sublisteners),function(){if((exports.event.subject=s=subject.apply(that,args))==null)return false;dx=s.x-p[0]||0;dy=s.y-p[1]||0;return true}))return;return function gesture(type){var p0=p,n;switch(type){case"start":gestures[id]=gesture,n=active++;break;case"end":delete gestures[id],--active;case"drag":p=point(container,id),n=active;break}customEvent(new DragEvent(drag,type,s,id,n,p[0]+dx,p[1]+dy,p[0]-p0[0],p[1]-p0[1],sublisteners),sublisteners.apply,sublisteners,[type,that,args])}}drag.filter=function(_){return arguments.length?(filter=typeof _==="function"?_:constant$2(!!_),drag):filter};drag.container=function(_){return arguments.length?(container=typeof _==="function"?_:constant$2(_),drag):container};drag.subject=function(_){return arguments.length?(subject=typeof _==="function"?_:constant$2(_),drag):subject};drag.on=function(){var value=listeners.on.apply(listeners,arguments);return value===listeners?drag:value};return drag};var define=function(constructor,factory,prototype){constructor.prototype=factory.prototype=prototype;prototype.constructor=constructor};function extend(parent,definition){var prototype=Object.create(parent.prototype);for(var key in definition)prototype[key]=definition[key];return prototype}function Color(){}var darker=.7;var brighter=1/darker;var reI="\\s*([+-]?\\d+)\\s*";var reN="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*";var reP="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*";var reHex3=/^#([0-9a-f]{3})$/;var reHex6=/^#([0-9a-f]{6})$/;var reRgbInteger=new RegExp("^rgb\\("+[reI,reI,reI]+"\\)$");var reRgbPercent=new RegExp("^rgb\\("+[reP,reP,reP]+"\\)$");var reRgbaInteger=new RegExp("^rgba\\("+[reI,reI,reI,reN]+"\\)$");var reRgbaPercent=new RegExp("^rgba\\("+[reP,reP,reP,reN]+"\\)$");var reHslPercent=new RegExp("^hsl\\("+[reN,reP,reP]+"\\)$");var reHslaPercent=new RegExp("^hsla\\("+[reN,reP,reP,reN]+"\\)$");var named={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};define(Color,color,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}});function color(format){var m;format=(format+"").trim().toLowerCase();return(m=reHex3.exec(format))?(m=parseInt(m[1],16),new Rgb(m>>8&15|m>>4&240,m>>4&15|m&240,(m&15)<<4|m&15,1)):(m=reHex6.exec(format))?rgbn(parseInt(m[1],16)):(m=reRgbInteger.exec(format))?new Rgb(m[1],m[2],m[3],1):(m=reRgbPercent.exec(format))?new Rgb(m[1]*255/100,m[2]*255/100,m[3]*255/100,1):(m=reRgbaInteger.exec(format))?rgba(m[1],m[2],m[3],m[4]):(m=reRgbaPercent.exec(format))?rgba(m[1]*255/100,m[2]*255/100,m[3]*255/100,m[4]):(m=reHslPercent.exec(format))?hsla(m[1],m[2]/100,m[3]/100,1):(m=reHslaPercent.exec(format))?hsla(m[1],m[2]/100,m[3]/100,m[4]):named.hasOwnProperty(format)?rgbn(named[format]):format==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(n){return new Rgb(n>>16&255,n>>8&255,n&255,1)}function rgba(r,g,b,a){if(a<=0)r=g=b=NaN;return new Rgb(r,g,b,a)}function rgbConvert(o){if(!(o instanceof Color))o=color(o);if(!o)return new Rgb;o=o.rgb();return new Rgb(o.r,o.g,o.b,o.opacity)}function rgb(r,g,b,opacity){return arguments.length===1?rgbConvert(r):new Rgb(r,g,b,opacity==null?1:opacity)}function Rgb(r,g,b,opacity){this.r=+r;this.g=+g;this.b=+b;this.opacity=+opacity}define(Rgb,rgb,extend(Color,{brighter:function(k){k=k==null?brighter:Math.pow(brighter,k);return new Rgb(this.r*k,this.g*k,this.b*k,this.opacity)},darker:function(k){k=k==null?darker:Math.pow(darker,k);return new Rgb(this.r*k,this.g*k,this.b*k,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&(0<=this.g&&this.g<=255)&&(0<=this.b&&this.b<=255)&&(0<=this.opacity&&this.opacity<=1)},toString:function(){var a=this.opacity;a=isNaN(a)?1:Math.max(0,Math.min(1,a));return(a===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(a===1?")":", "+a+")")}}));function hsla(h,s,l,a){if(a<=0)h=s=l=NaN;else if(l<=0||l>=1)h=s=NaN;else if(s<=0)h=NaN;return new Hsl(h,s,l,a)}function hslConvert(o){if(o instanceof Hsl)return new Hsl(o.h,o.s,o.l,o.opacity);if(!(o instanceof Color))o=color(o);if(!o)return new Hsl;if(o instanceof Hsl)return o;o=o.rgb();var r=o.r/255,g=o.g/255,b=o.b/255,min=Math.min(r,g,b),max=Math.max(r,g,b),h=NaN,s=max-min,l=(max+min)/2;if(s){if(r===max)h=(g-b)/s+(g<b)*6;else if(g===max)h=(b-r)/s+2;else h=(r-g)/s+4;s/=l<.5?max+min:2-max-min;h*=60}else{s=l>0&&l<1?0:h}return new Hsl(h,s,l,o.opacity)}function hsl(h,s,l,opacity){return arguments.length===1?hslConvert(h):new Hsl(h,s,l,opacity==null?1:opacity)}function Hsl(h,s,l,opacity){this.h=+h;this.s=+s;this.l=+l;this.opacity=+opacity}define(Hsl,hsl,extend(Color,{brighter:function(k){k=k==null?brighter:Math.pow(brighter,k);return new Hsl(this.h,this.s,this.l*k,this.opacity)},darker:function(k){k=k==null?darker:Math.pow(darker,k);return new Hsl(this.h,this.s,this.l*k,this.opacity)},rgb:function(){var h=this.h%360+(this.h<0)*360,s=isNaN(h)||isNaN(this.s)?0:this.s,l=this.l,m2=l+(l<.5?l:1-l)*s,m1=2*l-m2;return new Rgb(hsl2rgb(h>=240?h-240:h+120,m1,m2),hsl2rgb(h,m1,m2),hsl2rgb(h<120?h+240:h-120,m1,m2),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)}}));function hsl2rgb(h,m1,m2){return(h<60?m1+(m2-m1)*h/60:h<180?m2:h<240?m1+(m2-m1)*(240-h)/60:m1)*255}var deg2rad=Math.PI/180;var rad2deg=180/Math.PI;var Kn=18;var Xn=.95047;var Yn=1;var Zn=1.08883;var t0=4/29;var t1=6/29;var t2=3*t1*t1;var t3=t1*t1*t1;function labConvert(o){if(o instanceof Lab)return new Lab(o.l,o.a,o.b,o.opacity);if(o instanceof Hcl){var h=o.h*deg2rad;return new Lab(o.l,Math.cos(h)*o.c,Math.sin(h)*o.c,o.opacity)}if(!(o instanceof Rgb))o=rgbConvert(o);var b=rgb2xyz(o.r),a=rgb2xyz(o.g),l=rgb2xyz(o.b),x=xyz2lab((.4124564*b+.3575761*a+.1804375*l)/Xn),y=xyz2lab((.2126729*b+.7151522*a+.072175*l)/Yn),z=xyz2lab((.0193339*b+.119192*a+.9503041*l)/Zn);return new Lab(116*y-16,500*(x-y),200*(y-z),o.opacity)}function lab(l,a,b,opacity){return arguments.length===1?labConvert(l):new Lab(l,a,b,opacity==null?1:opacity)}function Lab(l,a,b,opacity){this.l=+l;this.a=+a;this.b=+b;this.opacity=+opacity}define(Lab,lab,extend(Color,{brighter:function(k){return new Lab(this.l+Kn*(k==null?1:k),this.a,this.b,this.opacity)},darker:function(k){return new Lab(this.l-Kn*(k==null?1:k),this.a,this.b,this.opacity)},rgb:function(){var y=(this.l+16)/116,x=isNaN(this.a)?y:y+this.a/500,z=isNaN(this.b)?y:y-this.b/200;y=Yn*lab2xyz(y);x=Xn*lab2xyz(x);z=Zn*lab2xyz(z);return new Rgb(xyz2rgb(3.2404542*x-1.5371385*y-.4985314*z),xyz2rgb(-.969266*x+1.8760108*y+.041556*z),xyz2rgb(.0556434*x-.2040259*y+1.0572252*z),this.opacity)}}));function xyz2lab(t){return t>t3?Math.pow(t,1/3):t/t2+t0}function lab2xyz(t){return t>t1?t*t*t:t2*(t-t0)}function xyz2rgb(x){return 255*(x<=.0031308?12.92*x:1.055*Math.pow(x,1/2.4)-.055)}function rgb2xyz(x){return(x/=255)<=.04045?x/12.92:Math.pow((x+.055)/1.055,2.4)}function hclConvert(o){if(o instanceof Hcl)return new Hcl(o.h,o.c,o.l,o.opacity);if(!(o instanceof Lab))o=labConvert(o);var h=Math.atan2(o.b,o.a)*rad2deg;return new Hcl(h<0?h+360:h,Math.sqrt(o.a*o.a+o.b*o.b),o.l,o.opacity)}function hcl(h,c,l,opacity){return arguments.length===1?hclConvert(h):new Hcl(h,c,l,opacity==null?1:opacity)}function Hcl(h,c,l,opacity){this.h=+h;this.c=+c;this.l=+l;this.opacity=+opacity}define(Hcl,hcl,extend(Color,{brighter:function(k){return new Hcl(this.h,this.c,this.l+Kn*(k==null?1:k),this.opacity)},darker:function(k){return new Hcl(this.h,this.c,this.l-Kn*(k==null?1:k),this.opacity)},rgb:function(){return labConvert(this).rgb()}}));var A=-.14861;var B=+1.78277;var C=-.29227;var D=-.90649;var E=+1.97294;var ED=E*D;var EB=E*B;var BC_DA=B*C-D*A;function cubehelixConvert(o){if(o instanceof Cubehelix)return new Cubehelix(o.h,o.s,o.l,o.opacity);if(!(o instanceof Rgb))o=rgbConvert(o);var r=o.r/255,g=o.g/255,b=o.b/255,l=(BC_DA*b+ED*r-EB*g)/(BC_DA+ED-EB),bl=b-l,k=(E*(g-l)-C*bl)/D,s=Math.sqrt(k*k+bl*bl)/(E*l*(1-l)),h=s?Math.atan2(k,bl)*rad2deg-120:NaN;return new Cubehelix(h<0?h+360:h,s,l,o.opacity)}function cubehelix(h,s,l,opacity){return arguments.length===1?cubehelixConvert(h):new Cubehelix(h,s,l,opacity==null?1:opacity)}function Cubehelix(h,s,l,opacity){this.h=+h;this.s=+s;this.l=+l;this.opacity=+opacity}define(Cubehelix,cubehelix,extend(Color,{brighter:function(k){k=k==null?brighter:Math.pow(brighter,k);return new Cubehelix(this.h,this.s,this.l*k,this.opacity)},darker:function(k){k=k==null?darker:Math.pow(darker,k);return new Cubehelix(this.h,this.s,this.l*k,this.opacity)},rgb:function(){var h=isNaN(this.h)?0:(this.h+120)*deg2rad,l=+this.l,a=isNaN(this.s)?0:this.s*l*(1-l),cosh=Math.cos(h),sinh=Math.sin(h);return new Rgb(255*(l+a*(A*cosh+B*sinh)),255*(l+a*(C*cosh+D*sinh)),255*(l+a*(E*cosh)),this.opacity)}}));function basis(t1,v0,v1,v2,v3){var t2=t1*t1,t3=t2*t1;return((1-3*t1+3*t2-t3)*v0+(4-6*t2+3*t3)*v1+(1+3*t1+3*t2-3*t3)*v2+t3*v3)/6}var basis$1=function(values){var n=values.length-1;return function(t){var i=t<=0?t=0:t>=1?(t=1,n-1):Math.floor(t*n),v1=values[i],v2=values[i+1],v0=i>0?values[i-1]:2*v1-v2,v3=i<n-1?values[i+2]:2*v2-v1;return basis((t-i/n)*n,v0,v1,v2,v3)}};var basisClosed=function(values){var n=values.length;return function(t){var i=Math.floor(((t%=1)<0?++t:t)*n),v0=values[(i+n-1)%n],v1=values[i%n],v2=values[(i+1)%n],v3=values[(i+2)%n];return basis((t-i/n)*n,v0,v1,v2,v3)}};var constant$3=function(x){return function(){return x}};function linear(a,d){return function(t){return a+t*d}}function exponential(a,b,y){return a=Math.pow(a,y),b=Math.pow(b,y)-a,y=1/y,function(t){return Math.pow(a+t*b,y)}}function hue(a,b){var d=b-a;return d?linear(a,d>180||d<-180?d-360*Math.round(d/360):d):constant$3(isNaN(a)?b:a)}function gamma(y){return(y=+y)===1?nogamma:function(a,b){return b-a?exponential(a,b,y):constant$3(isNaN(a)?b:a)}}function nogamma(a,b){var d=b-a;return d?linear(a,d):constant$3(isNaN(a)?b:a)}var interpolateRgb=function rgbGamma(y){var color$$1=gamma(y);function rgb$$1(start,end){var r=color$$1((start=rgb(start)).r,(end=rgb(end)).r),g=color$$1(start.g,end.g),b=color$$1(start.b,end.b),opacity=nogamma(start.opacity,end.opacity);return function(t){start.r=r(t);start.g=g(t);start.b=b(t);start.opacity=opacity(t);return start+""}}rgb$$1.gamma=rgbGamma;return rgb$$1}(1);function rgbSpline(spline){return function(colors){var n=colors.length,r=new Array(n),g=new Array(n),b=new Array(n),i,color$$1;for(i=0;i<n;++i){color$$1=rgb(colors[i]);r[i]=color$$1.r||0;g[i]=color$$1.g||0;b[i]=color$$1.b||0}r=spline(r);g=spline(g);b=spline(b);color$$1.opacity=1;return function(t){color$$1.r=r(t);color$$1.g=g(t);color$$1.b=b(t);return color$$1+""}}}var rgbBasis=rgbSpline(basis$1);var rgbBasisClosed=rgbSpline(basisClosed);var array$1=function(a,b){var nb=b?b.length:0,na=a?Math.min(nb,a.length):0,x=new Array(nb),c=new Array(nb),i;for(i=0;i<na;++i)x[i]=interpolateValue(a[i],b[i]);for(;i<nb;++i)c[i]=b[i];return function(t){for(i=0;i<na;++i)c[i]=x[i](t);return c}};var date=function(a,b){var d=new Date;return a=+a,b-=a,function(t){return d.setTime(a+b*t),d}};var reinterpolate=function(a,b){return a=+a,b-=a,function(t){return a+b*t}};var object=function(a,b){var i={},c={},k;if(a===null||typeof a!=="object")a={};if(b===null||typeof b!=="object")b={};for(k in b){if(k in a){i[k]=interpolateValue(a[k],b[k])}else{c[k]=b[k]}}return function(t){for(k in i)c[k]=i[k](t);return c}};var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;var reB=new RegExp(reA.source,"g");function zero(b){return function(){return b}}function one(b){return function(t){return b(t)+""}}var interpolateString=function(a,b){var bi=reA.lastIndex=reB.lastIndex=0,am,bm,bs,i=-1,s=[],q=[];a=a+"",b=b+"";while((am=reA.exec(a))&&(bm=reB.exec(b))){if((bs=bm.index)>bi){bs=b.slice(bi,bs);if(s[i])s[i]+=bs;else s[++i]=bs}if((am=am[0])===(bm=bm[0])){if(s[i])s[i]+=bm;else s[++i]=bm}else{s[++i]=null;q.push({i:i,x:reinterpolate(am,bm)})}bi=reB.lastIndex}if(bi<b.length){bs=b.slice(bi);if(s[i])s[i]+=bs;else s[++i]=bs}return s.length<2?q[0]?one(q[0].x):zero(b):(b=q.length,function(t){for(var i=0,o;i<b;++i)s[(o=q[i]).i]=o.x(t);return s.join("")})};var interpolateValue=function(a,b){var t=typeof b,c;return b==null||t==="boolean"?constant$3(b):(t==="number"?reinterpolate:t==="string"?(c=color(b))?(b=c,interpolateRgb):interpolateString:b instanceof color?interpolateRgb:b instanceof Date?date:Array.isArray(b)?array$1:isNaN(b)?object:reinterpolate)(a,b)};var interpolateRound=function(a,b){return a=+a,b-=a,function(t){return Math.round(a+b*t)}};var degrees=180/Math.PI;var identity$2={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};var decompose=function(a,b,c,d,e,f){var scaleX,scaleY,skewX;if(scaleX=Math.sqrt(a*a+b*b))a/=scaleX,b/=scaleX;if(skewX=a*c+b*d)c-=a*skewX,d-=b*skewX;if(scaleY=Math.sqrt(c*c+d*d))c/=scaleY,d/=scaleY,skewX/=scaleY;if(a*d<b*c)a=-a,b=-b,skewX=-skewX,scaleX=-scaleX;return{translateX:e,translateY:f,rotate:Math.atan2(b,a)*degrees,skewX:Math.atan(skewX)*degrees,scaleX:scaleX,scaleY:scaleY}};var cssNode;var cssRoot;var cssView;var svgNode;function parseCss(value){if(value==="none")return identity$2;if(!cssNode)cssNode=document.createElement("DIV"),cssRoot=document.documentElement,cssView=document.defaultView;cssNode.style.transform=value;value=cssView.getComputedStyle(cssRoot.appendChild(cssNode),null).getPropertyValue("transform");cssRoot.removeChild(cssNode);value=value.slice(7,-1).split(",");return decompose(+value[0],+value[1],+value[2],+value[3],+value[4],+value[5])}function parseSvg(value){if(value==null)return identity$2;if(!svgNode)svgNode=document.createElementNS("http://www.w3.org/2000/svg","g");svgNode.setAttribute("transform",value);if(!(value=svgNode.transform.baseVal.consolidate()))return identity$2;value=value.matrix;return decompose(value.a,value.b,value.c,value.d,value.e,value.f)}function interpolateTransform(parse,pxComma,pxParen,degParen){function pop(s){return s.length?s.pop()+" ":""}function translate(xa,ya,xb,yb,s,q){if(xa!==xb||ya!==yb){var i=s.push("translate(",null,pxComma,null,pxParen);q.push({i:i-4,x:reinterpolate(xa,xb)},{i:i-2,x:reinterpolate(ya,yb)})}else if(xb||yb){s.push("translate("+xb+pxComma+yb+pxParen)}}function rotate(a,b,s,q){if(a!==b){if(a-b>180)b+=360;else if(b-a>180)a+=360;q.push({i:s.push(pop(s)+"rotate(",null,degParen)-2,x:reinterpolate(a,b)})}else if(b){s.push(pop(s)+"rotate("+b+degParen)}}function skewX(a,b,s,q){if(a!==b){q.push({i:s.push(pop(s)+"skewX(",null,degParen)-2,x:reinterpolate(a,b)})}else if(b){s.push(pop(s)+"skewX("+b+degParen)}}function scale(xa,ya,xb,yb,s,q){if(xa!==xb||ya!==yb){var i=s.push(pop(s)+"scale(",null,",",null,")");q.push({i:i-4,x:reinterpolate(xa,xb)},{i:i-2,x:reinterpolate(ya,yb)})}else if(xb!==1||yb!==1){s.push(pop(s)+"scale("+xb+","+yb+")")}}return function(a,b){var s=[],q=[];a=parse(a),b=parse(b);translate(a.translateX,a.translateY,b.translateX,b.translateY,s,q);rotate(a.rotate,b.rotate,s,q);skewX(a.skewX,b.skewX,s,q);scale(a.scaleX,a.scaleY,b.scaleX,b.scaleY,s,q);a=b=null;return function(t){var i=-1,n=q.length,o;while(++i<n)s[(o=q[i]).i]=o.x(t);return s.join("")}}}var interpolateTransformCss=interpolateTransform(parseCss,"px, ","px)","deg)");var interpolateTransformSvg=interpolateTransform(parseSvg,", ",")",")");var rho=Math.SQRT2;var rho2=2;var rho4=4;var epsilon2=1e-12;function cosh(x){return((x=Math.exp(x))+1/x)/2}function sinh(x){return((x=Math.exp(x))-1/x)/2}function tanh(x){return((x=Math.exp(2*x))-1)/(x+1)}var interpolateZoom=function(p0,p1){var ux0=p0[0],uy0=p0[1],w0=p0[2],ux1=p1[0],uy1=p1[1],w1=p1[2],dx=ux1-ux0,dy=uy1-uy0,d2=dx*dx+dy*dy,i,S;if(d2<epsilon2){S=Math.log(w1/w0)/rho;i=function(t){return[ux0+t*dx,uy0+t*dy,w0*Math.exp(rho*t*S)]}}else{var d1=Math.sqrt(d2),b0=(w1*w1-w0*w0+rho4*d2)/(2*w0*rho2*d1),b1=(w1*w1-w0*w0-rho4*d2)/(2*w1*rho2*d1),r0=Math.log(Math.sqrt(b0*b0+1)-b0),r1=Math.log(Math.sqrt(b1*b1+1)-b1);S=(r1-r0)/rho;i=function(t){var s=t*S,coshr0=cosh(r0),u=w0/(rho2*d1)*(coshr0*tanh(rho*s+r0)-sinh(r0));return[ux0+u*dx,uy0+u*dy,w0*coshr0/cosh(rho*s+r0)]}}i.duration=S*1e3;return i};function hsl$1(hue$$1){return function(start,end){var h=hue$$1((start=hsl(start)).h,(end=hsl(end)).h),s=nogamma(start.s,end.s),l=nogamma(start.l,end.l),opacity=nogamma(start.opacity,end.opacity);return function(t){start.h=h(t);start.s=s(t);start.l=l(t);start.opacity=opacity(t);return start+""}}}var hsl$2=hsl$1(hue);var hslLong=hsl$1(nogamma);function lab$1(start,end){var l=nogamma((start=lab(start)).l,(end=lab(end)).l),a=nogamma(start.a,end.a),b=nogamma(start.b,end.b),opacity=nogamma(start.opacity,end.opacity);return function(t){start.l=l(t);start.a=a(t);start.b=b(t);start.opacity=opacity(t);return start+""}}function hcl$1(hue$$1){return function(start,end){var h=hue$$1((start=hcl(start)).h,(end=hcl(end)).h),c=nogamma(start.c,end.c),l=nogamma(start.l,end.l),opacity=nogamma(start.opacity,end.opacity);return function(t){start.h=h(t);start.c=c(t);start.l=l(t);start.opacity=opacity(t);return start+""}}}var hcl$2=hcl$1(hue);var hclLong=hcl$1(nogamma);function cubehelix$1(hue$$1){return function cubehelixGamma(y){y=+y;function cubehelix$$1(start,end){var h=hue$$1((start=cubehelix(start)).h,(end=cubehelix(end)).h),s=nogamma(start.s,end.s),l=nogamma(start.l,end.l),opacity=nogamma(start.opacity,end.opacity);return function(t){start.h=h(t);start.s=s(t);start.l=l(Math.pow(t,y));start.opacity=opacity(t);return start+""}}cubehelix$$1.gamma=cubehelixGamma;return cubehelix$$1}(1)}var cubehelix$2=cubehelix$1(hue);var cubehelixLong=cubehelix$1(nogamma);var quantize=function(interpolator,n){var samples=new Array(n);for(var i=0;i<n;++i)samples[i]=interpolator(i/(n-1));return samples};var frame=0;var timeout=0;var interval=0;var pokeDelay=1e3;var taskHead;var taskTail;var clockLast=0;var clockNow=0;var clockSkew=0;var clock=typeof performance==="object"&&performance.now?performance:Date;var setFrame=typeof requestAnimationFrame==="function"?requestAnimationFrame:function(f){setTimeout(f,17)};function now(){return clockNow||(setFrame(clearNow),clockNow=clock.now()+clockSkew)}function clearNow(){clockNow=0}function Timer(){this._call=this._time=this._next=null}Timer.prototype=timer.prototype={constructor:Timer,restart:function(callback,delay,time){if(typeof callback!=="function")throw new TypeError("callback is not a function");time=(time==null?now():+time)+(delay==null?0:+delay);if(!this._next&&taskTail!==this){if(taskTail)taskTail._next=this;else taskHead=this;taskTail=this}this._call=callback;this._time=time;sleep()},stop:function(){if(this._call){this._call=null;this._time=Infinity;sleep()}}};function timer(callback,delay,time){var t=new Timer;t.restart(callback,delay,time);return t}function timerFlush(){now();++frame;var t=taskHead,e;while(t){if((e=clockNow-t._time)>=0)t._call.call(null,e);t=t._next}--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew;frame=timeout=0;try{timerFlush()}finally{frame=0;nap();clockNow=0}}function poke(){var now=clock.now(),delay=now-clockLast;if(delay>pokeDelay)clockSkew-=delay,clockLast=now}function nap(){var t0,t1=taskHead,t2,time=Infinity;while(t1){if(t1._call){if(time>t1._time)time=t1._time;t0=t1,t1=t1._next}else{t2=t1._next,t1._next=null;t1=t0?t0._next=t2:taskHead=t2}}taskTail=t0;sleep(time)}function sleep(time){if(frame)return;if(timeout)timeout=clearTimeout(timeout);var delay=time-clockNow;if(delay>24){if(time<Infinity)timeout=setTimeout(wake,delay);if(interval)interval=clearInterval(interval)}else{if(!interval)clockLast=clockNow,interval=setInterval(poke,pokeDelay);frame=1,setFrame(wake)}}var timeout$1=function(callback,delay,time){var t=new Timer;delay=delay==null?0:+delay;t.restart(function(elapsed){t.stop();callback(elapsed+delay)},delay,time);return t};var interval$1=function(callback,delay,time){var t=new Timer,total=delay;if(delay==null)return t.restart(callback,delay,time),t;delay=+delay,time=time==null?now():+time;t.restart(function tick(elapsed){elapsed+=total;t.restart(tick,total+=delay,time);callback(elapsed)},delay,time);return t};var emptyOn=dispatch("start","end","interrupt");var emptyTween=[];var CREATED=0;var SCHEDULED=1;var STARTING=2;var STARTED=3;var RUNNING=4;var ENDING=5;var ENDED=6;var schedule=function(node,name,id,index,group,timing){var schedules=node.__transition;if(!schedules)node.__transition={};else if(id in schedules)return;create(node,id,{name:name,index:index,group:group,on:emptyOn,tween:emptyTween,time:timing.time,delay:timing.delay,duration:timing.duration,ease:timing.ease,timer:null,state:CREATED})};function init(node,id){var schedule=node.__transition;if(!schedule||!(schedule=schedule[id])||schedule.state>CREATED)throw new Error("too late");return schedule}function set$1(node,id){var schedule=node.__transition;if(!schedule||!(schedule=schedule[id])||schedule.state>STARTING)throw new Error("too late");return schedule}function get$1(node,id){var schedule=node.__transition;if(!schedule||!(schedule=schedule[id]))throw new Error("too late");return schedule}function create(node,id,self){var schedules=node.__transition,tween;schedules[id]=self;self.timer=timer(schedule,0,self.time);function schedule(elapsed){self.state=SCHEDULED;self.timer.restart(start,self.delay,self.time);if(self.delay<=elapsed)start(elapsed-self.delay)}function start(elapsed){var i,j,n,o;if(self.state!==SCHEDULED)return stop();for(i in schedules){o=schedules[i];if(o.name!==self.name)continue;if(o.state===STARTED)return timeout$1(start);if(o.state===RUNNING){o.state=ENDED;o.timer.stop();o.on.call("interrupt",node,node.__data__,o.index,o.group);delete schedules[i]}else if(+i<id){o.state=ENDED;o.timer.stop();delete schedules[i]}}timeout$1(function(){if(self.state===STARTED){self.state=RUNNING;self.timer.restart(tick,self.delay,self.time);tick(elapsed)}});self.state=STARTING;self.on.call("start",node,node.__data__,self.index,self.group);if(self.state!==STARTING)return;self.state=STARTED;tween=new Array(n=self.tween.length) ;for(i=0,j=-1;i<n;++i){if(o=self.tween[i].value.call(node,node.__data__,self.index,self.group)){tween[++j]=o}}tween.length=j+1}function tick(elapsed){var t=elapsed<self.duration?self.ease.call(null,elapsed/self.duration):(self.timer.restart(stop),self.state=ENDING,1),i=-1,n=tween.length;while(++i<n){tween[i].call(null,t)}if(self.state===ENDING){self.on.call("end",node,node.__data__,self.index,self.group);stop()}}function stop(){self.state=ENDED;self.timer.stop();delete schedules[id];for(var i in schedules)return;delete node.__transition}}var interrupt=function(node,name){var schedules=node.__transition,schedule,active,empty=true,i;if(!schedules)return;name=name==null?null:name+"";for(i in schedules){if((schedule=schedules[i]).name!==name){empty=false;continue}active=schedule.state>STARTING&&schedule.state<ENDING;schedule.state=ENDED;schedule.timer.stop();if(active)schedule.on.call("interrupt",node,node.__data__,schedule.index,schedule.group);delete schedules[i]}if(empty)delete node.__transition};var selection_interrupt=function(name){return this.each(function(){interrupt(this,name)})};function tweenRemove(id,name){var tween0,tween1;return function(){var schedule=set$1(this,id),tween=schedule.tween;if(tween!==tween0){tween1=tween0=tween;for(var i=0,n=tween1.length;i<n;++i){if(tween1[i].name===name){tween1=tween1.slice();tween1.splice(i,1);break}}}schedule.tween=tween1}}function tweenFunction(id,name,value){var tween0,tween1;if(typeof value!=="function")throw new Error;return function(){var schedule=set$1(this,id),tween=schedule.tween;if(tween!==tween0){tween1=(tween0=tween).slice();for(var t={name:name,value:value},i=0,n=tween1.length;i<n;++i){if(tween1[i].name===name){tween1[i]=t;break}}if(i===n)tween1.push(t)}schedule.tween=tween1}}var transition_tween=function(name,value){var id=this._id;name+="";if(arguments.length<2){var tween=get$1(this.node(),id).tween;for(var i=0,n=tween.length,t;i<n;++i){if((t=tween[i]).name===name){return t.value}}return null}return this.each((value==null?tweenRemove:tweenFunction)(id,name,value))};function tweenValue(transition,name,value){var id=transition._id;transition.each(function(){var schedule=set$1(this,id);(schedule.value||(schedule.value={}))[name]=value.apply(this,arguments)});return function(node){return get$1(node,id).value[name]}}var interpolate$$1=function(a,b){var c;return(typeof b==="number"?reinterpolate:b instanceof color?interpolateRgb:(c=color(b))?(b=c,interpolateRgb):interpolateString)(a,b)};function attrRemove$1(name){return function(){this.removeAttribute(name)}}function attrRemoveNS$1(fullname){return function(){this.removeAttributeNS(fullname.space,fullname.local)}}function attrConstant$1(name,interpolate$$1,value1){var value00,interpolate0;return function(){var value0=this.getAttribute(name);return value0===value1?null:value0===value00?interpolate0:interpolate0=interpolate$$1(value00=value0,value1)}}function attrConstantNS$1(fullname,interpolate$$1,value1){var value00,interpolate0;return function(){var value0=this.getAttributeNS(fullname.space,fullname.local);return value0===value1?null:value0===value00?interpolate0:interpolate0=interpolate$$1(value00=value0,value1)}}function attrFunction$1(name,interpolate$$1,value){var value00,value10,interpolate0;return function(){var value0,value1=value(this);if(value1==null)return void this.removeAttribute(name);value0=this.getAttribute(name);return value0===value1?null:value0===value00&&value1===value10?interpolate0:interpolate0=interpolate$$1(value00=value0,value10=value1)}}function attrFunctionNS$1(fullname,interpolate$$1,value){var value00,value10,interpolate0;return function(){var value0,value1=value(this);if(value1==null)return void this.removeAttributeNS(fullname.space,fullname.local);value0=this.getAttributeNS(fullname.space,fullname.local);return value0===value1?null:value0===value00&&value1===value10?interpolate0:interpolate0=interpolate$$1(value00=value0,value10=value1)}}var transition_attr=function(name,value){var fullname=namespace(name),i=fullname==="transform"?interpolateTransformSvg:interpolate$$1;return this.attrTween(name,typeof value==="function"?(fullname.local?attrFunctionNS$1:attrFunction$1)(fullname,i,tweenValue(this,"attr."+name,value)):value==null?(fullname.local?attrRemoveNS$1:attrRemove$1)(fullname):(fullname.local?attrConstantNS$1:attrConstant$1)(fullname,i,value+""))};function attrTweenNS(fullname,value){function tween(){var node=this,i=value.apply(node,arguments);return i&&function(t){node.setAttributeNS(fullname.space,fullname.local,i(t))}}tween._value=value;return tween}function attrTween(name,value){function tween(){var node=this,i=value.apply(node,arguments);return i&&function(t){node.setAttribute(name,i(t))}}tween._value=value;return tween}var transition_attrTween=function(name,value){var key="attr."+name;if(arguments.length<2)return(key=this.tween(key))&&key._value;if(value==null)return this.tween(key,null);if(typeof value!=="function")throw new Error;var fullname=namespace(name);return this.tween(key,(fullname.local?attrTweenNS:attrTween)(fullname,value))};function delayFunction(id,value){return function(){init(this,id).delay=+value.apply(this,arguments)}}function delayConstant(id,value){return value=+value,function(){init(this,id).delay=value}}var transition_delay=function(value){var id=this._id;return arguments.length?this.each((typeof value==="function"?delayFunction:delayConstant)(id,value)):get$1(this.node(),id).delay};function durationFunction(id,value){return function(){set$1(this,id).duration=+value.apply(this,arguments)}}function durationConstant(id,value){return value=+value,function(){set$1(this,id).duration=value}}var transition_duration=function(value){var id=this._id;return arguments.length?this.each((typeof value==="function"?durationFunction:durationConstant)(id,value)):get$1(this.node(),id).duration};function easeConstant(id,value){if(typeof value!=="function")throw new Error;return function(){set$1(this,id).ease=value}}var transition_ease=function(value){var id=this._id;return arguments.length?this.each(easeConstant(id,value)):get$1(this.node(),id).ease};var transition_filter=function(match){if(typeof match!=="function")match=matcher$1(match);for(var groups=this._groups,m=groups.length,subgroups=new Array(m),j=0;j<m;++j){for(var group=groups[j],n=group.length,subgroup=subgroups[j]=[],node,i=0;i<n;++i){if((node=group[i])&&match.call(node,node.__data__,i,group)){subgroup.push(node)}}}return new Transition(subgroups,this._parents,this._name,this._id)};var transition_merge=function(transition){if(transition._id!==this._id)throw new Error;for(var groups0=this._groups,groups1=transition._groups,m0=groups0.length,m1=groups1.length,m=Math.min(m0,m1),merges=new Array(m0),j=0;j<m;++j){for(var group0=groups0[j],group1=groups1[j],n=group0.length,merge=merges[j]=new Array(n),node,i=0;i<n;++i){if(node=group0[i]||group1[i]){merge[i]=node}}}for(;j<m0;++j){merges[j]=groups0[j]}return new Transition(merges,this._parents,this._name,this._id)};function start(name){return(name+"").trim().split(/^|\s+/).every(function(t){var i=t.indexOf(".");if(i>=0)t=t.slice(0,i);return!t||t==="start"})}function onFunction(id,name,listener){var on0,on1,sit=start(name)?init:set$1;return function(){var schedule=sit(this,id),on=schedule.on;if(on!==on0)(on1=(on0=on).copy()).on(name,listener);schedule.on=on1}}var transition_on=function(name,listener){var id=this._id;return arguments.length<2?get$1(this.node(),id).on.on(name):this.each(onFunction(id,name,listener))};function removeFunction(id){return function(){var parent=this.parentNode;for(var i in this.__transition)if(+i!==id)return;if(parent)parent.removeChild(this)}}var transition_remove=function(){return this.on("end.remove",removeFunction(this._id))};var transition_select=function(select$$1){var name=this._name,id=this._id;if(typeof select$$1!=="function")select$$1=selector(select$$1);for(var groups=this._groups,m=groups.length,subgroups=new Array(m),j=0;j<m;++j){for(var group=groups[j],n=group.length,subgroup=subgroups[j]=new Array(n),node,subnode,i=0;i<n;++i){if((node=group[i])&&(subnode=select$$1.call(node,node.__data__,i,group))){if("__data__"in node)subnode.__data__=node.__data__;subgroup[i]=subnode;schedule(subgroup[i],name,id,i,subgroup,get$1(node,id))}}}return new Transition(subgroups,this._parents,name,id)};var transition_selectAll=function(select$$1){var name=this._name,id=this._id;if(typeof select$$1!=="function")select$$1=selectorAll(select$$1);for(var groups=this._groups,m=groups.length,subgroups=[],parents=[],j=0;j<m;++j){for(var group=groups[j],n=group.length,node,i=0;i<n;++i){if(node=group[i]){for(var children=select$$1.call(node,node.__data__,i,group),child,inherit=get$1(node,id),k=0,l=children.length;k<l;++k){if(child=children[k]){schedule(child,name,id,k,children,inherit)}}subgroups.push(children);parents.push(node)}}}return new Transition(subgroups,parents,name,id)};var Selection$1=selection.prototype.constructor;var transition_selection=function(){return new Selection$1(this._groups,this._parents)};function styleRemove$1(name,interpolate$$2){var value00,value10,interpolate0;return function(){var style=window(this).getComputedStyle(this,null),value0=style.getPropertyValue(name),value1=(this.style.removeProperty(name),style.getPropertyValue(name));return value0===value1?null:value0===value00&&value1===value10?interpolate0:interpolate0=interpolate$$2(value00=value0,value10=value1)}}function styleRemoveEnd(name){return function(){this.style.removeProperty(name)}}function styleConstant$1(name,interpolate$$2,value1){var value00,interpolate0;return function(){var value0=window(this).getComputedStyle(this,null).getPropertyValue(name);return value0===value1?null:value0===value00?interpolate0:interpolate0=interpolate$$2(value00=value0,value1)}}function styleFunction$1(name,interpolate$$2,value){var value00,value10,interpolate0;return function(){var style=window(this).getComputedStyle(this,null),value0=style.getPropertyValue(name),value1=value(this);if(value1==null)value1=(this.style.removeProperty(name),style.getPropertyValue(name));return value0===value1?null:value0===value00&&value1===value10?interpolate0:interpolate0=interpolate$$2(value00=value0,value10=value1)}}var transition_style=function(name,value,priority){var i=(name+="")==="transform"?interpolateTransformCss:interpolate$$1;return value==null?this.styleTween(name,styleRemove$1(name,i)).on("end.style."+name,styleRemoveEnd(name)):this.styleTween(name,typeof value==="function"?styleFunction$1(name,i,tweenValue(this,"style."+name,value)):styleConstant$1(name,i,value+""),priority)};function styleTween(name,value,priority){function tween(){var node=this,i=value.apply(node,arguments);return i&&function(t){node.style.setProperty(name,i(t),priority)}}tween._value=value;return tween}var transition_styleTween=function(name,value,priority){var key="style."+(name+="");if(arguments.length<2)return(key=this.tween(key))&&key._value;if(value==null)return this.tween(key,null);if(typeof value!=="function")throw new Error;return this.tween(key,styleTween(name,value,priority==null?"":priority))};function textConstant$1(value){return function(){this.textContent=value}}function textFunction$1(value){return function(){var value1=value(this);this.textContent=value1==null?"":value1}}var transition_text=function(value){return this.tween("text",typeof value==="function"?textFunction$1(tweenValue(this,"text",value)):textConstant$1(value==null?"":value+""))};var transition_transition=function(){var name=this._name,id0=this._id,id1=newId();for(var groups=this._groups,m=groups.length,j=0;j<m;++j){for(var group=groups[j],n=group.length,node,i=0;i<n;++i){if(node=group[i]){var inherit=get$1(node,id0);schedule(node,name,id1,i,group,{time:inherit.time+inherit.delay+inherit.duration,delay:0,duration:inherit.duration,ease:inherit.ease})}}}return new Transition(groups,this._parents,name,id1)};var id=0;function Transition(groups,parents,name,id){this._groups=groups;this._parents=parents;this._name=name;this._id=id}function transition(name){return selection().transition(name)}function newId(){return++id}var selection_prototype=selection.prototype;Transition.prototype=transition.prototype={constructor:Transition,select:transition_select,selectAll:transition_selectAll,filter:transition_filter,merge:transition_merge,selection:transition_selection,transition:transition_transition,call:selection_prototype.call,nodes:selection_prototype.nodes,node:selection_prototype.node,size:selection_prototype.size,empty:selection_prototype.empty,each:selection_prototype.each,on:transition_on,attr:transition_attr,attrTween:transition_attrTween,style:transition_style,styleTween:transition_styleTween,text:transition_text,remove:transition_remove,tween:transition_tween,delay:transition_delay,duration:transition_duration,ease:transition_ease};function linear$1(t){return+t}function quadIn(t){return t*t}function quadOut(t){return t*(2-t)}function quadInOut(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function cubicIn(t){return t*t*t}function cubicOut(t){return--t*t*t+1}function cubicInOut(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var exponent=3;var polyIn=function custom(e){e=+e;function polyIn(t){return Math.pow(t,e)}polyIn.exponent=custom;return polyIn}(exponent);var polyOut=function custom(e){e=+e;function polyOut(t){return 1-Math.pow(1-t,e)}polyOut.exponent=custom;return polyOut}(exponent);var polyInOut=function custom(e){e=+e;function polyInOut(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}polyInOut.exponent=custom;return polyInOut}(exponent);var pi=Math.PI;var halfPi=pi/2;function sinIn(t){return 1-Math.cos(t*halfPi)}function sinOut(t){return Math.sin(t*halfPi)}function sinInOut(t){return(1-Math.cos(pi*t))/2}function expIn(t){return Math.pow(2,10*t-10)}function expOut(t){return 1-Math.pow(2,-10*t)}function expInOut(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function circleIn(t){return 1-Math.sqrt(1-t*t)}function circleOut(t){return Math.sqrt(1- --t*t)}function circleInOut(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var b1=4/11;var b2=6/11;var b3=8/11;var b4=3/4;var b5=9/11;var b6=10/11;var b7=15/16;var b8=21/22;var b9=63/64;var b0=1/b1/b1;function bounceIn(t){return 1-bounceOut(1-t)}function bounceOut(t){return(t=+t)<b1?b0*t*t:t<b3?b0*(t-=b2)*t+b4:t<b6?b0*(t-=b5)*t+b7:b0*(t-=b8)*t+b9}function bounceInOut(t){return((t*=2)<=1?1-bounceOut(1-t):bounceOut(t-1)+1)/2}var overshoot=1.70158;var backIn=function custom(s){s=+s;function backIn(t){return t*t*((s+1)*t-s)}backIn.overshoot=custom;return backIn}(overshoot);var backOut=function custom(s){s=+s;function backOut(t){return--t*t*((s+1)*t+s)+1}backOut.overshoot=custom;return backOut}(overshoot);var backInOut=function custom(s){s=+s;function backInOut(t){return((t*=2)<1?t*t*((s+1)*t-s):(t-=2)*t*((s+1)*t+s)+2)/2}backInOut.overshoot=custom;return backInOut}(overshoot);var tau=2*Math.PI;var amplitude=1;var period=.3;var elasticIn=function custom(a,p){var s=Math.asin(1/(a=Math.max(1,a)))*(p/=tau);function elasticIn(t){return a*Math.pow(2,10*--t)*Math.sin((s-t)/p)}elasticIn.amplitude=function(a){return custom(a,p*tau)};elasticIn.period=function(p){return custom(a,p)};return elasticIn}(amplitude,period);var elasticOut=function custom(a,p){var s=Math.asin(1/(a=Math.max(1,a)))*(p/=tau);function elasticOut(t){return 1-a*Math.pow(2,-10*(t=+t))*Math.sin((t+s)/p)}elasticOut.amplitude=function(a){return custom(a,p*tau)};elasticOut.period=function(p){return custom(a,p)};return elasticOut}(amplitude,period);var elasticInOut=function custom(a,p){var s=Math.asin(1/(a=Math.max(1,a)))*(p/=tau);function elasticInOut(t){return((t=t*2-1)<0?a*Math.pow(2,10*t)*Math.sin((s-t)/p):2-a*Math.pow(2,-10*t)*Math.sin((s+t)/p))/2}elasticInOut.amplitude=function(a){return custom(a,p*tau)};elasticInOut.period=function(p){return custom(a,p)};return elasticInOut}(amplitude,period);var defaultTiming={time:null,delay:0,duration:250,ease:cubicInOut};function inherit(node,id){var timing;while(!(timing=node.__transition)||!(timing=timing[id])){if(!(node=node.parentNode)){return defaultTiming.time=now(),defaultTiming}}return timing}var selection_transition=function(name){var id,timing;if(name instanceof Transition){id=name._id,name=name._name}else{id=newId(),(timing=defaultTiming).time=now(),name=name==null?null:name+""}for(var groups=this._groups,m=groups.length,j=0;j<m;++j){for(var group=groups[j],n=group.length,node,i=0;i<n;++i){if(node=group[i]){schedule(node,name,id,i,group,timing||inherit(node,id))}}}return new Transition(groups,this._parents,name,id)};selection.prototype.interrupt=selection_interrupt;selection.prototype.transition=selection_transition;var root$1=[null];var active=function(node,name){var schedules=node.__transition,schedule,i;if(schedules){name=name==null?null:name+"";for(i in schedules){if((schedule=schedules[i]).state>SCHEDULED&&schedule.name===name){return new Transition([[node]],root$1,name,+i)}}}return null};var constant$4=function(x){return function(){return x}};var BrushEvent=function(target,type,selection){this.target=target;this.type=type;this.selection=selection};function nopropagation$1(){exports.event.stopImmediatePropagation()}var noevent$1=function(){exports.event.preventDefault();exports.event.stopImmediatePropagation()};var MODE_DRAG={name:"drag"};var MODE_SPACE={name:"space"};var MODE_HANDLE={name:"handle"};var MODE_CENTER={name:"center"};var X={name:"x",handles:["e","w"].map(type),input:function(x,e){return x&&[[x[0],e[0][1]],[x[1],e[1][1]]]},output:function(xy){return xy&&[xy[0][0],xy[1][0]]}};var Y={name:"y",handles:["n","s"].map(type),input:function(y,e){return y&&[[e[0][0],y[0]],[e[1][0],y[1]]]},output:function(xy){return xy&&[xy[0][1],xy[1][1]]}};var XY={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(type),input:function(xy){return xy},output:function(xy){return xy}};var cursors={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"};var flipX={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"};var flipY={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"};var signsX={overlay:+1,selection:+1,n:null,e:+1,s:null,w:-1,nw:-1,ne:+1,se:+1,sw:-1};var signsY={overlay:+1,selection:+1,n:-1,e:null,s:+1,w:null,nw:-1,ne:-1,se:+1,sw:+1};function type(t){return{type:t}}function defaultFilter(){return!exports.event.button}function defaultExtent(){var svg=this.ownerSVGElement||this;return[[0,0],[svg.width.baseVal.value,svg.height.baseVal.value]]}function local$$1(node){while(!node.__brush)if(!(node=node.parentNode))return;return node.__brush}function empty(extent){return extent[0][0]===extent[1][0]||extent[0][1]===extent[1][1]}function brushSelection(node){var state=node.__brush;return state?state.dim.output(state.selection):null}function brushX(){return brush$1(X)}function brushY(){return brush$1(Y)}var brush=function(){return brush$1(XY)};function brush$1(dim){var extent=defaultExtent,filter=defaultFilter,listeners=dispatch(brush,"start","brush","end"),handleSize=6,touchending;function brush(group){var overlay=group.property("__brush",initialize).selectAll(".overlay").data([type("overlay")]);overlay.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",cursors.overlay).merge(overlay).each(function(){var extent=local$$1(this).extent;select(this).attr("x",extent[0][0]).attr("y",extent[0][1]).attr("width",extent[1][0]-extent[0][0]).attr("height",extent[1][1]-extent[0][1])});group.selectAll(".selection").data([type("selection")]).enter().append("rect").attr("class","selection").attr("cursor",cursors.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var handle=group.selectAll(".handle").data(dim.handles,function(d){return d.type});handle.exit().remove();handle.enter().append("rect").attr("class",function(d){return"handle handle--"+d.type}).attr("cursor",function(d){return cursors[d.type]});group.each(redraw).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",started)}brush.move=function(group,selection$$1){if(group.selection){group.on("start.brush",function(){emitter(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){emitter(this,arguments).end()}).tween("brush",function(){var that=this,state=that.__brush,emit=emitter(that,arguments),selection0=state.selection,selection1=dim.input(typeof selection$$1==="function"?selection$$1.apply(this,arguments):selection$$1,state.extent),i=interpolateValue(selection0,selection1);function tween(t){state.selection=t===1&&empty(selection1)?null:i(t);redraw.call(that);emit.brush()}return selection0&&selection1?tween:tween(1)})}else{group.each(function(){var that=this,args=arguments,state=that.__brush,selection1=dim.input(typeof selection$$1==="function"?selection$$1.apply(that,args):selection$$1,state.extent),emit=emitter(that,args).beforestart();interrupt(that);state.selection=selection1==null||empty(selection1)?null:selection1;redraw.call(that);emit.start().brush().end()})}};function redraw(){var group=select(this),selection$$1=local$$1(this).selection;if(selection$$1){group.selectAll(".selection").style("display",null).attr("x",selection$$1[0][0]).attr("y",selection$$1[0][1]).attr("width",selection$$1[1][0]-selection$$1[0][0]).attr("height",selection$$1[1][1]-selection$$1[0][1]);group.selectAll(".handle").style("display",null).attr("x",function(d){return d.type[d.type.length-1]==="e"?selection$$1[1][0]-handleSize/2:selection$$1[0][0]-handleSize/2}).attr("y",function(d){return d.type[0]==="s"?selection$$1[1][1]-handleSize/2:selection$$1[0][1]-handleSize/2}).attr("width",function(d){return d.type==="n"||d.type==="s"?selection$$1[1][0]-selection$$1[0][0]+handleSize:handleSize}).attr("height",function(d){return d.type==="e"||d.type==="w"?selection$$1[1][1]-selection$$1[0][1]+handleSize:handleSize})}else{group.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}}function emitter(that,args){return that.__brush.emitter||new Emitter(that,args)}function Emitter(that,args){this.that=that;this.args=args;this.state=that.__brush;this.active=0}Emitter.prototype={beforestart:function(){if(++this.active===1)this.state.emitter=this,this.starting=true;return this},start:function(){if(this.starting)this.starting=false,this.emit("start");return this},brush:function(){this.emit("brush");return this},end:function(){if(--this.active===0)delete this.state.emitter,this.emit("end");return this},emit:function(type){customEvent(new BrushEvent(brush,type,dim.output(this.state.selection)),listeners.apply,listeners,[type,this.that,this.args])}};function started(){if(exports.event.touches){if(exports.event.changedTouches.length<exports.event.touches.length)return noevent$1()}else if(touchending)return;if(!filter.apply(this,arguments))return;var that=this,type=exports.event.target.__data__.type,mode=(exports.event.metaKey?type="overlay":type)==="selection"?MODE_DRAG:exports.event.altKey?MODE_CENTER:MODE_HANDLE,signX=dim===Y?null:signsX[type],signY=dim===X?null:signsY[type],state=local$$1(that),extent=state.extent,selection$$1=state.selection,W=extent[0][0],w0,w1,N=extent[0][1],n0,n1,E=extent[1][0],e0,e1,S=extent[1][1],s0,s1,dx,dy,moving,shifting=signX&&signY&&exports.event.shiftKey,lockX,lockY,point0=mouse(that),point=point0,emit=emitter(that,arguments).beforestart();if(type==="overlay"){state.selection=selection$$1=[[w0=dim===Y?W:point0[0],n0=dim===X?N:point0[1]],[e0=dim===Y?E:w0,s0=dim===X?S:n0]]}else{w0=selection$$1[0][0];n0=selection$$1[0][1];e0=selection$$1[1][0];s0=selection$$1[1][1]}w1=w0;n1=n0;e1=e0;s1=s0;var group=select(that).attr("pointer-events","none");var overlay=group.selectAll(".overlay").attr("cursor",cursors[type]);if(exports.event.touches){group.on("touchmove.brush",moved,true).on("touchend.brush touchcancel.brush",ended,true)}else{var view=select(exports.event.view).on("keydown.brush",keydowned,true).on("keyup.brush",keyupped,true).on("mousemove.brush",moved,true).on("mouseup.brush",ended,true);dragDisable(exports.event.view)}nopropagation$1();interrupt(that);redraw.call(that);emit.start();function moved(){var point1=mouse(that);if(shifting&&!lockX&&!lockY){if(Math.abs(point1[0]-point[0])>Math.abs(point1[1]-point[1]))lockY=true;else lockX=true}point=point1;moving=true;noevent$1();move()}function move(){var t;dx=point[0]-point0[0];dy=point[1]-point0[1];switch(mode){case MODE_SPACE:case MODE_DRAG:{if(signX)dx=Math.max(W-w0,Math.min(E-e0,dx)),w1=w0+dx,e1=e0+dx;if(signY)dy=Math.max(N-n0,Math.min(S-s0,dy)),n1=n0+dy,s1=s0+dy;break}case MODE_HANDLE:{if(signX<0)dx=Math.max(W-w0,Math.min(E-w0,dx)),w1=w0+dx,e1=e0;else if(signX>0)dx=Math.max(W-e0,Math.min(E-e0,dx)),w1=w0,e1=e0+dx;if(signY<0)dy=Math.max(N-n0,Math.min(S-n0,dy)),n1=n0+dy,s1=s0;else if(signY>0)dy=Math.max(N-s0,Math.min(S-s0,dy)),n1=n0,s1=s0+dy;break}case MODE_CENTER:{if(signX)w1=Math.max(W,Math.min(E,w0-dx*signX)),e1=Math.max(W,Math.min(E,e0+dx*signX));if(signY)n1=Math.max(N,Math.min(S,n0-dy*signY)),s1=Math.max(N,Math.min(S,s0+dy*signY));break}}if(e1<w1){signX*=-1;t=w0,w0=e0,e0=t;t=w1,w1=e1,e1=t;if(type in flipX)overlay.attr("cursor",cursors[type=flipX[type]])}if(s1<n1){signY*=-1;t=n0,n0=s0,s0=t;t=n1,n1=s1,s1=t;if(type in flipY)overlay.attr("cursor",cursors[type=flipY[type]])}if(state.selection)selection$$1=state.selection;if(lockX)w1=selection$$1[0][0],e1=selection$$1[1][0];if(lockY)n1=selection$$1[0][1],s1=selection$$1[1][1];if(selection$$1[0][0]!==w1||selection$$1[0][1]!==n1||selection$$1[1][0]!==e1||selection$$1[1][1]!==s1){state.selection=[[w1,n1],[e1,s1]];redraw.call(that);emit.brush()}}function ended(){nopropagation$1();if(exports.event.touches){if(exports.event.touches.length)return;if(touchending)clearTimeout(touchending);touchending=setTimeout(function(){touchending=null},500);group.on("touchmove.brush touchend.brush touchcancel.brush",null)}else{yesdrag(exports.event.view,moving);view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null)}group.attr("pointer-events","all");overlay.attr("cursor",cursors.overlay);if(state.selection)selection$$1=state.selection;if(empty(selection$$1))state.selection=null,redraw.call(that);emit.end()}function keydowned(){switch(exports.event.keyCode){case 16:{shifting=signX&&signY;break}case 18:{if(mode===MODE_HANDLE){if(signX)e0=e1-dx*signX,w0=w1+dx*signX;if(signY)s0=s1-dy*signY,n0=n1+dy*signY;mode=MODE_CENTER;move()}break}case 32:{if(mode===MODE_HANDLE||mode===MODE_CENTER){if(signX<0)e0=e1-dx;else if(signX>0)w0=w1-dx;if(signY<0)s0=s1-dy;else if(signY>0)n0=n1-dy;mode=MODE_SPACE;overlay.attr("cursor",cursors.selection);move()}break}default:return}noevent$1()}function keyupped(){switch(exports.event.keyCode){case 16:{if(shifting){lockX=lockY=shifting=false;move()}break}case 18:{if(mode===MODE_CENTER){if(signX<0)e0=e1;else if(signX>0)w0=w1;if(signY<0)s0=s1;else if(signY>0)n0=n1;mode=MODE_HANDLE;move()}break}case 32:{if(mode===MODE_SPACE){if(exports.event.altKey){if(signX)e0=e1-dx*signX,w0=w1+dx*signX;if(signY)s0=s1-dy*signY,n0=n1+dy*signY;mode=MODE_CENTER}else{if(signX<0)e0=e1;else if(signX>0)w0=w1;if(signY<0)s0=s1;else if(signY>0)n0=n1;mode=MODE_HANDLE}overlay.attr("cursor",cursors[type]);move()}break}default:return}noevent$1()}}function initialize(){var state=this.__brush||{selection:null};state.extent=extent.apply(this,arguments);state.dim=dim;return state}brush.extent=function(_){return arguments.length?(extent=typeof _==="function"?_:constant$4([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),brush):extent};brush.filter=function(_){return arguments.length?(filter=typeof _==="function"?_:constant$4(!!_),brush):filter};brush.handleSize=function(_){return arguments.length?(handleSize=+_,brush):handleSize};brush.on=function(){var value=listeners.on.apply(listeners,arguments);return value===listeners?brush:value};return brush}var cos=Math.cos;var sin=Math.sin;var pi$1=Math.PI;var halfPi$1=pi$1/2;var tau$1=pi$1*2;var max$1=Math.max;function compareValue(compare){return function(a,b){return compare(a.source.value+a.target.value,b.source.value+b.target.value)}}var chord=function(){var padAngle=0,sortGroups=null,sortSubgroups=null,sortChords=null;function chord(matrix){var n=matrix.length,groupSums=[],groupIndex=sequence(n),subgroupIndex=[],chords=[],groups=chords.groups=new Array(n),subgroups=new Array(n*n),k,x,x0,dx,i,j;k=0,i=-1;while(++i<n){x=0,j=-1;while(++j<n){x+=matrix[i][j]}groupSums.push(x);subgroupIndex.push(sequence(n));k+=x}if(sortGroups)groupIndex.sort(function(a,b){return sortGroups(groupSums[a],groupSums[b])});if(sortSubgroups)subgroupIndex.forEach(function(d,i){d.sort(function(a,b){return sortSubgroups(matrix[i][a],matrix[i][b])})});k=max$1(0,tau$1-padAngle*n)/k;dx=k?padAngle:tau$1/n;x=0,i=-1;while(++i<n){x0=x,j=-1;while(++j<n){var di=groupIndex[i],dj=subgroupIndex[di][j],v=matrix[di][dj],a0=x,a1=x+=v*k;subgroups[dj*n+di]={index:di,subindex:dj,startAngle:a0,endAngle:a1,value:v}}groups[di]={index:di,startAngle:x0,endAngle:x,value:groupSums[di]};x+=dx}i=-1;while(++i<n){j=i-1;while(++j<n){var source=subgroups[j*n+i],target=subgroups[i*n+j];if(source.value||target.value){chords.push(source.value<target.value?{source:target,target:source}:{source:source,target:target})}}}return sortChords?chords.sort(sortChords):chords}chord.padAngle=function(_){return arguments.length?(padAngle=max$1(0,_),chord):padAngle};chord.sortGroups=function(_){return arguments.length?(sortGroups=_,chord):sortGroups};chord.sortSubgroups=function(_){return arguments.length?(sortSubgroups=_,chord):sortSubgroups};chord.sortChords=function(_){return arguments.length?(_==null?sortChords=null:(sortChords=compareValue(_))._=_,chord):sortChords&&sortChords._};return chord};var slice$2=Array.prototype.slice;var constant$5=function(x){return function(){return x}};var pi$2=Math.PI;var tau$2=2*pi$2;var epsilon$1=1e-6;var tauEpsilon=tau$2-epsilon$1;function Path(){this._x0=this._y0=this._x1=this._y1=null;this._=""}function path(){return new Path}Path.prototype=path.prototype={constructor:Path,moveTo:function(x,y){this._+="M"+(this._x0=this._x1=+x)+","+(this._y0=this._y1=+y)},closePath:function(){if(this._x1!==null){this._x1=this._x0,this._y1=this._y0;this._+="Z"}},lineTo:function(x,y){this._+="L"+(this._x1=+x)+","+(this._y1=+y)},quadraticCurveTo:function(x1,y1,x,y){this._+="Q"+ +x1+","+ +y1+","+(this._x1=+x)+","+(this._y1=+y)},bezierCurveTo:function(x1,y1,x2,y2,x,y){this._+="C"+ +x1+","+ +y1+","+ +x2+","+ +y2+","+(this._x1=+x)+","+(this._y1=+y)},arcTo:function(x1,y1,x2,y2,r){x1=+x1,y1=+y1,x2=+x2,y2=+y2,r=+r;var x0=this._x1,y0=this._y1,x21=x2-x1,y21=y2-y1,x01=x0-x1,y01=y0-y1,l01_2=x01*x01+y01*y01;if(r<0)throw new Error("negative radius: "+r);if(this._x1===null){this._+="M"+(this._x1=x1)+","+(this._y1=y1)}else if(!(l01_2>epsilon$1)){}else if(!(Math.abs(y01*x21-y21*x01)>epsilon$1)||!r){this._+="L"+(this._x1=x1)+","+(this._y1=y1)}else{var x20=x2-x0,y20=y2-y0,l21_2=x21*x21+y21*y21,l20_2=x20*x20+y20*y20,l21=Math.sqrt(l21_2),l01=Math.sqrt(l01_2),l=r*Math.tan((pi$2-Math.acos((l21_2+l01_2-l20_2)/(2*l21*l01)))/2),t01=l/l01,t21=l/l21;if(Math.abs(t01-1)>epsilon$1){this._+="L"+(x1+t01*x01)+","+(y1+t01*y01)}this._+="A"+r+","+r+",0,0,"+ +(y01*x20>x01*y20)+","+(this._x1=x1+t21*x21)+","+(this._y1=y1+t21*y21)}},arc:function(x,y,r,a0,a1,ccw){x=+x,y=+y,r=+r;var dx=r*Math.cos(a0),dy=r*Math.sin(a0),x0=x+dx,y0=y+dy,cw=1^ccw,da=ccw?a0-a1:a1-a0;if(r<0)throw new Error("negative radius: "+r);if(this._x1===null){this._+="M"+x0+","+y0}else if(Math.abs(this._x1-x0)>epsilon$1||Math.abs(this._y1-y0)>epsilon$1){this._+="L"+x0+","+y0}if(!r)return;if(da<0)da=da%tau$2+tau$2;if(da>tauEpsilon){this._+="A"+r+","+r+",0,1,"+cw+","+(x-dx)+","+(y-dy)+"A"+r+","+r+",0,1,"+cw+","+(this._x1=x0)+","+(this._y1=y0)}else if(da>epsilon$1){ this._+="A"+r+","+r+",0,"+ +(da>=pi$2)+","+cw+","+(this._x1=x+r*Math.cos(a1))+","+(this._y1=y+r*Math.sin(a1))}},rect:function(x,y,w,h){this._+="M"+(this._x0=this._x1=+x)+","+(this._y0=this._y1=+y)+"h"+ +w+"v"+ +h+"h"+-w+"Z"},toString:function(){return this._}};function defaultSource(d){return d.source}function defaultTarget(d){return d.target}function defaultRadius(d){return d.radius}function defaultStartAngle(d){return d.startAngle}function defaultEndAngle(d){return d.endAngle}var ribbon=function(){var source=defaultSource,target=defaultTarget,radius=defaultRadius,startAngle=defaultStartAngle,endAngle=defaultEndAngle,context=null;function ribbon(){var buffer,argv=slice$2.call(arguments),s=source.apply(this,argv),t=target.apply(this,argv),sr=+radius.apply(this,(argv[0]=s,argv)),sa0=startAngle.apply(this,argv)-halfPi$1,sa1=endAngle.apply(this,argv)-halfPi$1,sx0=sr*cos(sa0),sy0=sr*sin(sa0),tr=+radius.apply(this,(argv[0]=t,argv)),ta0=startAngle.apply(this,argv)-halfPi$1,ta1=endAngle.apply(this,argv)-halfPi$1;if(!context)context=buffer=path();context.moveTo(sx0,sy0);context.arc(0,0,sr,sa0,sa1);if(sa0!==ta0||sa1!==ta1){context.quadraticCurveTo(0,0,tr*cos(ta0),tr*sin(ta0));context.arc(0,0,tr,ta0,ta1)}context.quadraticCurveTo(0,0,sx0,sy0);context.closePath();if(buffer)return context=null,buffer+""||null}ribbon.radius=function(_){return arguments.length?(radius=typeof _==="function"?_:constant$5(+_),ribbon):radius};ribbon.startAngle=function(_){return arguments.length?(startAngle=typeof _==="function"?_:constant$5(+_),ribbon):startAngle};ribbon.endAngle=function(_){return arguments.length?(endAngle=typeof _==="function"?_:constant$5(+_),ribbon):endAngle};ribbon.source=function(_){return arguments.length?(source=_,ribbon):source};ribbon.target=function(_){return arguments.length?(target=_,ribbon):target};ribbon.context=function(_){return arguments.length?(context=_==null?null:_,ribbon):context};return ribbon};var prefix="$";function Map(){}Map.prototype=map$1.prototype={constructor:Map,has:function(key){return prefix+key in this},get:function(key){return this[prefix+key]},set:function(key,value){this[prefix+key]=value;return this},remove:function(key){var property=prefix+key;return property in this&&delete this[property]},clear:function(){for(var property in this)if(property[0]===prefix)delete this[property]},keys:function(){var keys=[];for(var property in this)if(property[0]===prefix)keys.push(property.slice(1));return keys},values:function(){var values=[];for(var property in this)if(property[0]===prefix)values.push(this[property]);return values},entries:function(){var entries=[];for(var property in this)if(property[0]===prefix)entries.push({key:property.slice(1),value:this[property]});return entries},size:function(){var size=0;for(var property in this)if(property[0]===prefix)++size;return size},empty:function(){for(var property in this)if(property[0]===prefix)return false;return true},each:function(f){for(var property in this)if(property[0]===prefix)f(this[property],property.slice(1),this)}};function map$1(object,f){var map=new Map;if(object instanceof Map)object.each(function(value,key){map.set(key,value)});else if(Array.isArray(object)){var i=-1,n=object.length,o;if(f==null)while(++i<n)map.set(i,object[i]);else while(++i<n)map.set(f(o=object[i],i,object),o)}else if(object)for(var key in object)map.set(key,object[key]);return map}var nest=function(){var keys=[],sortKeys=[],sortValues,rollup,nest;function apply(array,depth,createResult,setResult){if(depth>=keys.length)return rollup!=null?rollup(array):sortValues!=null?array.sort(sortValues):array;var i=-1,n=array.length,key=keys[depth++],keyValue,value,valuesByKey=map$1(),values,result=createResult();while(++i<n){if(values=valuesByKey.get(keyValue=key(value=array[i])+"")){values.push(value)}else{valuesByKey.set(keyValue,[value])}}valuesByKey.each(function(values,key){setResult(result,key,apply(values,depth,createResult,setResult))});return result}function entries(map,depth){if(++depth>keys.length)return map;var array,sortKey=sortKeys[depth-1];if(rollup!=null&&depth>=keys.length)array=map.entries();else array=[],map.each(function(v,k){array.push({key:k,values:entries(v,depth)})});return sortKey!=null?array.sort(function(a,b){return sortKey(a.key,b.key)}):array}return nest={object:function(array){return apply(array,0,createObject,setObject)},map:function(array){return apply(array,0,createMap,setMap)},entries:function(array){return entries(apply(array,0,createMap,setMap),0)},key:function(d){keys.push(d);return nest},sortKeys:function(order){sortKeys[keys.length-1]=order;return nest},sortValues:function(order){sortValues=order;return nest},rollup:function(f){rollup=f;return nest}}};function createObject(){return{}}function setObject(object,key,value){object[key]=value}function createMap(){return map$1()}function setMap(map,key,value){map.set(key,value)}function Set(){}var proto=map$1.prototype;Set.prototype=set$2.prototype={constructor:Set,has:proto.has,add:function(value){value+="";this[prefix+value]=value;return this},remove:proto.remove,clear:proto.clear,values:proto.keys,size:proto.size,empty:proto.empty,each:proto.each};function set$2(object,f){var set=new Set;if(object instanceof Set)object.each(function(value){set.add(value)});else if(object){var i=-1,n=object.length;if(f==null)while(++i<n)set.add(object[i]);else while(++i<n)set.add(f(object[i],i,object))}return set}var keys=function(map){var keys=[];for(var key in map)keys.push(key);return keys};var values=function(map){var values=[];for(var key in map)values.push(map[key]);return values};var entries=function(map){var entries=[];for(var key in map)entries.push({key:key,value:map[key]});return entries};function objectConverter(columns){return new Function("d","return {"+columns.map(function(name,i){return JSON.stringify(name)+": d["+i+"]"}).join(",")+"}")}function customConverter(columns,f){var object=objectConverter(columns);return function(row,i){return f(object(row),i,columns)}}function inferColumns(rows){var columnSet=Object.create(null),columns=[];rows.forEach(function(row){for(var column in row){if(!(column in columnSet)){columns.push(columnSet[column]=column)}}});return columns}var dsv=function(delimiter){var reFormat=new RegExp('["'+delimiter+"\n\r]"),delimiterCode=delimiter.charCodeAt(0);function parse(text,f){var convert,columns,rows=parseRows(text,function(row,i){if(convert)return convert(row,i-1);columns=row,convert=f?customConverter(row,f):objectConverter(row)});rows.columns=columns;return rows}function parseRows(text,f){var EOL={},EOF={},rows=[],N=text.length,I=0,n=0,t,eol;function token(){if(I>=N)return EOF;if(eol)return eol=false,EOL;var j=I,c;if(text.charCodeAt(j)===34){var i=j;while(i++<N){if(text.charCodeAt(i)===34){if(text.charCodeAt(i+1)!==34)break;++i}}I=i+2;c=text.charCodeAt(i+1);if(c===13){eol=true;if(text.charCodeAt(i+2)===10)++I}else if(c===10){eol=true}return text.slice(j+1,i).replace(/""/g,'"')}while(I<N){var k=1;c=text.charCodeAt(I++);if(c===10)eol=true;else if(c===13){eol=true;if(text.charCodeAt(I)===10)++I,++k}else if(c!==delimiterCode)continue;return text.slice(j,I-k)}return text.slice(j)}while((t=token())!==EOF){var a=[];while(t!==EOL&&t!==EOF){a.push(t);t=token()}if(f&&(a=f(a,n++))==null)continue;rows.push(a)}return rows}function format(rows,columns){if(columns==null)columns=inferColumns(rows);return[columns.map(formatValue).join(delimiter)].concat(rows.map(function(row){return columns.map(function(column){return formatValue(row[column])}).join(delimiter)})).join("\n")}function formatRows(rows){return rows.map(formatRow).join("\n")}function formatRow(row){return row.map(formatValue).join(delimiter)}function formatValue(text){return text==null?"":reFormat.test(text+="")?'"'+text.replace(/\"/g,'""')+'"':text}return{parse:parse,parseRows:parseRows,format:format,formatRows:formatRows}};var csv=dsv(",");var csvParse=csv.parse;var csvParseRows=csv.parseRows;var csvFormat=csv.format;var csvFormatRows=csv.formatRows;var tsv=dsv("\t");var tsvParse=tsv.parse;var tsvParseRows=tsv.parseRows;var tsvFormat=tsv.format;var tsvFormatRows=tsv.formatRows;var center$1=function(x,y){var nodes;if(x==null)x=0;if(y==null)y=0;function force(){var i,n=nodes.length,node,sx=0,sy=0;for(i=0;i<n;++i){node=nodes[i],sx+=node.x,sy+=node.y}for(sx=sx/n-x,sy=sy/n-y,i=0;i<n;++i){node=nodes[i],node.x-=sx,node.y-=sy}}force.initialize=function(_){nodes=_};force.x=function(_){return arguments.length?(x=+_,force):x};force.y=function(_){return arguments.length?(y=+_,force):y};return force};var constant$6=function(x){return function(){return x}};var jiggle=function(){return(Math.random()-.5)*1e-6};var tree_add=function(d){var x=+this._x.call(null,d),y=+this._y.call(null,d);return add(this.cover(x,y),x,y,d)};function add(tree,x,y,d){if(isNaN(x)||isNaN(y))return tree;var parent,node=tree._root,leaf={data:d},x0=tree._x0,y0=tree._y0,x1=tree._x1,y1=tree._y1,xm,ym,xp,yp,right,bottom,i,j;if(!node)return tree._root=leaf,tree;while(node.length){if(right=x>=(xm=(x0+x1)/2))x0=xm;else x1=xm;if(bottom=y>=(ym=(y0+y1)/2))y0=ym;else y1=ym;if(parent=node,!(node=node[i=bottom<<1|right]))return parent[i]=leaf,tree}xp=+tree._x.call(null,node.data);yp=+tree._y.call(null,node.data);if(x===xp&&y===yp)return leaf.next=node,parent?parent[i]=leaf:tree._root=leaf,tree;do{parent=parent?parent[i]=new Array(4):tree._root=new Array(4);if(right=x>=(xm=(x0+x1)/2))x0=xm;else x1=xm;if(bottom=y>=(ym=(y0+y1)/2))y0=ym;else y1=ym}while((i=bottom<<1|right)===(j=(yp>=ym)<<1|xp>=xm));return parent[j]=node,parent[i]=leaf,tree}function addAll(data){var d,i,n=data.length,x,y,xz=new Array(n),yz=new Array(n),x0=Infinity,y0=Infinity,x1=-Infinity,y1=-Infinity;for(i=0;i<n;++i){if(isNaN(x=+this._x.call(null,d=data[i]))||isNaN(y=+this._y.call(null,d)))continue;xz[i]=x;yz[i]=y;if(x<x0)x0=x;if(x>x1)x1=x;if(y<y0)y0=y;if(y>y1)y1=y}if(x1<x0)x0=this._x0,x1=this._x1;if(y1<y0)y0=this._y0,y1=this._y1;this.cover(x0,y0).cover(x1,y1);for(i=0;i<n;++i){add(this,xz[i],yz[i],data[i])}return this}var tree_cover=function(x,y){if(isNaN(x=+x)||isNaN(y=+y))return this;var x0=this._x0,y0=this._y0,x1=this._x1,y1=this._y1;if(isNaN(x0)){x1=(x0=Math.floor(x))+1;y1=(y0=Math.floor(y))+1}else if(x0>x||x>x1||y0>y||y>y1){var z=x1-x0,node=this._root,parent,i;switch(i=(y<(y0+y1)/2)<<1|x<(x0+x1)/2){case 0:{do{parent=new Array(4),parent[i]=node,node=parent}while(z*=2,x1=x0+z,y1=y0+z,x>x1||y>y1);break}case 1:{do{parent=new Array(4),parent[i]=node,node=parent}while(z*=2,x0=x1-z,y1=y0+z,x0>x||y>y1);break}case 2:{do{parent=new Array(4),parent[i]=node,node=parent}while(z*=2,x1=x0+z,y0=y1-z,x>x1||y0>y);break}case 3:{do{parent=new Array(4),parent[i]=node,node=parent}while(z*=2,x0=x1-z,y0=y1-z,x0>x||y0>y);break}}if(this._root&&this._root.length)this._root=node}else return this;this._x0=x0;this._y0=y0;this._x1=x1;this._y1=y1;return this};var tree_data=function(){var data=[];this.visit(function(node){if(!node.length)do{data.push(node.data)}while(node=node.next)});return data};var tree_extent=function(_){return arguments.length?this.cover(+_[0][0],+_[0][1]).cover(+_[1][0],+_[1][1]):isNaN(this._x0)?undefined:[[this._x0,this._y0],[this._x1,this._y1]]};var Quad=function(node,x0,y0,x1,y1){this.node=node;this.x0=x0;this.y0=y0;this.x1=x1;this.y1=y1};var tree_find=function(x,y,radius){var data,x0=this._x0,y0=this._y0,x1,y1,x2,y2,x3=this._x1,y3=this._y1,quads=[],node=this._root,q,i;if(node)quads.push(new Quad(node,x0,y0,x3,y3));if(radius==null)radius=Infinity;else{x0=x-radius,y0=y-radius;x3=x+radius,y3=y+radius;radius*=radius}while(q=quads.pop()){if(!(node=q.node)||(x1=q.x0)>x3||(y1=q.y0)>y3||(x2=q.x1)<x0||(y2=q.y1)<y0)continue;if(node.length){var xm=(x1+x2)/2,ym=(y1+y2)/2;quads.push(new Quad(node[3],xm,ym,x2,y2),new Quad(node[2],x1,ym,xm,y2),new Quad(node[1],xm,y1,x2,ym),new Quad(node[0],x1,y1,xm,ym));if(i=(y>=ym)<<1|x>=xm){q=quads[quads.length-1];quads[quads.length-1]=quads[quads.length-1-i];quads[quads.length-1-i]=q}}else{var dx=x-+this._x.call(null,node.data),dy=y-+this._y.call(null,node.data),d2=dx*dx+dy*dy;if(d2<radius){var d=Math.sqrt(radius=d2);x0=x-d,y0=y-d;x3=x+d,y3=y+d;data=node.data}}}return data};var tree_remove=function(d){if(isNaN(x=+this._x.call(null,d))||isNaN(y=+this._y.call(null,d)))return this;var parent,node=this._root,retainer,previous,next,x0=this._x0,y0=this._y0,x1=this._x1,y1=this._y1,x,y,xm,ym,right,bottom,i,j;if(!node)return this;if(node.length)while(true){if(right=x>=(xm=(x0+x1)/2))x0=xm;else x1=xm;if(bottom=y>=(ym=(y0+y1)/2))y0=ym;else y1=ym;if(!(parent=node,node=node[i=bottom<<1|right]))return this;if(!node.length)break;if(parent[i+1&3]||parent[i+2&3]||parent[i+3&3])retainer=parent,j=i}while(node.data!==d)if(!(previous=node,node=node.next))return this;if(next=node.next)delete node.next;if(previous)return next?previous.next=next:delete previous.next,this;if(!parent)return this._root=next,this;next?parent[i]=next:delete parent[i];if((node=parent[0]||parent[1]||parent[2]||parent[3])&&node===(parent[3]||parent[2]||parent[1]||parent[0])&&!node.length){if(retainer)retainer[j]=node;else this._root=node}return this};function removeAll(data){for(var i=0,n=data.length;i<n;++i)this.remove(data[i]);return this}var tree_root=function(){return this._root};var tree_size=function(){var size=0;this.visit(function(node){if(!node.length)do{++size}while(node=node.next)});return size};var tree_visit=function(callback){var quads=[],q,node=this._root,child,x0,y0,x1,y1;if(node)quads.push(new Quad(node,this._x0,this._y0,this._x1,this._y1));while(q=quads.pop()){if(!callback(node=q.node,x0=q.x0,y0=q.y0,x1=q.x1,y1=q.y1)&&node.length){var xm=(x0+x1)/2,ym=(y0+y1)/2;if(child=node[3])quads.push(new Quad(child,xm,ym,x1,y1));if(child=node[2])quads.push(new Quad(child,x0,ym,xm,y1));if(child=node[1])quads.push(new Quad(child,xm,y0,x1,ym));if(child=node[0])quads.push(new Quad(child,x0,y0,xm,ym))}}return this};var tree_visitAfter=function(callback){var quads=[],next=[],q;if(this._root)quads.push(new Quad(this._root,this._x0,this._y0,this._x1,this._y1));while(q=quads.pop()){var node=q.node;if(node.length){var child,x0=q.x0,y0=q.y0,x1=q.x1,y1=q.y1,xm=(x0+x1)/2,ym=(y0+y1)/2;if(child=node[0])quads.push(new Quad(child,x0,y0,xm,ym));if(child=node[1])quads.push(new Quad(child,xm,y0,x1,ym));if(child=node[2])quads.push(new Quad(child,x0,ym,xm,y1));if(child=node[3])quads.push(new Quad(child,xm,ym,x1,y1))}next.push(q)}while(q=next.pop()){callback(q.node,q.x0,q.y0,q.x1,q.y1)}return this};function defaultX(d){return d[0]}var tree_x=function(_){return arguments.length?(this._x=_,this):this._x};function defaultY(d){return d[1]}var tree_y=function(_){return arguments.length?(this._y=_,this):this._y};function quadtree(nodes,x,y){var tree=new Quadtree(x==null?defaultX:x,y==null?defaultY:y,NaN,NaN,NaN,NaN);return nodes==null?tree:tree.addAll(nodes)}function Quadtree(x,y,x0,y0,x1,y1){this._x=x;this._y=y;this._x0=x0;this._y0=y0;this._x1=x1;this._y1=y1;this._root=undefined}function leaf_copy(leaf){var copy={data:leaf.data},next=copy;while(leaf=leaf.next)next=next.next={data:leaf.data};return copy}var treeProto=quadtree.prototype=Quadtree.prototype;treeProto.copy=function(){var copy=new Quadtree(this._x,this._y,this._x0,this._y0,this._x1,this._y1),node=this._root,nodes,child;if(!node)return copy;if(!node.length)return copy._root=leaf_copy(node),copy;nodes=[{source:node,target:copy._root=new Array(4)}];while(node=nodes.pop()){for(var i=0;i<4;++i){if(child=node.source[i]){if(child.length)nodes.push({source:child,target:node.target[i]=new Array(4)});else node.target[i]=leaf_copy(child)}}}return copy};treeProto.add=tree_add;treeProto.addAll=addAll;treeProto.cover=tree_cover;treeProto.data=tree_data;treeProto.extent=tree_extent;treeProto.find=tree_find;treeProto.remove=tree_remove;treeProto.removeAll=removeAll;treeProto.root=tree_root;treeProto.size=tree_size;treeProto.visit=tree_visit;treeProto.visitAfter=tree_visitAfter;treeProto.x=tree_x;treeProto.y=tree_y;function x(d){return d.x+d.vx}function y(d){return d.y+d.vy}var collide=function(radius){var nodes,radii,strength=1,iterations=1;if(typeof radius!=="function")radius=constant$6(radius==null?1:+radius);function force(){var i,n=nodes.length,tree,node,xi,yi,ri,ri2;for(var k=0;k<iterations;++k){tree=quadtree(nodes,x,y).visitAfter(prepare);for(i=0;i<n;++i){node=nodes[i];ri=radii[node.index],ri2=ri*ri;xi=node.x+node.vx;yi=node.y+node.vy;tree.visit(apply)}}function apply(quad,x0,y0,x1,y1){var data=quad.data,rj=quad.r,r=ri+rj;if(data){if(data.index>node.index){var x=xi-data.x-data.vx,y=yi-data.y-data.vy,l=x*x+y*y;if(l<r*r){if(x===0)x=jiggle(),l+=x*x;if(y===0)y=jiggle(),l+=y*y;l=(r-(l=Math.sqrt(l)))/l*strength;node.vx+=(x*=l)*(r=(rj*=rj)/(ri2+rj));node.vy+=(y*=l)*r;data.vx-=x*(r=1-r);data.vy-=y*r}}return}return x0>xi+r||x1<xi-r||y0>yi+r||y1<yi-r}}function prepare(quad){if(quad.data)return quad.r=radii[quad.data.index];for(var i=quad.r=0;i<4;++i){if(quad[i]&&quad[i].r>quad.r){quad.r=quad[i].r}}}function initialize(){if(!nodes)return;var i,n=nodes.length,node;radii=new Array(n);for(i=0;i<n;++i)node=nodes[i],radii[node.index]=+radius(node,i,nodes)}force.initialize=function(_){nodes=_;initialize()};force.iterations=function(_){return arguments.length?(iterations=+_,force):iterations};force.strength=function(_){return arguments.length?(strength=+_,force):strength};force.radius=function(_){return arguments.length?(radius=typeof _==="function"?_:constant$6(+_),initialize(),force):radius};return force};function index(d){return d.index}function find(nodeById,nodeId){var node=nodeById.get(nodeId);if(!node)throw new Error("missing: "+nodeId);return node}var link=function(links){var id=index,strength=defaultStrength,strengths,distance=constant$6(30),distances,nodes,count,bias,iterations=1;if(links==null)links=[];function defaultStrength(link){return 1/Math.min(count[link.source.index],count[link.target.index])}function force(alpha){for(var k=0,n=links.length;k<iterations;++k){for(var i=0,link,source,target,x,y,l,b;i<n;++i){link=links[i],source=link.source,target=link.target;x=target.x+target.vx-source.x-source.vx||jiggle();y=target.y+target.vy-source.y-source.vy||jiggle();l=Math.sqrt(x*x+y*y);l=(l-distances[i])/l*alpha*strengths[i];x*=l,y*=l;target.vx-=x*(b=bias[i]);target.vy-=y*b;source.vx+=x*(b=1-b);source.vy+=y*b}}}function initialize(){if(!nodes)return;var i,n=nodes.length,m=links.length,nodeById=map$1(nodes,id),link;for(i=0,count=new Array(n);i<m;++i){link=links[i],link.index=i;if(typeof link.source!=="object")link.source=find(nodeById,link.source);if(typeof link.target!=="object")link.target=find(nodeById,link.target);count[link.source.index]=(count[link.source.index]||0)+1;count[link.target.index]=(count[link.target.index]||0)+1}for(i=0,bias=new Array(m);i<m;++i){link=links[i],bias[i]=count[link.source.index]/(count[link.source.index]+count[link.target.index])}strengths=new Array(m),initializeStrength();distances=new Array(m),initializeDistance()}function initializeStrength(){if(!nodes)return;for(var i=0,n=links.length;i<n;++i){strengths[i]=+strength(links[i],i,links)}}function initializeDistance(){if(!nodes)return;for(var i=0,n=links.length;i<n;++i){distances[i]=+distance(links[i],i,links)}}force.initialize=function(_){nodes=_;initialize()};force.links=function(_){return arguments.length?(links=_,initialize(),force):links};force.id=function(_){return arguments.length?(id=_,force):id};force.iterations=function(_){return arguments.length?(iterations=+_,force):iterations};force.strength=function(_){return arguments.length?(strength=typeof _==="function"?_:constant$6(+_),initializeStrength(),force):strength};force.distance=function(_){return arguments.length?(distance=typeof _==="function"?_:constant$6(+_),initializeDistance(),force):distance};return force};function x$1(d){return d.x}function y$1(d){return d.y}var initialRadius=10;var initialAngle=Math.PI*(3-Math.sqrt(5));var simulation=function(nodes){var simulation,alpha=1,alphaMin=.001,alphaDecay=1-Math.pow(alphaMin,1/300),alphaTarget=0,velocityDecay=.6,forces=map$1(),stepper=timer(step),event=dispatch("tick","end");if(nodes==null)nodes=[];function step(){tick();event.call("tick",simulation);if(alpha<alphaMin){stepper.stop();event.call("end",simulation)}}function tick(){var i,n=nodes.length,node;alpha+=(alphaTarget-alpha)*alphaDecay;forces.each(function(force){force(alpha)});for(i=0;i<n;++i){node=nodes[i];if(node.fx==null)node.x+=node.vx*=velocityDecay;else node.x=node.fx,node.vx=0;if(node.fy==null)node.y+=node.vy*=velocityDecay;else node.y=node.fy,node.vy=0}}function initializeNodes(){for(var i=0,n=nodes.length,node;i<n;++i){node=nodes[i],node.index=i;if(isNaN(node.x)||isNaN(node.y)){var radius=initialRadius*Math.sqrt(i),angle=i*initialAngle;node.x=radius*Math.cos(angle);node.y=radius*Math.sin(angle)}if(isNaN(node.vx)||isNaN(node.vy)){node.vx=node.vy=0}}}function initializeForce(force){if(force.initialize)force.initialize(nodes);return force}initializeNodes();return simulation={tick:tick,restart:function(){return stepper.restart(step),simulation},stop:function(){return stepper.stop(),simulation},nodes:function(_){return arguments.length?(nodes=_,initializeNodes(),forces.each(initializeForce),simulation):nodes},alpha:function(_){return arguments.length?(alpha=+_,simulation):alpha},alphaMin:function(_){return arguments.length?(alphaMin=+_,simulation):alphaMin},alphaDecay:function(_){return arguments.length?(alphaDecay=+_,simulation):+alphaDecay},alphaTarget:function(_){return arguments.length?(alphaTarget=+_,simulation):alphaTarget},velocityDecay:function(_){return arguments.length?(velocityDecay=1-_,simulation):1-velocityDecay},force:function(name,_){return arguments.length>1?(_==null?forces.remove(name):forces.set(name,initializeForce(_)),simulation):forces.get(name)},find:function(x,y,radius){var i=0,n=nodes.length,dx,dy,d2,node,closest;if(radius==null)radius=Infinity;else radius*=radius;for(i=0;i<n;++i){node=nodes[i];dx=x-node.x;dy=y-node.y;d2=dx*dx+dy*dy;if(d2<radius)closest=node,radius=d2}return closest},on:function(name,_){return arguments.length>1?(event.on(name,_),simulation):event.on(name)}}};var manyBody=function(){var nodes,node,alpha,strength=constant$6(-30),strengths,distanceMin2=1,distanceMax2=Infinity,theta2=.81;function force(_){var i,n=nodes.length,tree=quadtree(nodes,x$1,y$1).visitAfter(accumulate);for(alpha=_,i=0;i<n;++i)node=nodes[i],tree.visit(apply)}function initialize(){if(!nodes)return;var i,n=nodes.length,node;strengths=new Array(n);for(i=0;i<n;++i)node=nodes[i],strengths[node.index]=+strength(node,i,nodes)}function accumulate(quad){var strength=0,q,c,x$$1,y$$1,i;if(quad.length){for(x$$1=y$$1=i=0;i<4;++i){if((q=quad[i])&&(c=q.value)){strength+=c,x$$1+=c*q.x,y$$1+=c*q.y}}quad.x=x$$1/strength;quad.y=y$$1/strength}else{q=quad;q.x=q.data.x;q.y=q.data.y;do{strength+=strengths[q.data.index]}while(q=q.next)}quad.value=strength}function apply(quad,x1,_,x2){if(!quad.value)return true;var x$$1=quad.x-node.x,y$$1=quad.y-node.y,w=x2-x1,l=x$$1*x$$1+y$$1*y$$1;if(w*w/theta2<l){if(l<distanceMax2){if(x$$1===0)x$$1=jiggle(),l+=x$$1*x$$1;if(y$$1===0)y$$1=jiggle(),l+=y$$1*y$$1;if(l<distanceMin2)l=Math.sqrt(distanceMin2*l);node.vx+=x$$1*quad.value*alpha/l;node.vy+=y$$1*quad.value*alpha/l}return true}else if(quad.length||l>=distanceMax2)return;if(quad.data!==node||quad.next){if(x$$1===0)x$$1=jiggle(),l+=x$$1*x$$1;if(y$$1===0)y$$1=jiggle(),l+=y$$1*y$$1;if(l<distanceMin2)l=Math.sqrt(distanceMin2*l)}do{if(quad.data!==node){w=strengths[quad.data.index]*alpha/l;node.vx+=x$$1*w;node.vy+=y$$1*w}}while(quad=quad.next)}force.initialize=function(_){nodes=_;initialize()};force.strength=function(_){return arguments.length?(strength=typeof _==="function"?_:constant$6(+_),initialize(),force):strength};force.distanceMin=function(_){return arguments.length?(distanceMin2=_*_,force):Math.sqrt(distanceMin2)};force.distanceMax=function(_){return arguments.length?(distanceMax2=_*_,force):Math.sqrt(distanceMax2)};force.theta=function(_){return arguments.length?(theta2=_*_,force):Math.sqrt(theta2)};return force};var x$2=function(x){var strength=constant$6(.1),nodes,strengths,xz;if(typeof x!=="function")x=constant$6(x==null?0:+x);function force(alpha){for(var i=0,n=nodes.length,node;i<n;++i){node=nodes[i],node.vx+=(xz[i]-node.x)*strengths[i]*alpha}}function initialize(){if(!nodes)return;var i,n=nodes.length;strengths=new Array(n);xz=new Array(n);for(i=0;i<n;++i){strengths[i]=isNaN(xz[i]=+x(nodes[i],i,nodes))?0:+strength(nodes[i],i,nodes)}}force.initialize=function(_){nodes=_;initialize()};force.strength=function(_){return arguments.length?(strength=typeof _==="function"?_:constant$6(+_),initialize(),force):strength};force.x=function(_){return arguments.length?(x=typeof _==="function"?_:constant$6(+_),initialize(),force):x};return force};var y$2=function(y){var strength=constant$6(.1),nodes,strengths,yz;if(typeof y!=="function")y=constant$6(y==null?0:+y);function force(alpha){for(var i=0,n=nodes.length,node;i<n;++i){node=nodes[i],node.vy+=(yz[i]-node.y)*strengths[i]*alpha}}function initialize(){if(!nodes)return;var i,n=nodes.length;strengths=new Array(n);yz=new Array(n);for(i=0;i<n;++i){strengths[i]=isNaN(yz[i]=+y(nodes[i],i,nodes))?0:+strength(nodes[i],i,nodes)}}force.initialize=function(_){nodes=_;initialize()};force.strength=function(_){return arguments.length?(strength=typeof _==="function"?_:constant$6(+_),initialize(),force):strength};force.y=function(_){return arguments.length?(y=typeof _==="function"?_:constant$6(+_),initialize(),force):y};return force};var formatDecimal=function(x,p){if((i=(x=p?x.toExponential(p-1):x.toExponential()).indexOf("e"))<0)return null;var i,coefficient=x.slice(0,i);return[coefficient.length>1?coefficient[0]+coefficient.slice(2):coefficient,+x.slice(i+1)]};var exponent$1=function(x){return x=formatDecimal(Math.abs(x)),x?x[1]:NaN};var formatGroup=function(grouping,thousands){return function(value,width){var i=value.length,t=[],j=0,g=grouping[0],length=0;while(i>0&&g>0){if(length+g+1>width)g=Math.max(1,width-length);t.push(value.substring(i-=g,i+g));if((length+=g+1)>width)break;g=grouping[j=(j+1)%grouping.length]}return t.reverse().join(thousands)}};var formatNumerals=function(numerals){return function(value){return value.replace(/[0-9]/g,function(i){return numerals[+i]})}};var formatDefault=function(x,p){x=x.toPrecision(p);out:for(var n=x.length,i=1,i0=-1,i1;i<n;++i){switch(x[i]){case".":i0=i1=i;break;case"0":if(i0===0)i0=i;i1=i;break;case"e":break out;default:if(i0>0)i0=0;break}}return i0>0?x.slice(0,i0)+x.slice(i1+1):x};var prefixExponent;var formatPrefixAuto=function(x,p){var d=formatDecimal(x,p);if(!d)return x+"";var coefficient=d[0],exponent=d[1],i=exponent-(prefixExponent=Math.max(-8,Math.min(8,Math.floor(exponent/3)))*3)+1,n=coefficient.length;return i===n?coefficient:i>n?coefficient+new Array(i-n+1).join("0"):i>0?coefficient.slice(0,i)+"."+coefficient.slice(i):"0."+new Array(1-i).join("0")+formatDecimal(x,Math.max(0,p+i-1))[0]};var formatRounded=function(x,p){var d=formatDecimal(x,p);if(!d)return x+"";var coefficient=d[0],exponent=d[1];return exponent<0?"0."+new Array(-exponent).join("0")+coefficient:coefficient.length>exponent+1?coefficient.slice(0,exponent+1)+"."+coefficient.slice(exponent+1):coefficient+new Array(exponent-coefficient.length+2).join("0")};var formatTypes={"":formatDefault,"%":function(x,p){return(x*100).toFixed(p)},b:function(x){return Math.round(x).toString(2)},c:function(x){return x+""},d:function(x){return Math.round(x).toString(10)},e:function(x,p){return x.toExponential(p)},f:function(x,p){return x.toFixed(p)},g:function(x,p){return x.toPrecision(p)},o:function(x){return Math.round(x).toString(8)},p:function(x,p){return formatRounded(x*100,p)},r:formatRounded,s:formatPrefixAuto,X:function(x){return Math.round(x).toString(16).toUpperCase()},x:function(x){return Math.round(x).toString(16)}};var re=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function formatSpecifier(specifier){return new FormatSpecifier(specifier)}formatSpecifier.prototype=FormatSpecifier.prototype;function FormatSpecifier(specifier){if(!(match=re.exec(specifier)))throw new Error("invalid format: "+specifier);var match,fill=match[1]||" ",align=match[2]||">",sign=match[3]||"-",symbol=match[4]||"",zero=!!match[5],width=match[6]&&+match[6],comma=!!match[7],precision=match[8]&&+match[8].slice(1),type=match[9]||"";if(type==="n")comma=true,type="g";else if(!formatTypes[type])type="";if(zero||fill==="0"&&align==="=")zero=true,fill="0",align="=";this.fill=fill;this.align=align;this.sign=sign;this.symbol=symbol;this.zero=zero;this.width=width;this.comma=comma;this.precision=precision;this.type=type}FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width==null?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision==null?"":"."+Math.max(0,this.precision|0))+this.type};var identity$3=function(x){return x};var prefixes=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];var formatLocale=function(locale){var group=locale.grouping&&locale.thousands?formatGroup(locale.grouping,locale.thousands):identity$3,currency=locale.currency,decimal=locale.decimal,numerals=locale.numerals?formatNumerals(locale.numerals):identity$3;function newFormat(specifier){specifier=formatSpecifier(specifier);var fill=specifier.fill,align=specifier.align,sign=specifier.sign,symbol=specifier.symbol,zero=specifier.zero,width=specifier.width,comma=specifier.comma,precision=specifier.precision,type=specifier.type;var prefix=symbol==="$"?currency[0]:symbol==="#"&&/[boxX]/.test(type)?"0"+type.toLowerCase():"",suffix=symbol==="$"?currency[1]:/[%p]/.test(type)?"%":"";var formatType=formatTypes[type],maybeSuffix=!type||/[defgprs%]/.test(type);precision=precision==null?type?6:12:/[gprs]/.test(type)?Math.max(1,Math.min(21,precision)):Math.max(0,Math.min(20,precision));function format(value){var valuePrefix=prefix,valueSuffix=suffix,i,n,c;if(type==="c"){valueSuffix=formatType(value)+valueSuffix;value=""}else{value=+value;var valueNegative=value<0;value=formatType(Math.abs(value),precision);if(valueNegative&&+value===0)valueNegative=false;valuePrefix=(valueNegative?sign==="("?sign:"-":sign==="-"||sign==="("?"":sign)+valuePrefix;valueSuffix=valueSuffix+(type==="s"?prefixes[8+prefixExponent/3]:"")+(valueNegative&&sign==="("?")":"");if(maybeSuffix){i=-1,n=value.length;while(++i<n){if(c=value.charCodeAt(i),48>c||c>57){valueSuffix=(c===46?decimal+value.slice(i+1):value.slice(i))+valueSuffix;value=value.slice(0,i);break}}}}if(comma&&!zero)value=group(value,Infinity);var length=valuePrefix.length+value.length+valueSuffix.length,padding=length<width?new Array(width-length+1).join(fill):"";if(comma&&zero)value=group(padding+value,padding.length?width-valueSuffix.length:Infinity),padding="";switch(align){case"<":value=valuePrefix+value+valueSuffix+padding;break;case"=":value=valuePrefix+padding+value+valueSuffix;break;case"^":value=padding.slice(0,length=padding.length>>1)+valuePrefix+value+valueSuffix+padding.slice(length);break;default:value=padding+valuePrefix+value+valueSuffix;break}return numerals(value)}format.toString=function(){return specifier+""};return format}function formatPrefix(specifier,value){var f=newFormat((specifier=formatSpecifier(specifier),specifier.type="f",specifier)),e=Math.max(-8,Math.min(8,Math.floor(exponent$1(value)/3)))*3,k=Math.pow(10,-e),prefix=prefixes[8+e/3];return function(value){return f(k*value)+prefix}}return{format:newFormat,formatPrefix:formatPrefix}};var locale$1;defaultLocale({decimal:".",thousands:",",grouping:[3],currency:["$",""]});function defaultLocale(definition){locale$1=formatLocale(definition);exports.format=locale$1.format;exports.formatPrefix=locale$1.formatPrefix;return locale$1}var precisionFixed=function(step){return Math.max(0,-exponent$1(Math.abs(step)))};var precisionPrefix=function(step,value){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(exponent$1(value)/3)))*3-exponent$1(Math.abs(step)))} ;var precisionRound=function(step,max){step=Math.abs(step),max=Math.abs(max)-step;return Math.max(0,exponent$1(max)-exponent$1(step))+1};var adder=function(){return new Adder};function Adder(){this.reset()}Adder.prototype={constructor:Adder,reset:function(){this.s=this.t=0},add:function(y){add$1(temp,y,this.t);add$1(this,temp.s,this.s);if(this.s)this.t+=temp.t;else this.s=temp.t},valueOf:function(){return this.s}};var temp=new Adder;function add$1(adder,a,b){var x=adder.s=a+b,bv=x-a,av=x-bv;adder.t=a-av+(b-bv)}var epsilon$2=1e-6;var epsilon2$1=1e-12;var pi$3=Math.PI;var halfPi$2=pi$3/2;var quarterPi=pi$3/4;var tau$3=pi$3*2;var degrees$1=180/pi$3;var radians=pi$3/180;var abs=Math.abs;var atan=Math.atan;var atan2=Math.atan2;var cos$1=Math.cos;var ceil=Math.ceil;var exp=Math.exp;var log=Math.log;var pow=Math.pow;var sin$1=Math.sin;var sign=Math.sign||function(x){return x>0?1:x<0?-1:0};var sqrt=Math.sqrt;var tan=Math.tan;function acos(x){return x>1?0:x<-1?pi$3:Math.acos(x)}function asin(x){return x>1?halfPi$2:x<-1?-halfPi$2:Math.asin(x)}function haversin(x){return(x=sin$1(x/2))*x}function noop$1(){}function streamGeometry(geometry,stream){if(geometry&&streamGeometryType.hasOwnProperty(geometry.type)){streamGeometryType[geometry.type](geometry,stream)}}var streamObjectType={Feature:function(object,stream){streamGeometry(object.geometry,stream)},FeatureCollection:function(object,stream){var features=object.features,i=-1,n=features.length;while(++i<n)streamGeometry(features[i].geometry,stream)}};var streamGeometryType={Sphere:function(object,stream){stream.sphere()},Point:function(object,stream){object=object.coordinates;stream.point(object[0],object[1],object[2])},MultiPoint:function(object,stream){var coordinates=object.coordinates,i=-1,n=coordinates.length;while(++i<n)object=coordinates[i],stream.point(object[0],object[1],object[2])},LineString:function(object,stream){streamLine(object.coordinates,stream,0)},MultiLineString:function(object,stream){var coordinates=object.coordinates,i=-1,n=coordinates.length;while(++i<n)streamLine(coordinates[i],stream,0)},Polygon:function(object,stream){streamPolygon(object.coordinates,stream)},MultiPolygon:function(object,stream){var coordinates=object.coordinates,i=-1,n=coordinates.length;while(++i<n)streamPolygon(coordinates[i],stream)},GeometryCollection:function(object,stream){var geometries=object.geometries,i=-1,n=geometries.length;while(++i<n)streamGeometry(geometries[i],stream)}};function streamLine(coordinates,stream,closed){var i=-1,n=coordinates.length-closed,coordinate;stream.lineStart();while(++i<n)coordinate=coordinates[i],stream.point(coordinate[0],coordinate[1],coordinate[2]);stream.lineEnd()}function streamPolygon(coordinates,stream){var i=-1,n=coordinates.length;stream.polygonStart();while(++i<n)streamLine(coordinates[i],stream,1);stream.polygonEnd()}var geoStream=function(object,stream){if(object&&streamObjectType.hasOwnProperty(object.type)){streamObjectType[object.type](object,stream)}else{streamGeometry(object,stream)}};var areaRingSum=adder();var areaSum=adder();var lambda00;var phi00;var lambda0;var cosPhi0;var sinPhi0;var areaStream={point:noop$1,lineStart:noop$1,lineEnd:noop$1,polygonStart:function(){areaRingSum.reset();areaStream.lineStart=areaRingStart;areaStream.lineEnd=areaRingEnd},polygonEnd:function(){var areaRing=+areaRingSum;areaSum.add(areaRing<0?tau$3+areaRing:areaRing);this.lineStart=this.lineEnd=this.point=noop$1},sphere:function(){areaSum.add(tau$3)}};function areaRingStart(){areaStream.point=areaPointFirst}function areaRingEnd(){areaPoint(lambda00,phi00)}function areaPointFirst(lambda,phi){areaStream.point=areaPoint;lambda00=lambda,phi00=phi;lambda*=radians,phi*=radians;lambda0=lambda,cosPhi0=cos$1(phi=phi/2+quarterPi),sinPhi0=sin$1(phi)}function areaPoint(lambda,phi){lambda*=radians,phi*=radians;phi=phi/2+quarterPi;var dLambda=lambda-lambda0,sdLambda=dLambda>=0?1:-1,adLambda=sdLambda*dLambda,cosPhi=cos$1(phi),sinPhi=sin$1(phi),k=sinPhi0*sinPhi,u=cosPhi0*cosPhi+k*cos$1(adLambda),v=k*sdLambda*sin$1(adLambda);areaRingSum.add(atan2(v,u));lambda0=lambda,cosPhi0=cosPhi,sinPhi0=sinPhi}var area=function(object){areaSum.reset();geoStream(object,areaStream);return areaSum*2};function spherical(cartesian){return[atan2(cartesian[1],cartesian[0]),asin(cartesian[2])]}function cartesian(spherical){var lambda=spherical[0],phi=spherical[1],cosPhi=cos$1(phi);return[cosPhi*cos$1(lambda),cosPhi*sin$1(lambda),sin$1(phi)]}function cartesianDot(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]}function cartesianCross(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function cartesianAddInPlace(a,b){a[0]+=b[0],a[1]+=b[1],a[2]+=b[2]}function cartesianScale(vector,k){return[vector[0]*k,vector[1]*k,vector[2]*k]}function cartesianNormalizeInPlace(d){var l=sqrt(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]);d[0]/=l,d[1]/=l,d[2]/=l}var lambda0$1;var phi0;var lambda1;var phi1;var lambda2;var lambda00$1;var phi00$1;var p0;var deltaSum=adder();var ranges;var range;var boundsStream={point:boundsPoint,lineStart:boundsLineStart,lineEnd:boundsLineEnd,polygonStart:function(){boundsStream.point=boundsRingPoint;boundsStream.lineStart=boundsRingStart;boundsStream.lineEnd=boundsRingEnd;deltaSum.reset();areaStream.polygonStart()},polygonEnd:function(){areaStream.polygonEnd();boundsStream.point=boundsPoint;boundsStream.lineStart=boundsLineStart;boundsStream.lineEnd=boundsLineEnd;if(areaRingSum<0)lambda0$1=-(lambda1=180),phi0=-(phi1=90);else if(deltaSum>epsilon$2)phi1=90;else if(deltaSum<-epsilon$2)phi0=-90;range[0]=lambda0$1,range[1]=lambda1}};function boundsPoint(lambda,phi){ranges.push(range=[lambda0$1=lambda,lambda1=lambda]);if(phi<phi0)phi0=phi;if(phi>phi1)phi1=phi}function linePoint(lambda,phi){var p=cartesian([lambda*radians,phi*radians]);if(p0){var normal=cartesianCross(p0,p),equatorial=[normal[1],-normal[0],0],inflection=cartesianCross(equatorial,normal);cartesianNormalizeInPlace(inflection);inflection=spherical(inflection);var delta=lambda-lambda2,sign$$1=delta>0?1:-1,lambdai=inflection[0]*degrees$1*sign$$1,phii,antimeridian=abs(delta)>180;if(antimeridian^(sign$$1*lambda2<lambdai&&lambdai<sign$$1*lambda)){phii=inflection[1]*degrees$1;if(phii>phi1)phi1=phii}else if(lambdai=(lambdai+360)%360-180,antimeridian^(sign$$1*lambda2<lambdai&&lambdai<sign$$1*lambda)){phii=-inflection[1]*degrees$1;if(phii<phi0)phi0=phii}else{if(phi<phi0)phi0=phi;if(phi>phi1)phi1=phi}if(antimeridian){if(lambda<lambda2){if(angle(lambda0$1,lambda)>angle(lambda0$1,lambda1))lambda1=lambda}else{if(angle(lambda,lambda1)>angle(lambda0$1,lambda1))lambda0$1=lambda}}else{if(lambda1>=lambda0$1){if(lambda<lambda0$1)lambda0$1=lambda;if(lambda>lambda1)lambda1=lambda}else{if(lambda>lambda2){if(angle(lambda0$1,lambda)>angle(lambda0$1,lambda1))lambda1=lambda}else{if(angle(lambda,lambda1)>angle(lambda0$1,lambda1))lambda0$1=lambda}}}}else{ranges.push(range=[lambda0$1=lambda,lambda1=lambda])}if(phi<phi0)phi0=phi;if(phi>phi1)phi1=phi;p0=p,lambda2=lambda}function boundsLineStart(){boundsStream.point=linePoint}function boundsLineEnd(){range[0]=lambda0$1,range[1]=lambda1;boundsStream.point=boundsPoint;p0=null}function boundsRingPoint(lambda,phi){if(p0){var delta=lambda-lambda2;deltaSum.add(abs(delta)>180?delta+(delta>0?360:-360):delta)}else{lambda00$1=lambda,phi00$1=phi}areaStream.point(lambda,phi);linePoint(lambda,phi)}function boundsRingStart(){areaStream.lineStart()}function boundsRingEnd(){boundsRingPoint(lambda00$1,phi00$1);areaStream.lineEnd();if(abs(deltaSum)>epsilon$2)lambda0$1=-(lambda1=180);range[0]=lambda0$1,range[1]=lambda1;p0=null}function angle(lambda0,lambda1){return(lambda1-=lambda0)<0?lambda1+360:lambda1}function rangeCompare(a,b){return a[0]-b[0]}function rangeContains(range,x){return range[0]<=range[1]?range[0]<=x&&x<=range[1]:x<range[0]||range[1]<x}var bounds=function(feature){var i,n,a,b,merged,deltaMax,delta;phi1=lambda1=-(lambda0$1=phi0=Infinity);ranges=[];geoStream(feature,boundsStream);if(n=ranges.length){ranges.sort(rangeCompare);for(i=1,a=ranges[0],merged=[a];i<n;++i){b=ranges[i];if(rangeContains(a,b[0])||rangeContains(a,b[1])){if(angle(a[0],b[1])>angle(a[0],a[1]))a[1]=b[1];if(angle(b[0],a[1])>angle(a[0],a[1]))a[0]=b[0]}else{merged.push(a=b)}}for(deltaMax=-Infinity,n=merged.length-1,i=0,a=merged[n];i<=n;a=b,++i){b=merged[i];if((delta=angle(a[1],b[0]))>deltaMax)deltaMax=delta,lambda0$1=b[0],lambda1=a[1]}}ranges=range=null;return lambda0$1===Infinity||phi0===Infinity?[[NaN,NaN],[NaN,NaN]]:[[lambda0$1,phi0],[lambda1,phi1]]};var W0;var W1;var X0;var Y0;var Z0;var X1;var Y1;var Z1;var X2;var Y2;var Z2;var lambda00$2;var phi00$2;var x0;var y0;var z0;var centroidStream={sphere:noop$1,point:centroidPoint,lineStart:centroidLineStart,lineEnd:centroidLineEnd,polygonStart:function(){centroidStream.lineStart=centroidRingStart;centroidStream.lineEnd=centroidRingEnd},polygonEnd:function(){centroidStream.lineStart=centroidLineStart;centroidStream.lineEnd=centroidLineEnd}};function centroidPoint(lambda,phi){lambda*=radians,phi*=radians;var cosPhi=cos$1(phi);centroidPointCartesian(cosPhi*cos$1(lambda),cosPhi*sin$1(lambda),sin$1(phi))}function centroidPointCartesian(x,y,z){++W0;X0+=(x-X0)/W0;Y0+=(y-Y0)/W0;Z0+=(z-Z0)/W0}function centroidLineStart(){centroidStream.point=centroidLinePointFirst}function centroidLinePointFirst(lambda,phi){lambda*=radians,phi*=radians;var cosPhi=cos$1(phi);x0=cosPhi*cos$1(lambda);y0=cosPhi*sin$1(lambda);z0=sin$1(phi);centroidStream.point=centroidLinePoint;centroidPointCartesian(x0,y0,z0)}function centroidLinePoint(lambda,phi){lambda*=radians,phi*=radians;var cosPhi=cos$1(phi),x=cosPhi*cos$1(lambda),y=cosPhi*sin$1(lambda),z=sin$1(phi),w=atan2(sqrt((w=y0*z-z0*y)*w+(w=z0*x-x0*z)*w+(w=x0*y-y0*x)*w),x0*x+y0*y+z0*z);W1+=w;X1+=w*(x0+(x0=x));Y1+=w*(y0+(y0=y));Z1+=w*(z0+(z0=z));centroidPointCartesian(x0,y0,z0)}function centroidLineEnd(){centroidStream.point=centroidPoint}function centroidRingStart(){centroidStream.point=centroidRingPointFirst}function centroidRingEnd(){centroidRingPoint(lambda00$2,phi00$2);centroidStream.point=centroidPoint}function centroidRingPointFirst(lambda,phi){lambda00$2=lambda,phi00$2=phi;lambda*=radians,phi*=radians;centroidStream.point=centroidRingPoint;var cosPhi=cos$1(phi);x0=cosPhi*cos$1(lambda);y0=cosPhi*sin$1(lambda);z0=sin$1(phi);centroidPointCartesian(x0,y0,z0)}function centroidRingPoint(lambda,phi){lambda*=radians,phi*=radians;var cosPhi=cos$1(phi),x=cosPhi*cos$1(lambda),y=cosPhi*sin$1(lambda),z=sin$1(phi),cx=y0*z-z0*y,cy=z0*x-x0*z,cz=x0*y-y0*x,m=sqrt(cx*cx+cy*cy+cz*cz),w=asin(m),v=m&&-w/m;X2+=v*cx;Y2+=v*cy;Z2+=v*cz;W1+=w;X1+=w*(x0+(x0=x));Y1+=w*(y0+(y0=y));Z1+=w*(z0+(z0=z));centroidPointCartesian(x0,y0,z0)}var centroid=function(object){W0=W1=X0=Y0=Z0=X1=Y1=Z1=X2=Y2=Z2=0;geoStream(object,centroidStream);var x=X2,y=Y2,z=Z2,m=x*x+y*y+z*z;if(m<epsilon2$1){x=X1,y=Y1,z=Z1;if(W1<epsilon$2)x=X0,y=Y0,z=Z0;m=x*x+y*y+z*z;if(m<epsilon2$1)return[NaN,NaN]}return[atan2(y,x)*degrees$1,asin(z/sqrt(m))*degrees$1]};var constant$7=function(x){return function(){return x}};var compose=function(a,b){function compose(x,y){return x=a(x,y),b(x[0],x[1])}if(a.invert&&b.invert)compose.invert=function(x,y){return x=b.invert(x,y),x&&a.invert(x[0],x[1])};return compose};function rotationIdentity(lambda,phi){return[lambda>pi$3?lambda-tau$3:lambda<-pi$3?lambda+tau$3:lambda,phi]}rotationIdentity.invert=rotationIdentity;function rotateRadians(deltaLambda,deltaPhi,deltaGamma){return(deltaLambda%=tau$3)?deltaPhi||deltaGamma?compose(rotationLambda(deltaLambda),rotationPhiGamma(deltaPhi,deltaGamma)):rotationLambda(deltaLambda):deltaPhi||deltaGamma?rotationPhiGamma(deltaPhi,deltaGamma):rotationIdentity}function forwardRotationLambda(deltaLambda){return function(lambda,phi){return lambda+=deltaLambda,[lambda>pi$3?lambda-tau$3:lambda<-pi$3?lambda+tau$3:lambda,phi]}}function rotationLambda(deltaLambda){var rotation=forwardRotationLambda(deltaLambda);rotation.invert=forwardRotationLambda(-deltaLambda);return rotation}function rotationPhiGamma(deltaPhi,deltaGamma){var cosDeltaPhi=cos$1(deltaPhi),sinDeltaPhi=sin$1(deltaPhi),cosDeltaGamma=cos$1(deltaGamma),sinDeltaGamma=sin$1(deltaGamma);function rotation(lambda,phi){var cosPhi=cos$1(phi),x=cos$1(lambda)*cosPhi,y=sin$1(lambda)*cosPhi,z=sin$1(phi),k=z*cosDeltaPhi+x*sinDeltaPhi;return[atan2(y*cosDeltaGamma-k*sinDeltaGamma,x*cosDeltaPhi-z*sinDeltaPhi),asin(k*cosDeltaGamma+y*sinDeltaGamma)]}rotation.invert=function(lambda,phi){var cosPhi=cos$1(phi),x=cos$1(lambda)*cosPhi,y=sin$1(lambda)*cosPhi,z=sin$1(phi),k=z*cosDeltaGamma-y*sinDeltaGamma;return[atan2(y*cosDeltaGamma+z*sinDeltaGamma,x*cosDeltaPhi+k*sinDeltaPhi),asin(k*cosDeltaPhi-x*sinDeltaPhi)]};return rotation}var rotation=function(rotate){rotate=rotateRadians(rotate[0]*radians,rotate[1]*radians,rotate.length>2?rotate[2]*radians:0);function forward(coordinates){coordinates=rotate(coordinates[0]*radians,coordinates[1]*radians);return coordinates[0]*=degrees$1,coordinates[1]*=degrees$1,coordinates}forward.invert=function(coordinates){coordinates=rotate.invert(coordinates[0]*radians,coordinates[1]*radians);return coordinates[0]*=degrees$1,coordinates[1]*=degrees$1,coordinates};return forward};function circleStream(stream,radius,delta,direction,t0,t1){if(!delta)return;var cosRadius=cos$1(radius),sinRadius=sin$1(radius),step=direction*delta;if(t0==null){t0=radius+direction*tau$3;t1=radius-step/2}else{t0=circleRadius(cosRadius,t0);t1=circleRadius(cosRadius,t1);if(direction>0?t0<t1:t0>t1)t0+=direction*tau$3}for(var point,t=t0;direction>0?t>t1:t<t1;t-=step){point=spherical([cosRadius,-sinRadius*cos$1(t),-sinRadius*sin$1(t)]);stream.point(point[0],point[1])}}function circleRadius(cosRadius,point){point=cartesian(point),point[0]-=cosRadius;cartesianNormalizeInPlace(point);var radius=acos(-point[1]);return((-point[2]<0?-radius:radius)+tau$3-epsilon$2)%tau$3}var circle=function(){var center=constant$7([0,0]),radius=constant$7(90),precision=constant$7(6),ring,rotate,stream={point:point};function point(x,y){ring.push(x=rotate(x,y));x[0]*=degrees$1,x[1]*=degrees$1}function circle(){var c=center.apply(this,arguments),r=radius.apply(this,arguments)*radians,p=precision.apply(this,arguments)*radians;ring=[];rotate=rotateRadians(-c[0]*radians,-c[1]*radians,0).invert;circleStream(stream,r,p,1);c={type:"Polygon",coordinates:[ring]};ring=rotate=null;return c}circle.center=function(_){return arguments.length?(center=typeof _==="function"?_:constant$7([+_[0],+_[1]]),circle):center};circle.radius=function(_){return arguments.length?(radius=typeof _==="function"?_:constant$7(+_),circle):radius};circle.precision=function(_){return arguments.length?(precision=typeof _==="function"?_:constant$7(+_),circle):precision};return circle};var clipBuffer=function(){var lines=[],line;return{point:function(x,y){line.push([x,y])},lineStart:function(){lines.push(line=[])},lineEnd:noop$1,rejoin:function(){if(lines.length>1)lines.push(lines.pop().concat(lines.shift()))},result:function(){var result=lines;lines=[];line=null;return result}}};var clipLine=function(a,b,x0,y0,x1,y1){var ax=a[0],ay=a[1],bx=b[0],by=b[1],t0=0,t1=1,dx=bx-ax,dy=by-ay,r;r=x0-ax;if(!dx&&r>0)return;r/=dx;if(dx<0){if(r<t0)return;if(r<t1)t1=r}else if(dx>0){if(r>t1)return;if(r>t0)t0=r}r=x1-ax;if(!dx&&r<0)return;r/=dx;if(dx<0){if(r>t1)return;if(r>t0)t0=r}else if(dx>0){if(r<t0)return;if(r<t1)t1=r}r=y0-ay;if(!dy&&r>0)return;r/=dy;if(dy<0){if(r<t0)return;if(r<t1)t1=r}else if(dy>0){if(r>t1)return;if(r>t0)t0=r}r=y1-ay;if(!dy&&r<0)return;r/=dy;if(dy<0){if(r>t1)return;if(r>t0)t0=r}else if(dy>0){if(r<t0)return;if(r<t1)t1=r}if(t0>0)a[0]=ax+t0*dx,a[1]=ay+t0*dy;if(t1<1)b[0]=ax+t1*dx,b[1]=ay+t1*dy;return true};var pointEqual=function(a,b){return abs(a[0]-b[0])<epsilon$2&&abs(a[1]-b[1])<epsilon$2};function Intersection(point,points,other,entry){this.x=point;this.z=points;this.o=other;this.e=entry;this.v=false;this.n=this.p=null}var clipPolygon=function(segments,compareIntersection,startInside,interpolate,stream){var subject=[],clip=[],i,n;segments.forEach(function(segment){if((n=segment.length-1)<=0)return;var n,p0=segment[0],p1=segment[n],x;if(pointEqual(p0,p1)){stream.lineStart();for(i=0;i<n;++i)stream.point((p0=segment[i])[0],p0[1]);stream.lineEnd();return}subject.push(x=new Intersection(p0,segment,null,true));clip.push(x.o=new Intersection(p0,null,x,false));subject.push(x=new Intersection(p1,segment,null,false));clip.push(x.o=new Intersection(p1,null,x,true))});if(!subject.length)return;clip.sort(compareIntersection);link$1(subject);link$1(clip);for(i=0,n=clip.length;i<n;++i){clip[i].e=startInside=!startInside}var start=subject[0],points,point;while(1){var current=start,isSubject=true;while(current.v)if((current=current.n)===start)return;points=current.z;stream.lineStart();do{current.v=current.o.v=true;if(current.e){if(isSubject){for(i=0,n=points.length;i<n;++i)stream.point((point=points[i])[0],point[1])}else{interpolate(current.x,current.n.x,1,stream)}current=current.n}else{if(isSubject){points=current.p.z;for(i=points.length-1;i>=0;--i)stream.point((point=points[i])[0],point[1])}else{interpolate(current.x,current.p.x,-1,stream)}current=current.p}current=current.o;points=current.z;isSubject=!isSubject}while(!current.v);stream.lineEnd()}};function link$1(array){if(!(n=array.length))return;var n,i=0,a=array[0],b;while(++i<n){a.n=b=array[i];b.p=a;a=b}a.n=b=array[0];b.p=a}var clipMax=1e9;var clipMin=-clipMax;function clipExtent(x0,y0,x1,y1){function visible(x,y){return x0<=x&&x<=x1&&y0<=y&&y<=y1}function interpolate(from,to,direction,stream){var a=0,a1=0;if(from==null||(a=corner(from,direction))!==(a1=corner(to,direction))||comparePoint(from,to)<0^direction>0){do{stream.point(a===0||a===3?x0:x1,a>1?y1:y0)}while((a=(a+direction+4)%4)!==a1)}else{stream.point(to[0],to[1])}}function corner(p,direction){return abs(p[0]-x0)<epsilon$2?direction>0?0:3:abs(p[0]-x1)<epsilon$2?direction>0?2:1:abs(p[1]-y0)<epsilon$2?direction>0?1:0:direction>0?3:2}function compareIntersection(a,b){return comparePoint(a.x,b.x)}function comparePoint(a,b){var ca=corner(a,1),cb=corner(b,1);return ca!==cb?ca-cb:ca===0?b[1]-a[1]:ca===1?a[0]-b[0]:ca===2?a[1]-b[1]:b[0]-a[0]}return function(stream){var activeStream=stream,bufferStream=clipBuffer(),segments,polygon,ring,x__,y__,v__,x_,y_,v_,first,clean;var clipStream={point:point,lineStart:lineStart,lineEnd:lineEnd,polygonStart:polygonStart,polygonEnd:polygonEnd};function point(x,y){if(visible(x,y))activeStream.point(x,y)}function polygonInside(){var winding=0;for(var i=0,n=polygon.length;i<n;++i){for(var ring=polygon[i],j=1,m=ring.length,point=ring[0],a0,a1,b0=point[0],b1=point[1];j<m;++j){a0=b0,a1=b1,point=ring[j],b0=point[0],b1=point[1];if(a1<=y1){if(b1>y1&&(b0-a0)*(y1-a1)>(b1-a1)*(x0-a0))++winding}else{if(b1<=y1&&(b0-a0)*(y1-a1)<(b1-a1)*(x0-a0))--winding}}}return winding}function polygonStart(){activeStream=bufferStream,segments=[],polygon=[],clean=true}function polygonEnd(){var startInside=polygonInside(),cleanInside=clean&&startInside,visible=(segments=merge(segments)).length;if(cleanInside||visible){stream.polygonStart();if(cleanInside){stream.lineStart();interpolate(null,null,1,stream);stream.lineEnd()}if(visible){clipPolygon(segments,compareIntersection,startInside,interpolate,stream)}stream.polygonEnd()}activeStream=stream,segments=polygon=ring=null}function lineStart(){clipStream.point=linePoint;if(polygon)polygon.push(ring=[]);first=true;v_=false;x_=y_=NaN}function lineEnd(){if(segments){linePoint(x__,y__);if(v__&&v_)bufferStream.rejoin();segments.push(bufferStream.result())}clipStream.point=point;if(v_)activeStream.lineEnd()}function linePoint(x,y){var v=visible(x,y);if(polygon)ring.push([x,y]);if(first){x__=x,y__=y,v__=v;first=false;if(v){activeStream.lineStart();activeStream.point(x,y)}}else{if(v&&v_)activeStream.point(x,y);else{var a=[x_=Math.max(clipMin,Math.min(clipMax,x_)),y_=Math.max(clipMin,Math.min(clipMax,y_))],b=[x=Math.max(clipMin,Math.min(clipMax,x)),y=Math.max(clipMin,Math.min(clipMax,y))];if(clipLine(a,b,x0,y0,x1,y1)){if(!v_){activeStream.lineStart();activeStream.point(a[0],a[1])}activeStream.point(b[0],b[1]);if(!v)activeStream.lineEnd();clean=false}else if(v){activeStream.lineStart();activeStream.point(x,y);clean=false}}}x_=x,y_=y,v_=v}return clipStream}}var extent$1=function(){var x0=0,y0=0,x1=960,y1=500,cache,cacheStream,clip;return clip={stream:function(stream){return cache&&cacheStream===stream?cache:cache=clipExtent(x0,y0,x1,y1)(cacheStream=stream)},extent:function(_){return arguments.length?(x0=+_[0][0],y0=+_[0][1],x1=+_[1][0],y1=+_[1][1],cache=cacheStream=null,clip):[[x0,y0],[x1,y1]]}}};var sum$1=adder();var polygonContains=function(polygon,point){var lambda=point[0],phi=point[1],normal=[sin$1(lambda),-cos$1(lambda),0],angle=0,winding=0;sum$1.reset();for(var i=0,n=polygon.length;i<n;++i){if(!(m=(ring=polygon[i]).length))continue;var ring,m,point0=ring[m-1],lambda0=point0[0],phi0=point0[1]/2+quarterPi,sinPhi0=sin$1(phi0),cosPhi0=cos$1(phi0);for(var j=0;j<m;++j,lambda0=lambda1,sinPhi0=sinPhi1,cosPhi0=cosPhi1,point0=point1){var point1=ring[j],lambda1=point1[0],phi1=point1[1]/2+quarterPi,sinPhi1=sin$1(phi1),cosPhi1=cos$1(phi1),delta=lambda1-lambda0,sign$$1=delta>=0?1:-1,absDelta=sign$$1*delta,antimeridian=absDelta>pi$3,k=sinPhi0*sinPhi1;sum$1.add(atan2(k*sign$$1*sin$1(absDelta),cosPhi0*cosPhi1+k*cos$1(absDelta)));angle+=antimeridian?delta+sign$$1*tau$3:delta;if(antimeridian^lambda0>=lambda^lambda1>=lambda){var arc=cartesianCross(cartesian(point0),cartesian(point1));cartesianNormalizeInPlace(arc);var intersection=cartesianCross(normal,arc);cartesianNormalizeInPlace(intersection);var phiArc=(antimeridian^delta>=0?-1:1)*asin(intersection[2]);if(phi>phiArc||phi===phiArc&&(arc[0]||arc[1])){winding+=antimeridian^delta>=0?1:-1}}}}return(angle<-epsilon$2||angle<epsilon$2&&sum$1<-epsilon$2)^winding&1};var lengthSum=adder();var lambda0$2;var sinPhi0$1;var cosPhi0$1;var lengthStream={sphere:noop$1,point:noop$1,lineStart:lengthLineStart,lineEnd:noop$1,polygonStart:noop$1,polygonEnd:noop$1};function lengthLineStart(){lengthStream.point=lengthPointFirst;lengthStream.lineEnd=lengthLineEnd}function lengthLineEnd(){lengthStream.point=lengthStream.lineEnd=noop$1}function lengthPointFirst(lambda,phi){lambda*=radians,phi*=radians;lambda0$2=lambda,sinPhi0$1=sin$1(phi),cosPhi0$1=cos$1(phi);lengthStream.point=lengthPoint}function lengthPoint(lambda,phi){lambda*=radians,phi*=radians;var sinPhi=sin$1(phi),cosPhi=cos$1(phi),delta=abs(lambda-lambda0$2),cosDelta=cos$1(delta),sinDelta=sin$1(delta),x=cosPhi*sinDelta,y=cosPhi0$1*sinPhi-sinPhi0$1*cosPhi*cosDelta,z=sinPhi0$1*sinPhi+cosPhi0$1*cosPhi*cosDelta;lengthSum.add(atan2(sqrt(x*x+y*y),z));lambda0$2=lambda,sinPhi0$1=sinPhi,cosPhi0$1=cosPhi}var length$1=function(object){lengthSum.reset();geoStream(object,lengthStream);return+lengthSum};var coordinates=[null,null];var object$1={type:"LineString",coordinates:coordinates};var distance=function(a,b){coordinates[0]=a;coordinates[1]=b;return length$1(object$1)};var containsObjectType={Feature:function(object,point){return containsGeometry(object.geometry,point)},FeatureCollection:function(object,point){var features=object.features,i=-1,n=features.length;while(++i<n)if(containsGeometry(features[i].geometry,point))return true;return false}};var containsGeometryType={Sphere:function(){return true},Point:function(object,point){return containsPoint(object.coordinates,point)},MultiPoint:function(object,point){var coordinates=object.coordinates,i=-1,n=coordinates.length;while(++i<n)if(containsPoint(coordinates[i],point))return true;return false},LineString:function(object,point){return containsLine(object.coordinates,point)},MultiLineString:function(object,point){var coordinates=object.coordinates,i=-1,n=coordinates.length;while(++i<n)if(containsLine(coordinates[i],point))return true;return false},Polygon:function(object,point){return containsPolygon(object.coordinates,point)},MultiPolygon:function(object,point){var coordinates=object.coordinates,i=-1,n=coordinates.length;while(++i<n)if(containsPolygon(coordinates[i],point))return true;return false},GeometryCollection:function(object,point){var geometries=object.geometries,i=-1,n=geometries.length;while(++i<n)if(containsGeometry(geometries[i],point))return true;return false}};function containsGeometry(geometry,point){return geometry&&containsGeometryType.hasOwnProperty(geometry.type)?containsGeometryType[geometry.type](geometry,point):false}function containsPoint(coordinates,point){return distance(coordinates,point)===0}function containsLine(coordinates,point){var ab=distance(coordinates[0],coordinates[1]),ao=distance(coordinates[0],point),ob=distance(point,coordinates[1]);return ao+ob<=ab+epsilon$2}function containsPolygon(coordinates,point){return!!polygonContains(coordinates.map(ringRadians),pointRadians(point))}function ringRadians(ring){return ring=ring.map(pointRadians),ring.pop(),ring}function pointRadians(point){return[point[0]*radians,point[1]*radians]}var contains=function(object,point){return(object&&containsObjectType.hasOwnProperty(object.type)?containsObjectType[object.type]:containsGeometry)(object,point)};function graticuleX(y0,y1,dy){var y=sequence(y0,y1-epsilon$2,dy).concat(y1);return function(x){return y.map(function(y){return[x,y]})}}function graticuleY(x0,x1,dx){var x=sequence(x0,x1-epsilon$2,dx).concat(x1);return function(y){return x.map(function(x){return[x,y]})}}function graticule(){var x1,x0,X1,X0,y1,y0,Y1,Y0,dx=10,dy=dx,DX=90,DY=360,x,y,X,Y,precision=2.5;function graticule(){return{type:"MultiLineString",coordinates:lines()}}function lines(){return sequence(ceil(X0/DX)*DX,X1,DX).map(X).concat(sequence(ceil(Y0/DY)*DY,Y1,DY).map(Y)).concat(sequence(ceil(x0/dx)*dx,x1,dx).filter(function(x){return abs(x%DX)>epsilon$2}).map(x)).concat(sequence(ceil(y0/dy)*dy,y1,dy).filter(function(y){return abs(y%DY)>epsilon$2}).map(y))}graticule.lines=function(){return lines().map(function(coordinates){return{type:"LineString",coordinates:coordinates}})};graticule.outline=function(){return{type:"Polygon",coordinates:[X(X0).concat(Y(Y1).slice(1),X(X1).reverse().slice(1),Y(Y0).reverse().slice(1))]}};graticule.extent=function(_){if(!arguments.length)return graticule.extentMinor();return graticule.extentMajor(_).extentMinor(_)};graticule.extentMajor=function(_){if(!arguments.length)return[[X0,Y0],[X1,Y1]];X0=+_[0][0],X1=+_[1][0];Y0=+_[0][1],Y1=+_[1][1];if(X0>X1)_=X0,X0=X1,X1=_;if(Y0>Y1)_=Y0,Y0=Y1,Y1=_;return graticule.precision(precision)};graticule.extentMinor=function(_){if(!arguments.length)return[[x0,y0],[x1,y1]];x0=+_[0][0],x1=+_[1][0];y0=+_[0][1],y1=+_[1][1];if(x0>x1)_=x0,x0=x1,x1=_;if(y0>y1)_=y0,y0=y1,y1=_;return graticule.precision(precision)};graticule.step=function(_){if(!arguments.length)return graticule.stepMinor();return graticule.stepMajor(_).stepMinor(_)};graticule.stepMajor=function(_){if(!arguments.length)return[DX,DY];DX=+_[0],DY=+_[1];return graticule};graticule.stepMinor=function(_){if(!arguments.length)return[dx,dy];dx=+_[0],dy=+_[1];return graticule};graticule.precision=function(_){if(!arguments.length)return precision;precision=+_;x=graticuleX(y0,y1,90);y=graticuleY(x0,x1,precision);X=graticuleX(Y0,Y1,90);Y=graticuleY(X0,X1,precision);return graticule};return graticule.extentMajor([[-180,-90+epsilon$2],[180,90-epsilon$2]]).extentMinor([[-180,-80-epsilon$2],[180,80+epsilon$2]])}function graticule10(){return graticule()()}var interpolate$1=function(a,b){var x0=a[0]*radians,y0=a[1]*radians,x1=b[0]*radians,y1=b[1]*radians,cy0=cos$1(y0),sy0=sin$1(y0),cy1=cos$1(y1),sy1=sin$1(y1),kx0=cy0*cos$1(x0),ky0=cy0*sin$1(x0),kx1=cy1*cos$1(x1),ky1=cy1*sin$1(x1),d=2*asin(sqrt(haversin(y1-y0)+cy0*cy1*haversin(x1-x0))),k=sin$1(d);var interpolate=d?function(t){var B=sin$1(t*=d)/k,A=sin$1(d-t)/k,x=A*kx0+B*kx1,y=A*ky0+B*ky1,z=A*sy0+B*sy1;return[atan2(y,x)*degrees$1,atan2(z,sqrt(x*x+y*y))*degrees$1]}:function(){return[x0*degrees$1,y0*degrees$1]};interpolate.distance=d;return interpolate};var identity$4=function(x){return x};var areaSum$1=adder();var areaRingSum$1=adder();var x00;var y00;var x0$1;var y0$1;var areaStream$1={point:noop$1,lineStart:noop$1,lineEnd:noop$1,polygonStart:function(){areaStream$1.lineStart=areaRingStart$1;areaStream$1.lineEnd=areaRingEnd$1},polygonEnd:function(){areaStream$1.lineStart=areaStream$1.lineEnd=areaStream$1.point=noop$1;areaSum$1.add(abs(areaRingSum$1));areaRingSum$1.reset()},result:function(){var area=areaSum$1/2;areaSum$1.reset();return area}};function areaRingStart$1(){areaStream$1.point=areaPointFirst$1}function areaPointFirst$1(x,y){areaStream$1.point=areaPoint$1;x00=x0$1=x,y00=y0$1=y}function areaPoint$1(x,y){areaRingSum$1.add(y0$1*x-x0$1*y);x0$1=x,y0$1=y}function areaRingEnd$1(){areaPoint$1(x00,y00)}var x0$2=Infinity;var y0$2=x0$2;var x1=-x0$2;var y1=x1;var boundsStream$1={point:boundsPoint$1,lineStart:noop$1,lineEnd:noop$1,polygonStart:noop$1,polygonEnd:noop$1,result:function(){var bounds=[[x0$2,y0$2],[x1,y1]];x1=y1=-(y0$2=x0$2=Infinity);return bounds}};function boundsPoint$1(x,y){if(x<x0$2)x0$2=x;if(x>x1)x1=x;if(y<y0$2)y0$2=y;if(y>y1)y1=y}var X0$1=0;var Y0$1=0;var Z0$1=0;var X1$1=0;var Y1$1=0;var Z1$1=0;var X2$1=0;var Y2$1=0;var Z2$1=0;var x00$1;var y00$1;var x0$3;var y0$3;var centroidStream$1={point:centroidPoint$1,lineStart:centroidLineStart$1,lineEnd:centroidLineEnd$1,polygonStart:function(){centroidStream$1.lineStart=centroidRingStart$1;centroidStream$1.lineEnd=centroidRingEnd$1},polygonEnd:function(){centroidStream$1.point=centroidPoint$1;centroidStream$1.lineStart=centroidLineStart$1;centroidStream$1.lineEnd=centroidLineEnd$1},result:function(){var centroid=Z2$1?[X2$1/Z2$1,Y2$1/Z2$1]:Z1$1?[X1$1/Z1$1,Y1$1/Z1$1]:Z0$1?[X0$1/Z0$1,Y0$1/Z0$1]:[NaN,NaN];X0$1=Y0$1=Z0$1=X1$1=Y1$1=Z1$1=X2$1=Y2$1=Z2$1=0;return centroid}};function centroidPoint$1(x,y){X0$1+=x;Y0$1+=y;++Z0$1}function centroidLineStart$1(){centroidStream$1.point=centroidPointFirstLine}function centroidPointFirstLine(x,y){centroidStream$1.point=centroidPointLine;centroidPoint$1(x0$3=x,y0$3=y)}function centroidPointLine(x,y){var dx=x-x0$3,dy=y-y0$3,z=sqrt(dx*dx+dy*dy);X1$1+=z*(x0$3+x)/2;Y1$1+=z*(y0$3+y)/2;Z1$1+=z;centroidPoint$1(x0$3=x,y0$3=y)}function centroidLineEnd$1(){centroidStream$1.point=centroidPoint$1}function centroidRingStart$1(){centroidStream$1.point=centroidPointFirstRing}function centroidRingEnd$1(){centroidPointRing(x00$1,y00$1)}function centroidPointFirstRing(x,y){centroidStream$1.point=centroidPointRing;centroidPoint$1(x00$1=x0$3=x,y00$1=y0$3=y)}function centroidPointRing(x,y){var dx=x-x0$3,dy=y-y0$3,z=sqrt(dx*dx+dy*dy);X1$1+=z*(x0$3+x)/2;Y1$1+=z*(y0$3+y)/2;Z1$1+=z;z=y0$3*x-x0$3*y;X2$1+=z*(x0$3+x);Y2$1+=z*(y0$3+y);Z2$1+=z*3;centroidPoint$1(x0$3=x,y0$3=y)}function PathContext(context){this._context=context}PathContext.prototype={_radius:4.5,pointRadius:function(_){return this._radius=_,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line===0)this._context.closePath();this._point=NaN},point:function(x,y){switch(this._point){case 0:{this._context.moveTo(x,y);this._point=1;break}case 1:{this._context.lineTo(x,y);break}default:{this._context.moveTo(x+this._radius,y);this._context.arc(x,y,this._radius,0,tau$3);break}}},result:noop$1};var lengthSum$1=adder();var lengthRing;var x00$2;var y00$2;var x0$4;var y0$4;var lengthStream$1={point:noop$1,lineStart:function(){lengthStream$1.point=lengthPointFirst$1},lineEnd:function(){if(lengthRing)lengthPoint$1(x00$2,y00$2);lengthStream$1.point=noop$1},polygonStart:function(){lengthRing=true},polygonEnd:function(){lengthRing=null},result:function(){var length=+lengthSum$1;lengthSum$1.reset();return length}};function lengthPointFirst$1(x,y){lengthStream$1.point=lengthPoint$1;x00$2=x0$4=x,y00$2=y0$4=y}function lengthPoint$1(x,y){x0$4-=x,y0$4-=y;lengthSum$1.add(sqrt(x0$4*x0$4+y0$4*y0$4));x0$4=x,y0$4=y}function PathString(){this._string=[]}PathString.prototype={_circle:circle$1(4.5),pointRadius:function(_){return this._circle=circle$1(_),this},polygonStart:function(){ this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line===0)this._string.push("Z");this._point=NaN},point:function(x,y){switch(this._point){case 0:{this._string.push("M",x,",",y);this._point=1;break}case 1:{this._string.push("L",x,",",y);break}default:{this._string.push("M",x,",",y,this._circle);break}}},result:function(){if(this._string.length){var result=this._string.join("");this._string=[];return result}}};function circle$1(radius){return"m0,"+radius+"a"+radius+","+radius+" 0 1,1 0,"+-2*radius+"a"+radius+","+radius+" 0 1,1 0,"+2*radius+"z"}var index$1=function(projection,context){var pointRadius=4.5,projectionStream,contextStream;function path(object){if(object){if(typeof pointRadius==="function")contextStream.pointRadius(+pointRadius.apply(this,arguments));geoStream(object,projectionStream(contextStream))}return contextStream.result()}path.area=function(object){geoStream(object,projectionStream(areaStream$1));return areaStream$1.result()};path.measure=function(object){geoStream(object,projectionStream(lengthStream$1));return lengthStream$1.result()};path.bounds=function(object){geoStream(object,projectionStream(boundsStream$1));return boundsStream$1.result()};path.centroid=function(object){geoStream(object,projectionStream(centroidStream$1));return centroidStream$1.result()};path.projection=function(_){return arguments.length?(projectionStream=_==null?(projection=null,identity$4):(projection=_).stream,path):projection};path.context=function(_){if(!arguments.length)return context;contextStream=_==null?(context=null,new PathString):new PathContext(context=_);if(typeof pointRadius!=="function")contextStream.pointRadius(pointRadius);return path};path.pointRadius=function(_){if(!arguments.length)return pointRadius;pointRadius=typeof _==="function"?_:(contextStream.pointRadius(+_),+_);return path};return path.projection(projection).context(context)};var clip=function(pointVisible,clipLine,interpolate,start){return function(rotate,sink){var line=clipLine(sink),rotatedStart=rotate.invert(start[0],start[1]),ringBuffer=clipBuffer(),ringSink=clipLine(ringBuffer),polygonStarted=false,polygon,segments,ring;var clip={point:point,lineStart:lineStart,lineEnd:lineEnd,polygonStart:function(){clip.point=pointRing;clip.lineStart=ringStart;clip.lineEnd=ringEnd;segments=[];polygon=[]},polygonEnd:function(){clip.point=point;clip.lineStart=lineStart;clip.lineEnd=lineEnd;segments=merge(segments);var startInside=polygonContains(polygon,rotatedStart);if(segments.length){if(!polygonStarted)sink.polygonStart(),polygonStarted=true;clipPolygon(segments,compareIntersection,startInside,interpolate,sink)}else if(startInside){if(!polygonStarted)sink.polygonStart(),polygonStarted=true;sink.lineStart();interpolate(null,null,1,sink);sink.lineEnd()}if(polygonStarted)sink.polygonEnd(),polygonStarted=false;segments=polygon=null},sphere:function(){sink.polygonStart();sink.lineStart();interpolate(null,null,1,sink);sink.lineEnd();sink.polygonEnd()}};function point(lambda,phi){var point=rotate(lambda,phi);if(pointVisible(lambda=point[0],phi=point[1]))sink.point(lambda,phi)}function pointLine(lambda,phi){var point=rotate(lambda,phi);line.point(point[0],point[1])}function lineStart(){clip.point=pointLine;line.lineStart()}function lineEnd(){clip.point=point;line.lineEnd()}function pointRing(lambda,phi){ring.push([lambda,phi]);var point=rotate(lambda,phi);ringSink.point(point[0],point[1])}function ringStart(){ringSink.lineStart();ring=[]}function ringEnd(){pointRing(ring[0][0],ring[0][1]);ringSink.lineEnd();var clean=ringSink.clean(),ringSegments=ringBuffer.result(),i,n=ringSegments.length,m,segment,point;ring.pop();polygon.push(ring);ring=null;if(!n)return;if(clean&1){segment=ringSegments[0];if((m=segment.length-1)>0){if(!polygonStarted)sink.polygonStart(),polygonStarted=true;sink.lineStart();for(i=0;i<m;++i)sink.point((point=segment[i])[0],point[1]);sink.lineEnd()}return}if(n>1&&clean&2)ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));segments.push(ringSegments.filter(validSegment))}return clip}};function validSegment(segment){return segment.length>1}function compareIntersection(a,b){return((a=a.x)[0]<0?a[1]-halfPi$2-epsilon$2:halfPi$2-a[1])-((b=b.x)[0]<0?b[1]-halfPi$2-epsilon$2:halfPi$2-b[1])}var clipAntimeridian=clip(function(){return true},clipAntimeridianLine,clipAntimeridianInterpolate,[-pi$3,-halfPi$2]);function clipAntimeridianLine(stream){var lambda0=NaN,phi0=NaN,sign0=NaN,clean;return{lineStart:function(){stream.lineStart();clean=1},point:function(lambda1,phi1){var sign1=lambda1>0?pi$3:-pi$3,delta=abs(lambda1-lambda0);if(abs(delta-pi$3)<epsilon$2){stream.point(lambda0,phi0=(phi0+phi1)/2>0?halfPi$2:-halfPi$2);stream.point(sign0,phi0);stream.lineEnd();stream.lineStart();stream.point(sign1,phi0);stream.point(lambda1,phi0);clean=0}else if(sign0!==sign1&&delta>=pi$3){if(abs(lambda0-sign0)<epsilon$2)lambda0-=sign0*epsilon$2;if(abs(lambda1-sign1)<epsilon$2)lambda1-=sign1*epsilon$2;phi0=clipAntimeridianIntersect(lambda0,phi0,lambda1,phi1);stream.point(sign0,phi0);stream.lineEnd();stream.lineStart();stream.point(sign1,phi0);clean=0}stream.point(lambda0=lambda1,phi0=phi1);sign0=sign1},lineEnd:function(){stream.lineEnd();lambda0=phi0=NaN},clean:function(){return 2-clean}}}function clipAntimeridianIntersect(lambda0,phi0,lambda1,phi1){var cosPhi0,cosPhi1,sinLambda0Lambda1=sin$1(lambda0-lambda1);return abs(sinLambda0Lambda1)>epsilon$2?atan((sin$1(phi0)*(cosPhi1=cos$1(phi1))*sin$1(lambda1)-sin$1(phi1)*(cosPhi0=cos$1(phi0))*sin$1(lambda0))/(cosPhi0*cosPhi1*sinLambda0Lambda1)):(phi0+phi1)/2}function clipAntimeridianInterpolate(from,to,direction,stream){var phi;if(from==null){phi=direction*halfPi$2;stream.point(-pi$3,phi);stream.point(0,phi);stream.point(pi$3,phi);stream.point(pi$3,0);stream.point(pi$3,-phi);stream.point(0,-phi);stream.point(-pi$3,-phi);stream.point(-pi$3,0);stream.point(-pi$3,phi)}else if(abs(from[0]-to[0])>epsilon$2){var lambda=from[0]<to[0]?pi$3:-pi$3;phi=direction*lambda/2;stream.point(-lambda,phi);stream.point(0,phi);stream.point(lambda,phi)}else{stream.point(to[0],to[1])}}var clipCircle=function(radius,delta){var cr=cos$1(radius),smallRadius=cr>0,notHemisphere=abs(cr)>epsilon$2;function interpolate(from,to,direction,stream){circleStream(stream,radius,delta,direction,from,to)}function visible(lambda,phi){return cos$1(lambda)*cos$1(phi)>cr}function clipLine(stream){var point0,c0,v0,v00,clean;return{lineStart:function(){v00=v0=false;clean=1},point:function(lambda,phi){var point1=[lambda,phi],point2,v=visible(lambda,phi),c=smallRadius?v?0:code(lambda,phi):v?code(lambda+(lambda<0?pi$3:-pi$3),phi):0;if(!point0&&(v00=v0=v))stream.lineStart();if(v!==v0){point2=intersect(point0,point1);if(pointEqual(point0,point2)||pointEqual(point1,point2)){point1[0]+=epsilon$2;point1[1]+=epsilon$2;v=visible(point1[0],point1[1])}}if(v!==v0){clean=0;if(v){stream.lineStart();point2=intersect(point1,point0);stream.point(point2[0],point2[1])}else{point2=intersect(point0,point1);stream.point(point2[0],point2[1]);stream.lineEnd()}point0=point2}else if(notHemisphere&&point0&&smallRadius^v){var t;if(!(c&c0)&&(t=intersect(point1,point0,true))){clean=0;if(smallRadius){stream.lineStart();stream.point(t[0][0],t[0][1]);stream.point(t[1][0],t[1][1]);stream.lineEnd()}else{stream.point(t[1][0],t[1][1]);stream.lineEnd();stream.lineStart();stream.point(t[0][0],t[0][1])}}}if(v&&(!point0||!pointEqual(point0,point1))){stream.point(point1[0],point1[1])}point0=point1,v0=v,c0=c},lineEnd:function(){if(v0)stream.lineEnd();point0=null},clean:function(){return clean|(v00&&v0)<<1}}}function intersect(a,b,two){var pa=cartesian(a),pb=cartesian(b);var n1=[1,0,0],n2=cartesianCross(pa,pb),n2n2=cartesianDot(n2,n2),n1n2=n2[0],determinant=n2n2-n1n2*n1n2;if(!determinant)return!two&&a;var c1=cr*n2n2/determinant,c2=-cr*n1n2/determinant,n1xn2=cartesianCross(n1,n2),A=cartesianScale(n1,c1),B=cartesianScale(n2,c2);cartesianAddInPlace(A,B);var u=n1xn2,w=cartesianDot(A,u),uu=cartesianDot(u,u),t2=w*w-uu*(cartesianDot(A,A)-1);if(t2<0)return;var t=sqrt(t2),q=cartesianScale(u,(-w-t)/uu);cartesianAddInPlace(q,A);q=spherical(q);if(!two)return q;var lambda0=a[0],lambda1=b[0],phi0=a[1],phi1=b[1],z;if(lambda1<lambda0)z=lambda0,lambda0=lambda1,lambda1=z;var delta=lambda1-lambda0,polar=abs(delta-pi$3)<epsilon$2,meridian=polar||delta<epsilon$2;if(!polar&&phi1<phi0)z=phi0,phi0=phi1,phi1=z;if(meridian?polar?phi0+phi1>0^q[1]<(abs(q[0]-lambda0)<epsilon$2?phi0:phi1):phi0<=q[1]&&q[1]<=phi1:delta>pi$3^(lambda0<=q[0]&&q[0]<=lambda1)){var q1=cartesianScale(u,(-w+t)/uu);cartesianAddInPlace(q1,A);return[q,spherical(q1)]}}function code(lambda,phi){var r=smallRadius?radius:pi$3-radius,code=0;if(lambda<-r)code|=1;else if(lambda>r)code|=2;if(phi<-r)code|=4;else if(phi>r)code|=8;return code}return clip(visible,clipLine,interpolate,smallRadius?[0,-radius]:[-pi$3,radius-pi$3])};var transform=function(methods){return{stream:transformer(methods)}};function transformer(methods){return function(stream){var s=new TransformStream;for(var key in methods)s[key]=methods[key];s.stream=stream;return s}}function TransformStream(){}TransformStream.prototype={constructor:TransformStream,point:function(x,y){this.stream.point(x,y)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function fitExtent(projection,extent,object){var w=extent[1][0]-extent[0][0],h=extent[1][1]-extent[0][1],clip=projection.clipExtent&&projection.clipExtent();projection.scale(150).translate([0,0]);if(clip!=null)projection.clipExtent(null);geoStream(object,projection.stream(boundsStream$1));var b=boundsStream$1.result(),k=Math.min(w/(b[1][0]-b[0][0]),h/(b[1][1]-b[0][1])),x=+extent[0][0]+(w-k*(b[1][0]+b[0][0]))/2,y=+extent[0][1]+(h-k*(b[1][1]+b[0][1]))/2;if(clip!=null)projection.clipExtent(clip);return projection.scale(k*150).translate([x,y])}function fitSize(projection,size,object){return fitExtent(projection,[[0,0],size],object)}var maxDepth=16;var cosMinDistance=cos$1(30*radians);var resample=function(project,delta2){return+delta2?resample$1(project,delta2):resampleNone(project)};function resampleNone(project){return transformer({point:function(x,y){x=project(x,y);this.stream.point(x[0],x[1])}})}function resample$1(project,delta2){function resampleLineTo(x0,y0,lambda0,a0,b0,c0,x1,y1,lambda1,a1,b1,c1,depth,stream){var dx=x1-x0,dy=y1-y0,d2=dx*dx+dy*dy;if(d2>4*delta2&&depth--){var a=a0+a1,b=b0+b1,c=c0+c1,m=sqrt(a*a+b*b+c*c),phi2=asin(c/=m),lambda2=abs(abs(c)-1)<epsilon$2||abs(lambda0-lambda1)<epsilon$2?(lambda0+lambda1)/2:atan2(b,a),p=project(lambda2,phi2),x2=p[0],y2=p[1],dx2=x2-x0,dy2=y2-y0,dz=dy*dx2-dx*dy2;if(dz*dz/d2>delta2||abs((dx*dx2+dy*dy2)/d2-.5)>.3||a0*a1+b0*b1+c0*c1<cosMinDistance){resampleLineTo(x0,y0,lambda0,a0,b0,c0,x2,y2,lambda2,a/=m,b/=m,c,depth,stream);stream.point(x2,y2);resampleLineTo(x2,y2,lambda2,a,b,c,x1,y1,lambda1,a1,b1,c1,depth,stream)}}}return function(stream){var lambda00,x00,y00,a00,b00,c00,lambda0,x0,y0,a0,b0,c0;var resampleStream={point:point,lineStart:lineStart,lineEnd:lineEnd,polygonStart:function(){stream.polygonStart();resampleStream.lineStart=ringStart},polygonEnd:function(){stream.polygonEnd();resampleStream.lineStart=lineStart}};function point(x,y){x=project(x,y);stream.point(x[0],x[1])}function lineStart(){x0=NaN;resampleStream.point=linePoint;stream.lineStart()}function linePoint(lambda,phi){var c=cartesian([lambda,phi]),p=project(lambda,phi);resampleLineTo(x0,y0,lambda0,a0,b0,c0,x0=p[0],y0=p[1],lambda0=lambda,a0=c[0],b0=c[1],c0=c[2],maxDepth,stream);stream.point(x0,y0)}function lineEnd(){resampleStream.point=point;stream.lineEnd()}function ringStart(){lineStart();resampleStream.point=ringPoint;resampleStream.lineEnd=ringEnd}function ringPoint(lambda,phi){linePoint(lambda00=lambda,phi),x00=x0,y00=y0,a00=a0,b00=b0,c00=c0;resampleStream.point=linePoint}function ringEnd(){resampleLineTo(x0,y0,lambda0,a0,b0,c0,x00,y00,lambda00,a00,b00,c00,maxDepth,stream);resampleStream.lineEnd=lineEnd;lineEnd()}return resampleStream}}var transformRadians=transformer({point:function(x,y){this.stream.point(x*radians,y*radians)}});function projection(project){return projectionMutator(function(){return project})()}function projectionMutator(projectAt){var project,k=150,x=480,y=250,dx,dy,lambda=0,phi=0,deltaLambda=0,deltaPhi=0,deltaGamma=0,rotate,projectRotate,theta=null,preclip=clipAntimeridian,x0=null,y0,x1,y1,postclip=identity$4,delta2=.5,projectResample=resample(projectTransform,delta2),cache,cacheStream;function projection(point){point=projectRotate(point[0]*radians,point[1]*radians);return[point[0]*k+dx,dy-point[1]*k]}function invert(point){point=projectRotate.invert((point[0]-dx)/k,(dy-point[1])/k);return point&&[point[0]*degrees$1,point[1]*degrees$1]}function projectTransform(x,y){return x=project(x,y),[x[0]*k+dx,dy-x[1]*k]}projection.stream=function(stream){return cache&&cacheStream===stream?cache:cache=transformRadians(preclip(rotate,projectResample(postclip(cacheStream=stream))))};projection.clipAngle=function(_){return arguments.length?(preclip=+_?clipCircle(theta=_*radians,6*radians):(theta=null,clipAntimeridian),reset()):theta*degrees$1};projection.clipExtent=function(_){return arguments.length?(postclip=_==null?(x0=y0=x1=y1=null,identity$4):clipExtent(x0=+_[0][0],y0=+_[0][1],x1=+_[1][0],y1=+_[1][1]),reset()):x0==null?null:[[x0,y0],[x1,y1]]};projection.scale=function(_){return arguments.length?(k=+_,recenter()):k};projection.translate=function(_){return arguments.length?(x=+_[0],y=+_[1],recenter()):[x,y]};projection.center=function(_){return arguments.length?(lambda=_[0]%360*radians,phi=_[1]%360*radians,recenter()):[lambda*degrees$1,phi*degrees$1]};projection.rotate=function(_){return arguments.length?(deltaLambda=_[0]%360*radians,deltaPhi=_[1]%360*radians,deltaGamma=_.length>2?_[2]%360*radians:0,recenter()):[deltaLambda*degrees$1,deltaPhi*degrees$1,deltaGamma*degrees$1]};projection.precision=function(_){return arguments.length?(projectResample=resample(projectTransform,delta2=_*_),reset()):sqrt(delta2)};projection.fitExtent=function(extent,object){return fitExtent(projection,extent,object)};projection.fitSize=function(size,object){return fitSize(projection,size,object)};function recenter(){projectRotate=compose(rotate=rotateRadians(deltaLambda,deltaPhi,deltaGamma),project);var center=project(lambda,phi);dx=x-center[0]*k;dy=y+center[1]*k;return reset()}function reset(){cache=cacheStream=null;return projection}return function(){project=projectAt.apply(this,arguments);projection.invert=project.invert&&invert;return recenter()}}function conicProjection(projectAt){var phi0=0,phi1=pi$3/3,m=projectionMutator(projectAt),p=m(phi0,phi1);p.parallels=function(_){return arguments.length?m(phi0=_[0]*radians,phi1=_[1]*radians):[phi0*degrees$1,phi1*degrees$1]};return p}function cylindricalEqualAreaRaw(phi0){var cosPhi0=cos$1(phi0);function forward(lambda,phi){return[lambda*cosPhi0,sin$1(phi)/cosPhi0]}forward.invert=function(x,y){return[x/cosPhi0,asin(y*cosPhi0)]};return forward}function conicEqualAreaRaw(y0,y1){var sy0=sin$1(y0),n=(sy0+sin$1(y1))/2;if(abs(n)<epsilon$2)return cylindricalEqualAreaRaw(y0);var c=1+sy0*(2*n-sy0),r0=sqrt(c)/n;function project(x,y){var r=sqrt(c-2*n*sin$1(y))/n;return[r*sin$1(x*=n),r0-r*cos$1(x)]}project.invert=function(x,y){var r0y=r0-y;return[atan2(x,abs(r0y))/n*sign(r0y),asin((c-(x*x+r0y*r0y)*n*n)/(2*n))]};return project}var conicEqualArea=function(){return conicProjection(conicEqualAreaRaw).scale(155.424).center([0,33.6442])};var albers=function(){return conicEqualArea().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};function multiplex(streams){var n=streams.length;return{point:function(x,y){var i=-1;while(++i<n)streams[i].point(x,y)},sphere:function(){var i=-1;while(++i<n)streams[i].sphere()},lineStart:function(){var i=-1;while(++i<n)streams[i].lineStart()},lineEnd:function(){var i=-1;while(++i<n)streams[i].lineEnd()},polygonStart:function(){var i=-1;while(++i<n)streams[i].polygonStart()},polygonEnd:function(){var i=-1;while(++i<n)streams[i].polygonEnd()}}}var albersUsa=function(){var cache,cacheStream,lower48=albers(),lower48Point,alaska=conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),alaskaPoint,hawaii=conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),hawaiiPoint,point,pointStream={point:function(x,y){point=[x,y]}};function albersUsa(coordinates){var x=coordinates[0],y=coordinates[1];return point=null,(lower48Point.point(x,y),point)||(alaskaPoint.point(x,y),point)||(hawaiiPoint.point(x,y),point)}albersUsa.invert=function(coordinates){var k=lower48.scale(),t=lower48.translate(),x=(coordinates[0]-t[0])/k,y=(coordinates[1]-t[1])/k;return(y>=.12&&y<.234&&x>=-.425&&x<-.214?alaska:y>=.166&&y<.234&&x>=-.214&&x<-.115?hawaii:lower48).invert(coordinates)};albersUsa.stream=function(stream){return cache&&cacheStream===stream?cache:cache=multiplex([lower48.stream(cacheStream=stream),alaska.stream(stream),hawaii.stream(stream)])};albersUsa.precision=function(_){if(!arguments.length)return lower48.precision();lower48.precision(_),alaska.precision(_),hawaii.precision(_);return reset()};albersUsa.scale=function(_){if(!arguments.length)return lower48.scale();lower48.scale(_),alaska.scale(_*.35),hawaii.scale(_);return albersUsa.translate(lower48.translate())};albersUsa.translate=function(_){if(!arguments.length)return lower48.translate();var k=lower48.scale(),x=+_[0],y=+_[1];lower48Point=lower48.translate(_).clipExtent([[x-.455*k,y-.238*k],[x+.455*k,y+.238*k]]).stream(pointStream);alaskaPoint=alaska.translate([x-.307*k,y+.201*k]).clipExtent([[x-.425*k+epsilon$2,y+.12*k+epsilon$2],[x-.214*k-epsilon$2,y+.234*k-epsilon$2]]).stream(pointStream);hawaiiPoint=hawaii.translate([x-.205*k,y+.212*k]).clipExtent([[x-.214*k+epsilon$2,y+.166*k+epsilon$2],[x-.115*k-epsilon$2,y+.234*k-epsilon$2]]).stream(pointStream);return reset()};albersUsa.fitExtent=function(extent,object){return fitExtent(albersUsa,extent,object)};albersUsa.fitSize=function(size,object){return fitSize(albersUsa,size,object)};function reset(){cache=cacheStream=null;return albersUsa}return albersUsa.scale(1070)};function azimuthalRaw(scale){return function(x,y){var cx=cos$1(x),cy=cos$1(y),k=scale(cx*cy);return[k*cy*sin$1(x),k*sin$1(y)]}}function azimuthalInvert(angle){return function(x,y){var z=sqrt(x*x+y*y),c=angle(z),sc=sin$1(c),cc=cos$1(c);return[atan2(x*sc,z*cc),asin(z&&y*sc/z)]}}var azimuthalEqualAreaRaw=azimuthalRaw(function(cxcy){return sqrt(2/(1+cxcy))});azimuthalEqualAreaRaw.invert=azimuthalInvert(function(z){return 2*asin(z/2)});var azimuthalEqualArea=function(){return projection(azimuthalEqualAreaRaw).scale(124.75).clipAngle(180-.001)};var azimuthalEquidistantRaw=azimuthalRaw(function(c){return(c=acos(c))&&c/sin$1(c)});azimuthalEquidistantRaw.invert=azimuthalInvert(function(z){return z});var azimuthalEquidistant=function(){return projection(azimuthalEquidistantRaw).scale(79.4188).clipAngle(180-.001)};function mercatorRaw(lambda,phi){return[lambda,log(tan((halfPi$2+phi)/2))]}mercatorRaw.invert=function(x,y){return[x,2*atan(exp(y))-halfPi$2]};var mercator=function(){return mercatorProjection(mercatorRaw).scale(961/tau$3)};function mercatorProjection(project){var m=projection(project),center=m.center,scale=m.scale,translate=m.translate,clipExtent=m.clipExtent,x0=null,y0,x1,y1;m.scale=function(_){return arguments.length?(scale(_),reclip()):scale()};m.translate=function(_){return arguments.length?(translate(_),reclip()):translate()};m.center=function(_){return arguments.length?(center(_),reclip()):center()};m.clipExtent=function(_){return arguments.length?(_==null?x0=y0=x1=y1=null:(x0=+_[0][0],y0=+_[0][1],x1=+_[1][0],y1=+_[1][1]),reclip()):x0==null?null:[[x0,y0],[x1,y1]]};function reclip(){var k=pi$3*scale(),t=m(rotation(m.rotate()).invert([0,0]));return clipExtent(x0==null?[[t[0]-k,t[1]-k],[t[0]+k,t[1]+k]]:project===mercatorRaw?[[Math.max(t[0]-k,x0),y0],[Math.min(t[0]+k,x1),y1]]:[[x0,Math.max(t[1]-k,y0)],[x1,Math.min(t[1]+k,y1)]])}return reclip()}function tany(y){return tan((halfPi$2+y)/2)}function conicConformalRaw(y0,y1){var cy0=cos$1(y0),n=y0===y1?sin$1(y0):log(cy0/cos$1(y1))/log(tany(y1)/tany(y0)),f=cy0*pow(tany(y0),n)/n;if(!n)return mercatorRaw;function project(x,y){if(f>0){if(y<-halfPi$2+epsilon$2)y=-halfPi$2+epsilon$2}else{if(y>halfPi$2-epsilon$2)y=halfPi$2-epsilon$2}var r=f/pow(tany(y),n);return[r*sin$1(n*x),f-r*cos$1(n*x)]}project.invert=function(x,y){var fy=f-y,r=sign(n)*sqrt(x*x+fy*fy);return[atan2(x,abs(fy))/n*sign(fy),2*atan(pow(f/r,1/n))-halfPi$2]};return project}var conicConformal=function(){return conicProjection(conicConformalRaw).scale(109.5).parallels([30,30])};function equirectangularRaw(lambda,phi){return[lambda,phi]}equirectangularRaw.invert=equirectangularRaw;var equirectangular=function(){return projection(equirectangularRaw).scale(152.63)};function conicEquidistantRaw(y0,y1){var cy0=cos$1(y0),n=y0===y1?sin$1(y0):(cy0-cos$1(y1))/(y1-y0),g=cy0/n+y0;if(abs(n)<epsilon$2)return equirectangularRaw;function project(x,y){var gy=g-y,nx=n*x;return[gy*sin$1(nx),g-gy*cos$1(nx)]}project.invert=function(x,y){var gy=g-y;return[atan2(x,abs(gy))/n*sign(gy),g-sign(n)*sqrt(x*x+gy*gy)]};return project}var conicEquidistant=function(){return conicProjection(conicEquidistantRaw).scale(131.154).center([0,13.9389])};function gnomonicRaw(x,y){var cy=cos$1(y),k=cos$1(x)*cy;return[cy*sin$1(x)/k,sin$1(y)/k]}gnomonicRaw.invert=azimuthalInvert(atan);var gnomonic=function(){return projection(gnomonicRaw).scale(144.049).clipAngle(60)};function scaleTranslate(kx,ky,tx,ty){return kx===1&&ky===1&&tx===0&&ty===0?identity$4:transformer({point:function(x,y){this.stream.point(x*kx+tx,y*ky+ty)}})}var identity$5=function(){var k=1,tx=0,ty=0,sx=1,sy=1,transform=identity$4,x0=null,y0,x1,y1,clip=identity$4,cache,cacheStream,projection;function reset(){cache=cacheStream=null;return projection}return projection={stream:function(stream){return cache&&cacheStream===stream?cache:cache=transform(clip(cacheStream=stream))},clipExtent:function(_){return arguments.length?(clip=_==null?(x0=y0=x1=y1=null,identity$4):clipExtent(x0=+_[0][0],y0=+_[0][1],x1=+_[1][0],y1=+_[1][1]),reset()):x0==null?null:[[x0,y0],[x1,y1]]},scale:function(_){return arguments.length?(transform=scaleTranslate((k=+_)*sx,k*sy,tx,ty),reset()):k},translate:function(_){return arguments.length?(transform=scaleTranslate(k*sx,k*sy,tx=+_[0],ty=+_[1]),reset()):[tx,ty]},reflectX:function(_){return arguments.length?(transform=scaleTranslate(k*(sx=_?-1:1),k*sy,tx,ty),reset()):sx<0},reflectY:function(_){return arguments.length?(transform=scaleTranslate(k*sx,k*(sy=_?-1:1),tx,ty),reset()):sy<0},fitExtent:function(extent,object){return fitExtent(projection,extent,object)},fitSize:function(size,object){return fitSize(projection,size,object)}}};function orthographicRaw(x,y){return[cos$1(y)*sin$1(x),sin$1(y)]}orthographicRaw.invert=azimuthalInvert(asin);var orthographic=function(){return projection(orthographicRaw).scale(249.5).clipAngle(90+epsilon$2)};function stereographicRaw(x,y){var cy=cos$1(y),k=1+cos$1(x)*cy;return[cy*sin$1(x)/k,sin$1(y)/k]}stereographicRaw.invert=azimuthalInvert(function(z){return 2*atan(z)});var stereographic=function(){return projection(stereographicRaw).scale(250).clipAngle(142)};function transverseMercatorRaw(lambda,phi){return[log(tan((halfPi$2+phi)/2)),-lambda]}transverseMercatorRaw.invert=function(x,y){return[-y,2*atan(exp(x))-halfPi$2]};var transverseMercator=function(){var m=mercatorProjection(transverseMercatorRaw),center=m.center,rotate=m.rotate;m.center=function(_){return arguments.length?center([-_[1],_[0]]):(_=center(),[_[1],-_[0]])};m.rotate=function(_){return arguments.length?rotate([_[0],_[1],_.length>2?_[2]+90:90]):(_=rotate(),[_[0],_[1],_[2]-90])};return rotate([0,0,90]).scale(159.155)};function defaultSeparation(a,b){return a.parent===b.parent?1:2}function meanX(children){return children.reduce(meanXReduce,0)/children.length}function meanXReduce(x,c){return x+c.x}function maxY(children){return 1+children.reduce(maxYReduce,0)}function maxYReduce(y,c){return Math.max(y,c.y)}function leafLeft(node){var children;while(children=node.children)node=children[0];return node}function leafRight(node){var children;while(children=node.children)node=children[children.length-1];return node}var cluster=function(){var separation=defaultSeparation,dx=1,dy=1,nodeSize=false;function cluster(root){var previousNode,x=0;root.eachAfter(function(node){var children=node.children;if(children){node.x=meanX(children);node.y=maxY(children)}else{node.x=previousNode?x+=separation(node,previousNode):0;node.y=0;previousNode=node}});var left=leafLeft(root),right=leafRight(root),x0=left.x-separation(left,right)/2,x1=right.x+separation(right,left)/2;return root.eachAfter(nodeSize?function(node){node.x=(node.x-root.x)*dx;node.y=(root.y-node.y)*dy}:function(node){node.x=(node.x-x0)/(x1-x0)*dx;node.y=(1-(root.y?node.y/root.y:1))*dy})}cluster.separation=function(x){return arguments.length?(separation=x,cluster):separation};cluster.size=function(x){return arguments.length?(nodeSize=false,dx=+x[0],dy=+x[1],cluster):nodeSize?null:[dx,dy]};cluster.nodeSize=function(x){return arguments.length?(nodeSize=true,dx=+x[0],dy=+x[1],cluster):nodeSize?[dx,dy]:null};return cluster};function count(node){var sum=0,children=node.children,i=children&&children.length;if(!i)sum=1;else while(--i>=0)sum+=children[i].value;node.value=sum}var node_count=function(){return this.eachAfter(count)};var node_each=function(callback){var node=this,current,next=[node],children,i,n;do{current=next.reverse(),next=[];while(node=current.pop()){callback(node),children=node.children;if(children)for(i=0,n=children.length;i<n;++i){next.push(children[i])}}}while(next.length);return this};var node_eachBefore=function(callback){var node=this,nodes=[node],children,i;while(node=nodes.pop()){callback(node),children=node.children;if(children)for(i=children.length-1;i>=0;--i){nodes.push(children[i])}}return this};var node_eachAfter=function(callback){var node=this,nodes=[node],next=[],children,i,n;while(node=nodes.pop()){next.push(node),children=node.children;if(children)for(i=0,n=children.length;i<n;++i){nodes.push(children[i])}}while(node=next.pop()){callback(node)}return this};var node_sum=function(value){return this.eachAfter(function(node){var sum=+value(node.data)||0,children=node.children,i=children&&children.length;while(--i>=0)sum+=children[i].value;node.value=sum})};var node_sort=function(compare){return this.eachBefore(function(node){if(node.children){node.children.sort(compare)}})};var node_path=function(end){var start=this,ancestor=leastCommonAncestor(start,end),nodes=[start];while(start!==ancestor){start=start.parent;nodes.push(start)}var k=nodes.length;while(end!==ancestor){nodes.splice(k,0,end);end=end.parent}return nodes};function leastCommonAncestor(a,b){if(a===b)return a;var aNodes=a.ancestors(),bNodes=b.ancestors(),c=null;a=aNodes.pop();b=bNodes.pop();while(a===b){c=a;a=aNodes.pop();b=bNodes.pop()}return c}var node_ancestors=function(){var node=this,nodes=[node];while(node=node.parent){nodes.push(node)}return nodes};var node_descendants=function(){var nodes=[];this.each(function(node){nodes.push(node)});return nodes};var node_leaves=function(){var leaves=[];this.eachBefore(function(node){if(!node.children){leaves.push(node)}});return leaves};var node_links=function(){var root=this,links=[];root.each(function(node){if(node!==root){links.push({source:node.parent,target:node})}});return links};function hierarchy(data,children){var root=new Node(data),valued=+data.value&&(root.value=data.value),node,nodes=[root],child,childs,i,n;if(children==null)children=defaultChildren;while(node=nodes.pop()){if(valued)node.value=+node.data.value;if((childs=children(node.data))&&(n=childs.length)){node.children=new Array(n);for(i=n-1;i>=0;--i){nodes.push(child=node.children[i]=new Node(childs[i]));child.parent=node;child.depth=node.depth+1}}}return root.eachBefore(computeHeight)}function node_copy(){return hierarchy(this).eachBefore(copyData)}function defaultChildren(d){return d.children}function copyData(node){node.data=node.data.data}function computeHeight(node){var height=0;do{node.height=height}while((node=node.parent)&&node.height<++height)}function Node(data){this.data=data;this.depth=this.height=0;this.parent=null}Node.prototype=hierarchy.prototype={constructor:Node,count:node_count,each:node_each,eachAfter:node_eachAfter,eachBefore:node_eachBefore,sum:node_sum,sort:node_sort,path:node_path,ancestors:node_ancestors,descendants:node_descendants,leaves:node_leaves,links:node_links,copy:node_copy};function Node$2(value){this._=value;this.next=null}var shuffle$1=function(array){var i,n=(array=array.slice()).length,head=null,node=head;while(n){var next=new Node$2(array[n-1]);if(node)node=node.next=next;else node=head=next;array[i]=array[--n]}return{head:head,tail:node}};var enclose=function(circles){return encloseN(shuffle$1(circles),[])};function encloses(a,b){var dx=b.x-a.x,dy=b.y-a.y,dr=a.r-b.r;return dr*dr+1e-6>dx*dx+dy*dy}function encloseN(L,B){var circle,l0=null,l1=L.head,l2,p1;switch(B.length){case 1:circle=enclose1(B[0]);break;case 2:circle=enclose2(B[0],B[1]);break;case 3:circle=enclose3(B[0],B[1],B[2]);break}while(l1){p1=l1._,l2=l1.next;if(!circle||!encloses(circle,p1)){if(l0)L.tail=l0,l0.next=null;else L.head=L.tail=null;B.push(p1);circle=encloseN(L,B);B.pop();if(L.head)l1.next=L.head,L.head=l1;else l1.next=null,L.head=L.tail=l1;l0=L.tail,l0.next=l2}else{l0=l1}l1=l2}L.tail=l0;return circle}function enclose1(a){return{x:a.x,y:a.y,r:a.r}}function enclose2(a,b){var x1=a.x,y1=a.y,r1=a.r,x2=b.x,y2=b.y,r2=b.r,x21=x2-x1,y21=y2-y1,r21=r2-r1,l=Math.sqrt(x21*x21+y21*y21);return{x:(x1+x2+x21/l*r21)/2,y:(y1+y2+y21/l*r21)/2,r:(l+r1+r2)/2}}function enclose3(a,b,c){var x1=a.x,y1=a.y,r1=a.r,x2=b.x,y2=b.y,r2=b.r,x3=c.x,y3=c.y,r3=c.r,a2=2*(x1-x2),b2=2*(y1-y2),c2=2*(r2-r1),d2=x1*x1+y1*y1-r1*r1-x2*x2-y2*y2+r2*r2,a3=2*(x1-x3),b3=2*(y1-y3),c3=2*(r3-r1),d3=x1*x1+y1*y1-r1*r1-x3*x3-y3*y3+r3*r3,ab=a3*b2-a2*b3,xa=(b2*d3-b3*d2)/ab-x1,xb=(b3*c2-b2*c3)/ab,ya=(a3*d2-a2*d3)/ab-y1,yb=(a2*c3-a3*c2)/ab,A=xb*xb+yb*yb-1,B=2*(xa*xb+ya*yb+r1),C=xa*xa+ya*ya-r1*r1,r=(-B-Math.sqrt(B*B-4*A*C))/(2*A);return{x:xa+xb*r+x1,y:ya+yb*r+y1,r:r}}function place(a,b,c){var ax=a.x,ay=a.y,da=b.r+c.r,db=a.r+c.r,dx=b.x-ax,dy=b.y-ay,dc=dx*dx+dy*dy;if(dc){var x=.5+((db*=db)-(da*=da))/(2*dc),y=Math.sqrt(Math.max(0,2*da*(db+dc)-(db-=dc)*db-da*da))/(2*dc);c.x=ax+x*dx+y*dy;c.y=ay+x*dy-y*dx}else{c.x=ax+db;c.y=ay}}function intersects(a,b){var dx=b.x-a.x,dy=b.y-a.y,dr=a.r+b.r;return dr*dr-1e-6>dx*dx+dy*dy}function distance2(node,x,y){var a=node._,b=node.next._,ab=a.r+b.r,dx=(a.x*b.r+b.x*a.r)/ab-x,dy=(a.y*b.r+b.y*a.r)/ab-y;return dx*dx+dy*dy}function Node$1(circle){this._=circle;this.next=null;this.previous=null}function packEnclose(circles){if(!(n=circles.length))return 0;var a,b,c,n;a=circles[0],a.x=0,a.y=0;if(!(n>1))return a.r;b=circles[1],a.x=-b.r,b.x=a.r,b.y=0;if(!(n>2))return a.r+b.r;place(b,a,c=circles[2]);var aa=a.r*a.r,ba=b.r*b.r,ca=c.r*c.r,oa=aa+ba+ca,ox=aa*a.x+ba*b.x+ca*c.x,oy=aa*a.y+ba*b.y+ca*c.y,cx,cy,i,j,k,sj,sk;a=new Node$1(a),b=new Node$1(b),c=new Node$1(c);a.next=c.previous=b;b.next=a.previous=c;c.next=b.previous=a;pack:for(i=3;i<n;++i){place(a._,b._,c=circles[i]),c=new Node$1(c);j=b.next,k=a.previous,sj=b._.r,sk=a._.r;do{if(sj<=sk){if(intersects(j._,c._)){b=j,a.next=b,b.previous=a,--i;continue pack}sj+=j._.r,j=j.next}else{if(intersects(k._,c._)){a=k,a.next=b,b.previous=a,--i;continue pack}sk+=k._.r,k=k.previous}}while(j!==k.next);c.previous=a,c.next=b,a.next=b.previous=b=c;oa+=ca=c._.r*c._.r;ox+=ca*c._.x;oy+=ca*c._.y;aa=distance2(a,cx=ox/oa,cy=oy/oa);while((c=c.next)!==b){if((ca=distance2(c,cx,cy))<aa){a=c,aa=ca}}b=a.next}a=[b._],c=b;while((c=c.next)!==b)a.push(c._);c=enclose(a) ;for(i=0;i<n;++i)a=circles[i],a.x-=c.x,a.y-=c.y;return c.r}var siblings=function(circles){packEnclose(circles);return circles};function optional(f){return f==null?null:required(f)}function required(f){if(typeof f!=="function")throw new Error;return f}function constantZero(){return 0}var constant$8=function(x){return function(){return x}};function defaultRadius$1(d){return Math.sqrt(d.value)}var index$2=function(){var radius=null,dx=1,dy=1,padding=constantZero;function pack(root){root.x=dx/2,root.y=dy/2;if(radius){root.eachBefore(radiusLeaf(radius)).eachAfter(packChildren(padding,.5)).eachBefore(translateChild(1))}else{root.eachBefore(radiusLeaf(defaultRadius$1)).eachAfter(packChildren(constantZero,1)).eachAfter(packChildren(padding,root.r/Math.min(dx,dy))).eachBefore(translateChild(Math.min(dx,dy)/(2*root.r)))}return root}pack.radius=function(x){return arguments.length?(radius=optional(x),pack):radius};pack.size=function(x){return arguments.length?(dx=+x[0],dy=+x[1],pack):[dx,dy]};pack.padding=function(x){return arguments.length?(padding=typeof x==="function"?x:constant$8(+x),pack):padding};return pack};function radiusLeaf(radius){return function(node){if(!node.children){node.r=Math.max(0,+radius(node)||0)}}}function packChildren(padding,k){return function(node){if(children=node.children){var children,i,n=children.length,r=padding(node)*k||0,e;if(r)for(i=0;i<n;++i)children[i].r+=r;e=packEnclose(children);if(r)for(i=0;i<n;++i)children[i].r-=r;node.r=e+r}}}function translateChild(k){return function(node){var parent=node.parent;node.r*=k;if(parent){node.x=parent.x+k*node.x;node.y=parent.y+k*node.y}}}var roundNode=function(node){node.x0=Math.round(node.x0);node.y0=Math.round(node.y0);node.x1=Math.round(node.x1);node.y1=Math.round(node.y1)};var treemapDice=function(parent,x0,y0,x1,y1){var nodes=parent.children,node,i=-1,n=nodes.length,k=parent.value&&(x1-x0)/parent.value;while(++i<n){node=nodes[i],node.y0=y0,node.y1=y1;node.x0=x0,node.x1=x0+=node.value*k}};var partition=function(){var dx=1,dy=1,padding=0,round=false;function partition(root){var n=root.height+1;root.x0=root.y0=padding;root.x1=dx;root.y1=dy/n;root.eachBefore(positionNode(dy,n));if(round)root.eachBefore(roundNode);return root}function positionNode(dy,n){return function(node){if(node.children){treemapDice(node,node.x0,dy*(node.depth+1)/n,node.x1,dy*(node.depth+2)/n)}var x0=node.x0,y0=node.y0,x1=node.x1-padding,y1=node.y1-padding;if(x1<x0)x0=x1=(x0+x1)/2;if(y1<y0)y0=y1=(y0+y1)/2;node.x0=x0;node.y0=y0;node.x1=x1;node.y1=y1}}partition.round=function(x){return arguments.length?(round=!!x,partition):round};partition.size=function(x){return arguments.length?(dx=+x[0],dy=+x[1],partition):[dx,dy]};partition.padding=function(x){return arguments.length?(padding=+x,partition):padding};return partition};var keyPrefix$1="$";var preroot={depth:-1};var ambiguous={};function defaultId(d){return d.id}function defaultParentId(d){return d.parentId}var stratify=function(){var id=defaultId,parentId=defaultParentId;function stratify(data){var d,i,n=data.length,root,parent,node,nodes=new Array(n),nodeId,nodeKey,nodeByKey={};for(i=0;i<n;++i){d=data[i],node=nodes[i]=new Node(d);if((nodeId=id(d,i,data))!=null&&(nodeId+="")){nodeKey=keyPrefix$1+(node.id=nodeId);nodeByKey[nodeKey]=nodeKey in nodeByKey?ambiguous:node}}for(i=0;i<n;++i){node=nodes[i],nodeId=parentId(data[i],i,data);if(nodeId==null||!(nodeId+="")){if(root)throw new Error("multiple roots");root=node}else{parent=nodeByKey[keyPrefix$1+nodeId];if(!parent)throw new Error("missing: "+nodeId);if(parent===ambiguous)throw new Error("ambiguous: "+nodeId);if(parent.children)parent.children.push(node);else parent.children=[node];node.parent=parent}}if(!root)throw new Error("no root");root.parent=preroot;root.eachBefore(function(node){node.depth=node.parent.depth+1;--n}).eachBefore(computeHeight);root.parent=null;if(n>0)throw new Error("cycle");return root}stratify.id=function(x){return arguments.length?(id=required(x),stratify):id};stratify.parentId=function(x){return arguments.length?(parentId=required(x),stratify):parentId};return stratify};function defaultSeparation$1(a,b){return a.parent===b.parent?1:2}function nextLeft(v){var children=v.children;return children?children[0]:v.t}function nextRight(v){var children=v.children;return children?children[children.length-1]:v.t}function moveSubtree(wm,wp,shift){var change=shift/(wp.i-wm.i);wp.c-=change;wp.s+=shift;wm.c+=change;wp.z+=shift;wp.m+=shift}function executeShifts(v){var shift=0,change=0,children=v.children,i=children.length,w;while(--i>=0){w=children[i];w.z+=shift;w.m+=shift;shift+=w.s+(change+=w.c)}}function nextAncestor(vim,v,ancestor){return vim.a.parent===v.parent?vim.a:ancestor}function TreeNode(node,i){this._=node;this.parent=null;this.children=null;this.A=null;this.a=this;this.z=0;this.m=0;this.c=0;this.s=0;this.t=null;this.i=i}TreeNode.prototype=Object.create(Node.prototype);function treeRoot(root){var tree=new TreeNode(root,0),node,nodes=[tree],child,children,i,n;while(node=nodes.pop()){if(children=node._.children){node.children=new Array(n=children.length);for(i=n-1;i>=0;--i){nodes.push(child=node.children[i]=new TreeNode(children[i],i));child.parent=node}}}(tree.parent=new TreeNode(null,0)).children=[tree];return tree}var tree=function(){var separation=defaultSeparation$1,dx=1,dy=1,nodeSize=null;function tree(root){var t=treeRoot(root);t.eachAfter(firstWalk),t.parent.m=-t.z;t.eachBefore(secondWalk);if(nodeSize)root.eachBefore(sizeNode);else{var left=root,right=root,bottom=root;root.eachBefore(function(node){if(node.x<left.x)left=node;if(node.x>right.x)right=node;if(node.depth>bottom.depth)bottom=node});var s=left===right?1:separation(left,right)/2,tx=s-left.x,kx=dx/(right.x+s+tx),ky=dy/(bottom.depth||1);root.eachBefore(function(node){node.x=(node.x+tx)*kx;node.y=node.depth*ky})}return root}function firstWalk(v){var children=v.children,siblings=v.parent.children,w=v.i?siblings[v.i-1]:null;if(children){executeShifts(v);var midpoint=(children[0].z+children[children.length-1].z)/2;if(w){v.z=w.z+separation(v._,w._);v.m=v.z-midpoint}else{v.z=midpoint}}else if(w){v.z=w.z+separation(v._,w._)}v.parent.A=apportion(v,w,v.parent.A||siblings[0])}function secondWalk(v){v._.x=v.z+v.parent.m;v.m+=v.parent.m}function apportion(v,w,ancestor){if(w){var vip=v,vop=v,vim=w,vom=vip.parent.children[0],sip=vip.m,sop=vop.m,sim=vim.m,som=vom.m,shift;while(vim=nextRight(vim),vip=nextLeft(vip),vim&&vip){vom=nextLeft(vom);vop=nextRight(vop);vop.a=v;shift=vim.z+sim-vip.z-sip+separation(vim._,vip._);if(shift>0){moveSubtree(nextAncestor(vim,v,ancestor),v,shift);sip+=shift;sop+=shift}sim+=vim.m;sip+=vip.m;som+=vom.m;sop+=vop.m}if(vim&&!nextRight(vop)){vop.t=vim;vop.m+=sim-sop}if(vip&&!nextLeft(vom)){vom.t=vip;vom.m+=sip-som;ancestor=v}}return ancestor}function sizeNode(node){node.x*=dx;node.y=node.depth*dy}tree.separation=function(x){return arguments.length?(separation=x,tree):separation};tree.size=function(x){return arguments.length?(nodeSize=false,dx=+x[0],dy=+x[1],tree):nodeSize?null:[dx,dy]};tree.nodeSize=function(x){return arguments.length?(nodeSize=true,dx=+x[0],dy=+x[1],tree):nodeSize?[dx,dy]:null};return tree};var treemapSlice=function(parent,x0,y0,x1,y1){var nodes=parent.children,node,i=-1,n=nodes.length,k=parent.value&&(y1-y0)/parent.value;while(++i<n){node=nodes[i],node.x0=x0,node.x1=x1;node.y0=y0,node.y1=y0+=node.value*k}};var phi=(1+Math.sqrt(5))/2;function squarifyRatio(ratio,parent,x0,y0,x1,y1){var rows=[],nodes=parent.children,row,nodeValue,i0=0,i1=0,n=nodes.length,dx,dy,value=parent.value,sumValue,minValue,maxValue,newRatio,minRatio,alpha,beta;while(i0<n){dx=x1-x0,dy=y1-y0;do{sumValue=nodes[i1++].value}while(!sumValue&&i1<n);minValue=maxValue=sumValue;alpha=Math.max(dy/dx,dx/dy)/(value*ratio);beta=sumValue*sumValue*alpha;minRatio=Math.max(maxValue/beta,beta/minValue);for(;i1<n;++i1){sumValue+=nodeValue=nodes[i1].value;if(nodeValue<minValue)minValue=nodeValue;if(nodeValue>maxValue)maxValue=nodeValue;beta=sumValue*sumValue*alpha;newRatio=Math.max(maxValue/beta,beta/minValue);if(newRatio>minRatio){sumValue-=nodeValue;break}minRatio=newRatio}rows.push(row={value:sumValue,dice:dx<dy,children:nodes.slice(i0,i1)});if(row.dice)treemapDice(row,x0,y0,x1,value?y0+=dy*sumValue/value:y1);else treemapSlice(row,x0,y0,value?x0+=dx*sumValue/value:x1,y1);value-=sumValue,i0=i1}return rows}var squarify=function custom(ratio){function squarify(parent,x0,y0,x1,y1){squarifyRatio(ratio,parent,x0,y0,x1,y1)}squarify.ratio=function(x){return custom((x=+x)>1?x:1)};return squarify}(phi);var index$3=function(){var tile=squarify,round=false,dx=1,dy=1,paddingStack=[0],paddingInner=constantZero,paddingTop=constantZero,paddingRight=constantZero,paddingBottom=constantZero,paddingLeft=constantZero;function treemap(root){root.x0=root.y0=0;root.x1=dx;root.y1=dy;root.eachBefore(positionNode);paddingStack=[0];if(round)root.eachBefore(roundNode);return root}function positionNode(node){var p=paddingStack[node.depth],x0=node.x0+p,y0=node.y0+p,x1=node.x1-p,y1=node.y1-p;if(x1<x0)x0=x1=(x0+x1)/2;if(y1<y0)y0=y1=(y0+y1)/2;node.x0=x0;node.y0=y0;node.x1=x1;node.y1=y1;if(node.children){p=paddingStack[node.depth+1]=paddingInner(node)/2;x0+=paddingLeft(node)-p;y0+=paddingTop(node)-p;x1-=paddingRight(node)-p;y1-=paddingBottom(node)-p;if(x1<x0)x0=x1=(x0+x1)/2;if(y1<y0)y0=y1=(y0+y1)/2;tile(node,x0,y0,x1,y1)}}treemap.round=function(x){return arguments.length?(round=!!x,treemap):round};treemap.size=function(x){return arguments.length?(dx=+x[0],dy=+x[1],treemap):[dx,dy]};treemap.tile=function(x){return arguments.length?(tile=required(x),treemap):tile};treemap.padding=function(x){return arguments.length?treemap.paddingInner(x).paddingOuter(x):treemap.paddingInner()};treemap.paddingInner=function(x){return arguments.length?(paddingInner=typeof x==="function"?x:constant$8(+x),treemap):paddingInner};treemap.paddingOuter=function(x){return arguments.length?treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x):treemap.paddingTop()};treemap.paddingTop=function(x){return arguments.length?(paddingTop=typeof x==="function"?x:constant$8(+x),treemap):paddingTop};treemap.paddingRight=function(x){return arguments.length?(paddingRight=typeof x==="function"?x:constant$8(+x),treemap):paddingRight};treemap.paddingBottom=function(x){return arguments.length?(paddingBottom=typeof x==="function"?x:constant$8(+x),treemap):paddingBottom};treemap.paddingLeft=function(x){return arguments.length?(paddingLeft=typeof x==="function"?x:constant$8(+x),treemap):paddingLeft};return treemap};var binary=function(parent,x0,y0,x1,y1){var nodes=parent.children,i,n=nodes.length,sum,sums=new Array(n+1);for(sums[0]=sum=i=0;i<n;++i){sums[i+1]=sum+=nodes[i].value}partition(0,n,parent.value,x0,y0,x1,y1);function partition(i,j,value,x0,y0,x1,y1){if(i>=j-1){var node=nodes[i];node.x0=x0,node.y0=y0;node.x1=x1,node.y1=y1;return}var valueOffset=sums[i],valueTarget=value/2+valueOffset,k=i+1,hi=j-1;while(k<hi){var mid=k+hi>>>1;if(sums[mid]<valueTarget)k=mid+1;else hi=mid}if(valueTarget-sums[k-1]<sums[k]-valueTarget&&i+1<k)--k;var valueLeft=sums[k]-valueOffset,valueRight=value-valueLeft;if(x1-x0>y1-y0){var xk=(x0*valueRight+x1*valueLeft)/value;partition(i,k,valueLeft,x0,y0,xk,y1);partition(k,j,valueRight,xk,y0,x1,y1)}else{var yk=(y0*valueRight+y1*valueLeft)/value;partition(i,k,valueLeft,x0,y0,x1,yk);partition(k,j,valueRight,x0,yk,x1,y1)}}};var sliceDice=function(parent,x0,y0,x1,y1){(parent.depth&1?treemapSlice:treemapDice)(parent,x0,y0,x1,y1)};var resquarify=function custom(ratio){function resquarify(parent,x0,y0,x1,y1){if((rows=parent._squarify)&&rows.ratio===ratio){var rows,row,nodes,i,j=-1,n,m=rows.length,value=parent.value;while(++j<m){row=rows[j],nodes=row.children;for(i=row.value=0,n=nodes.length;i<n;++i)row.value+=nodes[i].value;if(row.dice)treemapDice(row,x0,y0,x1,y0+=(y1-y0)*row.value/value);else treemapSlice(row,x0,y0,x0+=(x1-x0)*row.value/value,y1);value-=row.value}}else{parent._squarify=rows=squarifyRatio(ratio,parent,x0,y0,x1,y1);rows.ratio=ratio}}resquarify.ratio=function(x){return custom((x=+x)>1?x:1)};return resquarify}(phi);var area$1=function(polygon){var i=-1,n=polygon.length,a,b=polygon[n-1],area=0;while(++i<n){a=b;b=polygon[i];area+=a[1]*b[0]-a[0]*b[1]}return area/2};var centroid$1=function(polygon){var i=-1,n=polygon.length,x=0,y=0,a,b=polygon[n-1],c,k=0;while(++i<n){a=b;b=polygon[i];k+=c=a[0]*b[1]-b[0]*a[1];x+=(a[0]+b[0])*c;y+=(a[1]+b[1])*c}return k*=3,[x/k,y/k]};var cross$1=function(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])};function lexicographicOrder(a,b){return a[0]-b[0]||a[1]-b[1]}function computeUpperHullIndexes(points){var n=points.length,indexes=[0,1],size=2;for(var i=2;i<n;++i){while(size>1&&cross$1(points[indexes[size-2]],points[indexes[size-1]],points[i])<=0)--size;indexes[size++]=i}return indexes.slice(0,size)}var hull=function(points){if((n=points.length)<3)return null;var i,n,sortedPoints=new Array(n),flippedPoints=new Array(n);for(i=0;i<n;++i)sortedPoints[i]=[+points[i][0],+points[i][1],i];sortedPoints.sort(lexicographicOrder);for(i=0;i<n;++i)flippedPoints[i]=[sortedPoints[i][0],-sortedPoints[i][1]];var upperIndexes=computeUpperHullIndexes(sortedPoints),lowerIndexes=computeUpperHullIndexes(flippedPoints);var skipLeft=lowerIndexes[0]===upperIndexes[0],skipRight=lowerIndexes[lowerIndexes.length-1]===upperIndexes[upperIndexes.length-1],hull=[];for(i=upperIndexes.length-1;i>=0;--i)hull.push(points[sortedPoints[upperIndexes[i]][2]]);for(i=+skipLeft;i<lowerIndexes.length-skipRight;++i)hull.push(points[sortedPoints[lowerIndexes[i]][2]]);return hull};var contains$1=function(polygon,point){var n=polygon.length,p=polygon[n-1],x=point[0],y=point[1],x0=p[0],y0=p[1],x1,y1,inside=false;for(var i=0;i<n;++i){p=polygon[i],x1=p[0],y1=p[1];if(y1>y!==y0>y&&x<(x0-x1)*(y-y1)/(y0-y1)+x1)inside=!inside;x0=x1,y0=y1}return inside};var length$2=function(polygon){var i=-1,n=polygon.length,b=polygon[n-1],xa,ya,xb=b[0],yb=b[1],perimeter=0;while(++i<n){xa=xb;ya=yb;b=polygon[i];xb=b[0];yb=b[1];xa-=xb;ya-=yb;perimeter+=Math.sqrt(xa*xa+ya*ya)}return perimeter};var slice$3=[].slice;var noabort={};function Queue(size){if(!(size>=1))throw new Error;this._size=size;this._call=this._error=null;this._tasks=[];this._data=[];this._waiting=this._active=this._ended=this._start=0}Queue.prototype=queue.prototype={constructor:Queue,defer:function(callback){if(typeof callback!=="function"||this._call)throw new Error;if(this._error!=null)return this;var t=slice$3.call(arguments,1);t.push(callback);++this._waiting,this._tasks.push(t);poke$1(this);return this},abort:function(){if(this._error==null)abort(this,new Error("abort"));return this},await:function(callback){if(typeof callback!=="function"||this._call)throw new Error;this._call=function(error,results){callback.apply(null,[error].concat(results))};maybeNotify(this);return this},awaitAll:function(callback){if(typeof callback!=="function"||this._call)throw new Error;this._call=callback;maybeNotify(this);return this}};function poke$1(q){if(!q._start){try{start$1(q)}catch(e){if(q._tasks[q._ended+q._active-1])abort(q,e);else if(!q._data)throw e}}}function start$1(q){while(q._start=q._waiting&&q._active<q._size){var i=q._ended+q._active,t=q._tasks[i],j=t.length-1,c=t[j];t[j]=end(q,i);--q._waiting,++q._active;t=c.apply(null,t);if(!q._tasks[i])continue;q._tasks[i]=t||noabort}}function end(q,i){return function(e,r){if(!q._tasks[i])return;--q._active,++q._ended;q._tasks[i]=null;if(q._error!=null)return;if(e!=null){abort(q,e)}else{q._data[i]=r;if(q._waiting)poke$1(q);else maybeNotify(q)}}}function abort(q,e){var i=q._tasks.length,t;q._error=e;q._data=undefined;q._waiting=NaN;while(--i>=0){if(t=q._tasks[i]){q._tasks[i]=null;if(t.abort){try{t.abort()}catch(e){}}}}q._active=NaN;maybeNotify(q)}function maybeNotify(q){if(!q._active&&q._call){var d=q._data;q._data=undefined;q._call(q._error,d)}}function queue(concurrency){return new Queue(arguments.length?+concurrency:Infinity)}var uniform=function(min,max){min=min==null?0:+min;max=max==null?1:+max;if(arguments.length===1)max=min,min=0;else max-=min;return function(){return Math.random()*max+min}};var normal=function(mu,sigma){var x,r;mu=mu==null?0:+mu;sigma=sigma==null?1:+sigma;return function(){var y;if(x!=null)y=x,x=null;else do{x=Math.random()*2-1;y=Math.random()*2-1;r=x*x+y*y}while(!r||r>1);return mu+sigma*y*Math.sqrt(-2*Math.log(r)/r)}};var logNormal=function(){var randomNormal=normal.apply(this,arguments);return function(){return Math.exp(randomNormal())}};var irwinHall=function(n){return function(){for(var sum=0,i=0;i<n;++i)sum+=Math.random();return sum}};var bates=function(n){var randomIrwinHall=irwinHall(n);return function(){return randomIrwinHall()/n}};var exponential$1=function(lambda){return function(){return-Math.log(1-Math.random())/lambda}};var request=function(url,callback){var request,event=dispatch("beforesend","progress","load","error"),mimeType,headers=map$1(),xhr=new XMLHttpRequest,user=null,password=null,response,responseType,timeout=0;if(typeof XDomainRequest!=="undefined"&&!("withCredentials"in xhr)&&/^(http(s)?:)?\/\//.test(url))xhr=new XDomainRequest;"onload"in xhr?xhr.onload=xhr.onerror=xhr.ontimeout=respond:xhr.onreadystatechange=function(o){xhr.readyState>3&&respond(o)};function respond(o){var status=xhr.status,result;if(!status&&hasResponse(xhr)||status>=200&&status<300||status===304){if(response){try{result=response.call(request,xhr)}catch(e){event.call("error",request,e);return}}else{result=xhr}event.call("load",request,result)}else{event.call("error",request,o)}}xhr.onprogress=function(e){event.call("progress",request,e)};request={header:function(name,value){name=(name+"").toLowerCase();if(arguments.length<2)return headers.get(name);if(value==null)headers.remove(name);else headers.set(name,value+"");return request},mimeType:function(value){if(!arguments.length)return mimeType;mimeType=value==null?null:value+"";return request},responseType:function(value){if(!arguments.length)return responseType;responseType=value;return request},timeout:function(value){if(!arguments.length)return timeout;timeout=+value;return request},user:function(value){return arguments.length<1?user:(user=value==null?null:value+"",request)},password:function(value){return arguments.length<1?password:(password=value==null?null:value+"",request)},response:function(value){response=value;return request},get:function(data,callback){return request.send("GET",data,callback)},post:function(data,callback){return request.send("POST",data,callback)},send:function(method,data,callback){xhr.open(method,url,true,user,password);if(mimeType!=null&&!headers.has("accept"))headers.set("accept",mimeType+",*/*");if(xhr.setRequestHeader)headers.each(function(value,name){xhr.setRequestHeader(name,value)});if(mimeType!=null&&xhr.overrideMimeType)xhr.overrideMimeType(mimeType);if(responseType!=null)xhr.responseType=responseType;if(timeout>0)xhr.timeout=timeout;if(callback==null&&typeof data==="function")callback=data,data=null;if(callback!=null&&callback.length===1)callback=fixCallback(callback);if(callback!=null)request.on("error",callback).on("load",function(xhr){callback(null,xhr)});event.call("beforesend",request,xhr);xhr.send(data==null?null:data);return request},abort:function(){xhr.abort();return request},on:function(){var value=event.on.apply(event,arguments);return value===event?request:value}};if(callback!=null){if(typeof callback!=="function")throw new Error("invalid callback: "+callback);return request.get(callback)}return request};function fixCallback(callback){return function(error,xhr){callback(error==null?xhr:null)}}function hasResponse(xhr){var type=xhr.responseType;return type&&type!=="text"?xhr.response:xhr.responseText}var type$1=function(defaultMimeType,response){return function(url,callback){var r=request(url).mimeType(defaultMimeType).response(response);if(callback!=null){if(typeof callback!=="function")throw new Error("invalid callback: "+callback);return r.get(callback)}return r}};var html=type$1("text/html",function(xhr){return document.createRange().createContextualFragment(xhr.responseText)});var json=type$1("application/json",function(xhr){return JSON.parse(xhr.responseText)});var text=type$1("text/plain",function(xhr){return xhr.responseText});var xml=type$1("application/xml",function(xhr){var xml=xhr.responseXML;if(!xml)throw new Error("parse error");return xml});var dsv$1=function(defaultMimeType,parse){return function(url,row,callback){if(arguments.length<3)callback=row,row=null;var r=request(url).mimeType(defaultMimeType);r.row=function(_){return arguments.length?r.response(responseOf(parse,row=_)):row};r.row(row);return callback?r.get(callback):r}};function responseOf(parse,row){return function(request$$1){return parse(request$$1.responseText,row)}}var csv$1=dsv$1("text/csv",csvParse);var tsv$1=dsv$1("text/tab-separated-values",tsvParse);var array$2=Array.prototype;var map$3=array$2.map;var slice$4=array$2.slice;var implicit={name:"implicit"};function ordinal(range){var index=map$1(),domain=[],unknown=implicit;range=range==null?[]:slice$4.call(range);function scale(d){var key=d+"",i=index.get(key);if(!i){if(unknown!==implicit)return unknown;index.set(key,i=domain.push(d))}return range[(i-1)%range.length]}scale.domain=function(_){if(!arguments.length)return domain.slice();domain=[],index=map$1();var i=-1,n=_.length,d,key;while(++i<n)if(!index.has(key=(d=_[i])+""))index.set(key,domain.push(d));return scale};scale.range=function(_){return arguments.length?(range=slice$4.call(_),scale):range.slice()};scale.unknown=function(_){return arguments.length?(unknown=_,scale):unknown};scale.copy=function(){return ordinal().domain(domain).range(range).unknown(unknown)};return scale}function band(){var scale=ordinal().unknown(undefined),domain=scale.domain,ordinalRange=scale.range,range$$1=[0,1],step,bandwidth,round=false,paddingInner=0,paddingOuter=0,align=.5;delete scale.unknown;function rescale(){var n=domain().length,reverse=range$$1[1]<range$$1[0],start=range$$1[reverse-0],stop=range$$1[1-reverse];step=(stop-start)/Math.max(1,n-paddingInner+paddingOuter*2);if(round)step=Math.floor(step);start+=(stop-start-step*(n-paddingInner))*align;bandwidth=step*(1-paddingInner);if(round)start=Math.round(start),bandwidth=Math.round(bandwidth);var values=sequence(n).map(function(i){return start+step*i});return ordinalRange(reverse?values.reverse():values)}scale.domain=function(_){return arguments.length?(domain(_),rescale()):domain()};scale.range=function(_){return arguments.length?(range$$1=[+_[0],+_[1]],rescale()):range$$1.slice()};scale.rangeRound=function(_){return range$$1=[+_[0],+_[1]],round=true,rescale()};scale.bandwidth=function(){return bandwidth};scale.step=function(){return step};scale.round=function(_){return arguments.length?(round=!!_,rescale()):round};scale.padding=function(_){return arguments.length?(paddingInner=paddingOuter=Math.max(0,Math.min(1,_)),rescale()):paddingInner};scale.paddingInner=function(_){return arguments.length?(paddingInner=Math.max(0,Math.min(1,_)),rescale()):paddingInner};scale.paddingOuter=function(_){return arguments.length?(paddingOuter=Math.max(0,Math.min(1,_)),rescale()):paddingOuter};scale.align=function(_){return arguments.length?(align=Math.max(0,Math.min(1,_)),rescale()):align};scale.copy=function(){return band().domain(domain()).range(range$$1).round(round).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align)};return rescale()}function pointish(scale){var copy=scale.copy;scale.padding=scale.paddingOuter;delete scale.paddingInner;delete scale.paddingOuter;scale.copy=function(){return pointish(copy())};return scale}function point$1(){return pointish(band().paddingInner(1))}var constant$9=function(x){return function(){return x}};var number$1=function(x){return+x};var unit=[0,1];function deinterpolateLinear(a,b){return(b-=a=+a)?function(x){return(x-a)/b}:constant$9(b)}function deinterpolateClamp(deinterpolate){return function(a,b){var d=deinterpolate(a=+a,b=+b);return function(x){return x<=a?0:x>=b?1:d(x)}}}function reinterpolateClamp(reinterpolate){return function(a,b){var r=reinterpolate(a=+a,b=+b);return function(t){return t<=0?a:t>=1?b:r(t)}}}function bimap(domain,range$$1,deinterpolate,reinterpolate){var d0=domain[0],d1=domain[1],r0=range$$1[0],r1=range$$1[1];if(d1<d0)d0=deinterpolate(d1,d0),r0=reinterpolate(r1,r0);else d0=deinterpolate(d0,d1),r0=reinterpolate(r0,r1);return function(x){return r0(d0(x))}}function polymap(domain,range$$1,deinterpolate,reinterpolate){var j=Math.min(domain.length,range$$1.length)-1,d=new Array(j),r=new Array(j),i=-1;if(domain[j]<domain[0]){domain=domain.slice().reverse();range$$1=range$$1.slice().reverse()}while(++i<j){d[i]=deinterpolate(domain[i],domain[i+1]);r[i]=reinterpolate(range$$1[i],range$$1[i+1])}return function(x){var i=bisectRight(domain,x,1,j)-1;return r[i](d[i](x))}}function copy(source,target){return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp())}function continuous(deinterpolate,reinterpolate){var domain=unit,range$$1=unit,interpolate$$1=interpolateValue,clamp=false,piecewise,output,input;function rescale(){piecewise=Math.min(domain.length,range$$1.length)>2?polymap:bimap;output=input=null;return scale}function scale(x){return(output||(output=piecewise(domain,range$$1,clamp?deinterpolateClamp(deinterpolate):deinterpolate,interpolate$$1)))(+x)}scale.invert=function(y){return(input||(input=piecewise(range$$1,domain,deinterpolateLinear,clamp?reinterpolateClamp(reinterpolate):reinterpolate)))(+y)};scale.domain=function(_){return arguments.length?(domain=map$3.call(_,number$1),rescale()):domain.slice()};scale.range=function(_){return arguments.length?(range$$1=slice$4.call(_),rescale()):range$$1.slice()};scale.rangeRound=function(_){return range$$1=slice$4.call(_),interpolate$$1=interpolateRound,rescale()};scale.clamp=function(_){return arguments.length?(clamp=!!_,rescale()):clamp};scale.interpolate=function(_){return arguments.length?(interpolate$$1=_,rescale()):interpolate$$1};return rescale()}var tickFormat=function(domain,count,specifier){var start=domain[0],stop=domain[domain.length-1],step=tickStep(start,stop,count==null?10:count),precision;specifier=formatSpecifier(specifier==null?",f":specifier);switch(specifier.type){case"s":{var value=Math.max(Math.abs(start),Math.abs(stop));if(specifier.precision==null&&!isNaN(precision=precisionPrefix(step,value)))specifier.precision=precision;return exports.formatPrefix(specifier,value)}case"":case"e":case"g":case"p":case"r":{if(specifier.precision==null&&!isNaN(precision=precisionRound(step,Math.max(Math.abs(start),Math.abs(stop)))))specifier.precision=precision-(specifier.type==="e");break}case"f":case"%":{if(specifier.precision==null&&!isNaN(precision=precisionFixed(step)))specifier.precision=precision-(specifier.type==="%")*2;break}}return exports.format(specifier)};function linearish(scale){var domain=scale.domain;scale.ticks=function(count){var d=domain();return ticks(d[0],d[d.length-1],count==null?10:count)};scale.tickFormat=function(count,specifier){return tickFormat(domain(),count,specifier)};scale.nice=function(count){var d=domain(),i=d.length-1,n=count==null?10:count,start=d[0],stop=d[i],step=tickStep(start,stop,n);if(step){step=tickStep(Math.floor(start/step)*step,Math.ceil(stop/step)*step,n);d[0]=Math.floor(start/step)*step;d[i]=Math.ceil(stop/step)*step;domain(d)}return scale};return scale}function linear$2(){var scale=continuous(deinterpolateLinear,reinterpolate);scale.copy=function(){return copy(scale,linear$2())};return linearish(scale)}function identity$6(){var domain=[0,1];function scale(x){return+x}scale.invert=scale;scale.domain=scale.range=function(_){return arguments.length?(domain=map$3.call(_,number$1),scale):domain.slice()};scale.copy=function(){return identity$6().domain(domain)};return linearish(scale)}var nice=function(domain,interval){domain=domain.slice();var i0=0,i1=domain.length-1,x0=domain[i0],x1=domain[i1],t;if(x1<x0){t=i0,i0=i1,i1=t;t=x0,x0=x1,x1=t}domain[i0]=interval.floor(x0);domain[i1]=interval.ceil(x1);return domain};function deinterpolate(a,b){return(b=Math.log(b/a))?function(x){return Math.log(x/a)/b}:constant$9(b)}function reinterpolate$1(a,b){return a<0?function(t){return-Math.pow(-b,t)*Math.pow(-a,1-t)}:function(t){return Math.pow(b,t)*Math.pow(a,1-t)}}function pow10(x){return isFinite(x)?+("1e"+x):x<0?0:x}function powp(base){return base===10?pow10:base===Math.E?Math.exp:function(x){return Math.pow(base,x)}}function logp(base){return base===Math.E?Math.log:base===10&&Math.log10||base===2&&Math.log2||(base=Math.log(base),function(x){return Math.log(x)/base})}function reflect(f){return function(x){return-f(-x)}}function log$1(){var scale=continuous(deinterpolate,reinterpolate$1).domain([1,10]),domain=scale.domain,base=10,logs=logp(10),pows=powp(10);function rescale(){logs=logp(base),pows=powp(base);if(domain()[0]<0)logs=reflect(logs),pows=reflect(pows);return scale}scale.base=function(_){return arguments.length?(base=+_,rescale()):base};scale.domain=function(_){return arguments.length?(domain(_),rescale()):domain()};scale.ticks=function(count){var d=domain(),u=d[0],v=d[d.length-1],r;if(r=v<u)i=u,u=v,v=i;var i=logs(u),j=logs(v),p,k,t,n=count==null?10:+count,z=[];if(!(base%1)&&j-i<n){i=Math.round(i)-1,j=Math.round(j)+1;if(u>0)for(;i<j;++i){for(k=1,p=pows(i);k<base;++k){t=p*k;if(t<u)continue;if(t>v)break;z.push(t)}}else for(;i<j;++i){for(k=base-1,p=pows(i);k>=1;--k){t=p*k;if(t<u)continue;if(t>v)break;z.push(t)}}}else{z=ticks(i,j,Math.min(j-i,n)).map(pows)}return r?z.reverse():z};scale.tickFormat=function(count,specifier){if(specifier==null)specifier=base===10?".0e":",";if(typeof specifier!=="function")specifier=exports.format(specifier);if(count===Infinity)return specifier;if(count==null)count=10;var k=Math.max(1,base*count/scale.ticks().length);return function(d){var i=d/pows(Math.round(logs(d)));if(i*base<base-.5)i*=base;return i<=k?specifier(d):""}};scale.nice=function(){return domain(nice(domain(),{floor:function(x){return pows(Math.floor(logs(x)))},ceil:function(x){return pows(Math.ceil(logs(x)))}}))};scale.copy=function(){return copy(scale,log$1().base(base))};return scale}function raise$1(x,exponent){return x<0?-Math.pow(-x,exponent):Math.pow(x,exponent)}function pow$1(){var exponent=1,scale=continuous(deinterpolate,reinterpolate),domain=scale.domain;function deinterpolate(a,b){return(b=raise$1(b,exponent)-(a=raise$1(a,exponent)))?function(x){return(raise$1(x,exponent)-a)/b}:constant$9(b)}function reinterpolate(a,b){b=raise$1(b,exponent)-(a=raise$1(a,exponent));return function(t){return raise$1(a+b*t,1/exponent)}}scale.exponent=function(_){return arguments.length?(exponent=+_,domain(domain())):exponent};scale.copy=function(){return copy(scale,pow$1().exponent(exponent))};return linearish(scale)}function sqrt$1(){return pow$1().exponent(.5)}function quantile$$1(){var domain=[],range$$1=[],thresholds=[];function rescale(){var i=0,n=Math.max(1,range$$1.length);thresholds=new Array(n-1);while(++i<n)thresholds[i-1]=threshold(domain,i/n);return scale}function scale(x){if(!isNaN(x=+x))return range$$1[bisectRight(thresholds,x)]}scale.invertExtent=function(y){var i=range$$1.indexOf(y);return i<0?[NaN,NaN]:[i>0?thresholds[i-1]:domain[0],i<thresholds.length?thresholds[i]:domain[domain.length-1]]};scale.domain=function(_){if(!arguments.length)return domain.slice();domain=[];for(var i=0,n=_.length,d;i<n;++i)if(d=_[i],d!=null&&!isNaN(d=+d))domain.push(d);domain.sort(ascending);return rescale()};scale.range=function(_){return arguments.length?(range$$1=slice$4.call(_),rescale()):range$$1.slice()};scale.quantiles=function(){return thresholds.slice()};scale.copy=function(){return quantile$$1().domain(domain).range(range$$1)};return scale}function quantize$1(){var x0=0,x1=1,n=1,domain=[.5],range$$1=[0,1];function scale(x){if(x<=x)return range$$1[bisectRight(domain,x,0,n)]}function rescale(){var i=-1;domain=new Array(n) ;while(++i<n)domain[i]=((i+1)*x1-(i-n)*x0)/(n+1);return scale}scale.domain=function(_){return arguments.length?(x0=+_[0],x1=+_[1],rescale()):[x0,x1]};scale.range=function(_){return arguments.length?(n=(range$$1=slice$4.call(_)).length-1,rescale()):range$$1.slice()};scale.invertExtent=function(y){var i=range$$1.indexOf(y);return i<0?[NaN,NaN]:i<1?[x0,domain[0]]:i>=n?[domain[n-1],x1]:[domain[i-1],domain[i]]};scale.copy=function(){return quantize$1().domain([x0,x1]).range(range$$1)};return linearish(scale)}function threshold$1(){var domain=[.5],range$$1=[0,1],n=1;function scale(x){if(x<=x)return range$$1[bisectRight(domain,x,0,n)]}scale.domain=function(_){return arguments.length?(domain=slice$4.call(_),n=Math.min(domain.length,range$$1.length-1),scale):domain.slice()};scale.range=function(_){return arguments.length?(range$$1=slice$4.call(_),n=Math.min(domain.length,range$$1.length-1),scale):range$$1.slice()};scale.invertExtent=function(y){var i=range$$1.indexOf(y);return[domain[i-1],domain[i]]};scale.copy=function(){return threshold$1().domain(domain).range(range$$1)};return scale}var t0$1=new Date;var t1$1=new Date;function newInterval(floori,offseti,count,field){function interval(date){return floori(date=new Date(+date)),date}interval.floor=interval;interval.ceil=function(date){return floori(date=new Date(date-1)),offseti(date,1),floori(date),date};interval.round=function(date){var d0=interval(date),d1=interval.ceil(date);return date-d0<d1-date?d0:d1};interval.offset=function(date,step){return offseti(date=new Date(+date),step==null?1:Math.floor(step)),date};interval.range=function(start,stop,step){var range=[];start=interval.ceil(start);step=step==null?1:Math.floor(step);if(!(start<stop)||!(step>0))return range;do{range.push(new Date(+start))}while(offseti(start,step),floori(start),start<stop);return range};interval.filter=function(test){return newInterval(function(date){if(date>=date)while(floori(date),!test(date))date.setTime(date-1)},function(date,step){if(date>=date)while(--step>=0)while(offseti(date,1),!test(date)){}})};if(count){interval.count=function(start,end){t0$1.setTime(+start),t1$1.setTime(+end);floori(t0$1),floori(t1$1);return Math.floor(count(t0$1,t1$1))};interval.every=function(step){step=Math.floor(step);return!isFinite(step)||!(step>0)?null:!(step>1)?interval:interval.filter(field?function(d){return field(d)%step===0}:function(d){return interval.count(0,d)%step===0})}}return interval}var millisecond=newInterval(function(){},function(date,step){date.setTime(+date+step)},function(start,end){return end-start});millisecond.every=function(k){k=Math.floor(k);if(!isFinite(k)||!(k>0))return null;if(!(k>1))return millisecond;return newInterval(function(date){date.setTime(Math.floor(date/k)*k)},function(date,step){date.setTime(+date+step*k)},function(start,end){return(end-start)/k})};var milliseconds=millisecond.range;var durationSecond$1=1e3;var durationMinute$1=6e4;var durationHour$1=36e5;var durationDay$1=864e5;var durationWeek$1=6048e5;var second=newInterval(function(date){date.setTime(Math.floor(date/durationSecond$1)*durationSecond$1)},function(date,step){date.setTime(+date+step*durationSecond$1)},function(start,end){return(end-start)/durationSecond$1},function(date){return date.getUTCSeconds()});var seconds=second.range;var minute=newInterval(function(date){date.setTime(Math.floor(date/durationMinute$1)*durationMinute$1)},function(date,step){date.setTime(+date+step*durationMinute$1)},function(start,end){return(end-start)/durationMinute$1},function(date){return date.getMinutes()});var minutes=minute.range;var hour=newInterval(function(date){var offset=date.getTimezoneOffset()*durationMinute$1%durationHour$1;if(offset<0)offset+=durationHour$1;date.setTime(Math.floor((+date-offset)/durationHour$1)*durationHour$1+offset)},function(date,step){date.setTime(+date+step*durationHour$1)},function(start,end){return(end-start)/durationHour$1},function(date){return date.getHours()});var hours=hour.range;var day=newInterval(function(date){date.setHours(0,0,0,0)},function(date,step){date.setDate(date.getDate()+step)},function(start,end){return(end-start-(end.getTimezoneOffset()-start.getTimezoneOffset())*durationMinute$1)/durationDay$1},function(date){return date.getDate()-1});var days=day.range;function weekday(i){return newInterval(function(date){date.setDate(date.getDate()-(date.getDay()+7-i)%7);date.setHours(0,0,0,0)},function(date,step){date.setDate(date.getDate()+step*7)},function(start,end){return(end-start-(end.getTimezoneOffset()-start.getTimezoneOffset())*durationMinute$1)/durationWeek$1})}var sunday=weekday(0);var monday=weekday(1);var tuesday=weekday(2);var wednesday=weekday(3);var thursday=weekday(4);var friday=weekday(5);var saturday=weekday(6);var sundays=sunday.range;var mondays=monday.range;var tuesdays=tuesday.range;var wednesdays=wednesday.range;var thursdays=thursday.range;var fridays=friday.range;var saturdays=saturday.range;var month=newInterval(function(date){date.setDate(1);date.setHours(0,0,0,0)},function(date,step){date.setMonth(date.getMonth()+step)},function(start,end){return end.getMonth()-start.getMonth()+(end.getFullYear()-start.getFullYear())*12},function(date){return date.getMonth()});var months=month.range;var year=newInterval(function(date){date.setMonth(0,1);date.setHours(0,0,0,0)},function(date,step){date.setFullYear(date.getFullYear()+step)},function(start,end){return end.getFullYear()-start.getFullYear()},function(date){return date.getFullYear()});year.every=function(k){return!isFinite(k=Math.floor(k))||!(k>0)?null:newInterval(function(date){date.setFullYear(Math.floor(date.getFullYear()/k)*k);date.setMonth(0,1);date.setHours(0,0,0,0)},function(date,step){date.setFullYear(date.getFullYear()+step*k)})};var years=year.range;var utcMinute=newInterval(function(date){date.setUTCSeconds(0,0)},function(date,step){date.setTime(+date+step*durationMinute$1)},function(start,end){return(end-start)/durationMinute$1},function(date){return date.getUTCMinutes()});var utcMinutes=utcMinute.range;var utcHour=newInterval(function(date){date.setUTCMinutes(0,0,0)},function(date,step){date.setTime(+date+step*durationHour$1)},function(start,end){return(end-start)/durationHour$1},function(date){return date.getUTCHours()});var utcHours=utcHour.range;var utcDay=newInterval(function(date){date.setUTCHours(0,0,0,0)},function(date,step){date.setUTCDate(date.getUTCDate()+step)},function(start,end){return(end-start)/durationDay$1},function(date){return date.getUTCDate()-1});var utcDays=utcDay.range;function utcWeekday(i){return newInterval(function(date){date.setUTCDate(date.getUTCDate()-(date.getUTCDay()+7-i)%7);date.setUTCHours(0,0,0,0)},function(date,step){date.setUTCDate(date.getUTCDate()+step*7)},function(start,end){return(end-start)/durationWeek$1})}var utcSunday=utcWeekday(0);var utcMonday=utcWeekday(1);var utcTuesday=utcWeekday(2);var utcWednesday=utcWeekday(3);var utcThursday=utcWeekday(4);var utcFriday=utcWeekday(5);var utcSaturday=utcWeekday(6);var utcSundays=utcSunday.range;var utcMondays=utcMonday.range;var utcTuesdays=utcTuesday.range;var utcWednesdays=utcWednesday.range;var utcThursdays=utcThursday.range;var utcFridays=utcFriday.range;var utcSaturdays=utcSaturday.range;var utcMonth=newInterval(function(date){date.setUTCDate(1);date.setUTCHours(0,0,0,0)},function(date,step){date.setUTCMonth(date.getUTCMonth()+step)},function(start,end){return end.getUTCMonth()-start.getUTCMonth()+(end.getUTCFullYear()-start.getUTCFullYear())*12},function(date){return date.getUTCMonth()});var utcMonths=utcMonth.range;var utcYear=newInterval(function(date){date.setUTCMonth(0,1);date.setUTCHours(0,0,0,0)},function(date,step){date.setUTCFullYear(date.getUTCFullYear()+step)},function(start,end){return end.getUTCFullYear()-start.getUTCFullYear()},function(date){return date.getUTCFullYear()});utcYear.every=function(k){return!isFinite(k=Math.floor(k))||!(k>0)?null:newInterval(function(date){date.setUTCFullYear(Math.floor(date.getUTCFullYear()/k)*k);date.setUTCMonth(0,1);date.setUTCHours(0,0,0,0)},function(date,step){date.setUTCFullYear(date.getUTCFullYear()+step*k)})};var utcYears=utcYear.range;function localDate(d){if(0<=d.y&&d.y<100){var date=new Date(-1,d.m,d.d,d.H,d.M,d.S,d.L);date.setFullYear(d.y);return date}return new Date(d.y,d.m,d.d,d.H,d.M,d.S,d.L)}function utcDate(d){if(0<=d.y&&d.y<100){var date=new Date(Date.UTC(-1,d.m,d.d,d.H,d.M,d.S,d.L));date.setUTCFullYear(d.y);return date}return new Date(Date.UTC(d.y,d.m,d.d,d.H,d.M,d.S,d.L))}function newYear(y){return{y:y,m:0,d:1,H:0,M:0,S:0,L:0}}function formatLocale$1(locale){var locale_dateTime=locale.dateTime,locale_date=locale.date,locale_time=locale.time,locale_periods=locale.periods,locale_weekdays=locale.days,locale_shortWeekdays=locale.shortDays,locale_months=locale.months,locale_shortMonths=locale.shortMonths;var periodRe=formatRe(locale_periods),periodLookup=formatLookup(locale_periods),weekdayRe=formatRe(locale_weekdays),weekdayLookup=formatLookup(locale_weekdays),shortWeekdayRe=formatRe(locale_shortWeekdays),shortWeekdayLookup=formatLookup(locale_shortWeekdays),monthRe=formatRe(locale_months),monthLookup=formatLookup(locale_months),shortMonthRe=formatRe(locale_shortMonths),shortMonthLookup=formatLookup(locale_shortMonths);var formats={a:formatShortWeekday,A:formatWeekday,b:formatShortMonth,B:formatMonth,c:null,d:formatDayOfMonth,e:formatDayOfMonth,H:formatHour24,I:formatHour12,j:formatDayOfYear,L:formatMilliseconds,m:formatMonthNumber,M:formatMinutes,p:formatPeriod,S:formatSeconds,U:formatWeekNumberSunday,w:formatWeekdayNumber,W:formatWeekNumberMonday,x:null,X:null,y:formatYear,Y:formatFullYear,Z:formatZone,"%":formatLiteralPercent};var utcFormats={a:formatUTCShortWeekday,A:formatUTCWeekday,b:formatUTCShortMonth,B:formatUTCMonth,c:null,d:formatUTCDayOfMonth,e:formatUTCDayOfMonth,H:formatUTCHour24,I:formatUTCHour12,j:formatUTCDayOfYear,L:formatUTCMilliseconds,m:formatUTCMonthNumber,M:formatUTCMinutes,p:formatUTCPeriod,S:formatUTCSeconds,U:formatUTCWeekNumberSunday,w:formatUTCWeekdayNumber,W:formatUTCWeekNumberMonday,x:null,X:null,y:formatUTCYear,Y:formatUTCFullYear,Z:formatUTCZone,"%":formatLiteralPercent};var parses={a:parseShortWeekday,A:parseWeekday,b:parseShortMonth,B:parseMonth,c:parseLocaleDateTime,d:parseDayOfMonth,e:parseDayOfMonth,H:parseHour24,I:parseHour24,j:parseDayOfYear,L:parseMilliseconds,m:parseMonthNumber,M:parseMinutes,p:parsePeriod,S:parseSeconds,U:parseWeekNumberSunday,w:parseWeekdayNumber,W:parseWeekNumberMonday,x:parseLocaleDate,X:parseLocaleTime,y:parseYear,Y:parseFullYear,Z:parseZone,"%":parseLiteralPercent};formats.x=newFormat(locale_date,formats);formats.X=newFormat(locale_time,formats);formats.c=newFormat(locale_dateTime,formats);utcFormats.x=newFormat(locale_date,utcFormats);utcFormats.X=newFormat(locale_time,utcFormats);utcFormats.c=newFormat(locale_dateTime,utcFormats);function newFormat(specifier,formats){return function(date){var string=[],i=-1,j=0,n=specifier.length,c,pad,format;if(!(date instanceof Date))date=new Date(+date);while(++i<n){if(specifier.charCodeAt(i)===37){string.push(specifier.slice(j,i));if((pad=pads[c=specifier.charAt(++i)])!=null)c=specifier.charAt(++i);else pad=c==="e"?" ":"0";if(format=formats[c])c=format(date,pad);string.push(c);j=i+1}}string.push(specifier.slice(j,i));return string.join("")}}function newParse(specifier,newDate){return function(string){var d=newYear(1900),i=parseSpecifier(d,specifier,string+="",0);if(i!=string.length)return null;if("p"in d)d.H=d.H%12+d.p*12;if("W"in d||"U"in d){if(!("w"in d))d.w="W"in d?1:0;var day$$1="Z"in d?utcDate(newYear(d.y)).getUTCDay():newDate(newYear(d.y)).getDay();d.m=0;d.d="W"in d?(d.w+6)%7+d.W*7-(day$$1+5)%7:d.w+d.U*7-(day$$1+6)%7}if("Z"in d){d.H+=d.Z/100|0;d.M+=d.Z%100;return utcDate(d)}return newDate(d)}}function parseSpecifier(d,specifier,string,j){var i=0,n=specifier.length,m=string.length,c,parse;while(i<n){if(j>=m)return-1;c=specifier.charCodeAt(i++);if(c===37){c=specifier.charAt(i++);parse=parses[c in pads?specifier.charAt(i++):c];if(!parse||(j=parse(d,string,j))<0)return-1}else if(c!=string.charCodeAt(j++)){return-1}}return j}function parsePeriod(d,string,i){var n=periodRe.exec(string.slice(i));return n?(d.p=periodLookup[n[0].toLowerCase()],i+n[0].length):-1}function parseShortWeekday(d,string,i){var n=shortWeekdayRe.exec(string.slice(i));return n?(d.w=shortWeekdayLookup[n[0].toLowerCase()],i+n[0].length):-1}function parseWeekday(d,string,i){var n=weekdayRe.exec(string.slice(i));return n?(d.w=weekdayLookup[n[0].toLowerCase()],i+n[0].length):-1}function parseShortMonth(d,string,i){var n=shortMonthRe.exec(string.slice(i));return n?(d.m=shortMonthLookup[n[0].toLowerCase()],i+n[0].length):-1}function parseMonth(d,string,i){var n=monthRe.exec(string.slice(i));return n?(d.m=monthLookup[n[0].toLowerCase()],i+n[0].length):-1}function parseLocaleDateTime(d,string,i){return parseSpecifier(d,locale_dateTime,string,i)}function parseLocaleDate(d,string,i){return parseSpecifier(d,locale_date,string,i)}function parseLocaleTime(d,string,i){return parseSpecifier(d,locale_time,string,i)}function formatShortWeekday(d){return locale_shortWeekdays[d.getDay()]}function formatWeekday(d){return locale_weekdays[d.getDay()]}function formatShortMonth(d){return locale_shortMonths[d.getMonth()]}function formatMonth(d){return locale_months[d.getMonth()]}function formatPeriod(d){return locale_periods[+(d.getHours()>=12)]}function formatUTCShortWeekday(d){return locale_shortWeekdays[d.getUTCDay()]}function formatUTCWeekday(d){return locale_weekdays[d.getUTCDay()]}function formatUTCShortMonth(d){return locale_shortMonths[d.getUTCMonth()]}function formatUTCMonth(d){return locale_months[d.getUTCMonth()]}function formatUTCPeriod(d){return locale_periods[+(d.getUTCHours()>=12)]}return{format:function(specifier){var f=newFormat(specifier+="",formats);f.toString=function(){return specifier};return f},parse:function(specifier){var p=newParse(specifier+="",localDate);p.toString=function(){return specifier};return p},utcFormat:function(specifier){var f=newFormat(specifier+="",utcFormats);f.toString=function(){return specifier};return f},utcParse:function(specifier){var p=newParse(specifier,utcDate);p.toString=function(){return specifier};return p}}}var pads={"-":"",_:" ",0:"0"};var numberRe=/^\s*\d+/;var percentRe=/^%/;var requoteRe=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;function pad(value,fill,width){var sign=value<0?"-":"",string=(sign?-value:value)+"",length=string.length;return sign+(length<width?new Array(width-length+1).join(fill)+string:string)}function requote(s){return s.replace(requoteRe,"\\$&")}function formatRe(names){return new RegExp("^(?:"+names.map(requote).join("|")+")","i")}function formatLookup(names){var map={},i=-1,n=names.length;while(++i<n)map[names[i].toLowerCase()]=i;return map}function parseWeekdayNumber(d,string,i){var n=numberRe.exec(string.slice(i,i+1));return n?(d.w=+n[0],i+n[0].length):-1}function parseWeekNumberSunday(d,string,i){var n=numberRe.exec(string.slice(i));return n?(d.U=+n[0],i+n[0].length):-1}function parseWeekNumberMonday(d,string,i){var n=numberRe.exec(string.slice(i));return n?(d.W=+n[0],i+n[0].length):-1}function parseFullYear(d,string,i){var n=numberRe.exec(string.slice(i,i+4));return n?(d.y=+n[0],i+n[0].length):-1}function parseYear(d,string,i){var n=numberRe.exec(string.slice(i,i+2));return n?(d.y=+n[0]+(+n[0]>68?1900:2e3),i+n[0].length):-1}function parseZone(d,string,i){var n=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(string.slice(i,i+6));return n?(d.Z=n[1]?0:-(n[2]+(n[3]||"00")),i+n[0].length):-1}function parseMonthNumber(d,string,i){var n=numberRe.exec(string.slice(i,i+2));return n?(d.m=n[0]-1,i+n[0].length):-1}function parseDayOfMonth(d,string,i){var n=numberRe.exec(string.slice(i,i+2));return n?(d.d=+n[0],i+n[0].length):-1}function parseDayOfYear(d,string,i){var n=numberRe.exec(string.slice(i,i+3));return n?(d.m=0,d.d=+n[0],i+n[0].length):-1}function parseHour24(d,string,i){var n=numberRe.exec(string.slice(i,i+2));return n?(d.H=+n[0],i+n[0].length):-1}function parseMinutes(d,string,i){var n=numberRe.exec(string.slice(i,i+2));return n?(d.M=+n[0],i+n[0].length):-1}function parseSeconds(d,string,i){var n=numberRe.exec(string.slice(i,i+2));return n?(d.S=+n[0],i+n[0].length):-1}function parseMilliseconds(d,string,i){var n=numberRe.exec(string.slice(i,i+3));return n?(d.L=+n[0],i+n[0].length):-1}function parseLiteralPercent(d,string,i){var n=percentRe.exec(string.slice(i,i+1));return n?i+n[0].length:-1}function formatDayOfMonth(d,p){return pad(d.getDate(),p,2)}function formatHour24(d,p){return pad(d.getHours(),p,2)}function formatHour12(d,p){return pad(d.getHours()%12||12,p,2)}function formatDayOfYear(d,p){return pad(1+day.count(year(d),d),p,3)}function formatMilliseconds(d,p){return pad(d.getMilliseconds(),p,3)}function formatMonthNumber(d,p){return pad(d.getMonth()+1,p,2)}function formatMinutes(d,p){return pad(d.getMinutes(),p,2)}function formatSeconds(d,p){return pad(d.getSeconds(),p,2)}function formatWeekNumberSunday(d,p){return pad(sunday.count(year(d),d),p,2)}function formatWeekdayNumber(d){return d.getDay()}function formatWeekNumberMonday(d,p){return pad(monday.count(year(d),d),p,2)}function formatYear(d,p){return pad(d.getFullYear()%100,p,2)}function formatFullYear(d,p){return pad(d.getFullYear()%1e4,p,4)}function formatZone(d){var z=d.getTimezoneOffset();return(z>0?"-":(z*=-1,"+"))+pad(z/60|0,"0",2)+pad(z%60,"0",2)}function formatUTCDayOfMonth(d,p){return pad(d.getUTCDate(),p,2)}function formatUTCHour24(d,p){return pad(d.getUTCHours(),p,2)}function formatUTCHour12(d,p){return pad(d.getUTCHours()%12||12,p,2)}function formatUTCDayOfYear(d,p){return pad(1+utcDay.count(utcYear(d),d),p,3)}function formatUTCMilliseconds(d,p){return pad(d.getUTCMilliseconds(),p,3)}function formatUTCMonthNumber(d,p){return pad(d.getUTCMonth()+1,p,2)}function formatUTCMinutes(d,p){return pad(d.getUTCMinutes(),p,2)}function formatUTCSeconds(d,p){return pad(d.getUTCSeconds(),p,2)}function formatUTCWeekNumberSunday(d,p){return pad(utcSunday.count(utcYear(d),d),p,2)}function formatUTCWeekdayNumber(d){return d.getUTCDay()}function formatUTCWeekNumberMonday(d,p){return pad(utcMonday.count(utcYear(d),d),p,2)}function formatUTCYear(d,p){return pad(d.getUTCFullYear()%100,p,2)}function formatUTCFullYear(d,p){return pad(d.getUTCFullYear()%1e4,p,4)}function formatUTCZone(){return"+0000"}function formatLiteralPercent(){return"%"}var locale$2;defaultLocale$1({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function defaultLocale$1(definition){locale$2=formatLocale$1(definition);exports.timeFormat=locale$2.format;exports.timeParse=locale$2.parse;exports.utcFormat=locale$2.utcFormat;exports.utcParse=locale$2.utcParse;return locale$2}var isoSpecifier="%Y-%m-%dT%H:%M:%S.%LZ";function formatIsoNative(date){return date.toISOString()}var formatIso=Date.prototype.toISOString?formatIsoNative:exports.utcFormat(isoSpecifier);function parseIsoNative(string){var date=new Date(string);return isNaN(date)?null:date}var parseIso=+new Date("2000-01-01T00:00:00.000Z")?parseIsoNative:exports.utcParse(isoSpecifier);var durationSecond=1e3;var durationMinute=durationSecond*60;var durationHour=durationMinute*60;var durationDay=durationHour*24;var durationWeek=durationDay*7;var durationMonth=durationDay*30;var durationYear=durationDay*365;function date$1(t){return new Date(t)}function number$2(t){return t instanceof Date?+t:+new Date(+t)}function calendar(year$$1,month$$1,week,day$$1,hour$$1,minute$$1,second$$1,millisecond$$1,format){var scale=continuous(deinterpolateLinear,reinterpolate),invert=scale.invert,domain=scale.domain;var formatMillisecond=format(".%L"),formatSecond=format(":%S"),formatMinute=format("%I:%M"),formatHour=format("%I %p"),formatDay=format("%a %d"),formatWeek=format("%b %d"),formatMonth=format("%B"),formatYear=format("%Y");var tickIntervals=[[second$$1,1,durationSecond],[second$$1,5,5*durationSecond],[second$$1,15,15*durationSecond],[second$$1,30,30*durationSecond],[minute$$1,1,durationMinute],[minute$$1,5,5*durationMinute],[minute$$1,15,15*durationMinute],[minute$$1,30,30*durationMinute],[hour$$1,1,durationHour],[hour$$1,3,3*durationHour],[hour$$1,6,6*durationHour],[hour$$1,12,12*durationHour],[day$$1,1,durationDay],[day$$1,2,2*durationDay],[week,1,durationWeek],[month$$1,1,durationMonth],[month$$1,3,3*durationMonth],[year$$1,1,durationYear]];function tickFormat(date){return(second$$1(date)<date?formatMillisecond:minute$$1(date)<date?formatSecond:hour$$1(date)<date?formatMinute:day$$1(date)<date?formatHour:month$$1(date)<date?week(date)<date?formatDay:formatWeek:year$$1(date)<date?formatMonth:formatYear)(date)}function tickInterval(interval,start,stop,step){if(interval==null)interval=10;if(typeof interval==="number"){var target=Math.abs(stop-start)/interval,i=bisector(function(i){return i[2]}).right(tickIntervals,target);if(i===tickIntervals.length){step=tickStep(start/durationYear,stop/durationYear,interval);interval=year$$1}else if(i){i=tickIntervals[target/tickIntervals[i-1][2]<tickIntervals[i][2]/target?i-1:i];step=i[1];interval=i[0]}else{step=tickStep(start,stop,interval);interval=millisecond$$1}}return step==null?interval:interval.every(step)}scale.invert=function(y){return new Date(invert(y))};scale.domain=function(_){return arguments.length?domain(map$3.call(_,number$2)):domain().map(date$1)};scale.ticks=function(interval,step){var d=domain(),t0=d[0],t1=d[d.length-1],r=t1<t0,t;if(r)t=t0,t0=t1,t1=t;t=tickInterval(interval,t0,t1,step);t=t?t.range(t0,t1+1):[];return r?t.reverse():t};scale.tickFormat=function(count,specifier){return specifier==null?tickFormat:format(specifier)};scale.nice=function(interval,step){var d=domain();return(interval=tickInterval(interval,d[0],d[d.length-1],step))?domain(nice(d,interval)):scale};scale.copy=function(){return copy(scale,calendar(year$$1,month$$1,week,day$$1,hour$$1,minute$$1,second$$1,millisecond$$1,format))};return scale}var time=function(){return calendar(year,month,sunday,day,hour,minute,second,millisecond,exports.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])};var utcTime=function(){return calendar(utcYear,utcMonth,utcSunday,utcDay,utcHour,utcMinute,second,millisecond,exports.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])};var colors=function(s){return s.match(/.{6}/g).map(function(x){return"#"+x})};var category10=colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var category20b=colors("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6");var category20c=colors("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9");var category20=colors("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5");var cubehelix$3=cubehelixLong(cubehelix(300,.5,0),cubehelix(-240,.5,1));var warm=cubehelixLong(cubehelix(-100,.75,.35),cubehelix(80,1.5,.8));var cool=cubehelixLong(cubehelix(260,.75,.35),cubehelix(80,1.5,.8));var rainbow=cubehelix();var rainbow$1=function(t){if(t<0||t>1)t-=Math.floor(t);var ts=Math.abs(t-.5);rainbow.h=360*t-100;rainbow.s=1.5-1.5*ts;rainbow.l=.8-.9*ts;return rainbow+""};function ramp(range){var n=range.length;return function(t){return range[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var viridis=ramp(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var magma=ramp(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));var inferno=ramp(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));var plasma=ramp(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function sequential(interpolator){var x0=0,x1=1,clamp=false;function scale(x){var t=(x-x0)/(x1-x0);return interpolator(clamp?Math.max(0,Math.min(1,t)):t)}scale.domain=function(_){return arguments.length?(x0=+_[0],x1=+_[1],scale):[x0,x1]};scale.clamp=function(_){return arguments.length?(clamp=!!_,scale):clamp};scale.interpolator=function(_){return arguments.length?(interpolator=_,scale):interpolator};scale.copy=function(){return sequential(interpolator).domain([x0,x1]).clamp(clamp)};return linearish(scale)}var constant$10=function(x){return function constant(){return x}};var abs$1=Math.abs;var atan2$1=Math.atan2;var cos$2=Math.cos;var max$2=Math.max;var min$1=Math.min;var sin$2=Math.sin;var sqrt$2=Math.sqrt;var epsilon$3=1e-12;var pi$4=Math.PI;var halfPi$3=pi$4/2;var tau$4=2*pi$4;function acos$1(x){return x>1?0:x<-1?pi$4:Math.acos(x)}function asin$1(x){return x>=1?halfPi$3:x<=-1?-halfPi$3:Math.asin(x)}function arcInnerRadius(d){return d.innerRadius}function arcOuterRadius(d){return d.outerRadius}function arcStartAngle(d){return d.startAngle}function arcEndAngle(d){return d.endAngle}function arcPadAngle(d){return d&&d.padAngle}function intersect(x0,y0,x1,y1,x2,y2,x3,y3){var x10=x1-x0,y10=y1-y0,x32=x3-x2,y32=y3-y2,t=(x32*(y0-y2)-y32*(x0-x2))/(y32*x10-x32*y10);return[x0+t*x10,y0+t*y10]}function cornerTangents(x0,y0,x1,y1,r1,rc,cw){var x01=x0-x1,y01=y0-y1,lo=(cw?rc:-rc)/sqrt$2(x01*x01+y01*y01),ox=lo*y01,oy=-lo*x01,x11=x0+ox,y11=y0+oy,x10=x1+ox,y10=y1+oy,x00=(x11+x10)/2,y00=(y11+y10)/2,dx=x10-x11,dy=y10-y11,d2=dx*dx+dy*dy,r=r1-rc,D=x11*y10-x10*y11,d=(dy<0?-1:1)*sqrt$2(max$2(0,r*r*d2-D*D)),cx0=(D*dy-dx*d)/d2,cy0=(-D*dx-dy*d)/d2,cx1=(D*dy+dx*d)/d2,cy1=(-D*dx+dy*d)/d2,dx0=cx0-x00,dy0=cy0-y00,dx1=cx1-x00,dy1=cy1-y00;if(dx0*dx0+dy0*dy0>dx1*dx1+dy1*dy1)cx0=cx1,cy0=cy1;return{cx:cx0,cy:cy0,x01:-ox,y01:-oy,x11:cx0*(r1/r-1),y11:cy0*(r1/r-1)}}var arc=function(){ var innerRadius=arcInnerRadius,outerRadius=arcOuterRadius,cornerRadius=constant$10(0),padRadius=null,startAngle=arcStartAngle,endAngle=arcEndAngle,padAngle=arcPadAngle,context=null;function arc(){var buffer,r,r0=+innerRadius.apply(this,arguments),r1=+outerRadius.apply(this,arguments),a0=startAngle.apply(this,arguments)-halfPi$3,a1=endAngle.apply(this,arguments)-halfPi$3,da=abs$1(a1-a0),cw=a1>a0;if(!context)context=buffer=path();if(r1<r0)r=r1,r1=r0,r0=r;if(!(r1>epsilon$3))context.moveTo(0,0);else if(da>tau$4-epsilon$3){context.moveTo(r1*cos$2(a0),r1*sin$2(a0));context.arc(0,0,r1,a0,a1,!cw);if(r0>epsilon$3){context.moveTo(r0*cos$2(a1),r0*sin$2(a1));context.arc(0,0,r0,a1,a0,cw)}}else{var a01=a0,a11=a1,a00=a0,a10=a1,da0=da,da1=da,ap=padAngle.apply(this,arguments)/2,rp=ap>epsilon$3&&(padRadius?+padRadius.apply(this,arguments):sqrt$2(r0*r0+r1*r1)),rc=min$1(abs$1(r1-r0)/2,+cornerRadius.apply(this,arguments)),rc0=rc,rc1=rc,t0,t1;if(rp>epsilon$3){var p0=asin$1(rp/r0*sin$2(ap)),p1=asin$1(rp/r1*sin$2(ap));if((da0-=p0*2)>epsilon$3)p0*=cw?1:-1,a00+=p0,a10-=p0;else da0=0,a00=a10=(a0+a1)/2;if((da1-=p1*2)>epsilon$3)p1*=cw?1:-1,a01+=p1,a11-=p1;else da1=0,a01=a11=(a0+a1)/2}var x01=r1*cos$2(a01),y01=r1*sin$2(a01),x10=r0*cos$2(a10),y10=r0*sin$2(a10);if(rc>epsilon$3){var x11=r1*cos$2(a11),y11=r1*sin$2(a11),x00=r0*cos$2(a00),y00=r0*sin$2(a00);if(da<pi$4){var oc=da0>epsilon$3?intersect(x01,y01,x00,y00,x11,y11,x10,y10):[x10,y10],ax=x01-oc[0],ay=y01-oc[1],bx=x11-oc[0],by=y11-oc[1],kc=1/sin$2(acos$1((ax*bx+ay*by)/(sqrt$2(ax*ax+ay*ay)*sqrt$2(bx*bx+by*by)))/2),lc=sqrt$2(oc[0]*oc[0]+oc[1]*oc[1]);rc0=min$1(rc,(r0-lc)/(kc-1));rc1=min$1(rc,(r1-lc)/(kc+1))}}if(!(da1>epsilon$3))context.moveTo(x01,y01);else if(rc1>epsilon$3){t0=cornerTangents(x00,y00,x01,y01,r1,rc1,cw);t1=cornerTangents(x11,y11,x10,y10,r1,rc1,cw);context.moveTo(t0.cx+t0.x01,t0.cy+t0.y01);if(rc1<rc)context.arc(t0.cx,t0.cy,rc1,atan2$1(t0.y01,t0.x01),atan2$1(t1.y01,t1.x01),!cw);else{context.arc(t0.cx,t0.cy,rc1,atan2$1(t0.y01,t0.x01),atan2$1(t0.y11,t0.x11),!cw);context.arc(0,0,r1,atan2$1(t0.cy+t0.y11,t0.cx+t0.x11),atan2$1(t1.cy+t1.y11,t1.cx+t1.x11),!cw);context.arc(t1.cx,t1.cy,rc1,atan2$1(t1.y11,t1.x11),atan2$1(t1.y01,t1.x01),!cw)}}else context.moveTo(x01,y01),context.arc(0,0,r1,a01,a11,!cw);if(!(r0>epsilon$3)||!(da0>epsilon$3))context.lineTo(x10,y10);else if(rc0>epsilon$3){t0=cornerTangents(x10,y10,x11,y11,r0,-rc0,cw);t1=cornerTangents(x01,y01,x00,y00,r0,-rc0,cw);context.lineTo(t0.cx+t0.x01,t0.cy+t0.y01);if(rc0<rc)context.arc(t0.cx,t0.cy,rc0,atan2$1(t0.y01,t0.x01),atan2$1(t1.y01,t1.x01),!cw);else{context.arc(t0.cx,t0.cy,rc0,atan2$1(t0.y01,t0.x01),atan2$1(t0.y11,t0.x11),!cw);context.arc(0,0,r0,atan2$1(t0.cy+t0.y11,t0.cx+t0.x11),atan2$1(t1.cy+t1.y11,t1.cx+t1.x11),cw);context.arc(t1.cx,t1.cy,rc0,atan2$1(t1.y11,t1.x11),atan2$1(t1.y01,t1.x01),!cw)}}else context.arc(0,0,r0,a10,a00,cw)}context.closePath();if(buffer)return context=null,buffer+""||null}arc.centroid=function(){var r=(+innerRadius.apply(this,arguments)+ +outerRadius.apply(this,arguments))/2,a=(+startAngle.apply(this,arguments)+ +endAngle.apply(this,arguments))/2-pi$4/2;return[cos$2(a)*r,sin$2(a)*r]};arc.innerRadius=function(_){return arguments.length?(innerRadius=typeof _==="function"?_:constant$10(+_),arc):innerRadius};arc.outerRadius=function(_){return arguments.length?(outerRadius=typeof _==="function"?_:constant$10(+_),arc):outerRadius};arc.cornerRadius=function(_){return arguments.length?(cornerRadius=typeof _==="function"?_:constant$10(+_),arc):cornerRadius};arc.padRadius=function(_){return arguments.length?(padRadius=_==null?null:typeof _==="function"?_:constant$10(+_),arc):padRadius};arc.startAngle=function(_){return arguments.length?(startAngle=typeof _==="function"?_:constant$10(+_),arc):startAngle};arc.endAngle=function(_){return arguments.length?(endAngle=typeof _==="function"?_:constant$10(+_),arc):endAngle};arc.padAngle=function(_){return arguments.length?(padAngle=typeof _==="function"?_:constant$10(+_),arc):padAngle};arc.context=function(_){return arguments.length?(context=_==null?null:_,arc):context};return arc};function Linear(context){this._context=context}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(x,y){x=+x,y=+y;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(x,y):this._context.moveTo(x,y);break;case 1:this._point=2;default:this._context.lineTo(x,y);break}}};var curveLinear=function(context){return new Linear(context)};function x$3(p){return p[0]}function y$3(p){return p[1]}var line=function(){var x$$1=x$3,y$$1=y$3,defined=constant$10(true),context=null,curve=curveLinear,output=null;function line(data){var i,n=data.length,d,defined0=false,buffer;if(context==null)output=curve(buffer=path());for(i=0;i<=n;++i){if(!(i<n&&defined(d=data[i],i,data))===defined0){if(defined0=!defined0)output.lineStart();else output.lineEnd()}if(defined0)output.point(+x$$1(d,i,data),+y$$1(d,i,data))}if(buffer)return output=null,buffer+""||null}line.x=function(_){return arguments.length?(x$$1=typeof _==="function"?_:constant$10(+_),line):x$$1};line.y=function(_){return arguments.length?(y$$1=typeof _==="function"?_:constant$10(+_),line):y$$1};line.defined=function(_){return arguments.length?(defined=typeof _==="function"?_:constant$10(!!_),line):defined};line.curve=function(_){return arguments.length?(curve=_,context!=null&&(output=curve(context)),line):curve};line.context=function(_){return arguments.length?(_==null?context=output=null:output=curve(context=_),line):context};return line};var area$2=function(){var x0=x$3,x1=null,y0=constant$10(0),y1=y$3,defined=constant$10(true),context=null,curve=curveLinear,output=null;function area(data){var i,j,k,n=data.length,d,defined0=false,buffer,x0z=new Array(n),y0z=new Array(n);if(context==null)output=curve(buffer=path());for(i=0;i<=n;++i){if(!(i<n&&defined(d=data[i],i,data))===defined0){if(defined0=!defined0){j=i;output.areaStart();output.lineStart()}else{output.lineEnd();output.lineStart();for(k=i-1;k>=j;--k){output.point(x0z[k],y0z[k])}output.lineEnd();output.areaEnd()}}if(defined0){x0z[i]=+x0(d,i,data),y0z[i]=+y0(d,i,data);output.point(x1?+x1(d,i,data):x0z[i],y1?+y1(d,i,data):y0z[i])}}if(buffer)return output=null,buffer+""||null}function arealine(){return line().defined(defined).curve(curve).context(context)}area.x=function(_){return arguments.length?(x0=typeof _==="function"?_:constant$10(+_),x1=null,area):x0};area.x0=function(_){return arguments.length?(x0=typeof _==="function"?_:constant$10(+_),area):x0};area.x1=function(_){return arguments.length?(x1=_==null?null:typeof _==="function"?_:constant$10(+_),area):x1};area.y=function(_){return arguments.length?(y0=typeof _==="function"?_:constant$10(+_),y1=null,area):y0};area.y0=function(_){return arguments.length?(y0=typeof _==="function"?_:constant$10(+_),area):y0};area.y1=function(_){return arguments.length?(y1=_==null?null:typeof _==="function"?_:constant$10(+_),area):y1};area.lineX0=area.lineY0=function(){return arealine().x(x0).y(y0)};area.lineY1=function(){return arealine().x(x0).y(y1)};area.lineX1=function(){return arealine().x(x1).y(y0)};area.defined=function(_){return arguments.length?(defined=typeof _==="function"?_:constant$10(!!_),area):defined};area.curve=function(_){return arguments.length?(curve=_,context!=null&&(output=curve(context)),area):curve};area.context=function(_){return arguments.length?(_==null?context=output=null:output=curve(context=_),area):context};return area};var descending$1=function(a,b){return b<a?-1:b>a?1:b>=a?0:NaN};var identity$7=function(d){return d};var pie=function(){var value=identity$7,sortValues=descending$1,sort=null,startAngle=constant$10(0),endAngle=constant$10(tau$4),padAngle=constant$10(0);function pie(data){var i,n=data.length,j,k,sum=0,index=new Array(n),arcs=new Array(n),a0=+startAngle.apply(this,arguments),da=Math.min(tau$4,Math.max(-tau$4,endAngle.apply(this,arguments)-a0)),a1,p=Math.min(Math.abs(da)/n,padAngle.apply(this,arguments)),pa=p*(da<0?-1:1),v;for(i=0;i<n;++i){if((v=arcs[index[i]=i]=+value(data[i],i,data))>0){sum+=v}}if(sortValues!=null)index.sort(function(i,j){return sortValues(arcs[i],arcs[j])});else if(sort!=null)index.sort(function(i,j){return sort(data[i],data[j])});for(i=0,k=sum?(da-n*pa)/sum:0;i<n;++i,a0=a1){j=index[i],v=arcs[j],a1=a0+(v>0?v*k:0)+pa,arcs[j]={data:data[j],index:i,value:v,startAngle:a0,endAngle:a1,padAngle:p}}return arcs}pie.value=function(_){return arguments.length?(value=typeof _==="function"?_:constant$10(+_),pie):value};pie.sortValues=function(_){return arguments.length?(sortValues=_,sort=null,pie):sortValues};pie.sort=function(_){return arguments.length?(sort=_,sortValues=null,pie):sort};pie.startAngle=function(_){return arguments.length?(startAngle=typeof _==="function"?_:constant$10(+_),pie):startAngle};pie.endAngle=function(_){return arguments.length?(endAngle=typeof _==="function"?_:constant$10(+_),pie):endAngle};pie.padAngle=function(_){return arguments.length?(padAngle=typeof _==="function"?_:constant$10(+_),pie):padAngle};return pie};var curveRadialLinear=curveRadial(curveLinear);function Radial(curve){this._curve=curve}Radial.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(a,r){this._curve.point(r*Math.sin(a),r*-Math.cos(a))}};function curveRadial(curve){function radial(context){return new Radial(curve(context))}radial._curve=curve;return radial}function radialLine(l){var c=l.curve;l.angle=l.x,delete l.x;l.radius=l.y,delete l.y;l.curve=function(_){return arguments.length?c(curveRadial(_)):c()._curve};return l}var radialLine$1=function(){return radialLine(line().curve(curveRadialLinear))};var radialArea=function(){var a=area$2().curve(curveRadialLinear),c=a.curve,x0=a.lineX0,x1=a.lineX1,y0=a.lineY0,y1=a.lineY1;a.angle=a.x,delete a.x;a.startAngle=a.x0,delete a.x0;a.endAngle=a.x1,delete a.x1;a.radius=a.y,delete a.y;a.innerRadius=a.y0,delete a.y0;a.outerRadius=a.y1,delete a.y1;a.lineStartAngle=function(){return radialLine(x0())},delete a.lineX0;a.lineEndAngle=function(){return radialLine(x1())},delete a.lineX1;a.lineInnerRadius=function(){return radialLine(y0())},delete a.lineY0;a.lineOuterRadius=function(){return radialLine(y1())},delete a.lineY1;a.curve=function(_){return arguments.length?c(curveRadial(_)):c()._curve};return a};var circle$2={draw:function(context,size){var r=Math.sqrt(size/pi$4);context.moveTo(r,0);context.arc(0,0,r,0,tau$4)}};var cross$2={draw:function(context,size){var r=Math.sqrt(size/5)/2;context.moveTo(-3*r,-r);context.lineTo(-r,-r);context.lineTo(-r,-3*r);context.lineTo(r,-3*r);context.lineTo(r,-r);context.lineTo(3*r,-r);context.lineTo(3*r,r);context.lineTo(r,r);context.lineTo(r,3*r);context.lineTo(-r,3*r);context.lineTo(-r,r);context.lineTo(-3*r,r);context.closePath()}};var tan30=Math.sqrt(1/3);var tan30_2=tan30*2;var diamond={draw:function(context,size){var y=Math.sqrt(size/tan30_2),x=y*tan30;context.moveTo(0,-y);context.lineTo(x,0);context.lineTo(0,y);context.lineTo(-x,0);context.closePath()}};var ka=.8908130915292852;var kr=Math.sin(pi$4/10)/Math.sin(7*pi$4/10);var kx=Math.sin(tau$4/10)*kr;var ky=-Math.cos(tau$4/10)*kr;var star={draw:function(context,size){var r=Math.sqrt(size*ka),x=kx*r,y=ky*r;context.moveTo(0,-r);context.lineTo(x,y);for(var i=1;i<5;++i){var a=tau$4*i/5,c=Math.cos(a),s=Math.sin(a);context.lineTo(s*r,-c*r);context.lineTo(c*x-s*y,s*x+c*y)}context.closePath()}};var square={draw:function(context,size){var w=Math.sqrt(size),x=-w/2;context.rect(x,x,w,w)}};var sqrt3=Math.sqrt(3);var triangle={draw:function(context,size){var y=-Math.sqrt(size/(sqrt3*3));context.moveTo(0,y*2);context.lineTo(-sqrt3*y,-y);context.lineTo(sqrt3*y,-y);context.closePath()}};var c=-.5;var s=Math.sqrt(3)/2;var k=1/Math.sqrt(12);var a=(k/2+1)*3;var wye={draw:function(context,size){var r=Math.sqrt(size/a),x0=r/2,y0=r*k,x1=x0,y1=r*k+r,x2=-x1,y2=y1;context.moveTo(x0,y0);context.lineTo(x1,y1);context.lineTo(x2,y2);context.lineTo(c*x0-s*y0,s*x0+c*y0);context.lineTo(c*x1-s*y1,s*x1+c*y1);context.lineTo(c*x2-s*y2,s*x2+c*y2);context.lineTo(c*x0+s*y0,c*y0-s*x0);context.lineTo(c*x1+s*y1,c*y1-s*x1);context.lineTo(c*x2+s*y2,c*y2-s*x2);context.closePath()}};var symbols=[circle$2,cross$2,diamond,square,star,triangle,wye];var symbol=function(){var type=constant$10(circle$2),size=constant$10(64),context=null;function symbol(){var buffer;if(!context)context=buffer=path();type.apply(this,arguments).draw(context,+size.apply(this,arguments));if(buffer)return context=null,buffer+""||null}symbol.type=function(_){return arguments.length?(type=typeof _==="function"?_:constant$10(_),symbol):type};symbol.size=function(_){return arguments.length?(size=typeof _==="function"?_:constant$10(+_),symbol):size};symbol.context=function(_){return arguments.length?(context=_==null?null:_,symbol):context};return symbol};var noop$2=function(){};function point$2(that,x,y){that._context.bezierCurveTo((2*that._x0+that._x1)/3,(2*that._y0+that._y1)/3,(that._x0+2*that._x1)/3,(that._y0+2*that._y1)/3,(that._x0+4*that._x1+x)/6,(that._y0+4*that._y1+y)/6)}function Basis(context){this._context=context}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN;this._point=0},lineEnd:function(){switch(this._point){case 3:point$2(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(x,y){x=+x,y=+y;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(x,y):this._context.moveTo(x,y);break;case 1:this._point=2;break;case 2:this._point=3;this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$2(this,x,y);break}this._x0=this._x1,this._x1=x;this._y0=this._y1,this._y1=y}};var basis$2=function(context){return new Basis(context)};function BasisClosed(context){this._context=context}BasisClosed.prototype={areaStart:noop$2,areaEnd:noop$2,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2);this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3);this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3);this._context.closePath();break}case 3:{this.point(this._x2,this._y2);this.point(this._x3,this._y3);this.point(this._x4,this._y4);break}}},point:function(x,y){x=+x,y=+y;switch(this._point){case 0:this._point=1;this._x2=x,this._y2=y;break;case 1:this._point=2;this._x3=x,this._y3=y;break;case 2:this._point=3;this._x4=x,this._y4=y;this._context.moveTo((this._x0+4*this._x1+x)/6,(this._y0+4*this._y1+y)/6);break;default:point$2(this,x,y);break}this._x0=this._x1,this._x1=x;this._y0=this._y1,this._y1=y}};var basisClosed$1=function(context){return new BasisClosed(context)};function BasisOpen(context){this._context=context}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN;this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(x,y){x=+x,y=+y;switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var x0=(this._x0+4*this._x1+x)/6,y0=(this._y0+4*this._y1+y)/6;this._line?this._context.lineTo(x0,y0):this._context.moveTo(x0,y0);break;case 3:this._point=4;default:point$2(this,x,y);break}this._x0=this._x1,this._x1=x;this._y0=this._y1,this._y1=y}};var basisOpen=function(context){return new BasisOpen(context)};function Bundle(context,beta){this._basis=new Basis(context);this._beta=beta}Bundle.prototype={lineStart:function(){this._x=[];this._y=[];this._basis.lineStart()},lineEnd:function(){var x=this._x,y=this._y,j=x.length-1;if(j>0){var x0=x[0],y0=y[0],dx=x[j]-x0,dy=y[j]-y0,i=-1,t;while(++i<=j){t=i/j;this._basis.point(this._beta*x[i]+(1-this._beta)*(x0+t*dx),this._beta*y[i]+(1-this._beta)*(y0+t*dy))}}this._x=this._y=null;this._basis.lineEnd()},point:function(x,y){this._x.push(+x);this._y.push(+y)}};var bundle=function custom(beta){function bundle(context){return beta===1?new Basis(context):new Bundle(context,beta)}bundle.beta=function(beta){return custom(+beta)};return bundle}(.85);function point$3(that,x,y){that._context.bezierCurveTo(that._x1+that._k*(that._x2-that._x0),that._y1+that._k*(that._y2-that._y0),that._x2+that._k*(that._x1-x),that._y2+that._k*(that._y1-y),that._x2,that._y2)}function Cardinal(context,tension){this._context=context;this._k=(1-tension)/6}Cardinal.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:point$3(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(x,y){x=+x,y=+y;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(x,y):this._context.moveTo(x,y);break;case 1:this._point=2;this._x1=x,this._y1=y;break;case 2:this._point=3;default:point$3(this,x,y);break}this._x0=this._x1,this._x1=this._x2,this._x2=x;this._y0=this._y1,this._y1=this._y2,this._y2=y}};var cardinal=function custom(tension){function cardinal(context){return new Cardinal(context,tension)}cardinal.tension=function(tension){return custom(+tension)};return cardinal}(0);function CardinalClosed(context,tension){this._context=context;this._k=(1-tension)/6}CardinalClosed.prototype={areaStart:noop$2,areaEnd:noop$2,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3);this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3);this._context.closePath();break}case 3:{this.point(this._x3,this._y3);this.point(this._x4,this._y4);this.point(this._x5,this._y5);break}}},point:function(x,y){x=+x,y=+y;switch(this._point){case 0:this._point=1;this._x3=x,this._y3=y;break;case 1:this._point=2;this._context.moveTo(this._x4=x,this._y4=y);break;case 2:this._point=3;this._x5=x,this._y5=y;break;default:point$3(this,x,y);break}this._x0=this._x1,this._x1=this._x2,this._x2=x;this._y0=this._y1,this._y1=this._y2,this._y2=y}};var cardinalClosed=function custom(tension){function cardinal(context){return new CardinalClosed(context,tension)}cardinal.tension=function(tension){return custom(+tension)};return cardinal}(0);function CardinalOpen(context,tension){this._context=context;this._k=(1-tension)/6}CardinalOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(x,y){x=+x,y=+y;switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:point$3(this,x,y);break}this._x0=this._x1,this._x1=this._x2,this._x2=x;this._y0=this._y1,this._y1=this._y2,this._y2=y}};var cardinalOpen=function custom(tension){function cardinal(context){return new CardinalOpen(context,tension)}cardinal.tension=function(tension){return custom(+tension)};return cardinal}(0);function point$4(that,x,y){var x1=that._x1,y1=that._y1,x2=that._x2,y2=that._y2;if(that._l01_a>epsilon$3){var a=2*that._l01_2a+3*that._l01_a*that._l12_a+that._l12_2a,n=3*that._l01_a*(that._l01_a+that._l12_a);x1=(x1*a-that._x0*that._l12_2a+that._x2*that._l01_2a)/n;y1=(y1*a-that._y0*that._l12_2a+that._y2*that._l01_2a)/n}if(that._l23_a>epsilon$3){var b=2*that._l23_2a+3*that._l23_a*that._l12_a+that._l12_2a,m=3*that._l23_a*(that._l23_a+that._l12_a);x2=(x2*b+that._x1*that._l23_2a-x*that._l12_2a)/m;y2=(y2*b+that._y1*that._l23_2a-y*that._l12_2a)/m}that._context.bezierCurveTo(x1,y1,x2,y2,that._x2,that._y2)}function CatmullRom(context,alpha){this._context=context;this._alpha=alpha}CatmullRom.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(x,y){x=+x,y=+y;if(this._point){var x23=this._x2-x,y23=this._y2-y;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(x23*x23+y23*y23,this._alpha))}switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(x,y):this._context.moveTo(x,y);break;case 1:this._point=2;break;case 2:this._point=3;default:point$4(this,x,y);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=x;this._y0=this._y1,this._y1=this._y2,this._y2=y}};var catmullRom=function custom(alpha){function catmullRom(context){return alpha?new CatmullRom(context,alpha):new Cardinal(context,0)}catmullRom.alpha=function(alpha){return custom(+alpha)};return catmullRom}(.5);function CatmullRomClosed(context,alpha){this._context=context;this._alpha=alpha}CatmullRomClosed.prototype={areaStart:noop$2,areaEnd:noop$2,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3);this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3);this._context.closePath();break}case 3:{this.point(this._x3,this._y3);this.point(this._x4,this._y4);this.point(this._x5,this._y5);break}}},point:function(x,y){x=+x,y=+y;if(this._point){var x23=this._x2-x,y23=this._y2-y;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(x23*x23+y23*y23,this._alpha))}switch(this._point){case 0:this._point=1;this._x3=x,this._y3=y;break;case 1:this._point=2;this._context.moveTo(this._x4=x,this._y4=y);break;case 2:this._point=3;this._x5=x,this._y5=y;break;default:point$4(this,x,y);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=x;this._y0=this._y1,this._y1=this._y2,this._y2=y}};var catmullRomClosed=function custom(alpha){function catmullRom(context){return alpha?new CatmullRomClosed(context,alpha):new CardinalClosed(context,0)}catmullRom.alpha=function(alpha){return custom(+alpha)};return catmullRom}(.5);function CatmullRomOpen(context,alpha){this._context=context;this._alpha=alpha}CatmullRomOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(x,y){x=+x,y=+y;if(this._point){var x23=this._x2-x,y23=this._y2-y;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(x23*x23+y23*y23,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:point$4(this,x,y);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=x;this._y0=this._y1,this._y1=this._y2,this._y2=y}};var catmullRomOpen=function custom(alpha){function catmullRom(context){return alpha?new CatmullRomOpen(context,alpha):new CardinalOpen(context,0)}catmullRom.alpha=function(alpha){return custom(+alpha)};return catmullRom}(.5);function LinearClosed(context){this._context=context}LinearClosed.prototype={areaStart:noop$2,areaEnd:noop$2,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(x,y){x=+x,y=+y;if(this._point)this._context.lineTo(x,y);else this._point=1,this._context.moveTo(x,y)}};var linearClosed=function(context){return new LinearClosed(context)};function sign$1(x){return x<0?-1:1}function slope3(that,x2,y2){var h0=that._x1-that._x0,h1=x2-that._x1,s0=(that._y1-that._y0)/(h0||h1<0&&-0),s1=(y2-that._y1)/(h1||h0<0&&-0),p=(s0*h1+s1*h0)/(h0+h1);return(sign$1(s0)+sign$1(s1))*Math.min(Math.abs(s0),Math.abs(s1),.5*Math.abs(p))||0}function slope2(that,t){var h=that._x1-that._x0;return h?(3*(that._y1-that._y0)/h-t)/2:t}function point$5(that,t0,t1){var x0=that._x0,y0=that._y0,x1=that._x1,y1=that._y1,dx=(x1-x0)/3;that._context.bezierCurveTo(x0+dx,y0+dx*t0,x1-dx,y1-dx*t1,x1,y1)}function MonotoneX(context){this._context=context}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN;this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point$5(this,this._t0,slope2(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(x,y){var t1=NaN;x=+x,y=+y;if(x===this._x1&&y===this._y1)return;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(x,y):this._context.moveTo(x,y);break;case 1:this._point=2;break;case 2:this._point=3;point$5(this,slope2(this,t1=slope3(this,x,y)),t1);break;default:point$5(this,this._t0,t1=slope3(this,x,y));break}this._x0=this._x1,this._x1=x;this._y0=this._y1,this._y1=y;this._t0=t1}};function MonotoneY(context){this._context=new ReflectContext(context)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(x,y){MonotoneX.prototype.point.call(this,y,x)};function ReflectContext(context){this._context=context}ReflectContext.prototype={moveTo:function(x,y){this._context.moveTo(y,x)},closePath:function(){this._context.closePath()},lineTo:function(x,y){this._context.lineTo(y,x)},bezierCurveTo:function(x1,y1,x2,y2,x,y){this._context.bezierCurveTo(y1,x1,y2,x2,y,x)}};function monotoneX(context){return new MonotoneX(context)}function monotoneY(context){return new MonotoneY(context)}function Natural(context){this._context=context}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[];this._y=[]},lineEnd:function(){var x=this._x,y=this._y,n=x.length;if(n){this._line?this._context.lineTo(x[0],y[0]):this._context.moveTo(x[0],y[0]);if(n===2){this._context.lineTo(x[1],y[1])}else{var px=controlPoints(x),py=controlPoints(y);for(var i0=0,i1=1;i1<n;++i0,++i1){this._context.bezierCurveTo(px[0][i0],py[0][i0],px[1][i0],py[1][i0],x[i1],y[i1])}}}if(this._line||this._line!==0&&n===1)this._context.closePath();this._line=1-this._line;this._x=this._y=null},point:function(x,y){this._x.push(+x);this._y.push(+y)}};function controlPoints(x){var i,n=x.length-1,m,a=new Array(n),b=new Array(n),r=new Array(n);a[0]=0,b[0]=2,r[0]=x[0]+2*x[1];for(i=1;i<n-1;++i)a[i]=1,b[i]=4,r[i]=4*x[i]+2*x[i+1];a[n-1]=2,b[n-1]=7,r[n-1]=8*x[n-1]+x[n];for(i=1;i<n;++i)m=a[i]/b[i-1],b[i]-=m,r[i]-=m*r[i-1];a[n-1]=r[n-1]/b[n-1];for(i=n-2;i>=0;--i)a[i]=(r[i]-a[i+1])/b[i];b[n-1]=(x[n]+a[n-1])/2;for(i=0;i<n-1;++i)b[i]=2*x[i+1]-a[i+1];return[a,b]}var natural=function(context){return new Natural(context)};function Step(context,t){this._context=context;this._t=t}Step.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN;this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(x,y){x=+x,y=+y;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(x,y):this._context.moveTo(x,y);break;case 1:this._point=2;default:{if(this._t<=0){this._context.lineTo(this._x,y);this._context.lineTo(x,y)}else{var x1=this._x*(1-this._t)+x*this._t;this._context.lineTo(x1,this._y);this._context.lineTo(x1,y)}break}}this._x=x,this._y=y}};var step=function(context){return new Step(context,.5)};function stepBefore(context){return new Step(context,0)}function stepAfter(context){return new Step(context,1)}var slice$5=Array.prototype.slice;var none$1=function(series,order){if(!((n=series.length)>1))return;for(var i=1,s0,s1=series[order[0]],n,m=s1.length;i<n;++i){s0=s1,s1=series[order[i]];for(var j=0;j<m;++j){s1[j][1]+=s1[j][0]=isNaN(s0[j][1])?s0[j][0]:s0[j][1]}}};var none$2=function(series){var n=series.length,o=new Array(n);while(--n>=0)o[n]=n;return o};function stackValue(d,key){return d[key]}var stack=function(){var keys=constant$10([]),order=none$2,offset=none$1,value=stackValue;function stack(data){var kz=keys.apply(this,arguments),i,m=data.length,n=kz.length,sz=new Array(n),oz;for(i=0;i<n;++i){for(var ki=kz[i],si=sz[i]=new Array(m),j=0,sij;j<m;++j){si[j]=sij=[0,+value(data[j],ki,j,data)];sij.data=data[j]}si.key=ki}for(i=0,oz=order(sz);i<n;++i){sz[oz[i]].index=i}offset(sz,oz);return sz}stack.keys=function(_){return arguments.length?(keys=typeof _==="function"?_:constant$10(slice$5.call(_)),stack):keys};stack.value=function(_){return arguments.length?(value=typeof _==="function"?_:constant$10(+_),stack):value};stack.order=function(_){return arguments.length?(order=_==null?none$2:typeof _==="function"?_:constant$10(slice$5.call(_)),stack):order};stack.offset=function(_){return arguments.length?(offset=_==null?none$1:_,stack):offset};return stack};var expand=function(series,order){if(!((n=series.length)>0))return;for(var i,n,j=0,m=series[0].length,y;j<m;++j){for(y=i=0;i<n;++i)y+=series[i][j][1]||0;if(y)for(i=0;i<n;++i)series[i][j][1]/=y}none$1(series,order)};var silhouette=function(series,order){if(!((n=series.length)>0))return;for(var j=0,s0=series[order[0]],n,m=s0.length;j<m;++j){for(var i=0,y=0;i<n;++i)y+=series[i][j][1]||0;s0[j][1]+=s0[j][0]=-y/2}none$1(series,order)};var wiggle=function(series,order){if(!((n=series.length)>0)||!((m=(s0=series[order[0]]).length)>0))return;for(var y=0,j=1,s0,m,n;j<m;++j){for(var i=0,s1=0,s2=0;i<n;++i){var si=series[order[i]],sij0=si[j][1]||0,sij1=si[j-1][1]||0,s3=(sij0-sij1)/2;for(var k=0;k<i;++k){var sk=series[order[k]],skj0=sk[j][1]||0,skj1=sk[j-1][1]||0;s3+=skj0-skj1}s1+=sij0,s2+=s3*sij0}s0[j-1][1]+=s0[j-1][0]=y;if(s1)y-=s2/s1}s0[j-1][1]+=s0[j-1][0]=y;none$1(series,order)};var ascending$2=function(series){var sums=series.map(sum$2);return none$2(series).sort(function(a,b){return sums[a]-sums[b]})};function sum$2(series){var s=0,i=-1,n=series.length,v;while(++i<n)if(v=+series[i][1])s+=v;return s}var descending$2=function(series){return ascending$2(series).reverse()};var insideOut=function(series){var n=series.length,i,j,sums=series.map(sum$2),order=none$2(series).sort(function(a,b){return sums[b]-sums[a]}),top=0,bottom=0,tops=[],bottoms=[];for(i=0;i<n;++i){j=order[i];if(top<bottom){top+=sums[j];tops.push(j)}else{bottom+=sums[j];bottoms.push(j)}} return bottoms.reverse().concat(tops)};var reverse=function(series){return none$2(series).reverse()};var constant$11=function(x){return function(){return x}};function x$4(d){return d[0]}function y$4(d){return d[1]}function RedBlackTree(){this._=null}function RedBlackNode(node){node.U=node.C=node.L=node.R=node.P=node.N=null}RedBlackTree.prototype={constructor:RedBlackTree,insert:function(after,node){var parent,grandpa,uncle;if(after){node.P=after;node.N=after.N;if(after.N)after.N.P=node;after.N=node;if(after.R){after=after.R;while(after.L)after=after.L;after.L=node}else{after.R=node}parent=after}else if(this._){after=RedBlackFirst(this._);node.P=null;node.N=after;after.P=after.L=node;parent=after}else{node.P=node.N=null;this._=node;parent=null}node.L=node.R=null;node.U=parent;node.C=true;after=node;while(parent&&parent.C){grandpa=parent.U;if(parent===grandpa.L){uncle=grandpa.R;if(uncle&&uncle.C){parent.C=uncle.C=false;grandpa.C=true;after=grandpa}else{if(after===parent.R){RedBlackRotateLeft(this,parent);after=parent;parent=after.U}parent.C=false;grandpa.C=true;RedBlackRotateRight(this,grandpa)}}else{uncle=grandpa.L;if(uncle&&uncle.C){parent.C=uncle.C=false;grandpa.C=true;after=grandpa}else{if(after===parent.L){RedBlackRotateRight(this,parent);after=parent;parent=after.U}parent.C=false;grandpa.C=true;RedBlackRotateLeft(this,grandpa)}}parent=after.U}this._.C=false},remove:function(node){if(node.N)node.N.P=node.P;if(node.P)node.P.N=node.N;node.N=node.P=null;var parent=node.U,sibling,left=node.L,right=node.R,next,red;if(!left)next=right;else if(!right)next=left;else next=RedBlackFirst(right);if(parent){if(parent.L===node)parent.L=next;else parent.R=next}else{this._=next}if(left&&right){red=next.C;next.C=node.C;next.L=left;left.U=next;if(next!==right){parent=next.U;next.U=node.U;node=next.R;parent.L=node;next.R=right;right.U=next}else{next.U=parent;parent=next;node=next.R}}else{red=node.C;node=next}if(node)node.U=parent;if(red)return;if(node&&node.C){node.C=false;return}do{if(node===this._)break;if(node===parent.L){sibling=parent.R;if(sibling.C){sibling.C=false;parent.C=true;RedBlackRotateLeft(this,parent);sibling=parent.R}if(sibling.L&&sibling.L.C||sibling.R&&sibling.R.C){if(!sibling.R||!sibling.R.C){sibling.L.C=false;sibling.C=true;RedBlackRotateRight(this,sibling);sibling=parent.R}sibling.C=parent.C;parent.C=sibling.R.C=false;RedBlackRotateLeft(this,parent);node=this._;break}}else{sibling=parent.L;if(sibling.C){sibling.C=false;parent.C=true;RedBlackRotateRight(this,parent);sibling=parent.L}if(sibling.L&&sibling.L.C||sibling.R&&sibling.R.C){if(!sibling.L||!sibling.L.C){sibling.R.C=false;sibling.C=true;RedBlackRotateLeft(this,sibling);sibling=parent.L}sibling.C=parent.C;parent.C=sibling.L.C=false;RedBlackRotateRight(this,parent);node=this._;break}}sibling.C=true;node=parent;parent=parent.U}while(!node.C);if(node)node.C=false}};function RedBlackRotateLeft(tree,node){var p=node,q=node.R,parent=p.U;if(parent){if(parent.L===p)parent.L=q;else parent.R=q}else{tree._=q}q.U=parent;p.U=q;p.R=q.L;if(p.R)p.R.U=p;q.L=p}function RedBlackRotateRight(tree,node){var p=node,q=node.L,parent=p.U;if(parent){if(parent.L===p)parent.L=q;else parent.R=q}else{tree._=q}q.U=parent;p.U=q;p.L=q.R;if(p.L)p.L.U=p;q.R=p}function RedBlackFirst(node){while(node.L)node=node.L;return node}function createEdge(left,right,v0,v1){var edge=[null,null],index=edges.push(edge)-1;edge.left=left;edge.right=right;if(v0)setEdgeEnd(edge,left,right,v0);if(v1)setEdgeEnd(edge,right,left,v1);cells[left.index].halfedges.push(index);cells[right.index].halfedges.push(index);return edge}function createBorderEdge(left,v0,v1){var edge=[v0,v1];edge.left=left;return edge}function setEdgeEnd(edge,left,right,vertex){if(!edge[0]&&!edge[1]){edge[0]=vertex;edge.left=left;edge.right=right}else if(edge.left===right){edge[1]=vertex}else{edge[0]=vertex}}function clipEdge(edge,x0,y0,x1,y1){var a=edge[0],b=edge[1],ax=a[0],ay=a[1],bx=b[0],by=b[1],t0=0,t1=1,dx=bx-ax,dy=by-ay,r;r=x0-ax;if(!dx&&r>0)return;r/=dx;if(dx<0){if(r<t0)return;if(r<t1)t1=r}else if(dx>0){if(r>t1)return;if(r>t0)t0=r}r=x1-ax;if(!dx&&r<0)return;r/=dx;if(dx<0){if(r>t1)return;if(r>t0)t0=r}else if(dx>0){if(r<t0)return;if(r<t1)t1=r}r=y0-ay;if(!dy&&r>0)return;r/=dy;if(dy<0){if(r<t0)return;if(r<t1)t1=r}else if(dy>0){if(r>t1)return;if(r>t0)t0=r}r=y1-ay;if(!dy&&r<0)return;r/=dy;if(dy<0){if(r>t1)return;if(r>t0)t0=r}else if(dy>0){if(r<t0)return;if(r<t1)t1=r}if(!(t0>0)&&!(t1<1))return true;if(t0>0)edge[0]=[ax+t0*dx,ay+t0*dy];if(t1<1)edge[1]=[ax+t1*dx,ay+t1*dy];return true}function connectEdge(edge,x0,y0,x1,y1){var v1=edge[1];if(v1)return true;var v0=edge[0],left=edge.left,right=edge.right,lx=left[0],ly=left[1],rx=right[0],ry=right[1],fx=(lx+rx)/2,fy=(ly+ry)/2,fm,fb;if(ry===ly){if(fx<x0||fx>=x1)return;if(lx>rx){if(!v0)v0=[fx,y0];else if(v0[1]>=y1)return;v1=[fx,y1]}else{if(!v0)v0=[fx,y1];else if(v0[1]<y0)return;v1=[fx,y0]}}else{fm=(lx-rx)/(ry-ly);fb=fy-fm*fx;if(fm<-1||fm>1){if(lx>rx){if(!v0)v0=[(y0-fb)/fm,y0];else if(v0[1]>=y1)return;v1=[(y1-fb)/fm,y1]}else{if(!v0)v0=[(y1-fb)/fm,y1];else if(v0[1]<y0)return;v1=[(y0-fb)/fm,y0]}}else{if(ly<ry){if(!v0)v0=[x0,fm*x0+fb];else if(v0[0]>=x1)return;v1=[x1,fm*x1+fb]}else{if(!v0)v0=[x1,fm*x1+fb];else if(v0[0]<x0)return;v1=[x0,fm*x0+fb]}}}edge[0]=v0;edge[1]=v1;return true}function clipEdges(x0,y0,x1,y1){var i=edges.length,edge;while(i--){if(!connectEdge(edge=edges[i],x0,y0,x1,y1)||!clipEdge(edge,x0,y0,x1,y1)||!(Math.abs(edge[0][0]-edge[1][0])>epsilon$4||Math.abs(edge[0][1]-edge[1][1])>epsilon$4)){delete edges[i]}}}function createCell(site){return cells[site.index]={site:site,halfedges:[]}}function cellHalfedgeAngle(cell,edge){var site=cell.site,va=edge.left,vb=edge.right;if(site===vb)vb=va,va=site;if(vb)return Math.atan2(vb[1]-va[1],vb[0]-va[0]);if(site===va)va=edge[1],vb=edge[0];else va=edge[0],vb=edge[1];return Math.atan2(va[0]-vb[0],vb[1]-va[1])}function cellHalfedgeStart(cell,edge){return edge[+(edge.left!==cell.site)]}function cellHalfedgeEnd(cell,edge){return edge[+(edge.left===cell.site)]}function sortCellHalfedges(){for(var i=0,n=cells.length,cell,halfedges,j,m;i<n;++i){if((cell=cells[i])&&(m=(halfedges=cell.halfedges).length)){var index=new Array(m),array=new Array(m);for(j=0;j<m;++j)index[j]=j,array[j]=cellHalfedgeAngle(cell,edges[halfedges[j]]);index.sort(function(i,j){return array[j]-array[i]});for(j=0;j<m;++j)array[j]=halfedges[index[j]];for(j=0;j<m;++j)halfedges[j]=array[j]}}}function clipCells(x0,y0,x1,y1){var nCells=cells.length,iCell,cell,site,iHalfedge,halfedges,nHalfedges,start,startX,startY,end,endX,endY,cover=true;for(iCell=0;iCell<nCells;++iCell){if(cell=cells[iCell]){site=cell.site;halfedges=cell.halfedges;iHalfedge=halfedges.length;while(iHalfedge--){if(!edges[halfedges[iHalfedge]]){halfedges.splice(iHalfedge,1)}}iHalfedge=0,nHalfedges=halfedges.length;while(iHalfedge<nHalfedges){end=cellHalfedgeEnd(cell,edges[halfedges[iHalfedge]]),endX=end[0],endY=end[1];start=cellHalfedgeStart(cell,edges[halfedges[++iHalfedge%nHalfedges]]),startX=start[0],startY=start[1];if(Math.abs(endX-startX)>epsilon$4||Math.abs(endY-startY)>epsilon$4){halfedges.splice(iHalfedge,0,edges.push(createBorderEdge(site,end,Math.abs(endX-x0)<epsilon$4&&y1-endY>epsilon$4?[x0,Math.abs(startX-x0)<epsilon$4?startY:y1]:Math.abs(endY-y1)<epsilon$4&&x1-endX>epsilon$4?[Math.abs(startY-y1)<epsilon$4?startX:x1,y1]:Math.abs(endX-x1)<epsilon$4&&endY-y0>epsilon$4?[x1,Math.abs(startX-x1)<epsilon$4?startY:y0]:Math.abs(endY-y0)<epsilon$4&&endX-x0>epsilon$4?[Math.abs(startY-y0)<epsilon$4?startX:x0,y0]:null))-1);++nHalfedges}}if(nHalfedges)cover=false}}if(cover){var dx,dy,d2,dc=Infinity;for(iCell=0,cover=null;iCell<nCells;++iCell){if(cell=cells[iCell]){site=cell.site;dx=site[0]-x0;dy=site[1]-y0;d2=dx*dx+dy*dy;if(d2<dc)dc=d2,cover=cell}}if(cover){var v00=[x0,y0],v01=[x0,y1],v11=[x1,y1],v10=[x1,y0];cover.halfedges.push(edges.push(createBorderEdge(site=cover.site,v00,v01))-1,edges.push(createBorderEdge(site,v01,v11))-1,edges.push(createBorderEdge(site,v11,v10))-1,edges.push(createBorderEdge(site,v10,v00))-1)}}for(iCell=0;iCell<nCells;++iCell){if(cell=cells[iCell]){if(!cell.halfedges.length){delete cells[iCell]}}}}var circlePool=[];var firstCircle;function Circle(){RedBlackNode(this);this.x=this.y=this.arc=this.site=this.cy=null}function attachCircle(arc){var lArc=arc.P,rArc=arc.N;if(!lArc||!rArc)return;var lSite=lArc.site,cSite=arc.site,rSite=rArc.site;if(lSite===rSite)return;var bx=cSite[0],by=cSite[1],ax=lSite[0]-bx,ay=lSite[1]-by,cx=rSite[0]-bx,cy=rSite[1]-by;var d=2*(ax*cy-ay*cx);if(d>=-epsilon2$2)return;var ha=ax*ax+ay*ay,hc=cx*cx+cy*cy,x=(cy*ha-ay*hc)/d,y=(ax*hc-cx*ha)/d;var circle=circlePool.pop()||new Circle;circle.arc=arc;circle.site=cSite;circle.x=x+bx;circle.y=(circle.cy=y+by)+Math.sqrt(x*x+y*y);arc.circle=circle;var before=null,node=circles._;while(node){if(circle.y<node.y||circle.y===node.y&&circle.x<=node.x){if(node.L)node=node.L;else{before=node.P;break}}else{if(node.R)node=node.R;else{before=node;break}}}circles.insert(before,circle);if(!before)firstCircle=circle}function detachCircle(arc){var circle=arc.circle;if(circle){if(!circle.P)firstCircle=circle.N;circles.remove(circle);circlePool.push(circle);RedBlackNode(circle);arc.circle=null}}var beachPool=[];function Beach(){RedBlackNode(this);this.edge=this.site=this.circle=null}function createBeach(site){var beach=beachPool.pop()||new Beach;beach.site=site;return beach}function detachBeach(beach){detachCircle(beach);beaches.remove(beach);beachPool.push(beach);RedBlackNode(beach)}function removeBeach(beach){var circle=beach.circle,x=circle.x,y=circle.cy,vertex=[x,y],previous=beach.P,next=beach.N,disappearing=[beach];detachBeach(beach);var lArc=previous;while(lArc.circle&&Math.abs(x-lArc.circle.x)<epsilon$4&&Math.abs(y-lArc.circle.cy)<epsilon$4){previous=lArc.P;disappearing.unshift(lArc);detachBeach(lArc);lArc=previous}disappearing.unshift(lArc);detachCircle(lArc);var rArc=next;while(rArc.circle&&Math.abs(x-rArc.circle.x)<epsilon$4&&Math.abs(y-rArc.circle.cy)<epsilon$4){next=rArc.N;disappearing.push(rArc);detachBeach(rArc);rArc=next}disappearing.push(rArc);detachCircle(rArc);var nArcs=disappearing.length,iArc;for(iArc=1;iArc<nArcs;++iArc){rArc=disappearing[iArc];lArc=disappearing[iArc-1];setEdgeEnd(rArc.edge,lArc.site,rArc.site,vertex)}lArc=disappearing[0];rArc=disappearing[nArcs-1];rArc.edge=createEdge(lArc.site,rArc.site,null,vertex);attachCircle(lArc);attachCircle(rArc)}function addBeach(site){var x=site[0],directrix=site[1],lArc,rArc,dxl,dxr,node=beaches._;while(node){dxl=leftBreakPoint(node,directrix)-x;if(dxl>epsilon$4)node=node.L;else{dxr=x-rightBreakPoint(node,directrix);if(dxr>epsilon$4){if(!node.R){lArc=node;break}node=node.R}else{if(dxl>-epsilon$4){lArc=node.P;rArc=node}else if(dxr>-epsilon$4){lArc=node;rArc=node.N}else{lArc=rArc=node}break}}}createCell(site);var newArc=createBeach(site);beaches.insert(lArc,newArc);if(!lArc&&!rArc)return;if(lArc===rArc){detachCircle(lArc);rArc=createBeach(lArc.site);beaches.insert(newArc,rArc);newArc.edge=rArc.edge=createEdge(lArc.site,newArc.site);attachCircle(lArc);attachCircle(rArc);return}if(!rArc){newArc.edge=createEdge(lArc.site,newArc.site);return}detachCircle(lArc);detachCircle(rArc);var lSite=lArc.site,ax=lSite[0],ay=lSite[1],bx=site[0]-ax,by=site[1]-ay,rSite=rArc.site,cx=rSite[0]-ax,cy=rSite[1]-ay,d=2*(bx*cy-by*cx),hb=bx*bx+by*by,hc=cx*cx+cy*cy,vertex=[(cy*hb-by*hc)/d+ax,(bx*hc-cx*hb)/d+ay];setEdgeEnd(rArc.edge,lSite,rSite,vertex);newArc.edge=createEdge(lSite,site,null,vertex);rArc.edge=createEdge(site,rSite,null,vertex);attachCircle(lArc);attachCircle(rArc)}function leftBreakPoint(arc,directrix){var site=arc.site,rfocx=site[0],rfocy=site[1],pby2=rfocy-directrix;if(!pby2)return rfocx;var lArc=arc.P;if(!lArc)return-Infinity;site=lArc.site;var lfocx=site[0],lfocy=site[1],plby2=lfocy-directrix;if(!plby2)return lfocx;var hl=lfocx-rfocx,aby2=1/pby2-1/plby2,b=hl/plby2;if(aby2)return(-b+Math.sqrt(b*b-2*aby2*(hl*hl/(-2*plby2)-lfocy+plby2/2+rfocy-pby2/2)))/aby2+rfocx;return(rfocx+lfocx)/2}function rightBreakPoint(arc,directrix){var rArc=arc.N;if(rArc)return leftBreakPoint(rArc,directrix);var site=arc.site;return site[1]===directrix?site[0]:Infinity}var epsilon$4=1e-6;var epsilon2$2=1e-12;var beaches;var cells;var circles;var edges;function triangleArea(a,b,c){return(a[0]-c[0])*(b[1]-a[1])-(a[0]-b[0])*(c[1]-a[1])}function lexicographic(a,b){return b[1]-a[1]||b[0]-a[0]}function Diagram(sites,extent){var site=sites.sort(lexicographic).pop(),x,y,circle;edges=[];cells=new Array(sites.length);beaches=new RedBlackTree;circles=new RedBlackTree;while(true){circle=firstCircle;if(site&&(!circle||site[1]<circle.y||site[1]===circle.y&&site[0]<circle.x)){if(site[0]!==x||site[1]!==y){addBeach(site);x=site[0],y=site[1]}site=sites.pop()}else if(circle){removeBeach(circle.arc)}else{break}}sortCellHalfedges();if(extent){var x0=+extent[0][0],y0=+extent[0][1],x1=+extent[1][0],y1=+extent[1][1];clipEdges(x0,y0,x1,y1);clipCells(x0,y0,x1,y1)}this.edges=edges;this.cells=cells;beaches=circles=edges=cells=null}Diagram.prototype={constructor:Diagram,polygons:function(){var edges=this.edges;return this.cells.map(function(cell){var polygon=cell.halfedges.map(function(i){return cellHalfedgeStart(cell,edges[i])});polygon.data=cell.site.data;return polygon})},triangles:function(){var triangles=[],edges=this.edges;this.cells.forEach(function(cell,i){if(!(m=(halfedges=cell.halfedges).length))return;var site=cell.site,halfedges,j=-1,m,s0,e1=edges[halfedges[m-1]],s1=e1.left===site?e1.right:e1.left;while(++j<m){s0=s1;e1=edges[halfedges[j]];s1=e1.left===site?e1.right:e1.left;if(s0&&s1&&i<s0.index&&i<s1.index&&triangleArea(site,s0,s1)<0){triangles.push([site.data,s0.data,s1.data])}}});return triangles},links:function(){return this.edges.filter(function(edge){return edge.right}).map(function(edge){return{source:edge.left.data,target:edge.right.data}})},find:function(x,y,radius){var that=this,i0,i1=that._found||0,n=that.cells.length,cell;while(!(cell=that.cells[i1]))if(++i1>=n)return null;var dx=x-cell.site[0],dy=y-cell.site[1],d2=dx*dx+dy*dy;do{cell=that.cells[i0=i1],i1=null;cell.halfedges.forEach(function(e){var edge=that.edges[e],v=edge.left;if((v===cell.site||!v)&&!(v=edge.right))return;var vx=x-v[0],vy=y-v[1],v2=vx*vx+vy*vy;if(v2<d2)d2=v2,i1=v.index})}while(i1!==null);that._found=i0;return radius==null||d2<=radius*radius?cell.site:null}};var voronoi=function(){var x$$1=x$4,y$$1=y$4,extent=null;function voronoi(data){return new Diagram(data.map(function(d,i){var s=[Math.round(x$$1(d,i,data)/epsilon$4)*epsilon$4,Math.round(y$$1(d,i,data)/epsilon$4)*epsilon$4];s.index=i;s.data=d;return s}),extent)}voronoi.polygons=function(data){return voronoi(data).polygons()};voronoi.links=function(data){return voronoi(data).links()};voronoi.triangles=function(data){return voronoi(data).triangles()};voronoi.x=function(_){return arguments.length?(x$$1=typeof _==="function"?_:constant$11(+_),voronoi):x$$1};voronoi.y=function(_){return arguments.length?(y$$1=typeof _==="function"?_:constant$11(+_),voronoi):y$$1};voronoi.extent=function(_){return arguments.length?(extent=_==null?null:[[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]],voronoi):extent&&[[extent[0][0],extent[0][1]],[extent[1][0],extent[1][1]]]};voronoi.size=function(_){return arguments.length?(extent=_==null?null:[[0,0],[+_[0],+_[1]]],voronoi):extent&&[extent[1][0]-extent[0][0],extent[1][1]-extent[0][1]]};return voronoi};var constant$12=function(x){return function(){return x}};function ZoomEvent(target,type,transform){this.target=target;this.type=type;this.transform=transform}function Transform(k,x,y){this.k=k;this.x=x;this.y=y}Transform.prototype={constructor:Transform,scale:function(k){return k===1?this:new Transform(this.k*k,this.x,this.y)},translate:function(x,y){return x===0&y===0?this:new Transform(this.k,this.x+this.k*x,this.y+this.k*y)},apply:function(point){return[point[0]*this.k+this.x,point[1]*this.k+this.y]},applyX:function(x){return x*this.k+this.x},applyY:function(y){return y*this.k+this.y},invert:function(location){return[(location[0]-this.x)/this.k,(location[1]-this.y)/this.k]},invertX:function(x){return(x-this.x)/this.k},invertY:function(y){return(y-this.y)/this.k},rescaleX:function(x){return x.copy().domain(x.range().map(this.invertX,this).map(x.invert,x))},rescaleY:function(y){return y.copy().domain(y.range().map(this.invertY,this).map(y.invert,y))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var identity$8=new Transform(1,0,0);transform$1.prototype=Transform.prototype;function transform$1(node){return node.__zoom||identity$8}function nopropagation$2(){exports.event.stopImmediatePropagation()}var noevent$2=function(){exports.event.preventDefault();exports.event.stopImmediatePropagation()};function defaultFilter$2(){return!exports.event.button}function defaultExtent$1(){var e=this,w,h;if(e instanceof SVGElement){e=e.ownerSVGElement||e;w=e.width.baseVal.value;h=e.height.baseVal.value}else{w=e.clientWidth;h=e.clientHeight}return[[0,0],[w,h]]}function defaultTransform(){return this.__zoom||identity$8}var zoom=function(){var filter=defaultFilter$2,extent=defaultExtent$1,k0=0,k1=Infinity,x0=-k1,x1=k1,y0=x0,y1=x1,duration=250,interpolate$$1=interpolateZoom,gestures=[],listeners=dispatch("start","zoom","end"),touchstarting,touchending,touchDelay=500,wheelDelay=150;function zoom(selection$$1){selection$$1.on("wheel.zoom",wheeled).on("mousedown.zoom",mousedowned).on("dblclick.zoom",dblclicked).on("touchstart.zoom",touchstarted).on("touchmove.zoom",touchmoved).on("touchend.zoom touchcancel.zoom",touchended).style("-webkit-tap-highlight-color","rgba(0,0,0,0)").property("__zoom",defaultTransform)}zoom.transform=function(collection,transform){var selection$$1=collection.selection?collection.selection():collection;selection$$1.property("__zoom",defaultTransform);if(collection!==selection$$1){schedule(collection,transform)}else{selection$$1.interrupt().each(function(){gesture(this,arguments).start().zoom(null,typeof transform==="function"?transform.apply(this,arguments):transform).end()})}};zoom.scaleBy=function(selection$$1,k){zoom.scaleTo(selection$$1,function(){var k0=this.__zoom.k,k1=typeof k==="function"?k.apply(this,arguments):k;return k0*k1})};zoom.scaleTo=function(selection$$1,k){zoom.transform(selection$$1,function(){var e=extent.apply(this,arguments),t0=this.__zoom,p0=centroid(e),p1=t0.invert(p0),k1=typeof k==="function"?k.apply(this,arguments):k;return constrain(translate(scale(t0,k1),p0,p1),e)})};zoom.translateBy=function(selection$$1,x,y){zoom.transform(selection$$1,function(){return constrain(this.__zoom.translate(typeof x==="function"?x.apply(this,arguments):x,typeof y==="function"?y.apply(this,arguments):y),extent.apply(this,arguments))})};function scale(transform,k){k=Math.max(k0,Math.min(k1,k));return k===transform.k?transform:new Transform(k,transform.x,transform.y)}function translate(transform,p0,p1){var x=p0[0]-p1[0]*transform.k,y=p0[1]-p1[1]*transform.k;return x===transform.x&&y===transform.y?transform:new Transform(transform.k,x,y)}function constrain(transform,extent){var dx0=transform.invertX(extent[0][0])-x0,dx1=transform.invertX(extent[1][0])-x1,dy0=transform.invertY(extent[0][1])-y0,dy1=transform.invertY(extent[1][1])-y1;return transform.translate(dx1>dx0?(dx0+dx1)/2:Math.min(0,dx0)||Math.max(0,dx1),dy1>dy0?(dy0+dy1)/2:Math.min(0,dy0)||Math.max(0,dy1))}function centroid(extent){return[(+extent[0][0]+ +extent[1][0])/2,(+extent[0][1]+ +extent[1][1])/2]}function schedule(transition$$1,transform,center){transition$$1.on("start.zoom",function(){gesture(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){gesture(this,arguments).end()}).tween("zoom",function(){var that=this,args=arguments,g=gesture(that,args),e=extent.apply(that,args),p=center||centroid(e),w=Math.max(e[1][0]-e[0][0],e[1][1]-e[0][1]),a=that.__zoom,b=typeof transform==="function"?transform.apply(that,args):transform,i=interpolate$$1(a.invert(p).concat(w/a.k),b.invert(p).concat(w/b.k));return function(t){if(t===1)t=b;else{var l=i(t),k=w/l[2];t=new Transform(k,p[0]-l[0]*k,p[1]-l[1]*k)}g.zoom(null,t)}})}function gesture(that,args){for(var i=0,n=gestures.length,g;i<n;++i){if((g=gestures[i]).that===that){return g}}return new Gesture(that,args)}function Gesture(that,args){this.that=that;this.args=args;this.index=-1;this.active=0;this.extent=extent.apply(that,args)}Gesture.prototype={start:function(){if(++this.active===1){this.index=gestures.push(this)-1;this.emit("start")}return this},zoom:function(key,transform){if(this.mouse&&key!=="mouse")this.mouse[1]=transform.invert(this.mouse[0]);if(this.touch0&&key!=="touch")this.touch0[1]=transform.invert(this.touch0[0]);if(this.touch1&&key!=="touch")this.touch1[1]=transform.invert(this.touch1[0]);this.that.__zoom=transform;this.emit("zoom");return this},end:function(){if(--this.active===0){gestures.splice(this.index,1);this.index=-1;this.emit("end")}return this},emit:function(type){customEvent(new ZoomEvent(zoom,type,this.that.__zoom),listeners.apply,listeners,[type,this.that,this.args])}};function wheeled(){if(!filter.apply(this,arguments))return;var g=gesture(this,arguments),t=this.__zoom,k=Math.max(k0,Math.min(k1,t.k*Math.pow(2,-exports.event.deltaY*(exports.event.deltaMode?120:1)/500))),p=mouse(this);if(g.wheel){if(g.mouse[0][0]!==p[0]||g.mouse[0][1]!==p[1]){g.mouse[1]=t.invert(g.mouse[0]=p)}clearTimeout(g.wheel)}else if(t.k===k)return;else{g.mouse=[p,t.invert(p)];interrupt(this);g.start()}noevent$2();g.wheel=setTimeout(wheelidled,wheelDelay);g.zoom("mouse",constrain(translate(scale(t,k),g.mouse[0],g.mouse[1]),g.extent));function wheelidled(){g.wheel=null;g.end()}}function mousedowned(){if(touchending||!filter.apply(this,arguments))return;var g=gesture(this,arguments),v=select(exports.event.view).on("mousemove.zoom",mousemoved,true).on("mouseup.zoom",mouseupped,true),p=mouse(this);dragDisable(exports.event.view);nopropagation$2();g.mouse=[p,this.__zoom.invert(p)];interrupt(this);g.start();function mousemoved(){noevent$2();g.moved=true;g.zoom("mouse",constrain(translate(g.that.__zoom,g.mouse[0]=mouse(g.that),g.mouse[1]),g.extent))}function mouseupped(){v.on("mousemove.zoom mouseup.zoom",null);yesdrag(exports.event.view,g.moved);noevent$2();g.end()}}function dblclicked(){if(!filter.apply(this,arguments))return;var t0=this.__zoom,p0=mouse(this),p1=t0.invert(p0),k1=t0.k*(exports.event.shiftKey?.5:2),t1=constrain(translate(scale(t0,k1),p0,p1),extent.apply(this,arguments));noevent$2();if(duration>0)select(this).transition().duration(duration).call(schedule,t1,p0);else select(this).call(zoom.transform,t1)}function touchstarted(){if(!filter.apply(this,arguments))return;var g=gesture(this,arguments),touches$$1=exports.event.changedTouches,started,n=touches$$1.length,i,t,p;nopropagation$2();for(i=0;i<n;++i){t=touches$$1[i],p=touch(this,touches$$1,t.identifier);p=[p,this.__zoom.invert(p),t.identifier];if(!g.touch0)g.touch0=p,started=true;else if(!g.touch1)g.touch1=p}if(touchstarting){touchstarting=clearTimeout(touchstarting);if(!g.touch1){g.end();p=select(this).on("dblclick.zoom");if(p)p.apply(this,arguments);return}}if(started){touchstarting=setTimeout(function(){touchstarting=null},touchDelay);interrupt(this);g.start()}}function touchmoved(){var g=gesture(this,arguments),touches$$1=exports.event.changedTouches,n=touches$$1.length,i,t,p,l;noevent$2();if(touchstarting)touchstarting=clearTimeout(touchstarting);for(i=0;i<n;++i){t=touches$$1[i],p=touch(this,touches$$1,t.identifier);if(g.touch0&&g.touch0[2]===t.identifier)g.touch0[0]=p;else if(g.touch1&&g.touch1[2]===t.identifier)g.touch1[0]=p}t=g.that.__zoom;if(g.touch1){var p0=g.touch0[0],l0=g.touch0[1],p1=g.touch1[0],l1=g.touch1[1],dp=(dp=p1[0]-p0[0])*dp+(dp=p1[1]-p0[1])*dp,dl=(dl=l1[0]-l0[0])*dl+(dl=l1[1]-l0[1])*dl;t=scale(t,Math.sqrt(dp/dl));p=[(p0[0]+p1[0])/2,(p0[1]+p1[1])/2];l=[(l0[0]+l1[0])/2,(l0[1]+l1[1])/2]}else if(g.touch0)p=g.touch0[0],l=g.touch0[1];else return;g.zoom("touch",constrain(translate(t,p,l),g.extent))}function touchended(){var g=gesture(this,arguments),touches$$1=exports.event.changedTouches,n=touches$$1.length,i,t;nopropagation$2();if(touchending)clearTimeout(touchending);touchending=setTimeout(function(){touchending=null},touchDelay);for(i=0;i<n;++i){t=touches$$1[i];if(g.touch0&&g.touch0[2]===t.identifier)delete g.touch0;else if(g.touch1&&g.touch1[2]===t.identifier)delete g.touch1}if(g.touch1&&!g.touch0)g.touch0=g.touch1,delete g.touch1;if(g.touch0)g.touch0[1]=this.__zoom.invert(g.touch0[0]);else g.end()}zoom.filter=function(_){return arguments.length?(filter=typeof _==="function"?_:constant$12(!!_),zoom):filter};zoom.extent=function(_){return arguments.length?(extent=typeof _==="function"?_:constant$12([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),zoom):extent};zoom.scaleExtent=function(_){return arguments.length?(k0=+_[0],k1=+_[1],zoom):[k0,k1]};zoom.translateExtent=function(_){return arguments.length?(x0=+_[0][0],x1=+_[1][0],y0=+_[0][1],y1=+_[1][1],zoom):[[x0,y0],[x1,y1]]};zoom.duration=function(_){return arguments.length?(duration=+_,zoom):duration};zoom.interpolate=function(_){return arguments.length?(interpolate$$1=_,zoom):interpolate$$1};zoom.on=function(){var value=listeners.on.apply(listeners,arguments);return value===listeners?zoom:value};return zoom};exports.version=version;exports.bisect=bisectRight;exports.bisectRight=bisectRight;exports.bisectLeft=bisectLeft;exports.ascending=ascending;exports.bisector=bisector;exports.cross=cross;exports.descending=descending;exports.deviation=deviation;exports.extent=extent;exports.histogram=histogram;exports.thresholdFreedmanDiaconis=freedmanDiaconis;exports.thresholdScott=scott;exports.thresholdSturges=sturges;exports.max=max;exports.mean=mean;exports.median=median;exports.merge=merge;exports.min=min;exports.pairs=pairs;exports.permute=permute;exports.quantile=threshold;exports.range=sequence;exports.scan=scan;exports.shuffle=shuffle;exports.sum=sum;exports.ticks=ticks;exports.tickStep=tickStep;exports.transpose=transpose;exports.variance=variance;exports.zip=zip;exports.axisTop=axisTop;exports.axisRight=axisRight;exports.axisBottom=axisBottom;exports.axisLeft=axisLeft;exports.brush=brush;exports.brushX=brushX;exports.brushY=brushY;exports.brushSelection=brushSelection;exports.chord=chord;exports.ribbon=ribbon;exports.nest=nest;exports.set=set$2;exports.map=map$1;exports.keys=keys;exports.values=values;exports.entries=entries;exports.color=color;exports.rgb=rgb;exports.hsl=hsl;exports.lab=lab;exports.hcl=hcl;exports.cubehelix=cubehelix;exports.dispatch=dispatch;exports.drag=drag;exports.dragDisable=dragDisable;exports.dragEnable=yesdrag;exports.dsvFormat=dsv;exports.csvParse=csvParse;exports.csvParseRows=csvParseRows;exports.csvFormat=csvFormat;exports.csvFormatRows=csvFormatRows;exports.tsvParse=tsvParse;exports.tsvParseRows=tsvParseRows;exports.tsvFormat=tsvFormat;exports.tsvFormatRows=tsvFormatRows;exports.easeLinear=linear$1;exports.easeQuad=quadInOut;exports.easeQuadIn=quadIn;exports.easeQuadOut=quadOut;exports.easeQuadInOut=quadInOut;exports.easeCubic=cubicInOut;exports.easeCubicIn=cubicIn;exports.easeCubicOut=cubicOut;exports.easeCubicInOut=cubicInOut;exports.easePoly=polyInOut;exports.easePolyIn=polyIn;exports.easePolyOut=polyOut;exports.easePolyInOut=polyInOut;exports.easeSin=sinInOut;exports.easeSinIn=sinIn;exports.easeSinOut=sinOut;exports.easeSinInOut=sinInOut;exports.easeExp=expInOut;exports.easeExpIn=expIn;exports.easeExpOut=expOut;exports.easeExpInOut=expInOut;exports.easeCircle=circleInOut;exports.easeCircleIn=circleIn;exports.easeCircleOut=circleOut;exports.easeCircleInOut=circleInOut;exports.easeBounce=bounceOut;exports.easeBounceIn=bounceIn;exports.easeBounceOut=bounceOut;exports.easeBounceInOut=bounceInOut;exports.easeBack=backInOut;exports.easeBackIn=backIn;exports.easeBackOut=backOut;exports.easeBackInOut=backInOut;exports.easeElastic=elasticOut;exports.easeElasticIn=elasticIn;exports.easeElasticOut=elasticOut;exports.easeElasticInOut=elasticInOut;exports.forceCenter=center$1;exports.forceCollide=collide;exports.forceLink=link;exports.forceManyBody=manyBody;exports.forceSimulation=simulation;exports.forceX=x$2;exports.forceY=y$2;exports.formatDefaultLocale=defaultLocale;exports.formatLocale=formatLocale;exports.formatSpecifier=formatSpecifier;exports.precisionFixed=precisionFixed;exports.precisionPrefix=precisionPrefix;exports.precisionRound=precisionRound;exports.geoArea=area;exports.geoBounds=bounds;exports.geoCentroid=centroid;exports.geoCircle=circle;exports.geoClipExtent=extent$1;exports.geoContains=contains;exports.geoDistance=distance;exports.geoGraticule=graticule;exports.geoGraticule10=graticule10;exports.geoInterpolate=interpolate$1;exports.geoLength=length$1;exports.geoPath=index$1;exports.geoAlbers=albers;exports.geoAlbersUsa=albersUsa;exports.geoAzimuthalEqualArea=azimuthalEqualArea;exports.geoAzimuthalEqualAreaRaw=azimuthalEqualAreaRaw;exports.geoAzimuthalEquidistant=azimuthalEquidistant;exports.geoAzimuthalEquidistantRaw=azimuthalEquidistantRaw;exports.geoConicConformal=conicConformal;exports.geoConicConformalRaw=conicConformalRaw;exports.geoConicEqualArea=conicEqualArea;exports.geoConicEqualAreaRaw=conicEqualAreaRaw;exports.geoConicEquidistant=conicEquidistant;exports.geoConicEquidistantRaw=conicEquidistantRaw;exports.geoEquirectangular=equirectangular;exports.geoEquirectangularRaw=equirectangularRaw;exports.geoGnomonic=gnomonic;exports.geoGnomonicRaw=gnomonicRaw;exports.geoIdentity=identity$5;exports.geoProjection=projection;exports.geoProjectionMutator=projectionMutator;exports.geoMercator=mercator;exports.geoMercatorRaw=mercatorRaw;exports.geoOrthographic=orthographic;exports.geoOrthographicRaw=orthographicRaw;exports.geoStereographic=stereographic;exports.geoStereographicRaw=stereographicRaw;exports.geoTransverseMercator=transverseMercator;exports.geoTransverseMercatorRaw=transverseMercatorRaw;exports.geoRotation=rotation;exports.geoStream=geoStream;exports.geoTransform=transform;exports.cluster=cluster;exports.hierarchy=hierarchy;exports.pack=index$2;exports.packSiblings=siblings;exports.packEnclose=enclose;exports.partition=partition;exports.stratify=stratify;exports.tree=tree;exports.treemap=index$3;exports.treemapBinary=binary;exports.treemapDice=treemapDice;exports.treemapSlice=treemapSlice;exports.treemapSliceDice=sliceDice;exports.treemapSquarify=squarify;exports.treemapResquarify=resquarify;exports.interpolate=interpolateValue;exports.interpolateArray=array$1;exports.interpolateBasis=basis$1;exports.interpolateBasisClosed=basisClosed;exports.interpolateDate=date;exports.interpolateNumber=reinterpolate;exports.interpolateObject=object;exports.interpolateRound=interpolateRound;exports.interpolateString=interpolateString;exports.interpolateTransformCss=interpolateTransformCss;exports.interpolateTransformSvg=interpolateTransformSvg;exports.interpolateZoom=interpolateZoom;exports.interpolateRgb=interpolateRgb;exports.interpolateRgbBasis=rgbBasis;exports.interpolateRgbBasisClosed=rgbBasisClosed;exports.interpolateHsl=hsl$2;exports.interpolateHslLong=hslLong;exports.interpolateLab=lab$1;exports.interpolateHcl=hcl$2;exports.interpolateHclLong=hclLong;exports.interpolateCubehelix=cubehelix$2;exports.interpolateCubehelixLong=cubehelixLong;exports.quantize=quantize;exports.path=path;exports.polygonArea=area$1;exports.polygonCentroid=centroid$1;exports.polygonHull=hull;exports.polygonContains=contains$1;exports.polygonLength=length$2;exports.quadtree=quadtree;exports.queue=queue;exports.randomUniform=uniform;exports.randomNormal=normal;exports.randomLogNormal=logNormal;exports.randomBates=bates;exports.randomIrwinHall=irwinHall;exports.randomExponential=exponential$1;exports.request=request;exports.html=html;exports.json=json;exports.text=text;exports.xml=xml;exports.csv=csv$1;exports.tsv=tsv$1;exports.scaleBand=band;exports.scalePoint=point$1;exports.scaleIdentity=identity$6;exports.scaleLinear=linear$2;exports.scaleLog=log$1;exports.scaleOrdinal=ordinal ;exports.scaleImplicit=implicit;exports.scalePow=pow$1;exports.scaleSqrt=sqrt$1;exports.scaleQuantile=quantile$$1;exports.scaleQuantize=quantize$1;exports.scaleThreshold=threshold$1;exports.scaleTime=time;exports.scaleUtc=utcTime;exports.schemeCategory10=category10;exports.schemeCategory20b=category20b;exports.schemeCategory20c=category20c;exports.schemeCategory20=category20;exports.interpolateCubehelixDefault=cubehelix$3;exports.interpolateRainbow=rainbow$1;exports.interpolateWarm=warm;exports.interpolateCool=cool;exports.interpolateViridis=viridis;exports.interpolateMagma=magma;exports.interpolateInferno=inferno;exports.interpolatePlasma=plasma;exports.scaleSequential=sequential;exports.creator=creator;exports.local=local$1;exports.matcher=matcher$1;exports.mouse=mouse;exports.namespace=namespace;exports.namespaces=namespaces;exports.select=select;exports.selectAll=selectAll;exports.selection=selection;exports.selector=selector;exports.selectorAll=selectorAll;exports.touch=touch;exports.touches=touches;exports.window=window;exports.customEvent=customEvent;exports.arc=arc;exports.area=area$2;exports.line=line;exports.pie=pie;exports.radialArea=radialArea;exports.radialLine=radialLine$1;exports.symbol=symbol;exports.symbols=symbols;exports.symbolCircle=circle$2;exports.symbolCross=cross$2;exports.symbolDiamond=diamond;exports.symbolSquare=square;exports.symbolStar=star;exports.symbolTriangle=triangle;exports.symbolWye=wye;exports.curveBasisClosed=basisClosed$1;exports.curveBasisOpen=basisOpen;exports.curveBasis=basis$2;exports.curveBundle=bundle;exports.curveCardinalClosed=cardinalClosed;exports.curveCardinalOpen=cardinalOpen;exports.curveCardinal=cardinal;exports.curveCatmullRomClosed=catmullRomClosed;exports.curveCatmullRomOpen=catmullRomOpen;exports.curveCatmullRom=catmullRom;exports.curveLinearClosed=linearClosed;exports.curveLinear=curveLinear;exports.curveMonotoneX=monotoneX;exports.curveMonotoneY=monotoneY;exports.curveNatural=natural;exports.curveStep=step;exports.curveStepAfter=stepAfter;exports.curveStepBefore=stepBefore;exports.stack=stack;exports.stackOffsetExpand=expand;exports.stackOffsetNone=none$1;exports.stackOffsetSilhouette=silhouette;exports.stackOffsetWiggle=wiggle;exports.stackOrderAscending=ascending$2;exports.stackOrderDescending=descending$2;exports.stackOrderInsideOut=insideOut;exports.stackOrderNone=none$2;exports.stackOrderReverse=reverse;exports.timeInterval=newInterval;exports.timeMillisecond=millisecond;exports.timeMilliseconds=milliseconds;exports.utcMillisecond=millisecond;exports.utcMilliseconds=milliseconds;exports.timeSecond=second;exports.timeSeconds=seconds;exports.utcSecond=second;exports.utcSeconds=seconds;exports.timeMinute=minute;exports.timeMinutes=minutes;exports.timeHour=hour;exports.timeHours=hours;exports.timeDay=day;exports.timeDays=days;exports.timeWeek=sunday;exports.timeWeeks=sundays;exports.timeSunday=sunday;exports.timeSundays=sundays;exports.timeMonday=monday;exports.timeMondays=mondays;exports.timeTuesday=tuesday;exports.timeTuesdays=tuesdays;exports.timeWednesday=wednesday;exports.timeWednesdays=wednesdays;exports.timeThursday=thursday;exports.timeThursdays=thursdays;exports.timeFriday=friday;exports.timeFridays=fridays;exports.timeSaturday=saturday;exports.timeSaturdays=saturdays;exports.timeMonth=month;exports.timeMonths=months;exports.timeYear=year;exports.timeYears=years;exports.utcMinute=utcMinute;exports.utcMinutes=utcMinutes;exports.utcHour=utcHour;exports.utcHours=utcHours;exports.utcDay=utcDay;exports.utcDays=utcDays;exports.utcWeek=utcSunday;exports.utcWeeks=utcSundays;exports.utcSunday=utcSunday;exports.utcSundays=utcSundays;exports.utcMonday=utcMonday;exports.utcMondays=utcMondays;exports.utcTuesday=utcTuesday;exports.utcTuesdays=utcTuesdays;exports.utcWednesday=utcWednesday;exports.utcWednesdays=utcWednesdays;exports.utcThursday=utcThursday;exports.utcThursdays=utcThursdays;exports.utcFriday=utcFriday;exports.utcFridays=utcFridays;exports.utcSaturday=utcSaturday;exports.utcSaturdays=utcSaturdays;exports.utcMonth=utcMonth;exports.utcMonths=utcMonths;exports.utcYear=utcYear;exports.utcYears=utcYears;exports.timeFormatDefaultLocale=defaultLocale$1;exports.timeFormatLocale=formatLocale$1;exports.isoFormat=formatIso;exports.isoParse=parseIso;exports.now=now;exports.timer=timer;exports.timerFlush=timerFlush;exports.timeout=timeout$1;exports.interval=interval$1;exports.transition=transition;exports.active=active;exports.interrupt=interrupt;exports.voronoi=voronoi;exports.zoom=zoom;exports.zoomTransform=transform$1;exports.zoomIdentity=identity$8;Object.defineProperty(exports,"__esModule",{value:true})})},function(module,exports,__webpack_require__){"use strict";(function(process){function invariant(condition,format,a,b,c,d,e,f){if(process.env.NODE_ENV!=="production"){if(format===undefined){throw new Error("invariant requires an error message argument")}}if(!condition){var error;if(format===undefined){error=new Error("Minified exception occurred; use the non-minified dev environment "+"for the full error message and additional helpful warnings.")}else{var args=[a,b,c,d,e,f];var argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++]}));error.name="Invariant Violation"}error.framesToPop=1;throw error}}module.exports=invariant}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";function assign(target,sources){if(target==null){throw new TypeError("Object.assign target cannot be null or undefined")}var to=Object(target);var hasOwnProperty=Object.prototype.hasOwnProperty;for(var nextIndex=1;nextIndex<arguments.length;nextIndex++){var nextSource=arguments[nextIndex];if(nextSource==null){continue}var from=Object(nextSource);for(var key in from){if(hasOwnProperty.call(from,key)){to[key]=from[key]}}}return to}module.exports=assign},function(module,exports,__webpack_require__){"use strict";(function(process){var emptyFunction=__webpack_require__(15);var warning=emptyFunction;if(process.env.NODE_ENV!=="production"){warning=function(condition,format){for(var _len=arguments.length,args=Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){args[_key-2]=arguments[_key]}if(format===undefined){throw new Error("`warning(condition, format, ...args)` requires a warning "+"message argument")}if(format.indexOf("Failed Composite propType: ")===0){return}if(!condition){var argIndex=0;var message="Warning: "+format.replace(/%s/g,function(){return args[argIndex++]});if(typeof console!=="undefined"){console.error(message)}try{throw new Error(message)}catch(x){}}}}module.exports=warning}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";function __export(m){for(var p in m)if(!exports.hasOwnProperty(p))exports[p]=m[p]}Object.defineProperty(exports,"__esModule",{value:true});__export(__webpack_require__(29));__export(__webpack_require__(28));__export(__webpack_require__(26));__export(__webpack_require__(27));__export(__webpack_require__(13))},function(module,exports,__webpack_require__){"use strict";function __export(m){for(var p in m)if(!exports.hasOwnProperty(p))exports[p]=m[p]}Object.defineProperty(exports,"__esModule",{value:true});__export(__webpack_require__(62));__export(__webpack_require__(63));__export(__webpack_require__(30));__export(__webpack_require__(61));__export(__webpack_require__(64));__export(__webpack_require__(66));__export(__webpack_require__(65))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var BaseFactory=function(){function BaseFactory(){this.enabled=true}BaseFactory.prototype.init=function(key,eventMgr,factoryMgr){this.key=key;this.eventMgr=eventMgr;this.factoryMgr=factoryMgr;this.eventMgr.on("create."+this.key,this.create.bind(this));this.eventMgr.on("update."+this.key,this.update.bind(this));this.eventMgr.on("destroy."+this.key,this.destroy.bind(this))};BaseFactory.prototype.on=function(){this.enabled=true};BaseFactory.prototype.off=function(){this.enabled=false};BaseFactory.prototype.isOn=function(){return this.enabled===true};BaseFactory.prototype.isOff=function(){return this.enabled===false};BaseFactory.prototype.create=function(options){};BaseFactory.prototype.update=function(data,options){};BaseFactory.prototype.destroy=function(){};return BaseFactory}();exports.BaseFactory=BaseFactory},function(module,exports,__webpack_require__){"use strict";var canUseDOM=!!(typeof window!=="undefined"&&window.document&&window.document.createElement);var ExecutionEnvironment={canUseDOM:canUseDOM,canUseWorkers:typeof Worker!=="undefined",canUseEventListeners:canUseDOM&&!!(window.addEventListener||window.attachEvent),canUseViewport:canUseDOM&&!!window.screen,isInWorker:!canUseDOM};module.exports=ExecutionEnvironment},function(module,exports,__webpack_require__){"use strict";(function(process){var DOMProperty=__webpack_require__(21);var ReactBrowserEventEmitter=__webpack_require__(37);var ReactCurrentOwner=__webpack_require__(18);var ReactDOMFeatureFlags=__webpack_require__(98);var ReactElement=__webpack_require__(11);var ReactEmptyComponentRegistry=__webpack_require__(105);var ReactInstanceHandles=__webpack_require__(24);var ReactInstanceMap=__webpack_require__(34);var ReactMarkupChecksum=__webpack_require__(108);var ReactPerf=__webpack_require__(12);var ReactReconciler=__webpack_require__(22);var ReactUpdateQueue=__webpack_require__(73);var ReactUpdates=__webpack_require__(14);var assign=__webpack_require__(3);var emptyObject=__webpack_require__(31);var containsNode=__webpack_require__(87);var instantiateReactComponent=__webpack_require__(80);var invariant=__webpack_require__(2);var setInnerHTML=__webpack_require__(44);var shouldUpdateReactComponent=__webpack_require__(83);var validateDOMNesting=__webpack_require__(85);var warning=__webpack_require__(4);var ATTR_NAME=DOMProperty.ID_ATTRIBUTE_NAME;var nodeCache={};var ELEMENT_NODE_TYPE=1;var DOC_NODE_TYPE=9;var DOCUMENT_FRAGMENT_NODE_TYPE=11;var ownerDocumentContextKey="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2);var instancesByReactRootID={};var containersByReactRootID={};if(process.env.NODE_ENV!=="production"){var rootElementsByReactRootID={}}var findComponentRootReusableArray=[];function firstDifferenceIndex(string1,string2){var minLen=Math.min(string1.length,string2.length);for(var i=0;i<minLen;i++){if(string1.charAt(i)!==string2.charAt(i)){return i}}return string1.length===string2.length?-1:minLen}function getReactRootElementInContainer(container){if(!container){return null}if(container.nodeType===DOC_NODE_TYPE){return container.documentElement}else{return container.firstChild}}function getReactRootID(container){var rootElement=getReactRootElementInContainer(container);return rootElement&&ReactMount.getID(rootElement)}function getID(node){var id=internalGetID(node);if(id){if(nodeCache.hasOwnProperty(id)){var cached=nodeCache[id];if(cached!==node){!!isValid(cached,id)?process.env.NODE_ENV!=="production"?invariant(false,"ReactMount: Two valid but unequal nodes with the same `%s`: %s",ATTR_NAME,id):invariant(false):undefined;nodeCache[id]=node}}else{nodeCache[id]=node}}return id}function internalGetID(node){return node&&node.getAttribute&&node.getAttribute(ATTR_NAME)||""}function setID(node,id){var oldID=internalGetID(node);if(oldID!==id){delete nodeCache[oldID]}node.setAttribute(ATTR_NAME,id);nodeCache[id]=node}function getNode(id){if(!nodeCache.hasOwnProperty(id)||!isValid(nodeCache[id],id)){nodeCache[id]=ReactMount.findReactNodeByID(id)}return nodeCache[id]}function getNodeFromInstance(instance){var id=ReactInstanceMap.get(instance)._rootNodeID;if(ReactEmptyComponentRegistry.isNullComponentID(id)){return null}if(!nodeCache.hasOwnProperty(id)||!isValid(nodeCache[id],id)){nodeCache[id]=ReactMount.findReactNodeByID(id)}return nodeCache[id]}function isValid(node,id){if(node){!(internalGetID(node)===id)?process.env.NODE_ENV!=="production"?invariant(false,"ReactMount: Unexpected modification of `%s`",ATTR_NAME):invariant(false):undefined;var container=ReactMount.findReactContainerForID(id);if(container&&containsNode(container,node)){return true}}return false}function purgeID(id){delete nodeCache[id]}var deepestNodeSoFar=null;function findDeepestCachedAncestorImpl(ancestorID){var ancestor=nodeCache[ancestorID];if(ancestor&&isValid(ancestor,ancestorID)){deepestNodeSoFar=ancestor}else{return false}}function findDeepestCachedAncestor(targetID){deepestNodeSoFar=null;ReactInstanceHandles.traverseAncestors(targetID,findDeepestCachedAncestorImpl);var foundNode=deepestNodeSoFar;deepestNodeSoFar=null;return foundNode}function mountComponentIntoNode(componentInstance,rootID,container,transaction,shouldReuseMarkup,context){if(ReactDOMFeatureFlags.useCreateElement){context=assign({},context);if(container.nodeType===DOC_NODE_TYPE){context[ownerDocumentContextKey]=container}else{context[ownerDocumentContextKey]=container.ownerDocument}}if(process.env.NODE_ENV!=="production"){if(context===emptyObject){context={}}var tag=container.nodeName.toLowerCase();context[validateDOMNesting.ancestorInfoContextKey]=validateDOMNesting.updatedAncestorInfo(null,tag,null)}var markup=ReactReconciler.mountComponent(componentInstance,rootID,transaction,context);componentInstance._renderedComponent._topLevelWrapper=componentInstance;ReactMount._mountImageIntoNode(markup,container,shouldReuseMarkup,transaction)}function batchedMountComponentIntoNode(componentInstance,rootID,container,shouldReuseMarkup,context){var transaction=ReactUpdates.ReactReconcileTransaction.getPooled(shouldReuseMarkup);transaction.perform(mountComponentIntoNode,null,componentInstance,rootID,container,transaction,shouldReuseMarkup,context);ReactUpdates.ReactReconcileTransaction.release(transaction)}function unmountComponentFromNode(instance,container){ReactReconciler.unmountComponent(instance);if(container.nodeType===DOC_NODE_TYPE){container=container.documentElement}while(container.lastChild){container.removeChild(container.lastChild)}}function hasNonRootReactChild(node){var reactRootID=getReactRootID(node);return reactRootID?reactRootID!==ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID):false}function findFirstReactDOMImpl(node){for(;node&&node.parentNode!==node;node=node.parentNode){if(node.nodeType!==1){continue}var nodeID=internalGetID(node);if(!nodeID){continue}var reactRootID=ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);var current=node;var lastID;do{lastID=internalGetID(current);current=current.parentNode;if(current==null){return null}}while(lastID!==reactRootID);if(current===containersByReactRootID[reactRootID]){return node}}return null}var TopLevelWrapper=function(){};TopLevelWrapper.prototype.isReactComponent={};if(process.env.NODE_ENV!=="production"){TopLevelWrapper.displayName="TopLevelWrapper"}TopLevelWrapper.prototype.render=function(){return this.props};var ReactMount={TopLevelWrapper:TopLevelWrapper,_instancesByReactRootID:instancesByReactRootID,scrollMonitor:function(container,renderCallback){renderCallback()},_updateRootComponent:function(prevComponent,nextElement,container,callback){ReactMount.scrollMonitor(container,function(){ReactUpdateQueue.enqueueElementInternal(prevComponent,nextElement);if(callback){ReactUpdateQueue.enqueueCallbackInternal(prevComponent,callback)}});if(process.env.NODE_ENV!=="production"){rootElementsByReactRootID[getReactRootID(container)]=getReactRootElementInContainer(container)}return prevComponent},_registerComponent:function(nextComponent,container){!(container&&(container.nodeType===ELEMENT_NODE_TYPE||container.nodeType===DOC_NODE_TYPE||container.nodeType===DOCUMENT_FRAGMENT_NODE_TYPE))?process.env.NODE_ENV!=="production"?invariant(false,"_registerComponent(...): Target container is not a DOM element."):invariant(false):undefined;ReactBrowserEventEmitter.ensureScrollValueMonitoring();var reactRootID=ReactMount.registerContainer(container);instancesByReactRootID[reactRootID]=nextComponent;return reactRootID},_renderNewRootComponent:function(nextElement,container,shouldReuseMarkup,context){process.env.NODE_ENV!=="production"?warning(ReactCurrentOwner.current==null,"_renderNewRootComponent(): Render methods should be a pure function "+"of props and state; triggering nested component updates from "+"render is not allowed. If necessary, trigger nested updates in "+"componentDidUpdate. Check the render method of %s.",ReactCurrentOwner.current&&ReactCurrentOwner.current.getName()||"ReactCompositeComponent"):undefined;var componentInstance=instantiateReactComponent(nextElement,null);var reactRootID=ReactMount._registerComponent(componentInstance,container);ReactUpdates.batchedUpdates(batchedMountComponentIntoNode,componentInstance,reactRootID,container,shouldReuseMarkup,context);if(process.env.NODE_ENV!=="production"){rootElementsByReactRootID[reactRootID]=getReactRootElementInContainer(container)}return componentInstance},renderSubtreeIntoContainer:function(parentComponent,nextElement,container,callback){!(parentComponent!=null&&parentComponent._reactInternalInstance!=null)?process.env.NODE_ENV!=="production"?invariant(false,"parentComponent must be a valid React Component"):invariant(false):undefined;return ReactMount._renderSubtreeIntoContainer(parentComponent,nextElement,container,callback)},_renderSubtreeIntoContainer:function(parentComponent,nextElement,container,callback){!ReactElement.isValidElement(nextElement)?process.env.NODE_ENV!=="production"?invariant(false,"ReactDOM.render(): Invalid component element.%s",typeof nextElement==="string"?" Instead of passing an element string, make sure to instantiate "+"it by passing it to React.createElement.":typeof nextElement==="function"?" Instead of passing a component class, make sure to instantiate "+"it by passing it to React.createElement.":nextElement!=null&&nextElement.props!==undefined?" This may be caused by unintentionally loading two independent "+"copies of React.":""):invariant(false):undefined;process.env.NODE_ENV!=="production"?warning(!container||!container.tagName||container.tagName.toUpperCase()!=="BODY","render(): Rendering components directly into document.body is "+"discouraged, since its children are often manipulated by third-party "+"scripts and browser extensions. This may lead to subtle "+"reconciliation issues. Try rendering into a container element created "+"for your app."):undefined;var nextWrappedElement=new ReactElement(TopLevelWrapper,null,null,null,null,null,nextElement);var prevComponent=instancesByReactRootID[getReactRootID(container)];if(prevComponent){var prevWrappedElement=prevComponent._currentElement;var prevElement=prevWrappedElement.props;if(shouldUpdateReactComponent(prevElement,nextElement)){var publicInst=prevComponent._renderedComponent.getPublicInstance();var updatedCallback=callback&&function(){callback.call(publicInst)};ReactMount._updateRootComponent(prevComponent,nextWrappedElement,container,updatedCallback);return publicInst}else{ReactMount.unmountComponentAtNode(container)}}var reactRootElement=getReactRootElementInContainer(container);var containerHasReactMarkup=reactRootElement&&!!internalGetID(reactRootElement);var containerHasNonRootReactChild=hasNonRootReactChild(container);if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(!containerHasNonRootReactChild,"render(...): Replacing React-rendered children with a new root "+"component. If you intended to update the children of this node, "+"you should instead have the existing children update their state "+"and render the new components instead of calling ReactDOM.render."):undefined;if(!containerHasReactMarkup||reactRootElement.nextSibling){var rootElementSibling=reactRootElement;while(rootElementSibling){if(internalGetID(rootElementSibling)){process.env.NODE_ENV!=="production"?warning(false,"render(): Target node has markup rendered by React, but there "+"are unrelated nodes as well. This is most commonly caused by "+"white-space inserted around server-rendered markup."):undefined;break}rootElementSibling=rootElementSibling.nextSibling}}}var shouldReuseMarkup=containerHasReactMarkup&&!prevComponent&&!containerHasNonRootReactChild;var component=ReactMount._renderNewRootComponent(nextWrappedElement,container,shouldReuseMarkup,parentComponent!=null?parentComponent._reactInternalInstance._processChildContext(parentComponent._reactInternalInstance._context):emptyObject)._renderedComponent.getPublicInstance();if(callback){callback.call(component)}return component},render:function(nextElement,container,callback){return ReactMount._renderSubtreeIntoContainer(null,nextElement,container,callback)},registerContainer:function(container){var reactRootID=getReactRootID(container);if(reactRootID){reactRootID=ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID)}if(!reactRootID){reactRootID=ReactInstanceHandles.createReactRootID()}containersByReactRootID[reactRootID]=container;return reactRootID},unmountComponentAtNode:function(container){process.env.NODE_ENV!=="production"?warning(ReactCurrentOwner.current==null,"unmountComponentAtNode(): Render methods should be a pure function "+"of props and state; triggering nested component updates from render "+"is not allowed. If necessary, trigger nested updates in "+"componentDidUpdate. Check the render method of %s.",ReactCurrentOwner.current&&ReactCurrentOwner.current.getName()||"ReactCompositeComponent"):undefined;!(container&&(container.nodeType===ELEMENT_NODE_TYPE||container.nodeType===DOC_NODE_TYPE||container.nodeType===DOCUMENT_FRAGMENT_NODE_TYPE))?process.env.NODE_ENV!=="production"?invariant(false,"unmountComponentAtNode(...): Target container is not a DOM element."):invariant(false):undefined;var reactRootID=getReactRootID(container);var component=instancesByReactRootID[reactRootID];if(!component){var containerHasNonRootReactChild=hasNonRootReactChild(container);var containerID=internalGetID(container);var isContainerReactRoot=containerID&&containerID===ReactInstanceHandles.getReactRootIDFromNodeID(containerID);if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(!containerHasNonRootReactChild,"unmountComponentAtNode(): The node you're attempting to unmount "+"was rendered by React and is not a top-level container. %s",isContainerReactRoot?"You may have accidentally passed in a React root node instead "+"of its container.":"Instead, have the parent component update its state and "+"rerender in order to remove this component."):undefined}return false}ReactUpdates.batchedUpdates(unmountComponentFromNode,component,container);delete instancesByReactRootID[reactRootID];delete containersByReactRootID[reactRootID];if(process.env.NODE_ENV!=="production"){delete rootElementsByReactRootID[reactRootID]}return true},findReactContainerForID:function(id){var reactRootID=ReactInstanceHandles.getReactRootIDFromNodeID(id);var container=containersByReactRootID[reactRootID];if(process.env.NODE_ENV!=="production"){var rootElement=rootElementsByReactRootID[reactRootID];if(rootElement&&rootElement.parentNode!==container){process.env.NODE_ENV!=="production"?warning(internalGetID(rootElement)===reactRootID,"ReactMount: Root element ID differed from reactRootID."):undefined;var containerChild=container.firstChild;if(containerChild&&reactRootID===internalGetID(containerChild)){rootElementsByReactRootID[reactRootID]=containerChild}else{process.env.NODE_ENV!=="production"?warning(false,"ReactMount: Root element has been removed from its original "+"container. New container: %s",rootElement.parentNode):undefined}}}return container},findReactNodeByID:function(id){var reactRoot=ReactMount.findReactContainerForID(id);return ReactMount.findComponentRoot(reactRoot,id)},getFirstReactDOM:function(node){return findFirstReactDOMImpl(node)},findComponentRoot:function(ancestorNode,targetID){var firstChildren=findComponentRootReusableArray;var childIndex=0;var deepestAncestor=findDeepestCachedAncestor(targetID)||ancestorNode;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(deepestAncestor!=null,"React can't find the root component node for data-reactid value "+"`%s`. If you're seeing this message, it probably means that "+"you've loaded two copies of React on the page. At this time, only "+"a single copy of React can be loaded at a time.",targetID):undefined}firstChildren[0]=deepestAncestor.firstChild;firstChildren.length=1;while(childIndex<firstChildren.length){var child=firstChildren[childIndex++];var targetChild;while(child){var childID=ReactMount.getID(child);if(childID){if(targetID===childID){targetChild=child}else if(ReactInstanceHandles.isAncestorIDOf(childID,targetID)){firstChildren.length=childIndex=0;firstChildren.push(child.firstChild)}}else{firstChildren.push(child.firstChild)}child=child.nextSibling}if(targetChild){firstChildren.length=0;return targetChild}}firstChildren.length=0;true?process.env.NODE_ENV!=="production"?invariant(false,"findComponentRoot(..., %s): Unable to find element. This probably "+"means the DOM was unexpectedly mutated (e.g., by the browser), "+"usually due to forgetting a <tbody> when using tables, nesting tags "+"like <form>, <p>, or <a>, or using non-SVG elements in an <svg> "+"parent. "+"Try inspecting the child nodes of the element with React ID `%s`.",targetID,ReactMount.getID(ancestorNode)):invariant(false):undefined},_mountImageIntoNode:function(markup,container,shouldReuseMarkup,transaction){!(container&&(container.nodeType===ELEMENT_NODE_TYPE||container.nodeType===DOC_NODE_TYPE||container.nodeType===DOCUMENT_FRAGMENT_NODE_TYPE))?process.env.NODE_ENV!=="production"?invariant(false,"mountComponentIntoNode(...): Target container is not valid."):invariant(false):undefined;if(shouldReuseMarkup){var rootElement=getReactRootElementInContainer(container);if(ReactMarkupChecksum.canReuseMarkup(markup,rootElement)){return}else{var checksum=rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);var rootMarkup=rootElement.outerHTML;rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME,checksum);var normalizedMarkup=markup;if(process.env.NODE_ENV!=="production"){var normalizer;if(container.nodeType===ELEMENT_NODE_TYPE){normalizer=document.createElement("div");normalizer.innerHTML=markup;normalizedMarkup=normalizer.innerHTML}else{normalizer=document.createElement("iframe");document.body.appendChild(normalizer);normalizer.contentDocument.write(markup);normalizedMarkup=normalizer.contentDocument.documentElement.outerHTML;document.body.removeChild(normalizer)}}var diffIndex=firstDifferenceIndex(normalizedMarkup,rootMarkup);var difference=" (client) "+normalizedMarkup.substring(diffIndex-20,diffIndex+20)+"\n (server) "+rootMarkup.substring(diffIndex-20,diffIndex+20);!(container.nodeType!==DOC_NODE_TYPE)?process.env.NODE_ENV!=="production"?invariant(false,"You're trying to render a component to the document using "+"server rendering but the checksum was invalid. This usually "+"means you rendered a different component type or props on "+"the client from the one on the server, or your render() "+"methods are impure. React cannot handle this case due to "+"cross-browser quirks by rendering at the document root. You "+"should look for environment dependent code in your components "+"and ensure the props are the same client and server side:\n%s",difference):invariant(false):undefined;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(false,"React attempted to reuse markup in a container but the "+"checksum was invalid. This generally means that you are "+"using server rendering and the markup generated on the "+"server was not what the client was expecting. React injected "+"new markup to compensate which works but you have lost many "+"of the benefits of server rendering. Instead, figure out "+"why the markup being generated is different on the client "+"or server:\n%s",difference):undefined}}}!(container.nodeType!==DOC_NODE_TYPE)?process.env.NODE_ENV!=="production"?invariant(false,"You're trying to render a component to the document but "+"you didn't use server rendering. We can't do this "+"without using server rendering due to cross-browser quirks. "+"See ReactDOMServer.renderToString() for server rendering."):invariant(false):undefined;if(transaction.useCreateElement){while(container.lastChild){container.removeChild(container.lastChild)}container.appendChild(markup)}else{setInnerHTML(container,markup)}},ownerDocumentContextKey:ownerDocumentContextKey,getReactRootID:getReactRootID,getID:getID,setID:setID,getNode:getNode,getNodeFromInstance:getNodeFromInstance,isValid:isValid,purgeID:purgeID};ReactPerf.measureMethods(ReactMount,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"});module.exports=ReactMount}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";function __export(m){for(var p in m)if(!exports.hasOwnProperty(p))exports[p]=m[p]}Object.defineProperty(exports,"__esModule",{value:true});__export(__webpack_require__(7));__export(__webpack_require__(48));__export(__webpack_require__(52));__export(__webpack_require__(50));__export(__webpack_require__(47));__export(__webpack_require__(49));__export(__webpack_require__(54));__export(__webpack_require__(51));__export(__webpack_require__(53))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactCurrentOwner=__webpack_require__(18);var assign=__webpack_require__(3);var canDefineProperty=__webpack_require__(42);var REACT_ELEMENT_TYPE=typeof Symbol==="function"&&Symbol["for"]&&Symbol["for"]("react.element")||60103;var RESERVED_PROPS={key:true,ref:true,__self:true,__source:true};var ReactElement=function(type,key,ref,self,source,owner,props){var element={$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:ref,props:props,_owner:owner};if(process.env.NODE_ENV!=="production"){element._store={};if(canDefineProperty){Object.defineProperty(element._store,"validated",{configurable:false,enumerable:false,writable:true,value:false});Object.defineProperty(element,"_self",{configurable:false,enumerable:false,writable:false,value:self});Object.defineProperty(element,"_source",{configurable:false,enumerable:false,writable:false,value:source})}else{element._store.validated=false;element._self=self;element._source=source}Object.freeze(element.props);Object.freeze(element)}return element};ReactElement.createElement=function(type,config,children){var propName;var props={};var key=null;var ref=null;var self=null;var source=null;if(config!=null){ref=config.ref===undefined?null:config.ref;key=config.key===undefined?null:""+config.key;self=config.__self===undefined?null:config.__self;source=config.__source===undefined?null:config.__source;for(propName in config){if(config.hasOwnProperty(propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName]}}}var childrenLength=arguments.length-2;if(childrenLength===1){props.children=children}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2]}props.children=childArray}if(type&&type.defaultProps){var defaultProps=type.defaultProps;for(propName in defaultProps){if(typeof props[propName]==="undefined"){props[propName]=defaultProps[propName]}}}return ReactElement(type,key,ref,self,source,ReactCurrentOwner.current,props)};ReactElement.createFactory=function(type){var factory=ReactElement.createElement.bind(null,type);factory.type=type;return factory};ReactElement.cloneAndReplaceKey=function(oldElement,newKey){var newElement=ReactElement(oldElement.type,newKey,oldElement.ref,oldElement._self,oldElement._source,oldElement._owner,oldElement.props);return newElement};ReactElement.cloneAndReplaceProps=function(oldElement,newProps){ var newElement=ReactElement(oldElement.type,oldElement.key,oldElement.ref,oldElement._self,oldElement._source,oldElement._owner,newProps);if(process.env.NODE_ENV!=="production"){newElement._store.validated=oldElement._store.validated}return newElement};ReactElement.cloneElement=function(element,config,children){var propName;var props=assign({},element.props);var key=element.key;var ref=element.ref;var self=element._self;var source=element._source;var owner=element._owner;if(config!=null){if(config.ref!==undefined){ref=config.ref;owner=ReactCurrentOwner.current}if(config.key!==undefined){key=""+config.key}for(propName in config){if(config.hasOwnProperty(propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName]}}}var childrenLength=arguments.length-2;if(childrenLength===1){props.children=children}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2]}props.children=childArray}return ReactElement(element.type,key,ref,self,source,owner,props)};ReactElement.isValidElement=function(object){return typeof object==="object"&&object!==null&&object.$$typeof===REACT_ELEMENT_TYPE};module.exports=ReactElement}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactPerf={enableMeasure:false,storedMeasure:_noMeasure,measureMethods:function(object,objectName,methodNames){if(process.env.NODE_ENV!=="production"){for(var key in methodNames){if(!methodNames.hasOwnProperty(key)){continue}object[key]=ReactPerf.measure(objectName,methodNames[key],object[key])}}},measure:function(objName,fnName,func){if(process.env.NODE_ENV!=="production"){var measuredFunc=null;var wrapper=function(){if(ReactPerf.enableMeasure){if(!measuredFunc){measuredFunc=ReactPerf.storedMeasure(objName,fnName,func)}return measuredFunc.apply(this,arguments)}return func.apply(this,arguments)};wrapper.displayName=objName+"_"+fnName;return wrapper}return func},injection:{injectMeasure:function(measure){ReactPerf.storedMeasure=measure}}};function _noMeasure(objName,fnName,func){return func}module.exports=ReactPerf}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var Utils=__webpack_require__(6);var AxisOptions_1=__webpack_require__(26);var Dimensions_1=__webpack_require__(27);var SeriesOptions_1=__webpack_require__(28);var SymbolOptions_1=__webpack_require__(29);var Options=function(){function Options(js){this.doubleClickEnabled=true;this.series=[];this.zoom={x:false,y:false,key:"altKey"};this.symbols=[];this.pan={x:function(){return undefined},x2:function(){return undefined},y:function(){return undefined},y2:function(){return undefined}};this.axes={x:{},y:{}};this.margin=Dimensions_1.Dimensions.getDefaultMargins();this.grid={x:false,y:true};var options=Utils.ObjectUtils.extend(this,js);this.margin=this.sanitizeMargin(Options.getObject(options.margin,this.margin));this.series=this.sanitizeSeries(Options.getArray(options.series));this.symbols=this.sanitizeSymbols(Options.getArray(options.symbols));this.axes=this.sanitizeAxes(Options.getObject(options.axes,this.axes));this.grid=this.sanitizeTwoAxesOptions(options.grid,this.grid);this.pan=this.sanitizePanOptions(options.pan,this.pan);this.zoom=this.sanitizeZoomOptions(options.zoom,this.zoom);this.tooltipHook=Options.getFunction(options.tooltipHook);this.doubleClickEnabled=Options.getBoolean(options.doubleClickEnabled,false)}Options.prototype.sanitizeMargin=function(margin){return{top:Options.getNumber(margin.top,0),left:Options.getNumber(margin.left,0),bottom:Options.getNumber(margin.bottom,0),right:Options.getNumber(margin.right,0)}};Options.prototype.sanitizeSeries=function(series){return series.map(function(s){return new SeriesOptions_1.SeriesOptions(s)})};Options.prototype.sanitizeZoomOptions=function(object,def){var axis=this.sanitizeTwoAxesOptions(object,def);var trigger=Options.getString(object.key,def.key);if(["altKey","shiftKey","ctrlKey"].indexOf(trigger)===-1){console.warn("Unknown zoom key "+trigger+" ! Default `altKey` is used.");trigger=def.key}return{x:Options.getBoolean(object.x,def.x),y:Options.getBoolean(object.y,def.y),key:trigger}};Options.prototype.sanitizeSymbols=function(symbols){return symbols.map(function(s){return new SymbolOptions_1.SymbolOptions(s)})};Options.prototype.sanitizeTwoAxesOptions=function(object,def){return{x:Options.getBoolean(object.x,def.x),y:Options.getBoolean(object.y,def.y)}};Options.prototype.sanitizePanOptions=function(object,def){return{x:this.sanitizePanOption(object.x),x2:this.sanitizePanOption(object.x2),y:this.sanitizePanOption(object.y),y2:this.sanitizePanOption(object.y2)}};Options.prototype.sanitizePanOption=function(option){if(option===undefined){return function(domain){return undefined}}else if(Utils.ObjectUtils.isBoolean(option)){if(option){return function(domain){return domain}}else{return function(domain){return undefined}}}else if(Utils.ObjectUtils.isFunction(option)){return option}else{throw new Error("Pan option should either be a Boolean or a function. Please RTFM.")}};Options.prototype.sanitizeAxes=function(axes){return Object.keys(axes).reduce(function(prev,key){prev[key]=new AxisOptions_1.AxisOptions(axes[key]);return prev},{})};Options.prototype.getAbsKey=function(){if(!this.axes[AxisOptions_1.AxisOptions.SIDE.X]){throw new TypeError("Cannot find abs key : "+AxisOptions_1.AxisOptions.SIDE.X)}return this.axes[AxisOptions_1.AxisOptions.SIDE.X].key};Options.prototype.getVisibleDatasets=function(){var datasets=[];this.series.forEach(function(series){if(series.visible){if(datasets.indexOf(series.dataset)===-1){datasets.push(series.dataset)}}});return datasets};Options.prototype.getVisibleSeriesBySide=function(side){return this.series.filter(function(s){return s.visible&&s.axis===side})};Options.prototype.getSeriesAndDatasetBySide=function(side){if(!AxisOptions_1.AxisOptions.isValidSide(side)){throw new TypeError("Cannot get axis side : "+side)}if(side===AxisOptions_1.AxisOptions.SIDE.Y2&&!this.axes[side]){side=AxisOptions_1.AxisOptions.SIDE.Y}var datasetsForSide=[];var seriesForDataset={};this.series.forEach(function(series){if(series.visible&&series.axis===side){datasetsForSide.push(series.dataset);if(!seriesForDataset[series.dataset]){seriesForDataset[series.dataset]=[]}seriesForDataset[series.dataset].push(series)}});return{seriesForDataset:seriesForDataset,datasetsForSide:datasetsForSide}};Options.prototype.getByAxisSide=function(side){if(!AxisOptions_1.AxisOptions.isValidSide(side)){throw new TypeError("Cannot get axis side : "+side)}if(!this.axes[side]){if(side===AxisOptions_1.AxisOptions.SIDE.Y2){return this.axes[AxisOptions_1.AxisOptions.SIDE.Y]}else if(side===AxisOptions_1.AxisOptions.SIDE.X2){return this.axes[AxisOptions_1.AxisOptions.SIDE.X]}}return this.axes[side]};Options.prototype.getSeriesByType=function(type){if(!SeriesOptions_1.SeriesOptions.isValidType(type)){throw new TypeError("Unknown series type: "+type)}return this.series.filter(function(s){return s.hasType(type)})};Options.prototype.getSymbolsByType=function(type){if(!SymbolOptions_1.SymbolOptions.isValidType(type)){throw new TypeError("Unknown symbols type: "+type)}return this.symbols.filter(function(s){return s.type===type})};Options.getBoolean=function(value,defaultValue){if(defaultValue===void 0){defaultValue=true}if(typeof value==="boolean"){return value}return defaultValue};Options.getNumber=function(value,defaultValue){var n=parseFloat(value);return!isNaN(n)?n:defaultValue};Options.getDate=function(value,defaultValue){return value instanceof Date?value:defaultValue};Options.getFunction=function(value){return value instanceof Function?value:undefined};Options.getString=function(value,defaultValue){return value?String(value):defaultValue};Options.getIdentifier=function(value){var s=Options.getString(value);return s.replace(/[^a-zA-Z0-9\-_]/gi,"")};Options.getObject=function(value,defaultValue){if(defaultValue===void 0){defaultValue={}}if(!Utils.ObjectUtils.isObject(value)){throw TypeError(value+" option must be an object.")}return Utils.ObjectUtils.extend(defaultValue,value)};Options.getArray=function(value,defaultValue){if(defaultValue===void 0){defaultValue=[]}return defaultValue.concat(value)};return Options}();exports.Options=Options},function(module,exports,__webpack_require__){"use strict";(function(process){var CallbackQueue=__webpack_require__(67);var PooledClass=__webpack_require__(20);var ReactPerf=__webpack_require__(12);var ReactReconciler=__webpack_require__(22);var Transaction=__webpack_require__(41);var assign=__webpack_require__(3);var invariant=__webpack_require__(2);var dirtyComponents=[];var asapCallbackQueue=CallbackQueue.getPooled();var asapEnqueued=false;var batchingStrategy=null;function ensureInjected(){!(ReactUpdates.ReactReconcileTransaction&&batchingStrategy)?process.env.NODE_ENV!=="production"?invariant(false,"ReactUpdates: must inject a reconcile transaction class and batching "+"strategy"):invariant(false):undefined}var NESTED_UPDATES={initialize:function(){this.dirtyComponentsLength=dirtyComponents.length},close:function(){if(this.dirtyComponentsLength!==dirtyComponents.length){dirtyComponents.splice(0,this.dirtyComponentsLength);flushBatchedUpdates()}else{dirtyComponents.length=0}}};var UPDATE_QUEUEING={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}};var TRANSACTION_WRAPPERS=[NESTED_UPDATES,UPDATE_QUEUEING];function ReactUpdatesFlushTransaction(){this.reinitializeTransaction();this.dirtyComponentsLength=null;this.callbackQueue=CallbackQueue.getPooled();this.reconcileTransaction=ReactUpdates.ReactReconcileTransaction.getPooled(false)}assign(ReactUpdatesFlushTransaction.prototype,Transaction.Mixin,{getTransactionWrappers:function(){return TRANSACTION_WRAPPERS},destructor:function(){this.dirtyComponentsLength=null;CallbackQueue.release(this.callbackQueue);this.callbackQueue=null;ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);this.reconcileTransaction=null},perform:function(method,scope,a){return Transaction.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,method,scope,a)}});PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);function batchedUpdates(callback,a,b,c,d,e){ensureInjected();batchingStrategy.batchedUpdates(callback,a,b,c,d,e)}function mountOrderComparator(c1,c2){return c1._mountOrder-c2._mountOrder}function runBatchedUpdates(transaction){var len=transaction.dirtyComponentsLength;!(len===dirtyComponents.length)?process.env.NODE_ENV!=="production"?invariant(false,"Expected flush transaction's stored dirty-components length (%s) to "+"match dirty-components array length (%s).",len,dirtyComponents.length):invariant(false):undefined;dirtyComponents.sort(mountOrderComparator);for(var i=0;i<len;i++){var component=dirtyComponents[i];var callbacks=component._pendingCallbacks;component._pendingCallbacks=null;ReactReconciler.performUpdateIfNecessary(component,transaction.reconcileTransaction);if(callbacks){for(var j=0;j<callbacks.length;j++){transaction.callbackQueue.enqueue(callbacks[j],component.getPublicInstance())}}}}var flushBatchedUpdates=function(){while(dirtyComponents.length||asapEnqueued){if(dirtyComponents.length){var transaction=ReactUpdatesFlushTransaction.getPooled();transaction.perform(runBatchedUpdates,null,transaction);ReactUpdatesFlushTransaction.release(transaction)}if(asapEnqueued){asapEnqueued=false;var queue=asapCallbackQueue;asapCallbackQueue=CallbackQueue.getPooled();queue.notifyAll();CallbackQueue.release(queue)}}};flushBatchedUpdates=ReactPerf.measure("ReactUpdates","flushBatchedUpdates",flushBatchedUpdates);function enqueueUpdate(component){ensureInjected();if(!batchingStrategy.isBatchingUpdates){batchingStrategy.batchedUpdates(enqueueUpdate,component);return}dirtyComponents.push(component)}function asap(callback,context){!batchingStrategy.isBatchingUpdates?process.env.NODE_ENV!=="production"?invariant(false,"ReactUpdates.asap: Can't enqueue an asap callback in a context where"+"updates are not being batched."):invariant(false):undefined;asapCallbackQueue.enqueue(callback,context);asapEnqueued=true}var ReactUpdatesInjection={injectReconcileTransaction:function(ReconcileTransaction){!ReconcileTransaction?process.env.NODE_ENV!=="production"?invariant(false,"ReactUpdates: must provide a reconcile transaction class"):invariant(false):undefined;ReactUpdates.ReactReconcileTransaction=ReconcileTransaction},injectBatchingStrategy:function(_batchingStrategy){!_batchingStrategy?process.env.NODE_ENV!=="production"?invariant(false,"ReactUpdates: must provide a batching strategy"):invariant(false):undefined;!(typeof _batchingStrategy.batchedUpdates==="function")?process.env.NODE_ENV!=="production"?invariant(false,"ReactUpdates: must provide a batchedUpdates() function"):invariant(false):undefined;!(typeof _batchingStrategy.isBatchingUpdates==="boolean")?process.env.NODE_ENV!=="production"?invariant(false,"ReactUpdates: must provide an isBatchingUpdates boolean attribute"):invariant(false):undefined;batchingStrategy=_batchingStrategy}};var ReactUpdates={ReactReconcileTransaction:null,batchedUpdates:batchedUpdates,enqueueUpdate:enqueueUpdate,flushBatchedUpdates:flushBatchedUpdates,injection:ReactUpdatesInjection,asap:asap};module.exports=ReactUpdates}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";function makeEmptyFunction(arg){return function(){return arg}}function emptyFunction(){}emptyFunction.thatReturns=makeEmptyFunction;emptyFunction.thatReturnsFalse=makeEmptyFunction(false);emptyFunction.thatReturnsTrue=makeEmptyFunction(true);emptyFunction.thatReturnsNull=makeEmptyFunction(null);emptyFunction.thatReturnsThis=function(){return this};emptyFunction.thatReturnsArgument=function(arg){return arg};module.exports=emptyFunction},function(module,exports,__webpack_require__){"use strict";function __export(m){for(var p in m)if(!exports.hasOwnProperty(p))exports[p]=m[p]}Object.defineProperty(exports,"__esModule",{value:true});__export(__webpack_require__(25));__export(__webpack_require__(57));__export(__webpack_require__(58));__export(__webpack_require__(55));__export(__webpack_require__(56))},function(module,exports,__webpack_require__){"use strict";var keyMirror=__webpack_require__(36);var PropagationPhases=keyMirror({bubbled:null,captured:null});var topLevelTypes=keyMirror({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null});var EventConstants={topLevelTypes:topLevelTypes,PropagationPhases:PropagationPhases};module.exports=EventConstants},function(module,exports,__webpack_require__){"use strict";var ReactCurrentOwner={current:null};module.exports=ReactCurrentOwner},function(module,exports,__webpack_require__){"use strict";var keyOf=function(oneKeyObj){var key;for(key in oneKeyObj){if(!oneKeyObj.hasOwnProperty(key)){continue}return key}return null};module.exports=keyOf},function(module,exports,__webpack_require__){"use strict";(function(process){var invariant=__webpack_require__(2);var oneArgumentPooler=function(copyFieldsFrom){var Klass=this;if(Klass.instancePool.length){var instance=Klass.instancePool.pop();Klass.call(instance,copyFieldsFrom);return instance}else{return new Klass(copyFieldsFrom)}};var twoArgumentPooler=function(a1,a2){var Klass=this;if(Klass.instancePool.length){var instance=Klass.instancePool.pop();Klass.call(instance,a1,a2);return instance}else{return new Klass(a1,a2)}};var threeArgumentPooler=function(a1,a2,a3){var Klass=this;if(Klass.instancePool.length){var instance=Klass.instancePool.pop();Klass.call(instance,a1,a2,a3);return instance}else{return new Klass(a1,a2,a3)}};var fourArgumentPooler=function(a1,a2,a3,a4){var Klass=this;if(Klass.instancePool.length){var instance=Klass.instancePool.pop();Klass.call(instance,a1,a2,a3,a4);return instance}else{return new Klass(a1,a2,a3,a4)}};var fiveArgumentPooler=function(a1,a2,a3,a4,a5){var Klass=this;if(Klass.instancePool.length){var instance=Klass.instancePool.pop();Klass.call(instance,a1,a2,a3,a4,a5);return instance}else{return new Klass(a1,a2,a3,a4,a5)}};var standardReleaser=function(instance){var Klass=this;!(instance instanceof Klass)?process.env.NODE_ENV!=="production"?invariant(false,"Trying to release an instance into a pool of a different type."):invariant(false):undefined;instance.destructor();if(Klass.instancePool.length<Klass.poolSize){Klass.instancePool.push(instance)}};var DEFAULT_POOL_SIZE=10;var DEFAULT_POOLER=oneArgumentPooler;var addPoolingTo=function(CopyConstructor,pooler){var NewKlass=CopyConstructor;NewKlass.instancePool=[];NewKlass.getPooled=pooler||DEFAULT_POOLER;if(!NewKlass.poolSize){NewKlass.poolSize=DEFAULT_POOL_SIZE}NewKlass.release=standardReleaser;return NewKlass};var PooledClass={addPoolingTo:addPoolingTo,oneArgumentPooler:oneArgumentPooler,twoArgumentPooler:twoArgumentPooler,threeArgumentPooler:threeArgumentPooler,fourArgumentPooler:fourArgumentPooler,fiveArgumentPooler:fiveArgumentPooler};module.exports=PooledClass}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var invariant=__webpack_require__(2);function checkMask(value,bitmask){return(value&bitmask)===bitmask}var DOMPropertyInjection={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:32|16,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(domPropertyConfig){var Injection=DOMPropertyInjection;var Properties=domPropertyConfig.Properties||{};var DOMAttributeNamespaces=domPropertyConfig.DOMAttributeNamespaces||{};var DOMAttributeNames=domPropertyConfig.DOMAttributeNames||{};var DOMPropertyNames=domPropertyConfig.DOMPropertyNames||{};var DOMMutationMethods=domPropertyConfig.DOMMutationMethods||{};if(domPropertyConfig.isCustomAttribute){DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute)}for(var propName in Properties){!!DOMProperty.properties.hasOwnProperty(propName)?process.env.NODE_ENV!=="production"?invariant(false,"injectDOMPropertyConfig(...): You're trying to inject DOM property "+"'%s' which has already been injected. You may be accidentally "+"injecting the same DOM property config twice, or you may be "+"injecting two configs that have conflicting property names.",propName):invariant(false):undefined;var lowerCased=propName.toLowerCase();var propConfig=Properties[propName];var propertyInfo={attributeName:lowerCased,attributeNamespace:null,propertyName:propName,mutationMethod:null,mustUseAttribute:checkMask(propConfig,Injection.MUST_USE_ATTRIBUTE),mustUseProperty:checkMask(propConfig,Injection.MUST_USE_PROPERTY),hasSideEffects:checkMask(propConfig,Injection.HAS_SIDE_EFFECTS),hasBooleanValue:checkMask(propConfig,Injection.HAS_BOOLEAN_VALUE),hasNumericValue:checkMask(propConfig,Injection.HAS_NUMERIC_VALUE),hasPositiveNumericValue:checkMask(propConfig,Injection.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:checkMask(propConfig,Injection.HAS_OVERLOADED_BOOLEAN_VALUE)};!(!propertyInfo.mustUseAttribute||!propertyInfo.mustUseProperty)?process.env.NODE_ENV!=="production"?invariant(false,"DOMProperty: Cannot require using both attribute and property: %s",propName):invariant(false):undefined;!(propertyInfo.mustUseProperty||!propertyInfo.hasSideEffects)?process.env.NODE_ENV!=="production"?invariant(false,"DOMProperty: Properties that have side effects must use property: %s",propName):invariant(false):undefined;!(propertyInfo.hasBooleanValue+propertyInfo.hasNumericValue+propertyInfo.hasOverloadedBooleanValue<=1)?process.env.NODE_ENV!=="production"?invariant(false,"DOMProperty: Value can be one of boolean, overloaded boolean, or "+"numeric value, but not a combination: %s",propName):invariant(false):undefined;if(process.env.NODE_ENV!=="production"){DOMProperty.getPossibleStandardName[lowerCased]=propName}if(DOMAttributeNames.hasOwnProperty(propName)){var attributeName=DOMAttributeNames[propName];propertyInfo.attributeName=attributeName;if(process.env.NODE_ENV!=="production"){DOMProperty.getPossibleStandardName[attributeName]=propName}}if(DOMAttributeNamespaces.hasOwnProperty(propName)){propertyInfo.attributeNamespace=DOMAttributeNamespaces[propName]}if(DOMPropertyNames.hasOwnProperty(propName)){propertyInfo.propertyName=DOMPropertyNames[propName]}if(DOMMutationMethods.hasOwnProperty(propName)){propertyInfo.mutationMethod=DOMMutationMethods[propName]}DOMProperty.properties[propName]=propertyInfo}}};var defaultValueCache={};var DOMProperty={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:process.env.NODE_ENV!=="production"?{}:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(attributeName){for(var i=0;i<DOMProperty._isCustomAttributeFunctions.length;i++){var isCustomAttributeFn=DOMProperty._isCustomAttributeFunctions[i];if(isCustomAttributeFn(attributeName)){return true}}return false},getDefaultValueForProperty:function(nodeName,prop){var nodeDefaults=defaultValueCache[nodeName];var testElement;if(!nodeDefaults){defaultValueCache[nodeName]=nodeDefaults={}}if(!(prop in nodeDefaults)){testElement=document.createElement(nodeName);nodeDefaults[prop]=testElement[prop]}return nodeDefaults[prop]},injection:DOMPropertyInjection};module.exports=DOMProperty}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ReactRef=__webpack_require__(173);function attachRefs(){ReactRef.attachRefs(this,this._currentElement)}var ReactReconciler={mountComponent:function(internalInstance,rootID,transaction,context){var markup=internalInstance.mountComponent(rootID,transaction,context);if(internalInstance._currentElement&&internalInstance._currentElement.ref!=null){transaction.getReactMountReady().enqueue(attachRefs,internalInstance)}return markup},unmountComponent:function(internalInstance){ReactRef.detachRefs(internalInstance,internalInstance._currentElement);internalInstance.unmountComponent()},receiveComponent:function(internalInstance,nextElement,transaction,context){var prevElement=internalInstance._currentElement;if(nextElement===prevElement&&context===internalInstance._context){return}var refsChanged=ReactRef.shouldUpdateRefs(prevElement,nextElement);if(refsChanged){ReactRef.detachRefs(internalInstance,prevElement)}internalInstance.receiveComponent(nextElement,transaction,context);if(refsChanged&&internalInstance._currentElement&&internalInstance._currentElement.ref!=null){transaction.getReactMountReady().enqueue(attachRefs,internalInstance)}},performUpdateIfNecessary:function(internalInstance,transaction){internalInstance.performUpdateIfNecessary(transaction)}};module.exports=ReactReconciler},function(module,exports,__webpack_require__){"use strict";(function(process){var PooledClass=__webpack_require__(20);var assign=__webpack_require__(3);var emptyFunction=__webpack_require__(15);var warning=__webpack_require__(4);var EventInterface={type:null,target:null,currentTarget:emptyFunction.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(event){return event.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function SyntheticEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){this.dispatchConfig=dispatchConfig;this.dispatchMarker=dispatchMarker;this.nativeEvent=nativeEvent;var Interface=this.constructor.Interface;for(var propName in Interface){if(!Interface.hasOwnProperty(propName)){continue}var normalize=Interface[propName];if(normalize){this[propName]=normalize(nativeEvent)}else{if(propName==="target"){this.target=nativeEventTarget}else{this[propName]=nativeEvent[propName]}}}var defaultPrevented=nativeEvent.defaultPrevented!=null?nativeEvent.defaultPrevented:nativeEvent.returnValue===false;if(defaultPrevented){this.isDefaultPrevented=emptyFunction.thatReturnsTrue}else{this.isDefaultPrevented=emptyFunction.thatReturnsFalse}this.isPropagationStopped=emptyFunction.thatReturnsFalse}assign(SyntheticEvent.prototype,{preventDefault:function(){this.defaultPrevented=true;var event=this.nativeEvent;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(event,"This synthetic event is reused for performance reasons. If you're "+"seeing this, you're calling `preventDefault` on a "+"released/nullified synthetic event. This is a no-op. See "+"https://fb.me/react-event-pooling for more information."):undefined}if(!event){return}if(event.preventDefault){event.preventDefault()}else{event.returnValue=false}this.isDefaultPrevented=emptyFunction.thatReturnsTrue},stopPropagation:function(){var event=this.nativeEvent;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(event,"This synthetic event is reused for performance reasons. If you're "+"seeing this, you're calling `stopPropagation` on a "+"released/nullified synthetic event. This is a no-op. See "+"https://fb.me/react-event-pooling for more information."):undefined}if(!event){return}if(event.stopPropagation){event.stopPropagation()}else{event.cancelBubble=true}this.isPropagationStopped=emptyFunction.thatReturnsTrue},persist:function(){this.isPersistent=emptyFunction.thatReturnsTrue},isPersistent:emptyFunction.thatReturnsFalse,destructor:function(){var Interface=this.constructor.Interface;for(var propName in Interface){this[propName]=null}this.dispatchConfig=null;this.dispatchMarker=null;this.nativeEvent=null}});SyntheticEvent.Interface=EventInterface;SyntheticEvent.augmentClass=function(Class,Interface){var Super=this;var prototype=Object.create(Super.prototype);assign(prototype,Class.prototype);Class.prototype=prototype;Class.prototype.constructor=Class;Class.Interface=assign({},Super.Interface,Interface);Class.augmentClass=Super.augmentClass;PooledClass.addPoolingTo(Class,PooledClass.fourArgumentPooler)};PooledClass.addPoolingTo(SyntheticEvent,PooledClass.fourArgumentPooler);module.exports=SyntheticEvent}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactRootIndex=__webpack_require__(113);var invariant=__webpack_require__(2);var SEPARATOR=".";var SEPARATOR_LENGTH=SEPARATOR.length;var MAX_TREE_DEPTH=1e4;function getReactRootIDString(index){return SEPARATOR+index.toString(36)}function isBoundary(id,index){return id.charAt(index)===SEPARATOR||index===id.length}function isValidID(id){return id===""||id.charAt(0)===SEPARATOR&&id.charAt(id.length-1)!==SEPARATOR}function isAncestorIDOf(ancestorID,descendantID){return descendantID.indexOf(ancestorID)===0&&isBoundary(descendantID,ancestorID.length)}function getParentID(id){return id?id.substr(0,id.lastIndexOf(SEPARATOR)):""}function getNextDescendantID(ancestorID,destinationID){!(isValidID(ancestorID)&&isValidID(destinationID))?process.env.NODE_ENV!=="production"?invariant(false,"getNextDescendantID(%s, %s): Received an invalid React DOM ID.",ancestorID,destinationID):invariant(false):undefined;!isAncestorIDOf(ancestorID,destinationID)?process.env.NODE_ENV!=="production"?invariant(false,"getNextDescendantID(...): React has made an invalid assumption about "+"the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.",ancestorID,destinationID):invariant(false):undefined;if(ancestorID===destinationID){return ancestorID}var start=ancestorID.length+SEPARATOR_LENGTH;var i;for(i=start;i<destinationID.length;i++){if(isBoundary(destinationID,i)){break}}return destinationID.substr(0,i)}function getFirstCommonAncestorID(oneID,twoID){var minLength=Math.min(oneID.length,twoID.length);if(minLength===0){return""}var lastCommonMarkerIndex=0;for(var i=0;i<=minLength;i++){if(isBoundary(oneID,i)&&isBoundary(twoID,i)){lastCommonMarkerIndex=i}else if(oneID.charAt(i)!==twoID.charAt(i)){break}}var longestCommonID=oneID.substr(0,lastCommonMarkerIndex);!isValidID(longestCommonID)?process.env.NODE_ENV!=="production"?invariant(false,"getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s",oneID,twoID,longestCommonID):invariant(false):undefined;return longestCommonID}function traverseParentPath(start,stop,cb,arg,skipFirst,skipLast){start=start||"";stop=stop||"";!(start!==stop)?process.env.NODE_ENV!=="production"?invariant(false,"traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.",start):invariant(false):undefined;var traverseUp=isAncestorIDOf(stop,start);!(traverseUp||isAncestorIDOf(start,stop))?process.env.NODE_ENV!=="production"?invariant(false,"traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do "+"not have a parent path.",start,stop):invariant(false):undefined;var depth=0;var traverse=traverseUp?getParentID:getNextDescendantID;for(var id=start;;id=traverse(id,stop)){var ret;if((!skipFirst||id!==start)&&(!skipLast||id!==stop)){ret=cb(id,traverseUp,arg)}if(ret===false||id===stop){break}!(depth++<MAX_TREE_DEPTH)?process.env.NODE_ENV!=="production"?invariant(false,"traverseParentPath(%s, %s, ...): Detected an infinite loop while "+"traversing the React DOM ID tree. This may be due to malformed IDs: %s",start,stop,id):invariant(false):undefined}}var ReactInstanceHandles={createReactRootID:function(){return getReactRootIDString(ReactRootIndex.createReactRootIndex())},createReactID:function(rootID,name){return rootID+name},getReactRootIDFromNodeID:function(id){if(id&&id.charAt(0)===SEPARATOR&&id.length>1){var index=id.indexOf(SEPARATOR,1);return index>-1?id.substr(0,index):id}return null},traverseEnterLeave:function(leaveID,enterID,cb,upArg,downArg){var ancestorID=getFirstCommonAncestorID(leaveID,enterID);if(ancestorID!==leaveID){traverseParentPath(leaveID,ancestorID,cb,upArg,false,true)}if(ancestorID!==enterID){traverseParentPath(ancestorID,enterID,cb,downArg,true,false)}},traverseTwoPhase:function(targetID,cb,arg){if(targetID){traverseParentPath("",targetID,cb,arg,true,false);traverseParentPath(targetID,"",cb,arg,false,true)}},traverseTwoPhaseSkipTarget:function(targetID,cb,arg){if(targetID){traverseParentPath("",targetID,cb,arg,true,true);traverseParentPath(targetID,"",cb,arg,true,true)}},traverseAncestors:function(targetID,cb,arg){traverseParentPath("",targetID,cb,arg,true,false)},getFirstCommonAncestorID:getFirstCommonAncestorID,_getNextDescendantID:getNextDescendantID,isAncestorIDOf:isAncestorIDOf,SEPARATOR:SEPARATOR};module.exports=ReactInstanceHandles}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true}) ;var d3=__webpack_require__(1);var Factory=__webpack_require__(10);var SeriesFactory=function(_super){__extends(SeriesFactory,_super);function SeriesFactory(){return _super!==null&&_super.apply(this,arguments)||this}SeriesFactory.prototype.create=function(){this.createContainer(this.factoryMgr.get("container").data);this.eventMgr.on("data-update."+this.type,this.update.bind(this));this.eventMgr.on("pan."+this.type,this.softUpdate.bind(this));this.eventMgr.on("zoom-end."+this.type,this.softUpdate.bind(this));this.eventMgr.on("outer-world-domain-change."+this.key,this.softUpdate.bind(this));this.eventMgr.on("resize."+this.type,this.softUpdate.bind(this))};SeriesFactory.prototype.update=function(data,options){this.data=data;this.options=options;this.softUpdate()};SeriesFactory.prototype.getAxes=function(series){return{xAxis:this.factoryMgr.get("x-axis"),yAxis:this.factoryMgr.get(series.axis+"-axis")}};SeriesFactory.prototype.softUpdate=function(){var series=this.options.getSeriesByType(this.type).filter(function(s){return s.visible});this.updateSeriesContainer(series)};SeriesFactory.prototype.destroy=function(){this.svg.remove()};SeriesFactory.prototype.createContainer=function(parent){this.svg=parent.append("g").attr("class",this.type+SeriesFactory.containerClassSuffix)};SeriesFactory.prototype.updateSeriesContainer=function(series){var _this=this;var self=this;var select=function(that){return d3.select(that)};var update=function(_groups){_groups.each(function(s,i){self.updateData(select(this),s,i,series.length)}).each(function(){self.styleSeries(select(this))})};var init=function(_groups){_groups.attr("class",function(d){return _this.type+SeriesFactory.seriesClassSuffix+" "+d.id})};var groups=this.svg.selectAll("."+this.type+SeriesFactory.seriesClassSuffix).data(series,function(d){return d.id});groups.call(update);groups.enter().append("g").call(init).merge(groups).call(update);groups.exit().remove()};SeriesFactory.prototype.updateData=function(group,series,index,numSeries){};SeriesFactory.prototype.styleSeries=function(group){};return SeriesFactory}(Factory.BaseFactory);SeriesFactory.containerClassSuffix="-data";SeriesFactory.seriesClassSuffix="-series";exports.SeriesFactory=SeriesFactory},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Options_1=__webpack_require__(13);var AxisOptions=function(){function AxisOptions(js){if(js===void 0){js={}}this.includeZero=false;this.type="linear";this.key="x";this.padding={min:0,max:0};this.ticksShift={x:0,y:0};this.parse(js)}AxisOptions.prototype.parse=function(js){this.type=Options_1.Options.getString(js.type,"linear");this.key=js.key;this.padding=Options_1.Options.getObject(js.padding||{},this.padding);this.includeZero=Options_1.Options.getBoolean(js.includeZero,false);this.tickFormat=Options_1.Options.getFunction(js.tickFormat);this.ticks=js.ticks;if(js.ticksShift){this.ticksShift={x:Options_1.Options.getNumber(js.ticksShift.x,0),y:Options_1.Options.getNumber(js.ticksShift.y,0)}}if(this.type===AxisOptions.TYPE.LINEAR){this.min=Options_1.Options.getNumber(js.min,undefined);this.max=Options_1.Options.getNumber(js.max,undefined)}else if(this.type===AxisOptions.TYPE.DATE){this.min=Options_1.Options.getDate(js.min,undefined);this.max=Options_1.Options.getDate(js.max,undefined)}};AxisOptions.isValidSide=function(side){return d3.values(AxisOptions.SIDE).indexOf(side)!==-1};AxisOptions.prototype.configure=function(axis){axis.tickFormat(this.tickFormat);if(this.ticks instanceof Array){axis.tickValues(this.ticks)}else if(typeof this.ticks==="number"){axis.ticks(this.ticks)}return axis};return AxisOptions}();AxisOptions.SIDE={X:"x",X2:"x2",Y:"y",Y2:"y2"};AxisOptions.TYPE={LINEAR:"linear",DATE:"date",LOG:"log"};exports.AxisOptions=AxisOptions},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var Options_1=__webpack_require__(13);var Dimensions=function(){function Dimensions(){this.width=600;this.height=200;this.innerWidth=560;this.innerHeight=160;this.margin=Dimensions.getDefaultMargins()}Dimensions.getDefaultMargins=function(){return{top:0,left:40,bottom:40,right:40}};Dimensions.prototype.updateMargins=function(options){var _this=this;if(!options||!options.margin){return}var fn=function(prop){return _this.margin[prop]=Options_1.Options.getNumber(options.margin[prop],_this.margin[prop])};fn("top");fn("bottom");fn("left");fn("right")};Dimensions.prototype.getDimensionByProperty=function(element,propertyName){var style=window.getComputedStyle(element,null);return+style.getPropertyValue(propertyName).replace(/px$/,"")};Dimensions.prototype.fromParentElement=function(parent){if(!parent){return}var hPadding=this.getDimensionByProperty(parent,"padding-left")+this.getDimensionByProperty(parent,"padding-right");var vPadding=this.getDimensionByProperty(parent,"padding-top")+this.getDimensionByProperty(parent,"padding-bottom");this.width=parent.clientWidth-hPadding;this.height=parent.clientHeight-vPadding;this.innerHeight=this.height-this.margin.top-this.margin.bottom;this.innerWidth=this.width-this.margin.left-this.margin.right};return Dimensions}();exports.Dimensions=Dimensions},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Utils=__webpack_require__(6);var Options_1=__webpack_require__(13);var SeriesOptions=function(){function SeriesOptions(js){if(js===void 0){js={}}this.axis="y";this.type=["line"];this.visible=true;this.defined=function(point){return true};var options=this.sanitizeOptions(js);this.id=options.id||Utils.UUID.generate();this.axis=options.axis;this.interpolation=options.interpolation;this.dataset=options.dataset;this.key=options.key;this.color=options.color;this.visible=options.visible;this.label=options.label||options.id;if(options.defined){this.defined=options.defined}if(options.type.length>0){this.type=this.sanitizeType(options.type)}}SeriesOptions.prototype.sanitizeOptions=function(js){var options=Utils.ObjectUtils.extend(this,js);options.axis=this.sanitizeAxis(options.axis);options.interpolation=this.sanitizeInterpolation(options.interpolation);options.id=Options_1.Options.getString(options.id);options.type=Options_1.Options.getArray(options.type);options.dataset=Options_1.Options.getString(options.dataset);options.key=this.sanitizeKeys(options.key);options.color=Options_1.Options.getString(options.color);options.label=Options_1.Options.getString(options.label);options.visible=Options_1.Options.getBoolean(options.visible);options.defined=Options_1.Options.getFunction(options.defined);return options};SeriesOptions.prototype.sanitizeInterpolation=function(js){if(!js){return{mode:"linear",tension:.7}}return{mode:Options_1.Options.getString(js.mode,"linear"),tension:Options_1.Options.getNumber(js.tension,.7)}};SeriesOptions.prototype.sanitizeKeys=function(js){if(!js){return{y1:undefined}}if(typeof js==="string"){return{y1:Options_1.Options.getString(js)}}return{y0:Options_1.Options.getString(js.y0),y1:Options_1.Options.getString(js.y1)}};SeriesOptions.prototype.getToggledVisibility=function(){return!this.visible};SeriesOptions.prototype.sanitizeType=function(types){return types.filter(function(type){if(!SeriesOptions.isValidType(type)){console.warn("Unknow series type : "+type);return false}return true})};SeriesOptions.prototype.sanitizeAxis=function(axis){if(["y","y2"].indexOf(axis)===-1){throw TypeError(axis+" is not a valid series option for axis.")}return axis};SeriesOptions.prototype.isAColumn=function(){return this.hasType(SeriesOptions.TYPE.COLUMN)};SeriesOptions.prototype.isDashed=function(){return this.type.indexOf(SeriesOptions.TYPE.DASHED_LINE)!==-1};SeriesOptions.prototype.hasType=function(type){if(type===SeriesOptions.TYPE.LINE){return this.type.indexOf(type)!==-1||this.type.indexOf(SeriesOptions.TYPE.DASHED_LINE)!==-1}return this.type.indexOf(type)!==-1};SeriesOptions.prototype.hasTwoKeys=function(){return this.key.y0!==undefined};SeriesOptions.isValidType=function(type){return d3.values(SeriesOptions.TYPE).indexOf(type)!==-1};return SeriesOptions}();SeriesOptions.TYPE={DOT:"dot",LINE:"line",DASHED_LINE:"dashed-line",AREA:"area",COLUMN:"column"};exports.SeriesOptions=SeriesOptions},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Utils=__webpack_require__(6);var Options_1=__webpack_require__(13);var SymbolOptions=function(){function SymbolOptions(js){if(js===void 0){js={}}this.parse(js)}SymbolOptions.prototype.parse=function(js){if(!SymbolOptions.isValidType(js.type)){throw new Error("Unknown type for symbol: "+js.type)}this.type=Options_1.Options.getString(js.type);this.value=Options_1.Options.getNumber(js.value,0);this.color=Options_1.Options.getString(js.color,"lightgrey");this.axis=Options_1.Options.getString(js.axis,"y");this.id=Options_1.Options.getString(js.id,Utils.UUID.generate())};SymbolOptions.isValidType=function(type){return d3.values(SymbolOptions.TYPE).indexOf(type)!==-1};return SymbolOptions}();SymbolOptions.TYPE={HLINE:"hline",VLINE:"vline"};exports.SymbolOptions=SymbolOptions},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var Dataset=function(){function Dataset(values,id){this.fromJS(values,id)}Dataset.prototype.fromJS=function(values,id){this.id=id;this.values=values};return Dataset}();exports.Dataset=Dataset},function(module,exports,__webpack_require__){"use strict";(function(process){var emptyObject={};if(process.env.NODE_ENV!=="production"){Object.freeze(emptyObject)}module.exports=emptyObject}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var EventPluginRegistry=__webpack_require__(94);var EventPluginUtils=__webpack_require__(148);var ReactErrorUtils=__webpack_require__(106);var accumulateInto=__webpack_require__(115);var forEachAccumulated=__webpack_require__(116);var invariant=__webpack_require__(2);var warning=__webpack_require__(4);var listenerBank={};var eventQueue=null;var executeDispatchesAndRelease=function(event,simulated){if(event){EventPluginUtils.executeDispatchesInOrder(event,simulated);if(!event.isPersistent()){event.constructor.release(event)}}};var executeDispatchesAndReleaseSimulated=function(e){return executeDispatchesAndRelease(e,true)};var executeDispatchesAndReleaseTopLevel=function(e){return executeDispatchesAndRelease(e,false)};var InstanceHandle=null;function validateInstanceHandle(){var valid=InstanceHandle&&InstanceHandle.traverseTwoPhase&&InstanceHandle.traverseEnterLeave;process.env.NODE_ENV!=="production"?warning(valid,"InstanceHandle not injected before use!"):undefined}var EventPluginHub={injection:{injectMount:EventPluginUtils.injection.injectMount,injectInstanceHandle:function(InjectedInstanceHandle){InstanceHandle=InjectedInstanceHandle;if(process.env.NODE_ENV!=="production"){validateInstanceHandle()}},getInstanceHandle:function(){if(process.env.NODE_ENV!=="production"){validateInstanceHandle()}return InstanceHandle},injectEventPluginOrder:EventPluginRegistry.injectEventPluginOrder,injectEventPluginsByName:EventPluginRegistry.injectEventPluginsByName},eventNameDispatchConfigs:EventPluginRegistry.eventNameDispatchConfigs,registrationNameModules:EventPluginRegistry.registrationNameModules,putListener:function(id,registrationName,listener){!(typeof listener==="function")?process.env.NODE_ENV!=="production"?invariant(false,"Expected %s listener to be a function, instead got type %s",registrationName,typeof listener):invariant(false):undefined;var bankForRegistrationName=listenerBank[registrationName]||(listenerBank[registrationName]={});bankForRegistrationName[id]=listener;var PluginModule=EventPluginRegistry.registrationNameModules[registrationName];if(PluginModule&&PluginModule.didPutListener){PluginModule.didPutListener(id,registrationName,listener)}},getListener:function(id,registrationName){var bankForRegistrationName=listenerBank[registrationName];return bankForRegistrationName&&bankForRegistrationName[id]},deleteListener:function(id,registrationName){var PluginModule=EventPluginRegistry.registrationNameModules[registrationName];if(PluginModule&&PluginModule.willDeleteListener){PluginModule.willDeleteListener(id,registrationName)}var bankForRegistrationName=listenerBank[registrationName];if(bankForRegistrationName){delete bankForRegistrationName[id]}},deleteAllListeners:function(id){for(var registrationName in listenerBank){if(!listenerBank[registrationName][id]){continue}var PluginModule=EventPluginRegistry.registrationNameModules[registrationName];if(PluginModule&&PluginModule.willDeleteListener){PluginModule.willDeleteListener(id,registrationName)}delete listenerBank[registrationName][id]}},extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){var events;var plugins=EventPluginRegistry.plugins;for(var i=0;i<plugins.length;i++){var possiblePlugin=plugins[i];if(possiblePlugin){var extractedEvents=possiblePlugin.extractEvents(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget);if(extractedEvents){events=accumulateInto(events,extractedEvents)}}}return events},enqueueEvents:function(events){if(events){eventQueue=accumulateInto(eventQueue,events)}},processEventQueue:function(simulated){var processingEventQueue=eventQueue;eventQueue=null;if(simulated){forEachAccumulated(processingEventQueue,executeDispatchesAndReleaseSimulated)}else{forEachAccumulated(processingEventQueue,executeDispatchesAndReleaseTopLevel)}!!eventQueue?process.env.NODE_ENV!=="production"?invariant(false,"processEventQueue(): Additional events were enqueued while processing "+"an event queue. Support for this has not yet been implemented."):invariant(false):undefined;ReactErrorUtils.rethrowCaughtError()},__purge:function(){listenerBank={}},__getListenerBank:function(){return listenerBank}};module.exports=EventPluginHub}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var EventConstants=__webpack_require__(17);var EventPluginHub=__webpack_require__(32);var warning=__webpack_require__(4);var accumulateInto=__webpack_require__(115);var forEachAccumulated=__webpack_require__(116);var PropagationPhases=EventConstants.PropagationPhases;var getListener=EventPluginHub.getListener;function listenerAtPhase(id,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(id,registrationName)}function accumulateDirectionalDispatches(domID,upwards,event){if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(domID,"Dispatching id must not be null"):undefined}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(domID,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchIDs=accumulateInto(event._dispatchIDs,domID)}}function accumulateTwoPhaseDispatchesSingle(event){if(event&&event.dispatchConfig.phasedRegistrationNames){EventPluginHub.injection.getInstanceHandle().traverseTwoPhase(event.dispatchMarker,accumulateDirectionalDispatches,event)}}function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){EventPluginHub.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(event.dispatchMarker,accumulateDirectionalDispatches,event)}}function accumulateDispatches(id,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(id,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchIDs=accumulateInto(event._dispatchIDs,id)}}}function accumulateDirectDispatchesSingle(event){if(event&&event.dispatchConfig.registrationName){accumulateDispatches(event.dispatchMarker,null,event)}}function accumulateTwoPhaseDispatches(events){forEachAccumulated(events,accumulateTwoPhaseDispatchesSingle)}function accumulateTwoPhaseDispatchesSkipTarget(events){forEachAccumulated(events,accumulateTwoPhaseDispatchesSingleSkipTarget)}function accumulateEnterLeaveDispatches(leave,enter,fromID,toID){EventPluginHub.injection.getInstanceHandle().traverseEnterLeave(fromID,toID,accumulateDispatches,leave,enter)}function accumulateDirectDispatches(events){forEachAccumulated(events,accumulateDirectDispatchesSingle)}var EventPropagators={accumulateTwoPhaseDispatches:accumulateTwoPhaseDispatches,accumulateTwoPhaseDispatchesSkipTarget:accumulateTwoPhaseDispatchesSkipTarget,accumulateDirectDispatches:accumulateDirectDispatches,accumulateEnterLeaveDispatches:accumulateEnterLeaveDispatches};module.exports=EventPropagators}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ReactInstanceMap={remove:function(key){key._reactInternalInstance=undefined},get:function(key){return key._reactInternalInstance},has:function(key){return key._reactInternalInstance!==undefined},set:function(key,value){key._reactInternalInstance=value}};module.exports=ReactInstanceMap},function(module,exports,__webpack_require__){"use strict";var SyntheticEvent=__webpack_require__(23);var getEventTarget=__webpack_require__(78);var UIEventInterface={view:function(event){if(event.view){return event.view}var target=getEventTarget(event);if(target!=null&&target.window===target){return target}var doc=target.ownerDocument;if(doc){return doc.defaultView||doc.parentWindow}else{return window}},detail:function(event){return event.detail||0}};function SyntheticUIEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticEvent.augmentClass(SyntheticUIEvent,UIEventInterface);module.exports=SyntheticUIEvent},function(module,exports,__webpack_require__){"use strict";(function(process){var invariant=__webpack_require__(2);var keyMirror=function(obj){var ret={};var key;!(obj instanceof Object&&!Array.isArray(obj))?process.env.NODE_ENV!=="production"?invariant(false,"keyMirror(...): Argument must be an object."):invariant(false):undefined;for(key in obj){if(!obj.hasOwnProperty(key)){continue}ret[key]=key}return ret};module.exports=keyMirror}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var EventConstants=__webpack_require__(17);var EventPluginHub=__webpack_require__(32);var EventPluginRegistry=__webpack_require__(94);var ReactEventEmitterMixin=__webpack_require__(166);var ReactPerf=__webpack_require__(12);var ViewportMetrics=__webpack_require__(114);var assign=__webpack_require__(3);var isEventSupported=__webpack_require__(81);var alreadyListeningTo={};var isMonitoringScrollValue=false;var reactTopListenersCounter=0;var topEventMapping={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"};var topListenersIDKey="_reactListenersID"+String(Math.random()).slice(2);function getListeningForDocument(mountAt){if(!Object.prototype.hasOwnProperty.call(mountAt,topListenersIDKey)){mountAt[topListenersIDKey]=reactTopListenersCounter++;alreadyListeningTo[mountAt[topListenersIDKey]]={}}return alreadyListeningTo[mountAt[topListenersIDKey]]}var ReactBrowserEventEmitter=assign({},ReactEventEmitterMixin,{ReactEventListener:null,injection:{injectReactEventListener:function(ReactEventListener){ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);ReactBrowserEventEmitter.ReactEventListener=ReactEventListener}},setEnabled:function(enabled){if(ReactBrowserEventEmitter.ReactEventListener){ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled)}},isEnabled:function(){return!!(ReactBrowserEventEmitter.ReactEventListener&&ReactBrowserEventEmitter.ReactEventListener.isEnabled())},listenTo:function(registrationName,contentDocumentHandle){var mountAt=contentDocumentHandle;var isListening=getListeningForDocument(mountAt);var dependencies=EventPluginRegistry.registrationNameDependencies[registrationName];var topLevelTypes=EventConstants.topLevelTypes;for(var i=0;i<dependencies.length;i++){var dependency=dependencies[i];if(!(isListening.hasOwnProperty(dependency)&&isListening[dependency])){if(dependency===topLevelTypes.topWheel){if(isEventSupported("wheel")){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel,"wheel",mountAt)}else if(isEventSupported("mousewheel")){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel,"mousewheel",mountAt)}else{ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel,"DOMMouseScroll",mountAt)}}else if(dependency===topLevelTypes.topScroll){if(isEventSupported("scroll",true)){ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll,"scroll",mountAt)}else{ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll,"scroll",ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE)}}else if(dependency===topLevelTypes.topFocus||dependency===topLevelTypes.topBlur){if(isEventSupported("focus",true)){ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus,"focus",mountAt);ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur,"blur",mountAt)}else if(isEventSupported("focusin")){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus,"focusin",mountAt);ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur,"focusout",mountAt)}isListening[topLevelTypes.topBlur]=true;isListening[topLevelTypes.topFocus]=true}else if(topEventMapping.hasOwnProperty(dependency)){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency,topEventMapping[dependency],mountAt)}isListening[dependency]=true}}},trapBubbledEvent:function(topLevelType,handlerBaseName,handle){return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType,handlerBaseName,handle)},trapCapturedEvent:function(topLevelType,handlerBaseName,handle){return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType,handlerBaseName,handle)},ensureScrollValueMonitoring:function(){if(!isMonitoringScrollValue){var refresh=ViewportMetrics.refreshScrollValues;ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);isMonitoringScrollValue=true}},eventNameDispatchConfigs:EventPluginHub.eventNameDispatchConfigs,registrationNameModules:EventPluginHub.registrationNameModules,putListener:EventPluginHub.putListener,getListener:EventPluginHub.getListener,deleteListener:EventPluginHub.deleteListener,deleteAllListeners:EventPluginHub.deleteAllListeners});ReactPerf.measureMethods(ReactBrowserEventEmitter,"ReactBrowserEventEmitter",{putListener:"putListener",deleteListener:"deleteListener"});module.exports=ReactBrowserEventEmitter},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactPropTypeLocationNames={};if(process.env.NODE_ENV!=="production"){ReactPropTypeLocationNames={prop:"prop",context:"context",childContext:"child context"}}module.exports=ReactPropTypeLocationNames}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var keyMirror=__webpack_require__(36);var ReactPropTypeLocations=keyMirror({prop:null,context:null,childContext:null});module.exports=ReactPropTypeLocations},function(module,exports,__webpack_require__){"use strict";var SyntheticUIEvent=__webpack_require__(35);var ViewportMetrics=__webpack_require__(114);var getEventModifierState=__webpack_require__(77);var MouseEventInterface={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:getEventModifierState,button:function(event){var button=event.button;if("which"in event){return button}return button===2?2:button===4?1:0},buttons:null,relatedTarget:function(event){return event.relatedTarget||(event.fromElement===event.srcElement?event.toElement:event.fromElement)},pageX:function(event){return"pageX"in event?event.pageX:event.clientX+ViewportMetrics.currentScrollLeft},pageY:function(event){return"pageY"in event?event.pageY:event.clientY+ViewportMetrics.currentScrollTop}};function SyntheticMouseEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){SyntheticUIEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticUIEvent.augmentClass(SyntheticMouseEvent,MouseEventInterface);module.exports=SyntheticMouseEvent},function(module,exports,__webpack_require__){"use strict";(function(process){var invariant=__webpack_require__(2);var Mixin={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers();if(this.wrapperInitData){this.wrapperInitData.length=0}else{this.wrapperInitData=[]}this._isInTransaction=false},_isInTransaction:false,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(method,scope,a,b,c,d,e,f){!!this.isInTransaction()?process.env.NODE_ENV!=="production"?invariant(false,"Transaction.perform(...): Cannot initialize a transaction when there "+"is already an outstanding transaction."):invariant(false):undefined;var errorThrown;var ret;try{this._isInTransaction=true;errorThrown=true;this.initializeAll(0);ret=method.call(scope,a,b,c,d,e,f);errorThrown=false}finally{try{if(errorThrown){try{this.closeAll(0)}catch(err){}}else{this.closeAll(0)}}finally{this._isInTransaction=false}}return ret},initializeAll:function(startIndex){var transactionWrappers=this.transactionWrappers;for(var i=startIndex;i<transactionWrappers.length;i++){var wrapper=transactionWrappers[i];try{this.wrapperInitData[i]=Transaction.OBSERVED_ERROR;this.wrapperInitData[i]=wrapper.initialize?wrapper.initialize.call(this):null}finally{if(this.wrapperInitData[i]===Transaction.OBSERVED_ERROR){try{this.initializeAll(i+1)}catch(err){}}}}},closeAll:function(startIndex){!this.isInTransaction()?process.env.NODE_ENV!=="production"?invariant(false,"Transaction.closeAll(): Cannot close transaction when none are open."):invariant(false):undefined;var transactionWrappers=this.transactionWrappers;for(var i=startIndex;i<transactionWrappers.length;i++){var wrapper=transactionWrappers[i];var initData=this.wrapperInitData[i];var errorThrown;try{errorThrown=true;if(initData!==Transaction.OBSERVED_ERROR&&wrapper.close){wrapper.close.call(this,initData)}errorThrown=false}finally{if(errorThrown){try{this.closeAll(i+1)}catch(e){}}}}this.wrapperInitData.length=0}};var Transaction={Mixin:Mixin,OBSERVED_ERROR:{}};module.exports=Transaction}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var canDefineProperty=false;if(process.env.NODE_ENV!=="production"){try{Object.defineProperty({},"x",{get:function(){}});canDefineProperty=true}catch(x){}}module.exports=canDefineProperty}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ESCAPE_LOOKUP={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"};var ESCAPE_REGEX=/[&><"']/g;function escaper(match){return ESCAPE_LOOKUP[match]}function escapeTextContentForBrowser(text){return(""+text).replace(ESCAPE_REGEX,escaper)}module.exports=escapeTextContentForBrowser},function(module,exports,__webpack_require__){"use strict";var ExecutionEnvironment=__webpack_require__(8);var WHITESPACE_TEST=/^[ \r\n\t\f]/;var NONVISIBLE_TEST=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;var setInnerHTML=function(node,html){node.innerHTML=html};if(typeof MSApp!=="undefined"&&MSApp.execUnsafeLocalFunction){setInnerHTML=function(node,html){MSApp.execUnsafeLocalFunction(function(){node.innerHTML=html})}}if(ExecutionEnvironment.canUseDOM){var testElement=document.createElement("div");testElement.innerHTML=" ";if(testElement.innerHTML===""){setInnerHTML=function(node,html){if(node.parentNode){node.parentNode.replaceChild(node,node)}if(WHITESPACE_TEST.test(html)||html[0]==="<"&&NONVISIBLE_TEST.test(html)){node.innerHTML=String.fromCharCode(65279)+html;var textNode=node.firstChild;if(textNode.data.length===1){node.removeChild(textNode)}else{textNode.deleteData(0,1)}}else{node.innerHTML=html}}}}module.exports=setInnerHTML},function(module,exports,__webpack_require__){"use strict";function __export(m){for(var p in m)if(!exports.hasOwnProperty(p))exports[p]=m[p]}Object.defineProperty(exports,"__esModule",{value:true});__export(__webpack_require__(59));__export(__webpack_require__(60))},,function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Options=__webpack_require__(5);var Factory=__webpack_require__(10);var Axis=function(_super){__extends(Axis,_super);function Axis(side){var _this=_super.call(this)||this;_this.side=side;if(!Options.AxisOptions.isValidSide(side)){throw new TypeError("Wrong axis side : "+side)}_this.scale=function(value){return _this._scale.call(_this,value)};return _this}Axis.prototype.range=function(){return this._scale.range()};Axis.prototype.getDomain=function(){return this._scale.domain()};Axis.prototype.setDomain=function(d){return this._scale.domain.call(this,d)};Axis.prototype.create=function(){var vis=this.factoryMgr.get("container").axes;this.createAxis(vis);this.eventMgr.on("pan."+this.key,this.softUpdate.bind(this));this.eventMgr.on("zoom-end."+this.key,this.softUpdate.bind(this));this.eventMgr.on("outer-world-domain-change."+this.key,this.updateFromOuterWorld.bind(this));this.eventMgr.on("resize."+this.key,this.onResize.bind(this))};Axis.prototype.updateFromOuterWorld=function(domains){this.updateScaleDomain(domains[this.side]);this.softUpdate()};Axis.prototype.softUpdate=function(){if(this.factoryMgr.get("transitions").isOn()){this.svg.transition().call(this.factoryMgr.getBoundFunction("transitions","edit")).call(this.d3axis)}else{this.svg.call(this.d3axis)}};Axis.prototype.onResize=function(){ var container=this.factoryMgr.get("container");var dim=container.getDimensions();this.updateScaleRange(dim,this.options);this.updateAxisContainer(dim);this.softUpdate()};Axis.prototype.getDimensions=function(){var container=this.factoryMgr.get("container");return container.getDimensions()};Axis.prototype.update=function(data,options){var dimensions=this.getDimensions();var extent=this.getExtent(data,options);this.options=options.getByAxisSide(this.side);this._scale=this.getScale();this.updateScaleRange(dimensions,this.options);this.updateScaleDomain(extent);this.d3axis=this.getAxis(this._scale,this.options);this.updateAxisContainer(dimensions);this.shiftAxisTicks(this.options)};Axis.prototype.shiftAxisTicks=function(options){var _a=options.ticksShift,x=_a.x,y=_a.y;this.svg.selectAll("text").attr("transform","translate("+x+", "+y+")")};Axis.prototype.destroy=function(){this.destroyAxis()};Axis.prototype.updateScaleRange=function(dimensions,axisOptions){if(this.isAbscissas()){this._scale.range([axisOptions.padding.min,dimensions.innerWidth-axisOptions.padding.max])}else{this._scale.range([dimensions.innerHeight-axisOptions.padding.min,axisOptions.padding.max])}};Axis.prototype.updateScaleDomain=function(extent){this._scale.domain(extent)};Axis.prototype.getScaleDomain=function(){return this._scale?this._scale.domain():[0,1]};Axis.prototype.getExtent=function(datasets,options){var axisOptions=options.getByAxisSide(this.side);var extent=undefined;if(this.isAbscissas()){var activeDatasets=options.getVisibleDatasets();var abscissasKey_1=options.getAbsKey();var xValues_1=[];activeDatasets.forEach(function(key){var data=datasets.sets[key].values;xValues_1=xValues_1.concat(data.map(function(datum){return datum[abscissasKey_1]}))});extent=d3.extent(xValues_1)}else{var lowests_1=axisOptions.includeZero?[0]:[];var highests_1=axisOptions.includeZero?[0]:[];var series=options.getVisibleSeriesBySide(this.side);if(this.side===Options.AxisOptions.SIDE.Y2&&series.length===0){series=options.getVisibleSeriesBySide(Options.AxisOptions.SIDE.Y)}series.forEach(function(s){var values=datasets.getDatasetValues(s,options);values.forEach(function(datum){if(s.defined&&!s.defined(datum)){return}lowests_1.push(datum.y0||datum.y1);highests_1.push(datum.y1)})});extent=[d3.min(lowests_1),d3.max(highests_1)];if(extent[0]===0&&extent[1]===0){extent=[0,1]}}if(axisOptions.min!==undefined){extent[0]=axisOptions.min}if(axisOptions.max!==undefined){extent[1]=axisOptions.max}return extent};Axis.prototype.isAbscissas=function(){return[Options.AxisOptions.SIDE.X,Options.AxisOptions.SIDE.X2].indexOf(this.side)!==-1};Axis.prototype.isInLastHalf=function(value){var fn=function(v){return v};if(value instanceof Date){fn=function(v){return v.getTime()}}var _a=this._scale.domain(),a=_a[0],b=_a[1];return fn(value)>fn(a)+(fn(b)-fn(a))/2};Axis.prototype.createAxis=function(vis){this.svg=vis.append("g").attr("class","axis "+this.side+"-axis")};Axis.prototype.updateAxisContainer=function(dim){if(this.isAbscissas()){if(this.side===Options.AxisOptions.SIDE.X){this.svg.attr("transform","translate(0, "+dim.innerHeight+")")}else{this.svg.attr("transform","translate(0, 0)")}}else{if(this.side===Options.AxisOptions.SIDE.Y){this.svg.attr("transform","translate(0, 0)")}else{this.svg.attr("transform","translate("+dim.innerWidth+", 0)")}}this.softUpdate()};Axis.prototype.destroyAxis=function(){this.svg.remove()};Axis.prototype.invert=function(value){return this._scale.invert(value)};Axis.prototype.isTimeAxis=function(){return this.options.type===Options.AxisOptions.TYPE.DATE};Axis.prototype.getScale=function(){if(this.options&&this.options.type===Options.AxisOptions.TYPE.DATE){return d3.scaleTime()}if(this.options&&this.options.type===Options.AxisOptions.TYPE.LOG){return d3.scaleLog()}return d3.scaleLinear()};Axis.prototype.getAxis=function(scale,options){var axis=this.getRegularAxis(scale);options.configure(axis);return axis};Axis.prototype.getRegularAxis=function(scale){if(this.isAbscissas()){if(this.side===Options.AxisOptions.SIDE.X){return d3.axisBottom(scale)}else{return d3.axisTop(scale)}}else{if(this.side===Options.AxisOptions.SIDE.Y){return d3.axisLeft(scale)}else{return d3.axisRight(scale)}}};Axis.prototype.cloneAxis=function(){return this.getRegularAxis(this._scale).ticks(this.d3axis.tickArguments()[0]).scale(this.d3axis.scale()).tickValues(this.d3axis.tickValues()).tickSize(this.d3axis.tickSize()).tickFormat(this.d3axis.tickFormat())};return Axis}(Factory.BaseFactory);exports.Axis=Axis},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Utils=__webpack_require__(6);var Options=__webpack_require__(5);var BaseFactory_1=__webpack_require__(7);var Container=function(_super){__extends(Container,_super);function Container(element){var _this=_super.call(this)||this;_this.element=element;_this.dim=new Options.Dimensions;return _this}Container.prototype.create=function(options){var _this=this;this.dim.updateMargins(options);this.listenToElement(this.element,options);this.createRoot();this.createContainer();this.dim.fromParentElement(this.element.parentElement);this.eventMgr.on("resize",function(){_this.dim.fromParentElement(_this.element.parentElement);_this.update()});this.eventMgr.listenForDblClick(this.svg,function(){_this.eventMgr.trigger("zoom-pan-reset",true)},this.key);this.eventMgr.on("zoom-pan-reset."+this.key,function(event){_this.eventMgr.triggerDataAndOptions("update")})};Container.prototype.listenToElement=function(element,options){var eventMgr=this.eventMgr;element.addEventListener("mouseover",function(event){eventMgr.triggerDataAndOptions.apply(eventMgr,["container-over",event])});element.addEventListener("mousemove",function(event){eventMgr.triggerDataAndOptions.apply(eventMgr,["container-move",event])});element.addEventListener("mouseout",function(event){eventMgr.triggerDataAndOptions.apply(eventMgr,["container-out",event])})};Container.prototype.getCoordinatesFromEvent=function(event){var dim=this.getDimensions();var _a=event.currentTarget.getBoundingClientRect(),left=_a.left,top=_a.top;var xScale=this.factoryMgr.get("x-axis");var x=xScale.invert(event.clientX-left-dim.margin.left);var yScale=this.factoryMgr.get("y-axis");var y=yScale.invert(event.clientY-top-dim.margin.top);return{y:y,x:x}};Container.prototype.update=function(){this.updateRoot();this.updateContainer()};Container.prototype.destroy=function(){this.destroyRoot()};Container.prototype.createRoot=function(){this.svg=d3.select(this.element).append("svg").attr("class","chart");this.defs=this.svg.append("defs")};Container.prototype.updateRoot=function(){this.svg.attr("width",this.dim.width).attr("height",this.dim.height)};Container.prototype.destroyRoot=function(){this.svg.remove()};Container.prototype.createContainer=function(){this.vis=this.svg.append("g").attr("class","container");this.axes=this.vis.append("g").attr("class","axes");this.clippingPathId="clipping-path-"+Utils.UUID.generate();this.defs.append("svg:clipPath").attr("id",this.clippingPathId).append("svg:rect").attr("id","clipping-rect");this.data=this.vis.append("g").attr("class","data").attr("clip-path","url(#"+this.clippingPathId+")");this.overlay=this.vis.append("g").attr("class","overlay");this.symbols=this.overlay.append("g").attr("class","symbols").attr("clip-path","url(#"+this.clippingPathId+")")};Container.prototype.updateContainer=function(){this.vis.attr("width",this.dim.innerWidth).attr("height",Math.max(this.dim.innerHeight,0)).attr("transform","translate("+this.dim.margin.left+", "+this.dim.margin.top+")");d3.select(this.element).select("#clipping-rect").attr("width",Math.max(this.dim.innerWidth,0)).attr("height",Math.max(this.dim.innerHeight,0))};Container.prototype.getDimensions=function(){return this.dim};return Container}(BaseFactory_1.BaseFactory);exports.Container=Container},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var BaseFactory_1=__webpack_require__(7);var Grid=function(_super){__extends(Grid,_super);function Grid(){return _super!==null&&_super.apply(this,arguments)||this}Grid.prototype.create=function(){this.svg=this.factoryMgr.get("container").axes.insert("g",":first-child").attr("class","grid");this.svg.append("g").classed("x-grid",true);this.svg.append("g").classed("y-grid",true);this.eventMgr.on("resize."+this.key,this.softUpdate.bind(this));this.eventMgr.on("pan."+this.key,this.softUpdate.bind(this));this.eventMgr.on("zoom-end."+this.key,this.softUpdate.bind(this));this.eventMgr.on("outer-world-domain-change."+this.key,this.softUpdate.bind(this))};Grid.prototype.softUpdate=function(){var container=this.factoryMgr.get("container");var dim=container.getDimensions();if(this.xAxis){var sel=this.svg.select(".x-grid");if(this.factoryMgr.get("transitions").isOn()){sel=sel.transition().call(this.factoryMgr.getBoundFunction("transitions","edit"))}sel.attr("transform","translate(0, "+dim.innerHeight+")").call(this.xAxis.tickSizeInner(-dim.innerHeight).tickSizeOuter(0))}if(this.yAxis){var sel=this.svg.select(".y-grid");if(this.factoryMgr.get("transitions").isOn()){sel=sel.transition().call(this.factoryMgr.getBoundFunction("transitions","edit"))}sel.call(this.yAxis.tickSizeInner(-dim.innerWidth).tickSizeOuter(0))}};Grid.prototype._updateVisibility=function(options){this.svg.select(".x-grid").style("display",options.grid.x?null:"none");this.svg.select(".y-grid").style("display",options.grid.y?null:"none")};Grid.prototype.update=function(data,options){var container=this.factoryMgr.get("container");var dim=container.getDimensions();if(options.grid.x){this.xAxis=this.factoryMgr.get("x-axis").cloneAxis().tickSize(-dim.innerHeight,0);this.svg.select(".x-grid").attr("transform","translate(0, "+dim.innerHeight+")").transition().call(this.factoryMgr.getBoundFunction("transitions","edit")).call(this.xAxis)}if(options.grid.y){this.yAxis=this.factoryMgr.get("y-axis").cloneAxis();this.svg.select(".y-grid").transition().call(this.factoryMgr.getBoundFunction("transitions","edit")).call(this.yAxis.tickSizeInner(-dim.innerWidth).tickSizeOuter(0))}this._updateVisibility(options)};Grid.prototype.destroy=function(){this.svg.remove()};return Grid}(BaseFactory_1.BaseFactory);exports.Grid=Grid},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var BaseFactory_1=__webpack_require__(7);var Legend=function(_super){__extends(Legend,_super);function Legend(element){var _this=_super.call(this)||this;_this.element=element;return _this}Legend.prototype.create=function(){this.createLegend()};Legend.prototype.createLegend=function(){this.div=d3.select(this.element).append("div").attr("class","chart-legend").style("position","absolute")};Legend.prototype.legendClick=function(){var _this=this;return function(selection){return selection.on("click",function(series){_this.eventMgr.trigger("legend-click",series)})}};Legend.prototype.update=function(data,options){var _this=this;var init=function(_items){_items.attr("class","item");_items.call(_this.legendClick());_items.append("div").attr("class","icon");_items.append("div").attr("class","legend-label")};var update=function(_items){_items.attr("class",function(d){return"item "+d.type.join(" ")}).classed("legend-hidden",function(d){return!d.visible});_items.select(".icon").style("background-color",function(d){return d.color});_items.select(".legend-label").text(function(d){return d.label})};var items=this.div.selectAll(".item").data(options.series);items.call(update);items.enter().append("div").call(init).merge(items).call(update);items.exit().remove()};Legend.prototype.destroy=function(){this.div.remove()};return Legend}(BaseFactory_1.BaseFactory);exports.Legend=Legend},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var BaseFactory_1=__webpack_require__(7);var Pan=function(_super){__extends(Pan,_super);function Pan(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.isActive=false;_this.hasMoved=false;return _this}Pan.prototype.constrainDomains=function(domains){domains.x=this.options.x(domains.x);domains.x2=this.options.x2(domains.x2);domains.y=this.options.y(domains.y);domains.y2=this.options.y2(domains.y2)};Pan.prototype.move=function(domains){var x=domains.x,x2=domains.x2,y=domains.y,y2=domains.y2;var xAxis=this.factoryMgr.get("x-axis");var x2Axis=this.factoryMgr.get("x2-axis");var yAxis=this.factoryMgr.get("y-axis");var y2Axis=this.factoryMgr.get("y2-axis");if(x){xAxis.setDomain(x)}if(x2){x2Axis.setDomain(x2)}if(y){yAxis.setDomain(y)}if(y2){y2Axis.setDomain(y2)}};Pan.prototype.getNewDomains=function(deltaX,deltaX2,deltaY,deltaY2){var xAxis=this.factoryMgr.get("x-axis");var x2Axis=this.factoryMgr.get("x2-axis");var yAxis=this.factoryMgr.get("y-axis");var y2Axis=this.factoryMgr.get("y2-axis");return{x:xAxis.range().map(function(x){return x+deltaX}).map(xAxis.invert,xAxis),x2:x2Axis.range().map(function(x){return x+deltaX2}).map(x2Axis.invert,xAxis),y:yAxis.range().map(function(x){return x+deltaY}).map(yAxis.invert,yAxis),y2:y2Axis.range().map(function(x){return x+deltaY2}).map(y2Axis.invert,y2Axis)}};Pan.prototype.update=function(data,options){var _this=this;this.options=options.pan;this.zoomTriggerKey=options.zoom.key;var container=this.factoryMgr.get("container");var k=function(event){return event+"."+_this.key};var xStart;var yStart;var turnBackOn;var onMouseUp=function(){if(_this.hasMoved){_this.eventMgr.trigger("pan-end")}if(turnBackOn){turnBackOn()}_this.isActive=_this.hasMoved=false;turnBackOn=undefined;_this.eventMgr.on(k("window-mouseup"),null);_this.eventMgr.on(k("window-mousemove"),null)};var onMouseMove=function(){if(_this.isActive){var _a=d3.mouse(container.svg.node()),xEnd=_a[0],yEnd=_a[1];var newDomains=_this.getNewDomains(xStart-xEnd,xStart-xEnd,yStart-yEnd,yStart-yEnd);_this.constrainDomains(newDomains);var x=newDomains.x,x2=newDomains.x2,y=newDomains.y,y2=newDomains.y2;if(x||x2||y||y2){if(!turnBackOn){turnBackOn=_this.factoryMgr.turnFactoriesOff(["tooltip","transitions"])}_this.hasMoved=true;_this.move(newDomains);_this.eventMgr.trigger("pan")}_b=[xEnd,yEnd],xStart=_b[0],yStart=_b[1]}var _b};container.svg.on(k("mousedown"),function(){var event=d3.event;if(event.button!==0){return}if(!event[_this.zoomTriggerKey]){_this.isActive=true;_a=d3.mouse(event.currentTarget),xStart=_a[0],yStart=_a[1];_this.eventMgr.on(k("window-mouseup"),onMouseUp);_this.eventMgr.on(k("window-mousemove"),onMouseMove)}var _a})};return Pan}(BaseFactory_1.BaseFactory);exports.Pan=Pan},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Options=__webpack_require__(5);var BaseFactory_1=__webpack_require__(7);var Tooltip=function(_super){__extends(Tooltip,_super);function Tooltip(element){var _this=_super.call(this)||this;_this.element=element;return _this}Tooltip.prototype.off=function(){_super.prototype.off.call(this);this.hide()};Tooltip.prototype.create=function(options){this.options=options;this.createTooltip();this.eventMgr.on("container-move.tooltip",this.show.bind(this));this.eventMgr.on("container-out.tooltip",this.hide.bind(this));this.eventMgr.on("outer-world-hover.tooltip",this.showFromCoordinates.bind(this));this.hide()};Tooltip.prototype.update=function(data,options){this.options=options};Tooltip.prototype.createTooltip=function(){var svg=this.svg=d3.select(this.element).append("div").attr("class","chart-tooltip");svg.append("div").attr("class","abscissas");this.line=this.factoryMgr.get("container").overlay.append("line").attr("class","tooltip-line");this.dots=this.factoryMgr.get("container").overlay.append("g").attr("class","tooltip-dots")};Tooltip.prototype.destroy=function(){this.svg.remove()};Tooltip.prototype.getClosestRows=function(x,data,options){var visibleSeries=options.series.filter(function(series){return series.visible});var datasets=visibleSeries.map(function(series){return data.getDatasetValues(series,options).filter(series.defined)});var closestRows=[];var closestIndex=-1;var minDistance=Number.POSITIVE_INFINITY;var foundSeries=[];for(var i=0;i<datasets.length;i++){for(var j=0;j<datasets[i].length;j++){if(options.axes.x.type==="date"){var distance=Math.abs(datasets[i][j].x.getTime()-x)}else{var distance=Math.abs(datasets[i][j].x-x)}var series=visibleSeries[i];if(distance===minDistance&&foundSeries.indexOf(series)===-1){closestRows.push({series:series,row:datasets[i][j]});foundSeries.push(series)}else if(distance<minDistance){minDistance=distance;closestRows=[{series:visibleSeries[i],row:datasets[i][j]}];foundSeries=[series];closestIndex=j}}}return{rows:closestRows,index:closestIndex}};Tooltip.prototype.showFromCoordinates=function(coordinates,data,options){if(this.isOff()){return}var x=coordinates.x,y=coordinates.y;if(x===undefined||y===undefined){this.hide(undefined,data,options);return}if(x instanceof Date){x=x.getTime()}var _a=this.getClosestRows(x,data,options),rows=_a.rows,index=_a.index;if(rows.length===0){this.hide(undefined,data,options);return}this.updateTooltipDots(rows);this.dots.style("opacity","1");this.updateLinePosition(rows);this.line.style("opacity","1");var tooltipContent=this.getTooltipContent(rows,index,options);if(options.tooltipHook){tooltipContent=options.tooltipHook(rows)}if(!tooltipContent){return}this.updateTooltipContent(tooltipContent,index,options);this.updateTooltipPosition(rows);this.svg.style("display",null)};Tooltip.prototype.show=function(event,data,options){if(this.isOff()){return}var container=this.factoryMgr.get("container");var coordinates=container.getCoordinatesFromEvent(event);this.showFromCoordinates(coordinates,data,options)};Tooltip.prototype.hide=function(event,data,options){this.svg.style("display","none");this.line.style("opacity","0");this.dots.style("opacity","0");if(options&&options.tooltipHook){options.tooltipHook(undefined)}};Tooltip.prototype.getTooltipContent=function(rows,closestIndex,options){var xTickFormat=options.getByAxisSide(Options.AxisOptions.SIDE.X).tickFormat;var getYTickFormat=function(side){return options.getByAxisSide(side).tickFormat};var getRowValue=function(d){var yTickFormat=getYTickFormat(d.series.axis);var fn=yTickFormat?function(y1){return yTickFormat(y1,closestIndex)}:function(y1){return y1};var y1Label=fn(d.row.y1);if(d.series.hasTwoKeys()){return"["+fn(d.row.y0)+", "+y1Label+"]"}else{return y1Label}};return{abscissas:xTickFormat?xTickFormat(rows[0].row.x,closestIndex):rows[0].row.x,rows:rows.map(function(row){return{label:row.series.label,value:getRowValue(row),color:row.series.color,id:row.series.id}})}};Tooltip.prototype.updateTooltipContent=function(result,closestIndex,options){this.svg.select(".abscissas").text(result.abscissas);var init=function(_items){_items.attr("class","tooltip-item");_items.append("div").attr("class","color-dot").style("background-color",function(d){return d.color});_items.append("div").attr("class","series-label");_items.append("div").attr("class","y-value")};var update=function(_items){_items.select(".series-label").text(function(d){return d.label});_items.select(".y-value").text(function(d){return d.value})};var items=this.svg.selectAll(".tooltip-item").data(result.rows,function(d,i){return!!d.id?d.id:i});items.call(update);items.enter().append("div").call(init).merge(items).call(update);items.exit().remove()};Tooltip.prototype.updateTooltipDots=function(rows){var _this=this;var xScale=this.factoryMgr.get("x-axis").scale;var yScale=function(side){return _this.factoryMgr.get(side+"-axis").scale};var radius=3;var init=function(_dots){_dots.attr("class","tooltip-dots-group");_dots.append("circle").attr("class","tooltip-dot y1").on("click",function(d,i){_this.eventMgr.trigger("click",d.row,i,d.series,_this.options)});_dots.append("circle").attr("class","tooltip-dot y0").style("display",function(d){return d.series.hasTwoKeys()?null:"none"}).on("click",function(d,i){_this.eventMgr.trigger("click",d.row,i,d.series,_this.options)})};var update=function(_dots){_dots.select(".tooltip-dot.y1").attr("r",function(d){return radius}).attr("cx",function(d){return xScale(d.row.x)}).attr("cy",function(d){return yScale(d.series.axis)(d.row.y1)}).attr("stroke",function(d){return d.series.color});_dots.select(".tooltip-dot.y0").attr("r",function(d){return d.series.hasTwoKeys()?radius:null}).attr("cx",function(d){return d.series.hasTwoKeys()?xScale(d.row.x):null}).attr("cy",function(d){return d.series.hasTwoKeys()?yScale(d.series.axis)(d.row.y0):null}).attr("stroke",function(d){return d.series.hasTwoKeys()?d.series.color:null})};var dots=this.dots.selectAll(".tooltip-dots-group").data(rows);dots.call(update);dots.enter().append("g").call(init).merge(dots).call(update);dots.exit().remove()};Tooltip.prototype.updateTooltipPosition=function(rows){var lastRow=rows.slice(-1)[0];var xAxis=this.factoryMgr.get("x-axis");var yScale=this.factoryMgr.get("y-axis").scale;var margin=this.factoryMgr.get("container").getDimensions().margin;var leftOffset=this.element.offsetLeft;var topOffset=this.element.offsetTop;var xOffset=0;var transform="";if(xAxis.isInLastHalf(lastRow.row.x)){transform="translate(-100%, 0)";xOffset=-10}else{xOffset=10}this.svg.style("left",leftOffset+margin.left+xAxis.scale(lastRow.row.x)+xOffset+"px").style("top",topOffset+margin.top+"px").style("transform",transform);return};Tooltip.prototype.updateLinePosition=function(rows){var container=this.factoryMgr.get("container");var dim=container.getDimensions();var lastRow=rows.slice(-1)[0];var xAxis=this.factoryMgr.get("x-axis");var x=xAxis.scale(lastRow.row.x);this.line.attr("x1",x).attr("x2",x).attr("y1",-dim.margin.top).attr("y2",dim.innerHeight);return};return Tooltip}(BaseFactory_1.BaseFactory);exports.Tooltip=Tooltip},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var BaseFactory_1=__webpack_require__(7);var Transition=function(_super){__extends(Transition,_super);function Transition(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.duration=Transition.defaultDuration;_this.ease=d3.easeCubicInOut;return _this}Transition.prototype.off=function(){_super.prototype.off.call(this);this.duration=0};Transition.prototype.on=function(){_super.prototype.on.call(this);this.duration=Transition.defaultDuration};Transition.prototype.enter=function(t){var duration=this.duration;var ease=this.ease;var n=t._groups[0].length;var delay=function(d,i){return n?i/n*duration:0};t.duration(duration).delay(delay).ease(ease)};Transition.prototype.edit=function(t){var duration=this.duration;var ease=this.ease;var delay=0;t.duration(duration).delay(delay).ease(ease)};Transition.prototype.exit=function(t){var duration=this.duration;var ease=this.ease;var delay=0;t.duration(duration).delay(delay).ease(ease)};return Transition}(BaseFactory_1.BaseFactory);Transition.defaultDuration=250;exports.Transition=Transition},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var BaseFactory_1=__webpack_require__(7);var Zoom=function(_super){__extends(Zoom,_super);function Zoom(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.isActive=false;return _this}Zoom.prototype.create=function(){this.rect=this.factoryMgr.get("container").svg.append("rect").attr("class","chart-brush")};Zoom.prototype.constrainOutgoingDomains=function(domains){if(!this.zoomOnX){delete domains.x}if(!this.zoomOnY){delete domains.y}};Zoom.prototype.update=function(data,options){var dimensions=this.factoryMgr.get("container").getDimensions();var _a=dimensions.margin,left=_a.left,top=_a.top;this.zoomOnX=options.zoom.x;this.zoomOnY=options.zoom.y;if(!this.zoomOnX&&!this.zoomOnY){return}this.xStartFn=this.zoomOnX?function(x){return x}:function(x){return left};this.xEndFn=this.zoomOnX?function(x){return x}:function(x){return dimensions.innerWidth+left};this.yStartFn=this.zoomOnY?function(y){return y}:function(y){return top};this.yEndFn=this.zoomOnY?function(y){return y}:function(y){return dimensions.innerHeight+top};this.zoomOnX=options.zoom.x;this.zoomOnY=options.zoom.y;this.zoomTriggerKey=options.zoom.key;this.registerEvents(this.factoryMgr.get("container"))};Zoom.prototype.show=function(_a){var xStart=_a.xStart,xEnd=_a.xEnd,yStart=_a.yStart,yEnd=_a.yEnd;_b=xStart>xEnd?[xEnd,xStart]:[xStart,xEnd],xStart=_b[0],xEnd=_b[1];_c=yStart>yEnd?[yEnd,yStart]:[yStart,yEnd],yStart=_c[0],yEnd=_c[1];this.rect.attr("x",xStart).attr("width",xEnd-xStart).attr("y",yStart).attr("height",yEnd-yStart).style("opacity","1");var _b,_c};Zoom.prototype.hide=function(){this.rect.style("opacity","0")};Zoom.prototype.updateAxes=function(_a){var xStart=_a.xStart,xEnd=_a.xEnd,yStart=_a.yStart,yEnd=_a.yEnd;_b=xStart>xEnd?[xEnd,xStart]:[xStart,xEnd],xStart=_b[0],xEnd=_b[1];_c=yStart>yEnd?[yEnd,yStart]:[yStart,yEnd],yStart=_c[0],yEnd=_c[1];var dimensions=this.factoryMgr.get("container").getDimensions();var _d=dimensions.margin,left=_d.left,top=_d.top;var xAxis=this.factoryMgr.get("x-axis");var x2Axis=this.factoryMgr.get("x2-axis");xAxis.setDomain([xAxis.invert(xStart-left),xAxis.invert(xEnd-left)]);x2Axis.setDomain(xAxis.getDomain());var yAxis=this.factoryMgr.get("y-axis");var y2Axis=this.factoryMgr.get("y2-axis");yAxis.setDomain([yAxis.invert(yEnd-top),yAxis.invert(yStart-top)]);y2Axis.setDomain([y2Axis.invert(yEnd-top),y2Axis.invert(yStart-top)]);var _b,_c};Zoom.prototype.registerEvents=function(container){var _this=this;var k=function(event){return event+"."+_this.key};var xStart;var xEnd;var yStart;var yEnd;var turnBackOn;var onMouseUp=function(){_this.isActive=false;_this.hide();if(xEnd!==undefined&&yEnd!==undefined){_this.updateAxes({xStart:xStart,xEnd:xEnd,yStart:yStart,yEnd:yEnd});_this.eventMgr.trigger("zoom-end");xStart=xEnd=yStart=yEnd=undefined;turnBackOn()}_this.eventMgr.on(k("window-mouseup"),null)};container.svg.on(k("mousedown"),function(){var event=d3.event;if(event.button!==0){return}if(event[_this.zoomTriggerKey]){turnBackOn=_this.factoryMgr.turnFactoriesOff(["tooltip"]);_this.isActive=true;_this.eventMgr.on(k("window-mouseup"),onMouseUp);_a=d3.mouse(d3.event.currentTarget),xStart=_a[0],yStart=_a[1];xStart=_this.xStartFn(xStart);yStart=_this.yStartFn(yStart)}var _a}).on(k("mousemove"),function(){if(_this.isActive){_a=d3.mouse(d3.event.currentTarget),xEnd=_a[0],yEnd=_a[1];xEnd=_this.xEndFn(xEnd);yEnd=_this.yEndFn(yEnd);_this.show({xStart:xStart,xEnd:xEnd,yStart:yStart,yEnd:yEnd});_this.eventMgr.trigger("zoom")}var _a})};return Zoom}(BaseFactory_1.BaseFactory);exports.Zoom=Zoom},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Options=__webpack_require__(5);var Utils=__webpack_require__(6);var SeriesFactory_1=__webpack_require__(25);var Area=function(_super){__extends(Area,_super);function Area(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.type=Options.SeriesOptions.TYPE.AREA;return _this}Area.prototype.updateData=function(group,series,index,numSeries){var _this=this;var _a=this.getAxes(series),xAxis=_a.xAxis,yAxis=_a.yAxis;var areaData=this.data.getDatasetValues(series,this.options);var isOkay=function(value){return isFinite(value)&&!isNaN(value)};var initArea=d3.area().defined(series.defined).x(function(d){return xAxis.scale(d.x)}).y0(yAxis.range()[0]).y1(yAxis.range()[0]).curve(Utils.Interpolation.getInterpolation(series.interpolation.mode,series.interpolation.tension));var updateArea=d3.area().defined(series.defined).x(function(d){return xAxis.scale(d.x)}).y0(function(d){return isOkay(yAxis.scale(d.y0))?yAxis.scale(d.y0):yAxis.range()[0]}).y1(function(d){return yAxis.scale(d.y1)}).curve(Utils.Interpolation.getInterpolation(series.interpolation.mode,series.interpolation.tension));var area=group.selectAll("."+this.type).data([areaData]);if(this.factoryMgr.get("transitions").isOn()){var init=function(_area){_area.attr("class",_this.type).attr("d",function(d){return initArea(d)})};var update=function(_area){_area.transition().call(_this.factoryMgr.getBoundFunction("transitions","enter")).attr("d",function(d){return updateArea(d)})};area.call(update);area.enter().append("path").call(init).merge(area).call(update);area.exit().transition().call(this.factoryMgr.getBoundFunction("transitions","exit")).attr("d",function(d){return initArea(d)}).on("end",function(){d3.select(this).remove()})}else{area.enter().append("path").attr("class",this.type).attr("d",function(d){return updateArea(d)});area.attr("d",function(d){return updateArea(d)}).style("opacity",series.visible?1:0);area.exit().remove()}};Area.prototype.styleSeries=function(group){group.style("fill",function(s){return s.color}).style("stroke",function(s){return s.color})};return Area }(SeriesFactory_1.SeriesFactory);exports.Area=Area},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Utils=__webpack_require__(6);var Series=__webpack_require__(16);var Options=__webpack_require__(5);var Column=function(_super){__extends(Column,_super);function Column(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.type=Options.SeriesOptions.TYPE.COLUMN;_this.gapFactor=.2;_this.outerPadding=_this.gapFactor/2*3;_this.columnsWidth=0;return _this}Column.prototype.softUpdate=function(){var series=this.options.getSeriesByType(this.type).filter(function(s){return s.visible});this.updateColumnsWidth(series,this.options);this.updateColumnScale(series,this.options);this.updateSeriesContainer(series)};Column.prototype.update=function(data,options){this.data=data;this.options=options;var series=options.getSeriesByType(this.type).filter(function(s){return s.visible});this.updateColumnsWidth(series,options);this.updateColumnScale(series,options);this.updateSeriesContainer(series)};Column.prototype.updateColumnsWidth=function(series,options){var xAxis=this.factoryMgr.get("x-axis");var colsDatasets=this.data.getDatasets(series,options);var delta=Utils.Data.getMinDistance(colsDatasets,xAxis,"x");this.columnsWidth=delta<Number.MAX_VALUE?delta/series.length:10};Column.prototype.updateColumnScale=function(series,options){var halfWidth=this.columnsWidth*series.length/2;this.innerXScale=d3.scaleBand().domain(series.map(function(s){return s.id})).range([-halfWidth,halfWidth]).paddingInner(0).paddingOuter(.1)};Column.prototype.getTooltipPosition=function(series){return this.innerXScale(series.id)+this.innerXScale.step()/2};Column.prototype.updateData=function(group,series,index,numSeries){var _this=this;var _a=this.getAxes(series),xAxis=_a.xAxis,yAxis=_a.yAxis;var colsData=this.data.getDatasetValues(series,this.options).filter(series.defined);var xFn=function(d){return xAxis.scale(d.x)+_this.innerXScale(series.id)};var initCol=function(_columns){_columns.attr("x",xFn).attr("y",function(d){return yAxis.scale(d.y0)}).attr("width",_this.innerXScale.step()).attr("height",0)};var updateCol=function(_columns){_columns.attr("x",xFn).attr("y",function(d){return d.y1>0?yAxis.scale(d.y1):yAxis.scale(d.y0)}).attr("width",_this.innerXScale.step()).attr("height",function(d){return Math.abs(yAxis.scale(d.y0)-yAxis.scale(d.y1))}).style("opacity",series.visible?1:0)};var cols=group.selectAll("."+this.type).data(colsData,function(d){return""+d.x});if(this.factoryMgr.get("transitions").isOn()){cols.enter().append("rect").attr("class",this.type).call(this.eventMgr.datumEnter(series,this.options)).call(this.eventMgr.datumOver(series,this.options)).call(this.eventMgr.datumMove(series,this.options)).call(this.eventMgr.datumLeave(series,this.options)).call(initCol).transition().call(this.factoryMgr.getBoundFunction("transitions","enter")).call(updateCol);cols.transition().call(this.factoryMgr.getBoundFunction("transitions","edit")).call(updateCol);cols.exit().transition().call(this.factoryMgr.getBoundFunction("transitions","exit")).call(initCol).on("end",function(){d3.select(this).remove()})}else{cols.enter().append("rect").attr("class",this.type).call(this.eventMgr.datumEnter(series,this.options)).call(this.eventMgr.datumOver(series,this.options)).call(this.eventMgr.datumMove(series,this.options)).call(this.eventMgr.datumLeave(series,this.options)).call(updateCol);cols.call(updateCol);cols.exit().remove()}};Column.prototype.styleSeries=function(group){group.style("fill",function(d){return d.color}).style("stroke",function(d){return d.color}).style("stroke-width",1)};return Column}(Series.SeriesFactory);exports.Column=Column},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Series=__webpack_require__(16);var Options=__webpack_require__(5);var Dot=function(_super){__extends(Dot,_super);function Dot(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.type=Options.SeriesOptions.TYPE.DOT;return _this}Dot.prototype.updateData=function(group,series,index,numSeries){var _a=this.getAxes(series),xAxis=_a.xAxis,yAxis=_a.yAxis;var dotsData=this.data.getDatasetValues(series,this.options).filter(series.defined);var dotsRadius=2;var initPoint=function(_dots){_dots.attr("r",function(d){return dotsRadius}).attr("cx",function(d){return xAxis.scale(d.x)}).attr("cy",function(d){return yAxis.range()[0]})};var updatePoint=function(_dots){_dots.attr("r",function(d){return dotsRadius}).attr("cx",function(d){return xAxis.scale(d.x)}).attr("cy",function(d){return yAxis.scale(d.y1)}).style("opacity",series.visible?1:0)};var dots=group.selectAll("."+this.type).data(dotsData,function(d){return""+d.x});if(this.factoryMgr.get("transitions").isOn()){dots.transition().call(this.factoryMgr.getBoundFunction("transitions","edit")).call(updatePoint);dots.enter().append("circle").attr("class",this.type).call(this.eventMgr.datumEnter(series,this.options)).call(this.eventMgr.datumOver(series,this.options)).call(this.eventMgr.datumMove(series,this.options)).call(this.eventMgr.datumLeave(series,this.options)).call(initPoint).merge(dots).transition().call(this.factoryMgr.getBoundFunction("transitions","enter")).call(updatePoint);dots.exit().transition().call(this.factoryMgr.getBoundFunction("transitions","exit")).call(initPoint).on("end",function(){d3.select(this).remove()})}else{dots.enter().append("circle").attr("class",this.type).call(this.eventMgr.datumEnter(series,this.options)).call(this.eventMgr.datumOver(series,this.options)).call(this.eventMgr.datumMove(series,this.options)).call(this.eventMgr.datumLeave(series,this.options)).call(updatePoint);dots.call(updatePoint);dots.exit().remove()}};Dot.prototype.styleSeries=function(group){group.style("stroke",function(d){return d.color})};return Dot}(Series.SeriesFactory);exports.Dot=Dot},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Utils=__webpack_require__(6);var Series=__webpack_require__(16);var Options=__webpack_require__(5);var Line=function(_super){__extends(Line,_super);function Line(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.type=Options.SeriesOptions.TYPE.LINE;return _this}Line.prototype.updateData=function(group,series,index,numSeries){var _this=this;group.classed("dashed",series.isDashed());var _a=this.getAxes(series),xAxis=_a.xAxis,yAxis=_a.yAxis;var lineData=this.data.getDatasetValues(series,this.options);var initLine=d3.line().defined(series.defined).x(function(d){return xAxis.scale(d.x)}).y(yAxis.range()[0]).curve(Utils.Interpolation.getInterpolation(series.interpolation.mode,series.interpolation.tension));var updateLine=d3.line().defined(series.defined).x(function(d){return xAxis.scale(d.x)}).y(function(d){return yAxis.scale(d.y1)}).curve(Utils.Interpolation.getInterpolation(series.interpolation.mode,series.interpolation.tension));var line=group.selectAll("."+this.type).data([lineData]);if(this.factoryMgr.get("transitions").isOn()){var init=function(_line){_line.attr("class",_this.type).attr("d",function(d){return initLine(d)})};var update=function(_line){_line.transition().call(_this.factoryMgr.getBoundFunction("transitions","enter")).attr("d",function(d){return updateLine(d)})};line.call(update);line.enter().append("path").call(init).merge(line).call(update);line.exit().transition().call(this.factoryMgr.getBoundFunction("transitions","exit")).attr("d",function(d){return initLine(d)}).on("end",function(){d3.select(this).remove()})}else{line.enter().append("path").attr("class",this.type).attr("d",function(d){return updateLine(d)});line.attr("d",function(d){return updateLine(d)}).style("opacity",series.visible?1:0);line.exit().remove()}};Line.prototype.styleSeries=function(group){group.style("fill","none").style("stroke",function(s){return s.color}).style("stroke-dasharray",function(s){return s.isDashed()?"10,3":undefined})};return Line}(Series.SeriesFactory);exports.Line=Line},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Factory=__webpack_require__(10);var Options=__webpack_require__(5);var HLine=function(_super){__extends(HLine,_super);function HLine(){return _super!==null&&_super.apply(this,arguments)||this}HLine.prototype.create=function(){this.svg=this.factoryMgr.get("container").symbols.append("g").attr("class","hlines");this.eventMgr.on("resize."+this.key,this.softUpdate.bind(this));this.eventMgr.on("pan."+this.key,this.softUpdate.bind(this));this.eventMgr.on("zoom-end."+this.key,this.softUpdate.bind(this));this.eventMgr.on("outer-world-domain-change."+this.key,this.softUpdate.bind(this))};HLine.prototype.softUpdate=function(){var xAxis=this.factoryMgr.get("x-axis");var yAxes={y:this.factoryMgr.get("y-axis"),y2:this.factoryMgr.get("y2-axis")};var hline=this.svg.selectAll(".hline").data(this.options.getSymbolsByType(Options.SymbolOptions.TYPE.HLINE),function(o){return o.id});var init=function(selection){selection.attr("class","hline").style("opacity",0).style("stroke",function(o){return o.color})};var update=function(selection){selection.attr("x1",xAxis.scale(xAxis.getDomain()[0])).attr("x2",xAxis.scale(xAxis.getDomain()[1])).attr("y1",function(o){return yAxes[o.axis].scale(o.value)}).attr("y2",function(o){return yAxes[o.axis].scale(o.value)}).style("opacity",1)};if(this.factoryMgr.get("transitions").isOn()){hline.enter().append("svg:line").call(init).transition().call(this.factoryMgr.getBoundFunction("transitions","enter")).call(update);hline.transition().call(this.factoryMgr.getBoundFunction("transitions","edit")).call(update);hline.exit().transition().call(this.factoryMgr.getBoundFunction("transitions","exit")).style("opacity",0).on("end",function(){d3.select(this).remove()})}else{hline.enter().append("svg:line").call(init);hline.call(update);hline.exit().remove()}};HLine.prototype.update=function(data,options){this.options=options;this.softUpdate()};HLine.prototype.destroy=function(){this.svg.remove()};return HLine}(Factory.BaseFactory);exports.HLine=HLine},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Factory=__webpack_require__(10);var Options=__webpack_require__(5);var VLine=function(_super){__extends(VLine,_super);function VLine(){return _super!==null&&_super.apply(this,arguments)||this}VLine.prototype.create=function(){this.svg=this.factoryMgr.get("container").symbols.append("g").attr("class","vlines");this.eventMgr.on("resize."+this.key,this.softUpdate.bind(this));this.eventMgr.on("pan."+this.key,this.softUpdate.bind(this));this.eventMgr.on("zoom-end."+this.key,this.softUpdate.bind(this));this.eventMgr.on("outer-world-domain-change."+this.key,this.softUpdate.bind(this))};VLine.prototype.softUpdate=function(){var xAxis=this.factoryMgr.get("x-axis");var yAxis=this.factoryMgr.get("y-axis");var vline=this.svg.selectAll(".vline").data(this.options.getSymbolsByType(Options.SymbolOptions.TYPE.VLINE),function(o){return o.id});var init=function(selection){selection.attr("class","vline").style("opacity",0).style("stroke",function(o){return o.color})};var update=function(selection){selection.attr("x1",function(o){return xAxis.scale(o.value)}).attr("x2",function(o){return xAxis.scale(o.value)}).attr("y1",yAxis.scale(yAxis.getDomain()[0])).attr("y2",yAxis.scale(yAxis.getDomain()[1])).style("opacity",1)};if(this.factoryMgr.get("transitions").isOn()){vline.enter().append("svg:line").call(init).transition().call(this.factoryMgr.getBoundFunction("transitions","enter")).call(update);vline.transition().call(this.factoryMgr.getBoundFunction("transitions","edit")).call(update);vline.exit().transition().call(this.factoryMgr.getBoundFunction("transitions","exit")).style("opacity",0).on("end",function(){d3.select(this).remove()})}else{vline.enter().append("svg:line").call(init);vline.call(update);vline.exit().remove()}};VLine.prototype.update=function(data,options){this.options=options;this.softUpdate()};VLine.prototype.destroy=function(){this.svg.remove()};return VLine}(Factory.BaseFactory);exports.VLine=VLine},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Dataset_1=__webpack_require__(30);var Data=function(){function Data(js){if(js){this.fromJS(js)}}Data.prototype.fromJS=function(js){var sets={};for(var key in js){if(js.hasOwnProperty(key)){sets[key]=new Dataset_1.Dataset(js[key],key)}}this.sets=sets};Data.prototype.getDatasets=function(series,options){var _this=this;return series.map(function(d){return _this.getDatasetValues(d,options)})};Data.prototype.getDatasetValues=function(series,options){if(!this.sets||!this.sets[series.dataset].values){return[]}var xKey=options.getAbsKey();var fn;if(series.key.y0){fn=function(d){return{x:d[xKey],y1:d[series.key.y1],y0:d[series.key.y0],raw:d}}}else{fn=function(d){return{x:d[xKey],y1:d[series.key.y1],y0:0,raw:d}}}return this.sets[series.dataset].values.map(fn)};Data.getMinDistance=function(data,axis,key,range){if(key===void 0){key="x"}return d3.min(data.map(function(series){return series.map(function(d){return axis.scale(d[key])}).filter(function(d){return range?d>=range[0]&&d<=range[1]:true}).reduce(function(prev,d,i,arr){var diff=i>0?d-arr[i-1]:Number.MAX_VALUE;return diff<prev?diff:prev},Number.MAX_VALUE)}))};return Data}();exports.Data=Data},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var EventManager=function(){function EventManager(){this.strictMode=true}EventManager.prototype.init=function(events){var _this=this;this._dispatch=d3.dispatch.apply(this,events);var id=(new Date).getTime();d3.select(window).on("mouseup."+id,function(){_this.trigger("window-mouseup")});d3.select(window).on("mousemove."+id,function(){_this.trigger("window-mousemove")});return this};EventManager.prototype.update=function(data,options){this.data=data;this.options=options;return};EventManager.prototype.on=function(event,callback){if(this.strictMode&&EventManager.EVENTS.indexOf(event.split(".")[0])===-1){throw new Error("Unknown event: "+event)}this._dispatch.on(event,callback);return this};EventManager.prototype.trigger=function(event){var args=[];for(var _i=1;_i<arguments.length;_i++){args[_i-1]=arguments[_i]}this._dispatch.apply(event,this,args);return this};EventManager.prototype.triggerDataAndOptions=function(event){var args=[];for(var _i=1;_i<arguments.length;_i++){args[_i-1]=arguments[_i]}args.push(this.data);args.push(this.options);this._dispatch.apply(event,this,args);return this};EventManager.prototype.datumEnter=function(series,options){var _this=this;return function(selection){return selection.on("mouseenter",function(d,i){_this.trigger("enter",d,i,series,options)})}};EventManager.prototype.datumOver=function(series,options){var _this=this;return function(selection){return selection.on("mouseover",function(d,i){_this.trigger("over",d,i,series,options)})}};EventManager.prototype.datumMove=function(series,options){var _this=this;return function(selection){return selection.on("mousemove",function(d,i){_this.trigger("over",d,i,series,options)})}};EventManager.prototype.datumLeave=function(series,options){var _this=this;return function(selection){return selection.on("mouseleave",function(d,i){_this.trigger("leave",d,i,series,options)})}};EventManager.prototype.listenForDblClick=function(selection,callback,listenerSuffix){var _this=this;var down,tolerance=5,last,wait=null;var dist=function(a,b){return Math.sqrt(Math.pow(a[0]-b[0],2)+Math.pow(a[1]-b[1],2))};selection.on("mousedown.dbl."+listenerSuffix,function(){down=d3.mouse(document.body);last=(new Date).getTime()});selection.on("mouseup.dbl."+listenerSuffix,function(){if(!down||dist(down,d3.mouse(document.body))>tolerance){return}if(wait&&_this.options.doubleClickEnabled){window.clearTimeout(wait);wait=null;callback(d3.event)}else{wait=window.setTimeout(function(e){return function(){wait=null}}(d3.event),300)}});return selection};return EventManager}();EventManager.EVENTS=["create","update","data-update","resize","destroy","enter","over","move","leave","click","dblclick","legend-click","legend-over","legend-out","container-over","container-move","container-out","focus","toggle","outer-world-hover","outer-world-domain-change","pan","pan-end","zoom","zoom-end","zoom-pan-reset","window-mouseup","window-mousemove"];exports.EventManager=EventManager},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var FactoryManager=function(){function FactoryManager(){this._factoryStack=[]}FactoryManager.prototype.index=function(factoryKey){return this._factoryStack.map(function(d){return d.key}).indexOf(factoryKey)};FactoryManager.prototype.getBoundFunction=function(factoryKey,functionName){var factory=this.get(factoryKey);if(!factory){return null}return factory[functionName].bind(factory)};FactoryManager.prototype.get=function(factoryKey){var index=this.index(factoryKey);if(index>-1){return this._factoryStack[index].instance}return null};FactoryManager.prototype.all=function(){return this._factoryStack};FactoryManager.prototype.turnFactoriesOff=function(keys){var _this=this;var toUndo=[];keys.forEach(function(key){var f=_this.get(key);if(f.isOn()){f.off();toUndo.push(key)}});return function(){return _this.turnFactoriesOn(toUndo)}};FactoryManager.prototype.turnFactoriesOn=function(keys){var _this=this;var toUndo=[];keys.forEach(function(key){var f=_this.get(key);if(f.isOff()){f.on();toUndo.push(key)}});return function(){return _this.turnFactoriesOff(toUndo)}};FactoryManager.prototype.registerMany=function(factories){var _this=this;factories.forEach(function(factoryArgs){_this.register.apply(_this,factoryArgs)});return this};FactoryManager.prototype.register=function(key,constructor){var args=[];for(var _i=2;_i<arguments.length;_i++){args[_i-2]=arguments[_i]}var factory=constructor.bind.apply(constructor,[null].concat(args));var instance=new factory;this._factoryStack.push({key:key,instance:instance});return instance};FactoryManager.prototype.unregister=function(factoryKey){var index=this.index(factoryKey);if(index>-1){delete this._factoryStack[index]}return this};return FactoryManager}();exports.FactoryManager=FactoryManager},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var FunctionUtils=function(){function FunctionUtils(){}FunctionUtils.debounce=function(callback,interval){var _this=this;var t=null;return function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}if(t){window.clearTimeout(t)}t=window.setTimeout(function(){return callback.apply(_this,args)},interval)}};return FunctionUtils}();exports.FunctionUtils=FunctionUtils;var UUID=function(){function UUID(){}UUID.generate=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=Math.random()*16|0;var v=c==="x"?r:r&3|8;return v.toString(16)})};return UUID}();exports.UUID=UUID},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var d3=__webpack_require__(1);var Interpolation=function(){function Interpolation(){}Interpolation.getInterpolation=function(id,tension){var interpolation=this.interpolations[id];if(interpolation["tension"])interpolation=interpolation["tension"](tension);return interpolation};return Interpolation}();Interpolation.interpolations={linear:d3.curveLinear,"linear-closed":d3.curveLinearClosed,step:d3.curveStep,"step-before":d3.curveStepBefore,"step-after":d3.curveStepAfter,basis:d3.curveBasis,"basis-open":d3.curveBasisOpen,"basis-closed":d3.curveBasisClosed,cardinal:d3.curveCardinal,"cardinal-open":d3.curveCardinalOpen,"cardinal-closed":d3.curveCardinalClosed,monotone:d3.curveMonotoneX};exports.Interpolation=Interpolation},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var ObjectUtils=function(){function ObjectUtils(){}ObjectUtils.isFunction=function(wut){return wut instanceof Function};ObjectUtils.isDate=function(wut){return wut instanceof Date};ObjectUtils.isObject=function(wut){return!(wut instanceof Array)&&wut instanceof Object};ObjectUtils.isArray=function(wut){return wut instanceof Array};ObjectUtils.isBoolean=function(wut){return wut===true||wut===false};ObjectUtils.isReference=function(wut){return wut instanceof Array||wut instanceof Object};ObjectUtils.sameType=function(a,b){if(ObjectUtils.isArray(a)&&ObjectUtils.isArray(b)){return true}if(ObjectUtils.isObject(a)&&ObjectUtils.isObject(b)){return true}return typeof a===typeof b};ObjectUtils.extend=function(target,source){var copy=ObjectUtils.copy,extend=ObjectUtils.extend,sameType=ObjectUtils.sameType,isReference=ObjectUtils.isReference,isFunction=ObjectUtils.isFunction;var result=ObjectUtils.copy(target);if(!source){return result}for(var key in source){if(!source.hasOwnProperty(key)){continue}if(!target.hasOwnProperty(key)||!sameType(target[key],source[key])){result[key]=copy(source[key])}else if(sameType(target[key],source[key])){if(isFunction(target[key])){result[key]=source[key]}else if(isReference(target[key])){result[key]=extend(target[key],source[key])}else{result[key]=source[key]}}}return result};ObjectUtils.copy=function(source){if(ObjectUtils.isDate(source)){return new Date(source["getTime"]())}if(ObjectUtils.isFunction(source)){return source}if(source instanceof Array){var n=source["length"];var ret=[];for(var i=0;i<n;i++){ret[i]=ObjectUtils.copy(source[i])}return ret}if(source instanceof Object){var ret={};for(var key in source){if(source.hasOwnProperty(key)){ret[key]=ObjectUtils.copy(source[key])}}return ret}return source};return ObjectUtils}();exports.ObjectUtils=ObjectUtils},function(module,exports,__webpack_require__){"use strict";(function(process){var PooledClass=__webpack_require__(20);var assign=__webpack_require__(3);var invariant=__webpack_require__(2);function CallbackQueue(){this._callbacks=null;this._contexts=null}assign(CallbackQueue.prototype,{enqueue:function(callback,context){this._callbacks=this._callbacks||[];this._contexts=this._contexts||[];this._callbacks.push(callback);this._contexts.push(context)},notifyAll:function(){var callbacks=this._callbacks;var contexts=this._contexts;if(callbacks){!(callbacks.length===contexts.length)?process.env.NODE_ENV!=="production"?invariant(false,"Mismatched list of contexts in callback queue"):invariant(false):undefined;this._callbacks=null;this._contexts=null;for(var i=0;i<callbacks.length;i++){callbacks[i].call(contexts[i])}callbacks.length=0;contexts.length=0}},reset:function(){this._callbacks=null;this._contexts=null},destructor:function(){this.reset()}});PooledClass.addPoolingTo(CallbackQueue);module.exports=CallbackQueue}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var DOMProperty=__webpack_require__(21);var ReactPerf=__webpack_require__(12);var quoteAttributeValueForBrowser=__webpack_require__(196);var warning=__webpack_require__(4);var VALID_ATTRIBUTE_NAME_REGEX=/^[a-zA-Z_][\w\.\-]*$/;var illegalAttributeNameCache={};var validatedAttributeNameCache={};function isAttributeNameSafe(attributeName){if(validatedAttributeNameCache.hasOwnProperty(attributeName)){return true}if(illegalAttributeNameCache.hasOwnProperty(attributeName)){return false}if(VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)){validatedAttributeNameCache[attributeName]=true;return true}illegalAttributeNameCache[attributeName]=true;process.env.NODE_ENV!=="production"?warning(false,"Invalid attribute name: `%s`",attributeName):undefined;return false}function shouldIgnoreValue(propertyInfo,value){return value==null||propertyInfo.hasBooleanValue&&!value||propertyInfo.hasNumericValue&&isNaN(value)||propertyInfo.hasPositiveNumericValue&&value<1||propertyInfo.hasOverloadedBooleanValue&&value===false}if(process.env.NODE_ENV!=="production"){var reactProps={children:true,dangerouslySetInnerHTML:true,key:true,ref:true};var warnedProperties={};var warnUnknownProperty=function(name){if(reactProps.hasOwnProperty(name)&&reactProps[name]||warnedProperties.hasOwnProperty(name)&&warnedProperties[name]){return}warnedProperties[name]=true;var lowerCasedName=name.toLowerCase();var standardName=DOMProperty.isCustomAttribute(lowerCasedName)?lowerCasedName:DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName)?DOMProperty.getPossibleStandardName[lowerCasedName]:null;process.env.NODE_ENV!=="production"?warning(standardName==null,"Unknown DOM property %s. Did you mean %s?",name,standardName):undefined}}var DOMPropertyOperations={createMarkupForID:function(id){return DOMProperty.ID_ATTRIBUTE_NAME+"="+quoteAttributeValueForBrowser(id)},setAttributeForID:function(node,id){node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME,id)},createMarkupForProperty:function(name,value){var propertyInfo=DOMProperty.properties.hasOwnProperty(name)?DOMProperty.properties[name]:null;if(propertyInfo){if(shouldIgnoreValue(propertyInfo,value)){return""}var attributeName=propertyInfo.attributeName;if(propertyInfo.hasBooleanValue||propertyInfo.hasOverloadedBooleanValue&&value===true){return attributeName+'=""'}return attributeName+"="+quoteAttributeValueForBrowser(value)}else if(DOMProperty.isCustomAttribute(name)){if(value==null){return""}return name+"="+quoteAttributeValueForBrowser(value)}else if(process.env.NODE_ENV!=="production"){warnUnknownProperty(name)}return null},createMarkupForCustomAttribute:function(name,value){if(!isAttributeNameSafe(name)||value==null){return""}return name+"="+quoteAttributeValueForBrowser(value)},setValueForProperty:function(node,name,value){var propertyInfo=DOMProperty.properties.hasOwnProperty(name)?DOMProperty.properties[name]:null;if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod){mutationMethod(node,value)}else if(shouldIgnoreValue(propertyInfo,value)){this.deleteValueForProperty(node,name)}else if(propertyInfo.mustUseAttribute){var attributeName=propertyInfo.attributeName;var namespace=propertyInfo.attributeNamespace;if(namespace){node.setAttributeNS(namespace,attributeName,""+value)}else if(propertyInfo.hasBooleanValue||propertyInfo.hasOverloadedBooleanValue&&value===true){node.setAttribute(attributeName,"")}else{node.setAttribute(attributeName,""+value)}}else{var propName=propertyInfo.propertyName;if(!propertyInfo.hasSideEffects||""+node[propName]!==""+value){node[propName]=value}}}else if(DOMProperty.isCustomAttribute(name)){DOMPropertyOperations.setValueForAttribute(node,name,value)}else if(process.env.NODE_ENV!=="production"){warnUnknownProperty(name)}},setValueForAttribute:function(node,name,value){if(!isAttributeNameSafe(name)){return}if(value==null){node.removeAttribute(name)}else{node.setAttribute(name,""+value)}},deleteValueForProperty:function(node,name){var propertyInfo=DOMProperty.properties.hasOwnProperty(name)?DOMProperty.properties[name]:null;if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod){mutationMethod(node,undefined)}else if(propertyInfo.mustUseAttribute){node.removeAttribute(propertyInfo.attributeName)}else{var propName=propertyInfo.propertyName;var defaultValue=DOMProperty.getDefaultValueForProperty(node.nodeName,propName);if(!propertyInfo.hasSideEffects||""+node[propName]!==defaultValue){node[propName]=defaultValue}}}else if(DOMProperty.isCustomAttribute(name)){node.removeAttribute(name)}else if(process.env.NODE_ENV!=="production"){warnUnknownProperty(name)}}};ReactPerf.measureMethods(DOMPropertyOperations,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"});module.exports=DOMPropertyOperations}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactPropTypes=__webpack_require__(112);var ReactPropTypeLocations=__webpack_require__(39);var invariant=__webpack_require__(2);var warning=__webpack_require__(4);var hasReadOnlyValue={button:true,checkbox:true,image:true,hidden:true,radio:true,reset:true,submit:true};function _assertSingleLink(inputProps){!(inputProps.checkedLink==null||inputProps.valueLink==null)?process.env.NODE_ENV!=="production"?invariant(false,"Cannot provide a checkedLink and a valueLink. If you want to use "+"checkedLink, you probably don't want to use valueLink and vice versa."):invariant(false):undefined}function _assertValueLink(inputProps){_assertSingleLink(inputProps);!(inputProps.value==null&&inputProps.onChange==null)?process.env.NODE_ENV!=="production"?invariant(false,"Cannot provide a valueLink and a value or onChange event. If you want "+"to use value or onChange, you probably don't want to use valueLink."):invariant(false):undefined}function _assertCheckedLink(inputProps){_assertSingleLink(inputProps);!(inputProps.checked==null&&inputProps.onChange==null)?process.env.NODE_ENV!=="production"?invariant(false,"Cannot provide a checkedLink and a checked property or onChange event. "+"If you want to use checked or onChange, you probably don't want to "+"use checkedLink"):invariant(false):undefined}var propTypes={value:function(props,propName,componentName){if(!props[propName]||hasReadOnlyValue[props.type]||props.onChange||props.readOnly||props.disabled){return null}return new Error("You provided a `value` prop to a form field without an "+"`onChange` handler. This will render a read-only field. If "+"the field should be mutable use `defaultValue`. Otherwise, "+"set either `onChange` or `readOnly`.")},checked:function(props,propName,componentName){if(!props[propName]||props.onChange||props.readOnly||props.disabled){return null} return new Error("You provided a `checked` prop to a form field without an "+"`onChange` handler. This will render a read-only field. If "+"the field should be mutable use `defaultChecked`. Otherwise, "+"set either `onChange` or `readOnly`.")},onChange:ReactPropTypes.func};var loggedTypeFailures={};function getDeclarationErrorAddendum(owner){if(owner){var name=owner.getName();if(name){return" Check the render method of `"+name+"`."}}return""}var LinkedValueUtils={checkPropTypes:function(tagName,props,owner){for(var propName in propTypes){if(propTypes.hasOwnProperty(propName)){var error=propTypes[propName](props,propName,tagName,ReactPropTypeLocations.prop)}if(error instanceof Error&&!(error.message in loggedTypeFailures)){loggedTypeFailures[error.message]=true;var addendum=getDeclarationErrorAddendum(owner);process.env.NODE_ENV!=="production"?warning(false,"Failed form propType: %s%s",error.message,addendum):undefined}}},getValue:function(inputProps){if(inputProps.valueLink){_assertValueLink(inputProps);return inputProps.valueLink.value}return inputProps.value},getChecked:function(inputProps){if(inputProps.checkedLink){_assertCheckedLink(inputProps);return inputProps.checkedLink.value}return inputProps.checked},executeOnChange:function(inputProps,event){if(inputProps.valueLink){_assertValueLink(inputProps);return inputProps.valueLink.requestChange(event.target.value)}else if(inputProps.checkedLink){_assertCheckedLink(inputProps);return inputProps.checkedLink.requestChange(event.target.checked)}else if(inputProps.onChange){return inputProps.onChange.call(undefined,event)}}};module.exports=LinkedValueUtils}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ReactDOMIDOperations=__webpack_require__(72);var ReactMount=__webpack_require__(9);var ReactComponentBrowserEnvironment={processChildrenUpdates:ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(rootNodeID){ReactMount.purgeID(rootNodeID)}};module.exports=ReactComponentBrowserEnvironment},function(module,exports,__webpack_require__){"use strict";(function(process){var invariant=__webpack_require__(2);var injected=false;var ReactComponentEnvironment={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(environment){!!injected?process.env.NODE_ENV!=="production"?invariant(false,"ReactCompositeComponent: injectEnvironment() can only be called once."):invariant(false):undefined;ReactComponentEnvironment.unmountIDFromEnvironment=environment.unmountIDFromEnvironment;ReactComponentEnvironment.replaceNodeWithMarkupByID=environment.replaceNodeWithMarkupByID;ReactComponentEnvironment.processChildrenUpdates=environment.processChildrenUpdates;injected=true}}};module.exports=ReactComponentEnvironment}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var DOMChildrenOperations=__webpack_require__(93);var DOMPropertyOperations=__webpack_require__(68);var ReactMount=__webpack_require__(9);var ReactPerf=__webpack_require__(12);var invariant=__webpack_require__(2);var INVALID_PROPERTY_ERRORS={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."};var ReactDOMIDOperations={updatePropertyByID:function(id,name,value){var node=ReactMount.getNode(id);!!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)?process.env.NODE_ENV!=="production"?invariant(false,"updatePropertyByID(...): %s",INVALID_PROPERTY_ERRORS[name]):invariant(false):undefined;if(value!=null){DOMPropertyOperations.setValueForProperty(node,name,value)}else{DOMPropertyOperations.deleteValueForProperty(node,name)}},dangerouslyReplaceNodeWithMarkupByID:function(id,markup){var node=ReactMount.getNode(id);DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node,markup)},dangerouslyProcessChildrenUpdates:function(updates,markup){for(var i=0;i<updates.length;i++){updates[i].parentNode=ReactMount.getNode(updates[i].parentID)}DOMChildrenOperations.processUpdates(updates,markup)}};ReactPerf.measureMethods(ReactDOMIDOperations,"ReactDOMIDOperations",{dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"});module.exports=ReactDOMIDOperations}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactCurrentOwner=__webpack_require__(18);var ReactElement=__webpack_require__(11);var ReactInstanceMap=__webpack_require__(34);var ReactUpdates=__webpack_require__(14);var assign=__webpack_require__(3);var invariant=__webpack_require__(2);var warning=__webpack_require__(4);function enqueueUpdate(internalInstance){ReactUpdates.enqueueUpdate(internalInstance)}function getInternalInstanceReadyForUpdate(publicInstance,callerName){var internalInstance=ReactInstanceMap.get(publicInstance);if(!internalInstance){if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(!callerName,"%s(...): Can only update a mounted or mounting component. "+"This usually means you called %s() on an unmounted component. "+"This is a no-op. Please check the code for the %s component.",callerName,callerName,publicInstance.constructor.displayName):undefined}return null}if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(ReactCurrentOwner.current==null,"%s(...): Cannot update during an existing state transition "+"(such as within `render`). Render methods should be a pure function "+"of props and state.",callerName):undefined}return internalInstance}var ReactUpdateQueue={isMounted:function(publicInstance){if(process.env.NODE_ENV!=="production"){var owner=ReactCurrentOwner.current;if(owner!==null){process.env.NODE_ENV!=="production"?warning(owner._warnedAboutRefsInRender,"%s is accessing isMounted inside its render() function. "+"render() should be a pure function of props and state. It should "+"never access something that requires stale data from the previous "+"render, such as refs. Move this logic to componentDidMount and "+"componentDidUpdate instead.",owner.getName()||"A component"):undefined;owner._warnedAboutRefsInRender=true}}var internalInstance=ReactInstanceMap.get(publicInstance);if(internalInstance){return!!internalInstance._renderedComponent}else{return false}},enqueueCallback:function(publicInstance,callback){!(typeof callback==="function")?process.env.NODE_ENV!=="production"?invariant(false,"enqueueCallback(...): You called `setProps`, `replaceProps`, "+"`setState`, `replaceState`, or `forceUpdate` with a callback that "+"isn't callable."):invariant(false):undefined;var internalInstance=getInternalInstanceReadyForUpdate(publicInstance);if(!internalInstance){return null}if(internalInstance._pendingCallbacks){internalInstance._pendingCallbacks.push(callback)}else{internalInstance._pendingCallbacks=[callback]}enqueueUpdate(internalInstance)},enqueueCallbackInternal:function(internalInstance,callback){!(typeof callback==="function")?process.env.NODE_ENV!=="production"?invariant(false,"enqueueCallback(...): You called `setProps`, `replaceProps`, "+"`setState`, `replaceState`, or `forceUpdate` with a callback that "+"isn't callable."):invariant(false):undefined;if(internalInstance._pendingCallbacks){internalInstance._pendingCallbacks.push(callback)}else{internalInstance._pendingCallbacks=[callback]}enqueueUpdate(internalInstance)},enqueueForceUpdate:function(publicInstance){var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,"forceUpdate");if(!internalInstance){return}internalInstance._pendingForceUpdate=true;enqueueUpdate(internalInstance)},enqueueReplaceState:function(publicInstance,completeState){var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,"replaceState");if(!internalInstance){return}internalInstance._pendingStateQueue=[completeState];internalInstance._pendingReplaceState=true;enqueueUpdate(internalInstance)},enqueueSetState:function(publicInstance,partialState){var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,"setState");if(!internalInstance){return}var queue=internalInstance._pendingStateQueue||(internalInstance._pendingStateQueue=[]);queue.push(partialState);enqueueUpdate(internalInstance)},enqueueSetProps:function(publicInstance,partialProps){var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,"setProps");if(!internalInstance){return}ReactUpdateQueue.enqueueSetPropsInternal(internalInstance,partialProps)},enqueueSetPropsInternal:function(internalInstance,partialProps){var topLevelWrapper=internalInstance._topLevelWrapper;!topLevelWrapper?process.env.NODE_ENV!=="production"?invariant(false,"setProps(...): You called `setProps` on a "+"component with a parent. This is an anti-pattern since props will "+"get reactively updated when rendered. Instead, change the owner's "+"`render` method to pass the correct value as props to the component "+"where it is created."):invariant(false):undefined;var wrapElement=topLevelWrapper._pendingElement||topLevelWrapper._currentElement;var element=wrapElement.props;var props=assign({},element.props,partialProps);topLevelWrapper._pendingElement=ReactElement.cloneAndReplaceProps(wrapElement,ReactElement.cloneAndReplaceProps(element,props));enqueueUpdate(topLevelWrapper)},enqueueReplaceProps:function(publicInstance,props){var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,"replaceProps");if(!internalInstance){return}ReactUpdateQueue.enqueueReplacePropsInternal(internalInstance,props)},enqueueReplacePropsInternal:function(internalInstance,props){var topLevelWrapper=internalInstance._topLevelWrapper;!topLevelWrapper?process.env.NODE_ENV!=="production"?invariant(false,"replaceProps(...): You called `replaceProps` on a "+"component with a parent. This is an anti-pattern since props will "+"get reactively updated when rendered. Instead, change the owner's "+"`render` method to pass the correct value as props to the component "+"where it is created."):invariant(false):undefined;var wrapElement=topLevelWrapper._pendingElement||topLevelWrapper._currentElement;var element=wrapElement.props;topLevelWrapper._pendingElement=ReactElement.cloneAndReplaceProps(wrapElement,ReactElement.cloneAndReplaceProps(element,props));enqueueUpdate(topLevelWrapper)},enqueueElementInternal:function(internalInstance,newElement){internalInstance._pendingElement=newElement;enqueueUpdate(internalInstance)}};module.exports=ReactUpdateQueue}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";module.exports="0.14.8"},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactCurrentOwner=__webpack_require__(18);var ReactInstanceMap=__webpack_require__(34);var ReactMount=__webpack_require__(9);var invariant=__webpack_require__(2);var warning=__webpack_require__(4);function findDOMNode(componentOrElement){if(process.env.NODE_ENV!=="production"){var owner=ReactCurrentOwner.current;if(owner!==null){process.env.NODE_ENV!=="production"?warning(owner._warnedAboutRefsInRender,"%s is accessing getDOMNode or findDOMNode inside its render(). "+"render() should be a pure function of props and state. It should "+"never access something that requires stale data from the previous "+"render, such as refs. Move this logic to componentDidMount and "+"componentDidUpdate instead.",owner.getName()||"A component"):undefined;owner._warnedAboutRefsInRender=true}}if(componentOrElement==null){return null}if(componentOrElement.nodeType===1){return componentOrElement}if(ReactInstanceMap.has(componentOrElement)){return ReactMount.getNodeFromInstance(componentOrElement)}!(componentOrElement.render==null||typeof componentOrElement.render!=="function")?process.env.NODE_ENV!=="production"?invariant(false,"findDOMNode was called on an unmounted component."):invariant(false):undefined;true?process.env.NODE_ENV!=="production"?invariant(false,"Element appears to be neither ReactComponent nor DOMNode (keys: %s)",Object.keys(componentOrElement)):invariant(false):undefined}module.exports=findDOMNode}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";function getEventCharCode(nativeEvent){var charCode;var keyCode=nativeEvent.keyCode;if("charCode"in nativeEvent){charCode=nativeEvent.charCode;if(charCode===0&&keyCode===13){charCode=13}}else{charCode=keyCode}if(charCode>=32||charCode===13){return charCode}return 0}module.exports=getEventCharCode},function(module,exports,__webpack_require__){"use strict";var modifierKeyToProp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg)}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false}function getEventModifierState(nativeEvent){return modifierStateGetter}module.exports=getEventModifierState},function(module,exports,__webpack_require__){"use strict";function getEventTarget(nativeEvent){var target=nativeEvent.target||nativeEvent.srcElement||window;return target.nodeType===3?target.parentNode:target}module.exports=getEventTarget},function(module,exports,__webpack_require__){"use strict";var ITERATOR_SYMBOL=typeof Symbol==="function"&&Symbol.iterator;var FAUX_ITERATOR_SYMBOL="@@iterator";function getIteratorFn(maybeIterable){var iteratorFn=maybeIterable&&(ITERATOR_SYMBOL&&maybeIterable[ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL]);if(typeof iteratorFn==="function"){return iteratorFn}}module.exports=getIteratorFn},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactCompositeComponent=__webpack_require__(154);var ReactEmptyComponent=__webpack_require__(104);var ReactNativeComponent=__webpack_require__(110);var assign=__webpack_require__(3);var invariant=__webpack_require__(2);var warning=__webpack_require__(4);var ReactCompositeComponentWrapper=function(){};assign(ReactCompositeComponentWrapper.prototype,ReactCompositeComponent.Mixin,{_instantiateReactComponent:instantiateReactComponent});function getDeclarationErrorAddendum(owner){if(owner){var name=owner.getName();if(name){return" Check the render method of `"+name+"`."}}return""}function isInternalComponentType(type){return typeof type==="function"&&typeof type.prototype!=="undefined"&&typeof type.prototype.mountComponent==="function"&&typeof type.prototype.receiveComponent==="function"}function instantiateReactComponent(node){var instance;if(node===null||node===false){instance=new ReactEmptyComponent(instantiateReactComponent)}else if(typeof node==="object"){var element=node;!(element&&(typeof element.type==="function"||typeof element.type==="string"))?process.env.NODE_ENV!=="production"?invariant(false,"Element type is invalid: expected a string (for built-in components) "+"or a class/function (for composite components) but got: %s.%s",element.type==null?element.type:typeof element.type,getDeclarationErrorAddendum(element._owner)):invariant(false):undefined;if(typeof element.type==="string"){instance=ReactNativeComponent.createInternalComponent(element)}else if(isInternalComponentType(element.type)){instance=new element.type(element)}else{instance=new ReactCompositeComponentWrapper}}else if(typeof node==="string"||typeof node==="number"){instance=ReactNativeComponent.createInstanceForText(node)}else{true?process.env.NODE_ENV!=="production"?invariant(false,"Encountered invalid React node of type %s",typeof node):invariant(false):undefined}if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(typeof instance.construct==="function"&&typeof instance.mountComponent==="function"&&typeof instance.receiveComponent==="function"&&typeof instance.unmountComponent==="function","Only React Components can be mounted."):undefined}instance.construct(node);instance._mountIndex=0;instance._mountImage=null;if(process.env.NODE_ENV!=="production"){instance._isOwnerNecessary=false;instance._warnedAboutRefsInRender=false}if(process.env.NODE_ENV!=="production"){if(Object.preventExtensions){Object.preventExtensions(instance)}}return instance}module.exports=instantiateReactComponent}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ExecutionEnvironment=__webpack_require__(8);var useHasFeature;if(ExecutionEnvironment.canUseDOM){useHasFeature=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==true}function isEventSupported(eventNameSuffix,capture){if(!ExecutionEnvironment.canUseDOM||capture&&!("addEventListener"in document)){return false}var eventName="on"+eventNameSuffix;var isSupported=eventName in document;if(!isSupported){var element=document.createElement("div");element.setAttribute(eventName,"return;");isSupported=typeof element[eventName]==="function"}if(!isSupported&&useHasFeature&&eventNameSuffix==="wheel"){isSupported=document.implementation.hasFeature("Events.wheel","3.0")}return isSupported}module.exports=isEventSupported},function(module,exports,__webpack_require__){"use strict";var ExecutionEnvironment=__webpack_require__(8);var escapeTextContentForBrowser=__webpack_require__(43);var setInnerHTML=__webpack_require__(44);var setTextContent=function(node,text){node.textContent=text};if(ExecutionEnvironment.canUseDOM){if(!("textContent"in document.documentElement)){setTextContent=function(node,text){setInnerHTML(node,escapeTextContentForBrowser(text))}}}module.exports=setTextContent},function(module,exports,__webpack_require__){"use strict";function shouldUpdateReactComponent(prevElement,nextElement){var prevEmpty=prevElement===null||prevElement===false;var nextEmpty=nextElement===null||nextElement===false;if(prevEmpty||nextEmpty){return prevEmpty===nextEmpty}var prevType=typeof prevElement;var nextType=typeof nextElement;if(prevType==="string"||prevType==="number"){return nextType==="string"||nextType==="number"}else{return nextType==="object"&&prevElement.type===nextElement.type&&prevElement.key===nextElement.key}return false}module.exports=shouldUpdateReactComponent},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactCurrentOwner=__webpack_require__(18);var ReactElement=__webpack_require__(11);var ReactInstanceHandles=__webpack_require__(24);var getIteratorFn=__webpack_require__(79);var invariant=__webpack_require__(2);var warning=__webpack_require__(4);var SEPARATOR=ReactInstanceHandles.SEPARATOR;var SUBSEPARATOR=":";var userProvidedKeyEscaperLookup={"=":"=0",".":"=1",":":"=2"};var userProvidedKeyEscapeRegex=/[=.:]/g;var didWarnAboutMaps=false;function userProvidedKeyEscaper(match){return userProvidedKeyEscaperLookup[match]}function getComponentKey(component,index){if(component&&component.key!=null){return wrapUserProvidedKey(component.key)}return index.toString(36)}function escapeUserProvidedKey(text){return(""+text).replace(userProvidedKeyEscapeRegex,userProvidedKeyEscaper)}function wrapUserProvidedKey(key){return"$"+escapeUserProvidedKey(key)}function traverseAllChildrenImpl(children,nameSoFar,callback,traverseContext){var type=typeof children;if(type==="undefined"||type==="boolean"){children=null}if(children===null||type==="string"||type==="number"||ReactElement.isValidElement(children)){callback(traverseContext,children,nameSoFar===""?SEPARATOR+getComponentKey(children,0):nameSoFar);return 1}var child;var nextName;var subtreeCount=0;var nextNamePrefix=nameSoFar===""?SEPARATOR:nameSoFar+SUBSEPARATOR;if(Array.isArray(children)){for(var i=0;i<children.length;i++){child=children[i];nextName=nextNamePrefix+getComponentKey(child,i);subtreeCount+=traverseAllChildrenImpl(child,nextName,callback,traverseContext)}}else{var iteratorFn=getIteratorFn(children);if(iteratorFn){var iterator=iteratorFn.call(children);var step;if(iteratorFn!==children.entries){var ii=0;while(!(step=iterator.next()).done){child=step.value;nextName=nextNamePrefix+getComponentKey(child,ii++);subtreeCount+=traverseAllChildrenImpl(child,nextName,callback,traverseContext)}}else{if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(didWarnAboutMaps,"Using Maps as children is not yet fully supported. It is an "+"experimental feature that might be removed. Convert it to a "+"sequence / iterable of keyed ReactElements instead."):undefined;didWarnAboutMaps=true}while(!(step=iterator.next()).done){var entry=step.value;if(entry){child=entry[1];nextName=nextNamePrefix+wrapUserProvidedKey(entry[0])+SUBSEPARATOR+getComponentKey(child,0);subtreeCount+=traverseAllChildrenImpl(child,nextName,callback,traverseContext)}}}}else if(type==="object"){var addendum="";if(process.env.NODE_ENV!=="production"){addendum=" If you meant to render a collection of children, use an array "+"instead or wrap the object using createFragment(object) from the "+"React add-ons.";if(children._isReactElement){addendum=" It looks like you're using an element created by a different "+"version of React. Make sure to use only one copy of React."}if(ReactCurrentOwner.current){var name=ReactCurrentOwner.current.getName();if(name){addendum+=" Check the render method of `"+name+"`."}}}var childrenString=String(children);true?process.env.NODE_ENV!=="production"?invariant(false,"Objects are not valid as a React child (found: %s).%s",childrenString==="[object Object]"?"object with keys {"+Object.keys(children).join(", ")+"}":childrenString,addendum):invariant(false):undefined}}return subtreeCount}function traverseAllChildren(children,callback,traverseContext){if(children==null){return 0}return traverseAllChildrenImpl(children,"",callback,traverseContext)}module.exports=traverseAllChildren}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var assign=__webpack_require__(3);var emptyFunction=__webpack_require__(15);var warning=__webpack_require__(4);var validateDOMNesting=emptyFunction;if(process.env.NODE_ENV!=="production"){var specialTags=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"];var inScopeTags=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"];var buttonScopeTags=inScopeTags.concat(["button"]);var impliedEndTags=["dd","dt","li","option","optgroup","p","rp","rt"];var emptyAncestorInfo={parentTag:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};var updatedAncestorInfo=function(oldInfo,tag,instance){var ancestorInfo=assign({},oldInfo||emptyAncestorInfo);var info={tag:tag,instance:instance};if(inScopeTags.indexOf(tag)!==-1){ancestorInfo.aTagInScope=null;ancestorInfo.buttonTagInScope=null;ancestorInfo.nobrTagInScope=null}if(buttonScopeTags.indexOf(tag)!==-1){ancestorInfo.pTagInButtonScope=null}if(specialTags.indexOf(tag)!==-1&&tag!=="address"&&tag!=="div"&&tag!=="p"){ancestorInfo.listItemTagAutoclosing=null;ancestorInfo.dlItemTagAutoclosing=null}ancestorInfo.parentTag=info;if(tag==="form"){ancestorInfo.formTag=info}if(tag==="a"){ancestorInfo.aTagInScope=info}if(tag==="button"){ancestorInfo.buttonTagInScope=info}if(tag==="nobr"){ancestorInfo.nobrTagInScope=info}if(tag==="p"){ancestorInfo.pTagInButtonScope=info}if(tag==="li"){ancestorInfo.listItemTagAutoclosing=info}if(tag==="dd"||tag==="dt"){ancestorInfo.dlItemTagAutoclosing=info}return ancestorInfo};var isTagValidWithParent=function(tag,parentTag){switch(parentTag){case"select":return tag==="option"||tag==="optgroup"||tag==="#text";case"optgroup":return tag==="option"||tag==="#text";case"option":return tag==="#text";case"tr":return tag==="th"||tag==="td"||tag==="style"||tag==="script"||tag==="template";case"tbody":case"thead":case"tfoot":return tag==="tr"||tag==="style"||tag==="script"||tag==="template";case"colgroup":return tag==="col"||tag==="template";case"table":return tag==="caption"||tag==="colgroup"||tag==="tbody"||tag==="tfoot"||tag==="thead"||tag==="style"||tag==="script"||tag==="template";case"head":return tag==="base"||tag==="basefont"||tag==="bgsound"||tag==="link"||tag==="meta"||tag==="title"||tag==="noscript"||tag==="noframes"||tag==="style"||tag==="script"||tag==="template";case"html":return tag==="head"||tag==="body"}switch(tag){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return parentTag!=="h1"&&parentTag!=="h2"&&parentTag!=="h3"&&parentTag!=="h4"&&parentTag!=="h5"&&parentTag!=="h6";case"rp":case"rt":return impliedEndTags.indexOf(parentTag)===-1;case"caption":case"col":case"colgroup":case"frame":case"head":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return parentTag==null}return true};var findInvalidAncestorForTag=function(tag,ancestorInfo){switch(tag){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return ancestorInfo.pTagInButtonScope;case"form":return ancestorInfo.formTag||ancestorInfo.pTagInButtonScope;case"li":return ancestorInfo.listItemTagAutoclosing;case"dd":case"dt":return ancestorInfo.dlItemTagAutoclosing;case"button":return ancestorInfo.buttonTagInScope;case"a":return ancestorInfo.aTagInScope;case"nobr":return ancestorInfo.nobrTagInScope}return null};var findOwnerStack=function(instance){if(!instance){return[]}var stack=[];do{stack.push(instance)}while(instance=instance._currentElement._owner);stack.reverse();return stack};var didWarn={};validateDOMNesting=function(childTag,childInstance,ancestorInfo){ancestorInfo=ancestorInfo||emptyAncestorInfo;var parentInfo=ancestorInfo.parentTag;var parentTag=parentInfo&&parentInfo.tag;var invalidParent=isTagValidWithParent(childTag,parentTag)?null:parentInfo;var invalidAncestor=invalidParent?null:findInvalidAncestorForTag(childTag,ancestorInfo);var problematic=invalidParent||invalidAncestor;if(problematic){var ancestorTag=problematic.tag;var ancestorInstance=problematic.instance;var childOwner=childInstance&&childInstance._currentElement._owner;var ancestorOwner=ancestorInstance&&ancestorInstance._currentElement._owner;var childOwners=findOwnerStack(childOwner);var ancestorOwners=findOwnerStack(ancestorOwner);var minStackLen=Math.min(childOwners.length,ancestorOwners.length);var i;var deepestCommon=-1;for(i=0;i<minStackLen;i++){if(childOwners[i]===ancestorOwners[i]){deepestCommon=i}else{break}}var UNKNOWN="(unknown)";var childOwnerNames=childOwners.slice(deepestCommon+1).map(function(inst){return inst.getName()||UNKNOWN});var ancestorOwnerNames=ancestorOwners.slice(deepestCommon+1).map(function(inst){return inst.getName()||UNKNOWN});var ownerInfo=[].concat(deepestCommon!==-1?childOwners[deepestCommon].getName()||UNKNOWN:[],ancestorOwnerNames,ancestorTag,invalidAncestor?["..."]:[],childOwnerNames,childTag).join(" > ");var warnKey=!!invalidParent+"|"+childTag+"|"+ancestorTag+"|"+ownerInfo;if(didWarn[warnKey]){return}didWarn[warnKey]=true;if(invalidParent){var info="";if(ancestorTag==="table"&&childTag==="tr"){info+=" Add a <tbody> to your code to match the DOM tree generated by "+"the browser."}process.env.NODE_ENV!=="production"?warning(false,"validateDOMNesting(...): <%s> cannot appear as a child of <%s>. "+"See %s.%s",childTag,ancestorTag,ownerInfo,info):undefined}else{process.env.NODE_ENV!=="production"?warning(false,"validateDOMNesting(...): <%s> cannot appear as a descendant of "+"<%s>. See %s.",childTag,ancestorTag,ownerInfo):undefined}}};validateDOMNesting.ancestorInfoContextKey="__validateDOMNesting_ancestorInfo$"+Math.random().toString(36).slice(2);validateDOMNesting.updatedAncestorInfo=updatedAncestorInfo;validateDOMNesting.isTagValidInContext=function(tag,ancestorInfo){ancestorInfo=ancestorInfo||emptyAncestorInfo;var parentInfo=ancestorInfo.parentTag;var parentTag=parentInfo&&parentInfo.tag;return isTagValidWithParent(tag,parentTag)&&!findInvalidAncestorForTag(tag,ancestorInfo)}}module.exports=validateDOMNesting}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var emptyFunction=__webpack_require__(15);var EventListener={listen:function(target,eventType,callback){if(target.addEventListener){target.addEventListener(eventType,callback,false);return{remove:function(){target.removeEventListener(eventType,callback,false)}}}else if(target.attachEvent){target.attachEvent("on"+eventType,callback);return{remove:function(){target.detachEvent("on"+eventType,callback)}}}},capture:function(target,eventType,callback){if(target.addEventListener){target.addEventListener(eventType,callback,true);return{remove:function(){target.removeEventListener(eventType,callback,true)}}}else{if(process.env.NODE_ENV!=="production"){console.error("Attempted to listen to events during the capture phase on a "+"browser that does not support the capture phase. Your application "+"will not receive some events.")}return{remove:emptyFunction}}},registerDefault:function(){}};module.exports=EventListener}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var isTextNode=__webpack_require__(134);function containsNode(_x,_x2){var _again=true;_function:while(_again){var outerNode=_x,innerNode=_x2;_again=false;if(!outerNode||!innerNode){return false}else if(outerNode===innerNode){return true}else if(isTextNode(outerNode)){return false}else if(isTextNode(innerNode)){_x=outerNode;_x2=innerNode.parentNode;_again=true;continue _function}else if(outerNode.contains){return outerNode.contains(innerNode)}else if(outerNode.compareDocumentPosition){return!!(outerNode.compareDocumentPosition(innerNode)&16)}else{return false}}}module.exports=containsNode},function(module,exports,__webpack_require__){"use strict";function focusNode(node){try{node.focus()}catch(e){}}module.exports=focusNode},function(module,exports,__webpack_require__){"use strict";function getActiveElement(){if(typeof document==="undefined"){return null}try{return document.activeElement||document.body}catch(e){return document.body}}module.exports=getActiveElement},function(module,exports,__webpack_require__){"use strict";(function(process){var ExecutionEnvironment=__webpack_require__(8);var invariant=__webpack_require__(2);var dummyNode=ExecutionEnvironment.canUseDOM?document.createElement("div"):null;var shouldWrap={};var selectWrap=[1,'<select multiple="true">',"</select>"];var tableWrap=[1,"<table>","</table>"];var trWrap=[3,"<table><tbody><tr>","</tr></tbody></table>"];var svgWrap=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"];var markupWrap={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:selectWrap,option:selectWrap,caption:tableWrap, colgroup:tableWrap,tbody:tableWrap,tfoot:tableWrap,thead:tableWrap,td:trWrap,th:trWrap};var svgElements=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];svgElements.forEach(function(nodeName){markupWrap[nodeName]=svgWrap;shouldWrap[nodeName]=true});function getMarkupWrap(nodeName){!!!dummyNode?process.env.NODE_ENV!=="production"?invariant(false,"Markup wrapping node not initialized"):invariant(false):undefined;if(!markupWrap.hasOwnProperty(nodeName)){nodeName="*"}if(!shouldWrap.hasOwnProperty(nodeName)){if(nodeName==="*"){dummyNode.innerHTML="<link />"}else{dummyNode.innerHTML="<"+nodeName+"></"+nodeName+">"}shouldWrap[nodeName]=!dummyNode.firstChild}return shouldWrap[nodeName]?markupWrap[nodeName]:null}module.exports=getMarkupWrap}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var hasOwnProperty=Object.prototype.hasOwnProperty;function shallowEqual(objA,objB){if(objA===objB){return true}if(typeof objA!=="object"||objA===null||typeof objB!=="object"||objB===null){return false}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false}var bHasOwnProperty=hasOwnProperty.bind(objB);for(var i=0;i<keysA.length;i++){if(!bHasOwnProperty(keysA[i])||objA[keysA[i]]!==objB[keysA[i]]){return false}}return true}module.exports=shallowEqual},function(module,exports,__webpack_require__){"use strict";var isUnitlessNumber={animationIterationCount:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,zoom:true,fillOpacity:true,stopOpacity:true,strokeDashoffset:true,strokeOpacity:true,strokeWidth:true};function prefixKey(prefix,key){return prefix+key.charAt(0).toUpperCase()+key.substring(1)}var prefixes=["Webkit","ms","Moz","O"];Object.keys(isUnitlessNumber).forEach(function(prop){prefixes.forEach(function(prefix){isUnitlessNumber[prefixKey(prefix,prop)]=isUnitlessNumber[prop]})});var shorthandPropertyExpansions={background:{backgroundAttachment:true,backgroundColor:true,backgroundImage:true,backgroundPositionX:true,backgroundPositionY:true,backgroundRepeat:true},backgroundPosition:{backgroundPositionX:true,backgroundPositionY:true},border:{borderWidth:true,borderStyle:true,borderColor:true},borderBottom:{borderBottomWidth:true,borderBottomStyle:true,borderBottomColor:true},borderLeft:{borderLeftWidth:true,borderLeftStyle:true,borderLeftColor:true},borderRight:{borderRightWidth:true,borderRightStyle:true,borderRightColor:true},borderTop:{borderTopWidth:true,borderTopStyle:true,borderTopColor:true},font:{fontStyle:true,fontVariant:true,fontWeight:true,fontSize:true,lineHeight:true,fontFamily:true},outline:{outlineWidth:true,outlineStyle:true,outlineColor:true}};var CSSProperty={isUnitlessNumber:isUnitlessNumber,shorthandPropertyExpansions:shorthandPropertyExpansions};module.exports=CSSProperty},function(module,exports,__webpack_require__){"use strict";(function(process){var Danger=__webpack_require__(145);var ReactMultiChildUpdateTypes=__webpack_require__(109);var ReactPerf=__webpack_require__(12);var setInnerHTML=__webpack_require__(44);var setTextContent=__webpack_require__(82);var invariant=__webpack_require__(2);function insertChildAt(parentNode,childNode,index){var beforeChild=index>=parentNode.childNodes.length?null:parentNode.childNodes.item(index);parentNode.insertBefore(childNode,beforeChild)}var DOMChildrenOperations={dangerouslyReplaceNodeWithMarkup:Danger.dangerouslyReplaceNodeWithMarkup,updateTextContent:setTextContent,processUpdates:function(updates,markupList){var update;var initialChildren=null;var updatedChildren=null;for(var i=0;i<updates.length;i++){update=updates[i];if(update.type===ReactMultiChildUpdateTypes.MOVE_EXISTING||update.type===ReactMultiChildUpdateTypes.REMOVE_NODE){var updatedIndex=update.fromIndex;var updatedChild=update.parentNode.childNodes[updatedIndex];var parentID=update.parentID;!updatedChild?process.env.NODE_ENV!=="production"?invariant(false,"processUpdates(): Unable to find child %s of element. This "+"probably means the DOM was unexpectedly mutated (e.g., by the "+"browser), usually due to forgetting a <tbody> when using tables, "+"nesting tags like <form>, <p>, or <a>, or using non-SVG elements "+"in an <svg> parent. Try inspecting the child nodes of the element "+"with React ID `%s`.",updatedIndex,parentID):invariant(false):undefined;initialChildren=initialChildren||{};initialChildren[parentID]=initialChildren[parentID]||[];initialChildren[parentID][updatedIndex]=updatedChild;updatedChildren=updatedChildren||[];updatedChildren.push(updatedChild)}}var renderedMarkup;if(markupList.length&&typeof markupList[0]==="string"){renderedMarkup=Danger.dangerouslyRenderMarkup(markupList)}else{renderedMarkup=markupList}if(updatedChildren){for(var j=0;j<updatedChildren.length;j++){updatedChildren[j].parentNode.removeChild(updatedChildren[j])}}for(var k=0;k<updates.length;k++){update=updates[k];switch(update.type){case ReactMultiChildUpdateTypes.INSERT_MARKUP:insertChildAt(update.parentNode,renderedMarkup[update.markupIndex],update.toIndex);break;case ReactMultiChildUpdateTypes.MOVE_EXISTING:insertChildAt(update.parentNode,initialChildren[update.parentID][update.fromIndex],update.toIndex);break;case ReactMultiChildUpdateTypes.SET_MARKUP:setInnerHTML(update.parentNode,update.content);break;case ReactMultiChildUpdateTypes.TEXT_CONTENT:setTextContent(update.parentNode,update.content);break;case ReactMultiChildUpdateTypes.REMOVE_NODE:break}}}};ReactPerf.measureMethods(DOMChildrenOperations,"DOMChildrenOperations",{updateTextContent:"updateTextContent"});module.exports=DOMChildrenOperations}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var invariant=__webpack_require__(2);var EventPluginOrder=null;var namesToPlugins={};function recomputePluginOrdering(){if(!EventPluginOrder){return}for(var pluginName in namesToPlugins){var PluginModule=namesToPlugins[pluginName];var pluginIndex=EventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?process.env.NODE_ENV!=="production"?invariant(false,"EventPluginRegistry: Cannot inject event plugins that do not exist in "+"the plugin ordering, `%s`.",pluginName):invariant(false):undefined;if(EventPluginRegistry.plugins[pluginIndex]){continue}!PluginModule.extractEvents?process.env.NODE_ENV!=="production"?invariant(false,"EventPluginRegistry: Event plugins must implement an `extractEvents` "+"method, but `%s` does not.",pluginName):invariant(false):undefined;EventPluginRegistry.plugins[pluginIndex]=PluginModule;var publishedEvents=PluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],PluginModule,eventName)?process.env.NODE_ENV!=="production"?invariant(false,"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",eventName,pluginName):invariant(false):undefined}}}function publishEventForPlugin(dispatchConfig,PluginModule,eventName){!!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName)?process.env.NODE_ENV!=="production"?invariant(false,"EventPluginHub: More than one plugin attempted to publish the same "+"event name, `%s`.",eventName):invariant(false):undefined;EventPluginRegistry.eventNameDispatchConfigs[eventName]=dispatchConfig;var phasedRegistrationNames=dispatchConfig.phasedRegistrationNames;if(phasedRegistrationNames){for(var phaseName in phasedRegistrationNames){if(phasedRegistrationNames.hasOwnProperty(phaseName)){var phasedRegistrationName=phasedRegistrationNames[phaseName];publishRegistrationName(phasedRegistrationName,PluginModule,eventName)}}return true}else if(dispatchConfig.registrationName){publishRegistrationName(dispatchConfig.registrationName,PluginModule,eventName);return true}return false}function publishRegistrationName(registrationName,PluginModule,eventName){!!EventPluginRegistry.registrationNameModules[registrationName]?process.env.NODE_ENV!=="production"?invariant(false,"EventPluginHub: More than one plugin attempted to publish the same "+"registration name, `%s`.",registrationName):invariant(false):undefined;EventPluginRegistry.registrationNameModules[registrationName]=PluginModule;EventPluginRegistry.registrationNameDependencies[registrationName]=PluginModule.eventTypes[eventName].dependencies}var EventPluginRegistry={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(InjectedEventPluginOrder){!!EventPluginOrder?process.env.NODE_ENV!=="production"?invariant(false,"EventPluginRegistry: Cannot inject event plugin ordering more than "+"once. You are likely trying to load more than one copy of React."):invariant(false):undefined;EventPluginOrder=Array.prototype.slice.call(InjectedEventPluginOrder);recomputePluginOrdering()},injectEventPluginsByName:function(injectedNamesToPlugins){var isOrderingDirty=false;for(var pluginName in injectedNamesToPlugins){if(!injectedNamesToPlugins.hasOwnProperty(pluginName)){continue}var PluginModule=injectedNamesToPlugins[pluginName];if(!namesToPlugins.hasOwnProperty(pluginName)||namesToPlugins[pluginName]!==PluginModule){!!namesToPlugins[pluginName]?process.env.NODE_ENV!=="production"?invariant(false,"EventPluginRegistry: Cannot inject two different event plugins "+"using the same name, `%s`.",pluginName):invariant(false):undefined;namesToPlugins[pluginName]=PluginModule;isOrderingDirty=true}}if(isOrderingDirty){recomputePluginOrdering()}},getPluginModuleForEvent:function(event){var dispatchConfig=event.dispatchConfig;if(dispatchConfig.registrationName){return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName]||null}for(var phase in dispatchConfig.phasedRegistrationNames){if(!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)){continue}var PluginModule=EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]];if(PluginModule){return PluginModule}}return null},_resetEventPlugins:function(){EventPluginOrder=null;for(var pluginName in namesToPlugins){if(namesToPlugins.hasOwnProperty(pluginName)){delete namesToPlugins[pluginName]}}EventPluginRegistry.plugins.length=0;var eventNameDispatchConfigs=EventPluginRegistry.eventNameDispatchConfigs;for(var eventName in eventNameDispatchConfigs){if(eventNameDispatchConfigs.hasOwnProperty(eventName)){delete eventNameDispatchConfigs[eventName]}}var registrationNameModules=EventPluginRegistry.registrationNameModules;for(var registrationName in registrationNameModules){if(registrationNameModules.hasOwnProperty(registrationName)){delete registrationNameModules[registrationName]}}}};module.exports=EventPluginRegistry}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var PooledClass=__webpack_require__(20);var ReactElement=__webpack_require__(11);var emptyFunction=__webpack_require__(15);var traverseAllChildren=__webpack_require__(84);var twoArgumentPooler=PooledClass.twoArgumentPooler;var fourArgumentPooler=PooledClass.fourArgumentPooler;var userProvidedKeyEscapeRegex=/\/(?!\/)/g;function escapeUserProvidedKey(text){return(""+text).replace(userProvidedKeyEscapeRegex,"//")}function ForEachBookKeeping(forEachFunction,forEachContext){this.func=forEachFunction;this.context=forEachContext;this.count=0}ForEachBookKeeping.prototype.destructor=function(){this.func=null;this.context=null;this.count=0};PooledClass.addPoolingTo(ForEachBookKeeping,twoArgumentPooler);function forEachSingleChild(bookKeeping,child,name){var func=bookKeeping.func;var context=bookKeeping.context;func.call(context,child,bookKeeping.count++)}function forEachChildren(children,forEachFunc,forEachContext){if(children==null){return children}var traverseContext=ForEachBookKeeping.getPooled(forEachFunc,forEachContext);traverseAllChildren(children,forEachSingleChild,traverseContext);ForEachBookKeeping.release(traverseContext)}function MapBookKeeping(mapResult,keyPrefix,mapFunction,mapContext){this.result=mapResult;this.keyPrefix=keyPrefix;this.func=mapFunction;this.context=mapContext;this.count=0}MapBookKeeping.prototype.destructor=function(){this.result=null;this.keyPrefix=null;this.func=null;this.context=null;this.count=0};PooledClass.addPoolingTo(MapBookKeeping,fourArgumentPooler);function mapSingleChildIntoContext(bookKeeping,child,childKey){var result=bookKeeping.result;var keyPrefix=bookKeeping.keyPrefix;var func=bookKeeping.func;var context=bookKeeping.context;var mappedChild=func.call(context,child,bookKeeping.count++);if(Array.isArray(mappedChild)){mapIntoWithKeyPrefixInternal(mappedChild,result,childKey,emptyFunction.thatReturnsArgument)}else if(mappedChild!=null){if(ReactElement.isValidElement(mappedChild)){mappedChild=ReactElement.cloneAndReplaceKey(mappedChild,keyPrefix+(mappedChild!==child?escapeUserProvidedKey(mappedChild.key||"")+"/":"")+childKey)}result.push(mappedChild)}}function mapIntoWithKeyPrefixInternal(children,array,prefix,func,context){var escapedPrefix="";if(prefix!=null){escapedPrefix=escapeUserProvidedKey(prefix)+"/"}var traverseContext=MapBookKeeping.getPooled(array,escapedPrefix,func,context);traverseAllChildren(children,mapSingleChildIntoContext,traverseContext);MapBookKeeping.release(traverseContext)}function mapChildren(children,func,context){if(children==null){return children}var result=[];mapIntoWithKeyPrefixInternal(children,result,null,func,context);return result}function forEachSingleChildDummy(traverseContext,child,name){return null}function countChildren(children,context){return traverseAllChildren(children,forEachSingleChildDummy,null)}function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,emptyFunction.thatReturnsArgument);return result}var ReactChildren={forEach:forEachChildren,map:mapChildren,mapIntoWithKeyPrefixInternal:mapIntoWithKeyPrefixInternal,count:countChildren,toArray:toArray};module.exports=ReactChildren},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactComponent=__webpack_require__(97);var ReactElement=__webpack_require__(11);var ReactPropTypeLocations=__webpack_require__(39);var ReactPropTypeLocationNames=__webpack_require__(38);var ReactNoopUpdateQueue=__webpack_require__(111);var assign=__webpack_require__(3);var emptyObject=__webpack_require__(31);var invariant=__webpack_require__(2);var keyMirror=__webpack_require__(36);var keyOf=__webpack_require__(19);var warning=__webpack_require__(4);var MIXINS_KEY=keyOf({mixins:null});var SpecPolicy=keyMirror({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null});var injectedMixins=[];var warnedSetProps=false;function warnSetProps(){if(!warnedSetProps){warnedSetProps=true;process.env.NODE_ENV!=="production"?warning(false,"setProps(...) and replaceProps(...) are deprecated. "+"Instead, call render again at the top level."):undefined}}var ReactClassInterface={mixins:SpecPolicy.DEFINE_MANY,statics:SpecPolicy.DEFINE_MANY,propTypes:SpecPolicy.DEFINE_MANY,contextTypes:SpecPolicy.DEFINE_MANY,childContextTypes:SpecPolicy.DEFINE_MANY,getDefaultProps:SpecPolicy.DEFINE_MANY_MERGED,getInitialState:SpecPolicy.DEFINE_MANY_MERGED,getChildContext:SpecPolicy.DEFINE_MANY_MERGED,render:SpecPolicy.DEFINE_ONCE,componentWillMount:SpecPolicy.DEFINE_MANY,componentDidMount:SpecPolicy.DEFINE_MANY,componentWillReceiveProps:SpecPolicy.DEFINE_MANY,shouldComponentUpdate:SpecPolicy.DEFINE_ONCE,componentWillUpdate:SpecPolicy.DEFINE_MANY,componentDidUpdate:SpecPolicy.DEFINE_MANY,componentWillUnmount:SpecPolicy.DEFINE_MANY,updateComponent:SpecPolicy.OVERRIDE_BASE};var RESERVED_SPEC_KEYS={displayName:function(Constructor,displayName){Constructor.displayName=displayName},mixins:function(Constructor,mixins){if(mixins){for(var i=0;i<mixins.length;i++){mixSpecIntoComponent(Constructor,mixins[i])}}},childContextTypes:function(Constructor,childContextTypes){if(process.env.NODE_ENV!=="production"){validateTypeDef(Constructor,childContextTypes,ReactPropTypeLocations.childContext)}Constructor.childContextTypes=assign({},Constructor.childContextTypes,childContextTypes)},contextTypes:function(Constructor,contextTypes){if(process.env.NODE_ENV!=="production"){validateTypeDef(Constructor,contextTypes,ReactPropTypeLocations.context)}Constructor.contextTypes=assign({},Constructor.contextTypes,contextTypes)},getDefaultProps:function(Constructor,getDefaultProps){if(Constructor.getDefaultProps){Constructor.getDefaultProps=createMergedResultFunction(Constructor.getDefaultProps,getDefaultProps)}else{Constructor.getDefaultProps=getDefaultProps}},propTypes:function(Constructor,propTypes){if(process.env.NODE_ENV!=="production"){validateTypeDef(Constructor,propTypes,ReactPropTypeLocations.prop)}Constructor.propTypes=assign({},Constructor.propTypes,propTypes)},statics:function(Constructor,statics){mixStaticSpecIntoComponent(Constructor,statics)},autobind:function(){}};function validateTypeDef(Constructor,typeDef,location){for(var propName in typeDef){if(typeDef.hasOwnProperty(propName)){process.env.NODE_ENV!=="production"?warning(typeof typeDef[propName]==="function","%s: %s type `%s` is invalid; it must be a function, usually from "+"React.PropTypes.",Constructor.displayName||"ReactClass",ReactPropTypeLocationNames[location],propName):undefined}}}function validateMethodOverride(proto,name){var specPolicy=ReactClassInterface.hasOwnProperty(name)?ReactClassInterface[name]:null;if(ReactClassMixin.hasOwnProperty(name)){!(specPolicy===SpecPolicy.OVERRIDE_BASE)?process.env.NODE_ENV!=="production"?invariant(false,"ReactClassInterface: You are attempting to override "+"`%s` from your class specification. Ensure that your method names "+"do not overlap with React methods.",name):invariant(false):undefined}if(proto.hasOwnProperty(name)){!(specPolicy===SpecPolicy.DEFINE_MANY||specPolicy===SpecPolicy.DEFINE_MANY_MERGED)?process.env.NODE_ENV!=="production"?invariant(false,"ReactClassInterface: You are attempting to define "+"`%s` on your component more than once. This conflict may be due "+"to a mixin.",name):invariant(false):undefined}}function mixSpecIntoComponent(Constructor,spec){if(!spec){return}!(typeof spec!=="function")?process.env.NODE_ENV!=="production"?invariant(false,"ReactClass: You're attempting to "+"use a component class as a mixin. Instead, just use a regular object."):invariant(false):undefined;!!ReactElement.isValidElement(spec)?process.env.NODE_ENV!=="production"?invariant(false,"ReactClass: You're attempting to "+"use a component as a mixin. Instead, just use a regular object."):invariant(false):undefined;var proto=Constructor.prototype;if(spec.hasOwnProperty(MIXINS_KEY)){RESERVED_SPEC_KEYS.mixins(Constructor,spec.mixins)}for(var name in spec){if(!spec.hasOwnProperty(name)){continue}if(name===MIXINS_KEY){continue}var property=spec[name];validateMethodOverride(proto,name);if(RESERVED_SPEC_KEYS.hasOwnProperty(name)){RESERVED_SPEC_KEYS[name](Constructor,property)}else{var isReactClassMethod=ReactClassInterface.hasOwnProperty(name);var isAlreadyDefined=proto.hasOwnProperty(name);var isFunction=typeof property==="function";var shouldAutoBind=isFunction&&!isReactClassMethod&&!isAlreadyDefined&&spec.autobind!==false;if(shouldAutoBind){if(!proto.__reactAutoBindMap){proto.__reactAutoBindMap={}}proto.__reactAutoBindMap[name]=property;proto[name]=property}else{if(isAlreadyDefined){var specPolicy=ReactClassInterface[name];!(isReactClassMethod&&(specPolicy===SpecPolicy.DEFINE_MANY_MERGED||specPolicy===SpecPolicy.DEFINE_MANY))?process.env.NODE_ENV!=="production"?invariant(false,"ReactClass: Unexpected spec policy %s for key %s "+"when mixing in component specs.",specPolicy,name):invariant(false):undefined;if(specPolicy===SpecPolicy.DEFINE_MANY_MERGED){proto[name]=createMergedResultFunction(proto[name],property)}else if(specPolicy===SpecPolicy.DEFINE_MANY){proto[name]=createChainedFunction(proto[name],property)}}else{proto[name]=property;if(process.env.NODE_ENV!=="production"){if(typeof property==="function"&&spec.displayName){proto[name].displayName=spec.displayName+"_"+name}}}}}}}function mixStaticSpecIntoComponent(Constructor,statics){if(!statics){return}for(var name in statics){var property=statics[name];if(!statics.hasOwnProperty(name)){continue}var isReserved=name in RESERVED_SPEC_KEYS;!!isReserved?process.env.NODE_ENV!=="production"?invariant(false,"ReactClass: You are attempting to define a reserved "+'property, `%s`, that shouldn\'t be on the "statics" key. Define it '+"as an instance property instead; it will still be accessible on the "+"constructor.",name):invariant(false):undefined;var isInherited=name in Constructor;!!isInherited?process.env.NODE_ENV!=="production"?invariant(false,"ReactClass: You are attempting to define "+"`%s` on your component more than once. This conflict may be "+"due to a mixin.",name):invariant(false):undefined;Constructor[name]=property}}function mergeIntoWithNoDuplicateKeys(one,two){!(one&&two&&typeof one==="object"&&typeof two==="object")?process.env.NODE_ENV!=="production"?invariant(false,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."):invariant(false):undefined;for(var key in two){if(two.hasOwnProperty(key)){!(one[key]===undefined)?process.env.NODE_ENV!=="production"?invariant(false,"mergeIntoWithNoDuplicateKeys(): "+"Tried to merge two objects with the same key: `%s`. This conflict "+"may be due to a mixin; in particular, this may be caused by two "+"getInitialState() or getDefaultProps() methods returning objects "+"with clashing keys.",key):invariant(false):undefined;one[key]=two[key]}}return one}function createMergedResultFunction(one,two){return function mergedResult(){var a=one.apply(this,arguments);var b=two.apply(this,arguments);if(a==null){return b}else if(b==null){return a}var c={};mergeIntoWithNoDuplicateKeys(c,a);mergeIntoWithNoDuplicateKeys(c,b);return c}}function createChainedFunction(one,two){return function chainedFunction(){one.apply(this,arguments);two.apply(this,arguments)}}function bindAutoBindMethod(component,method){var boundMethod=method.bind(component);if(process.env.NODE_ENV!=="production"){boundMethod.__reactBoundContext=component;boundMethod.__reactBoundMethod=method;boundMethod.__reactBoundArguments=null;var componentName=component.constructor.displayName;var _bind=boundMethod.bind;boundMethod.bind=function(newThis){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}if(newThis!==component&&newThis!==null){process.env.NODE_ENV!=="production"?warning(false,"bind(): React component methods may only be bound to the "+"component instance. See %s",componentName):undefined}else if(!args.length){process.env.NODE_ENV!=="production"?warning(false,"bind(): You are binding a component method to the component. "+"React does this for you automatically in a high-performance "+"way, so you can safely remove this call. See %s",componentName):undefined;return boundMethod}var reboundMethod=_bind.apply(boundMethod,arguments);reboundMethod.__reactBoundContext=component;reboundMethod.__reactBoundMethod=method;reboundMethod.__reactBoundArguments=args;return reboundMethod}}return boundMethod}function bindAutoBindMethods(component){for(var autoBindKey in component.__reactAutoBindMap){if(component.__reactAutoBindMap.hasOwnProperty(autoBindKey)){var method=component.__reactAutoBindMap[autoBindKey];component[autoBindKey]=bindAutoBindMethod(component,method)}}}var ReactClassMixin={replaceState:function(newState,callback){this.updater.enqueueReplaceState(this,newState);if(callback){this.updater.enqueueCallback(this,callback)}},isMounted:function(){return this.updater.isMounted(this)},setProps:function(partialProps,callback){if(process.env.NODE_ENV!=="production"){warnSetProps()}this.updater.enqueueSetProps(this,partialProps);if(callback){this.updater.enqueueCallback(this,callback)}},replaceProps:function(newProps,callback){if(process.env.NODE_ENV!=="production"){warnSetProps()}this.updater.enqueueReplaceProps(this,newProps);if(callback){this.updater.enqueueCallback(this,callback)}}};var ReactClassComponent=function(){};assign(ReactClassComponent.prototype,ReactComponent.prototype,ReactClassMixin);var ReactClass={createClass:function(spec){var Constructor=function(props,context,updater){if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(this instanceof Constructor,"Something is calling a React component directly. Use a factory or "+"JSX instead. See: https://fb.me/react-legacyfactory"):undefined}if(this.__reactAutoBindMap){bindAutoBindMethods(this)}this.props=props;this.context=context;this.refs=emptyObject;this.updater=updater||ReactNoopUpdateQueue;this.state=null;var initialState=this.getInitialState?this.getInitialState():null;if(process.env.NODE_ENV!=="production"){if(typeof initialState==="undefined"&&this.getInitialState._isMockFunction){initialState=null}}!(typeof initialState==="object"&&!Array.isArray(initialState))?process.env.NODE_ENV!=="production"?invariant(false,"%s.getInitialState(): must return an object or null",Constructor.displayName||"ReactCompositeComponent"):invariant(false):undefined;this.state=initialState};Constructor.prototype=new ReactClassComponent;Constructor.prototype.constructor=Constructor;injectedMixins.forEach(mixSpecIntoComponent.bind(null,Constructor));mixSpecIntoComponent(Constructor,spec);if(Constructor.getDefaultProps){Constructor.defaultProps=Constructor.getDefaultProps()}if(process.env.NODE_ENV!=="production"){if(Constructor.getDefaultProps){Constructor.getDefaultProps.isReactClassApproved={}}if(Constructor.prototype.getInitialState){Constructor.prototype.getInitialState.isReactClassApproved={}}}!Constructor.prototype.render?process.env.NODE_ENV!=="production"?invariant(false,"createClass(...): Class specification must implement a `render` method."):invariant(false):undefined;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(!Constructor.prototype.componentShouldUpdate,"%s has a method called "+"componentShouldUpdate(). Did you mean shouldComponentUpdate()? "+"The name is phrased as a question because the function is "+"expected to return a value.",spec.displayName||"A component"):undefined;process.env.NODE_ENV!=="production"?warning(!Constructor.prototype.componentWillRecieveProps,"%s has a method called "+"componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",spec.displayName||"A component"):undefined}for(var methodName in ReactClassInterface){if(!Constructor.prototype[methodName]){Constructor.prototype[methodName]=null}}return Constructor},injection:{injectMixin:function(mixin){injectedMixins.push(mixin)}}};module.exports=ReactClass}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactNoopUpdateQueue=__webpack_require__(111);var canDefineProperty=__webpack_require__(42);var emptyObject=__webpack_require__(31);var invariant=__webpack_require__(2);var warning=__webpack_require__(4);function ReactComponent(props,context,updater){this.props=props;this.context=context;this.refs=emptyObject;this.updater=updater||ReactNoopUpdateQueue}ReactComponent.prototype.isReactComponent={};ReactComponent.prototype.setState=function(partialState,callback){!(typeof partialState==="object"||typeof partialState==="function"||partialState==null)?process.env.NODE_ENV!=="production"?invariant(false,"setState(...): takes an object of state variables to update or a "+"function which returns an object of state variables."):invariant(false):undefined;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(partialState!=null,"setState(...): You passed an undefined or null state object; "+"instead, use forceUpdate()."):undefined}this.updater.enqueueSetState(this,partialState);if(callback){this.updater.enqueueCallback(this,callback)}};ReactComponent.prototype.forceUpdate=function(callback){this.updater.enqueueForceUpdate(this);if(callback){this.updater.enqueueCallback(this,callback)}};if(process.env.NODE_ENV!=="production"){var deprecatedAPIs={getDOMNode:["getDOMNode","Use ReactDOM.findDOMNode(component) instead."],isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in "+"componentWillUnmount to prevent memory leaks."],replaceProps:["replaceProps","Instead, call render again at the top level."],replaceState:["replaceState","Refactor your code to use setState instead (see "+"https://github.com/facebook/react/issues/3236)."],setProps:["setProps","Instead, call render again at the top level."]};var defineDeprecationWarning=function(methodName,info){if(canDefineProperty){Object.defineProperty(ReactComponent.prototype,methodName,{get:function(){process.env.NODE_ENV!=="production"?warning(false,"%s(...) is deprecated in plain JavaScript React classes. %s",info[0],info[1]):undefined;return undefined}})}};for(var fnName in deprecatedAPIs){if(deprecatedAPIs.hasOwnProperty(fnName)){defineDeprecationWarning(fnName,deprecatedAPIs[fnName])}}}module.exports=ReactComponent}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ReactDOMFeatureFlags={useCreateElement:false};module.exports=ReactDOMFeatureFlags},function(module,exports,__webpack_require__){"use strict";(function(process){var LinkedValueUtils=__webpack_require__(69);var ReactMount=__webpack_require__(9);var ReactUpdates=__webpack_require__(14);var assign=__webpack_require__(3);var warning=__webpack_require__(4);var valueContextKey="__ReactDOMSelect_value$"+Math.random().toString(36).slice(2);function updateOptionsIfPendingUpdateAndMounted(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=false;var props=this._currentElement.props;var value=LinkedValueUtils.getValue(props);if(value!=null){updateOptions(this,Boolean(props.multiple),value)}}}function getDeclarationErrorAddendum(owner){if(owner){var name=owner.getName();if(name){return" Check the render method of `"+name+"`."}}return""}var valuePropNames=["value","defaultValue"];function checkSelectPropTypes(inst,props){var owner=inst._currentElement._owner;LinkedValueUtils.checkPropTypes("select",props,owner);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue}if(props.multiple){process.env.NODE_ENV!=="production"?warning(Array.isArray(props[propName]),"The `%s` prop supplied to <select> must be an array if "+"`multiple` is true.%s",propName,getDeclarationErrorAddendum(owner)):undefined}else{process.env.NODE_ENV!=="production"?warning(!Array.isArray(props[propName]),"The `%s` prop supplied to <select> must be a scalar "+"value if `multiple` is false.%s",propName,getDeclarationErrorAddendum(owner)):undefined}}}function updateOptions(inst,multiple,propValue){var selectedValue,i;var options=ReactMount.getNode(inst._rootNodeID).options;if(multiple){selectedValue={};for(i=0;i<propValue.length;i++){selectedValue[""+propValue[i]]=true}for(i=0;i<options.length;i++){var selected=selectedValue.hasOwnProperty(options[i].value);if(options[i].selected!==selected){options[i].selected=selected}}}else{selectedValue=""+propValue;for(i=0;i<options.length;i++){if(options[i].value===selectedValue){options[i].selected=true;return}}if(options.length){options[0].selected=true}}}var ReactDOMSelect={valueContextKey:valueContextKey,getNativeProps:function(inst,props,context){return assign({},props,{onChange:inst._wrapperState.onChange,value:undefined})},mountWrapper:function(inst,props){if(process.env.NODE_ENV!=="production"){checkSelectPropTypes(inst,props)}var value=LinkedValueUtils.getValue(props);inst._wrapperState={ pendingUpdate:false,initialValue:value!=null?value:props.defaultValue,onChange:_handleChange.bind(inst),wasMultiple:Boolean(props.multiple)}},processChildContext:function(inst,props,context){var childContext=assign({},context);childContext[valueContextKey]=inst._wrapperState.initialValue;return childContext},postUpdateWrapper:function(inst){var props=inst._currentElement.props;inst._wrapperState.initialValue=undefined;var wasMultiple=inst._wrapperState.wasMultiple;inst._wrapperState.wasMultiple=Boolean(props.multiple);var value=LinkedValueUtils.getValue(props);if(value!=null){inst._wrapperState.pendingUpdate=false;updateOptions(inst,Boolean(props.multiple),value)}else if(wasMultiple!==Boolean(props.multiple)){if(props.defaultValue!=null){updateOptions(inst,Boolean(props.multiple),props.defaultValue)}else{updateOptions(inst,Boolean(props.multiple),props.multiple?[]:"")}}}};function _handleChange(event){var props=this._currentElement.props;var returnValue=LinkedValueUtils.executeOnChange(props,event);this._wrapperState.pendingUpdate=true;ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted,this);return returnValue}module.exports=ReactDOMSelect}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var DOMChildrenOperations=__webpack_require__(93);var DOMPropertyOperations=__webpack_require__(68);var ReactComponentBrowserEnvironment=__webpack_require__(70);var ReactMount=__webpack_require__(9);var assign=__webpack_require__(3);var escapeTextContentForBrowser=__webpack_require__(43);var setTextContent=__webpack_require__(82);var validateDOMNesting=__webpack_require__(85);var ReactDOMTextComponent=function(props){};assign(ReactDOMTextComponent.prototype,{construct:function(text){this._currentElement=text;this._stringText=""+text;this._rootNodeID=null;this._mountIndex=0},mountComponent:function(rootID,transaction,context){if(process.env.NODE_ENV!=="production"){if(context[validateDOMNesting.ancestorInfoContextKey]){validateDOMNesting("span",null,context[validateDOMNesting.ancestorInfoContextKey])}}this._rootNodeID=rootID;if(transaction.useCreateElement){var ownerDocument=context[ReactMount.ownerDocumentContextKey];var el=ownerDocument.createElement("span");DOMPropertyOperations.setAttributeForID(el,rootID);ReactMount.getID(el);setTextContent(el,this._stringText);return el}else{var escapedText=escapeTextContentForBrowser(this._stringText);if(transaction.renderToStaticMarkup){return escapedText}return"<span "+DOMPropertyOperations.createMarkupForID(rootID)+">"+escapedText+"</span>"}},receiveComponent:function(nextText,transaction){if(nextText!==this._currentElement){this._currentElement=nextText;var nextStringText=""+nextText;if(nextStringText!==this._stringText){this._stringText=nextStringText;var node=ReactMount.getNode(this._rootNodeID);DOMChildrenOperations.updateTextContent(node,nextStringText)}}},unmountComponent:function(){ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID)}});module.exports=ReactDOMTextComponent}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ReactUpdates=__webpack_require__(14);var Transaction=__webpack_require__(41);var assign=__webpack_require__(3);var emptyFunction=__webpack_require__(15);var RESET_BATCHED_UPDATES={initialize:emptyFunction,close:function(){ReactDefaultBatchingStrategy.isBatchingUpdates=false}};var FLUSH_BATCHED_UPDATES={initialize:emptyFunction,close:ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)};var TRANSACTION_WRAPPERS=[FLUSH_BATCHED_UPDATES,RESET_BATCHED_UPDATES];function ReactDefaultBatchingStrategyTransaction(){this.reinitializeTransaction()}assign(ReactDefaultBatchingStrategyTransaction.prototype,Transaction.Mixin,{getTransactionWrappers:function(){return TRANSACTION_WRAPPERS}});var transaction=new ReactDefaultBatchingStrategyTransaction;var ReactDefaultBatchingStrategy={isBatchingUpdates:false,batchedUpdates:function(callback,a,b,c,d,e){var alreadyBatchingUpdates=ReactDefaultBatchingStrategy.isBatchingUpdates;ReactDefaultBatchingStrategy.isBatchingUpdates=true;if(alreadyBatchingUpdates){callback(a,b,c,d,e)}else{transaction.perform(callback,null,a,b,c,d,e)}}};module.exports=ReactDefaultBatchingStrategy},function(module,exports,__webpack_require__){"use strict";(function(process){var BeforeInputEventPlugin=__webpack_require__(141);var ChangeEventPlugin=__webpack_require__(143);var ClientReactRootIndex=__webpack_require__(144);var DefaultEventPluginOrder=__webpack_require__(146);var EnterLeaveEventPlugin=__webpack_require__(147);var ExecutionEnvironment=__webpack_require__(8);var HTMLDOMPropertyConfig=__webpack_require__(150);var ReactBrowserComponentMixin=__webpack_require__(152);var ReactComponentBrowserEnvironment=__webpack_require__(70);var ReactDefaultBatchingStrategy=__webpack_require__(101);var ReactDOMComponent=__webpack_require__(157);var ReactDOMTextComponent=__webpack_require__(100);var ReactEventListener=__webpack_require__(167);var ReactInjection=__webpack_require__(168);var ReactInstanceHandles=__webpack_require__(24);var ReactMount=__webpack_require__(9);var ReactReconcileTransaction=__webpack_require__(172);var SelectEventPlugin=__webpack_require__(178);var ServerReactRootIndex=__webpack_require__(179);var SimpleEventPlugin=__webpack_require__(180);var SVGDOMPropertyConfig=__webpack_require__(177);var alreadyInjected=false;function inject(){if(alreadyInjected){return}alreadyInjected=true;ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles);ReactInjection.EventPluginHub.injectMount(ReactMount);ReactInjection.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:SimpleEventPlugin,EnterLeaveEventPlugin:EnterLeaveEventPlugin,ChangeEventPlugin:ChangeEventPlugin,SelectEventPlugin:SelectEventPlugin,BeforeInputEventPlugin:BeforeInputEventPlugin});ReactInjection.NativeComponent.injectGenericComponentClass(ReactDOMComponent);ReactInjection.NativeComponent.injectTextComponentClass(ReactDOMTextComponent);ReactInjection.Class.injectMixin(ReactBrowserComponentMixin);ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);ReactInjection.EmptyComponent.injectEmptyComponent("noscript");ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);ReactInjection.RootIndex.injectCreateReactRootIndex(ExecutionEnvironment.canUseDOM?ClientReactRootIndex.createReactRootIndex:ServerReactRootIndex.createReactRootIndex);ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);if(process.env.NODE_ENV!=="production"){var url=ExecutionEnvironment.canUseDOM&&window.location.href||"";if(/[?&]react_perf\b/.test(url)){var ReactDefaultPerf=__webpack_require__(164);ReactDefaultPerf.start()}}}module.exports={inject:inject}}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactElement=__webpack_require__(11);var ReactPropTypeLocations=__webpack_require__(39);var ReactPropTypeLocationNames=__webpack_require__(38);var ReactCurrentOwner=__webpack_require__(18);var canDefineProperty=__webpack_require__(42);var getIteratorFn=__webpack_require__(79);var invariant=__webpack_require__(2);var warning=__webpack_require__(4);function getDeclarationErrorAddendum(){if(ReactCurrentOwner.current){var name=ReactCurrentOwner.current.getName();if(name){return" Check the render method of `"+name+"`."}}return""}var ownerHasKeyUseWarning={};var loggedTypeFailures={};function validateExplicitKey(element,parentType){if(!element._store||element._store.validated||element.key!=null){return}element._store.validated=true;var addenda=getAddendaForKeyUse("uniqueKey",element,parentType);if(addenda===null){return}process.env.NODE_ENV!=="production"?warning(false,'Each child in an array or iterator should have a unique "key" prop.'+"%s%s%s",addenda.parentOrOwner||"",addenda.childOwner||"",addenda.url||""):undefined}function getAddendaForKeyUse(messageType,element,parentType){var addendum=getDeclarationErrorAddendum();if(!addendum){var parentName=typeof parentType==="string"?parentType:parentType.displayName||parentType.name;if(parentName){addendum=" Check the top-level render call using <"+parentName+">."}}var memoizer=ownerHasKeyUseWarning[messageType]||(ownerHasKeyUseWarning[messageType]={});if(memoizer[addendum]){return null}memoizer[addendum]=true;var addenda={parentOrOwner:addendum,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};if(element&&element._owner&&element._owner!==ReactCurrentOwner.current){addenda.childOwner=" It was passed a child from "+element._owner.getName()+"."}return addenda}function validateChildKeys(node,parentType){if(typeof node!=="object"){return}if(Array.isArray(node)){for(var i=0;i<node.length;i++){var child=node[i];if(ReactElement.isValidElement(child)){validateExplicitKey(child,parentType)}}}else if(ReactElement.isValidElement(node)){if(node._store){node._store.validated=true}}else if(node){var iteratorFn=getIteratorFn(node);if(iteratorFn){if(iteratorFn!==node.entries){var iterator=iteratorFn.call(node);var step;while(!(step=iterator.next()).done){if(ReactElement.isValidElement(step.value)){validateExplicitKey(step.value,parentType)}}}}}}function checkPropTypes(componentName,propTypes,props,location){for(var propName in propTypes){if(propTypes.hasOwnProperty(propName)){var error;try{!(typeof propTypes[propName]==="function")?process.env.NODE_ENV!=="production"?invariant(false,"%s: %s type `%s` is invalid; it must be a function, usually from "+"React.PropTypes.",componentName||"React class",ReactPropTypeLocationNames[location],propName):invariant(false):undefined;error=propTypes[propName](props,propName,componentName,location)}catch(ex){error=ex}process.env.NODE_ENV!=="production"?warning(!error||error instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker "+"function must return `null` or an `Error` but returned a %s. "+"You may have forgotten to pass an argument to the type checker "+"creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and "+"shape all require an argument).",componentName||"React class",ReactPropTypeLocationNames[location],propName,typeof error):undefined;if(error instanceof Error&&!(error.message in loggedTypeFailures)){loggedTypeFailures[error.message]=true;var addendum=getDeclarationErrorAddendum();process.env.NODE_ENV!=="production"?warning(false,"Failed propType: %s%s",error.message,addendum):undefined}}}}function validatePropTypes(element){var componentClass=element.type;if(typeof componentClass!=="function"){return}var name=componentClass.displayName||componentClass.name;if(componentClass.propTypes){checkPropTypes(name,componentClass.propTypes,element.props,ReactPropTypeLocations.prop)}if(typeof componentClass.getDefaultProps==="function"){process.env.NODE_ENV!=="production"?warning(componentClass.getDefaultProps.isReactClassApproved,"getDefaultProps is only used on classic React.createClass "+"definitions. Use a static property named `defaultProps` instead."):undefined}}var ReactElementValidator={createElement:function(type,props,children){var validType=typeof type==="string"||typeof type==="function";process.env.NODE_ENV!=="production"?warning(validType,"React.createElement: type should not be null, undefined, boolean, or "+"number. It should be a string (for DOM elements) or a ReactClass "+"(for composite components).%s",getDeclarationErrorAddendum()):undefined;var element=ReactElement.createElement.apply(this,arguments);if(element==null){return element}if(validType){for(var i=2;i<arguments.length;i++){validateChildKeys(arguments[i],type)}}validatePropTypes(element);return element},createFactory:function(type){var validatedFactory=ReactElementValidator.createElement.bind(null,type);validatedFactory.type=type;if(process.env.NODE_ENV!=="production"){if(canDefineProperty){Object.defineProperty(validatedFactory,"type",{enumerable:false,get:function(){process.env.NODE_ENV!=="production"?warning(false,"Factory.type is deprecated. Access the class directly "+"before passing it to createFactory."):undefined;Object.defineProperty(this,"type",{value:type});return type}})}}return validatedFactory},cloneElement:function(element,props,children){var newElement=ReactElement.cloneElement.apply(this,arguments);for(var i=2;i<arguments.length;i++){validateChildKeys(arguments[i],newElement.type)}validatePropTypes(newElement);return newElement}};module.exports=ReactElementValidator}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ReactElement=__webpack_require__(11);var ReactEmptyComponentRegistry=__webpack_require__(105);var ReactReconciler=__webpack_require__(22);var assign=__webpack_require__(3);var placeholderElement;var ReactEmptyComponentInjection={injectEmptyComponent:function(component){placeholderElement=ReactElement.createElement(component)}};function registerNullComponentID(){ReactEmptyComponentRegistry.registerNullComponentID(this._rootNodeID)}var ReactEmptyComponent=function(instantiate){this._currentElement=null;this._rootNodeID=null;this._renderedComponent=instantiate(placeholderElement)};assign(ReactEmptyComponent.prototype,{construct:function(element){},mountComponent:function(rootID,transaction,context){transaction.getReactMountReady().enqueue(registerNullComponentID,this);this._rootNodeID=rootID;return ReactReconciler.mountComponent(this._renderedComponent,rootID,transaction,context)},receiveComponent:function(){},unmountComponent:function(rootID,transaction,context){ReactReconciler.unmountComponent(this._renderedComponent);ReactEmptyComponentRegistry.deregisterNullComponentID(this._rootNodeID);this._rootNodeID=null;this._renderedComponent=null}});ReactEmptyComponent.injection=ReactEmptyComponentInjection;module.exports=ReactEmptyComponent},function(module,exports,__webpack_require__){"use strict";var nullComponentIDsRegistry={};function isNullComponentID(id){return!!nullComponentIDsRegistry[id]}function registerNullComponentID(id){nullComponentIDsRegistry[id]=true}function deregisterNullComponentID(id){delete nullComponentIDsRegistry[id]}var ReactEmptyComponentRegistry={isNullComponentID:isNullComponentID,registerNullComponentID:registerNullComponentID,deregisterNullComponentID:deregisterNullComponentID};module.exports=ReactEmptyComponentRegistry},function(module,exports,__webpack_require__){"use strict";(function(process){var caughtError=null;function invokeGuardedCallback(name,func,a,b){try{return func(a,b)}catch(x){if(caughtError===null){caughtError=x}return undefined}}var ReactErrorUtils={invokeGuardedCallback:invokeGuardedCallback,invokeGuardedCallbackWithCatch:invokeGuardedCallback,rethrowCaughtError:function(){if(caughtError){var error=caughtError;caughtError=null;throw error}}};if(process.env.NODE_ENV!=="production"){if(typeof window!=="undefined"&&typeof window.dispatchEvent==="function"&&typeof document!=="undefined"&&typeof document.createEvent==="function"){var fakeNode=document.createElement("react");ReactErrorUtils.invokeGuardedCallback=function(name,func,a,b){var boundFunc=func.bind(null,a,b);var evtType="react-"+name;fakeNode.addEventListener(evtType,boundFunc,false);var evt=document.createEvent("Event");evt.initEvent(evtType,false,false);fakeNode.dispatchEvent(evt);fakeNode.removeEventListener(evtType,boundFunc,false)}}}module.exports=ReactErrorUtils}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ReactDOMSelection=__webpack_require__(161);var containsNode=__webpack_require__(87);var focusNode=__webpack_require__(88);var getActiveElement=__webpack_require__(89);function isInDocument(node){return containsNode(document.documentElement,node)}var ReactInputSelection={hasSelectionCapabilities:function(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();return nodeName&&(nodeName==="input"&&elem.type==="text"||nodeName==="textarea"||elem.contentEditable==="true")},getSelectionInformation:function(){var focusedElem=getActiveElement();return{focusedElem:focusedElem,selectionRange:ReactInputSelection.hasSelectionCapabilities(focusedElem)?ReactInputSelection.getSelection(focusedElem):null}},restoreSelection:function(priorSelectionInformation){var curFocusedElem=getActiveElement();var priorFocusedElem=priorSelectionInformation.focusedElem;var priorSelectionRange=priorSelectionInformation.selectionRange;if(curFocusedElem!==priorFocusedElem&&isInDocument(priorFocusedElem)){if(ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)){ReactInputSelection.setSelection(priorFocusedElem,priorSelectionRange)}focusNode(priorFocusedElem)}},getSelection:function(input){var selection;if("selectionStart"in input){selection={start:input.selectionStart,end:input.selectionEnd}}else if(document.selection&&(input.nodeName&&input.nodeName.toLowerCase()==="input")){var range=document.selection.createRange();if(range.parentElement()===input){selection={start:-range.moveStart("character",-input.value.length),end:-range.moveEnd("character",-input.value.length)}}}else{selection=ReactDOMSelection.getOffsets(input)}return selection||{start:0,end:0}},setSelection:function(input,offsets){var start=offsets.start;var end=offsets.end;if(typeof end==="undefined"){end=start}if("selectionStart"in input){input.selectionStart=start;input.selectionEnd=Math.min(end,input.value.length)}else if(document.selection&&(input.nodeName&&input.nodeName.toLowerCase()==="input")){var range=input.createTextRange();range.collapse(true);range.moveStart("character",start);range.moveEnd("character",end-start);range.select()}else{ReactDOMSelection.setOffsets(input,offsets)}}};module.exports=ReactInputSelection},function(module,exports,__webpack_require__){"use strict";var adler32=__webpack_require__(189);var TAG_END=/\/?>/;var ReactMarkupChecksum={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(markup){var checksum=adler32(markup);return markup.replace(TAG_END," "+ReactMarkupChecksum.CHECKSUM_ATTR_NAME+'="'+checksum+'"$&')},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},function(module,exports,__webpack_require__){"use strict";var keyMirror=__webpack_require__(36);var ReactMultiChildUpdateTypes=keyMirror({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});module.exports=ReactMultiChildUpdateTypes},function(module,exports,__webpack_require__){"use strict";(function(process){var assign=__webpack_require__(3);var invariant=__webpack_require__(2);var autoGenerateWrapperClass=null;var genericComponentClass=null;var tagToComponentClass={};var textComponentClass=null;var ReactNativeComponentInjection={injectGenericComponentClass:function(componentClass){genericComponentClass=componentClass},injectTextComponentClass:function(componentClass){textComponentClass=componentClass},injectComponentClasses:function(componentClasses){assign(tagToComponentClass,componentClasses)}};function getComponentClassForElement(element){if(typeof element.type==="function"){return element.type}var tag=element.type;var componentClass=tagToComponentClass[tag];if(componentClass==null){tagToComponentClass[tag]=componentClass=autoGenerateWrapperClass(tag)}return componentClass}function createInternalComponent(element){!genericComponentClass?process.env.NODE_ENV!=="production"?invariant(false,"There is no registered component for the tag %s",element.type):invariant(false):undefined;return new genericComponentClass(element.type,element.props)}function createInstanceForText(text){return new textComponentClass(text)}function isTextComponent(component){return component instanceof textComponentClass}var ReactNativeComponent={getComponentClassForElement:getComponentClassForElement,createInternalComponent:createInternalComponent,createInstanceForText:createInstanceForText,isTextComponent:isTextComponent,injection:ReactNativeComponentInjection};module.exports=ReactNativeComponent}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var warning=__webpack_require__(4);function warnTDZ(publicInstance,callerName){if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(false,"%s(...): Can only update a mounted or mounting component. "+"This usually means you called %s() on an unmounted component. "+"This is a no-op. Please check the code for the %s component.",callerName,callerName,publicInstance.constructor&&publicInstance.constructor.displayName||""):undefined}}var ReactNoopUpdateQueue={isMounted:function(publicInstance){return false},enqueueCallback:function(publicInstance,callback){},enqueueForceUpdate:function(publicInstance){warnTDZ(publicInstance,"forceUpdate")},enqueueReplaceState:function(publicInstance,completeState){warnTDZ(publicInstance,"replaceState")},enqueueSetState:function(publicInstance,partialState){warnTDZ(publicInstance,"setState")},enqueueSetProps:function(publicInstance,partialProps){warnTDZ(publicInstance,"setProps")},enqueueReplaceProps:function(publicInstance,props){warnTDZ(publicInstance,"replaceProps")}};module.exports=ReactNoopUpdateQueue}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ReactElement=__webpack_require__(11);var ReactPropTypeLocationNames=__webpack_require__(38);var emptyFunction=__webpack_require__(15);var getIteratorFn=__webpack_require__(79);var ANONYMOUS="<<anonymous>>";var ReactPropTypes={array:createPrimitiveTypeChecker("array"),bool:createPrimitiveTypeChecker("boolean"),func:createPrimitiveTypeChecker("function"),number:createPrimitiveTypeChecker("number"),object:createPrimitiveTypeChecker("object"),string:createPrimitiveTypeChecker("string"),any:createAnyTypeChecker(),arrayOf:createArrayOfTypeChecker,element:createElementTypeChecker(),instanceOf:createInstanceTypeChecker,node:createNodeChecker(),objectOf:createObjectOfTypeChecker,oneOf:createEnumTypeChecker,oneOfType:createUnionTypeChecker,shape:createShapeTypeChecker};function createChainableTypeChecker(validate){function checkType(isRequired,props,propName,componentName,location,propFullName){componentName=componentName||ANONYMOUS;propFullName=propFullName||propName;if(props[propName]==null){var locationName=ReactPropTypeLocationNames[location];if(isRequired){return new Error("Required "+locationName+" `"+propFullName+"` was not specified in "+("`"+componentName+"`."))}return null}else{return validate(props,propName,componentName,location,propFullName)}}var chainedCheckType=checkType.bind(null,false);chainedCheckType.isRequired=checkType.bind(null,true);return chainedCheckType}function createPrimitiveTypeChecker(expectedType){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];var propType=getPropType(propValue);if(propType!==expectedType){var locationName=ReactPropTypeLocationNames[location];var preciseType=getPreciseType(propValue);return new Error("Invalid "+locationName+" `"+propFullName+"` of type "+("`"+preciseType+"` supplied to `"+componentName+"`, expected ")+("`"+expectedType+"`."))}return null}return createChainableTypeChecker(validate)}function createAnyTypeChecker(){return createChainableTypeChecker(emptyFunction.thatReturns(null))}function createArrayOfTypeChecker(typeChecker){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];if(!Array.isArray(propValue)){var locationName=ReactPropTypeLocationNames[location];var propType=getPropType(propValue);return new Error("Invalid "+locationName+" `"+propFullName+"` of type "+("`"+propType+"` supplied to `"+componentName+"`, expected an array."))}for(var i=0;i<propValue.length;i++){var error=typeChecker(propValue,i,componentName,location,propFullName+"["+i+"]");if(error instanceof Error){return error}}return null}return createChainableTypeChecker(validate)}function createElementTypeChecker(){function validate(props,propName,componentName,location,propFullName){if(!ReactElement.isValidElement(props[propName])){var locationName=ReactPropTypeLocationNames[location];return new Error("Invalid "+locationName+" `"+propFullName+"` supplied to "+("`"+componentName+"`, expected a single ReactElement."))}return null}return createChainableTypeChecker(validate)}function createInstanceTypeChecker(expectedClass){function validate(props,propName,componentName,location,propFullName){if(!(props[propName]instanceof expectedClass)){var locationName=ReactPropTypeLocationNames[location];var expectedClassName=expectedClass.name||ANONYMOUS;var actualClassName=getClassName(props[propName]);return new Error("Invalid "+locationName+" `"+propFullName+"` of type "+("`"+actualClassName+"` supplied to `"+componentName+"`, expected ")+("instance of `"+expectedClassName+"`."))}return null}return createChainableTypeChecker(validate)}function createEnumTypeChecker(expectedValues){if(!Array.isArray(expectedValues)){return createChainableTypeChecker(function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];for(var i=0;i<expectedValues.length;i++){if(propValue===expectedValues[i]){return null}}var locationName=ReactPropTypeLocationNames[location];var valuesString=JSON.stringify(expectedValues);return new Error("Invalid "+locationName+" `"+propFullName+"` of value `"+propValue+"` "+("supplied to `"+componentName+"`, expected one of "+valuesString+"."))}return createChainableTypeChecker(validate)}function createObjectOfTypeChecker(typeChecker){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];var propType=getPropType(propValue);if(propType!=="object"){var locationName=ReactPropTypeLocationNames[location];return new Error("Invalid "+locationName+" `"+propFullName+"` of type "+("`"+propType+"` supplied to `"+componentName+"`, expected an object."))}for(var key in propValue){if(propValue.hasOwnProperty(key)){var error=typeChecker(propValue,key,componentName,location,propFullName+"."+key);if(error instanceof Error){return error}}}return null}return createChainableTypeChecker(validate)}function createUnionTypeChecker(arrayOfTypeCheckers){if(!Array.isArray(arrayOfTypeCheckers)){return createChainableTypeChecker(function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function validate(props,propName,componentName,location,propFullName){for(var i=0;i<arrayOfTypeCheckers.length;i++){var checker=arrayOfTypeCheckers[i];if(checker(props,propName,componentName,location,propFullName)==null){return null}}var locationName=ReactPropTypeLocationNames[location];return new Error("Invalid "+locationName+" `"+propFullName+"` supplied to "+("`"+componentName+"`."))}return createChainableTypeChecker(validate)}function createNodeChecker(){function validate(props,propName,componentName,location,propFullName){if(!isNode(props[propName])){var locationName=ReactPropTypeLocationNames[location];return new Error("Invalid "+locationName+" `"+propFullName+"` supplied to "+("`"+componentName+"`, expected a ReactNode."))}return null}return createChainableTypeChecker(validate)}function createShapeTypeChecker(shapeTypes){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];var propType=getPropType(propValue);if(propType!=="object"){var locationName=ReactPropTypeLocationNames[location];return new Error("Invalid "+locationName+" `"+propFullName+"` of type `"+propType+"` "+("supplied to `"+componentName+"`, expected `object`."))}for(var key in shapeTypes){var checker=shapeTypes[key];if(!checker){continue}var error=checker(propValue,key,componentName,location,propFullName+"."+key);if(error){return error}}return null}return createChainableTypeChecker(validate)}function isNode(propValue){switch(typeof propValue){case"number":case"string":case"undefined":return true;case"boolean":return!propValue;case"object":if(Array.isArray(propValue)){return propValue.every(isNode)}if(propValue===null||ReactElement.isValidElement(propValue)){return true}var iteratorFn=getIteratorFn(propValue);if(iteratorFn){var iterator=iteratorFn.call(propValue);var step;if(iteratorFn!==propValue.entries){while(!(step=iterator.next()).done){if(!isNode(step.value)){return false}}}else{while(!(step=iterator.next()).done){var entry=step.value;if(entry){if(!isNode(entry[1])){return false}}}}}else{return false}return true;default:return false}}function getPropType(propValue){var propType=typeof propValue;if(Array.isArray(propValue)){return"array"}if(propValue instanceof RegExp){return"object"}return propType}function getPreciseType(propValue){var propType=getPropType(propValue);if(propType==="object"){if(propValue instanceof Date){return"date"}else if(propValue instanceof RegExp){return"regexp"}}return propType}function getClassName(propValue){if(!propValue.constructor||!propValue.constructor.name){return"<<anonymous>>"}return propValue.constructor.name}module.exports=ReactPropTypes},function(module,exports,__webpack_require__){"use strict";var ReactRootIndexInjection={injectCreateReactRootIndex:function(_createReactRootIndex){ReactRootIndex.createReactRootIndex=_createReactRootIndex}};var ReactRootIndex={createReactRootIndex:null,injection:ReactRootIndexInjection};module.exports=ReactRootIndex},function(module,exports,__webpack_require__){"use strict";var ViewportMetrics={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(scrollPosition){ViewportMetrics.currentScrollLeft=scrollPosition.x;ViewportMetrics.currentScrollTop=scrollPosition.y}};module.exports=ViewportMetrics},function(module,exports,__webpack_require__){"use strict";(function(process){var invariant=__webpack_require__(2);function accumulateInto(current,next){!(next!=null)?process.env.NODE_ENV!=="production"?invariant(false,"accumulateInto(...): Accumulated items must not be null or undefined."):invariant(false):undefined;if(current==null){return next}var currentIsArray=Array.isArray(current);var nextIsArray=Array.isArray(next);if(currentIsArray&&nextIsArray){current.push.apply(current,next);return current}if(currentIsArray){current.push(next);return current}if(nextIsArray){return[current].concat(next)}return[current,next]}module.exports=accumulateInto}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var forEachAccumulated=function(arr,cb,scope){if(Array.isArray(arr)){arr.forEach(cb,scope)}else if(arr){cb.call(scope,arr)}};module.exports=forEachAccumulated},function(module,exports,__webpack_require__){"use strict";var ExecutionEnvironment=__webpack_require__(8);var contentKey=null;function getTextContentAccessor(){if(!contentKey&&ExecutionEnvironment.canUseDOM){contentKey="textContent"in document.documentElement?"textContent":"innerText"}return contentKey}module.exports=getTextContentAccessor},function(module,exports,__webpack_require__){"use strict";var supportedInputTypes={color:true,date:true,datetime:true,"datetime-local":true,email:true,month:true,number:true,password:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true};function isTextInputElement(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();return nodeName&&(nodeName==="input"&&supportedInputTypes[elem.type]||nodeName==="textarea")} module.exports=isTextInputElement},,function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Utils=__webpack_require__(6);var Factory=__webpack_require__(10);var ReactSyncLayer=function(_super){__extends(ReactSyncLayer,_super);function ReactSyncLayer(properties){var _this=_super.call(this)||this;_this.properties=properties;return _this}ReactSyncLayer.prototype.create=function(){this.unregisteringFunctions=[];this.sanitizeAttributes();this.syncTooltips();this.syncDomainsChange();this.syncDatumEvents()};ReactSyncLayer.prototype.sanitizeAttributes=function(){var _a=this.properties,tooltipSyncKey=_a.tooltipSyncKey,domainsSyncKey=_a.domainsSyncKey;if(!!tooltipSyncKey&&!!domainsSyncKey){if(tooltipSyncKey===domainsSyncKey){throw new Error("Heterogeneous sync keys can't have the same value.")}}};ReactSyncLayer.prototype.syncDatumEvents=function(){var _this=this;var eventMgr=this.eventMgr;if(!!this.properties.onClick){eventMgr.on("click.sync-layer",function(d,i,series,options){_this.properties.onClick(d,i,series,options)})}};ReactSyncLayer.prototype.outerWorldHover=function(value){this.eventMgr.triggerDataAndOptions("outer-world-hover",value)};ReactSyncLayer.prototype.syncTooltips=function(){var _this=this;if(!!this.properties.tooltipSyncKey){var key=this.properties.tooltipSyncKey;var layers=ReactSyncLayer.tooltipSyncLayers[key]||[];layers.push(this);ReactSyncLayer.tooltipSyncLayers[key]=layers;this.eventMgr.on("container-move.sync-layer",function(event){layers.forEach(function(layer){if(layer!==_this){layer.outerWorldHover(_this.factoryMgr.get("container").getCoordinatesFromEvent(event))}})});this.eventMgr.on("container-out.sync-layer",function(){layers.forEach(function(layer){if(layer!==_this){layer.outerWorldHover({x:undefined,y:undefined})}})})}};ReactSyncLayer.prototype.outerWorldSync=function(domains,type){var xAxis=this.factoryMgr.get("x-axis");var x2Axis=this.factoryMgr.get("x2-axis");var yAxis=this.factoryMgr.get("y-axis");var y2Axis=this.factoryMgr.get("y2-axis");if(!domains.x||!domains.y||!domains.x2||!domains.y2){domains=Utils.ObjectUtils.extend({},domains)}if(!domains.x){domains.x=xAxis.getScaleDomain()}if(!domains.x2){domains.x2=x2Axis.getScaleDomain()}if(!domains.y){domains.y=yAxis.getScaleDomain()}if(!domains.y2){domains.y2=y2Axis.getScaleDomain()}if(type==="zoom-end"){this.eventMgr.trigger("outer-world-domain-change",domains);this.factoryMgr.turnFactoriesOn(["tooltip"])}else if(type==="zoom"){this.factoryMgr.turnFactoriesOff(["tooltip"])}else if(type==="pan"||type==="pan-end"){this.factoryMgr.turnFactoriesOff(["transitions","tooltip"]);this.eventMgr.trigger("outer-world-domain-change",domains);if(type==="pan-end"){this.factoryMgr.turnFactoriesOn(["transitions","tooltip"])}}else if(type==="zoom-pan-reset"){this.eventMgr.trigger("zoom-pan-reset",false)}};ReactSyncLayer.prototype.syncDomainsChange=function(){var _this=this;var callbacks=[];var xAxis=this.factoryMgr.get("x-axis");var yAxis=this.factoryMgr.get("y-axis");if(!!this.properties.onDomainsChange){callbacks.push(function(domains,_a){var isEndEvent=_a.isEndEvent;if(isEndEvent){_this.properties.onDomainsChange(domains)}})}if(!!this.properties.domainsSyncKey){var key=this.properties.domainsSyncKey;var layers=ReactSyncLayer.domainSyncLayers[key]||[];layers.push(this);ReactSyncLayer.domainSyncLayers[key]=layers;callbacks.push(function(domains,_a){var type=_a.type;layers.forEach(function(layer){if(layer!==_this){layer.outerWorldSync(domains,type)}})})}var getDomains=function(){return{x:xAxis.getScaleDomain(),y:yAxis.getScaleDomain()}};var ping=function(domains,args){return callbacks.forEach(function(fn){return fn(domains,args)})};this.eventMgr.on("pan.sync-layer",function(){var domains=getDomains();_this.factoryMgr.get("pan").constrainDomains(domains);ping(domains,{type:"pan"})});this.eventMgr.on("pan-end.sync-layer",function(){var domains=getDomains();_this.factoryMgr.get("pan").constrainDomains(domains);ping(domains,{type:"pan-end",isEndEvent:true})});this.eventMgr.on("zoom.sync-layer",function(){var domains=getDomains();_this.factoryMgr.get("zoom").constrainOutgoingDomains(domains);ping(domains,{type:"zoom",isEndEvent:false})});this.eventMgr.on("zoom-end.sync-layer",function(){var domains=getDomains();_this.factoryMgr.get("zoom").constrainOutgoingDomains(domains);ping(domains,{type:"zoom-end",isEndEvent:true})});this.eventMgr.on("zoom-pan-reset.sync-layer",function(madeHere){if(madeHere){ping(getDomains(),{type:"zoom-pan-reset",isEndEvent:true})}})};ReactSyncLayer.prototype.destroy=function(){var fn;while(fn=this.unregisteringFunctions.pop()){fn()}};return ReactSyncLayer}(Factory.BaseFactory);ReactSyncLayer.tooltipSyncLayers={};ReactSyncLayer.domainSyncLayers={};exports.ReactSyncLayer=ReactSyncLayer},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(151)},,,function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var React=__webpack_require__(121);var Utils=__webpack_require__(6);var Factory=__webpack_require__(10);var Series=__webpack_require__(16);var Symbols=__webpack_require__(45);var Options=__webpack_require__(5);var SyncLayer_1=__webpack_require__(120);var LineChart=function(_super){__extends(LineChart,_super);function LineChart(){return _super.call(this)||this}LineChart.prototype.updateAll=function(){this.options=new Options.Options(this.props.options);this.data=new Utils.Data(this.props.data);this.eventMgr.update(this.data,this.options);this.eventMgr.trigger("update",this.data,this.options)};LineChart.prototype.updateData=function(_data){if(!_data){return}this.data.fromJS(_data);this.factoryMgr.turnFactoriesOff(["transitions"]);this.eventMgr.trigger("data-update",this.data,this.options);this.factoryMgr.turnFactoriesOn(["transitions"]);this.eventMgr.trigger("update",this.data,this.options)};LineChart.prototype.handleResize=function(e){if(!this._element)return;var rect=this._element.parentElement.getBoundingClientRect();this.setState({height:rect.height,width:rect.width,left:rect.left,right:rect.right,bottom:rect.bottom,top:rect.top});this.eventMgr.trigger("resize",this._element.parentElement)};LineChart.prototype.componentDidMount=function(){var _this=this;var element=this._element;this.eventMgr=new Utils.EventManager;this.factoryMgr=new Utils.FactoryManager;this.eventMgr.init(Utils.EventManager.EVENTS);this.factoryMgr.registerMany([["container",Factory.Container,element],["tooltip",Factory.Tooltip,element],["legend",Factory.Legend,element],["transitions",Factory.Transition],["x-axis",Factory.Axis,Options.AxisOptions.SIDE.X],["x2-axis",Factory.Axis,Options.AxisOptions.SIDE.X2],["y-axis",Factory.Axis,Options.AxisOptions.SIDE.Y],["y2-axis",Factory.Axis,Options.AxisOptions.SIDE.Y2],["grid",Factory.Grid],["pan",Factory.Pan],["zoom",Factory.Zoom],["sync-layer",SyncLayer_1.ReactSyncLayer,this.props],["series-area",Series.Area],["series-column",Series.Column],["series-line",Series.Line],["series-dot",Series.Dot],["symbols-hline",Symbols.HLine],["symbols-vline",Symbols.VLine]]);this.factoryMgr.all().forEach(function(f){return f.instance.init(f.key,_this.eventMgr,_this.factoryMgr)});this.eventMgr.trigger("create",this.props.options);this.updateAll();window.addEventListener("resize",Utils.FunctionUtils.debounce(this.handleResize.bind(this),50));this.eventMgr.on("legend-click.directive",function(series){var foundSeries=_this.options.series.filter(function(s){return s.id===series.id})[0];foundSeries.visible=series.getToggledVisibility();_this.eventMgr.trigger("update",_this.data,_this.options)});this.eventMgr.on("pan.directive",function(){_this.factoryMgr.get("container").svg.classed("panning",true)});this.eventMgr.on("pan-end.directive",function(){_this.factoryMgr.get("container").svg.classed("panning",false)})};LineChart.prototype.componentDidUpdate=function(){this.options=new Options.Options(this.props.options);this.data=new Utils.Data(this.props.data);this.eventMgr.update(this.data,this.options);this.eventMgr.trigger("update",this.data,this.options)};LineChart.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleResize);this.eventMgr.trigger("destroy")};LineChart.prototype.render=function(){var _this=this;return React.createElement("div",{ref:function(e){return _this._element=e}})};return LineChart}(React.Component);exports.LineChart=LineChart;if(typeof module!=="undefined"&&module.exports){module.exports={LineChart:LineChart}}else{window["LineChart"]=LineChart}},,function(module,exports,__webpack_require__){"use strict";var _hyphenPattern=/-(.)/g;function camelize(string){return string.replace(_hyphenPattern,function(_,character){return character.toUpperCase()})}module.exports=camelize},function(module,exports,__webpack_require__){"use strict";var camelize=__webpack_require__(126);var msPattern=/^-ms-/;function camelizeStyleName(string){return camelize(string.replace(msPattern,"ms-"))}module.exports=camelizeStyleName},function(module,exports,__webpack_require__){"use strict";var toArray=__webpack_require__(139);function hasArrayNature(obj){return!!obj&&(typeof obj=="object"||typeof obj=="function")&&"length"in obj&&!("setInterval"in obj)&&typeof obj.nodeType!="number"&&(Array.isArray(obj)||"callee"in obj||"item"in obj)}function createArrayFromMixed(obj){if(!hasArrayNature(obj)){return[obj]}else if(Array.isArray(obj)){return obj.slice()}else{return toArray(obj)}}module.exports=createArrayFromMixed},function(module,exports,__webpack_require__){"use strict";(function(process){var ExecutionEnvironment=__webpack_require__(8);var createArrayFromMixed=__webpack_require__(128);var getMarkupWrap=__webpack_require__(90);var invariant=__webpack_require__(2);var dummyNode=ExecutionEnvironment.canUseDOM?document.createElement("div"):null;var nodeNamePattern=/^\s*<(\w+)/;function getNodeName(markup){var nodeNameMatch=markup.match(nodeNamePattern);return nodeNameMatch&&nodeNameMatch[1].toLowerCase()}function createNodesFromMarkup(markup,handleScript){var node=dummyNode;!!!dummyNode?process.env.NODE_ENV!=="production"?invariant(false,"createNodesFromMarkup dummy not initialized"):invariant(false):undefined;var nodeName=getNodeName(markup);var wrap=nodeName&&getMarkupWrap(nodeName);if(wrap){node.innerHTML=wrap[1]+markup+wrap[2];var wrapDepth=wrap[0];while(wrapDepth--){node=node.lastChild}}else{node.innerHTML=markup}var scripts=node.getElementsByTagName("script");if(scripts.length){!handleScript?process.env.NODE_ENV!=="production"?invariant(false,"createNodesFromMarkup(...): Unexpected <script> element rendered."):invariant(false):undefined;createArrayFromMixed(scripts).forEach(handleScript)}var nodes=createArrayFromMixed(node.childNodes);while(node.lastChild){node.removeChild(node.lastChild)}return nodes}module.exports=createNodesFromMarkup}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";function getUnboundedScrollPosition(scrollable){if(scrollable===window){return{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}}return{x:scrollable.scrollLeft,y:scrollable.scrollTop}}module.exports=getUnboundedScrollPosition},function(module,exports,__webpack_require__){"use strict";var _uppercasePattern=/([A-Z])/g;function hyphenate(string){return string.replace(_uppercasePattern,"-$1").toLowerCase()}module.exports=hyphenate},function(module,exports,__webpack_require__){"use strict";var hyphenate=__webpack_require__(131);var msPattern=/^ms-/;function hyphenateStyleName(string){return hyphenate(string).replace(msPattern,"-ms-")}module.exports=hyphenateStyleName},function(module,exports,__webpack_require__){"use strict";function isNode(object){return!!(object&&(typeof Node==="function"?object instanceof Node:typeof object==="object"&&typeof object.nodeType==="number"&&typeof object.nodeName==="string"))}module.exports=isNode},function(module,exports,__webpack_require__){"use strict";var isNode=__webpack_require__(133);function isTextNode(object){return isNode(object)&&object.nodeType==3}module.exports=isTextNode},function(module,exports,__webpack_require__){"use strict";var hasOwnProperty=Object.prototype.hasOwnProperty;function mapObject(object,callback,context){if(!object){return null}var result={};for(var name in object){if(hasOwnProperty.call(object,name)){result[name]=callback.call(context,object[name],name,object)}}return result}module.exports=mapObject},function(module,exports,__webpack_require__){"use strict";function memoizeStringOnly(callback){var cache={};return function(string){if(!cache.hasOwnProperty(string)){cache[string]=callback.call(this,string)}return cache[string]}}module.exports=memoizeStringOnly},function(module,exports,__webpack_require__){"use strict";var ExecutionEnvironment=__webpack_require__(8);var performance;if(ExecutionEnvironment.canUseDOM){performance=window.performance||window.msPerformance||window.webkitPerformance}module.exports=performance||{}},function(module,exports,__webpack_require__){"use strict";var performance=__webpack_require__(137);var performanceNow;if(performance.now){performanceNow=function(){return performance.now()}}else{performanceNow=function(){return Date.now()}}module.exports=performanceNow},function(module,exports,__webpack_require__){"use strict";(function(process){var invariant=__webpack_require__(2);function toArray(obj){var length=obj.length;!(!Array.isArray(obj)&&(typeof obj==="object"||typeof obj==="function"))?process.env.NODE_ENV!=="production"?invariant(false,"toArray: Array-like object expected"):invariant(false):undefined;!(typeof length==="number")?process.env.NODE_ENV!=="production"?invariant(false,"toArray: Object needs a length property"):invariant(false):undefined;!(length===0||length-1 in obj)?process.env.NODE_ENV!=="production"?invariant(false,"toArray: Object should have keys for indices"):invariant(false):undefined;if(obj.hasOwnProperty){try{return Array.prototype.slice.call(obj)}catch(e){}}var ret=Array(length);for(var ii=0;ii<length;ii++){ret[ii]=obj[ii]}return ret}module.exports=toArray}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ReactMount=__webpack_require__(9);var findDOMNode=__webpack_require__(75);var focusNode=__webpack_require__(88);var Mixin={componentDidMount:function(){if(this.props.autoFocus){focusNode(findDOMNode(this))}}};var AutoFocusUtils={Mixin:Mixin,focusDOMComponent:function(){focusNode(ReactMount.getNode(this._rootNodeID))}};module.exports=AutoFocusUtils},function(module,exports,__webpack_require__){"use strict";var EventConstants=__webpack_require__(17);var EventPropagators=__webpack_require__(33);var ExecutionEnvironment=__webpack_require__(8);var FallbackCompositionState=__webpack_require__(149);var SyntheticCompositionEvent=__webpack_require__(182);var SyntheticInputEvent=__webpack_require__(185);var keyOf=__webpack_require__(19);var END_KEYCODES=[9,13,27,32];var START_KEYCODE=229;var canUseCompositionEvent=ExecutionEnvironment.canUseDOM&&"CompositionEvent"in window;var documentMode=null;if(ExecutionEnvironment.canUseDOM&&"documentMode"in document){documentMode=document.documentMode}var canUseTextInputEvent=ExecutionEnvironment.canUseDOM&&"TextEvent"in window&&!documentMode&&!isPresto();var useFallbackCompositionData=ExecutionEnvironment.canUseDOM&&(!canUseCompositionEvent||documentMode&&documentMode>8&&documentMode<=11);function isPresto(){var opera=window.opera;return typeof opera==="object"&&typeof opera.version==="function"&&parseInt(opera.version(),10)<=12}var SPACEBAR_CODE=32;var SPACEBAR_CHAR=String.fromCharCode(SPACEBAR_CODE);var topLevelTypes=EventConstants.topLevelTypes;var eventTypes={beforeInput:{phasedRegistrationNames:{bubbled:keyOf({onBeforeInput:null}),captured:keyOf({onBeforeInputCapture:null})},dependencies:[topLevelTypes.topCompositionEnd,topLevelTypes.topKeyPress,topLevelTypes.topTextInput,topLevelTypes.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:keyOf({onCompositionEnd:null}),captured:keyOf({onCompositionEndCapture:null})},dependencies:[topLevelTypes.topBlur,topLevelTypes.topCompositionEnd,topLevelTypes.topKeyDown,topLevelTypes.topKeyPress,topLevelTypes.topKeyUp,topLevelTypes.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:keyOf({onCompositionStart:null}),captured:keyOf({onCompositionStartCapture:null})},dependencies:[topLevelTypes.topBlur,topLevelTypes.topCompositionStart,topLevelTypes.topKeyDown,topLevelTypes.topKeyPress,topLevelTypes.topKeyUp,topLevelTypes.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:keyOf({onCompositionUpdate:null}),captured:keyOf({onCompositionUpdateCapture:null})},dependencies:[topLevelTypes.topBlur,topLevelTypes.topCompositionUpdate,topLevelTypes.topKeyDown,topLevelTypes.topKeyPress,topLevelTypes.topKeyUp,topLevelTypes.topMouseDown]}};var hasSpaceKeypress=false;function isKeypressCommand(nativeEvent){return(nativeEvent.ctrlKey||nativeEvent.altKey||nativeEvent.metaKey)&&!(nativeEvent.ctrlKey&&nativeEvent.altKey)}function getCompositionEventType(topLevelType){switch(topLevelType){case topLevelTypes.topCompositionStart:return eventTypes.compositionStart;case topLevelTypes.topCompositionEnd:return eventTypes.compositionEnd;case topLevelTypes.topCompositionUpdate:return eventTypes.compositionUpdate}}function isFallbackCompositionStart(topLevelType,nativeEvent){return topLevelType===topLevelTypes.topKeyDown&&nativeEvent.keyCode===START_KEYCODE}function isFallbackCompositionEnd(topLevelType,nativeEvent){switch(topLevelType){case topLevelTypes.topKeyUp:return END_KEYCODES.indexOf(nativeEvent.keyCode)!==-1;case topLevelTypes.topKeyDown:return nativeEvent.keyCode!==START_KEYCODE;case topLevelTypes.topKeyPress:case topLevelTypes.topMouseDown:case topLevelTypes.topBlur:return true;default:return false}}function getDataFromCustomEvent(nativeEvent){var detail=nativeEvent.detail;if(typeof detail==="object"&&"data"in detail){return detail.data}return null}var currentComposition=null;function extractCompositionEvent(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){var eventType;var fallbackData;if(canUseCompositionEvent){eventType=getCompositionEventType(topLevelType)}else if(!currentComposition){if(isFallbackCompositionStart(topLevelType,nativeEvent)){eventType=eventTypes.compositionStart}}else if(isFallbackCompositionEnd(topLevelType,nativeEvent)){eventType=eventTypes.compositionEnd}if(!eventType){return null}if(useFallbackCompositionData){if(!currentComposition&&eventType===eventTypes.compositionStart){currentComposition=FallbackCompositionState.getPooled(topLevelTarget)}else if(eventType===eventTypes.compositionEnd){if(currentComposition){fallbackData=currentComposition.getData()}}}var event=SyntheticCompositionEvent.getPooled(eventType,topLevelTargetID,nativeEvent,nativeEventTarget);if(fallbackData){event.data=fallbackData}else{var customData=getDataFromCustomEvent(nativeEvent);if(customData!==null){event.data=customData}}EventPropagators.accumulateTwoPhaseDispatches(event);return event}function getNativeBeforeInputChars(topLevelType,nativeEvent){switch(topLevelType){case topLevelTypes.topCompositionEnd:return getDataFromCustomEvent(nativeEvent);case topLevelTypes.topKeyPress:var which=nativeEvent.which;if(which!==SPACEBAR_CODE){return null}hasSpaceKeypress=true;return SPACEBAR_CHAR;case topLevelTypes.topTextInput:var chars=nativeEvent.data;if(chars===SPACEBAR_CHAR&&hasSpaceKeypress){return null}return chars;default:return null}}function getFallbackBeforeInputChars(topLevelType,nativeEvent){if(currentComposition){if(topLevelType===topLevelTypes.topCompositionEnd||isFallbackCompositionEnd(topLevelType,nativeEvent)){var chars=currentComposition.getData();FallbackCompositionState.release(currentComposition);currentComposition=null;return chars}return null}switch(topLevelType){case topLevelTypes.topPaste:return null;case topLevelTypes.topKeyPress:if(nativeEvent.which&&!isKeypressCommand(nativeEvent)){return String.fromCharCode(nativeEvent.which)}return null;case topLevelTypes.topCompositionEnd:return useFallbackCompositionData?null:nativeEvent.data;default:return null}}function extractBeforeInputEvent(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){var chars;if(canUseTextInputEvent){chars=getNativeBeforeInputChars(topLevelType,nativeEvent)}else{chars=getFallbackBeforeInputChars(topLevelType,nativeEvent)}if(!chars){return null}var event=SyntheticInputEvent.getPooled(eventTypes.beforeInput,topLevelTargetID,nativeEvent,nativeEventTarget);event.data=chars;EventPropagators.accumulateTwoPhaseDispatches(event);return event}var BeforeInputEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){return[extractCompositionEvent(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget),extractBeforeInputEvent(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget)]}};module.exports=BeforeInputEventPlugin},function(module,exports,__webpack_require__){"use strict";(function(process){var CSSProperty=__webpack_require__(92);var ExecutionEnvironment=__webpack_require__(8);var ReactPerf=__webpack_require__(12);var camelizeStyleName=__webpack_require__(127);var dangerousStyleValue=__webpack_require__(190);var hyphenateStyleName=__webpack_require__(132);var memoizeStringOnly=__webpack_require__(136);var warning=__webpack_require__(4);var processStyleName=memoizeStringOnly(function(styleName){return hyphenateStyleName(styleName)});var hasShorthandPropertyBug=false;var styleFloatAccessor="cssFloat";if(ExecutionEnvironment.canUseDOM){var tempStyle=document.createElement("div").style;try{tempStyle.font=""}catch(e){hasShorthandPropertyBug=true}if(document.documentElement.style.cssFloat===undefined){styleFloatAccessor="styleFloat"}}if(process.env.NODE_ENV!=="production"){var badVendoredStyleNamePattern=/^(?:webkit|moz|o)[A-Z]/;var badStyleValueWithSemicolonPattern=/;\s*$/;var warnedStyleNames={};var warnedStyleValues={};var warnHyphenatedStyleName=function(name){if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return}warnedStyleNames[name]=true;process.env.NODE_ENV!=="production"?warning(false,"Unsupported style property %s. Did you mean %s?",name,camelizeStyleName(name)):undefined};var warnBadVendoredStyleName=function(name){if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return}warnedStyleNames[name]=true;process.env.NODE_ENV!=="production"?warning(false,"Unsupported vendor-prefixed style property %s. Did you mean %s?",name,name.charAt(0).toUpperCase()+name.slice(1)):undefined};var warnStyleValueWithSemicolon=function(name,value){if(warnedStyleValues.hasOwnProperty(value)&&warnedStyleValues[value]){return}warnedStyleValues[value]=true;process.env.NODE_ENV!=="production"?warning(false,"Style property values shouldn't contain a semicolon. "+'Try "%s: %s" instead.',name,value.replace(badStyleValueWithSemicolonPattern,"")):undefined};var warnValidStyle=function(name,value){if(name.indexOf("-")>-1){warnHyphenatedStyleName(name)}else if(badVendoredStyleNamePattern.test(name)){warnBadVendoredStyleName(name)}else if(badStyleValueWithSemicolonPattern.test(value)){warnStyleValueWithSemicolon(name,value)}}}var CSSPropertyOperations={createMarkupForStyles:function(styles){var serialized="";for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue}var styleValue=styles[styleName];if(process.env.NODE_ENV!=="production"){warnValidStyle(styleName,styleValue)}if(styleValue!=null){serialized+=processStyleName(styleName)+":";serialized+=dangerousStyleValue(styleName,styleValue)+";"}}return serialized||null},setValueForStyles:function(node,styles){var style=node.style;for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue}if(process.env.NODE_ENV!=="production"){warnValidStyle(styleName,styles[styleName])}var styleValue=dangerousStyleValue(styleName,styles[styleName]);if(styleName==="float"){styleName=styleFloatAccessor}if(styleValue){style[styleName]=styleValue}else{var expansion=hasShorthandPropertyBug&&CSSProperty.shorthandPropertyExpansions[styleName];if(expansion){for(var individualStyleName in expansion){style[individualStyleName]=""}}else{style[styleName]=""}}}}};ReactPerf.measureMethods(CSSPropertyOperations,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"});module.exports=CSSPropertyOperations}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var EventConstants=__webpack_require__(17);var EventPluginHub=__webpack_require__(32);var EventPropagators=__webpack_require__(33);var ExecutionEnvironment=__webpack_require__(8);var ReactUpdates=__webpack_require__(14);var SyntheticEvent=__webpack_require__(23);var getEventTarget=__webpack_require__(78);var isEventSupported=__webpack_require__(81);var isTextInputElement=__webpack_require__(118);var keyOf=__webpack_require__(19);var topLevelTypes=EventConstants.topLevelTypes;var eventTypes={change:{phasedRegistrationNames:{bubbled:keyOf({onChange:null}),captured:keyOf({onChangeCapture:null})},dependencies:[topLevelTypes.topBlur,topLevelTypes.topChange,topLevelTypes.topClick,topLevelTypes.topFocus,topLevelTypes.topInput,topLevelTypes.topKeyDown,topLevelTypes.topKeyUp,topLevelTypes.topSelectionChange]}};var activeElement=null;var activeElementID=null;var activeElementValue=null;var activeElementValueProp=null;function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==="select"||nodeName==="input"&&elem.type==="file"}var doesChangeEventBubble=false;if(ExecutionEnvironment.canUseDOM){doesChangeEventBubble=isEventSupported("change")&&(!("documentMode"in document)||document.documentMode>8)}function manualDispatchChangeEvent(nativeEvent){var event=SyntheticEvent.getPooled(eventTypes.change,activeElementID,nativeEvent,getEventTarget(nativeEvent));EventPropagators.accumulateTwoPhaseDispatches(event);ReactUpdates.batchedUpdates(runEventInBatch,event)}function runEventInBatch(event){EventPluginHub.enqueueEvents(event);EventPluginHub.processEventQueue(false)}function startWatchingForChangeEventIE8(target,targetID){activeElement=target;activeElementID=targetID;activeElement.attachEvent("onchange",manualDispatchChangeEvent)}function stopWatchingForChangeEventIE8(){if(!activeElement){return}activeElement.detachEvent("onchange",manualDispatchChangeEvent);activeElement=null;activeElementID=null}function getTargetIDForChangeEvent(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topChange){return topLevelTargetID}}function handleEventsForChangeEventIE8(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topFocus){stopWatchingForChangeEventIE8();startWatchingForChangeEventIE8(topLevelTarget,topLevelTargetID)}else if(topLevelType===topLevelTypes.topBlur){stopWatchingForChangeEventIE8()}}var isInputEventSupported=false;if(ExecutionEnvironment.canUseDOM){isInputEventSupported=isEventSupported("input")&&(!("documentMode"in document)||document.documentMode>9)}var newValueProp={get:function(){return activeElementValueProp.get.call(this)},set:function(val){activeElementValue=""+val;activeElementValueProp.set.call(this,val)}};function startWatchingForValueChange(target,targetID){activeElement=target;activeElementID=targetID;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,"value");Object.defineProperty(activeElement,"value",newValueProp);activeElement.attachEvent("onpropertychange",handlePropertyChange)}function stopWatchingForValueChange(){if(!activeElement){return}delete activeElement.value;activeElement.detachEvent("onpropertychange",handlePropertyChange);activeElement=null;activeElementID=null;activeElementValue=null;activeElementValueProp=null}function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=="value"){return}var value=nativeEvent.srcElement.value;if(value===activeElementValue){return}activeElementValue=value;manualDispatchChangeEvent(nativeEvent)}function getTargetIDForInputEvent(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topInput){return topLevelTargetID}}function handleEventsForInputEventIE(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topFocus){stopWatchingForValueChange();startWatchingForValueChange(topLevelTarget,topLevelTargetID)}else if(topLevelType===topLevelTypes.topBlur){stopWatchingForValueChange()}}function getTargetIDForInputEventIE(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topSelectionChange||topLevelType===topLevelTypes.topKeyUp||topLevelType===topLevelTypes.topKeyDown){if(activeElement&&activeElement.value!==activeElementValue){activeElementValue=activeElement.value;return activeElementID}}}function shouldUseClickEvent(elem){return elem.nodeName&&elem.nodeName.toLowerCase()==="input"&&(elem.type==="checkbox"||elem.type==="radio")}function getTargetIDForClickEvent(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topClick){return topLevelTargetID}}var ChangeEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){var getTargetIDFunc,handleEventFunc;if(shouldUseChangeEvent(topLevelTarget)){if(doesChangeEventBubble){getTargetIDFunc=getTargetIDForChangeEvent}else{handleEventFunc=handleEventsForChangeEventIE8}}else if(isTextInputElement(topLevelTarget)){if(isInputEventSupported){getTargetIDFunc=getTargetIDForInputEvent}else{getTargetIDFunc=getTargetIDForInputEventIE;handleEventFunc=handleEventsForInputEventIE}}else if(shouldUseClickEvent(topLevelTarget)){getTargetIDFunc=getTargetIDForClickEvent}if(getTargetIDFunc){var targetID=getTargetIDFunc(topLevelType,topLevelTarget,topLevelTargetID);if(targetID){var event=SyntheticEvent.getPooled(eventTypes.change,targetID,nativeEvent,nativeEventTarget);event.type="change";EventPropagators.accumulateTwoPhaseDispatches(event);return event}}if(handleEventFunc){handleEventFunc(topLevelType,topLevelTarget,topLevelTargetID)}}};module.exports=ChangeEventPlugin},function(module,exports,__webpack_require__){"use strict";var nextReactRootIndex=0;var ClientReactRootIndex={createReactRootIndex:function(){return nextReactRootIndex++}};module.exports=ClientReactRootIndex},function(module,exports,__webpack_require__){"use strict";(function(process){var ExecutionEnvironment=__webpack_require__(8);var createNodesFromMarkup=__webpack_require__(129);var emptyFunction=__webpack_require__(15);var getMarkupWrap=__webpack_require__(90);var invariant=__webpack_require__(2);var OPEN_TAG_NAME_EXP=/^(<[^ \/>]+)/;var RESULT_INDEX_ATTR="data-danger-index";function getNodeName(markup){return markup.substring(1,markup.indexOf(" "))}var Danger={dangerouslyRenderMarkup:function(markupList){ !ExecutionEnvironment.canUseDOM?process.env.NODE_ENV!=="production"?invariant(false,"dangerouslyRenderMarkup(...): Cannot render markup in a worker "+"thread. Make sure `window` and `document` are available globally "+"before requiring React when unit testing or use "+"ReactDOMServer.renderToString for server rendering."):invariant(false):undefined;var nodeName;var markupByNodeName={};for(var i=0;i<markupList.length;i++){!markupList[i]?process.env.NODE_ENV!=="production"?invariant(false,"dangerouslyRenderMarkup(...): Missing markup."):invariant(false):undefined;nodeName=getNodeName(markupList[i]);nodeName=getMarkupWrap(nodeName)?nodeName:"*";markupByNodeName[nodeName]=markupByNodeName[nodeName]||[];markupByNodeName[nodeName][i]=markupList[i]}var resultList=[];var resultListAssignmentCount=0;for(nodeName in markupByNodeName){if(!markupByNodeName.hasOwnProperty(nodeName)){continue}var markupListByNodeName=markupByNodeName[nodeName];var resultIndex;for(resultIndex in markupListByNodeName){if(markupListByNodeName.hasOwnProperty(resultIndex)){var markup=markupListByNodeName[resultIndex];markupListByNodeName[resultIndex]=markup.replace(OPEN_TAG_NAME_EXP,"$1 "+RESULT_INDEX_ATTR+'="'+resultIndex+'" ')}}var renderNodes=createNodesFromMarkup(markupListByNodeName.join(""),emptyFunction);for(var j=0;j<renderNodes.length;++j){var renderNode=renderNodes[j];if(renderNode.hasAttribute&&renderNode.hasAttribute(RESULT_INDEX_ATTR)){resultIndex=+renderNode.getAttribute(RESULT_INDEX_ATTR);renderNode.removeAttribute(RESULT_INDEX_ATTR);!!resultList.hasOwnProperty(resultIndex)?process.env.NODE_ENV!=="production"?invariant(false,"Danger: Assigning to an already-occupied result index."):invariant(false):undefined;resultList[resultIndex]=renderNode;resultListAssignmentCount+=1}else if(process.env.NODE_ENV!=="production"){console.error("Danger: Discarding unexpected node:",renderNode)}}}!(resultListAssignmentCount===resultList.length)?process.env.NODE_ENV!=="production"?invariant(false,"Danger: Did not assign to every index of resultList."):invariant(false):undefined;!(resultList.length===markupList.length)?process.env.NODE_ENV!=="production"?invariant(false,"Danger: Expected markup to render %s nodes, but rendered %s.",markupList.length,resultList.length):invariant(false):undefined;return resultList},dangerouslyReplaceNodeWithMarkup:function(oldChild,markup){!ExecutionEnvironment.canUseDOM?process.env.NODE_ENV!=="production"?invariant(false,"dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a "+"worker thread. Make sure `window` and `document` are available "+"globally before requiring React when unit testing or use "+"ReactDOMServer.renderToString() for server rendering."):invariant(false):undefined;!markup?process.env.NODE_ENV!=="production"?invariant(false,"dangerouslyReplaceNodeWithMarkup(...): Missing markup."):invariant(false):undefined;!(oldChild.tagName.toLowerCase()!=="html")?process.env.NODE_ENV!=="production"?invariant(false,"dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the "+"<html> node. This is because browser quirks make this unreliable "+"and/or slow. If you want to render to the root you must use "+"server rendering. See ReactDOMServer.renderToString()."):invariant(false):undefined;var newChild;if(typeof markup==="string"){newChild=createNodesFromMarkup(markup,emptyFunction)[0]}else{newChild=markup}oldChild.parentNode.replaceChild(newChild,oldChild)}};module.exports=Danger}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var keyOf=__webpack_require__(19);var DefaultEventPluginOrder=[keyOf({ResponderEventPlugin:null}),keyOf({SimpleEventPlugin:null}),keyOf({TapEventPlugin:null}),keyOf({EnterLeaveEventPlugin:null}),keyOf({ChangeEventPlugin:null}),keyOf({SelectEventPlugin:null}),keyOf({BeforeInputEventPlugin:null})];module.exports=DefaultEventPluginOrder},function(module,exports,__webpack_require__){"use strict";var EventConstants=__webpack_require__(17);var EventPropagators=__webpack_require__(33);var SyntheticMouseEvent=__webpack_require__(40);var ReactMount=__webpack_require__(9);var keyOf=__webpack_require__(19);var topLevelTypes=EventConstants.topLevelTypes;var getFirstReactDOM=ReactMount.getFirstReactDOM;var eventTypes={mouseEnter:{registrationName:keyOf({onMouseEnter:null}),dependencies:[topLevelTypes.topMouseOut,topLevelTypes.topMouseOver]},mouseLeave:{registrationName:keyOf({onMouseLeave:null}),dependencies:[topLevelTypes.topMouseOut,topLevelTypes.topMouseOver]}};var extractedEvents=[null,null];var EnterLeaveEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){if(topLevelType===topLevelTypes.topMouseOver&&(nativeEvent.relatedTarget||nativeEvent.fromElement)){return null}if(topLevelType!==topLevelTypes.topMouseOut&&topLevelType!==topLevelTypes.topMouseOver){return null}var win;if(topLevelTarget.window===topLevelTarget){win=topLevelTarget}else{var doc=topLevelTarget.ownerDocument;if(doc){win=doc.defaultView||doc.parentWindow}else{win=window}}var from;var to;var fromID="";var toID="";if(topLevelType===topLevelTypes.topMouseOut){from=topLevelTarget;fromID=topLevelTargetID;to=getFirstReactDOM(nativeEvent.relatedTarget||nativeEvent.toElement);if(to){toID=ReactMount.getID(to)}else{to=win}to=to||win}else{from=win;to=topLevelTarget;toID=topLevelTargetID}if(from===to){return null}var leave=SyntheticMouseEvent.getPooled(eventTypes.mouseLeave,fromID,nativeEvent,nativeEventTarget);leave.type="mouseleave";leave.target=from;leave.relatedTarget=to;var enter=SyntheticMouseEvent.getPooled(eventTypes.mouseEnter,toID,nativeEvent,nativeEventTarget);enter.type="mouseenter";enter.target=to;enter.relatedTarget=from;EventPropagators.accumulateEnterLeaveDispatches(leave,enter,fromID,toID);extractedEvents[0]=leave;extractedEvents[1]=enter;return extractedEvents}};module.exports=EnterLeaveEventPlugin},function(module,exports,__webpack_require__){"use strict";(function(process){var EventConstants=__webpack_require__(17);var ReactErrorUtils=__webpack_require__(106);var invariant=__webpack_require__(2);var warning=__webpack_require__(4);var injection={Mount:null,injectMount:function(InjectedMount){injection.Mount=InjectedMount;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(InjectedMount&&InjectedMount.getNode&&InjectedMount.getID,"EventPluginUtils.injection.injectMount(...): Injected Mount "+"module is missing getNode or getID."):undefined}}};var topLevelTypes=EventConstants.topLevelTypes;function isEndish(topLevelType){return topLevelType===topLevelTypes.topMouseUp||topLevelType===topLevelTypes.topTouchEnd||topLevelType===topLevelTypes.topTouchCancel}function isMoveish(topLevelType){return topLevelType===topLevelTypes.topMouseMove||topLevelType===topLevelTypes.topTouchMove}function isStartish(topLevelType){return topLevelType===topLevelTypes.topMouseDown||topLevelType===topLevelTypes.topTouchStart}var validateEventDispatches;if(process.env.NODE_ENV!=="production"){validateEventDispatches=function(event){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;var listenersIsArr=Array.isArray(dispatchListeners);var idsIsArr=Array.isArray(dispatchIDs);var IDsLen=idsIsArr?dispatchIDs.length:dispatchIDs?1:0;var listenersLen=listenersIsArr?dispatchListeners.length:dispatchListeners?1:0;process.env.NODE_ENV!=="production"?warning(idsIsArr===listenersIsArr&&IDsLen===listenersLen,"EventPluginUtils: Invalid `event`."):undefined}}function executeDispatch(event,simulated,listener,domID){var type=event.type||"unknown-event";event.currentTarget=injection.Mount.getNode(domID);if(simulated){ReactErrorUtils.invokeGuardedCallbackWithCatch(type,listener,event,domID)}else{ReactErrorUtils.invokeGuardedCallback(type,listener,event,domID)}event.currentTarget=null}function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;if(process.env.NODE_ENV!=="production"){validateEventDispatches(event)}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break}executeDispatch(event,simulated,dispatchListeners[i],dispatchIDs[i])}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchIDs)}event._dispatchListeners=null;event._dispatchIDs=null}function executeDispatchesInOrderStopAtTrueImpl(event){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;if(process.env.NODE_ENV!=="production"){validateEventDispatches(event)}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break}if(dispatchListeners[i](event,dispatchIDs[i])){return dispatchIDs[i]}}}else if(dispatchListeners){if(dispatchListeners(event,dispatchIDs)){return dispatchIDs}}return null}function executeDispatchesInOrderStopAtTrue(event){var ret=executeDispatchesInOrderStopAtTrueImpl(event);event._dispatchIDs=null;event._dispatchListeners=null;return ret}function executeDirectDispatch(event){if(process.env.NODE_ENV!=="production"){validateEventDispatches(event)}var dispatchListener=event._dispatchListeners;var dispatchID=event._dispatchIDs;!!Array.isArray(dispatchListener)?process.env.NODE_ENV!=="production"?invariant(false,"executeDirectDispatch(...): Invalid `event`."):invariant(false):undefined;var res=dispatchListener?dispatchListener(event,dispatchID):null;event._dispatchListeners=null;event._dispatchIDs=null;return res}function hasDispatches(event){return!!event._dispatchListeners}var EventPluginUtils={isEndish:isEndish,isMoveish:isMoveish,isStartish:isStartish,executeDirectDispatch:executeDirectDispatch,executeDispatchesInOrder:executeDispatchesInOrder,executeDispatchesInOrderStopAtTrue:executeDispatchesInOrderStopAtTrue,hasDispatches:hasDispatches,getNode:function(id){return injection.Mount.getNode(id)},getID:function(node){return injection.Mount.getID(node)},injection:injection};module.exports=EventPluginUtils}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var PooledClass=__webpack_require__(20);var assign=__webpack_require__(3);var getTextContentAccessor=__webpack_require__(117);function FallbackCompositionState(root){this._root=root;this._startText=this.getText();this._fallbackText=null}assign(FallbackCompositionState.prototype,{destructor:function(){this._root=null;this._startText=null;this._fallbackText=null},getText:function(){if("value"in this._root){return this._root.value}return this._root[getTextContentAccessor()]},getData:function(){if(this._fallbackText){return this._fallbackText}var start;var startValue=this._startText;var startLength=startValue.length;var end;var endValue=this.getText();var endLength=endValue.length;for(start=0;start<startLength;start++){if(startValue[start]!==endValue[start]){break}}var minEnd=startLength-start;for(end=1;end<=minEnd;end++){if(startValue[startLength-end]!==endValue[endLength-end]){break}}var sliceTail=end>1?1-end:undefined;this._fallbackText=endValue.slice(start,sliceTail);return this._fallbackText}});PooledClass.addPoolingTo(FallbackCompositionState);module.exports=FallbackCompositionState},function(module,exports,__webpack_require__){"use strict";var DOMProperty=__webpack_require__(21);var ExecutionEnvironment=__webpack_require__(8);var MUST_USE_ATTRIBUTE=DOMProperty.injection.MUST_USE_ATTRIBUTE;var MUST_USE_PROPERTY=DOMProperty.injection.MUST_USE_PROPERTY;var HAS_BOOLEAN_VALUE=DOMProperty.injection.HAS_BOOLEAN_VALUE;var HAS_SIDE_EFFECTS=DOMProperty.injection.HAS_SIDE_EFFECTS;var HAS_NUMERIC_VALUE=DOMProperty.injection.HAS_NUMERIC_VALUE;var HAS_POSITIVE_NUMERIC_VALUE=DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;var HAS_OVERLOADED_BOOLEAN_VALUE=DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;var hasSVG;if(ExecutionEnvironment.canUseDOM){var implementation=document.implementation;hasSVG=implementation&&implementation.hasFeature&&implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var HTMLDOMPropertyConfig={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,allowTransparency:MUST_USE_ATTRIBUTE,alt:null,async:HAS_BOOLEAN_VALUE,autoComplete:null,autoPlay:HAS_BOOLEAN_VALUE,capture:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,cellPadding:null,cellSpacing:null,charSet:MUST_USE_ATTRIBUTE,challenge:MUST_USE_ATTRIBUTE,checked:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,classID:MUST_USE_ATTRIBUTE,className:hasSVG?MUST_USE_ATTRIBUTE:MUST_USE_PROPERTY,cols:MUST_USE_ATTRIBUTE|HAS_POSITIVE_NUMERIC_VALUE,colSpan:null,content:null,contentEditable:null,contextMenu:MUST_USE_ATTRIBUTE,controls:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,coords:null,crossOrigin:null,data:null,dateTime:MUST_USE_ATTRIBUTE,default:HAS_BOOLEAN_VALUE,defer:HAS_BOOLEAN_VALUE,dir:null,disabled:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,download:HAS_OVERLOADED_BOOLEAN_VALUE,draggable:null,encType:null,form:MUST_USE_ATTRIBUTE,formAction:MUST_USE_ATTRIBUTE,formEncType:MUST_USE_ATTRIBUTE,formMethod:MUST_USE_ATTRIBUTE,formNoValidate:HAS_BOOLEAN_VALUE,formTarget:MUST_USE_ATTRIBUTE,frameBorder:MUST_USE_ATTRIBUTE,headers:null,height:MUST_USE_ATTRIBUTE,hidden:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:MUST_USE_PROPERTY,inputMode:MUST_USE_ATTRIBUTE,integrity:null,is:MUST_USE_ATTRIBUTE,keyParams:MUST_USE_ATTRIBUTE,keyType:MUST_USE_ATTRIBUTE,kind:null,label:null,lang:null,list:MUST_USE_ATTRIBUTE,loop:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,low:null,manifest:MUST_USE_ATTRIBUTE,marginHeight:null,marginWidth:null,max:null,maxLength:MUST_USE_ATTRIBUTE,media:MUST_USE_ATTRIBUTE,mediaGroup:null,method:null,min:null,minLength:MUST_USE_ATTRIBUTE,multiple:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,muted:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,name:null,nonce:MUST_USE_ATTRIBUTE,noValidate:HAS_BOOLEAN_VALUE,open:HAS_BOOLEAN_VALUE,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,rel:null,required:HAS_BOOLEAN_VALUE,reversed:HAS_BOOLEAN_VALUE,role:MUST_USE_ATTRIBUTE,rows:MUST_USE_ATTRIBUTE|HAS_POSITIVE_NUMERIC_VALUE,rowSpan:null,sandbox:null,scope:null,scoped:HAS_BOOLEAN_VALUE,scrolling:null,seamless:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,selected:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,shape:null,size:MUST_USE_ATTRIBUTE|HAS_POSITIVE_NUMERIC_VALUE,sizes:MUST_USE_ATTRIBUTE,span:HAS_POSITIVE_NUMERIC_VALUE,spellCheck:null,src:null,srcDoc:MUST_USE_PROPERTY,srcLang:null,srcSet:MUST_USE_ATTRIBUTE,start:HAS_NUMERIC_VALUE,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:MUST_USE_PROPERTY|HAS_SIDE_EFFECTS,width:MUST_USE_ATTRIBUTE,wmode:MUST_USE_ATTRIBUTE,wrap:null,about:MUST_USE_ATTRIBUTE,datatype:MUST_USE_ATTRIBUTE,inlist:MUST_USE_ATTRIBUTE,prefix:MUST_USE_ATTRIBUTE,property:MUST_USE_ATTRIBUTE,resource:MUST_USE_ATTRIBUTE,typeof:MUST_USE_ATTRIBUTE,vocab:MUST_USE_ATTRIBUTE,autoCapitalize:MUST_USE_ATTRIBUTE,autoCorrect:MUST_USE_ATTRIBUTE,autoSave:null,color:null,itemProp:MUST_USE_ATTRIBUTE,itemScope:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,itemType:MUST_USE_ATTRIBUTE,itemID:MUST_USE_ATTRIBUTE,itemRef:MUST_USE_ATTRIBUTE,results:null,security:MUST_USE_ATTRIBUTE,unselectable:MUST_USE_ATTRIBUTE},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};module.exports=HTMLDOMPropertyConfig},function(module,exports,__webpack_require__){"use strict";var ReactDOM=__webpack_require__(155);var ReactDOMServer=__webpack_require__(162);var ReactIsomorphic=__webpack_require__(169);var assign=__webpack_require__(3);var deprecated=__webpack_require__(191);var React={};assign(React,ReactIsomorphic);assign(React,{findDOMNode:deprecated("findDOMNode","ReactDOM","react-dom",ReactDOM,ReactDOM.findDOMNode),render:deprecated("render","ReactDOM","react-dom",ReactDOM,ReactDOM.render),unmountComponentAtNode:deprecated("unmountComponentAtNode","ReactDOM","react-dom",ReactDOM,ReactDOM.unmountComponentAtNode),renderToString:deprecated("renderToString","ReactDOMServer","react-dom/server",ReactDOMServer,ReactDOMServer.renderToString),renderToStaticMarkup:deprecated("renderToStaticMarkup","ReactDOMServer","react-dom/server",ReactDOMServer,ReactDOMServer.renderToStaticMarkup)});React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ReactDOM;React.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ReactDOMServer;module.exports=React},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactInstanceMap=__webpack_require__(34);var findDOMNode=__webpack_require__(75);var warning=__webpack_require__(4);var didWarnKey="_getDOMNodeDidWarn";var ReactBrowserComponentMixin={getDOMNode:function(){process.env.NODE_ENV!=="production"?warning(this.constructor[didWarnKey],"%s.getDOMNode(...) is deprecated. Please use "+"ReactDOM.findDOMNode(instance) instead.",ReactInstanceMap.get(this).getName()||this.tagName||"Unknown"):undefined;this.constructor[didWarnKey]=true;return findDOMNode(this)}};module.exports=ReactBrowserComponentMixin}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactReconciler=__webpack_require__(22);var instantiateReactComponent=__webpack_require__(80);var shouldUpdateReactComponent=__webpack_require__(83);var traverseAllChildren=__webpack_require__(84);var warning=__webpack_require__(4);function instantiateChild(childInstances,child,name){var keyUnique=childInstances[name]===undefined;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(keyUnique,"flattenChildren(...): Encountered two children with the same key, "+"`%s`. Child keys must be unique; when two children share a key, only "+"the first child will be used.",name):undefined}if(child!=null&&keyUnique){childInstances[name]=instantiateReactComponent(child,null)}}var ReactChildReconciler={instantiateChildren:function(nestedChildNodes,transaction,context){if(nestedChildNodes==null){return null}var childInstances={};traverseAllChildren(nestedChildNodes,instantiateChild,childInstances);return childInstances},updateChildren:function(prevChildren,nextChildren,transaction,context){if(!nextChildren&&!prevChildren){return null}var name;for(name in nextChildren){if(!nextChildren.hasOwnProperty(name)){continue}var prevChild=prevChildren&&prevChildren[name];var prevElement=prevChild&&prevChild._currentElement;var nextElement=nextChildren[name];if(prevChild!=null&&shouldUpdateReactComponent(prevElement,nextElement)){ReactReconciler.receiveComponent(prevChild,nextElement,transaction,context);nextChildren[name]=prevChild}else{if(prevChild){ReactReconciler.unmountComponent(prevChild,name)}var nextChildInstance=instantiateReactComponent(nextElement,null);nextChildren[name]=nextChildInstance}}for(name in prevChildren){if(prevChildren.hasOwnProperty(name)&&!(nextChildren&&nextChildren.hasOwnProperty(name))){ReactReconciler.unmountComponent(prevChildren[name])}}return nextChildren},unmountChildren:function(renderedChildren){for(var name in renderedChildren){if(renderedChildren.hasOwnProperty(name)){var renderedChild=renderedChildren[name];ReactReconciler.unmountComponent(renderedChild)}}}};module.exports=ReactChildReconciler}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactComponentEnvironment=__webpack_require__(71);var ReactCurrentOwner=__webpack_require__(18);var ReactElement=__webpack_require__(11);var ReactInstanceMap=__webpack_require__(34);var ReactPerf=__webpack_require__(12);var ReactPropTypeLocations=__webpack_require__(39);var ReactPropTypeLocationNames=__webpack_require__(38);var ReactReconciler=__webpack_require__(22);var ReactUpdateQueue=__webpack_require__(73);var assign=__webpack_require__(3);var emptyObject=__webpack_require__(31);var invariant=__webpack_require__(2);var shouldUpdateReactComponent=__webpack_require__(83);var warning=__webpack_require__(4);function getDeclarationErrorAddendum(component){var owner=component._currentElement._owner||null;if(owner){var name=owner.getName();if(name){return" Check the render method of `"+name+"`."}}return""}function StatelessComponent(Component){}StatelessComponent.prototype.render=function(){var Component=ReactInstanceMap.get(this)._currentElement.type;return Component(this.props,this.context,this.updater)};var nextMountID=1;var ReactCompositeComponentMixin={construct:function(element){this._currentElement=element;this._rootNodeID=null;this._instance=null;this._pendingElement=null;this._pendingStateQueue=null;this._pendingReplaceState=false;this._pendingForceUpdate=false;this._renderedComponent=null;this._context=null;this._mountOrder=0;this._topLevelWrapper=null;this._pendingCallbacks=null},mountComponent:function(rootID,transaction,context){this._context=context;this._mountOrder=nextMountID++;this._rootNodeID=rootID;var publicProps=this._processProps(this._currentElement.props);var publicContext=this._processContext(context);var Component=this._currentElement.type;var inst;var renderedElement;var canInstantiate="prototype"in Component;if(canInstantiate){if(process.env.NODE_ENV!=="production"){ReactCurrentOwner.current=this;try{inst=new Component(publicProps,publicContext,ReactUpdateQueue)}finally{ReactCurrentOwner.current=null}}else{inst=new Component(publicProps,publicContext,ReactUpdateQueue)}}if(!canInstantiate||inst===null||inst===false||ReactElement.isValidElement(inst)){renderedElement=inst;inst=new StatelessComponent(Component)}if(process.env.NODE_ENV!=="production"){if(inst.render==null){process.env.NODE_ENV!=="production"?warning(false,"%s(...): No `render` method found on the returned component "+"instance: you may have forgotten to define `render`, returned "+"null/false from a stateless component, or tried to render an "+"element whose type is a function that isn't a React component.",Component.displayName||Component.name||"Component"):undefined}else{process.env.NODE_ENV!=="production"?warning(Component.prototype&&Component.prototype.isReactComponent||!canInstantiate||!(inst instanceof Component),"%s(...): React component classes must extend React.Component.",Component.displayName||Component.name||"Component"):undefined}}inst.props=publicProps;inst.context=publicContext;inst.refs=emptyObject;inst.updater=ReactUpdateQueue;this._instance=inst;ReactInstanceMap.set(inst,this);if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(!inst.getInitialState||inst.getInitialState.isReactClassApproved,"getInitialState was defined on %s, a plain JavaScript class. "+"This is only supported for classes created using React.createClass. "+"Did you mean to define a state property instead?",this.getName()||"a component"):undefined;process.env.NODE_ENV!=="production"?warning(!inst.getDefaultProps||inst.getDefaultProps.isReactClassApproved,"getDefaultProps was defined on %s, a plain JavaScript class. "+"This is only supported for classes created using React.createClass. "+"Use a static property to define defaultProps instead.",this.getName()||"a component"):undefined;process.env.NODE_ENV!=="production"?warning(!inst.propTypes,"propTypes was defined as an instance property on %s. Use a static "+"property to define propTypes instead.",this.getName()||"a component"):undefined;process.env.NODE_ENV!=="production"?warning(!inst.contextTypes,"contextTypes was defined as an instance property on %s. Use a "+"static property to define contextTypes instead.",this.getName()||"a component"):undefined;process.env.NODE_ENV!=="production"?warning(typeof inst.componentShouldUpdate!=="function","%s has a method called "+"componentShouldUpdate(). Did you mean shouldComponentUpdate()? "+"The name is phrased as a question because the function is "+"expected to return a value.",this.getName()||"A component"):undefined;process.env.NODE_ENV!=="production"?warning(typeof inst.componentDidUnmount!=="function","%s has a method called "+"componentDidUnmount(). But there is no such lifecycle method. "+"Did you mean componentWillUnmount()?",this.getName()||"A component"):undefined;process.env.NODE_ENV!=="production"?warning(typeof inst.componentWillRecieveProps!=="function","%s has a method called "+"componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",this.getName()||"A component"):undefined}var initialState=inst.state;if(initialState===undefined){inst.state=initialState=null}!(typeof initialState==="object"&&!Array.isArray(initialState))?process.env.NODE_ENV!=="production"?invariant(false,"%s.state: must be set to an object or null",this.getName()||"ReactCompositeComponent"):invariant(false):undefined;this._pendingStateQueue=null;this._pendingReplaceState=false;this._pendingForceUpdate=false;if(inst.componentWillMount){inst.componentWillMount();if(this._pendingStateQueue){inst.state=this._processPendingState(inst.props,inst.context)}}if(renderedElement===undefined){renderedElement=this._renderValidatedComponent()}this._renderedComponent=this._instantiateReactComponent(renderedElement);var markup=ReactReconciler.mountComponent(this._renderedComponent,rootID,transaction,this._processChildContext(context));if(inst.componentDidMount){transaction.getReactMountReady().enqueue(inst.componentDidMount,inst)}return markup},unmountComponent:function(){var inst=this._instance;if(inst.componentWillUnmount){inst.componentWillUnmount()}ReactReconciler.unmountComponent(this._renderedComponent);this._renderedComponent=null;this._instance=null;this._pendingStateQueue=null;this._pendingReplaceState=false;this._pendingForceUpdate=false;this._pendingCallbacks=null;this._pendingElement=null;this._context=null;this._rootNodeID=null;this._topLevelWrapper=null;ReactInstanceMap.remove(inst)},_maskContext:function(context){var maskedContext=null;var Component=this._currentElement.type;var contextTypes=Component.contextTypes;if(!contextTypes){return emptyObject}maskedContext={};for(var contextName in contextTypes){maskedContext[contextName]=context[contextName]}return maskedContext},_processContext:function(context){var maskedContext=this._maskContext(context);if(process.env.NODE_ENV!=="production"){var Component=this._currentElement.type;if(Component.contextTypes){this._checkPropTypes(Component.contextTypes,maskedContext,ReactPropTypeLocations.context)}}return maskedContext},_processChildContext:function(currentContext){var Component=this._currentElement.type;var inst=this._instance;var childContext=inst.getChildContext&&inst.getChildContext();if(childContext){!(typeof Component.childContextTypes==="object")?process.env.NODE_ENV!=="production"?invariant(false,"%s.getChildContext(): childContextTypes must be defined in order to "+"use getChildContext().",this.getName()||"ReactCompositeComponent"):invariant(false):undefined;if(process.env.NODE_ENV!=="production"){this._checkPropTypes(Component.childContextTypes,childContext,ReactPropTypeLocations.childContext)}for(var name in childContext){!(name in Component.childContextTypes)?process.env.NODE_ENV!=="production"?invariant(false,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',this.getName()||"ReactCompositeComponent",name):invariant(false):undefined}return assign({},currentContext,childContext)}return currentContext},_processProps:function(newProps){if(process.env.NODE_ENV!=="production"){var Component=this._currentElement.type;if(Component.propTypes){this._checkPropTypes(Component.propTypes,newProps,ReactPropTypeLocations.prop)}}return newProps},_checkPropTypes:function(propTypes,props,location){var componentName=this.getName();for(var propName in propTypes){if(propTypes.hasOwnProperty(propName)){var error;try{!(typeof propTypes[propName]==="function")?process.env.NODE_ENV!=="production"?invariant(false,"%s: %s type `%s` is invalid; it must be a function, usually "+"from React.PropTypes.",componentName||"React class",ReactPropTypeLocationNames[location],propName):invariant(false):undefined;error=propTypes[propName](props,propName,componentName,location)}catch(ex){error=ex}if(error instanceof Error){var addendum=getDeclarationErrorAddendum(this);if(location===ReactPropTypeLocations.prop){process.env.NODE_ENV!=="production"?warning(false,"Failed Composite propType: %s%s",error.message,addendum):undefined}else{process.env.NODE_ENV!=="production"?warning(false,"Failed Context Types: %s%s",error.message,addendum):undefined}}}}},receiveComponent:function(nextElement,transaction,nextContext){var prevElement=this._currentElement;var prevContext=this._context;this._pendingElement=null;this.updateComponent(transaction,prevElement,nextElement,prevContext,nextContext)},performUpdateIfNecessary:function(transaction){if(this._pendingElement!=null){ReactReconciler.receiveComponent(this,this._pendingElement||this._currentElement,transaction,this._context)}if(this._pendingStateQueue!==null||this._pendingForceUpdate){this.updateComponent(transaction,this._currentElement,this._currentElement,this._context,this._context)}},updateComponent:function(transaction,prevParentElement,nextParentElement,prevUnmaskedContext,nextUnmaskedContext){var inst=this._instance;var nextContext=this._context===nextUnmaskedContext?inst.context:this._processContext(nextUnmaskedContext);var nextProps;if(prevParentElement===nextParentElement){nextProps=nextParentElement.props}else{nextProps=this._processProps(nextParentElement.props);if(inst.componentWillReceiveProps){inst.componentWillReceiveProps(nextProps,nextContext)}}var nextState=this._processPendingState(nextProps,nextContext);var shouldUpdate=this._pendingForceUpdate||!inst.shouldComponentUpdate||inst.shouldComponentUpdate(nextProps,nextState,nextContext);if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(typeof shouldUpdate!=="undefined","%s.shouldComponentUpdate(): Returned undefined instead of a "+"boolean value. Make sure to return true or false.",this.getName()||"ReactCompositeComponent"):undefined}if(shouldUpdate){this._pendingForceUpdate=false;this._performComponentUpdate(nextParentElement,nextProps,nextState,nextContext,transaction,nextUnmaskedContext)}else{this._currentElement=nextParentElement;this._context=nextUnmaskedContext;inst.props=nextProps;inst.state=nextState;inst.context=nextContext}},_processPendingState:function(props,context){var inst=this._instance;var queue=this._pendingStateQueue;var replace=this._pendingReplaceState;this._pendingReplaceState=false;this._pendingStateQueue=null;if(!queue){return inst.state}if(replace&&queue.length===1){return queue[0]}var nextState=assign({},replace?queue[0]:inst.state);for(var i=replace?1:0;i<queue.length;i++){var partial=queue[i];assign(nextState,typeof partial==="function"?partial.call(inst,nextState,props,context):partial)}return nextState},_performComponentUpdate:function(nextElement,nextProps,nextState,nextContext,transaction,unmaskedContext){var inst=this._instance;var hasComponentDidUpdate=Boolean(inst.componentDidUpdate);var prevProps;var prevState;var prevContext;if(hasComponentDidUpdate){prevProps=inst.props;prevState=inst.state;prevContext=inst.context}if(inst.componentWillUpdate){inst.componentWillUpdate(nextProps,nextState,nextContext)}this._currentElement=nextElement;this._context=unmaskedContext;inst.props=nextProps;inst.state=nextState;inst.context=nextContext;this._updateRenderedComponent(transaction,unmaskedContext);if(hasComponentDidUpdate){ transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst,prevProps,prevState,prevContext),inst)}},_updateRenderedComponent:function(transaction,context){var prevComponentInstance=this._renderedComponent;var prevRenderedElement=prevComponentInstance._currentElement;var nextRenderedElement=this._renderValidatedComponent();if(shouldUpdateReactComponent(prevRenderedElement,nextRenderedElement)){ReactReconciler.receiveComponent(prevComponentInstance,nextRenderedElement,transaction,this._processChildContext(context))}else{var thisID=this._rootNodeID;var prevComponentID=prevComponentInstance._rootNodeID;ReactReconciler.unmountComponent(prevComponentInstance);this._renderedComponent=this._instantiateReactComponent(nextRenderedElement);var nextMarkup=ReactReconciler.mountComponent(this._renderedComponent,thisID,transaction,this._processChildContext(context));this._replaceNodeWithMarkupByID(prevComponentID,nextMarkup)}},_replaceNodeWithMarkupByID:function(prevComponentID,nextMarkup){ReactComponentEnvironment.replaceNodeWithMarkupByID(prevComponentID,nextMarkup)},_renderValidatedComponentWithoutOwnerOrContext:function(){var inst=this._instance;var renderedComponent=inst.render();if(process.env.NODE_ENV!=="production"){if(typeof renderedComponent==="undefined"&&inst.render._isMockFunction){renderedComponent=null}}return renderedComponent},_renderValidatedComponent:function(){var renderedComponent;ReactCurrentOwner.current=this;try{renderedComponent=this._renderValidatedComponentWithoutOwnerOrContext()}finally{ReactCurrentOwner.current=null}!(renderedComponent===null||renderedComponent===false||ReactElement.isValidElement(renderedComponent))?process.env.NODE_ENV!=="production"?invariant(false,"%s.render(): A valid ReactComponent must be returned. You may have "+"returned undefined, an array or some other invalid object.",this.getName()||"ReactCompositeComponent"):invariant(false):undefined;return renderedComponent},attachRef:function(ref,component){var inst=this.getPublicInstance();!(inst!=null)?process.env.NODE_ENV!=="production"?invariant(false,"Stateless function components cannot have refs."):invariant(false):undefined;var publicComponentInstance=component.getPublicInstance();if(process.env.NODE_ENV!=="production"){var componentName=component&&component.getName?component.getName():"a component";process.env.NODE_ENV!=="production"?warning(publicComponentInstance!=null,"Stateless function components cannot be given refs "+'(See ref "%s" in %s created by %s). '+"Attempts to access this ref will fail.",ref,componentName,this.getName()):undefined}var refs=inst.refs===emptyObject?inst.refs={}:inst.refs;refs[ref]=publicComponentInstance},detachRef:function(ref){var refs=this.getPublicInstance().refs;delete refs[ref]},getName:function(){var type=this._currentElement.type;var constructor=this._instance&&this._instance.constructor;return type.displayName||constructor&&constructor.displayName||type.name||constructor&&constructor.name||null},getPublicInstance:function(){var inst=this._instance;if(inst instanceof StatelessComponent){return null}return inst},_instantiateReactComponent:null};ReactPerf.measureMethods(ReactCompositeComponentMixin,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var ReactCompositeComponent={Mixin:ReactCompositeComponentMixin};module.exports=ReactCompositeComponent}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactCurrentOwner=__webpack_require__(18);var ReactDOMTextComponent=__webpack_require__(100);var ReactDefaultInjection=__webpack_require__(102);var ReactInstanceHandles=__webpack_require__(24);var ReactMount=__webpack_require__(9);var ReactPerf=__webpack_require__(12);var ReactReconciler=__webpack_require__(22);var ReactUpdates=__webpack_require__(14);var ReactVersion=__webpack_require__(74);var findDOMNode=__webpack_require__(75);var renderSubtreeIntoContainer=__webpack_require__(197);var warning=__webpack_require__(4);ReactDefaultInjection.inject();var render=ReactPerf.measure("React","render",ReactMount.render);var React={findDOMNode:findDOMNode,render:render,unmountComponentAtNode:ReactMount.unmountComponentAtNode,version:ReactVersion,unstable_batchedUpdates:ReactUpdates.batchedUpdates,unstable_renderSubtreeIntoContainer:renderSubtreeIntoContainer};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!=="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject==="function"){__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:ReactCurrentOwner,InstanceHandles:ReactInstanceHandles,Mount:ReactMount,Reconciler:ReactReconciler,TextComponent:ReactDOMTextComponent})}if(process.env.NODE_ENV!=="production"){var ExecutionEnvironment=__webpack_require__(8);if(ExecutionEnvironment.canUseDOM&&window.top===window.self){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__==="undefined"){if(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1){console.debug("Download the React DevTools for a better development experience: "+"https://fb.me/react-devtools")}}var ieCompatibilityMode=document.documentMode&&document.documentMode<8;process.env.NODE_ENV!=="production"?warning(!ieCompatibilityMode,"Internet Explorer is running in compatibility mode; please add the "+"following tag to your HTML to prevent this from happening: "+'<meta http-equiv="X-UA-Compatible" content="IE=edge" />'):undefined;var expectedFeatures=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.split,String.prototype.trim,Object.create,Object.freeze];for(var i=0;i<expectedFeatures.length;i++){if(!expectedFeatures[i]){console.error("One or more ES5 shim/shams expected by React are not available: "+"https://fb.me/react-warning-polyfills");break}}}}module.exports=React}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var mouseListenerNames={onClick:true,onDoubleClick:true,onMouseDown:true,onMouseMove:true,onMouseUp:true,onClickCapture:true,onDoubleClickCapture:true,onMouseDownCapture:true,onMouseMoveCapture:true,onMouseUpCapture:true};var ReactDOMButton={getNativeProps:function(inst,props,context){if(!props.disabled){return props}var nativeProps={};for(var key in props){if(props.hasOwnProperty(key)&&!mouseListenerNames[key]){nativeProps[key]=props[key]}}return nativeProps}};module.exports=ReactDOMButton},function(module,exports,__webpack_require__){"use strict";(function(process){var AutoFocusUtils=__webpack_require__(140);var CSSPropertyOperations=__webpack_require__(142);var DOMProperty=__webpack_require__(21);var DOMPropertyOperations=__webpack_require__(68);var EventConstants=__webpack_require__(17);var ReactBrowserEventEmitter=__webpack_require__(37);var ReactComponentBrowserEnvironment=__webpack_require__(70);var ReactDOMButton=__webpack_require__(156);var ReactDOMInput=__webpack_require__(159);var ReactDOMOption=__webpack_require__(160);var ReactDOMSelect=__webpack_require__(99);var ReactDOMTextarea=__webpack_require__(163);var ReactMount=__webpack_require__(9);var ReactMultiChild=__webpack_require__(170);var ReactPerf=__webpack_require__(12);var ReactUpdateQueue=__webpack_require__(73);var assign=__webpack_require__(3);var canDefineProperty=__webpack_require__(42);var escapeTextContentForBrowser=__webpack_require__(43);var invariant=__webpack_require__(2);var isEventSupported=__webpack_require__(81);var keyOf=__webpack_require__(19);var setInnerHTML=__webpack_require__(44);var setTextContent=__webpack_require__(82);var shallowEqual=__webpack_require__(91);var validateDOMNesting=__webpack_require__(85);var warning=__webpack_require__(4);var deleteListener=ReactBrowserEventEmitter.deleteListener;var listenTo=ReactBrowserEventEmitter.listenTo;var registrationNameModules=ReactBrowserEventEmitter.registrationNameModules;var CONTENT_TYPES={string:true,number:true};var CHILDREN=keyOf({children:null});var STYLE=keyOf({style:null});var HTML=keyOf({__html:null});var ELEMENT_NODE_TYPE=1;function getDeclarationErrorAddendum(internalInstance){if(internalInstance){var owner=internalInstance._currentElement._owner||null;if(owner){var name=owner.getName();if(name){return" This DOM node was rendered by `"+name+"`."}}}return""}var legacyPropsDescriptor;if(process.env.NODE_ENV!=="production"){legacyPropsDescriptor={props:{enumerable:false,get:function(){var component=this._reactInternalComponent;process.env.NODE_ENV!=="production"?warning(false,"ReactDOMComponent: Do not access .props of a DOM node; instead, "+"recreate the props as `render` did originally or read the DOM "+"properties/attributes directly from this node (e.g., "+"this.refs.box.className).%s",getDeclarationErrorAddendum(component)):undefined;return component._currentElement.props}}}}function legacyGetDOMNode(){if(process.env.NODE_ENV!=="production"){var component=this._reactInternalComponent;process.env.NODE_ENV!=="production"?warning(false,"ReactDOMComponent: Do not access .getDOMNode() of a DOM node; "+"instead, use the node directly.%s",getDeclarationErrorAddendum(component)):undefined}return this}function legacyIsMounted(){var component=this._reactInternalComponent;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(false,"ReactDOMComponent: Do not access .isMounted() of a DOM node.%s",getDeclarationErrorAddendum(component)):undefined}return!!component}function legacySetStateEtc(){if(process.env.NODE_ENV!=="production"){var component=this._reactInternalComponent;process.env.NODE_ENV!=="production"?warning(false,"ReactDOMComponent: Do not access .setState(), .replaceState(), or "+".forceUpdate() of a DOM node. This is a no-op.%s",getDeclarationErrorAddendum(component)):undefined}}function legacySetProps(partialProps,callback){var component=this._reactInternalComponent;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(false,"ReactDOMComponent: Do not access .setProps() of a DOM node. "+"Instead, call ReactDOM.render again at the top level.%s",getDeclarationErrorAddendum(component)):undefined}if(!component){return}ReactUpdateQueue.enqueueSetPropsInternal(component,partialProps);if(callback){ReactUpdateQueue.enqueueCallbackInternal(component,callback)}}function legacyReplaceProps(partialProps,callback){var component=this._reactInternalComponent;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(false,"ReactDOMComponent: Do not access .replaceProps() of a DOM node. "+"Instead, call ReactDOM.render again at the top level.%s",getDeclarationErrorAddendum(component)):undefined}if(!component){return}ReactUpdateQueue.enqueueReplacePropsInternal(component,partialProps);if(callback){ReactUpdateQueue.enqueueCallbackInternal(component,callback)}}function friendlyStringify(obj){if(typeof obj==="object"){if(Array.isArray(obj)){return"["+obj.map(friendlyStringify).join(", ")+"]"}else{var pairs=[];for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var keyEscaped=/^[a-z$_][\w$_]*$/i.test(key)?key:JSON.stringify(key);pairs.push(keyEscaped+": "+friendlyStringify(obj[key]))}}return"{"+pairs.join(", ")+"}"}}else if(typeof obj==="string"){return JSON.stringify(obj)}else if(typeof obj==="function"){return"[function object]"}return String(obj)}var styleMutationWarning={};function checkAndWarnForMutatedStyle(style1,style2,component){if(style1==null||style2==null){return}if(shallowEqual(style1,style2)){return}var componentName=component._tag;var owner=component._currentElement._owner;var ownerName;if(owner){ownerName=owner.getName()}var hash=ownerName+"|"+componentName;if(styleMutationWarning.hasOwnProperty(hash)){return}styleMutationWarning[hash]=true;process.env.NODE_ENV!=="production"?warning(false,"`%s` was passed a style object that has previously been mutated. "+"Mutating `style` is deprecated. Consider cloning it beforehand. Check "+"the `render` %s. Previous style: %s. Mutated style: %s.",componentName,owner?"of `"+ownerName+"`":"using <"+componentName+">",friendlyStringify(style1),friendlyStringify(style2)):undefined}function assertValidProps(component,props){if(!props){return}if(process.env.NODE_ENV!=="production"){if(voidElementTags[component._tag]){process.env.NODE_ENV!=="production"?warning(props.children==null&&props.dangerouslySetInnerHTML==null,"%s is a void element tag and must not have `children` or "+"use `props.dangerouslySetInnerHTML`.%s",component._tag,component._currentElement._owner?" Check the render method of "+component._currentElement._owner.getName()+".":""):undefined}}if(props.dangerouslySetInnerHTML!=null){!(props.children==null)?process.env.NODE_ENV!=="production"?invariant(false,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."):invariant(false):undefined;!(typeof props.dangerouslySetInnerHTML==="object"&&HTML in props.dangerouslySetInnerHTML)?process.env.NODE_ENV!=="production"?invariant(false,"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. "+"Please visit https://fb.me/react-invariant-dangerously-set-inner-html "+"for more information."):invariant(false):undefined}if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(props.innerHTML==null,"Directly setting property `innerHTML` is not permitted. "+"For more information, lookup documentation on `dangerouslySetInnerHTML`."):undefined;process.env.NODE_ENV!=="production"?warning(!props.contentEditable||props.children==null,"A component is `contentEditable` and contains `children` managed by "+"React. It is now your responsibility to guarantee that none of "+"those nodes are unexpectedly modified or duplicated. This is "+"probably not intentional."):undefined}!(props.style==null||typeof props.style==="object")?process.env.NODE_ENV!=="production"?invariant(false,"The `style` prop expects a mapping from style properties to values, "+"not a string. For example, style={{marginRight: spacing + 'em'}} when "+"using JSX.%s",getDeclarationErrorAddendum(component)):invariant(false):undefined}function enqueuePutListener(id,registrationName,listener,transaction){if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(registrationName!=="onScroll"||isEventSupported("scroll",true),"This browser doesn't support the `onScroll` event"):undefined}var container=ReactMount.findReactContainerForID(id);if(container){var doc=container.nodeType===ELEMENT_NODE_TYPE?container.ownerDocument:container;listenTo(registrationName,doc)}transaction.getReactMountReady().enqueue(putListener,{id:id,registrationName:registrationName,listener:listener})}function putListener(){var listenerToPut=this;ReactBrowserEventEmitter.putListener(listenerToPut.id,listenerToPut.registrationName,listenerToPut.listener)}var mediaEvents={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"};function trapBubbledEventsLocal(){var inst=this;!inst._rootNodeID?process.env.NODE_ENV!=="production"?invariant(false,"Must be mounted to trap events"):invariant(false):undefined;var node=ReactMount.getNode(inst._rootNodeID);!node?process.env.NODE_ENV!=="production"?invariant(false,"trapBubbledEvent(...): Requires node to be rendered."):invariant(false):undefined;switch(inst._tag){case"iframe":inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad,"load",node)];break;case"video":case"audio":inst._wrapperState.listeners=[];for(var event in mediaEvents){if(mediaEvents.hasOwnProperty(event)){inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes[event],mediaEvents[event],node))}}break;case"img":inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError,"error",node),ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad,"load",node)];break;case"form":inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topReset,"reset",node),ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit,"submit",node)];break}}function mountReadyInputWrapper(){ReactDOMInput.mountReadyWrapper(this)}function postUpdateSelectWrapper(){ReactDOMSelect.postUpdateWrapper(this)}var omittedCloseTags={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};var newlineEatingTags={listing:true,pre:true,textarea:true};var voidElementTags=assign({menuitem:true},omittedCloseTags);var VALID_TAG_REGEX=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/;var validatedTagCache={};var hasOwnProperty={}.hasOwnProperty;function validateDangerousTag(tag){if(!hasOwnProperty.call(validatedTagCache,tag)){!VALID_TAG_REGEX.test(tag)?process.env.NODE_ENV!=="production"?invariant(false,"Invalid tag: %s",tag):invariant(false):undefined;validatedTagCache[tag]=true}}function processChildContextDev(context,inst){context=assign({},context);var info=context[validateDOMNesting.ancestorInfoContextKey];context[validateDOMNesting.ancestorInfoContextKey]=validateDOMNesting.updatedAncestorInfo(info,inst._tag,inst);return context}function isCustomComponent(tagName,props){return tagName.indexOf("-")>=0||props.is!=null}function ReactDOMComponent(tag){validateDangerousTag(tag);this._tag=tag.toLowerCase();this._renderedChildren=null;this._previousStyle=null;this._previousStyleCopy=null;this._rootNodeID=null;this._wrapperState=null;this._topLevelWrapper=null;this._nodeWithLegacyProperties=null;if(process.env.NODE_ENV!=="production"){this._unprocessedContextDev=null;this._processedContextDev=null}}ReactDOMComponent.displayName="ReactDOMComponent";ReactDOMComponent.Mixin={construct:function(element){this._currentElement=element},mountComponent:function(rootID,transaction,context){this._rootNodeID=rootID;var props=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null};transaction.getReactMountReady().enqueue(trapBubbledEventsLocal,this);break;case"button":props=ReactDOMButton.getNativeProps(this,props,context);break;case"input":ReactDOMInput.mountWrapper(this,props,context);props=ReactDOMInput.getNativeProps(this,props,context);break;case"option":ReactDOMOption.mountWrapper(this,props,context);props=ReactDOMOption.getNativeProps(this,props,context);break;case"select":ReactDOMSelect.mountWrapper(this,props,context);props=ReactDOMSelect.getNativeProps(this,props,context);context=ReactDOMSelect.processChildContext(this,props,context);break;case"textarea":ReactDOMTextarea.mountWrapper(this,props,context);props=ReactDOMTextarea.getNativeProps(this,props,context);break}assertValidProps(this,props);if(process.env.NODE_ENV!=="production"){if(context[validateDOMNesting.ancestorInfoContextKey]){validateDOMNesting(this._tag,this,context[validateDOMNesting.ancestorInfoContextKey])}}if(process.env.NODE_ENV!=="production"){this._unprocessedContextDev=context;this._processedContextDev=processChildContextDev(context,this);context=this._processedContextDev}var mountImage;if(transaction.useCreateElement){var ownerDocument=context[ReactMount.ownerDocumentContextKey];var el=ownerDocument.createElement(this._currentElement.type);DOMPropertyOperations.setAttributeForID(el,this._rootNodeID);ReactMount.getID(el);this._updateDOMProperties({},props,transaction,el);this._createInitialChildren(transaction,props,context,el);mountImage=el}else{var tagOpen=this._createOpenTagMarkupAndPutListeners(transaction,props);var tagContent=this._createContentMarkup(transaction,props,context);if(!tagContent&&omittedCloseTags[this._tag]){mountImage=tagOpen+"/>"}else{mountImage=tagOpen+">"+tagContent+"</"+this._currentElement.type+">"}}switch(this._tag){case"input":transaction.getReactMountReady().enqueue(mountReadyInputWrapper,this);case"button":case"select":case"textarea":if(props.autoFocus){transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent,this)}break}return mountImage},_createOpenTagMarkupAndPutListeners:function(transaction,props){var ret="<"+this._currentElement.type;for(var propKey in props){if(!props.hasOwnProperty(propKey)){continue}var propValue=props[propKey];if(propValue==null){continue}if(registrationNameModules.hasOwnProperty(propKey)){if(propValue){enqueuePutListener(this._rootNodeID,propKey,propValue,transaction)}}else{if(propKey===STYLE){if(propValue){if(process.env.NODE_ENV!=="production"){this._previousStyle=propValue}propValue=this._previousStyleCopy=assign({},props.style)}propValue=CSSPropertyOperations.createMarkupForStyles(propValue)}var markup=null;if(this._tag!=null&&isCustomComponent(this._tag,props)){if(propKey!==CHILDREN){markup=DOMPropertyOperations.createMarkupForCustomAttribute(propKey,propValue)}}else{markup=DOMPropertyOperations.createMarkupForProperty(propKey,propValue)}if(markup){ret+=" "+markup}}}if(transaction.renderToStaticMarkup){return ret}var markupForID=DOMPropertyOperations.createMarkupForID(this._rootNodeID);return ret+" "+markupForID},_createContentMarkup:function(transaction,props,context){var ret="";var innerHTML=props.dangerouslySetInnerHTML;if(innerHTML!=null){if(innerHTML.__html!=null){ret=innerHTML.__html}}else{var contentToUse=CONTENT_TYPES[typeof props.children]?props.children:null;var childrenToUse=contentToUse!=null?null:props.children;if(contentToUse!=null){ret=escapeTextContentForBrowser(contentToUse)}else if(childrenToUse!=null){var mountImages=this.mountChildren(childrenToUse,transaction,context);ret=mountImages.join("")}}if(newlineEatingTags[this._tag]&&ret.charAt(0)==="\n"){return"\n"+ret}else{return ret}},_createInitialChildren:function(transaction,props,context,el){var innerHTML=props.dangerouslySetInnerHTML;if(innerHTML!=null){if(innerHTML.__html!=null){setInnerHTML(el,innerHTML.__html)}}else{var contentToUse=CONTENT_TYPES[typeof props.children]?props.children:null;var childrenToUse=contentToUse!=null?null:props.children;if(contentToUse!=null){setTextContent(el,contentToUse)}else if(childrenToUse!=null){var mountImages=this.mountChildren(childrenToUse,transaction,context);for(var i=0;i<mountImages.length;i++){el.appendChild(mountImages[i])}}}},receiveComponent:function(nextElement,transaction,context){var prevElement=this._currentElement;this._currentElement=nextElement;this.updateComponent(transaction,prevElement,nextElement,context)},updateComponent:function(transaction,prevElement,nextElement,context){var lastProps=prevElement.props;var nextProps=this._currentElement.props;switch(this._tag){case"button":lastProps=ReactDOMButton.getNativeProps(this,lastProps);nextProps=ReactDOMButton.getNativeProps(this,nextProps);break;case"input":ReactDOMInput.updateWrapper(this);lastProps=ReactDOMInput.getNativeProps(this,lastProps);nextProps=ReactDOMInput.getNativeProps(this,nextProps);break;case"option":lastProps=ReactDOMOption.getNativeProps(this,lastProps);nextProps=ReactDOMOption.getNativeProps(this,nextProps);break;case"select":lastProps=ReactDOMSelect.getNativeProps(this,lastProps);nextProps=ReactDOMSelect.getNativeProps(this,nextProps);break;case"textarea":ReactDOMTextarea.updateWrapper(this);lastProps=ReactDOMTextarea.getNativeProps(this,lastProps);nextProps=ReactDOMTextarea.getNativeProps(this,nextProps);break}if(process.env.NODE_ENV!=="production"){if(this._unprocessedContextDev!==context){this._unprocessedContextDev=context;this._processedContextDev=processChildContextDev(context,this)}context=this._processedContextDev}assertValidProps(this,nextProps);this._updateDOMProperties(lastProps,nextProps,transaction,null);this._updateDOMChildren(lastProps,nextProps,transaction,context);if(!canDefineProperty&&this._nodeWithLegacyProperties){this._nodeWithLegacyProperties.props=nextProps}if(this._tag==="select"){transaction.getReactMountReady().enqueue(postUpdateSelectWrapper,this)}},_updateDOMProperties:function(lastProps,nextProps,transaction,node){var propKey;var styleName;var styleUpdates;for(propKey in lastProps){if(nextProps.hasOwnProperty(propKey)||!lastProps.hasOwnProperty(propKey)){continue}if(propKey===STYLE){var lastStyle=this._previousStyleCopy;for(styleName in lastStyle){if(lastStyle.hasOwnProperty(styleName)){styleUpdates=styleUpdates||{};styleUpdates[styleName]=""}}this._previousStyleCopy=null}else if(registrationNameModules.hasOwnProperty(propKey)){if(lastProps[propKey]){deleteListener(this._rootNodeID,propKey)}}else if(DOMProperty.properties[propKey]||DOMProperty.isCustomAttribute(propKey)){if(!node){node=ReactMount.getNode(this._rootNodeID)}DOMPropertyOperations.deleteValueForProperty(node,propKey)}}for(propKey in nextProps){var nextProp=nextProps[propKey];var lastProp=propKey===STYLE?this._previousStyleCopy:lastProps[propKey];if(!nextProps.hasOwnProperty(propKey)||nextProp===lastProp){continue}if(propKey===STYLE){if(nextProp){if(process.env.NODE_ENV!=="production"){checkAndWarnForMutatedStyle(this._previousStyleCopy,this._previousStyle,this);this._previousStyle=nextProp}nextProp=this._previousStyleCopy=assign({},nextProp)}else{this._previousStyleCopy=null}if(lastProp){for(styleName in lastProp){if(lastProp.hasOwnProperty(styleName)&&(!nextProp||!nextProp.hasOwnProperty(styleName))){styleUpdates=styleUpdates||{};styleUpdates[styleName]=""}}for(styleName in nextProp){if(nextProp.hasOwnProperty(styleName)&&lastProp[styleName]!==nextProp[styleName]){styleUpdates=styleUpdates||{};styleUpdates[styleName]=nextProp[styleName]}}}else{styleUpdates=nextProp}}else if(registrationNameModules.hasOwnProperty(propKey)){if(nextProp){enqueuePutListener(this._rootNodeID,propKey,nextProp,transaction)}else if(lastProp){deleteListener(this._rootNodeID,propKey)}}else if(isCustomComponent(this._tag,nextProps)){if(!node){node=ReactMount.getNode(this._rootNodeID)}if(propKey===CHILDREN){nextProp=null}DOMPropertyOperations.setValueForAttribute(node,propKey,nextProp)}else if(DOMProperty.properties[propKey]||DOMProperty.isCustomAttribute(propKey)){if(!node){node=ReactMount.getNode(this._rootNodeID)}if(nextProp!=null){DOMPropertyOperations.setValueForProperty(node,propKey,nextProp)}else{DOMPropertyOperations.deleteValueForProperty(node,propKey)}}}if(styleUpdates){if(!node){node=ReactMount.getNode(this._rootNodeID)}CSSPropertyOperations.setValueForStyles(node,styleUpdates)}},_updateDOMChildren:function(lastProps,nextProps,transaction,context){var lastContent=CONTENT_TYPES[typeof lastProps.children]?lastProps.children:null;var nextContent=CONTENT_TYPES[typeof nextProps.children]?nextProps.children:null;var lastHtml=lastProps.dangerouslySetInnerHTML&&lastProps.dangerouslySetInnerHTML.__html;var nextHtml=nextProps.dangerouslySetInnerHTML&&nextProps.dangerouslySetInnerHTML.__html;var lastChildren=lastContent!=null?null:lastProps.children;var nextChildren=nextContent!=null?null:nextProps.children;var lastHasContentOrHtml=lastContent!=null||lastHtml!=null;var nextHasContentOrHtml=nextContent!=null||nextHtml!=null;if(lastChildren!=null&&nextChildren==null){this.updateChildren(null,transaction,context)}else if(lastHasContentOrHtml&&!nextHasContentOrHtml){this.updateTextContent("")}if(nextContent!=null){if(lastContent!==nextContent){this.updateTextContent(""+nextContent)}}else if(nextHtml!=null){if(lastHtml!==nextHtml){this.updateMarkup(""+nextHtml)}}else if(nextChildren!=null){this.updateChildren(nextChildren,transaction,context)}},unmountComponent:function(){switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":var listeners=this._wrapperState.listeners;if(listeners){for(var i=0;i<listeners.length;i++){listeners[i].remove()}}break;case"input":ReactDOMInput.unmountWrapper(this);break;case"html":case"head":case"body":true?process.env.NODE_ENV!=="production"?invariant(false,"<%s> tried to unmount. Because of cross-browser quirks it is "+"impossible to unmount some top-level components (eg <html>, "+"<head>, and <body>) reliably and efficiently. To fix this, have a "+"single top-level component that never unmounts render these "+"elements.",this._tag):invariant(false):undefined;break}this.unmountChildren();ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);this._rootNodeID=null;this._wrapperState=null;if(this._nodeWithLegacyProperties){var node=this._nodeWithLegacyProperties;node._reactInternalComponent=null;this._nodeWithLegacyProperties=null}},getPublicInstance:function(){if(!this._nodeWithLegacyProperties){var node=ReactMount.getNode(this._rootNodeID);node._reactInternalComponent=this;node.getDOMNode=legacyGetDOMNode;node.isMounted=legacyIsMounted;node.setState=legacySetStateEtc;node.replaceState=legacySetStateEtc;node.forceUpdate=legacySetStateEtc;node.setProps=legacySetProps;node.replaceProps=legacyReplaceProps;if(process.env.NODE_ENV!=="production"){if(canDefineProperty){Object.defineProperties(node,legacyPropsDescriptor)}else{node.props=this._currentElement.props}}else{node.props=this._currentElement.props}this._nodeWithLegacyProperties=node}return this._nodeWithLegacyProperties}};ReactPerf.measureMethods(ReactDOMComponent,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"});assign(ReactDOMComponent.prototype,ReactDOMComponent.Mixin,ReactMultiChild.Mixin);module.exports=ReactDOMComponent}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactElement=__webpack_require__(11);var ReactElementValidator=__webpack_require__(103);var mapObject=__webpack_require__(135);function createDOMFactory(tag){if(process.env.NODE_ENV!=="production"){return ReactElementValidator.createFactory(tag)}return ReactElement.createFactory(tag)}var ReactDOMFactories=mapObject({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul",var:"var",video:"video",wbr:"wbr",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"},createDOMFactory);module.exports=ReactDOMFactories}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactDOMIDOperations=__webpack_require__(72);var LinkedValueUtils=__webpack_require__(69);var ReactMount=__webpack_require__(9);var ReactUpdates=__webpack_require__(14);var assign=__webpack_require__(3);var invariant=__webpack_require__(2);var instancesByReactID={};function forceUpdateIfMounted(){if(this._rootNodeID){ReactDOMInput.updateWrapper(this)}}var ReactDOMInput={getNativeProps:function(inst,props,context){var value=LinkedValueUtils.getValue(props);var checked=LinkedValueUtils.getChecked(props);var nativeProps=assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:value!=null?value:inst._wrapperState.initialValue,checked:checked!=null?checked:inst._wrapperState.initialChecked,onChange:inst._wrapperState.onChange});return nativeProps},mountWrapper:function(inst,props){if(process.env.NODE_ENV!=="production"){LinkedValueUtils.checkPropTypes("input",props,inst._currentElement._owner)}var defaultValue=props.defaultValue;inst._wrapperState={initialChecked:props.defaultChecked||false,initialValue:defaultValue!=null?defaultValue:null,onChange:_handleChange.bind(inst)}},mountReadyWrapper:function(inst){instancesByReactID[inst._rootNodeID]=inst},unmountWrapper:function(inst){delete instancesByReactID[inst._rootNodeID]},updateWrapper:function(inst){var props=inst._currentElement.props;var checked=props.checked;if(checked!=null){ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID,"checked",checked||false)}var value=LinkedValueUtils.getValue(props);if(value!=null){ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID,"value",""+value)}}};function _handleChange(event){var props=this._currentElement.props;var returnValue=LinkedValueUtils.executeOnChange(props,event);ReactUpdates.asap(forceUpdateIfMounted,this);var name=props.name;if(props.type==="radio"&&name!=null){var rootNode=ReactMount.getNode(this._rootNodeID);var queryRoot=rootNode;while(queryRoot.parentNode){queryRoot=queryRoot.parentNode}var group=queryRoot.querySelectorAll("input[name="+JSON.stringify(""+name)+'][type="radio"]');for(var i=0;i<group.length;i++){var otherNode=group[i];if(otherNode===rootNode||otherNode.form!==rootNode.form){continue}var otherID=ReactMount.getID(otherNode);!otherID?process.env.NODE_ENV!=="production"?invariant(false,"ReactDOMInput: Mixing React and non-React radio inputs with the "+"same `name` is not supported."):invariant(false):undefined;var otherInstance=instancesByReactID[otherID];!otherInstance?process.env.NODE_ENV!=="production"?invariant(false,"ReactDOMInput: Unknown radio button ID %s.",otherID):invariant(false):undefined;ReactUpdates.asap(forceUpdateIfMounted,otherInstance)}}return returnValue}module.exports=ReactDOMInput}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactChildren=__webpack_require__(95);var ReactDOMSelect=__webpack_require__(99);var assign=__webpack_require__(3);var warning=__webpack_require__(4);var valueContextKey=ReactDOMSelect.valueContextKey;var ReactDOMOption={mountWrapper:function(inst,props,context){if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(props.selected==null,"Use the `defaultValue` or `value` props on <select> instead of "+"setting `selected` on <option>."):undefined}var selectValue=context[valueContextKey];var selected=null;if(selectValue!=null){selected=false;if(Array.isArray(selectValue)){for(var i=0;i<selectValue.length;i++){if(""+selectValue[i]===""+props.value){selected=true;break}}}else{selected=""+selectValue===""+props.value}}inst._wrapperState={selected:selected}},getNativeProps:function(inst,props,context){var nativeProps=assign({selected:undefined,children:undefined},props);if(inst._wrapperState.selected!=null){nativeProps.selected=inst._wrapperState.selected}var content="";ReactChildren.forEach(props.children,function(child){if(child==null){return}if(typeof child==="string"||typeof child==="number"){content+=child}else{process.env.NODE_ENV!=="production"?warning(false,"Only strings and numbers are supported as <option> children."):undefined}});if(content){nativeProps.children=content}return nativeProps}};module.exports=ReactDOMOption}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var ExecutionEnvironment=__webpack_require__(8);var getNodeForCharacterOffset=__webpack_require__(194);var getTextContentAccessor=__webpack_require__(117);function isCollapsed(anchorNode,anchorOffset,focusNode,focusOffset){return anchorNode===focusNode&&anchorOffset===focusOffset}function getIEOffsets(node){var selection=document.selection;var selectedRange=selection.createRange();var selectedLength=selectedRange.text.length;var fromStart=selectedRange.duplicate();fromStart.moveToElementText(node);fromStart.setEndPoint("EndToStart",selectedRange);var startOffset=fromStart.text.length;var endOffset=startOffset+selectedLength;return{start:startOffset,end:endOffset}}function getModernOffsets(node){var selection=window.getSelection&&window.getSelection();if(!selection||selection.rangeCount===0){return null}var anchorNode=selection.anchorNode;var anchorOffset=selection.anchorOffset;var focusNode=selection.focusNode;var focusOffset=selection.focusOffset;var currentRange=selection.getRangeAt(0);try{currentRange.startContainer.nodeType;currentRange.endContainer.nodeType}catch(e){return null}var isSelectionCollapsed=isCollapsed(selection.anchorNode,selection.anchorOffset,selection.focusNode,selection.focusOffset);var rangeLength=isSelectionCollapsed?0:currentRange.toString().length;var tempRange=currentRange.cloneRange();tempRange.selectNodeContents(node);tempRange.setEnd(currentRange.startContainer,currentRange.startOffset);var isTempRangeCollapsed=isCollapsed(tempRange.startContainer,tempRange.startOffset,tempRange.endContainer,tempRange.endOffset);var start=isTempRangeCollapsed?0:tempRange.toString().length;var end=start+rangeLength;var detectionRange=document.createRange();detectionRange.setStart(anchorNode,anchorOffset);detectionRange.setEnd(focusNode,focusOffset);var isBackward=detectionRange.collapsed;return{start:isBackward?end:start,end:isBackward?start:end}}function setIEOffsets(node,offsets){var range=document.selection.createRange().duplicate();var start,end;if(typeof offsets.end==="undefined"){start=offsets.start;end=start}else if(offsets.start>offsets.end){start=offsets.end;end=offsets.start}else{start=offsets.start;end=offsets.end}range.moveToElementText(node);range.moveStart("character",start);range.setEndPoint("EndToStart",range);range.moveEnd("character",end-start);range.select()}function setModernOffsets(node,offsets){if(!window.getSelection){return}var selection=window.getSelection();var length=node[getTextContentAccessor()].length;var start=Math.min(offsets.start,length);var end=typeof offsets.end==="undefined"?start:Math.min(offsets.end,length);if(!selection.extend&&start>end){var temp=end;end=start;start=temp}var startMarker=getNodeForCharacterOffset(node,start);var endMarker=getNodeForCharacterOffset(node,end);if(startMarker&&endMarker){var range=document.createRange();range.setStart(startMarker.node,startMarker.offset);selection.removeAllRanges();if(start>end){selection.addRange(range);selection.extend(endMarker.node,endMarker.offset)}else{range.setEnd(endMarker.node,endMarker.offset);selection.addRange(range)}}}var useIEOffsets=ExecutionEnvironment.canUseDOM&&"selection"in document&&!("getSelection"in window);var ReactDOMSelection={getOffsets:useIEOffsets?getIEOffsets:getModernOffsets,setOffsets:useIEOffsets?setIEOffsets:setModernOffsets};module.exports=ReactDOMSelection},function(module,exports,__webpack_require__){"use strict";var ReactDefaultInjection=__webpack_require__(102);var ReactServerRendering=__webpack_require__(175);var ReactVersion=__webpack_require__(74);ReactDefaultInjection.inject();var ReactDOMServer={renderToString:ReactServerRendering.renderToString,renderToStaticMarkup:ReactServerRendering.renderToStaticMarkup,version:ReactVersion};module.exports=ReactDOMServer},function(module,exports,__webpack_require__){"use strict";(function(process){var LinkedValueUtils=__webpack_require__(69);var ReactDOMIDOperations=__webpack_require__(72);var ReactUpdates=__webpack_require__(14);var assign=__webpack_require__(3);var invariant=__webpack_require__(2);var warning=__webpack_require__(4);function forceUpdateIfMounted(){if(this._rootNodeID){ReactDOMTextarea.updateWrapper(this)}}var ReactDOMTextarea={getNativeProps:function(inst,props,context){!(props.dangerouslySetInnerHTML==null)?process.env.NODE_ENV!=="production"?invariant(false,"`dangerouslySetInnerHTML` does not make sense on <textarea>."):invariant(false):undefined;var nativeProps=assign({},props,{defaultValue:undefined,value:undefined,children:inst._wrapperState.initialValue,onChange:inst._wrapperState.onChange});return nativeProps},mountWrapper:function(inst,props){if(process.env.NODE_ENV!=="production"){LinkedValueUtils.checkPropTypes("textarea",props,inst._currentElement._owner)}var defaultValue=props.defaultValue;var children=props.children;if(children!=null){if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(false,"Use the `defaultValue` or `value` props instead of setting "+"children on <textarea>."):undefined}!(defaultValue==null)?process.env.NODE_ENV!=="production"?invariant(false,"If you supply `defaultValue` on a <textarea>, do not pass children."):invariant(false):undefined;if(Array.isArray(children)){!(children.length<=1)?process.env.NODE_ENV!=="production"?invariant(false,"<textarea> can only have at most one child."):invariant(false):undefined;children=children[0]}defaultValue=""+children}if(defaultValue==null){defaultValue=""}var value=LinkedValueUtils.getValue(props);inst._wrapperState={initialValue:""+(value!=null?value:defaultValue),onChange:_handleChange.bind(inst)}},updateWrapper:function(inst){var props=inst._currentElement.props;var value=LinkedValueUtils.getValue(props);if(value!=null){ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID,"value",""+value)}}};function _handleChange(event){var props=this._currentElement.props;var returnValue=LinkedValueUtils.executeOnChange(props,event);ReactUpdates.asap(forceUpdateIfMounted,this);return returnValue}module.exports=ReactDOMTextarea}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var DOMProperty=__webpack_require__(21);var ReactDefaultPerfAnalysis=__webpack_require__(165);var ReactMount=__webpack_require__(9);var ReactPerf=__webpack_require__(12);var performanceNow=__webpack_require__(138);function roundFloat(val){return Math.floor(val*100)/100}function addValue(obj,key,val){obj[key]=(obj[key]||0)+val}var ReactDefaultPerf={_allMeasurements:[],_mountStack:[0],_injected:false,start:function(){if(!ReactDefaultPerf._injected){ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure)}ReactDefaultPerf._allMeasurements.length=0;ReactPerf.enableMeasure=true},stop:function(){ReactPerf.enableMeasure=false},getLastMeasurements:function(){return ReactDefaultPerf._allMeasurements},printExclusive:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;var summary=ReactDefaultPerfAnalysis.getExclusiveSummary(measurements);console.table(summary.map(function(item){return{"Component class name":item.componentName,"Total inclusive time (ms)":roundFloat(item.inclusive),"Exclusive mount time (ms)":roundFloat(item.exclusive),"Exclusive render time (ms)":roundFloat(item.render),"Mount time per instance (ms)":roundFloat(item.exclusive/item.count),"Render time per instance (ms)":roundFloat(item.render/item.count),Instances:item.count}}))},printInclusive:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;var summary=ReactDefaultPerfAnalysis.getInclusiveSummary(measurements);console.table(summary.map(function(item){return{"Owner > component":item.componentName,"Inclusive time (ms)":roundFloat(item.time),Instances:item.count}}));console.log("Total time:",ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(measurements){var summary=ReactDefaultPerfAnalysis.getInclusiveSummary(measurements,true);return summary.map(function(item){return{"Owner > component":item.componentName,"Wasted time (ms)":item.time,Instances:item.count}})},printWasted:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements));console.log("Total time:",ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2)+" ms")},printDOM:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;var summary=ReactDefaultPerfAnalysis.getDOMSummary(measurements);console.table(summary.map(function(item){var result={};result[DOMProperty.ID_ATTRIBUTE_NAME]=item.id;result.type=item.type;result.args=JSON.stringify(item.args);return result}));console.log("Total time:",ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2)+" ms")},_recordWrite:function(id,fnName,totalTime,args){var writes=ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length-1].writes;writes[id]=writes[id]||[];writes[id].push({type:fnName,time:totalTime,args:args})},measure:function(moduleName,fnName,func){return function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}var totalTime;var rv;var start;if(fnName==="_renderNewRootComponent"||fnName==="flushBatchedUpdates"){ReactDefaultPerf._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0,created:{}});start=performanceNow();rv=func.apply(this,args);ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length-1].totalTime=performanceNow()-start;return rv}else if(fnName==="_mountImageIntoNode"||moduleName==="ReactBrowserEventEmitter"||moduleName==="ReactDOMIDOperations"||moduleName==="CSSPropertyOperations"||moduleName==="DOMChildrenOperations"||moduleName==="DOMPropertyOperations"){start=performanceNow();rv=func.apply(this,args);totalTime=performanceNow()-start;if(fnName==="_mountImageIntoNode"){var mountID=ReactMount.getID(args[1]);ReactDefaultPerf._recordWrite(mountID,fnName,totalTime,args[0])}else if(fnName==="dangerouslyProcessChildrenUpdates"){args[0].forEach(function(update){var writeArgs={};if(update.fromIndex!==null){writeArgs.fromIndex=update.fromIndex}if(update.toIndex!==null){writeArgs.toIndex=update.toIndex}if(update.textContent!==null){writeArgs.textContent=update.textContent}if(update.markupIndex!==null){writeArgs.markup=args[1][update.markupIndex]}ReactDefaultPerf._recordWrite(update.parentID,update.type,totalTime,writeArgs)})}else{var id=args[0];if(typeof id==="object"){id=ReactMount.getID(args[0])}ReactDefaultPerf._recordWrite(id,fnName,totalTime,Array.prototype.slice.call(args,1))}return rv}else if(moduleName==="ReactCompositeComponent"&&(fnName==="mountComponent"||fnName==="updateComponent"||fnName==="_renderValidatedComponent")){if(this._currentElement.type===ReactMount.TopLevelWrapper){return func.apply(this,args)}var rootNodeID=fnName==="mountComponent"?args[0]:this._rootNodeID;var isRender=fnName==="_renderValidatedComponent";var isMount=fnName==="mountComponent";var mountStack=ReactDefaultPerf._mountStack;var entry=ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length-1];if(isRender){addValue(entry.counts,rootNodeID,1)}else if(isMount){entry.created[rootNodeID]=true;mountStack.push(0)}start=performanceNow();rv=func.apply(this,args);totalTime=performanceNow()-start;if(isRender){addValue(entry.render,rootNodeID,totalTime)}else if(isMount){var subMountTime=mountStack.pop();mountStack[mountStack.length-1]+=totalTime;addValue(entry.exclusive,rootNodeID,totalTime-subMountTime);addValue(entry.inclusive,rootNodeID,totalTime)}else{addValue(entry.inclusive,rootNodeID,totalTime)}entry.displayNames[rootNodeID]={current:this.getName(),owner:this._currentElement._owner?this._currentElement._owner.getName():"<root>"};return rv}else{return func.apply(this,args)}}}};module.exports=ReactDefaultPerf},function(module,exports,__webpack_require__){"use strict";var assign=__webpack_require__(3);var DONT_CARE_THRESHOLD=1.2;var DOM_OPERATION_TYPES={_mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",SET_MARKUP:"set innerHTML",TEXT_CONTENT:"set textContent",setValueForProperty:"update attribute",setValueForAttribute:"update attribute",deleteValueForProperty:"remove attribute",setValueForStyles:"update styles",replaceNodeWithMarkup:"replace",updateTextContent:"set textContent"};function getTotalTime(measurements){var totalTime=0;for(var i=0;i<measurements.length;i++){var measurement=measurements[i];totalTime+=measurement.totalTime}return totalTime}function getDOMSummary(measurements){var items=[];measurements.forEach(function(measurement){Object.keys(measurement.writes).forEach(function(id){measurement.writes[id].forEach(function(write){items.push({id:id,type:DOM_OPERATION_TYPES[write.type]||write.type,args:write.args})})})});return items}function getExclusiveSummary(measurements){var candidates={};var displayName;for(var i=0;i<measurements.length;i++){var measurement=measurements[i];var allIDs=assign({},measurement.exclusive,measurement.inclusive);for(var id in allIDs){displayName=measurement.displayNames[id].current;candidates[displayName]=candidates[displayName]||{componentName:displayName,inclusive:0,exclusive:0,render:0,count:0};if(measurement.render[id]){candidates[displayName].render+=measurement.render[id]}if(measurement.exclusive[id]){candidates[displayName].exclusive+=measurement.exclusive[id]}if(measurement.inclusive[id]){candidates[displayName].inclusive+=measurement.inclusive[id]}if(measurement.counts[id]){candidates[displayName].count+=measurement.counts[id]}}}var arr=[];for(displayName in candidates){if(candidates[displayName].exclusive>=DONT_CARE_THRESHOLD){arr.push(candidates[displayName])}}arr.sort(function(a,b){return b.exclusive-a.exclusive});return arr}function getInclusiveSummary(measurements,onlyClean){var candidates={};var inclusiveKey;for(var i=0;i<measurements.length;i++){var measurement=measurements[i];var allIDs=assign({},measurement.exclusive,measurement.inclusive);var cleanComponents;if(onlyClean){cleanComponents=getUnchangedComponents(measurement)}for(var id in allIDs){if(onlyClean&&!cleanComponents[id]){continue}var displayName=measurement.displayNames[id];inclusiveKey=displayName.owner+" > "+displayName.current;candidates[inclusiveKey]=candidates[inclusiveKey]||{componentName:inclusiveKey,time:0,count:0};if(measurement.inclusive[id]){candidates[inclusiveKey].time+=measurement.inclusive[id]}if(measurement.counts[id]){candidates[inclusiveKey].count+=measurement.counts[id]}}}var arr=[];for(inclusiveKey in candidates){if(candidates[inclusiveKey].time>=DONT_CARE_THRESHOLD){arr.push(candidates[inclusiveKey])}}arr.sort(function(a,b){return b.time-a.time});return arr}function getUnchangedComponents(measurement){var cleanComponents={};var dirtyLeafIDs=Object.keys(measurement.writes);var allIDs=assign({},measurement.exclusive,measurement.inclusive);for(var id in allIDs){var isDirty=false;for(var i=0;i<dirtyLeafIDs.length;i++){if(dirtyLeafIDs[i].indexOf(id)===0){isDirty=true;break}}if(measurement.created[id]){isDirty=true}if(!isDirty&&measurement.counts[id]>0){cleanComponents[id]=true}}return cleanComponents}var ReactDefaultPerfAnalysis={getExclusiveSummary:getExclusiveSummary,getInclusiveSummary:getInclusiveSummary,getDOMSummary:getDOMSummary,getTotalTime:getTotalTime};module.exports=ReactDefaultPerfAnalysis},function(module,exports,__webpack_require__){"use strict";var EventPluginHub=__webpack_require__(32);function runEventQueueInBatch(events){EventPluginHub.enqueueEvents(events);EventPluginHub.processEventQueue(false)}var ReactEventEmitterMixin={handleTopLevel:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){var events=EventPluginHub.extractEvents(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget);runEventQueueInBatch(events)}};module.exports=ReactEventEmitterMixin},function(module,exports,__webpack_require__){"use strict";var EventListener=__webpack_require__(86);var ExecutionEnvironment=__webpack_require__(8);var PooledClass=__webpack_require__(20);var ReactInstanceHandles=__webpack_require__(24);var ReactMount=__webpack_require__(9);var ReactUpdates=__webpack_require__(14);var assign=__webpack_require__(3);var getEventTarget=__webpack_require__(78);var getUnboundedScrollPosition=__webpack_require__(130);var DOCUMENT_FRAGMENT_NODE_TYPE=11;function findParent(node){var nodeID=ReactMount.getID(node);var rootID=ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);var container=ReactMount.findReactContainerForID(rootID);var parent=ReactMount.getFirstReactDOM(container);return parent}function TopLevelCallbackBookKeeping(topLevelType,nativeEvent){this.topLevelType=topLevelType;this.nativeEvent=nativeEvent;this.ancestors=[]}assign(TopLevelCallbackBookKeeping.prototype,{destructor:function(){this.topLevelType=null;this.nativeEvent=null;this.ancestors.length=0}});PooledClass.addPoolingTo(TopLevelCallbackBookKeeping,PooledClass.twoArgumentPooler);function handleTopLevelImpl(bookKeeping){void handleTopLevelWithPath;handleTopLevelWithoutPath(bookKeeping)}function handleTopLevelWithoutPath(bookKeeping){var topLevelTarget=ReactMount.getFirstReactDOM(getEventTarget(bookKeeping.nativeEvent))||window;var ancestor=topLevelTarget;while(ancestor){bookKeeping.ancestors.push(ancestor);ancestor=findParent(ancestor)}for(var i=0;i<bookKeeping.ancestors.length;i++){topLevelTarget=bookKeeping.ancestors[i];var topLevelTargetID=ReactMount.getID(topLevelTarget)||"";ReactEventListener._handleTopLevel(bookKeeping.topLevelType,topLevelTarget,topLevelTargetID,bookKeeping.nativeEvent,getEventTarget(bookKeeping.nativeEvent))}}function handleTopLevelWithPath(bookKeeping){var path=bookKeeping.nativeEvent.path;var currentNativeTarget=path[0];var eventsFired=0;for(var i=0;i<path.length;i++){var currentPathElement=path[i];if(currentPathElement.nodeType===DOCUMENT_FRAGMENT_NODE_TYPE){currentNativeTarget=path[i+1]}var reactParent=ReactMount.getFirstReactDOM(currentPathElement);if(reactParent===currentPathElement){var currentPathElementID=ReactMount.getID(currentPathElement);var newRootID=ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);bookKeeping.ancestors.push(currentPathElement);var topLevelTargetID=ReactMount.getID(currentPathElement)||"";eventsFired++;ReactEventListener._handleTopLevel(bookKeeping.topLevelType,currentPathElement,topLevelTargetID,bookKeeping.nativeEvent,currentNativeTarget);while(currentPathElementID!==newRootID){i++;currentPathElement=path[i];currentPathElementID=ReactMount.getID(currentPathElement)}}}if(eventsFired===0){ReactEventListener._handleTopLevel(bookKeeping.topLevelType,window,"",bookKeeping.nativeEvent,getEventTarget(bookKeeping.nativeEvent))}}function scrollValueMonitor(cb){var scrollPosition=getUnboundedScrollPosition(window);cb(scrollPosition)}var ReactEventListener={_enabled:true,_handleTopLevel:null,WINDOW_HANDLE:ExecutionEnvironment.canUseDOM?window:null,setHandleTopLevel:function(handleTopLevel){ReactEventListener._handleTopLevel=handleTopLevel},setEnabled:function(enabled){ReactEventListener._enabled=!!enabled},isEnabled:function(){return ReactEventListener._enabled},trapBubbledEvent:function(topLevelType,handlerBaseName,handle){var element=handle;if(!element){return null}return EventListener.listen(element,handlerBaseName,ReactEventListener.dispatchEvent.bind(null,topLevelType))},trapCapturedEvent:function(topLevelType,handlerBaseName,handle){var element=handle;if(!element){return null}return EventListener.capture(element,handlerBaseName,ReactEventListener.dispatchEvent.bind(null,topLevelType))},monitorScrollValue:function(refresh){var callback=scrollValueMonitor.bind(null,refresh);EventListener.listen(window,"scroll",callback)},dispatchEvent:function(topLevelType,nativeEvent){if(!ReactEventListener._enabled){return}var bookKeeping=TopLevelCallbackBookKeeping.getPooled(topLevelType,nativeEvent);try{ReactUpdates.batchedUpdates(handleTopLevelImpl,bookKeeping)}finally{TopLevelCallbackBookKeeping.release(bookKeeping)}}};module.exports=ReactEventListener},function(module,exports,__webpack_require__){"use strict";var DOMProperty=__webpack_require__(21);var EventPluginHub=__webpack_require__(32);var ReactComponentEnvironment=__webpack_require__(71);var ReactClass=__webpack_require__(96);var ReactEmptyComponent=__webpack_require__(104);var ReactBrowserEventEmitter=__webpack_require__(37);var ReactNativeComponent=__webpack_require__(110);var ReactPerf=__webpack_require__(12);var ReactRootIndex=__webpack_require__(113);var ReactUpdates=__webpack_require__(14);var ReactInjection={Component:ReactComponentEnvironment.injection,Class:ReactClass.injection,DOMProperty:DOMProperty.injection,EmptyComponent:ReactEmptyComponent.injection,EventPluginHub:EventPluginHub.injection,EventEmitter:ReactBrowserEventEmitter.injection,NativeComponent:ReactNativeComponent.injection,Perf:ReactPerf.injection,RootIndex:ReactRootIndex.injection,Updates:ReactUpdates.injection};module.exports=ReactInjection},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactChildren=__webpack_require__(95);var ReactComponent=__webpack_require__(97);var ReactClass=__webpack_require__(96);var ReactDOMFactories=__webpack_require__(158);var ReactElement=__webpack_require__(11);var ReactElementValidator=__webpack_require__(103);var ReactPropTypes=__webpack_require__(112);var ReactVersion=__webpack_require__(74);var assign=__webpack_require__(3);var onlyChild=__webpack_require__(195);var createElement=ReactElement.createElement;var createFactory=ReactElement.createFactory;var cloneElement=ReactElement.cloneElement;if(process.env.NODE_ENV!=="production"){createElement=ReactElementValidator.createElement;createFactory=ReactElementValidator.createFactory;cloneElement=ReactElementValidator.cloneElement}var React={Children:{map:ReactChildren.map,forEach:ReactChildren.forEach,count:ReactChildren.count,toArray:ReactChildren.toArray,only:onlyChild},Component:ReactComponent,createElement:createElement,cloneElement:cloneElement,isValidElement:ReactElement.isValidElement,PropTypes:ReactPropTypes,createClass:ReactClass.createClass,createFactory:createFactory,createMixin:function(mixin){return mixin},DOM:ReactDOMFactories,version:ReactVersion,__spread:assign};module.exports=React}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactComponentEnvironment=__webpack_require__(71);var ReactMultiChildUpdateTypes=__webpack_require__(109);var ReactCurrentOwner=__webpack_require__(18);var ReactReconciler=__webpack_require__(22);var ReactChildReconciler=__webpack_require__(153);var flattenChildren=__webpack_require__(192);var updateDepth=0;var updateQueue=[];var markupQueue=[];function enqueueInsertMarkup(parentID,markup,toIndex){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.INSERT_MARKUP,markupIndex:markupQueue.push(markup)-1,content:null,fromIndex:null,toIndex:toIndex})}function enqueueMove(parentID,fromIndex,toIndex){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.MOVE_EXISTING,markupIndex:null,content:null,fromIndex:fromIndex,toIndex:toIndex})}function enqueueRemove(parentID,fromIndex){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.REMOVE_NODE,markupIndex:null,content:null,fromIndex:fromIndex,toIndex:null})}function enqueueSetMarkup(parentID,markup){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.SET_MARKUP,markupIndex:null,content:markup,fromIndex:null,toIndex:null})}function enqueueTextContent(parentID,textContent){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.TEXT_CONTENT,markupIndex:null,content:textContent,fromIndex:null,toIndex:null})}function processQueue(){if(updateQueue.length){ReactComponentEnvironment.processChildrenUpdates(updateQueue,markupQueue);clearQueue()}}function clearQueue(){updateQueue.length=0;markupQueue.length=0}var ReactMultiChild={Mixin:{_reconcilerInstantiateChildren:function(nestedChildren,transaction,context){if(process.env.NODE_ENV!=="production"){if(this._currentElement){try{ReactCurrentOwner.current=this._currentElement._owner;return ReactChildReconciler.instantiateChildren(nestedChildren,transaction,context)}finally{ReactCurrentOwner.current=null}}}return ReactChildReconciler.instantiateChildren(nestedChildren,transaction,context)},_reconcilerUpdateChildren:function(prevChildren,nextNestedChildrenElements,transaction,context){var nextChildren;if(process.env.NODE_ENV!=="production"){if(this._currentElement){try{ReactCurrentOwner.current=this._currentElement._owner;nextChildren=flattenChildren(nextNestedChildrenElements)}finally{ReactCurrentOwner.current=null}return ReactChildReconciler.updateChildren(prevChildren,nextChildren,transaction,context)}}nextChildren=flattenChildren(nextNestedChildrenElements);return ReactChildReconciler.updateChildren(prevChildren,nextChildren,transaction,context)},mountChildren:function(nestedChildren,transaction,context){var children=this._reconcilerInstantiateChildren(nestedChildren,transaction,context);this._renderedChildren=children;var mountImages=[];var index=0;for(var name in children){if(children.hasOwnProperty(name)){var child=children[name];var rootID=this._rootNodeID+name;var mountImage=ReactReconciler.mountComponent(child,rootID,transaction,context);child._mountIndex=index++;mountImages.push(mountImage)}}return mountImages},updateTextContent:function(nextContent){updateDepth++;var errorThrown=true;try{var prevChildren=this._renderedChildren;ReactChildReconciler.unmountChildren(prevChildren);for(var name in prevChildren){if(prevChildren.hasOwnProperty(name)){this._unmountChild(prevChildren[name])}}this.setTextContent(nextContent);errorThrown=false}finally{updateDepth--;if(!updateDepth){if(errorThrown){clearQueue()}else{processQueue()}}}},updateMarkup:function(nextMarkup){updateDepth++;var errorThrown=true;try{var prevChildren=this._renderedChildren;ReactChildReconciler.unmountChildren(prevChildren);for(var name in prevChildren){if(prevChildren.hasOwnProperty(name)){this._unmountChildByName(prevChildren[name],name)}}this.setMarkup(nextMarkup);errorThrown=false}finally{updateDepth--;if(!updateDepth){if(errorThrown){clearQueue()}else{processQueue()}}}},updateChildren:function(nextNestedChildrenElements,transaction,context){updateDepth++;var errorThrown=true;try{this._updateChildren(nextNestedChildrenElements,transaction,context);errorThrown=false}finally{updateDepth--;if(!updateDepth){if(errorThrown){clearQueue()}else{processQueue()}}}},_updateChildren:function(nextNestedChildrenElements,transaction,context){var prevChildren=this._renderedChildren;var nextChildren=this._reconcilerUpdateChildren(prevChildren,nextNestedChildrenElements,transaction,context);this._renderedChildren=nextChildren;if(!nextChildren&&!prevChildren){return}var name;var lastIndex=0;var nextIndex=0;for(name in nextChildren){if(!nextChildren.hasOwnProperty(name)){continue}var prevChild=prevChildren&&prevChildren[name];var nextChild=nextChildren[name];if(prevChild===nextChild){this.moveChild(prevChild,nextIndex,lastIndex);lastIndex=Math.max(prevChild._mountIndex,lastIndex);prevChild._mountIndex=nextIndex }else{if(prevChild){lastIndex=Math.max(prevChild._mountIndex,lastIndex);this._unmountChild(prevChild)}this._mountChildByNameAtIndex(nextChild,name,nextIndex,transaction,context)}nextIndex++}for(name in prevChildren){if(prevChildren.hasOwnProperty(name)&&!(nextChildren&&nextChildren.hasOwnProperty(name))){this._unmountChild(prevChildren[name])}}},unmountChildren:function(){var renderedChildren=this._renderedChildren;ReactChildReconciler.unmountChildren(renderedChildren);this._renderedChildren=null},moveChild:function(child,toIndex,lastIndex){if(child._mountIndex<lastIndex){enqueueMove(this._rootNodeID,child._mountIndex,toIndex)}},createChild:function(child,mountImage){enqueueInsertMarkup(this._rootNodeID,mountImage,child._mountIndex)},removeChild:function(child){enqueueRemove(this._rootNodeID,child._mountIndex)},setTextContent:function(textContent){enqueueTextContent(this._rootNodeID,textContent)},setMarkup:function(markup){enqueueSetMarkup(this._rootNodeID,markup)},_mountChildByNameAtIndex:function(child,name,index,transaction,context){var rootID=this._rootNodeID+name;var mountImage=ReactReconciler.mountComponent(child,rootID,transaction,context);child._mountIndex=index;this.createChild(child,mountImage)},_unmountChild:function(child){this.removeChild(child);child._mountIndex=null}}};module.exports=ReactMultiChild}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var invariant=__webpack_require__(2);var ReactOwner={isValidOwner:function(object){return!!(object&&typeof object.attachRef==="function"&&typeof object.detachRef==="function")},addComponentAsRefTo:function(component,ref,owner){!ReactOwner.isValidOwner(owner)?process.env.NODE_ENV!=="production"?invariant(false,"addComponentAsRefTo(...): Only a ReactOwner can have refs. You might "+"be adding a ref to a component that was not created inside a component's "+"`render` method, or you have multiple copies of React loaded "+"(details: https://fb.me/react-refs-must-have-owner)."):invariant(false):undefined;owner.attachRef(ref,component)},removeComponentAsRefFrom:function(component,ref,owner){!ReactOwner.isValidOwner(owner)?process.env.NODE_ENV!=="production"?invariant(false,"removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might "+"be removing a ref to a component that was not created inside a component's "+"`render` method, or you have multiple copies of React loaded "+"(details: https://fb.me/react-refs-must-have-owner)."):invariant(false):undefined;if(owner.getPublicInstance().refs[ref]===component.getPublicInstance()){owner.detachRef(ref)}}};module.exports=ReactOwner}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var CallbackQueue=__webpack_require__(67);var PooledClass=__webpack_require__(20);var ReactBrowserEventEmitter=__webpack_require__(37);var ReactDOMFeatureFlags=__webpack_require__(98);var ReactInputSelection=__webpack_require__(107);var Transaction=__webpack_require__(41);var assign=__webpack_require__(3);var SELECTION_RESTORATION={initialize:ReactInputSelection.getSelectionInformation,close:ReactInputSelection.restoreSelection};var EVENT_SUPPRESSION={initialize:function(){var currentlyEnabled=ReactBrowserEventEmitter.isEnabled();ReactBrowserEventEmitter.setEnabled(false);return currentlyEnabled},close:function(previouslyEnabled){ReactBrowserEventEmitter.setEnabled(previouslyEnabled)}};var ON_DOM_READY_QUEUEING={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}};var TRANSACTION_WRAPPERS=[SELECTION_RESTORATION,EVENT_SUPPRESSION,ON_DOM_READY_QUEUEING];function ReactReconcileTransaction(forceHTML){this.reinitializeTransaction();this.renderToStaticMarkup=false;this.reactMountReady=CallbackQueue.getPooled(null);this.useCreateElement=!forceHTML&&ReactDOMFeatureFlags.useCreateElement}var Mixin={getTransactionWrappers:function(){return TRANSACTION_WRAPPERS},getReactMountReady:function(){return this.reactMountReady},destructor:function(){CallbackQueue.release(this.reactMountReady);this.reactMountReady=null}};assign(ReactReconcileTransaction.prototype,Transaction.Mixin,Mixin);PooledClass.addPoolingTo(ReactReconcileTransaction);module.exports=ReactReconcileTransaction},function(module,exports,__webpack_require__){"use strict";var ReactOwner=__webpack_require__(171);var ReactRef={};function attachRef(ref,component,owner){if(typeof ref==="function"){ref(component.getPublicInstance())}else{ReactOwner.addComponentAsRefTo(component,ref,owner)}}function detachRef(ref,component,owner){if(typeof ref==="function"){ref(null)}else{ReactOwner.removeComponentAsRefFrom(component,ref,owner)}}ReactRef.attachRefs=function(instance,element){if(element===null||element===false){return}var ref=element.ref;if(ref!=null){attachRef(ref,instance,element._owner)}};ReactRef.shouldUpdateRefs=function(prevElement,nextElement){var prevEmpty=prevElement===null||prevElement===false;var nextEmpty=nextElement===null||nextElement===false;return prevEmpty||nextEmpty||nextElement._owner!==prevElement._owner||nextElement.ref!==prevElement.ref};ReactRef.detachRefs=function(instance,element){if(element===null||element===false){return}var ref=element.ref;if(ref!=null){detachRef(ref,instance,element._owner)}};module.exports=ReactRef},function(module,exports,__webpack_require__){"use strict";var ReactServerBatchingStrategy={isBatchingUpdates:false,batchedUpdates:function(callback){}};module.exports=ReactServerBatchingStrategy},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactDefaultBatchingStrategy=__webpack_require__(101);var ReactElement=__webpack_require__(11);var ReactInstanceHandles=__webpack_require__(24);var ReactMarkupChecksum=__webpack_require__(108);var ReactServerBatchingStrategy=__webpack_require__(174);var ReactServerRenderingTransaction=__webpack_require__(176);var ReactUpdates=__webpack_require__(14);var emptyObject=__webpack_require__(31);var instantiateReactComponent=__webpack_require__(80);var invariant=__webpack_require__(2);function renderToString(element){!ReactElement.isValidElement(element)?process.env.NODE_ENV!=="production"?invariant(false,"renderToString(): You must pass a valid ReactElement."):invariant(false):undefined;var transaction;try{ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);var id=ReactInstanceHandles.createReactRootID();transaction=ReactServerRenderingTransaction.getPooled(false);return transaction.perform(function(){var componentInstance=instantiateReactComponent(element,null);var markup=componentInstance.mountComponent(id,transaction,emptyObject);return ReactMarkupChecksum.addChecksumToMarkup(markup)},null)}finally{ReactServerRenderingTransaction.release(transaction);ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy)}}function renderToStaticMarkup(element){!ReactElement.isValidElement(element)?process.env.NODE_ENV!=="production"?invariant(false,"renderToStaticMarkup(): You must pass a valid ReactElement."):invariant(false):undefined;var transaction;try{ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);var id=ReactInstanceHandles.createReactRootID();transaction=ReactServerRenderingTransaction.getPooled(true);return transaction.perform(function(){var componentInstance=instantiateReactComponent(element,null);return componentInstance.mountComponent(id,transaction,emptyObject)},null)}finally{ReactServerRenderingTransaction.release(transaction);ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy)}}module.exports={renderToString:renderToString,renderToStaticMarkup:renderToStaticMarkup}}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var PooledClass=__webpack_require__(20);var CallbackQueue=__webpack_require__(67);var Transaction=__webpack_require__(41);var assign=__webpack_require__(3);var emptyFunction=__webpack_require__(15);var ON_DOM_READY_QUEUEING={initialize:function(){this.reactMountReady.reset()},close:emptyFunction};var TRANSACTION_WRAPPERS=[ON_DOM_READY_QUEUEING];function ReactServerRenderingTransaction(renderToStaticMarkup){this.reinitializeTransaction();this.renderToStaticMarkup=renderToStaticMarkup;this.reactMountReady=CallbackQueue.getPooled(null);this.useCreateElement=false}var Mixin={getTransactionWrappers:function(){return TRANSACTION_WRAPPERS},getReactMountReady:function(){return this.reactMountReady},destructor:function(){CallbackQueue.release(this.reactMountReady);this.reactMountReady=null}};assign(ReactServerRenderingTransaction.prototype,Transaction.Mixin,Mixin);PooledClass.addPoolingTo(ReactServerRenderingTransaction);module.exports=ReactServerRenderingTransaction},function(module,exports,__webpack_require__){"use strict";var DOMProperty=__webpack_require__(21);var MUST_USE_ATTRIBUTE=DOMProperty.injection.MUST_USE_ATTRIBUTE;var NS={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};var SVGDOMPropertyConfig={Properties:{clipPath:MUST_USE_ATTRIBUTE,cx:MUST_USE_ATTRIBUTE,cy:MUST_USE_ATTRIBUTE,d:MUST_USE_ATTRIBUTE,dx:MUST_USE_ATTRIBUTE,dy:MUST_USE_ATTRIBUTE,fill:MUST_USE_ATTRIBUTE,fillOpacity:MUST_USE_ATTRIBUTE,fontFamily:MUST_USE_ATTRIBUTE,fontSize:MUST_USE_ATTRIBUTE,fx:MUST_USE_ATTRIBUTE,fy:MUST_USE_ATTRIBUTE,gradientTransform:MUST_USE_ATTRIBUTE,gradientUnits:MUST_USE_ATTRIBUTE,markerEnd:MUST_USE_ATTRIBUTE,markerMid:MUST_USE_ATTRIBUTE,markerStart:MUST_USE_ATTRIBUTE,offset:MUST_USE_ATTRIBUTE,opacity:MUST_USE_ATTRIBUTE,patternContentUnits:MUST_USE_ATTRIBUTE,patternUnits:MUST_USE_ATTRIBUTE,points:MUST_USE_ATTRIBUTE,preserveAspectRatio:MUST_USE_ATTRIBUTE,r:MUST_USE_ATTRIBUTE,rx:MUST_USE_ATTRIBUTE,ry:MUST_USE_ATTRIBUTE,spreadMethod:MUST_USE_ATTRIBUTE,stopColor:MUST_USE_ATTRIBUTE,stopOpacity:MUST_USE_ATTRIBUTE,stroke:MUST_USE_ATTRIBUTE,strokeDasharray:MUST_USE_ATTRIBUTE,strokeLinecap:MUST_USE_ATTRIBUTE,strokeOpacity:MUST_USE_ATTRIBUTE,strokeWidth:MUST_USE_ATTRIBUTE,textAnchor:MUST_USE_ATTRIBUTE,transform:MUST_USE_ATTRIBUTE,version:MUST_USE_ATTRIBUTE,viewBox:MUST_USE_ATTRIBUTE,x1:MUST_USE_ATTRIBUTE,x2:MUST_USE_ATTRIBUTE,x:MUST_USE_ATTRIBUTE,xlinkActuate:MUST_USE_ATTRIBUTE,xlinkArcrole:MUST_USE_ATTRIBUTE,xlinkHref:MUST_USE_ATTRIBUTE,xlinkRole:MUST_USE_ATTRIBUTE,xlinkShow:MUST_USE_ATTRIBUTE,xlinkTitle:MUST_USE_ATTRIBUTE,xlinkType:MUST_USE_ATTRIBUTE,xmlBase:MUST_USE_ATTRIBUTE,xmlLang:MUST_USE_ATTRIBUTE,xmlSpace:MUST_USE_ATTRIBUTE,y1:MUST_USE_ATTRIBUTE,y2:MUST_USE_ATTRIBUTE,y:MUST_USE_ATTRIBUTE},DOMAttributeNamespaces:{xlinkActuate:NS.xlink,xlinkArcrole:NS.xlink,xlinkHref:NS.xlink,xlinkRole:NS.xlink,xlinkShow:NS.xlink,xlinkTitle:NS.xlink,xlinkType:NS.xlink,xmlBase:NS.xml,xmlLang:NS.xml,xmlSpace:NS.xml},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space"}};module.exports=SVGDOMPropertyConfig},function(module,exports,__webpack_require__){"use strict";var EventConstants=__webpack_require__(17);var EventPropagators=__webpack_require__(33);var ExecutionEnvironment=__webpack_require__(8);var ReactInputSelection=__webpack_require__(107);var SyntheticEvent=__webpack_require__(23);var getActiveElement=__webpack_require__(89);var isTextInputElement=__webpack_require__(118);var keyOf=__webpack_require__(19);var shallowEqual=__webpack_require__(91);var topLevelTypes=EventConstants.topLevelTypes;var skipSelectionChangeEvent=ExecutionEnvironment.canUseDOM&&"documentMode"in document&&document.documentMode<=11;var eventTypes={select:{phasedRegistrationNames:{bubbled:keyOf({onSelect:null}),captured:keyOf({onSelectCapture:null})},dependencies:[topLevelTypes.topBlur,topLevelTypes.topContextMenu,topLevelTypes.topFocus,topLevelTypes.topKeyDown,topLevelTypes.topMouseDown,topLevelTypes.topMouseUp,topLevelTypes.topSelectionChange]}};var activeElement=null;var activeElementID=null;var lastSelection=null;var mouseDown=false;var hasListener=false;var ON_SELECT_KEY=keyOf({onSelect:null});function getSelection(node){if("selectionStart"in node&&ReactInputSelection.hasSelectionCapabilities(node)){return{start:node.selectionStart,end:node.selectionEnd}}else if(window.getSelection){var selection=window.getSelection();return{anchorNode:selection.anchorNode,anchorOffset:selection.anchorOffset,focusNode:selection.focusNode,focusOffset:selection.focusOffset}}else if(document.selection){var range=document.selection.createRange();return{parentElement:range.parentElement(),text:range.text,top:range.boundingTop,left:range.boundingLeft}}}function constructSelectEvent(nativeEvent,nativeEventTarget){if(mouseDown||activeElement==null||activeElement!==getActiveElement()){return null}var currentSelection=getSelection(activeElement);if(!lastSelection||!shallowEqual(lastSelection,currentSelection)){lastSelection=currentSelection;var syntheticEvent=SyntheticEvent.getPooled(eventTypes.select,activeElementID,nativeEvent,nativeEventTarget);syntheticEvent.type="select";syntheticEvent.target=activeElement;EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);return syntheticEvent}return null}var SelectEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){if(!hasListener){return null}switch(topLevelType){case topLevelTypes.topFocus:if(isTextInputElement(topLevelTarget)||topLevelTarget.contentEditable==="true"){activeElement=topLevelTarget;activeElementID=topLevelTargetID;lastSelection=null}break;case topLevelTypes.topBlur:activeElement=null;activeElementID=null;lastSelection=null;break;case topLevelTypes.topMouseDown:mouseDown=true;break;case topLevelTypes.topContextMenu:case topLevelTypes.topMouseUp:mouseDown=false;return constructSelectEvent(nativeEvent,nativeEventTarget);case topLevelTypes.topSelectionChange:if(skipSelectionChangeEvent){break}case topLevelTypes.topKeyDown:case topLevelTypes.topKeyUp:return constructSelectEvent(nativeEvent,nativeEventTarget)}return null},didPutListener:function(id,registrationName,listener){if(registrationName===ON_SELECT_KEY){hasListener=true}}};module.exports=SelectEventPlugin},function(module,exports,__webpack_require__){"use strict";var GLOBAL_MOUNT_POINT_MAX=Math.pow(2,53);var ServerReactRootIndex={createReactRootIndex:function(){return Math.ceil(Math.random()*GLOBAL_MOUNT_POINT_MAX)}};module.exports=ServerReactRootIndex},function(module,exports,__webpack_require__){"use strict";(function(process){var EventConstants=__webpack_require__(17);var EventListener=__webpack_require__(86);var EventPropagators=__webpack_require__(33);var ReactMount=__webpack_require__(9);var SyntheticClipboardEvent=__webpack_require__(181);var SyntheticEvent=__webpack_require__(23);var SyntheticFocusEvent=__webpack_require__(184);var SyntheticKeyboardEvent=__webpack_require__(186);var SyntheticMouseEvent=__webpack_require__(40);var SyntheticDragEvent=__webpack_require__(183);var SyntheticTouchEvent=__webpack_require__(187);var SyntheticUIEvent=__webpack_require__(35);var SyntheticWheelEvent=__webpack_require__(188);var emptyFunction=__webpack_require__(15);var getEventCharCode=__webpack_require__(76);var invariant=__webpack_require__(2);var keyOf=__webpack_require__(19);var topLevelTypes=EventConstants.topLevelTypes;var eventTypes={abort:{phasedRegistrationNames:{bubbled:keyOf({onAbort:true}),captured:keyOf({onAbortCapture:true})}},blur:{phasedRegistrationNames:{bubbled:keyOf({onBlur:true}),captured:keyOf({onBlurCapture:true})}},canPlay:{phasedRegistrationNames:{bubbled:keyOf({onCanPlay:true}),captured:keyOf({onCanPlayCapture:true})}},canPlayThrough:{phasedRegistrationNames:{bubbled:keyOf({onCanPlayThrough:true}),captured:keyOf({onCanPlayThroughCapture:true})}},click:{phasedRegistrationNames:{bubbled:keyOf({onClick:true}),captured:keyOf({onClickCapture:true})}},contextMenu:{phasedRegistrationNames:{bubbled:keyOf({onContextMenu:true}),captured:keyOf({onContextMenuCapture:true})}},copy:{phasedRegistrationNames:{bubbled:keyOf({onCopy:true}),captured:keyOf({onCopyCapture:true})}},cut:{phasedRegistrationNames:{bubbled:keyOf({onCut:true}),captured:keyOf({onCutCapture:true})}},doubleClick:{phasedRegistrationNames:{bubbled:keyOf({onDoubleClick:true}),captured:keyOf({onDoubleClickCapture:true})}},drag:{phasedRegistrationNames:{bubbled:keyOf({onDrag:true}),captured:keyOf({onDragCapture:true})}},dragEnd:{phasedRegistrationNames:{bubbled:keyOf({onDragEnd:true}),captured:keyOf({onDragEndCapture:true})}},dragEnter:{phasedRegistrationNames:{bubbled:keyOf({onDragEnter:true}),captured:keyOf({onDragEnterCapture:true})}},dragExit:{phasedRegistrationNames:{bubbled:keyOf({onDragExit:true}),captured:keyOf({onDragExitCapture:true})}},dragLeave:{phasedRegistrationNames:{bubbled:keyOf({onDragLeave:true}),captured:keyOf({onDragLeaveCapture:true})}},dragOver:{phasedRegistrationNames:{bubbled:keyOf({onDragOver:true}),captured:keyOf({onDragOverCapture:true})}},dragStart:{phasedRegistrationNames:{bubbled:keyOf({onDragStart:true}),captured:keyOf({onDragStartCapture:true})}},drop:{phasedRegistrationNames:{bubbled:keyOf({onDrop:true}),captured:keyOf({onDropCapture:true})}},durationChange:{phasedRegistrationNames:{bubbled:keyOf({onDurationChange:true}),captured:keyOf({onDurationChangeCapture:true})}},emptied:{phasedRegistrationNames:{bubbled:keyOf({onEmptied:true}),captured:keyOf({onEmptiedCapture:true})}},encrypted:{phasedRegistrationNames:{bubbled:keyOf({onEncrypted:true}),captured:keyOf({onEncryptedCapture:true})}},ended:{phasedRegistrationNames:{bubbled:keyOf({onEnded:true}),captured:keyOf({onEndedCapture:true})}},error:{phasedRegistrationNames:{bubbled:keyOf({onError:true}),captured:keyOf({onErrorCapture:true})}},focus:{phasedRegistrationNames:{bubbled:keyOf({onFocus:true}),captured:keyOf({onFocusCapture:true})}},input:{phasedRegistrationNames:{bubbled:keyOf({onInput:true}),captured:keyOf({onInputCapture:true})}},keyDown:{phasedRegistrationNames:{bubbled:keyOf({onKeyDown:true}),captured:keyOf({onKeyDownCapture:true})}},keyPress:{phasedRegistrationNames:{bubbled:keyOf({onKeyPress:true}),captured:keyOf({onKeyPressCapture:true})}},keyUp:{phasedRegistrationNames:{bubbled:keyOf({onKeyUp:true}),captured:keyOf({onKeyUpCapture:true})}},load:{phasedRegistrationNames:{bubbled:keyOf({onLoad:true}),captured:keyOf({onLoadCapture:true})}},loadedData:{phasedRegistrationNames:{bubbled:keyOf({onLoadedData:true}),captured:keyOf({onLoadedDataCapture:true})}},loadedMetadata:{phasedRegistrationNames:{bubbled:keyOf({onLoadedMetadata:true}),captured:keyOf({onLoadedMetadataCapture:true})}},loadStart:{phasedRegistrationNames:{bubbled:keyOf({onLoadStart:true}),captured:keyOf({onLoadStartCapture:true})}},mouseDown:{phasedRegistrationNames:{bubbled:keyOf({onMouseDown:true}),captured:keyOf({onMouseDownCapture:true})}},mouseMove:{phasedRegistrationNames:{bubbled:keyOf({onMouseMove:true}),captured:keyOf({onMouseMoveCapture:true})}},mouseOut:{phasedRegistrationNames:{bubbled:keyOf({onMouseOut:true}),captured:keyOf({onMouseOutCapture:true})}},mouseOver:{phasedRegistrationNames:{bubbled:keyOf({onMouseOver:true}),captured:keyOf({onMouseOverCapture:true})}},mouseUp:{phasedRegistrationNames:{bubbled:keyOf({onMouseUp:true}),captured:keyOf({onMouseUpCapture:true})}},paste:{phasedRegistrationNames:{bubbled:keyOf({onPaste:true}),captured:keyOf({onPasteCapture:true})}},pause:{phasedRegistrationNames:{bubbled:keyOf({onPause:true}),captured:keyOf({onPauseCapture:true})}},play:{phasedRegistrationNames:{bubbled:keyOf({onPlay:true}),captured:keyOf({onPlayCapture:true})}},playing:{phasedRegistrationNames:{bubbled:keyOf({onPlaying:true}),captured:keyOf({onPlayingCapture:true})}},progress:{phasedRegistrationNames:{bubbled:keyOf({onProgress:true}),captured:keyOf({onProgressCapture:true})}},rateChange:{phasedRegistrationNames:{bubbled:keyOf({onRateChange:true}),captured:keyOf({onRateChangeCapture:true})}},reset:{phasedRegistrationNames:{bubbled:keyOf({onReset:true}),captured:keyOf({onResetCapture:true})}},scroll:{phasedRegistrationNames:{bubbled:keyOf({onScroll:true}),captured:keyOf({onScrollCapture:true})}},seeked:{phasedRegistrationNames:{bubbled:keyOf({onSeeked:true}),captured:keyOf({onSeekedCapture:true})}},seeking:{phasedRegistrationNames:{bubbled:keyOf({onSeeking:true}),captured:keyOf({onSeekingCapture:true})}},stalled:{phasedRegistrationNames:{bubbled:keyOf({onStalled:true}),captured:keyOf({onStalledCapture:true})}},submit:{phasedRegistrationNames:{bubbled:keyOf({onSubmit:true}),captured:keyOf({onSubmitCapture:true})}},suspend:{phasedRegistrationNames:{bubbled:keyOf({onSuspend:true}),captured:keyOf({onSuspendCapture:true})}},timeUpdate:{phasedRegistrationNames:{bubbled:keyOf({onTimeUpdate:true}),captured:keyOf({onTimeUpdateCapture:true})}},touchCancel:{phasedRegistrationNames:{bubbled:keyOf({onTouchCancel:true}),captured:keyOf({onTouchCancelCapture:true})}},touchEnd:{phasedRegistrationNames:{bubbled:keyOf({onTouchEnd:true}),captured:keyOf({onTouchEndCapture:true})}},touchMove:{phasedRegistrationNames:{bubbled:keyOf({onTouchMove:true}),captured:keyOf({onTouchMoveCapture:true})}},touchStart:{phasedRegistrationNames:{bubbled:keyOf({onTouchStart:true}),captured:keyOf({onTouchStartCapture:true})}},volumeChange:{phasedRegistrationNames:{bubbled:keyOf({onVolumeChange:true}),captured:keyOf({onVolumeChangeCapture:true})}},waiting:{phasedRegistrationNames:{bubbled:keyOf({onWaiting:true}),captured:keyOf({onWaitingCapture:true})}},wheel:{phasedRegistrationNames:{bubbled:keyOf({onWheel:true}),captured:keyOf({onWheelCapture:true})}}};var topLevelEventsToDispatchConfig={topAbort:eventTypes.abort,topBlur:eventTypes.blur,topCanPlay:eventTypes.canPlay,topCanPlayThrough:eventTypes.canPlayThrough,topClick:eventTypes.click,topContextMenu:eventTypes.contextMenu,topCopy:eventTypes.copy,topCut:eventTypes.cut,topDoubleClick:eventTypes.doubleClick,topDrag:eventTypes.drag,topDragEnd:eventTypes.dragEnd,topDragEnter:eventTypes.dragEnter,topDragExit:eventTypes.dragExit,topDragLeave:eventTypes.dragLeave,topDragOver:eventTypes.dragOver,topDragStart:eventTypes.dragStart,topDrop:eventTypes.drop,topDurationChange:eventTypes.durationChange,topEmptied:eventTypes.emptied,topEncrypted:eventTypes.encrypted,topEnded:eventTypes.ended,topError:eventTypes.error,topFocus:eventTypes.focus,topInput:eventTypes.input,topKeyDown:eventTypes.keyDown,topKeyPress:eventTypes.keyPress,topKeyUp:eventTypes.keyUp,topLoad:eventTypes.load,topLoadedData:eventTypes.loadedData,topLoadedMetadata:eventTypes.loadedMetadata,topLoadStart:eventTypes.loadStart,topMouseDown:eventTypes.mouseDown,topMouseMove:eventTypes.mouseMove,topMouseOut:eventTypes.mouseOut,topMouseOver:eventTypes.mouseOver,topMouseUp:eventTypes.mouseUp,topPaste:eventTypes.paste,topPause:eventTypes.pause,topPlay:eventTypes.play,topPlaying:eventTypes.playing,topProgress:eventTypes.progress,topRateChange:eventTypes.rateChange,topReset:eventTypes.reset,topScroll:eventTypes.scroll,topSeeked:eventTypes.seeked,topSeeking:eventTypes.seeking,topStalled:eventTypes.stalled,topSubmit:eventTypes.submit,topSuspend:eventTypes.suspend,topTimeUpdate:eventTypes.timeUpdate,topTouchCancel:eventTypes.touchCancel,topTouchEnd:eventTypes.touchEnd,topTouchMove:eventTypes.touchMove,topTouchStart:eventTypes.touchStart,topVolumeChange:eventTypes.volumeChange,topWaiting:eventTypes.waiting,topWheel:eventTypes.wheel};for(var type in topLevelEventsToDispatchConfig){topLevelEventsToDispatchConfig[type].dependencies=[type]}var ON_CLICK_KEY=keyOf({onClick:null});var onClickListeners={};var SimpleEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){var dispatchConfig=topLevelEventsToDispatchConfig[topLevelType];if(!dispatchConfig){return null}var EventConstructor;switch(topLevelType){case topLevelTypes.topAbort:case topLevelTypes.topCanPlay:case topLevelTypes.topCanPlayThrough:case topLevelTypes.topDurationChange:case topLevelTypes.topEmptied:case topLevelTypes.topEncrypted:case topLevelTypes.topEnded:case topLevelTypes.topError:case topLevelTypes.topInput:case topLevelTypes.topLoad:case topLevelTypes.topLoadedData:case topLevelTypes.topLoadedMetadata:case topLevelTypes.topLoadStart:case topLevelTypes.topPause:case topLevelTypes.topPlay:case topLevelTypes.topPlaying:case topLevelTypes.topProgress:case topLevelTypes.topRateChange:case topLevelTypes.topReset:case topLevelTypes.topSeeked:case topLevelTypes.topSeeking:case topLevelTypes.topStalled:case topLevelTypes.topSubmit:case topLevelTypes.topSuspend:case topLevelTypes.topTimeUpdate:case topLevelTypes.topVolumeChange:case topLevelTypes.topWaiting:EventConstructor=SyntheticEvent;break;case topLevelTypes.topKeyPress:if(getEventCharCode(nativeEvent)===0){return null}case topLevelTypes.topKeyDown:case topLevelTypes.topKeyUp:EventConstructor=SyntheticKeyboardEvent;break;case topLevelTypes.topBlur:case topLevelTypes.topFocus:EventConstructor=SyntheticFocusEvent;break;case topLevelTypes.topClick:if(nativeEvent.button===2){return null}case topLevelTypes.topContextMenu:case topLevelTypes.topDoubleClick:case topLevelTypes.topMouseDown:case topLevelTypes.topMouseMove:case topLevelTypes.topMouseOut:case topLevelTypes.topMouseOver:case topLevelTypes.topMouseUp:EventConstructor=SyntheticMouseEvent;break;case topLevelTypes.topDrag:case topLevelTypes.topDragEnd:case topLevelTypes.topDragEnter:case topLevelTypes.topDragExit:case topLevelTypes.topDragLeave:case topLevelTypes.topDragOver:case topLevelTypes.topDragStart:case topLevelTypes.topDrop:EventConstructor=SyntheticDragEvent;break;case topLevelTypes.topTouchCancel:case topLevelTypes.topTouchEnd:case topLevelTypes.topTouchMove:case topLevelTypes.topTouchStart:EventConstructor=SyntheticTouchEvent;break;case topLevelTypes.topScroll:EventConstructor=SyntheticUIEvent;break;case topLevelTypes.topWheel:EventConstructor=SyntheticWheelEvent;break;case topLevelTypes.topCopy:case topLevelTypes.topCut:case topLevelTypes.topPaste:EventConstructor=SyntheticClipboardEvent;break}!EventConstructor?process.env.NODE_ENV!=="production"?invariant(false,"SimpleEventPlugin: Unhandled event type, `%s`.",topLevelType):invariant(false):undefined;var event=EventConstructor.getPooled(dispatchConfig,topLevelTargetID,nativeEvent,nativeEventTarget);EventPropagators.accumulateTwoPhaseDispatches(event);return event},didPutListener:function(id,registrationName,listener){if(registrationName===ON_CLICK_KEY){var node=ReactMount.getNode(id);if(!onClickListeners[id]){onClickListeners[id]=EventListener.listen(node,"click",emptyFunction)}}},willDeleteListener:function(id,registrationName){if(registrationName===ON_CLICK_KEY){onClickListeners[id].remove();delete onClickListeners[id]}}};module.exports=SimpleEventPlugin}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var SyntheticEvent=__webpack_require__(23);var ClipboardEventInterface={clipboardData:function(event){return"clipboardData"in event?event.clipboardData:window.clipboardData}};function SyntheticClipboardEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticEvent.augmentClass(SyntheticClipboardEvent,ClipboardEventInterface);module.exports=SyntheticClipboardEvent},function(module,exports,__webpack_require__){"use strict";var SyntheticEvent=__webpack_require__(23);var CompositionEventInterface={data:null};function SyntheticCompositionEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticEvent.augmentClass(SyntheticCompositionEvent,CompositionEventInterface);module.exports=SyntheticCompositionEvent},function(module,exports,__webpack_require__){"use strict";var SyntheticMouseEvent=__webpack_require__(40);var DragEventInterface={dataTransfer:null};function SyntheticDragEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){SyntheticMouseEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticMouseEvent.augmentClass(SyntheticDragEvent,DragEventInterface);module.exports=SyntheticDragEvent},function(module,exports,__webpack_require__){"use strict";var SyntheticUIEvent=__webpack_require__(35);var FocusEventInterface={relatedTarget:null};function SyntheticFocusEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){SyntheticUIEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticUIEvent.augmentClass(SyntheticFocusEvent,FocusEventInterface);module.exports=SyntheticFocusEvent},function(module,exports,__webpack_require__){"use strict";var SyntheticEvent=__webpack_require__(23);var InputEventInterface={data:null};function SyntheticInputEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticEvent.augmentClass(SyntheticInputEvent,InputEventInterface);module.exports=SyntheticInputEvent},function(module,exports,__webpack_require__){"use strict";var SyntheticUIEvent=__webpack_require__(35);var getEventCharCode=__webpack_require__(76);var getEventKey=__webpack_require__(193);var getEventModifierState=__webpack_require__(77);var KeyboardEventInterface={key:getEventKey,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:getEventModifierState,charCode:function(event){if(event.type==="keypress"){return getEventCharCode(event)}return 0},keyCode:function(event){if(event.type==="keydown"||event.type==="keyup"){return event.keyCode}return 0},which:function(event){if(event.type==="keypress"){return getEventCharCode(event)}if(event.type==="keydown"||event.type==="keyup"){return event.keyCode}return 0}};function SyntheticKeyboardEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){SyntheticUIEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent,KeyboardEventInterface);module.exports=SyntheticKeyboardEvent},function(module,exports,__webpack_require__){"use strict";var SyntheticUIEvent=__webpack_require__(35);var getEventModifierState=__webpack_require__(77);var TouchEventInterface={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:getEventModifierState};function SyntheticTouchEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){SyntheticUIEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticUIEvent.augmentClass(SyntheticTouchEvent,TouchEventInterface);module.exports=SyntheticTouchEvent},function(module,exports,__webpack_require__){"use strict";var SyntheticMouseEvent=__webpack_require__(40);var WheelEventInterface={deltaX:function(event){return"deltaX"in event?event.deltaX:"wheelDeltaX"in event?-event.wheelDeltaX:0},deltaY:function(event){return"deltaY"in event?event.deltaY:"wheelDeltaY"in event?-event.wheelDeltaY:"wheelDelta"in event?-event.wheelDelta:0},deltaZ:null,deltaMode:null};function SyntheticWheelEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){ SyntheticMouseEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticMouseEvent.augmentClass(SyntheticWheelEvent,WheelEventInterface);module.exports=SyntheticWheelEvent},function(module,exports,__webpack_require__){"use strict";var MOD=65521;function adler32(data){var a=1;var b=0;var i=0;var l=data.length;var m=l&~3;while(i<m){for(;i<Math.min(i+4096,m);i+=4){b+=(a+=data.charCodeAt(i))+(a+=data.charCodeAt(i+1))+(a+=data.charCodeAt(i+2))+(a+=data.charCodeAt(i+3))}a%=MOD;b%=MOD}for(;i<l;i++){b+=a+=data.charCodeAt(i)}a%=MOD;b%=MOD;return a|b<<16}module.exports=adler32},function(module,exports,__webpack_require__){"use strict";var CSSProperty=__webpack_require__(92);var isUnitlessNumber=CSSProperty.isUnitlessNumber;function dangerousStyleValue(name,value){var isEmpty=value==null||typeof value==="boolean"||value==="";if(isEmpty){return""}var isNonNumeric=isNaN(value);if(isNonNumeric||value===0||isUnitlessNumber.hasOwnProperty(name)&&isUnitlessNumber[name]){return""+value}if(typeof value==="string"){value=value.trim()}return value+"px"}module.exports=dangerousStyleValue},function(module,exports,__webpack_require__){"use strict";(function(process){var assign=__webpack_require__(3);var warning=__webpack_require__(4);function deprecated(fnName,newModule,newPackage,ctx,fn){var warned=false;if(process.env.NODE_ENV!=="production"){var newFn=function(){process.env.NODE_ENV!=="production"?warning(warned,"React.%s is deprecated. Please use %s.%s from require"+"('%s') "+"instead.",fnName,newModule,fnName,newPackage):undefined;warned=true;return fn.apply(ctx,arguments)};return assign(newFn,fn)}return fn}module.exports=deprecated}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";(function(process){var traverseAllChildren=__webpack_require__(84);var warning=__webpack_require__(4);function flattenSingleChildIntoContext(traverseContext,child,name){var result=traverseContext;var keyUnique=result[name]===undefined;if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(keyUnique,"flattenChildren(...): Encountered two children with the same key, "+"`%s`. Child keys must be unique; when two children share a key, only "+"the first child will be used.",name):undefined}if(keyUnique&&child!=null){result[name]=child}}function flattenChildren(children){if(children==null){return children}var result={};traverseAllChildren(children,flattenSingleChildIntoContext,result);return result}module.exports=flattenChildren}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var getEventCharCode=__webpack_require__(76);var normalizeKey={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"};var translateToKey={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"};function getEventKey(nativeEvent){if(nativeEvent.key){var key=normalizeKey[nativeEvent.key]||nativeEvent.key;if(key!=="Unidentified"){return key}}if(nativeEvent.type==="keypress"){var charCode=getEventCharCode(nativeEvent);return charCode===13?"Enter":String.fromCharCode(charCode)}if(nativeEvent.type==="keydown"||nativeEvent.type==="keyup"){return translateToKey[nativeEvent.keyCode]||"Unidentified"}return""}module.exports=getEventKey},function(module,exports,__webpack_require__){"use strict";function getLeafNode(node){while(node&&node.firstChild){node=node.firstChild}return node}function getSiblingNode(node){while(node){if(node.nextSibling){return node.nextSibling}node=node.parentNode}}function getNodeForCharacterOffset(root,offset){var node=getLeafNode(root);var nodeStart=0;var nodeEnd=0;while(node){if(node.nodeType===3){nodeEnd=nodeStart+node.textContent.length;if(nodeStart<=offset&&nodeEnd>=offset){return{node:node,offset:offset-nodeStart}}nodeStart=nodeEnd}node=getLeafNode(getSiblingNode(node))}}module.exports=getNodeForCharacterOffset},function(module,exports,__webpack_require__){"use strict";(function(process){var ReactElement=__webpack_require__(11);var invariant=__webpack_require__(2);function onlyChild(children){!ReactElement.isValidElement(children)?process.env.NODE_ENV!=="production"?invariant(false,"onlyChild must be passed a children with exactly one child."):invariant(false):undefined;return children}module.exports=onlyChild}).call(exports,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var escapeTextContentForBrowser=__webpack_require__(43);function quoteAttributeValueForBrowser(value){return'"'+escapeTextContentForBrowser(value)+'"'}module.exports=quoteAttributeValueForBrowser},function(module,exports,__webpack_require__){"use strict";var ReactMount=__webpack_require__(9);module.exports=ReactMount.renderSubtreeIntoContainer}])});
Mr.Mining/MikeTheMiner/Santas_helpers/Sia_wallet/resources/app/plugins/Hosting/js/components/announce.js
patel344/Mr.Miner
import React from 'react' const AnnounceDialogModal = ({ announceAddress, actions }) => { const handleSettingInput = (e) => actions.updateModal('announceAddress', e.target.value) const hideAnnounceDialog = (address) => actions.hideAnnounceDialog(address) const closeAnnounceDialog = () => hideAnnounceDialog('') const handleSubmit = () => { if (announceAddress !== '') { hideAnnounceDialog( announceAddress ) } } const handleSettingKeyDown = (e) => { if (e.keyCode === 13) { handleSubmit() e.preventDefault() } } return ( <div className={'hosting-options-modal modal' + (announceAddress !== undefined ? '': ' hidden')}> <form className="hosting-options modal-message" onSubmit=""> <div className="close-button" onClick={closeAnnounceDialog}> X </div> <h3>Announce Host</h3> <p> <label>Address to announce.</label> <input onChange={handleSettingInput} onKeyDown={handleSettingKeyDown} value={announceAddress || ''} type="text" /> </p> <span>Click to announce your host to the network. This will incur a small transaction fee and only needs to be done once per host.</span> <p> <input className={'button accept' + ( announceAddress !== '' ? '' : ' disabled' )} type="button" value="Announce" onClick={handleSubmit} /> </p> </form> </div> ) } export default AnnounceDialogModal
src/shared/components/outboundLink/outboundLink.js
sethbergman/operationcode_frontend
import React from 'react'; import PropTypes from 'prop-types'; import ReactGA from 'react-ga'; const OutboundLink = ({ href, analyticsEventLabel, children, className, style, }) => { if (process.env.NODE_ENV === 'production') { return ( <ReactGA.OutboundLink to={href} eventLabel={`OUTBOUND [${analyticsEventLabel}] from ${window.location .pathname}`} target="_blank" rel="noopener noreferrer" className={className} style={style} > {children} </ReactGA.OutboundLink> ); } return ( <a href={href} target="_blank" rel="noopener noreferrer" className={className} style={style} > {children} </a> ); }; OutboundLink.propTypes = { href: PropTypes.string.isRequired, analyticsEventLabel: PropTypes.string.isRequired, children: PropTypes.object.isRequired, // eslint-disable-line className: PropTypes.string, style: PropTypes.object, //eslint-disable-line }; OutboundLink.defaultProps = { className: '', }; export default OutboundLink;
src/containers/image-manager/image-manager.js
OpenChemistry/mongochemclient
import React, { Component } from 'react'; import { connect } from 'react-redux'; import ImageManager from '../../components/image-manager/image-manager'; import { cumulus, images as redux_images, selectors } from '@openchemistry/redux'; class ImageManagerContainer extends Component { componentDidMount() { this.props.dispatch(redux_images.requestUniqueImages()); } imageType = () => { // FIXME: this should be set by some internal setting return 'Docker'; }; onPull = (imageName, clusterId) => { const { dispatch } = this.props; const container = this.imageType().toLowerCase(); const taskFlowClass = 'taskflows.ContainerPullTaskFlow'; dispatch( cumulus.launchTaskFlow(imageName, container, clusterId, taskFlowClass) ); }; onRegister = () => { this.props.dispatch(redux_images.registerImages()); }; render() { const { images } = this.props; return <ImageManager onPull={this.onPull} onRegister={this.onRegister} images={images} />; } } function mapStateToProps(state) { const images = selectors.images.getUniqueImages(state); return { images }; } export default connect(mapStateToProps)(ImageManagerContainer);
app/javascript/mastodon/features/notifications/components/column_settings.js
im-in-space/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage } from 'react-intl'; import ClearColumnButton from './clear_column_button'; import GrantPermissionButton from './grant_permission_button'; import SettingToggle from './setting_toggle'; import { isStaff } from 'mastodon/initial_state'; export default class ColumnSettings extends React.PureComponent { static propTypes = { settings: ImmutablePropTypes.map.isRequired, pushSettings: ImmutablePropTypes.map.isRequired, onChange: PropTypes.func.isRequired, onClear: PropTypes.func.isRequired, onRequestNotificationPermission: PropTypes.func, alertsEnabled: PropTypes.bool, browserSupport: PropTypes.bool, browserPermission: PropTypes.bool, }; onPushChange = (path, checked) => { this.props.onChange(['push', ...path], checked); } render () { const { settings, pushSettings, onChange, onClear, alertsEnabled, browserSupport, browserPermission, onRequestNotificationPermission } = this.props; const unreadMarkersShowStr = <FormattedMessage id='notifications.column_settings.unread_notifications.highlight' defaultMessage='Highlight unread notifications' />; const filterBarShowStr = <FormattedMessage id='notifications.column_settings.filter_bar.show_bar' defaultMessage='Show filter bar' />; const filterAdvancedStr = <FormattedMessage id='notifications.column_settings.filter_bar.advanced' defaultMessage='Display all categories' />; const alertStr = <FormattedMessage id='notifications.column_settings.alert' defaultMessage='Desktop notifications' />; const showStr = <FormattedMessage id='notifications.column_settings.show' defaultMessage='Show in column' />; const soundStr = <FormattedMessage id='notifications.column_settings.sound' defaultMessage='Play sound' />; const showPushSettings = pushSettings.get('browserSupport') && pushSettings.get('isSubscribed'); const pushStr = showPushSettings && <FormattedMessage id='notifications.column_settings.push' defaultMessage='Push notifications' />; return ( <div> {alertsEnabled && browserSupport && browserPermission === 'denied' && ( <div className='column-settings__row column-settings__row--with-margin'> <span className='warning-hint'><FormattedMessage id='notifications.permission_denied' defaultMessage='Desktop notifications are unavailable due to previously denied browser permissions request' /></span> </div> )} {alertsEnabled && browserSupport && browserPermission === 'default' && ( <div className='column-settings__row column-settings__row--with-margin'> <span className='warning-hint'> <FormattedMessage id='notifications.permission_required' defaultMessage='Desktop notifications are unavailable because the required permission has not been granted.' /> <GrantPermissionButton onClick={onRequestNotificationPermission} /> </span> </div> )} <div className='column-settings__row'> <ClearColumnButton onClick={onClear} /> </div> <div role='group' aria-labelledby='notifications-unread-markers'> <span id='notifications-unread-markers' className='column-settings__section'> <FormattedMessage id='notifications.column_settings.unread_notifications.category' defaultMessage='Unread notifications' /> </span> <div className='column-settings__row'> <SettingToggle id='unread-notification-markers' prefix='notifications' settings={settings} settingPath={['showUnread']} onChange={onChange} label={unreadMarkersShowStr} /> </div> </div> <div role='group' aria-labelledby='notifications-filter-bar'> <span id='notifications-filter-bar' className='column-settings__section'> <FormattedMessage id='notifications.column_settings.filter_bar.category' defaultMessage='Quick filter bar' /> </span> <div className='column-settings__row'> <SettingToggle id='show-filter-bar' prefix='notifications' settings={settings} settingPath={['quickFilter', 'show']} onChange={onChange} label={filterBarShowStr} /> <SettingToggle id='show-filter-bar' prefix='notifications' settings={settings} settingPath={['quickFilter', 'advanced']} onChange={onChange} label={filterAdvancedStr} /> </div> </div> <div role='group' aria-labelledby='notifications-follow'> <span id='notifications-follow' className='column-settings__section'><FormattedMessage id='notifications.column_settings.follow' defaultMessage='New followers:' /></span> <div className='column-settings__row'> <SettingToggle disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'follow']} onChange={onChange} label={alertStr} /> {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'follow']} onChange={this.onPushChange} label={pushStr} />} <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'follow']} onChange={onChange} label={showStr} /> <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'follow']} onChange={onChange} label={soundStr} /> </div> </div> <div role='group' aria-labelledby='notifications-follow-request'> <span id='notifications-follow-request' className='column-settings__section'><FormattedMessage id='notifications.column_settings.follow_request' defaultMessage='New follow requests:' /></span> <div className='column-settings__row'> <SettingToggle disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'follow_request']} onChange={onChange} label={alertStr} /> {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'follow_request']} onChange={this.onPushChange} label={pushStr} />} <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'follow_request']} onChange={onChange} label={showStr} /> <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'follow_request']} onChange={onChange} label={soundStr} /> </div> </div> <div role='group' aria-labelledby='notifications-favourite'> <span id='notifications-favourite' className='column-settings__section'><FormattedMessage id='notifications.column_settings.favourite' defaultMessage='Favourites:' /></span> <div className='column-settings__row'> <SettingToggle disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'favourite']} onChange={onChange} label={alertStr} /> {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'favourite']} onChange={this.onPushChange} label={pushStr} />} <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'favourite']} onChange={onChange} label={showStr} /> <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'favourite']} onChange={onChange} label={soundStr} /> </div> </div> <div role='group' aria-labelledby='notifications-mention'> <span id='notifications-mention' className='column-settings__section'><FormattedMessage id='notifications.column_settings.mention' defaultMessage='Mentions:' /></span> <div className='column-settings__row'> <SettingToggle disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'mention']} onChange={onChange} label={alertStr} /> {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'mention']} onChange={this.onPushChange} label={pushStr} />} <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'mention']} onChange={onChange} label={showStr} /> <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'mention']} onChange={onChange} label={soundStr} /> </div> </div> <div role='group' aria-labelledby='notifications-reblog'> <span id='notifications-reblog' className='column-settings__section'><FormattedMessage id='notifications.column_settings.reblog' defaultMessage='Boosts:' /></span> <div className='column-settings__row'> <SettingToggle disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'reblog']} onChange={onChange} label={alertStr} /> {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'reblog']} onChange={this.onPushChange} label={pushStr} />} <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'reblog']} onChange={onChange} label={showStr} /> <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'reblog']} onChange={onChange} label={soundStr} /> </div> </div> <div role='group' aria-labelledby='notifications-poll'> <span id='notifications-poll' className='column-settings__section'><FormattedMessage id='notifications.column_settings.poll' defaultMessage='Poll results:' /></span> <div className='column-settings__row'> <SettingToggle disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'poll']} onChange={onChange} label={alertStr} /> {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'poll']} onChange={this.onPushChange} label={pushStr} />} <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'poll']} onChange={onChange} label={showStr} /> <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'poll']} onChange={onChange} label={soundStr} /> </div> </div> <div role='group' aria-labelledby='notifications-status'> <span id='notifications-status' className='column-settings__section'><FormattedMessage id='notifications.column_settings.status' defaultMessage='New posts:' /></span> <div className='column-settings__row'> <SettingToggle disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'status']} onChange={onChange} label={alertStr} /> {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'status']} onChange={this.onPushChange} label={pushStr} />} <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'status']} onChange={onChange} label={showStr} /> <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'status']} onChange={onChange} label={soundStr} /> </div> </div> <div role='group' aria-labelledby='notifications-update'> <span id='notifications-update' className='column-settings__section'><FormattedMessage id='notifications.column_settings.update' defaultMessage='Edits:' /></span> <div className='column-settings__row'> <SettingToggle disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'update']} onChange={onChange} label={alertStr} /> {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'update']} onChange={this.onPushChange} label={pushStr} />} <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'update']} onChange={onChange} label={showStr} /> <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'update']} onChange={onChange} label={soundStr} /> </div> </div> {isStaff && ( <div role='group' aria-labelledby='notifications-admin-sign-up'> <span id='notifications-status' className='column-settings__section'><FormattedMessage id='notifications.column_settings.admin.sign_up' defaultMessage='New sign-ups:' /></span> <div className='column-settings__row'> <SettingToggle disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'admin.sign_up']} onChange={onChange} label={alertStr} /> {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'admin.sign_up']} onChange={this.onPushChange} label={pushStr} />} <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'admin.sign_up']} onChange={onChange} label={showStr} /> <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'admin.sign_up']} onChange={onChange} label={soundStr} /> </div> </div> )} </div> ); } }
ajax/libs/angular-ui-select/0.8.2/select.js
vdurmont/cdnjs
/*! * ui-select * http://github.com/angular-ui/ui-select * Version: 0.8.2 - 2014-10-09T23:29:49.713Z * License: MIT */ (function () { "use strict"; var KEY = { 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, COMMAND: 91, isControl: function (e) { var k = e.which; switch (k) { case KEY.COMMAND: case KEY.SHIFT: case KEY.CTRL: case KEY.ALT: return true; } if (e.metaKey) return true; return false; }, isFunctionKey: function (k) { k = k.which ? k.which : k; return k >= 112 && k <= 123; }, isVerticalMovement: function (k){ return ~[KEY.UP, KEY.DOWN].indexOf(k); }, isHorizontalMovement: function (k){ return ~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k); } }; /** * Add querySelectorAll() to jqLite. * * jqLite find() is limited to lookups by tag name. * TODO This will change with future versions of AngularJS, to be removed when this happens * * See jqLite.find - why not use querySelectorAll? https://github.com/angular/angular.js/issues/3586 * See feat(jqLite): use querySelectorAll instead of getElementsByTagName in jqLite.find https://github.com/angular/angular.js/pull/3598 */ if (angular.element.prototype.querySelectorAll === undefined) { angular.element.prototype.querySelectorAll = function(selector) { return angular.element(this[0].querySelectorAll(selector)); }; } angular.module('ui.select', []) .constant('uiSelectConfig', { theme: 'bootstrap', searchEnabled: true, placeholder: '', // Empty by default, like HTML tag <select> refreshDelay: 1000 // In milliseconds }) // See Rename minErr and make it accessible from outside https://github.com/angular/angular.js/issues/6913 .service('uiSelectMinErr', function() { var minErr = angular.$$minErr('ui.select'); return function() { var error = minErr.apply(this, arguments); var message = error.message.replace(new RegExp('\nhttp://errors.angularjs.org/.*'), ''); return new Error(message); }; }) /** * Parses "repeat" attribute. * * Taken from AngularJS ngRepeat source code * See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L211 * * Original discussion about parsing "repeat" attribute instead of fully relying on ng-repeat: * https://github.com/angular-ui/ui-select/commit/5dd63ad#commitcomment-5504697 */ .service('RepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinErr, $parse) { var self = this; /** * Example: * expression = "address in addresses | filter: {street: $select.search} track by $index" * itemName = "address", * source = "addresses | filter: {street: $select.search}", * trackByExp = "$index", */ self.parse = function(expression) { var match = expression.match(/^\s*(?:([\s\S]+?)\s+as\s+)?([\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/); if (!match) { throw uiSelectMinErr('iexp', "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.", expression); } return { itemName: match[2], // (lhs) Left-hand side, source: $parse(match[3]), trackByExp: match[4], modelMapper: $parse(match[1] || match[2]) }; }; self.getGroupNgRepeatExpression = function() { return '$group in $select.groups'; }; self.getNgRepeatExpression = function(itemName, source, trackByExp, grouped) { var expression = itemName + ' in ' + (grouped ? '$group.items' : source); if (trackByExp) { expression += ' track by ' + trackByExp; } return expression; }; }]) /** * Contains ui-select "intelligence". * * The goal is to limit dependency on the DOM whenever possible and * put as much logic in the controller (instead of the link functions) as possible so it can be easily tested. */ .controller('uiSelectCtrl', ['$scope', '$element', '$timeout', 'RepeatParser', 'uiSelectMinErr', function($scope, $element, $timeout, RepeatParser, uiSelectMinErr) { var ctrl = this; var EMPTY_SEARCH = ''; ctrl.placeholder = undefined; ctrl.search = EMPTY_SEARCH; ctrl.activeIndex = 0; ctrl.activeMatchIndex = -1; ctrl.items = []; ctrl.selected = undefined; ctrl.open = false; ctrl.focus = false; ctrl.focusser = undefined; //Reference to input element used to handle focus events ctrl.disabled = undefined; // Initialized inside uiSelect directive link function ctrl.searchEnabled = undefined; // Initialized inside uiSelect directive link function ctrl.resetSearchInput = undefined; // Initialized inside uiSelect directive link function ctrl.refreshDelay = undefined; // Initialized inside uiSelectChoices directive link function ctrl.multiple = false; // Initialized inside uiSelect directive link function ctrl.disableChoiceExpression = undefined; // Initialized inside uiSelect directive link function ctrl.isEmpty = function() { return angular.isUndefined(ctrl.selected) || ctrl.selected === null || ctrl.selected === ''; }; var _searchInput = $element.querySelectorAll('input.ui-select-search'); if (_searchInput.length !== 1) { throw uiSelectMinErr('searchInput', "Expected 1 input.ui-select-search but got '{0}'.", _searchInput.length); } // Most of the time the user does not want to empty the search input when in typeahead mode function _resetSearchInput() { if (ctrl.resetSearchInput) { ctrl.search = EMPTY_SEARCH; //reset activeIndex if (ctrl.selected && ctrl.items.length && !ctrl.multiple) { ctrl.activeIndex = ctrl.items.indexOf(ctrl.selected); } } } // When the user clicks on ui-select, displays the dropdown list ctrl.activate = function(initSearchValue, avoidReset) { if (!ctrl.disabled && !ctrl.open) { if(!avoidReset) _resetSearchInput(); ctrl.focusser.prop('disabled', true); //Will reactivate it on .close() ctrl.open = true; ctrl.activeMatchIndex = -1; ctrl.activeIndex = ctrl.activeIndex >= ctrl.items.length ? 0 : ctrl.activeIndex; // Give it time to appear before focus $timeout(function() { ctrl.search = initSearchValue || ctrl.search; _searchInput[0].focus(); }); } }; ctrl.findGroupByName = function(name) { return ctrl.groups && ctrl.groups.filter(function(group) { return group.name === name; })[0]; }; ctrl.parseRepeatAttr = function(repeatAttr, groupByExp) { function updateGroups(items) { ctrl.groups = []; angular.forEach(items, function(item) { var groupFn = $scope.$eval(groupByExp); var groupName = angular.isFunction(groupFn) ? groupFn(item) : item[groupFn]; var group = ctrl.findGroupByName(groupName); if(group) { group.items.push(item); } else { ctrl.groups.push({name: groupName, items: [item]}); } }); ctrl.items = []; ctrl.groups.forEach(function(group) { ctrl.items = ctrl.items.concat(group.items); }); } function setPlainItems(items) { ctrl.items = items; } var setItemsFn = groupByExp ? updateGroups : setPlainItems; ctrl.parserResult = RepeatParser.parse(repeatAttr); ctrl.isGrouped = !!groupByExp; ctrl.itemProperty = ctrl.parserResult.itemName; // See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L259 $scope.$watchCollection(ctrl.parserResult.source, function(items) { if (items === undefined || items === null) { // If the user specifies undefined or null => reset the collection // Special case: items can be undefined if the user did not initialized the collection on the scope // i.e $scope.addresses = [] is missing ctrl.items = []; } else { if (!angular.isArray(items)) { throw uiSelectMinErr('items', "Expected an array but got '{0}'.", items); } else { if (ctrl.multiple){ //Remove already selected items (ex: while searching) var filteredItems = items.filter(function(i) {return ctrl.selected.indexOf(i) < 0;}); setItemsFn(filteredItems); }else{ setItemsFn(items); } ctrl.ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters } } }); if (ctrl.multiple){ //Remove already selected items $scope.$watchCollection('$select.selected', function(selectedItems){ var data = ctrl.parserResult.source($scope); if (!selectedItems.length) { setItemsFn(data); }else{ var filteredItems = data.filter(function(i) {return selectedItems.indexOf(i) < 0;}); setItemsFn(filteredItems); } ctrl.sizeSearchInput(); }); } }; var _refreshDelayPromise; /** * Typeahead mode: lets the user refresh the collection using his own function. * * See Expose $select.search for external / remote filtering https://github.com/angular-ui/ui-select/pull/31 */ ctrl.refresh = function(refreshAttr) { if (refreshAttr !== undefined) { // Debounce // See https://github.com/angular-ui/bootstrap/blob/0.10.0/src/typeahead/typeahead.js#L155 // FYI AngularStrap typeahead does not have debouncing: https://github.com/mgcrea/angular-strap/blob/v2.0.0-rc.4/src/typeahead/typeahead.js#L177 if (_refreshDelayPromise) { $timeout.cancel(_refreshDelayPromise); } _refreshDelayPromise = $timeout(function() { $scope.$eval(refreshAttr); }, ctrl.refreshDelay); } }; ctrl.setActiveItem = function(item) { ctrl.activeIndex = ctrl.items.indexOf(item); }; ctrl.isActive = function(itemScope) { return ctrl.open && ctrl.items.indexOf(itemScope[ctrl.itemProperty]) === ctrl.activeIndex; }; ctrl.isDisabled = function(itemScope) { if (!ctrl.open) return; var itemIndex = ctrl.items.indexOf(itemScope[ctrl.itemProperty]); var isDisabled = false; var item; if (itemIndex >= 0 && !angular.isUndefined(ctrl.disableChoiceExpression)) { item = ctrl.items[itemIndex]; isDisabled = !!(itemScope.$eval(ctrl.disableChoiceExpression)); // force the boolean value item._uiSelectChoiceDisabled = isDisabled; // store this for later reference } return isDisabled; }; // When the user clicks on an item inside the dropdown ctrl.select = function(item, skipFocusser) { if (item === undefined || !item._uiSelectChoiceDisabled) { var locals = {}; locals[ctrl.parserResult.itemName] = item; ctrl.onSelectCallback($scope, { $item: item, $model: ctrl.parserResult.modelMapper($scope, locals) }); if(ctrl.multiple){ ctrl.selected.push(item); ctrl.sizeSearchInput(); } else { ctrl.selected = item; } ctrl.close(skipFocusser); } }; // Closes the dropdown ctrl.close = function(skipFocusser) { if (!ctrl.open) return; _resetSearchInput(); ctrl.open = false; if (!ctrl.multiple){ $timeout(function(){ ctrl.focusser.prop('disabled', false); if (!skipFocusser) ctrl.focusser[0].focus(); },0,false); } }; // Toggle dropdown ctrl.toggle = function(e) { if (ctrl.open) ctrl.close(); else ctrl.activate(); e.preventDefault(); e.stopPropagation(); }; // Remove item from multiple select ctrl.removeChoice = function(index){ var removedChoice = ctrl.selected[index]; var locals = {}; locals[ctrl.parserResult.itemName] = removedChoice; ctrl.selected.splice(index, 1); ctrl.activeMatchIndex = -1; ctrl.sizeSearchInput(); ctrl.onRemoveCallback($scope, { $item: removedChoice, $model: ctrl.parserResult.modelMapper($scope, locals) }); }; ctrl.getPlaceholder = function(){ //Refactor single? if(ctrl.multiple && ctrl.selected.length) return; return ctrl.placeholder; }; ctrl.sizeSearchInput = function(){ var input = _searchInput[0], container = _searchInput.parent().parent()[0]; _searchInput.css('width','10px'); $timeout(function(){ var newWidth = container.clientWidth - input.offsetLeft - 10; if(newWidth < 50) newWidth = container.clientWidth; _searchInput.css('width',newWidth+'px'); }, 0, false); }; function _handleDropDownSelection(key) { var processed = true; switch (key) { case KEY.DOWN: if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode else if (ctrl.activeIndex < ctrl.items.length - 1) { ctrl.activeIndex++; } break; case KEY.UP: if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode else if (ctrl.activeIndex > 0) { ctrl.activeIndex--; } break; case KEY.TAB: if (!ctrl.multiple || ctrl.open) ctrl.select(ctrl.items[ctrl.activeIndex], true); break; case KEY.ENTER: if(ctrl.open){ ctrl.select(ctrl.items[ctrl.activeIndex]); } else { ctrl.activate(false, true); //In case its the search input in 'multiple' mode } break; case KEY.ESC: ctrl.close(); break; default: processed = false; } return processed; } // Handles selected options in "multiple" mode function _handleMatchSelection(key){ var caretPosition = _getCaretPosition(_searchInput[0]), length = ctrl.selected.length, // none = -1, first = 0, last = length-1, curr = ctrl.activeMatchIndex, next = ctrl.activeMatchIndex+1, prev = ctrl.activeMatchIndex-1, newIndex = curr; if(caretPosition > 0 || (ctrl.search.length && key == KEY.RIGHT)) return false; ctrl.close(); function getNewActiveMatchIndex(){ switch(key){ case KEY.LEFT: // Select previous/first item if(~ctrl.activeMatchIndex) return prev; // Select last item else return last; break; case KEY.RIGHT: // Open drop-down if(!~ctrl.activeMatchIndex || curr === last){ ctrl.activate(); return false; } // Select next/last item else return next; break; case KEY.BACKSPACE: // Remove selected item and select previous/first if(~ctrl.activeMatchIndex){ ctrl.removeChoice(curr); return prev; } // Select last item else return last; break; case KEY.DELETE: // Remove selected item and select next item if(~ctrl.activeMatchIndex){ ctrl.removeChoice(ctrl.activeMatchIndex); return curr; } else return false; } } newIndex = getNewActiveMatchIndex(); if(!ctrl.selected.length || newIndex === false) ctrl.activeMatchIndex = -1; else ctrl.activeMatchIndex = Math.min(last,Math.max(first,newIndex)); return true; } // Bind to keyboard shortcuts _searchInput.on('keydown', function(e) { var key = e.which; // if(~[KEY.ESC,KEY.TAB].indexOf(key)){ // //TODO: SEGURO? // ctrl.close(); // } $scope.$apply(function() { var processed = false; if(ctrl.multiple && KEY.isHorizontalMovement(key)){ processed = _handleMatchSelection(key); } if (!processed && ctrl.items.length > 0) { processed = _handleDropDownSelection(key); } if (processed && key != KEY.TAB) { //TODO Check si el tab selecciona aun correctamente //Crear test e.preventDefault(); e.stopPropagation(); } }); if(KEY.isVerticalMovement(key) && ctrl.items.length > 0){ _ensureHighlightVisible(); } }); _searchInput.on('blur', function() { $timeout(function() { ctrl.activeMatchIndex = -1; }); }); function _getCaretPosition(el) { if(angular.isNumber(el.selectionStart)) return el.selectionStart; // selectionStart is not supported in IE8 and we don't want hacky workarounds so we compromise else return el.value.length; } // See https://github.com/ivaynberg/select2/blob/3.4.6/select2.js#L1431 function _ensureHighlightVisible() { var container = $element.querySelectorAll('.ui-select-choices-content'); var choices = container.querySelectorAll('.ui-select-choices-row'); if (choices.length < 1) { throw uiSelectMinErr('choices', "Expected multiple .ui-select-choices-row but got '{0}'.", choices.length); } var highlighted = choices[ctrl.activeIndex]; var posY = highlighted.offsetTop + highlighted.clientHeight - container[0].scrollTop; var height = container[0].offsetHeight; if (posY > height) { container[0].scrollTop += posY - height; } else if (posY < highlighted.clientHeight) { if (ctrl.isGrouped && ctrl.activeIndex === 0) container[0].scrollTop = 0; //To make group header visible when going all the way up else container[0].scrollTop -= highlighted.clientHeight - posY; } } $scope.$on('$destroy', function() { _searchInput.off('keydown blur'); }); }]) .directive('uiSelect', ['$document', 'uiSelectConfig', 'uiSelectMinErr', '$compile', '$parse', function($document, uiSelectConfig, uiSelectMinErr, $compile, $parse) { return { restrict: 'EA', templateUrl: function(tElement, tAttrs) { var theme = tAttrs.theme || uiSelectConfig.theme; return theme + (angular.isDefined(tAttrs.multiple) ? '/select-multiple.tpl.html' : '/select.tpl.html'); }, replace: true, transclude: true, require: ['uiSelect', 'ngModel'], scope: true, controller: 'uiSelectCtrl', controllerAs: '$select', link: function(scope, element, attrs, ctrls, transcludeFn) { var $select = ctrls[0]; var ngModel = ctrls[1]; var searchInput = element.querySelectorAll('input.ui-select-search'); $select.multiple = (angular.isDefined(attrs.multiple)) ? (attrs.multiple === '') ? true : (attrs.multiple.toLowerCase() === 'true') : false; $select.onSelectCallback = $parse(attrs.onSelect); $select.onRemoveCallback = $parse(attrs.onRemove); //From view --> model ngModel.$parsers.unshift(function (inputValue) { var locals = {}, result; if ($select.multiple){ var resultMultiple = []; for (var j = $select.selected.length - 1; j >= 0; j--) { locals = {}; locals[$select.parserResult.itemName] = $select.selected[j]; result = $select.parserResult.modelMapper(scope, locals); resultMultiple.unshift(result); } return resultMultiple; }else{ locals = {}; locals[$select.parserResult.itemName] = inputValue; result = $select.parserResult.modelMapper(scope, locals); return result; } }); //From model --> view ngModel.$formatters.unshift(function (inputValue) { var data = $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search locals = {}, result; if (data){ if ($select.multiple){ var resultMultiple = []; var checkFnMultiple = function(list, value){ if (!list || !list.length) return; for (var p = list.length - 1; p >= 0; p--) { locals[$select.parserResult.itemName] = list[p]; result = $select.parserResult.modelMapper(scope, locals); if (result == value){ resultMultiple.unshift(list[p]); return true; } } return false; }; if (!inputValue) return resultMultiple; //If ngModel was undefined for (var k = inputValue.length - 1; k >= 0; k--) { if (!checkFnMultiple($select.selected, inputValue[k])){ checkFnMultiple(data, inputValue[k]); } } return resultMultiple; }else{ var checkFnSingle = function(d){ locals[$select.parserResult.itemName] = d; result = $select.parserResult.modelMapper(scope, locals); return result == inputValue; }; //If possible pass same object stored in $select.selected if ($select.selected && checkFnSingle($select.selected)) { return $select.selected; } for (var i = data.length - 1; i >= 0; i--) { if (checkFnSingle(data[i])) return data[i]; } } } return inputValue; }); //Set reference to ngModel from uiSelectCtrl $select.ngModel = ngModel; //Idea from: https://github.com/ivaynberg/select2/blob/79b5bf6db918d7560bdd959109b7bcfb47edaf43/select2.js#L1954 var focusser = angular.element("<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' aria-haspopup='true' role='button' />"); if(attrs.tabindex){ //tabindex might be an expression, wait until it contains the actual value before we set the focusser tabindex attrs.$observe('tabindex', function(value) { //If we are using multiple, add tabindex to the search input if($select.multiple){ searchInput.attr("tabindex", value); } else { focusser.attr("tabindex", value); } //Remove the tabindex on the parent so that it is not focusable element.removeAttr("tabindex"); }); } $compile(focusser)(scope); $select.focusser = focusser; if (!$select.multiple){ element.append(focusser); focusser.bind("focus", function(){ scope.$evalAsync(function(){ $select.focus = true; }); }); focusser.bind("blur", function(){ scope.$evalAsync(function(){ $select.focus = false; }); }); focusser.bind("keydown", function(e){ if (e.which === KEY.BACKSPACE) { e.preventDefault(); e.stopPropagation(); $select.select(undefined); scope.$apply(); return; } if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) { return; } if (e.which == KEY.DOWN || e.which == KEY.UP || e.which == KEY.ENTER || e.which == KEY.SPACE){ e.preventDefault(); e.stopPropagation(); $select.activate(); } scope.$digest(); }); focusser.bind("keyup input", function(e){ if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || e.which == KEY.ENTER || e.which === KEY.BACKSPACE) { return; } $select.activate(focusser.val()); //User pressed some regular key, so we pass it to the search input focusser.val(''); scope.$digest(); }); } scope.$watch('searchEnabled', function() { var searchEnabled = scope.$eval(attrs.searchEnabled); $select.searchEnabled = searchEnabled !== undefined ? searchEnabled : true; }); attrs.$observe('disabled', function() { // No need to use $eval() (thanks to ng-disabled) since we already get a boolean instead of a string $select.disabled = attrs.disabled !== undefined ? attrs.disabled : false; }); attrs.$observe('resetSearchInput', function() { // $eval() is needed otherwise we get a string instead of a boolean var resetSearchInput = scope.$eval(attrs.resetSearchInput); $select.resetSearchInput = resetSearchInput !== undefined ? resetSearchInput : true; }); if ($select.multiple){ scope.$watchCollection('$select.selected', function() { ngModel.$setViewValue(Date.now()); //Set timestamp as a unique string to force changes }); focusser.prop('disabled', true); //Focusser isn't needed if multiple }else{ scope.$watch('$select.selected', function(newValue) { if (ngModel.$viewValue !== newValue) { ngModel.$setViewValue(newValue); } }); } ngModel.$render = function() { if($select.multiple){ // Make sure that model value is array if(!angular.isArray(ngModel.$viewValue)){ // Have tolerance for null or undefined values if(angular.isUndefined(ngModel.$viewValue) || ngModel.$viewValue === null){ $select.selected = []; } else { throw uiSelectMinErr('multiarr', "Expected model value to be array but got '{0}'", ngModel.$viewValue); } } } $select.selected = ngModel.$viewValue; }; function onDocumentClick(e) { var contains = false; if (window.jQuery) { // Firefox 3.6 does not support element.contains() // See Node.contains https://developer.mozilla.org/en-US/docs/Web/API/Node.contains contains = window.jQuery.contains(element[0], e.target); } else { contains = element[0].contains(e.target); } if (!contains) { $select.close(); scope.$digest(); } } // See Click everywhere but here event http://stackoverflow.com/questions/12931369 $document.on('click', onDocumentClick); scope.$on('$destroy', function() { $document.off('click', onDocumentClick); }); // Move transcluded elements to their correct position in main template transcludeFn(scope, function(clone) { // See Transclude in AngularJS http://blog.omkarpatil.com/2012/11/transclude-in-angularjs.html // One day jqLite will be replaced by jQuery and we will be able to write: // var transcludedElement = clone.filter('.my-class') // instead of creating a hackish DOM element: var transcluded = angular.element('<div>').append(clone); var transcludedMatch = transcluded.querySelectorAll('.ui-select-match'); transcludedMatch.removeAttr('ui-select-match'); //To avoid loop in case directive as attr if (transcludedMatch.length !== 1) { throw uiSelectMinErr('transcluded', "Expected 1 .ui-select-match but got '{0}'.", transcludedMatch.length); } element.querySelectorAll('.ui-select-match').replaceWith(transcludedMatch); var transcludedChoices = transcluded.querySelectorAll('.ui-select-choices'); transcludedChoices.removeAttr('ui-select-choices'); //To avoid loop in case directive as attr if (transcludedChoices.length !== 1) { throw uiSelectMinErr('transcluded', "Expected 1 .ui-select-choices but got '{0}'.", transcludedChoices.length); } element.querySelectorAll('.ui-select-choices').replaceWith(transcludedChoices); }); } }; }]) .directive('uiSelectChoices', ['uiSelectConfig', 'RepeatParser', 'uiSelectMinErr', '$compile', function(uiSelectConfig, RepeatParser, uiSelectMinErr, $compile) { return { restrict: 'EA', require: '^uiSelect', replace: true, transclude: true, templateUrl: function(tElement) { // Gets theme attribute from parent (ui-select) var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; return theme + '/choices.tpl.html'; }, compile: function(tElement, tAttrs) { if (!tAttrs.repeat) throw uiSelectMinErr('repeat', "Expected 'repeat' expression."); return function link(scope, element, attrs, $select, transcludeFn) { // var repeat = RepeatParser.parse(attrs.repeat); var groupByExp = attrs.groupBy; $select.parseRepeatAttr(attrs.repeat, groupByExp); //Result ready at $select.parserResult $select.disableChoiceExpression = attrs.uiDisableChoice; if(groupByExp) { var groups = element.querySelectorAll('.ui-select-choices-group'); if (groups.length !== 1) throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-group but got '{0}'.", groups.length); groups.attr('ng-repeat', RepeatParser.getGroupNgRepeatExpression()); } var choices = element.querySelectorAll('.ui-select-choices-row'); if (choices.length !== 1) { throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-row but got '{0}'.", choices.length); } choices.attr('ng-repeat', RepeatParser.getNgRepeatExpression($select.parserResult.itemName, '$select.items', $select.parserResult.trackByExp, groupByExp)) .attr('ng-mouseenter', '$select.setActiveItem('+$select.parserResult.itemName +')') .attr('ng-click', '$select.select(' + $select.parserResult.itemName + ')'); var rowsInner = element.querySelectorAll('.ui-select-choices-row-inner'); if (rowsInner.length !== 1) throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-row-inner but got '{0}'.", rowsInner.length); rowsInner.attr('uis-transclude-append', ''); //Adding uisTranscludeAppend directive to row element after choices element has ngRepeat $compile(element, transcludeFn)(scope); //Passing current transcludeFn to be able to append elements correctly from uisTranscludeAppend scope.$watch('$select.search', function(newValue) { if(newValue && !$select.open && $select.multiple) $select.activate(false, true); $select.activeIndex = 0; $select.refresh(attrs.refresh); }); attrs.$observe('refreshDelay', function() { // $eval() is needed otherwise we get a string instead of a number var refreshDelay = scope.$eval(attrs.refreshDelay); $select.refreshDelay = refreshDelay !== undefined ? refreshDelay : uiSelectConfig.refreshDelay; }); }; } }; }]) // Recreates old behavior of ng-transclude. Used internally. .directive('uisTranscludeAppend', function () { return { link: function (scope, element, attrs, ctrl, transclude) { transclude(scope, function (clone) { element.append(clone); }); } }; }) .directive('uiSelectMatch', ['uiSelectConfig', function(uiSelectConfig) { return { restrict: 'EA', require: '^uiSelect', replace: true, transclude: true, templateUrl: function(tElement) { // Gets theme attribute from parent (ui-select) var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; var multi = tElement.parent().attr('multiple'); return theme + (multi ? '/match-multiple.tpl.html' : '/match.tpl.html'); }, link: function(scope, element, attrs, $select) { attrs.$observe('placeholder', function(placeholder) { $select.placeholder = placeholder !== undefined ? placeholder : uiSelectConfig.placeholder; }); if($select.multiple){ $select.sizeSearchInput(); } } }; }]) /** * Highlights text that matches $select.search. * * Taken from AngularUI Bootstrap Typeahead * See https://github.com/angular-ui/bootstrap/blob/0.10.0/src/typeahead/typeahead.js#L340 */ .filter('highlight', function() { function escapeRegexp(queryToEscape) { return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'); } return function(matchItem, query) { return query && matchItem ? matchItem.replace(new RegExp(escapeRegexp(query), 'gi'), '<span class="ui-select-highlight">$&</span>') : matchItem; }; }); }()); angular.module("ui.select").run(["$templateCache", function($templateCache) {$templateCache.put("bootstrap/choices.tpl.html","<ul class=\"ui-select-choices ui-select-choices-content dropdown-menu\" role=\"menu\" aria-labelledby=\"dLabel\" ng-show=\"$select.items.length > 0\"><li class=\"ui-select-choices-group\"><div class=\"divider\" ng-show=\"$select.isGrouped && $index > 0\"></div><div ng-show=\"$select.isGrouped\" class=\"ui-select-choices-group-label dropdown-header\">{{$group.name}}</div><div class=\"ui-select-choices-row\" ng-class=\"{active: $select.isActive(this), disabled: $select.isDisabled(this)}\"><a href=\"javascript:void(0)\" class=\"ui-select-choices-row-inner\"></a></div></li></ul>"); $templateCache.put("bootstrap/match-multiple.tpl.html","<span class=\"ui-select-match\"><span ng-repeat=\"$item in $select.selected\"><span style=\"margin-right: 3px;\" class=\"ui-select-match-item btn btn-default btn-xs\" tabindex=\"-1\" type=\"button\" ng-disabled=\"$select.disabled\" ng-click=\"$select.activeMatchIndex = $index;\" ng-class=\"{\'btn-primary\':$select.activeMatchIndex === $index}\"><span class=\"close ui-select-match-close\" ng-hide=\"$select.disabled\" ng-click=\"$select.removeChoice($index)\">&nbsp;&times;</span> <span uis-transclude-append=\"\"></span></span></span></span>"); $templateCache.put("bootstrap/match.tpl.html","<button type=\"button\" class=\"btn btn-default form-control ui-select-match\" tabindex=\"-1\" ng-hide=\"$select.open\" ng-disabled=\"$select.disabled\" ng-class=\"{\'btn-default-focus\':$select.focus}\" ;=\"\" ng-click=\"$select.activate()\"><span ng-show=\"$select.searchEnabled && $select.isEmpty()\" class=\"text-muted\">{{$select.placeholder}}</span> <span ng-hide=\"$select.isEmpty()\" ng-transclude=\"\"></span> <span class=\"caret ui-select-toggle\" ng-click=\"$select.toggle($event)\"></span></button>"); $templateCache.put("bootstrap/select-multiple.tpl.html","<div class=\"ui-select-multiple ui-select-bootstrap dropdown form-control\" ng-class=\"{open: $select.open}\"><div><div class=\"ui-select-match\"></div><input type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"ui-select-search input-xs\" placeholder=\"{{$select.getPlaceholder()}}\" ng-disabled=\"$select.disabled\" ng-hide=\"$select.disabled\" ng-click=\"$select.activate()\" ng-model=\"$select.search\"></div><div class=\"ui-select-choices\"></div></div>"); $templateCache.put("bootstrap/select.tpl.html","<div class=\"ui-select-bootstrap dropdown\" ng-class=\"{open: $select.open}\"><div class=\"ui-select-match\"></div><input type=\"text\" autocomplete=\"off\" tabindex=\"-1\" class=\"form-control ui-select-search\" placeholder=\"{{$select.placeholder}}\" ng-model=\"$select.search\" ng-show=\"$select.searchEnabled && $select.open\"><div class=\"ui-select-choices\"></div></div>"); $templateCache.put("select2/choices.tpl.html","<ul class=\"ui-select-choices ui-select-choices-content select2-results\"><li class=\"ui-select-choices-group\" ng-class=\"{\'select2-result-with-children\': $select.isGrouped}\"><div ng-show=\"$select.isGrouped\" class=\"ui-select-choices-group-label select2-result-label\">{{$group.name}}</div><ul ng-class=\"{\'select2-result-sub\': $select.isGrouped, \'select2-result-single\': !$select.isGrouped}\"><li class=\"ui-select-choices-row\" ng-class=\"{\'select2-highlighted\': $select.isActive(this), \'select2-disabled\': $select.isDisabled(this)}\"><div class=\"select2-result-label ui-select-choices-row-inner\"></div></li></ul></li></ul>"); $templateCache.put("select2/match-multiple.tpl.html","<span class=\"ui-select-match\"><li class=\"ui-select-match-item select2-search-choice\" ng-repeat=\"$item in $select.selected\" ng-class=\"{\'select2-search-choice-focus\':$select.activeMatchIndex === $index}\"><span uis-transclude-append=\"\"></span> <a href=\"javascript:;\" class=\"ui-select-match-close select2-search-choice-close\" ng-click=\"$select.removeChoice($index)\" tabindex=\"-1\"></a></li></span>"); $templateCache.put("select2/match.tpl.html","<a class=\"select2-choice ui-select-match\" ng-class=\"{\'select2-default\': $select.isEmpty()}\" ng-click=\"$select.activate()\"><span ng-show=\"$select.searchEnabled && $select.isEmpty()\" class=\"select2-chosen\">{{$select.placeholder}}</span> <span ng-hide=\"$select.isEmpty()\" class=\"select2-chosen\" ng-transclude=\"\"></span> <span class=\"select2-arrow ui-select-toggle\" ng-click=\"$select.toggle($event)\"><b></b></span></a>"); $templateCache.put("select2/select-multiple.tpl.html","<div class=\"ui-select-multiple select2 select2-container select2-container-multi\" ng-class=\"{\'select2-container-active select2-dropdown-open\': $select.open,\n \'select2-container-disabled\': $select.disabled}\"><ul class=\"select2-choices\"><span class=\"ui-select-match\"></span><li class=\"select2-search-field\"><input type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"select2-input ui-select-search\" placeholder=\"{{$select.getPlaceholder()}}\" ng-disabled=\"$select.disabled\" ng-hide=\"$select.disabled\" ng-model=\"$select.search\" ng-click=\"$select.activate()\" style=\"width: 34px;\"></li></ul><div class=\"select2-drop select2-with-searchbox select2-drop-active\" ng-class=\"{\'select2-display-none\': !$select.open}\"><div class=\"ui-select-choices\"></div></div></div>"); $templateCache.put("select2/select.tpl.html","<div class=\"select2 select2-container\" ng-class=\"{\'select2-container-active select2-dropdown-open\': $select.open,\n \'select2-container-disabled\': $select.disabled,\n \'select2-container-active\': $select.focus }\"><div class=\"ui-select-match\"></div><div class=\"select2-drop select2-with-searchbox select2-drop-active\" ng-class=\"{\'select2-display-none\': !$select.open}\"><div class=\"select2-search\" ng-show=\"$select.searchEnabled\"><input type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"ui-select-search select2-input\" ng-model=\"$select.search\"></div><div class=\"ui-select-choices\"></div></div></div>"); $templateCache.put("selectize/choices.tpl.html","<div ng-show=\"$select.open\" class=\"ui-select-choices selectize-dropdown single\"><div class=\"ui-select-choices-content selectize-dropdown-content\"><div class=\"ui-select-choices-group optgroup\"><div ng-show=\"$select.isGrouped\" class=\"ui-select-choices-group-label optgroup-header\">{{$group.name}}</div><div class=\"ui-select-choices-row\" ng-class=\"{active: $select.isActive(this), disabled: $select.isDisabled(this)}\"><div class=\"option ui-select-choices-row-inner\" data-selectable=\"\"></div></div></div></div></div>"); $templateCache.put("selectize/match.tpl.html","<div ng-hide=\"$select.searchEnabled && ($select.open || $select.isEmpty())\" class=\"ui-select-match\" ng-transclude=\"\"></div>"); $templateCache.put("selectize/select.tpl.html","<div class=\"selectize-control single\"><div class=\"selectize-input\" ng-class=\"{\'focus\': $select.open, \'disabled\': $select.disabled, \'selectize-focus\' : $select.focus}\" ng-click=\"$select.activate()\"><div class=\"ui-select-match\"></div><input type=\"text\" autocomplete=\"off\" tabindex=\"-1\" class=\"ui-select-search ui-select-toggle\" ng-click=\"$select.toggle($event)\" placeholder=\"{{$select.placeholder}}\" ng-model=\"$select.search\" ng-hide=\"!$select.searchEnabled || ($select.selected && !$select.open)\" ng-disabled=\"$select.disabled\"></div><div class=\"ui-select-choices\"></div></div>");}]);
lib/index.js
janjachacz/redux-react-router-async-example
import '../assets/stylesheets/index.css' import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'react-redux' import Root, { store } from './Root' import { addLocaleData } from 'react-intl' import en from 'react-intl/lib/locale-data/en' import de from 'react-intl/lib/locale-data/de' import it from 'react-intl/lib/locale-data/it' addLocaleData(en) addLocaleData(de) addLocaleData(it) // All modern browsers, except `Safari`, have implemented // the `ECMAScript Internationalization API`. // For that we need to patch in on runtime. if (!global.Intl) require.ensure(['intl'], require => { require('intl').default start() }, 'IntlBundle') else start() function start () { ReactDOM.render( <Provider store={store}> <Root /> </Provider> , document.getElementById('app')) }
src/components/LaserTagHeader.js
bobrown101/phi-tau
import React from 'react'; const LaserTagHeader = React.createClass({ render () { return ( <div id="lasertag-header" className="animated fadeIn"> <div id="header" className="text-center"> </div> </div> ); } }); export default LaserTagHeader;
docs/src/SupportPage.js
blue68/react-bootstrap
import React from 'react'; import NavMain from './NavMain'; import PageHeader from './PageHeader'; import PageFooter from './PageFooter'; export default class Page extends React.Component { render() { return ( <div> <NavMain activePage="support" /> <PageHeader title="Need help?" subTitle="Community resources for answering your React-Bootstrap questions." /> <div className="container bs-docs-container"> <div className="row"> <div className="col-md-9" role="main"> <div className="bs-docs-section"> <p className="lead">Stay up to date on the development of React-Bootstrap and reach out to the community with these helpful resources.</p> <h3>Stack Overflow</h3> <p><a href="http://stackoverflow.com/questions/ask">Ask questions</a> about specific problems you have faced, including details about what exactly you are trying to do. Make sure you tag your question with <code className="js">react-bootstrap</code>. You can also read through <a href="http://stackoverflow.com/questions/tagged/react-bootstrap">existing React-Bootstrap questions</a>.</p> <h3>Live help</h3> <p>Bring your questions and pair with other react-bootstrap users in a <a href="http://start.thinkful.com/react/?utm_source=github&utm_medium=badge&utm_campaign=react-bootstrap">live Thinkful hangout</a>. Hear about the challenges other developers are running into, or screenshare your own code with the group for feedback.</p> <h3>Chat rooms</h3> <p>Discuss questions in the <code className="js">#react-bootstrap</code> channel on the <a href="http://www.reactiflux.com/">Reactiflux Slack</a> or on <a href="https://gitter.im/react-bootstrap/react-bootstrap">Gitter</a>.</p> <h3>GitHub issues</h3> <p>The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests. See more about how we use issues in the <a href="https://github.com/react-bootstrap/react-bootstrap/blob/master/CONTRIBUTING.md#issues">contribution guidelines</a>.</p> </div> </div> </div> </div> <PageFooter /> </div> ); } shouldComponentUpdate() { return false; } }
src/front/src/index.js
demarkok/cyclist-comparison
import React from 'react'; import ReactDOM from 'react-dom'; import injectTapEventPlugin from 'react-tap-event-plugin'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import MenuHeader from './components/menu.js'; import BodyBackgroundColor from 'react-body-backgroundcolor'; injectTapEventPlugin(); const App = () => ( <BodyBackgroundColor backgroundColor='#F0F8FF'> <MuiThemeProvider> <MenuHeader /> </MuiThemeProvider> </BodyBackgroundColor> ); ReactDOM.render( <App />, document.getElementById('app') );
src/js/NativeCheckbox.js
jakezatecky/react-checkbox-tree
import PropTypes from 'prop-types'; import React from 'react'; class NativeCheckbox extends React.PureComponent { static propTypes = { indeterminate: PropTypes.bool, }; static defaultProps = { indeterminate: false, }; componentDidMount() { this.updateDeterminateProperty(); } componentDidUpdate() { this.updateDeterminateProperty(); } updateDeterminateProperty() { const { indeterminate } = this.props; this.checkbox.indeterminate = indeterminate; } render() { const props = { ...this.props }; // Remove property that does not exist in HTML delete props.indeterminate; return <input {...props} ref={(c) => { this.checkbox = c; }} type="checkbox" />; } } export default NativeCheckbox;
node_modules/react-icons/md/directions-ferry.js
bengimbel/Solstice-React-Contacts-Project
import React from 'react' import Icon from 'react-icon-base' const MdDirectionsFerry = props => ( <Icon viewBox="0 0 40 40" {...props}> <g><path d="m10 10v6.6l10-3.2 10 3.2v-6.6h-20z m-3.4 21.6l-3.2-11.1q-0.5-1.5 1.1-2.1l2.1-0.7v-7.7q0-1.3 1.1-2.3t2.3-1.1h5v-5h10v5h5q1.3 0 2.3 1.1t1.1 2.3v7.7l2.1 0.7q1.6 0.6 1.1 2.1l-3.2 11.1h0q-3.9 0-6.8-3.2-2.8 3.2-6.6 3.2t-6.6-3.2q-2.9 3.2-6.8 3.2h0z m26.8 3.4h3.2v3.4h-3.2q-3.6 0-6.8-1.7-6.6 3.5-13.2 0-3.2 1.7-6.8 1.7h-3.2v-3.4h3.2q3.6 0 6.8-2.2 3 2.1 6.6 2.1t6.6-2.1q3.2 2.2 6.8 2.2z"/></g> </Icon> ) export default MdDirectionsFerry
client/components/operations/index.js
ZeHiro/kresus
import React from 'react'; import { connect } from 'react-redux'; import { translate as $t, formatDate } from '../../helpers'; import { get, actions } from '../../store'; import InfiniteList from '../ui/infinite-list'; import SearchComponent from './search'; import { OperationItem, PressableOperationItem } from './item'; import SyncButton from './sync-button'; import AddOperationModalButton from './add-operation-button'; import DisplayIf, { IfNotMobile } from '../ui/display-if'; import withCurrentAccountId from '../withCurrentAccountId'; // Infinite list properties. const OPERATION_BALLAST = 10; const CONTAINER_ID = 'content'; const SearchButton = connect( null, dispatch => { return { handleClick() { actions.toggleSearchDetails(dispatch); } }; } )(props => { return ( <button type="button" className="btn transparent" aria-label={$t('client.search.title')} onClick={props.handleClick} title={$t('client.search.title')}> <span className="fa fa-search" /> <span className="label">{$t('client.search.title')}</span> </button> ); }); // Keep in sync with style.css. function getOperationHeight(isSmallScreen) { return isSmallScreen ? 41 : 55; } class OperationsComponent extends React.Component { refOperationTable = React.createRef(); refTableCaption = React.createRef(); refThead = React.createRef(); state = { heightAbove: 0 }; renderItems = (itemIds, low, high) => { let Item = this.props.isSmallScreen ? PressableOperationItem : OperationItem; let max = Math.min(itemIds.length, high); let renderedItems = []; for (let i = low; i < max; ++i) { renderedItems.push( <Item key={itemIds[i]} operationId={itemIds[i]} formatCurrency={this.props.account.formatCurrency} isMobile={this.props.isSmallScreen} /> ); } return renderedItems; }; getHeightAbove = () => { return ( this.refOperationTable.current.offsetTop + this.refTableCaption.current.scrollHeight + this.refThead.current.scrollHeight ); }; componentDidMount() { // Called after first render => safe to use references. // eslint-disable-next-line react/no-did-mount-set-state this.setState({ heightAbove: this.getHeightAbove() }); } componentDidUpdate() { let heightAbove = this.getHeightAbove(); if (heightAbove !== this.state.heightAbove) { // eslint-disable-next-line react/no-did-update-set-state this.setState({ heightAbove }); } } render() { let asOf = $t('client.operations.as_of'); let lastCheckDate = formatDate.toShortString(this.props.account.lastCheckDate); lastCheckDate = `${asOf} ${lastCheckDate}`; let { balance, formatCurrency } = this.props.account; return ( <div> <p className="account-summary"> <span className="icon"> <span className="fa fa-balance-scale" /> </span> <span className="amount">{formatCurrency(balance)}</span> <span>{$t('client.operations.current_balance')}</span> <span className="separator">&nbsp;</span> <span className="date">{lastCheckDate}</span> </p> <div className="operation-toolbar"> <ul> <li> <SearchButton /> </li> <li> <SyncButton account={this.props.account} /> </li> <li> <AddOperationModalButton accountId={this.props.account.id} /> </li> </ul> <SearchComponent /> </div> <DisplayIf condition={this.props.hasSearchFields}> <ul className="search-summary"> <li className="received"> <span className="fa fa-arrow-down" /> <span>{$t('client.operations.received')}</span> <span>{this.props.positiveSum}</span> </li> <li className="spent"> <span className="fa fa-arrow-up" /> <span>{$t('client.operations.spent')}</span> <span>{this.props.negativeSum}</span> </li> <li className="saved"> <span className="fa fa-database" /> <span>{$t('client.operations.saved')}</span> <span>{this.props.wellSum}</span> </li> </ul> </DisplayIf> <table className="operation-table" ref={this.refOperationTable}> <caption ref={this.refTableCaption}>{$t('client.operations.title')}</caption> <thead ref={this.refThead}> <tr> <IfNotMobile> <th className="modale-button" /> </IfNotMobile> <th className="date">{$t('client.operations.column_date')}</th> <IfNotMobile> <th className="type">{$t('client.operations.column_type')}</th> </IfNotMobile> <th>{$t('client.operations.column_name')}</th> <th className="amount">{$t('client.operations.column_amount')}</th> <IfNotMobile> <th className="category"> {$t('client.operations.column_category')} </th> </IfNotMobile> </tr> </thead> <InfiniteList ballast={OPERATION_BALLAST} items={this.props.filteredOperationIds} itemHeight={this.props.operationHeight} heightAbove={this.state.heightAbove} renderItems={this.renderItems} containerId={CONTAINER_ID} key={this.props.account.id} /> </table> </div> ); } } function filter(state, operationsIds, search) { function contains(where, substring) { return where.toLowerCase().indexOf(substring) !== -1; } function filterIf(condition, array, callback) { if (condition) { return array.filter(callback); } return array; } // TODO : Use a better cache. let filtered = operationsIds.map(id => get.operationById(state, id)); // Filter! Apply most discriminatory / easiest filters first filtered = filterIf(search.categoryIds.length > 0, filtered, op => { return search.categoryIds.includes(op.categoryId); }); filtered = filterIf(search.type !== '', filtered, op => { return op.type === search.type; }); filtered = filterIf(search.amountLow !== null, filtered, op => { return op.amount >= search.amountLow; }); filtered = filterIf(search.amountHigh !== null, filtered, op => { return op.amount <= search.amountHigh; }); filtered = filterIf(search.dateLow !== null, filtered, op => { return op.date >= search.dateLow; }); filtered = filterIf(search.dateHigh !== null, filtered, op => { return op.date <= search.dateHigh; }); filtered = filterIf(search.keywords.length > 0, filtered, op => { for (let str of search.keywords) { if ( !contains(op.rawLabel, str) && !contains(op.label, str) && (op.customLabel === null || !contains(op.customLabel, str)) ) { return false; } } return true; }); filtered = filtered.map(op => op.id); return filtered; } // Returns operation ids. function filterOperationsThisMonth(state, operationsId) { let now = new Date(); let currentYear = now.getFullYear(); let currentMonth = now.getMonth(); return operationsId.filter(id => { let op = get.operationById(state, id); return ( op.budgetDate.getFullYear() === currentYear && op.budgetDate.getMonth() === currentMonth ); }); } function computeTotal(state, filterFunction, operationIds) { let total = operationIds .map(id => get.operationById(state, id)) .filter(filterFunction) .reduce((a, b) => a + b.amount, 0); return Math.round(total * 100) / 100; } const Export = connect((state, ownProps) => { let { currentAccountId } = ownProps; let account = get.accountById(state, currentAccountId); let operationIds = get.operationIdsByAccountId(state, currentAccountId); let hasSearchFields = get.hasSearchFields(state); let filteredOperationIds = get.hasSearchFields(state) ? filter(state, operationIds, get.searchFields(state)) : operationIds; let wellOperationIds; if (hasSearchFields) { wellOperationIds = filteredOperationIds; } else { wellOperationIds = filterOperationsThisMonth(state, operationIds); } let positiveSum = computeTotal(state, x => x.amount > 0, wellOperationIds); let negativeSum = computeTotal(state, x => x.amount < 0, wellOperationIds); let wellSum = positiveSum + negativeSum; let format = account.formatCurrency; positiveSum = format(positiveSum); negativeSum = format(negativeSum); wellSum = format(wellSum); let isSmallScreen = get.isSmallScreen(state); let operationHeight = getOperationHeight(isSmallScreen); return { account, filteredOperationIds, hasSearchFields, wellSum, positiveSum, negativeSum, isSmallScreen, operationHeight, displaySearchDetails: get.displaySearchDetails(state) }; })(OperationsComponent); export default withCurrentAccountId(Export);
src/user/components/personal_details/news_type_buttons.js
foundersandcoders/sail-back
import React from 'react' export default ({ confirmation, which_text, which_delete, reset }) => <div> <h3>Newsletters are hand delivered</h3> <p> Currently Newsletters are posted (or hand delivered) to you three times a year – and it’s also available for you to read Online on the Friends website. If you opted to read it online it would help us reduce postage and printing costs. If you would like to take that option please select Online instead of Post. </p> <button onClick={which_delete()} className={confirmation ? 'green' : ''}> {which_text()} </button> {confirmation && <button onClick={reset} className='red'>Cancel</button>} </div>
ajax/libs/6to5/2.11.0/browser-polyfill.js
wmkcc/cdnjs
(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){require("core-js/shim");require("regenerator/runtime")},{"core-js/shim":2,"regenerator/runtime":3}],2:[function(require,module,exports){(function(global){!function(global,framework,undefined){"use strict";var OBJECT="Object",FUNCTION="Function",ARRAY="Array",STRING="String",NUMBER="Number",REGEXP="RegExp",DATE="Date",MAP="Map",SET="Set",WEAKMAP="WeakMap",WEAKSET="WeakSet",SYMBOL="Symbol",PROMISE="Promise",MATH="Math",ARGUMENTS="Arguments",PROTOTYPE="prototype",CONSTRUCTOR="constructor",TO_STRING="toString",TO_STRING_TAG=TO_STRING+"Tag",TO_LOCALE="toLocaleString",HAS_OWN="hasOwnProperty",FOR_EACH="forEach",ITERATOR="iterator",FF_ITERATOR="@@"+ITERATOR,PROCESS="process",CREATE_ELEMENT="createElement",Function=global[FUNCTION],Object=global[OBJECT],Array=global[ARRAY],String=global[STRING],Number=global[NUMBER],RegExp=global[REGEXP],Date=global[DATE],Map=global[MAP],Set=global[SET],WeakMap=global[WEAKMAP],WeakSet=global[WEAKSET],Symbol=global[SYMBOL],Math=global[MATH],TypeError=global.TypeError,setTimeout=global.setTimeout,setImmediate=global.setImmediate,clearImmediate=global.clearImmediate,process=global[PROCESS],nextTick=process&&process.nextTick,document=global.document,html=document&&document.documentElement,navigator=global.navigator,define=global.define,ArrayProto=Array[PROTOTYPE],ObjectProto=Object[PROTOTYPE],FunctionProto=Function[PROTOTYPE],Infinity=1/0,DOT=".";function isObject(it){return it!=null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}var isNative=ctx(/./.test,/\[native code\]\s*\}\s*$/,1);var buildIn={Undefined:1,Null:1,Array:1,String:1,Arguments:1,Function:1,Error:1,Boolean:1,Number:1,Date:1,RegExp:1},toString=ObjectProto[TO_STRING];function setToStringTag(it,tag,stat){if(it&&!has(it=stat?it:it[PROTOTYPE],SYMBOL_TAG))hidden(it,SYMBOL_TAG,tag)}function cof(it){return it==undefined?it===undefined?"Undefined":"Null":toString.call(it).slice(8,-1)}function classof(it){var klass=cof(it),tag;return klass==OBJECT&&(tag=it[SYMBOL_TAG])?has(buildIn,tag)?"~"+tag:tag:klass}var call=FunctionProto.call,apply=FunctionProto.apply,REFERENCE_GET;function part(){var length=arguments.length,args=Array(length),i=0,_=path._,holder=false;while(length>i)if((args[i]=arguments[i++])===_)holder=true;return partial(this,args,length,holder,_,false)}function partial(fn,argsPart,lengthPart,holder,_,bind,context){assertFunction(fn);return function(){var that=bind?context:this,length=arguments.length,i=0,j=0,args;if(!holder&&!length)return invoke(fn,argsPart,that);args=argsPart.slice();if(holder)for(;lengthPart>i;i++)if(args[i]===_)args[i]=arguments[j++];while(length>j)args.push(arguments[j++]);return invoke(fn,args,that)}}function ctx(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}function invoke(fn,args,that){var un=that===undefined;switch(args.length|0){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}function construct(target,argumentsList){var instance=create(target[PROTOTYPE]),result=apply.call(target,instance,argumentsList);return isObject(result)?result:instance}var create=Object.create,getPrototypeOf=Object.getPrototypeOf,setPrototypeOf=Object.setPrototypeOf,defineProperty=Object.defineProperty,defineProperties=Object.defineProperties,getOwnDescriptor=Object.getOwnPropertyDescriptor,getKeys=Object.keys,getNames=Object.getOwnPropertyNames,getSymbols=Object.getOwnPropertySymbols,has=ctx(call,ObjectProto[HAS_OWN],2),ES5Object=Object;function toObject(it){return ES5Object(assertDefined(it))}function returnIt(it){return it}function returnThis(){return this}function get(object,key){if(has(object,key))return object[key]}function ownKeys(it){return getSymbols?getNames(it).concat(getSymbols(it)):getNames(it)}var assign=Object.assign||function(target,source){var T=Object(assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=ES5Object(arguments[i++]),keys=getKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T};function keyOf(object,el){var O=toObject(object),keys=getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}function array(it){return String(it).split(",")}var push=ArrayProto.push,unshift=ArrayProto.unshift,slice=ArrayProto.slice,splice=ArrayProto.splice,indexOf=ArrayProto.indexOf,forEach=ArrayProto[FOR_EACH];function createArrayMethod(type){var isMap=type==1,isFilter=type==2,isSome=type==3,isEvery=type==4,isFindIndex=type==6,noholes=type==5||isFindIndex;return function(callbackfn){var O=Object(assertDefined(this)),that=arguments[1],self=ES5Object(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=isMap?Array(length):isFilter?[]:undefined,val,res;for(;length>index;index++)if(noholes||index in self){val=self[index];res=f(val,index,O);if(type){if(isMap)result[index]=res;else if(res)switch(type){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(isEvery)return false}}return isFindIndex?-1:isSome||isEvery?isEvery:result}}function createArrayContains(isContains){return function(el){var O=toObject(this),length=toLength(O.length),index=toIndex(arguments[1],length);if(isContains&&el!=el){for(;length>index;index++)if(sameNaN(O[index]))return isContains||index}else for(;length>index;index++)if(isContains||index in O){if(O[index]===el)return isContains||index}return!isContains&&-1}}function generic(A,B){return typeof A=="function"?A:B}var MAX_SAFE_INTEGER=9007199254740991,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min,random=Math.random,trunc=Math.trunc||function(it){return(it>0?floor:ceil)(it)};function sameNaN(number){return number!=number}function toInteger(it){return isNaN(it)?0:trunc(it)}function toLength(it){return it>0?min(toInteger(it),MAX_SAFE_INTEGER):0}function toIndex(index,length){var index=toInteger(index);return index<0?max(index+length,0):min(index,length)}function createReplacer(regExp,replace,isStatic){var replacer=isObject(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}function createPointAt(toString){return function(pos){var s=String(assertDefined(this)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return toString?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?toString?s.charAt(i):a:toString?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}var REDUCE_ERROR="Reduce of empty object with no initial value";function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}function assertDefined(it){if(it==undefined)throw TypeError("Function called on null or undefined");return it}function assertFunction(it){assert(isFunction(it),it," is not a function!");return it}function assertObject(it){assert(isObject(it),it," is not an object!");return it}function assertInstance(it,Constructor,name){assert(it instanceof Constructor,name,": use the 'new' operator!")}function descriptor(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return defineProperty(object,key,descriptor(bitmap,value))}:simpleSet}function uid(key){return SYMBOL+"("+key+")_"+(++sid+random())[TO_STRING](36)}function getWellKnownSymbol(name,setter){return Symbol&&Symbol[name]||(setter?Symbol:safeSymbol)(SYMBOL+DOT+name)}var DESC=!!function(){try{return defineProperty({},DOT,ObjectProto)}catch(e){}}(),sid=0,hidden=createDefiner(1),set=Symbol?simpleSet:hidden,safeSymbol=Symbol||uid;function assignHidden(target,src){for(var key in src)hidden(target,key,src[key]);return target}var SYMBOL_UNSCOPABLES=getWellKnownSymbol("unscopables"),ArrayUnscopables=ArrayProto[SYMBOL_UNSCOPABLES]||{};var SYMBOL_ITERATOR=getWellKnownSymbol(ITERATOR),SYMBOL_TAG=getWellKnownSymbol(TO_STRING_TAG),SUPPORT_FF_ITER=FF_ITERATOR in ArrayProto,ITER=safeSymbol("iter"),KEY=1,VALUE=2,Iterators={},IteratorPrototype={},NATIVE_ITERATORS=SYMBOL_ITERATOR in ArrayProto,BUGGY_ITERATORS="keys"in ArrayProto&&!("next"in[].keys());setIterator(IteratorPrototype,returnThis);function setIterator(O,value){hidden(O,SYMBOL_ITERATOR,value);SUPPORT_FF_ITER&&hidden(O,FF_ITERATOR,value)}function createIterator(Constructor,NAME,next,proto){Constructor[PROTOTYPE]=create(proto||IteratorPrototype,{next:descriptor(1,next)});setToStringTag(Constructor,NAME+" Iterator")}function defineIterator(Constructor,NAME,value,DEFAULT){var proto=Constructor[PROTOTYPE],iter=get(proto,SYMBOL_ITERATOR)||get(proto,FF_ITERATOR)||DEFAULT&&get(proto,DEFAULT)||value;if(framework){setIterator(proto,iter);if(iter!==value){var iterProto=getPrototypeOf(iter.call(new Constructor));setToStringTag(iterProto,NAME+" Iterator",true);has(proto,FF_ITERATOR)&&setIterator(iterProto,returnThis)}}Iterators[NAME]=iter;Iterators[NAME+" Iterator"]=returnThis;return iter}function defineStdIterators(Base,NAME,Constructor,next,DEFAULT,IS_SET){function createIter(kind){return function(){return new Constructor(this,kind)}}createIterator(Constructor,NAME,next);var entries=createIter(KEY+VALUE),values=createIter(VALUE);if(DEFAULT==VALUE)values=defineIterator(Base,NAME,values,"values");else entries=defineIterator(Base,NAME,entries,"entries");if(DEFAULT){$define(PROTO+FORCED*BUGGY_ITERATORS,NAME,{entries:entries,keys:IS_SET?values:createIter(KEY),values:values})}}function iterResult(done,value){return{value:value,done:!!done}}function isIterable(it){var O=Object(it),Symbol=global[SYMBOL],hasExt=!!(Symbol&&Symbol[ITERATOR]&&Symbol[ITERATOR]in O);return hasExt||SYMBOL_ITERATOR in O||has(Iterators,classof(O))}function getIterator(it){var Symbol=global[SYMBOL],ext=Symbol&&Symbol[ITERATOR]&&it[Symbol[ITERATOR]],getIter=ext||it[SYMBOL_ITERATOR]||Iterators[classof(it)];return assertObject(getIter.call(it))}function stepCall(fn,value,entries){return entries?invoke(fn,value):fn(value)}function forOf(iterable,entries,fn,that){var iterator=getIterator(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done)if(stepCall(f,step.value,entries)===false)return}var NODE=cof(process)==PROCESS,core={},path=framework?global:core,old=global.core,FORCED=1,GLOBAL=2,STATIC=4,PROTO=8,BIND=16,WRAP=32;function $define(type,name,source){var key,own,out,exp,isGlobal=type&GLOBAL,target=isGlobal?global:type&STATIC?global[name]:(global[name]||ObjectProto)[PROTOTYPE],exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&FORCED)&&target&&key in target&&(!isFunction(target[key])||isNative(target[key]));out=(own?target:source)[key];if(type&BIND&&own)exp=ctx(out,global);else if(type&WRAP&&!framework&&target[key]==out){exp=function(param){return this instanceof out?new out(param):out(param)};exp[PROTOTYPE]=out[PROTOTYPE]}else exp=type&PROTO&&isFunction(out)?ctx(call,out):out;if(exports[key]!=out)hidden(exports,key,exp);if(framework&&target&&!own){if(isGlobal)target[key]=out;else delete target[key]&&hidden(target,key,out)}}}if(typeof module!="undefined"&&module.exports)module.exports=core;if(isFunction(define)&&define.amd)define(function(){return core});if(!NODE||framework){core.noConflict=function(){global.core=old;return core};global.core=core}$define(GLOBAL+FORCED,{global:global});!function(TAG,SymbolRegistry,setter){if(!isNative(Symbol)){Symbol=function(description){assert(!(this instanceof Symbol),SYMBOL+" is not a "+CONSTRUCTOR);var tag=uid(description);DESC&&setter&&defineProperty(ObjectProto,tag,{configurable:true,set:function(value){hidden(this,tag,value)}});return set(create(Symbol[PROTOTYPE]),TAG,tag)};hidden(Symbol[PROTOTYPE],TO_STRING,function(){return this[TAG]})}$define(GLOBAL+WRAP,{Symbol:Symbol});var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=Symbol(key)},iterator:SYMBOL_ITERATOR,keyFor:part.call(keyOf,SymbolRegistry),toStringTag:SYMBOL_TAG=getWellKnownSymbol(TO_STRING_TAG,true),unscopables:SYMBOL_UNSCOPABLES,pure:safeSymbol,set:set,useSetter:function(){setter=true},useSimple:function(){setter=false}};forEach.call(array("hasInstance,isConcatSpreadable,match,replace,search,"+"species,split,toPrimitive"),function(it){symbolStatics[it]=getWellKnownSymbol(it)});$define(STATIC,SYMBOL,symbolStatics);setToStringTag(Symbol,SYMBOL);$define(GLOBAL,{Reflect:{ownKeys:ownKeys}})}(safeSymbol("tag"),{},true);!function(RegExpProto,isFinite,tmp,NAME){var RangeError=global.RangeError,isInteger=Number.isInteger||function(it){return!isObject(it)&&isFinite(it)&&floor(it)===it},sign=Math.sign||function sign(it){return(it=+it)==0||it!=it?it:it<0?-1:1},pow=Math.pow,abs=Math.abs,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,fcc=String.fromCharCode,at=createPointAt(true);var objectStatic={assign:assign,is:function(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}};"__proto__"in ObjectProto&&function(buggy,set){try{set=ctx(call,getOwnDescriptor(ObjectProto,"__proto__").set,2);set({},ArrayProto)}catch(e){buggy=true}objectStatic.setPrototypeOf=setPrototypeOf=setPrototypeOf||function(O,proto){assertObject(O);assert(proto===null||isObject(proto),proto,": can't set as prototype!");if(buggy)O.__proto__=proto;else set(O,proto);return O}}();$define(STATIC,OBJECT,objectStatic);function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}$define(STATIC,NUMBER,{EPSILON:pow(2,-52),isFinite:function(it){return typeof it=="number"&&isFinite(it)},isInteger:isInteger,isNaN:sameNaN,isSafeInteger:function(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt});$define(STATIC,MATH,{acosh:function(x){return x<1?NaN:log(x+sqrt(x*x-1))},asinh:asinh,atanh:function(x){return x==0?+x:log((1+ +x)/(1-x))/2},cbrt:function(x){return sign(x)*pow(abs(x),1/3)},clz32:function(x){return(x>>>=0)?32-x[TO_STRING](2).length:32},cosh:function(x){return(exp(x)+exp(-x))/2},expm1:function(x){return x==0?+x:x>-1e-6&&x<1e-6?+x+x*x/2:exp(x)-1},fround:function(x){return new Float32Array([x])[0]},hypot:function(value1,value2){var sum=0,length=arguments.length,value;while(length--){value=+arguments[length];if(value==Infinity||value==-Infinity)return Infinity;sum+=value*value}return sqrt(sum)},imul:function(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function(x){return x>-1e-8&&x<1e-8?x-x*x/2:log(1+ +x)},log10:function(x){return log(x)/Math.LN10},log2:function(x){return log(x)/Math.LN2},sign:sign,sinh:function(x){return x==0?+x:(exp(x)-exp(-x))/2},tanh:function(x){return isFinite(x)?x==0?+x:(exp(x)-exp(-x))/(exp(x)+exp(-x)):sign(x)},trunc:trunc});setToStringTag(Math,MATH,true);function assertNotRegExp(it){if(cof(it)==REGEXP)throw TypeError()}$define(STATIC,STRING,{fromCodePoint:function(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fcc(code):fcc(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")},raw:function(callSite){var raw=toObject(callSite.raw),len=toLength(raw.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(raw[i++]));if(i<sln)res.push(String(arguments[i]))}return res.join("")}});$define(PROTO,STRING,{codePointAt:createPointAt(false),endsWith:function(searchString){assertNotRegExp(searchString);var that=String(assertDefined(this)),endPosition=arguments[1],len=toLength(that.length),end=endPosition===undefined?len:min(toLength(endPosition),len);searchString+="";return that.slice(end-searchString.length,end)===searchString},includes:function(searchString){assertNotRegExp(searchString);return!!~String(assertDefined(this)).indexOf(searchString,arguments[1])},repeat:function(count){var str=String(assertDefined(this)),res="",n=toInteger(count);if(0>n||n==Infinity)throw RangeError("Count can't be negative");for(;n>0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res},startsWith:function(searchString){assertNotRegExp(searchString);var that=String(assertDefined(this)),index=toLength(min(arguments[1],that.length));searchString+="";return that.slice(index,index+searchString.length)===searchString}});defineStdIterators(String,STRING,function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return iterResult(1);point=at.call(O,index);iter.i+=point.length;return iterResult(0,point)});$define(STATIC,ARRAY,{from:function(arrayLike){var O=Object(assertDefined(arrayLike)),result=new(generic(this,Array)),mapfn=arguments[1],that=arguments[2],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,that,2):undefined,index=0,length;if(isIterable(O))for(var iter=getIterator(O),step;!(step=iter.next()).done;index++){result[index]=mapping?f(step.value,index):step.value}else for(length=toLength(O.length);length>index;index++){result[index]=mapping?f(O[index],index):O[index]}result.length=index;return result},of:function(){var index=0,length=arguments.length,result=new(generic(this,Array))(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}});$define(PROTO,ARRAY,{copyWithin:function(target,start){var O=Object(assertDefined(this)),len=toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=min(fin-from,len-to),inc=1;if(from<to&&to<from+count){inc=-1;from=from+count-1;to=to+count-1}while(count-->0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O},fill:function(value){var O=Object(assertDefined(this)),length=toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O},find:createArrayMethod(5),findIndex:createArrayMethod(6)});defineStdIterators(Array,ARRAY,function(iterated,kind){set(this,ITER,{o:toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length)return iter.o=undefined,iterResult(1);if(kind==KEY)return iterResult(0,index);if(kind==VALUE)return iterResult(0,O[index]);return iterResult(0,[index,O[index]])},VALUE);Iterators[ARGUMENTS]=Iterators[ARRAY];setToStringTag(global.JSON,"JSON",true);function wrapObjectMethod(key,MODE){var fn=Object[key],exp=core[OBJECT][key],f=0,o={};if(!exp||isNative(exp)){o[key]=MODE==1?function(it){return isObject(it)?fn(it):it}:MODE==2?function(it){return isObject(it)?fn(it):true}:MODE==3?function(it){return isObject(it)?fn(it):false}:MODE==4?function(it,key){return fn(toObject(it),key)}:function(it){return fn(toObject(it))};try{fn(DOT)}catch(e){f=1}$define(STATIC+FORCED*f,OBJECT,o)}}wrapObjectMethod("freeze",1);wrapObjectMethod("seal",1);wrapObjectMethod("preventExtensions",1);wrapObjectMethod("isFrozen",2);wrapObjectMethod("isSealed",2);wrapObjectMethod("isExtensible",3);wrapObjectMethod("getOwnPropertyDescriptor",4);wrapObjectMethod("getPrototypeOf");wrapObjectMethod("keys");wrapObjectMethod("getOwnPropertyNames");function WrappedRegExp(pattern,flags){return new RegExp(cof(pattern)==REGEXP&&flags!==undefined?pattern.source:pattern,flags)}if(framework){tmp[SYMBOL_TAG]=DOT;if(cof(tmp)!=DOT)hidden(ObjectProto,TO_STRING,function(){return"[object "+classof(this)+"]"});NAME in FunctionProto||defineProperty(FunctionProto,NAME,{configurable:true,get:function(){var match=String(this).match(/^\s*function ([^ (]*)/),name=match?match[1]:"";has(this,NAME)||defineProperty(this,NAME,descriptor(5,name));return name},set:function(value){has(this,NAME)||defineProperty(this,NAME,descriptor(0,value))}});if(DESC&&!function(){try{return RegExp(/a/g,"i")=="/a/i"}catch(e){}}()){forEach.call(getNames(RegExp),function(key){key in WrappedRegExp||defineProperty(WrappedRegExp,key,{configurable:true,get:function(){return RegExp[key]},set:function(it){RegExp[key]=it}})});RegExpProto[CONSTRUCTOR]=WrappedRegExp;WrappedRegExp[PROTOTYPE]=RegExpProto;hidden(global,REGEXP,WrappedRegExp)}if(/./g.flags!="g")defineProperty(RegExpProto,"flags",{configurable:true,get:createReplacer(/^.*\/(\w*)$/,"$1")});forEach.call(array("find,findIndex,fill,copyWithin,entries,keys,values"),function(it){ArrayUnscopables[it]=true});SYMBOL_UNSCOPABLES in ArrayProto||hidden(ArrayProto,SYMBOL_UNSCOPABLES,ArrayUnscopables)}}(RegExp[PROTOTYPE],isFinite,{},"name");isFunction(setImmediate)&&isFunction(clearImmediate)||function(ONREADYSTATECHANGE){var postMessage=global.postMessage,addEventListener=global.addEventListener,MessageChannel=global.MessageChannel,counter=0,queue={},defer,channel,port;setImmediate=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearImmediate=function(id){delete queue[id]};function run(id){if(has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run(event.data)}if(NODE){defer=function(id){nextTick(part.call(run,id))}}else if(addEventListener&&isFunction(postMessage)&&!global.importScripts){defer=function(id){postMessage(id,"*")};addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(document&&ONREADYSTATECHANGE in document[CREATE_ELEMENT]("script")){defer=function(id){html.appendChild(document[CREATE_ELEMENT]("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run(id)}}}else{defer=function(id){setTimeout(part.call(run,id),0)}}}("onreadystatechange");$define(GLOBAL+BIND,{setImmediate:setImmediate,clearImmediate:clearImmediate});!function(Promise,test){isFunction(Promise)&&isFunction(Promise.resolve)&&Promise.resolve(test=new Promise(function(){}))==test||function(asap,DEF){function isThenable(o){var then;if(isObject(o))then=o.then;return isFunction(then)?then:false}function notify(def){var chain=def.chain;chain.length&&asap(function(){var msg=def.msg,ok=def.state==1,i=0;while(chain.length>i)!function(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){ret=cb===true?msg:cb(msg);if(ret===react.P){react.rej(TypeError(PROMISE+"-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(msg)}catch(err){react.rej(err)}}(chain[i++]);chain.length=0})}function resolve(msg){var def=this,then,wrapper;if(def.done)return;def.done=true;def=def.def||def;try{if(then=isThenable(msg)){wrapper={def:def,done:false};then.call(msg,ctx(resolve,wrapper,1),ctx(reject,wrapper,1))}else{def.msg=msg;def.state=1;notify(def)}}catch(err){reject.call(wrapper||{def:def,done:false},err)}}function reject(msg){var def=this;if(def.done)return;def.done=true;def=def.def||def;def.msg=msg;def.state=2;notify(def)}Promise=function(executor){assertFunction(executor);assertInstance(this,Promise,PROMISE);var def={chain:[],state:0,done:false,msg:undefined};hidden(this,DEF,def);try{executor(ctx(resolve,def,1),ctx(reject,def,1))}catch(err){reject.call(def,err)}};assignHidden(Promise[PROTOTYPE],{then:function(onFulfilled,onRejected){var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false},P=react.P=new this[CONSTRUCTOR](function(resolve,reject){react.res=assertFunction(resolve);react.rej=assertFunction(reject)}),def=this[DEF];def.chain.push(react);def.state&&notify(def);return P},"catch":function(onRejected){return this.then(undefined,onRejected)}});assignHidden(Promise,{all:function(iterable){var Promise=this,values=[];return new Promise(function(resolve,reject){forOf(iterable,false,push,values);var remaining=values.length,results=Array(remaining);if(remaining)forEach.call(values,function(promise,index){Promise.resolve(promise).then(function(value){results[index]=value;--remaining||resolve(results)},reject)});else resolve(results)})},race:function(iterable){var Promise=this;return new Promise(function(resolve,reject){forOf(iterable,false,function(promise){Promise.resolve(promise).then(resolve,reject)})})},reject:function(r){return new this(function(resolve,reject){reject(r)})},resolve:function(x){return isObject(x)&&getPrototypeOf(x)===this[PROTOTYPE]?x:new this(function(resolve,reject){resolve(x)})}})}(nextTick||setImmediate,safeSymbol("def"));setToStringTag(Promise,PROMISE);$define(GLOBAL+FORCED*!isNative(Promise),{Promise:Promise})}(global[PROMISE]);!function(){var UID=safeSymbol("uid"),DATA=safeSymbol("data"),WEAK=safeSymbol("weak"),LAST=safeSymbol("last"),FIRST=safeSymbol("first"),SIZE=DESC?safeSymbol("size"):"size",uid=0;function getCollection(C,NAME,methods,commonMethods,isMap,isWeak){var ADDER=isMap?"set":"add",proto=C&&C[PROTOTYPE],O={};function initFromIterable(that,iterable){if(iterable!=undefined)forOf(iterable,isMap,that[ADDER],that);return that}function fixSVZ(key,chain){var method=proto[key];framework&&hidden(proto,key,function(a,b){var result=method.call(this,a===0?0:a,b);return chain?this:result})}if(!isNative(C)||!(isWeak||!BUGGY_ITERATORS&&has(proto,"entries"))){C=isWeak?function(iterable){assertInstance(this,C,NAME);set(this,UID,uid++);initFromIterable(this,iterable)}:function(iterable){var that=this;assertInstance(that,C,NAME);set(that,DATA,create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);initFromIterable(that,iterable)};assignHidden(assignHidden(C[PROTOTYPE],methods),commonMethods);isWeak||defineProperty(C[PROTOTYPE],"size",{get:function(){return assertDefined(this[SIZE])}})}else{var Native=C,inst=new C,chain=inst[ADDER](isWeak?{}:-0,1),buggyZero;if(!NATIVE_ITERATORS||!C.length){C=function(iterable){assertInstance(this,C,NAME);return initFromIterable(new Native,iterable)};C[PROTOTYPE]=proto}isWeak||inst[FOR_EACH](function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixSVZ("delete");fixSVZ("has");isMap&&fixSVZ("get")}if(buggyZero||chain!==inst)fixSVZ(ADDER,true)}setToStringTag(C,NAME);O[NAME]=C;$define(GLOBAL+WRAP+FORCED*!isNative(C),O);isWeak||defineStdIterators(C,NAME,function(iterated,kind){set(this,ITER,{o:iterated,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!O||!(iter.l=entry=entry?entry.n:O[FIRST]))return iter.o=undefined,iterResult(1);if(kind==KEY)return iterResult(0,entry.k);if(kind==VALUE)return iterResult(0,entry.v);return iterResult(0,[entry.k,entry.v])},isMap?KEY+VALUE:VALUE,!isMap);return C}function fastKey(it,create){if(!isObject(it))return(typeof it=="string"?"S":"P")+it;if(!has(it,UID)){if(create)hidden(it,UID,++uid);else return""}return"O"+it[UID]}function def(that,key,value){var index=fastKey(key,true),data=that[DATA],last=that[LAST],entry;if(index in data)data[index].v=value;else{entry=data[index]={k:key,v:value,p:last};if(!that[FIRST])that[FIRST]=entry;if(last)last.n=entry;that[LAST]=entry;that[SIZE]++}return that}function del(that,index){var data=that[DATA],entry=data[index],next=entry.n,prev=entry.p;delete data[index];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}var collectionMethods={clear:function(){for(var index in this[DATA])del(this,index)},"delete":function(key){var index=fastKey(key),contains=index in this[DATA];if(contains)del(this,index);return contains},forEach:function(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function(key){return fastKey(key)in this[DATA]}};Map=getCollection(Map,MAP,{get:function(key){var entry=this[DATA][fastKey(key)];return entry&&entry.v},set:function(key,value){return def(this,key===0?0:key,value)}},collectionMethods,true);Set=getCollection(Set,SET,{add:function(value){return def(this,value=value===0?0:value,value)}},collectionMethods);function setWeak(that,key,value){has(assertObject(key),WEAK)||hidden(key,WEAK,{});key[WEAK][that[UID]]=value;return that}function hasWeak(key){return isObject(key)&&has(key,WEAK)&&has(key[WEAK],this[UID])}var weakMethods={"delete":function(key){return hasWeak.call(this,key)&&delete key[WEAK][this[UID]]},has:hasWeak};WeakMap=getCollection(WeakMap,WEAKMAP,{get:function(key){if(isObject(key)&&has(key,WEAK))return key[WEAK][this[UID]]},set:function(key,value){return setWeak(this,key,value)}},weakMethods,true,true);WeakSet=getCollection(WeakSet,WEAKSET,{add:function(value){return setWeak(this,value,true)}},weakMethods,false,true)}();!function(){function Enumerate(iterated){var keys=[],key;for(key in iterated)keys.push(key);set(this,ITER,{o:iterated,a:keys,i:0})}createIterator(Enumerate,OBJECT,function(){var iter=this[ITER],keys=iter.a,key;do{if(iter.i>=keys.length)return iterResult(1)}while(!((key=keys[iter.i++])in iter.o));return iterResult(0,key)});function wrap(fn){return function(it){assertObject(it);try{return fn.apply(undefined,arguments),true}catch(e){return false}}}function reflectGet(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=getOwnDescriptor(assertObject(target),propertyKey),proto;if(desc)return desc.get?desc.get.call(receiver):desc.value;return isObject(proto=getPrototypeOf(target))?reflectGet(proto,propertyKey,receiver):undefined}function reflectSet(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],desc=getOwnDescriptor(assertObject(target),propertyKey),proto;if(desc){if(desc.writable===false)return false;if(desc.set)return desc.set.call(receiver,V),true}if(isObject(proto=getPrototypeOf(target)))return reflectSet(proto,propertyKey,V,receiver);desc=getOwnDescriptor(receiver,propertyKey)||descriptor(0);desc.value=V;return defineProperty(receiver,propertyKey,desc),true}var reflect={apply:ctx(call,apply,3),construct:construct,defineProperty:wrap(defineProperty),deleteProperty:function(target,propertyKey){var desc=getOwnDescriptor(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},enumerate:function(target){return new Enumerate(assertObject(target))},get:reflectGet,getOwnPropertyDescriptor:getOwnDescriptor,getPrototypeOf:getPrototypeOf,has:function(target,propertyKey){return propertyKey in target},isExtensible:Object.isExtensible||function(target){return!!assertObject(target)},ownKeys:ownKeys,preventExtensions:wrap(Object.preventExtensions||returnIt),set:reflectSet};if(setPrototypeOf)reflect.setPrototypeOf=function(target,proto){return setPrototypeOf(assertObject(target),proto),true};$define(GLOBAL,{Reflect:{}});$define(STATIC,"Reflect",reflect)}();!function(){$define(PROTO,ARRAY,{includes:createArrayContains(true)});$define(PROTO,STRING,{at:createPointAt(true)});function createObjectToArray(isEntries){return function(object){var O=toObject(object),keys=getKeys(object),length=keys.length,i=0,result=Array(length),key; if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$define(STATIC,OBJECT,{values:createObjectToArray(false),entries:createObjectToArray(true)});$define(STATIC,REGEXP,{escape:createReplacer(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",true)})}();!function(REFERENCE){REFERENCE_GET=getWellKnownSymbol(REFERENCE+"Get",true);var REFERENCE_SET=getWellKnownSymbol(REFERENCE+SET,true),REFERENCE_DELETE=getWellKnownSymbol(REFERENCE+"Delete",true);$define(STATIC,SYMBOL,{referenceGet:REFERENCE_GET,referenceSet:REFERENCE_SET,referenceDelete:REFERENCE_DELETE});hidden(FunctionProto,REFERENCE_GET,returnThis);function setMapMethods(Constructor){if(Constructor){var MapProto=Constructor[PROTOTYPE];hidden(MapProto,REFERENCE_GET,MapProto.get);hidden(MapProto,REFERENCE_SET,MapProto.set);hidden(MapProto,REFERENCE_DELETE,MapProto["delete"])}}setMapMethods(Map);setMapMethods(WeakMap)}("reference");!function(arrayStatics){function setArrayStatics(keys,length){forEach.call(array(keys),function(key){if(key in ArrayProto)arrayStatics[key]=ctx(call,ArrayProto[key],length)})}setArrayStatics("pop,reverse,shift,keys,values,entries",1);setArrayStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setArrayStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$define(STATIC,ARRAY,arrayStatics)}({})}(typeof window!="undefined"&&window.Math===Math?window:global,true)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],3:[function(require,module,exports){!function(){var hasOwn=Object.prototype.hasOwnProperty;var undefined;var iteratorSymbol=typeof Symbol==="function"&&Symbol.iterator||"@@iterator";if(typeof regeneratorRuntime==="object"){return}var runtime=regeneratorRuntime=typeof exports==="undefined"?{}:exports;function wrap(innerFn,outerFn,self,tryList){return new Generator(innerFn,outerFn,self||null,tryList||[])}runtime.wrap=wrap;var GenStateSuspendedStart="suspendedStart";var GenStateSuspendedYield="suspendedYield";var GenStateExecuting="executing";var GenStateCompleted="completed";var ContinueSentinel={};function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype;GeneratorFunction.prototype=Gp.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunction.displayName="GeneratorFunction";runtime.isGeneratorFunction=function(genFun){var ctor=typeof genFun==="function"&&genFun.constructor;return ctor?ctor===GeneratorFunction||(ctor.displayName||ctor.name)==="GeneratorFunction":false};runtime.mark=function(genFun){genFun.__proto__=GeneratorFunctionPrototype;genFun.prototype=Object.create(Gp);return genFun};runtime.async=function(innerFn,outerFn,self,tryList){return new Promise(function(resolve,reject){var generator=wrap(innerFn,outerFn,self,tryList);var callNext=step.bind(generator.next);var callThrow=step.bind(generator["throw"]);function step(arg){try{var info=this(arg);var value=info.value}catch(error){return reject(error)}if(info.done){resolve(value)}else{Promise.resolve(value).then(callNext,callThrow)}}callNext()})};function Generator(innerFn,outerFn,self,tryList){var generator=outerFn?Object.create(outerFn.prototype):this;var context=new Context(tryList);var state=GenStateSuspendedStart;function invoke(method,arg){if(state===GenStateExecuting){throw new Error("Generator is already running")}if(state===GenStateCompleted){return doneResult()}while(true){var delegate=context.delegate;if(delegate){try{var info=delegate.iterator[method](arg);method="next";arg=undefined}catch(uncaught){context.delegate=null;method="throw";arg=uncaught;continue}if(info.done){context[delegate.resultName]=info.value;context.next=delegate.nextLoc}else{state=GenStateSuspendedYield;return info}context.delegate=null}if(method==="next"){if(state===GenStateSuspendedStart&&typeof arg!=="undefined"){throw new TypeError("attempt to send "+JSON.stringify(arg)+" to newborn generator")}if(state===GenStateSuspendedYield){context.sent=arg}else{delete context.sent}}else if(method==="throw"){if(state===GenStateSuspendedStart){state=GenStateCompleted;throw arg}if(context.dispatchException(arg)){method="next";arg=undefined}}else if(method==="return"){context.abrupt("return",arg)}state=GenStateExecuting;try{var value=innerFn.call(self,context);state=context.done?GenStateCompleted:GenStateSuspendedYield;var info={value:value,done:context.done};if(value===ContinueSentinel){if(context.delegate&&method==="next"){arg=undefined}}else{return info}}catch(thrown){state=GenStateCompleted;if(method==="next"){context.dispatchException(thrown)}else{arg=thrown}}}}generator.next=invoke.bind(generator,"next");generator["throw"]=invoke.bind(generator,"throw");generator["return"]=invoke.bind(generator,"return");return generator}Gp[iteratorSymbol]=function(){return this};Gp.toString=function(){return"[object Generator]"};function pushTryEntry(triple){var entry={tryLoc:triple[0]};if(1 in triple){entry.catchLoc=triple[1]}if(2 in triple){entry.finallyLoc=triple[2]}this.tryEntries.push(entry)}function resetTryEntry(entry,i){var record=entry.completion||{};record.type=i===0?"normal":"return";delete record.arg;entry.completion=record}function Context(tryList){this.tryEntries=[{tryLoc:"root"}];tryList.forEach(pushTryEntry,this);this.reset()}runtime.keys=function(object){var keys=[];for(var key in object){keys.push(key)}keys.reverse();return function next(){while(keys.length){var key=keys.pop();if(key in object){next.value=key;next.done=false;return next}}next.done=true;return next}};function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod){return iteratorMethod.call(iterable)}if(typeof iterable.next==="function"){return iterable}if(!isNaN(iterable.length)){var i=-1;function next(){while(++i<iterable.length){if(hasOwn.call(iterable,i)){next.value=iterable[i];next.done=false;return next}}next.value=undefined;next.done=true;return next}return next.next=next}}return{next:doneResult}}runtime.values=values;function doneResult(){return{value:undefined,done:true}}Context.prototype={constructor:Context,reset:function(){this.prev=0;this.next=0;this.sent=undefined;this.done=false;this.delegate=null;this.tryEntries.forEach(resetTryEntry);for(var tempIndex=0,tempName;hasOwn.call(this,tempName="t"+tempIndex)||tempIndex<20;++tempIndex){this[tempName]=null}},stop:function(){this.done=true;var rootEntry=this.tryEntries[0];var rootRecord=rootEntry.completion;if(rootRecord.type==="throw"){throw rootRecord.arg}return this.rval},dispatchException:function(exception){if(this.done){throw exception}var context=this;function handle(loc,caught){record.type="throw";record.arg=exception;context.next=loc;return!!caught}for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev<entry.catchLoc){return handle(entry.catchLoc,true)}else if(this.prev<entry.finallyLoc){return handle(entry.finallyLoc)}}else if(hasCatch){if(this.prev<entry.catchLoc){return handle(entry.catchLoc,true)}}else if(hasFinally){if(this.prev<entry.finallyLoc){return handle(entry.finallyLoc)}}else{throw new Error("try statement without catch or finally")}}}},_findFinallyEntry:function(finallyLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&(entry.finallyLoc===finallyLoc||this.prev<entry.finallyLoc)){return entry}}},abrupt:function(type,arg){var entry=this._findFinallyEntry();var record=entry?entry.completion:{};record.type=type;record.arg=arg;if(entry){this.next=entry.finallyLoc}else{this.complete(record)}return ContinueSentinel},complete:function(record){if(record.type==="throw"){throw record.arg}if(record.type==="break"||record.type==="continue"){this.next=record.arg}else if(record.type==="return"){this.rval=record.arg;this.next="end"}return ContinueSentinel},finish:function(finallyLoc){var entry=this._findFinallyEntry(finallyLoc);return this.complete(entry.completion)},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry,i)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}()},{}]},{},[1]);
src/views/components/chatroom/index.js
EragonJ/Kaku
import React from 'react'; import ClassNames from 'classnames'; import ReactFireMixin from 'reactfire'; import L10nSpan from '../shared/l10n-span'; import CommentForm from './comment/comment-form'; import CommentList from './comment/comment-list'; import Constants from '../../../modules/Constants'; import Firebase from '../../../modules/wrapper/Firebase'; import PreferenceManager from '../../../modules/PreferenceManager'; const PREFERENCE_KEY = 'default.chatroom.enabled'; let ChatroomComponent = React.createClass({ mixins: [ReactFireMixin], getInitialState: function() { return { enabled: PreferenceManager.getPreference(PREFERENCE_KEY), shown: false, unreadMessageCount: 0, isRoomConnected: false, roomName: '', onlineUsers: [], userInfo: {}, comments: [] }; }, componentWillMount: function() { PreferenceManager.on('preference-updated', (key, enabled) => { if (key === PREFERENCE_KEY) { this.setState({ enabled: enabled }); } }); Firebase.on('meatadata-updated', (metadata) => { this.setState({ roomName: metadata.roomName }); }); // Great, if the room is opened Firebase.on('setup', (userInfo) => { // we can join to specifc room let commentsRef = Firebase.joinCommentsRoom(); this.bindAsArray(commentsRef, 'comments'); // if there is any comment coming when the chatroom is hidden, // we should show some UI for users about this commentsRef.on('value', (snapshot) => { // it will be triggered when initialized, so we need to check // there is indeed any value coming before keep the count. if (snapshot.val() && !this.state.shown) { this.setState({ unreadMessageCount: this.state.unreadMessageCount + 1 }); } }); let onlineUsersRef = Firebase.joinOnlineUsersRoom(); this.bindAsArray(onlineUsersRef, 'onlineUsers'); let currentUserRef = onlineUsersRef.push(); // http://stackoverflow.com/questions/15982215/firebase-count-online-users // // This is special, we need to join to this special room to make sure // we can reflect the count of online users let connectedRef = Firebase.joinConnectedRoom(); connectedRef.on('value', (snapshot) => { if (snapshot.val() === true) { // Keep current user's information to `onlineUsersRef` currentUserRef.set(userInfo); currentUserRef.onDisconnect().remove(); } }); // keep current users information this.setState({ isRoomConnected: true, userInfo: userInfo }); }); Firebase.on('room-left', (roomName, ref) => { if ('comments' === roomName) { this.unbind('comments'); } else if ('onlineUsers' === roomName) { this.unbind('onlineUsers'); } }); Firebase.on('room-left-all', () => { // do a final cleanup this.setState({ userInfo: {}, roomName: '', isRoomConnected: false }); }); }, _onHeaderClick: function() { let isShown = this.state.shown; let option = {}; option.shown = !isShown; // before clicking, it is hidden, so it means user is going to // open the chatroom, then we have to reset the unreadMessageCount if (!isShown) { option.unreadMessageCount = 0; } this.setState(option); }, _onCommentSubmit: function(comment) { let userName = this.state.userInfo.userName; this.firebaseRefs.comments.push({ userName: userName, comment: comment }); }, _getOnlineUsersCount: function() { let onlineUsers = this.state.onlineUsers; // unbind() will cause the value to `undefined` ... let onlineUsersCount = onlineUsers && onlineUsers.length; if (this.state.isRoomConnected) { return onlineUsersCount; } else { return 0; } }, render: function() { let headerSpan; let unreadCountSpan; let enabled = this.state.enabled; let roomName = this.state.roomName; let comments = this.state.comments; let shown = this.state.shown; let isRoomConnected = this.state.isRoomConnected; let unreadMessageCount = this.state.unreadMessageCount; let onlineUsersCount = this._getOnlineUsersCount(); if (roomName) { headerSpan = <span>{roomName}</span>; } else { headerSpan = <L10nSpan l10nId="chatroom_header"/>; } if (unreadMessageCount > 0) { unreadCountSpan = <span className="unread-count label label-danger">{unreadMessageCount}</span>; } let chatroomClass = ClassNames({ 'disabled': !enabled, 'chatroom': true, 'shown': shown, 'online': isRoomConnected, 'offline': !isRoomConnected, 'error': false }); return ( <div className={chatroomClass}> {unreadCountSpan} <h1 className="header" onClick={this._onHeaderClick}> {headerSpan} - ({onlineUsersCount}) </h1> <div className="comment-component"> <CommentList comments={comments}></CommentList> <CommentForm onSubmit={this._onCommentSubmit} shown={shown} connected={isRoomConnected}></CommentForm> </div> </div> ); } }); module.exports = ChatroomComponent;
v7/development/.cache/commonjs/default-html.js
BigBoss424/portfolio
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); exports.__esModule = true; exports.default = HTML; var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); function HTML(props) { return _react.default.createElement("html", props.htmlAttributes, _react.default.createElement("head", null, _react.default.createElement("meta", { charSet: "utf-8" }), _react.default.createElement("meta", { httpEquiv: "x-ua-compatible", content: "ie=edge" }), _react.default.createElement("meta", { name: "viewport", content: "width=device-width, initial-scale=1, shrink-to-fit=no" }), props.headComponents), _react.default.createElement("body", props.bodyAttributes, props.preBodyComponents, _react.default.createElement("div", { key: `body`, id: "___gatsby", dangerouslySetInnerHTML: { __html: props.body } }), props.postBodyComponents)); } HTML.propTypes = { htmlAttributes: _propTypes.default.object, headComponents: _propTypes.default.array, bodyAttributes: _propTypes.default.object, preBodyComponents: _propTypes.default.array, body: _propTypes.default.string, postBodyComponents: _propTypes.default.array };
src/auth/screens/splash.screen.js
gitpoint/git-point
import React, { Component } from 'react'; import styled from 'styled-components'; import { connect } from 'react-redux'; import { colors } from 'config'; import { resetNavigationTo } from 'utils'; const mapStateToProps = state => ({ isAuthenticated: state.auth.isAuthenticated, }); const LogoContainer = styled.View` background-color: ${colors.white}; flex: 1; justify-content: center; align-items: center; `; const Logo = styled.View` width: 100; height: 100; `; class Splash extends Component { props: { isAuthenticated: boolean, navigation: Object, }; componentDidMount() { const { isAuthenticated, navigation } = this.props; if (isAuthenticated) { resetNavigationTo('Main', navigation); } else { resetNavigationTo('Login', navigation); } } render() { return ( <LogoContainer> <Logo source={require('../../assets/logo-black.png')} /> </LogoContainer> ); } } export const SplashScreen = connect(mapStateToProps)(Splash);
src/svg-icons/device/battery-charging-50.js
ruifortes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBatteryCharging50 = (props) => ( <SvgIcon {...props}> <path d="M14.47 13.5L11 20v-5.5H9l.53-1H7v7.17C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V13.5h-2.53z"/><path fillOpacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v8.17h2.53L13 7v5.5h2l-.53 1H17V5.33C17 4.6 16.4 4 15.67 4z"/> </SvgIcon> ); DeviceBatteryCharging50 = pure(DeviceBatteryCharging50); DeviceBatteryCharging50.displayName = 'DeviceBatteryCharging50'; DeviceBatteryCharging50.muiName = 'SvgIcon'; export default DeviceBatteryCharging50;
src/components/Character.js
scotchfield/react-rpg
import React from 'react' import AttributeList from './AttributeList' import GearList from './GearList' class Character extends React.Component { constructor (props) { super(props); } render () { return ( <div className="Character"> <h2>{ this.props.name }</h2> <h3>Level { this.props.level }</h3> <h4>Attributes</h4> <AttributeList data={ this.props.attributes } /> <h4>Gear</h4> <GearList data={ this.props.gear } /> </div> ) } } Character.title = 'Character' Character.path = '/character' Character.defaultProps = { name: 'Name', level: 0, attributes: { strength: 1, dexterity: 1, intelligence: 1 }, gear: [ { name: 'Old Clothes', modifiers: { strength: 0 } } ] }; export default Character
src/js/components/icons/base/TopCorner.js
linde12/grommet
// (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}-top-corner`, className, { [`${CLASS_ROOT}--${size}`]: size, [`${CLASS_ROOT}--responsive`]: responsive, [`${COLOR_INDEX}-${colorIndex}`]: colorIndex } ); a11yTitle = a11yTitle || Intl.getMessage(intl, 'top-corner'); 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}><polyline fill="none" stroke="#000" strokeWidth="2" points="4 16 16 16 16 4" transform="rotate(180 10 10)"/></svg>; } }; Icon.contextTypes = { intl: PropTypes.object }; Icon.defaultProps = { responsive: true }; Icon.displayName = 'TopCorner'; Icon.icon = true; Icon.propTypes = { a11yTitle: PropTypes.string, colorIndex: PropTypes.string, size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'huge']), responsive: PropTypes.bool };
src/native/app/Page.js
VigneshRavichandran02/3io
/* @flow */ import Header from './Header'; import React from 'react'; import linksMessages from '../../common/app/linksMessages'; import { Alert, Container } from './components'; import { Match } from '../../common/app/components'; import { injectIntl, intlShape } from 'react-intl'; const titles = { '/': linksMessages.home, '/intl': linksMessages.intl, '/offline': linksMessages.offline, '/signin': linksMessages.signIn, '/todos': linksMessages.todos, '/me': linksMessages.me, }; const Page = ({ component: Component, intl, pattern, ...props }) => ( <Match {...props} pattern={pattern} render={renderProps => ( <Container> {titles[pattern] && <Header title={intl.formatMessage(titles[pattern])} /> } <Alert /> <Component {...renderProps} /> </Container> )} /> ); Page.propTypes = { component: React.PropTypes.func.isRequired, intl: intlShape.isRequired, pattern: React.PropTypes.string.isRequired, }; export default injectIntl(Page);
auth/src/components/common/Input.js
haaswill/ReactNativeCourses
import React from 'react'; import { TextInput, View, Text } from 'react-native'; const Input = ({ label, value, onChangeText, placeholder, secureTextEntry, autoCapitalize }) => { const { inputStyle, labelStyle, containerStyle } = styles; return ( <View style={containerStyle}> <Text style={labelStyle}>{label}</Text> <TextInput secureTextEntry={secureTextEntry} placeholder={placeholder} autoCorrect={false} autoCapitalize={autoCapitalize} style={inputStyle} value={value} onChangeText={onChangeText} /> </View> ); }; const styles = { inputStyle: { color: '#000', paddingRight: 5, paddingLeft: 5, fontSize: 18, lineHeight: 23, flex: 2 }, labelStyle: { fontSize: 18, paddingLeft: 20, flex: 1 }, containerStyle: { height: 40, flex: 1, flexDirection: 'row', alignItems: 'center' } }; export { Input };
docs/src/app/components/pages/components/FlatButton/ExampleComplex.js
andrejunges/material-ui
import React from 'react'; import FlatButton from 'material-ui/FlatButton'; import FontIcon from 'material-ui/FontIcon'; import ActionAndroid from 'material-ui/svg-icons/action/android'; const styles = { exampleImageInput: { cursor: 'pointer', position: 'absolute', top: 0, bottom: 0, right: 0, left: 0, width: '100%', opacity: 0, }, }; const FlatButtonExampleComplex = () => ( <div> <FlatButton label="Choose an Image" labelPosition="before"> <input type="file" style={styles.exampleImageInput} /> </FlatButton> <FlatButton label="Label before" labelPosition="before" primary={true} style={styles.button} icon={<ActionAndroid />} /> <FlatButton label="GitHub Link" href="https://github.com/callemall/material-ui" secondary={true} icon={<FontIcon className="muidocs-icon-custom-github" />} /> </div> ); export default FlatButtonExampleComplex;
fixtures/packaging/systemjs-builder/prod/input.js
pyitphyoaung/react
import React from 'react'; import ReactDOM from 'react-dom'; ReactDOM.render( React.createElement('h1', null, 'Hello World!'), document.getElementById('container') );
ajax/libs/yui/3.7.0/scrollview-base/scrollview-base.js
vuonghuuphuc/cdnjs
YUI.add('scrollview-base', function (Y, NAME) { /** * The scrollview-base module provides a basic ScrollView Widget, without scrollbar indicators * * @module scrollview * @submodule scrollview-base */ var getClassName = Y.ClassNameManager.getClassName, DOCUMENT = Y.config.doc, WINDOW = Y.config.win, IE = Y.UA.ie, NATIVE_TRANSITIONS = Y.Transition.useNative, 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', RIGHT = 'right', BOTTOM = 'bottom', 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, /** * Designated initializer * * @method initializer * @param {config} Configuration object for the plugin */ initializer: function (config) { 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 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 * @returns {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; if (svAxis && svAxis.x) { bb.addClass(CLASS_NAMES.horizontal); } if (svAxis && svAxis.y) { bb.addClass(CLASS_NAMES.vertical); } /** * Internal state, defines the minimum amount that the scrollview can be scrolled along the X axis * * @property _minScrollX * @type number * @protected */ sv._minScrollX = (rtl) ? Math.min(0, -(scrollWidth - width)) : 0; /** * Internal state, defines the maximum amount that the scrollview can be scrolled along the X axis * * @property _maxScrollX * @type number * @protected */ sv._maxScrollX = (rtl) ? 0 : Math.max(0, scrollWidth - width); /** * Internal state, defines the minimum amount that the scrollview can be scrolled along the Y axis * * @property _minScrollY * @type number * @protected */ sv._minScrollY = 0; /** * Internal state, defines the maximum amount that the scrollview can be scrolled along the Y axis * * @property _maxScrollY * @type number * @protected */ sv._maxScrollY = Math.max(0, scrollHeight - height); }, /** * 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 (e) { var sv = this; /** * 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) { // Cancel and delete sv._flickAnim sv._flickAnim.cancel(); delete sv._flickAnim; sv._onTransEnd(); } // TODO: Review if neccesary (#2530129) e.stopPropagation(); // 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; 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) { // If we're out-out-bounds, then snapback if (sv._isOutOfBounds()) { sv._snapBack(); } // Inbounds else { // Don't fire scrollEnd on 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.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, // 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 ? sv._minScrollX : sv._minScrollY, max = flickAxis === DIM_X ? sv._maxScrollX : sv._maxScrollY, belowMin = (newPosition < min), belowMax = (newPosition < max), aboveMin = (newPosition > min), aboveMax = (newPosition > max), belowMinRange = (newPosition < (min - bounceRange)), belowMaxRange = (newPosition < (max + bounceRange)), withinMinRange = (belowMin && (newPosition > (min - bounceRange))), withinMaxRange = (aboveMax && (newPosition < (max + bounceRange))), aboveMinRange = (newPosition > (min - 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._flickAnim.cancel(); delete sv._flickAnim; } // 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); } }, /** * 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), bb = sv._bb, scrollOffset = 10, // 10px isForward = (e.wheelDelta > 0), scrollToY = scrollY - ((isForward ? 1 : -1) * scrollOffset); scrollToY = _constrain(scrollToY, sv._minScrollY, sv._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 * @returns {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), minX = sv._minScrollX, minY = sv._minScrollY, maxX = sv._maxScrollX, maxY = sv._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), minX = sv._minScrollX, minY = sv._minScrollY, maxX = sv._maxScrollX, maxY = sv._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 { // It shouldn't ever get here, but in case it does, fire scrollEnd 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 (e) { var sv = this; // @TODO: Move to sv._cancelFlick() 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; } // If for some reason we're OOB, snapback if (sv._isOutOfBounds()) { sv._snapBack(); } // 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, name) { // 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, dim) { // 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: Y.Transition._VENDOR_PREFIX + 'TransitionDuration', PROPERTY: Y.Transition._VENDOR_PREFIX + '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/Form.js
zjsxwc/amazeui-react
'use strict'; var React = require('react'); var classNames = require('classnames'); var ClassNameMixin = require('./mixins/ClassNameMixin'); var Form = React.createClass({ mixins: [ClassNameMixin], propTypes: { classPrefix: React.PropTypes.string.isRequired, horizontal: React.PropTypes.bool, inline: React.PropTypes.bool }, getDefaultProps: function() { return { classPrefix: 'form' }; }, render: function() { var classSet = this.getClassSet(); classSet[this.prefixClass('horizontal')] = this.props.horizontal; classSet[this.prefixClass('inline')] = this.props.inline; return ( <form {...this.props} className={classNames(classSet, this.props.className)}> {this.props.children} </form> ); } }); module.exports = Form;
src/components/Header/index.js
hAPPckathon/20v
import React, { Component } from 'react';// eslint-disable-line no-unused-vars let Header = ({ children }) => ( <div className="results-header"> {children} </div> ); export default Header;
ajax/libs/mobx-react/2.1.2/index.js
froala/cdnjs
(function() { function mrFactory(mobservable, React, ReactDOM) { if (!mobservable) throw new Error("mobservable-react requires the Mobservable package") if (!React) throw new Error("mobservable-react requires React to be available"); var isTracking = false; // WeakMap<Node, Object>; var componentByNodeRegistery = typeof WeakMap !== "undefined" ? new WeakMap() : undefined; var renderReporter = new mobservable.extras.SimpleEventEmitter(); function findDOMNode(component) { if (ReactDOM) return ReactDOM.findDOMNode(component); return null; } function reportRendering(component) { var node = findDOMNode(component); if (node) componentByNodeRegistery.set(node, component); renderReporter.emit({ event: 'render', renderTime: component.__$mobRenderEnd - component.__$mobRenderStart, totalTime: Date.now() - component.__$mobRenderStart, component: component, node: node }); } var reactiveMixin = { componentWillMount: function() { var baseRender = this.render; this.__$mobDependencies = []; this.render = function() { if (isTracking) this.__$mobRenderStart = Date.now(); // invoke the old render function and in the mean time track all dependencies using // 'autorun'. // when the dependencies change, the function is triggered, but we don't want to // rerender because that would ignore the normal React lifecycle, // so instead we dispose the current observer and trigger a force update. var hasRendered = false; var self = this; var rendering; this.__$mobRenderDisposer = mobservable.autorun(function reactiveRender() { if (!hasRendered) { hasRendered = true; // withStrict: throw errors if the render function tries to alter state. mobservable.extras.withStrict(true, function() { rendering = baseRender.call(self); }); } else { self.__$mobRenderDisposer(); // dispose if (self.__$mobHasUnmounted !== true) // Fixes #12, should not be needed after fixing mobservable #71 React.Component.prototype.forceUpdate.call(self); } }); this.render.$mobservable = this.__$mobRenderDisposer.$mobservable; // Generate friendly name for debugging this.render.$mobservable.context.name = [ this.displayName || this.name || (this.constructor && this.constructor.name) || "<component>", "#", this._reactInternalInstance && this._reactInternalInstance._rootNodeID, ".render()" ].join(""); // make sure views are not disposed between the clean-up of the observer and the next render // (invoked through force update) var newDependencies = this.__$mobRenderDisposer.$mobservable.observing.map(function(dep) { dep.setRefCount(+1); return dep; }); this.__$mobDependencies.forEach(function(dep) { dep.setRefCount(-1); }); this.__$mobDependencies = newDependencies; if (isTracking) this.__$mobRenderEnd = Date.now(); return rendering; } }, componentWillUnmount: function() { this.__$mobRenderDisposer && this.__$mobRenderDisposer(); this.__$mobDependencies.forEach(function(dep) { dep.setRefCount(-1); }); this.__$mobHasUnmounted = true; delete this.render.$mobservable; if (isTracking) { var node = findDOMNode(this); if (node) { componentByNodeRegistery.delete(node); } renderReporter.emit({ event: 'destroy', component: this, node: node }); } }, componentDidMount: function() { if (isTracking) reportRendering(this); }, componentDidUpdate: function() { if (isTracking) reportRendering(this); }, shouldComponentUpdate: function(nextProps, nextState) { // update on any state changes (as is the default) if (this.state !== nextState) return true; // update if props are shallowly not equal, inspired by PureRenderMixin var keys = Object.keys(this.props); var key; if (keys.length !== Object.keys(nextProps).length) return true; for(var i = keys.length -1; i >= 0, key = keys[i]; i--) { var newValue = nextProps[key]; if (newValue !== this.props[key]) { return true; } else if (newValue && typeof newValue === "object" && !mobservable.isObservable(newValue)) { /** * If the newValue is still the same object, but that object is not observable, * fallback to the default React behavior: update, because the object *might* have changed. * If you need the non default behavior, just use the React pure render mixin, as that one * will work fine with mobservable as well, instead of the default implementation of * observer. */ return true; } } return false; } } function patch(target, funcName) { var base = target[funcName]; var mixinFunc = reactiveMixin[funcName]; target[funcName] = function() { base && base.apply(this, arguments); mixinFunc.apply(this, arguments); } } function observer(componentClass) { // If it is function but doesn't seem to be a react class constructor, // wrap it to a react class automatically if (typeof componentClass === "function" && !componentClass.prototype.render && !componentClass.isReactClass && !React.Component.isPrototypeOf(componentClass)) { return observer(React.createClass({ displayName: componentClass.name, propTypes: componentClass.propTypes, getDefaultProps: function() { return componentClass.defaultProps; }, render: function() { return componentClass.call(this, this.props); } })); } if (!componentClass) throw new Error("Please pass a valid component to 'observer'"); var target = componentClass.prototype || componentClass; [ "componentWillMount", "componentWillUnmount", "componentDidMount", "componentDidUpdate" ].forEach(function(funcName) { patch(target, funcName) }); if (!target.shouldComponentUpdate) target.shouldComponentUpdate = reactiveMixin.shouldComponentUpdate; componentClass.isMobservableReactObserver = true; return componentClass; } function trackComponents() { if (typeof WeakMap === "undefined") throw new Error("[mobservable-react] tracking components is not supported in this browser."); if (!isTracking) isTracking = true; } return ({ observer: observer, reactiveComponent: function() { console.warn("[mobservable-react] `reactiveComponent` has been renamed to `observer` and will be removed in 1.1."); return observer.apply(null, arguments); }, renderReporter: renderReporter, componentByNodeRegistery: componentByNodeRegistery, trackComponents: trackComponents }); } // UMD if (typeof define === 'function' && define.amd) { define('mobservable-react', ['mobservable', 'react', 'react-dom'], mrFactory); } else if (typeof exports === 'object') { module.exports = mrFactory(require('mobservable'), require('react'), require('react-dom')); } else { this.mobservableReact = mrFactory(this['mobservable'], this['React'], this['ReactDOM']); } })();
public/assets/scripts/containers/apps/common/filters.js
luisfbmelo/reda
import React from 'react'; import { Component } from 'react'; import { connect } from 'react-redux'; import { fetchCatApp, resetCategories } from '@/actions/categories'; import { fetchThemes, resetThemes } from '@/actions/themes'; import { getFiltersApps, resetFiltersApps, setFiltersApps } from '@/actions/filters'; import { bindActionCreators } from 'redux'; import AppsFilters from '@/components/apps/common/filters'; function mapStateToProps(state) { return { auth: state.auth, categories: state.categories, filtersApps: state.filtersApps, themes: state.themes }; } function mapDispatchToProps(dispatch) { return bindActionCreators({ setFiltersApps, getFiltersApps, resetFiltersApps, fetchCatApp, resetCategories, fetchThemes, resetThemes }, dispatch); } export default connect(mapStateToProps, mapDispatchToProps)(AppsFilters);
src/index.js
andrewthehan/idk
import React from 'react'; import ReactDOM from 'react-dom'; import { IndexRoute, Redirect, Route, Router, browserHistory } from 'react-router'; import Clipboard from 'clipboard'; import * as firebase from 'firebase'; import About from './container/About'; import Frame from './container/Frame'; import Group from './container/Group'; import Help from './container/Help'; import Home from './container/Home'; import InvalidGroup from './container/InvalidGroup'; import './style/style.css'; import './index.css'; const config = { apiKey: "AIzaSyCdD2gPik7oWg36XJMG0BKPbRdNIkbdSgg", authDomain: "idk-database.firebaseapp.com", databaseURL: "https://idk-database.firebaseio.com", storageBucket: "idk-database.appspot.com", messagingSenderId: "417807676279" }; firebase.initializeApp(config); new Clipboard('.clipboard'); ReactDOM.render( <Router history={browserHistory}> <Route path="/idk" component={Frame}> <IndexRoute component={Home} /> <Route path="about" component={About} /> <Route path="help" component={Help} /> <Route path=":id/invalid" component={InvalidGroup} /> <Route path=":id" component={Group} /> <Redirect from="*" to="/idk" /> </Route> </Router>, document.getElementById('root') );
packages/material-ui-icons/src/Crop54Outlined.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="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z" /></g></React.Fragment> , 'Crop54Outlined');
stories/props/resources.stories.js
jquense/react-big-calendar
import React from 'react' import moment from 'moment' import { Calendar, Views, momentLocalizer } from '../../src' import resourceData from '../resources/resourceEvents' import mdx from './resources.mdx' const { events: resourceEvents, list: resources } = resourceData const mLocalizer = momentLocalizer(moment) export default { title: 'props', component: Calendar, argTypes: { localizer: { control: { type: null } }, events: { control: { type: null } }, defaultDate: { control: { type: null, }, }, defaultView: { control: { type: null, }, }, }, parameters: { docs: { page: mdx, }, }, } const Template = (args) => ( <div className="height600"> <Calendar {...args} /> </div> ) export const Resources = Template.bind({}) Resources.storyName = 'resources' Resources.args = { defaultDate: new Date(2015, 3, 4), defaultView: Views.DAY, events: resourceEvents, localizer: mLocalizer, resources, }
ajax/libs/webshim/1.14.5-RC2/dev/shims/combos/26.js
Sneezry/cdnjs
/** * mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill * v1.2.1 * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing * * Date: 2014-05-14 */ /** * Compiled inline version. (Library mode) */ /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */ /*globals $code */ (function(exports, undefined) { "use strict"; var modules = {}; function require(ids, callback) { var module, defs = []; for (var i = 0; i < ids.length; ++i) { module = modules[ids[i]] || resolve(ids[i]); if (!module) { throw 'module definition dependecy not found: ' + ids[i]; } defs.push(module); } callback.apply(null, defs); } function define(id, dependencies, definition) { if (typeof id !== 'string') { throw 'invalid module definition, module id must be defined and be a string'; } if (dependencies === undefined) { throw 'invalid module definition, dependencies must be specified'; } if (definition === undefined) { throw 'invalid module definition, definition function must be specified'; } require(dependencies, function() { modules[id] = definition.apply(null, arguments); }); } function defined(id) { return !!modules[id]; } function resolve(id) { var target = exports; var fragments = id.split(/[.\/]/); for (var fi = 0; fi < fragments.length; ++fi) { if (!target[fragments[fi]]) { return; } target = target[fragments[fi]]; } return target; } function expose(ids) { for (var i = 0; i < ids.length; i++) { var target = exports; var id = ids[i]; var fragments = id.split(/[.\/]/); for (var fi = 0; fi < fragments.length - 1; ++fi) { if (target[fragments[fi]] === undefined) { target[fragments[fi]] = {}; } target = target[fragments[fi]]; } target[fragments[fragments.length - 1]] = modules[id]; } } // Included from: src/javascript/core/utils/Basic.js /** * Basic.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/utils/Basic', [], function() { /** Gets the true type of the built-in object (better version of typeof). @author Angus Croll (http://javascriptweblog.wordpress.com/) @method typeOf @for Utils @static @param {Object} o Object to check. @return {String} Object [[Class]] */ var typeOf = function(o) { var undef; if (o === undef) { return 'undefined'; } else if (o === null) { return 'null'; } else if (o.nodeType) { return 'node'; } // the snippet below is awesome, however it fails to detect null, undefined and arguments types in IE lte 8 return ({}).toString.call(o).match(/\s([a-z|A-Z]+)/)[1].toLowerCase(); }; /** Extends the specified object with another object. @method extend @static @param {Object} target Object to extend. @param {Object} [obj]* Multiple objects to extend with. @return {Object} Same as target, the extended object. */ var extend = function(target) { var undef; each(arguments, function(arg, i) { if (i > 0) { each(arg, function(value, key) { if (value !== undef) { if (typeOf(target[key]) === typeOf(value) && !!~inArray(typeOf(value), ['array', 'object'])) { extend(target[key], value); } else { target[key] = value; } } }); } }); return target; }; /** Executes the callback function for each item in array/object. If you return false in the callback it will break the loop. @method each @static @param {Object} obj Object to iterate. @param {function} callback Callback function to execute for each item. */ var each = function(obj, callback) { var length, key, i, undef; if (obj) { try { length = obj.length; } catch(ex) { length = undef; } if (length === undef) { // Loop object items for (key in obj) { if (obj.hasOwnProperty(key)) { if (callback(obj[key], key) === false) { return; } } } } else { // Loop array items for (i = 0; i < length; i++) { if (callback(obj[i], i) === false) { return; } } } } }; /** Checks if object is empty. @method isEmptyObj @static @param {Object} o Object to check. @return {Boolean} */ var isEmptyObj = function(obj) { var prop; if (!obj || typeOf(obj) !== 'object') { return true; } for (prop in obj) { return false; } return true; }; /** Recieve an array of functions (usually async) to call in sequence, each function receives a callback as first argument that it should call, when it completes. Finally, after everything is complete, main callback is called. Passing truthy value to the callback as a first argument will interrupt the sequence and invoke main callback immediately. @method inSeries @static @param {Array} queue Array of functions to call in sequence @param {Function} cb Main callback that is called in the end, or in case of error */ var inSeries = function(queue, cb) { var i = 0, length = queue.length; if (typeOf(cb) !== 'function') { cb = function() {}; } if (!queue || !queue.length) { cb(); } function callNext(i) { if (typeOf(queue[i]) === 'function') { queue[i](function(error) { /*jshint expr:true */ ++i < length && !error ? callNext(i) : cb(error); }); } } callNext(i); }; /** Recieve an array of functions (usually async) to call in parallel, each function receives a callback as first argument that it should call, when it completes. After everything is complete, main callback is called. Passing truthy value to the callback as a first argument will interrupt the process and invoke main callback immediately. @method inParallel @static @param {Array} queue Array of functions to call in sequence @param {Function} cb Main callback that is called in the end, or in case of erro */ var inParallel = function(queue, cb) { var count = 0, num = queue.length, cbArgs = new Array(num); each(queue, function(fn, i) { fn(function(error) { if (error) { return cb(error); } var args = [].slice.call(arguments); args.shift(); // strip error - undefined or not cbArgs[i] = args; count++; if (count === num) { cbArgs.unshift(null); cb.apply(this, cbArgs); } }); }); }; /** Find an element in array and return it's index if present, otherwise return -1. @method inArray @static @param {Mixed} needle Element to find @param {Array} array @return {Int} Index of the element, or -1 if not found */ var inArray = function(needle, array) { if (array) { if (Array.prototype.indexOf) { return Array.prototype.indexOf.call(array, needle); } for (var i = 0, length = array.length; i < length; i++) { if (array[i] === needle) { return i; } } } return -1; }; /** Returns elements of first array if they are not present in second. And false - otherwise. @private @method arrayDiff @param {Array} needles @param {Array} array @return {Array|Boolean} */ var arrayDiff = function(needles, array) { var diff = []; if (typeOf(needles) !== 'array') { needles = [needles]; } if (typeOf(array) !== 'array') { array = [array]; } for (var i in needles) { if (inArray(needles[i], array) === -1) { diff.push(needles[i]); } } return diff.length ? diff : false; }; /** Find intersection of two arrays. @private @method arrayIntersect @param {Array} array1 @param {Array} array2 @return {Array} Intersection of two arrays or null if there is none */ var arrayIntersect = function(array1, array2) { var result = []; each(array1, function(item) { if (inArray(item, array2) !== -1) { result.push(item); } }); return result.length ? result : null; }; /** Forces anything into an array. @method toArray @static @param {Object} obj Object with length field. @return {Array} Array object containing all items. */ var toArray = function(obj) { var i, arr = []; for (i = 0; i < obj.length; i++) { arr[i] = obj[i]; } return arr; }; /** Generates an unique ID. This is 99.99% unique since it takes the current time and 5 random numbers. The only way a user would be able to get the same ID is if the two persons at the same exact milisecond manages to get 5 the same random numbers between 0-65535 it also uses a counter so each call will be guaranteed to be page unique. It's more probable for the earth to be hit with an ansteriod. Y @method guid @static @param {String} prefix to prepend (by default 'o' will be prepended). @method guid @return {String} Virtually unique id. */ var guid = (function() { var counter = 0; return function(prefix) { var guid = new Date().getTime().toString(32), i; for (i = 0; i < 5; i++) { guid += Math.floor(Math.random() * 65535).toString(32); } return (prefix || 'o_') + guid + (counter++).toString(32); }; }()); /** Trims white spaces around the string @method trim @static @param {String} str @return {String} */ var trim = function(str) { if (!str) { return str; } return String.prototype.trim ? String.prototype.trim.call(str) : str.toString().replace(/^\s*/, '').replace(/\s*$/, ''); }; /** Parses the specified size string into a byte value. For example 10kb becomes 10240. @method parseSizeStr @static @param {String/Number} size String to parse or number to just pass through. @return {Number} Size in bytes. */ var parseSizeStr = function(size) { if (typeof(size) !== 'string') { return size; } var muls = { t: 1099511627776, g: 1073741824, m: 1048576, k: 1024 }, mul; size = /^([0-9]+)([mgk]?)$/.exec(size.toLowerCase().replace(/[^0-9mkg]/g, '')); mul = size[2]; size = +size[1]; if (muls.hasOwnProperty(mul)) { size *= muls[mul]; } return size; }; return { guid: guid, typeOf: typeOf, extend: extend, each: each, isEmptyObj: isEmptyObj, inSeries: inSeries, inParallel: inParallel, inArray: inArray, arrayDiff: arrayDiff, arrayIntersect: arrayIntersect, toArray: toArray, trim: trim, parseSizeStr: parseSizeStr }; }); // Included from: src/javascript/core/I18n.js /** * I18n.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/core/I18n", [ "moxie/core/utils/Basic" ], function(Basic) { var i18n = {}; return { /** * Extends the language pack object with new items. * * @param {Object} pack Language pack items to add. * @return {Object} Extended language pack object. */ addI18n: function(pack) { return Basic.extend(i18n, pack); }, /** * Translates the specified string by checking for the english string in the language pack lookup. * * @param {String} str String to look for. * @return {String} Translated string or the input string if it wasn't found. */ translate: function(str) { return i18n[str] || str; }, /** * Shortcut for translate function * * @param {String} str String to look for. * @return {String} Translated string or the input string if it wasn't found. */ _: function(str) { return this.translate(str); }, /** * Pseudo sprintf implementation - simple way to replace tokens with specified values. * * @param {String} str String with tokens * @return {String} String with replaced tokens */ sprintf: function(str) { var args = [].slice.call(arguments, 1); return str.replace(/%[a-z]/g, function() { var value = args.shift(); return Basic.typeOf(value) !== 'undefined' ? value : ''; }); } }; }); // Included from: src/javascript/core/utils/Mime.js /** * Mime.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/core/utils/Mime", [ "moxie/core/utils/Basic", "moxie/core/I18n" ], function(Basic, I18n) { var mimeData = "" + "application/msword,doc dot," + "application/pdf,pdf," + "application/pgp-signature,pgp," + "application/postscript,ps ai eps," + "application/rtf,rtf," + "application/vnd.ms-excel,xls xlb," + "application/vnd.ms-powerpoint,ppt pps pot," + "application/zip,zip," + "application/x-shockwave-flash,swf swfl," + "application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx," + "application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx," + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx," + "application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx," + "application/vnd.openxmlformats-officedocument.presentationml.template,potx," + "application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx," + "application/x-javascript,js," + "application/json,json," + "audio/mpeg,mp3 mpga mpega mp2," + "audio/x-wav,wav," + "audio/x-m4a,m4a," + "audio/ogg,oga ogg," + "audio/aiff,aiff aif," + "audio/flac,flac," + "audio/aac,aac," + "audio/ac3,ac3," + "audio/x-ms-wma,wma," + "image/bmp,bmp," + "image/gif,gif," + "image/jpeg,jpg jpeg jpe," + "image/photoshop,psd," + "image/png,png," + "image/svg+xml,svg svgz," + "image/tiff,tiff tif," + "text/plain,asc txt text diff log," + "text/html,htm html xhtml," + "text/css,css," + "text/csv,csv," + "text/rtf,rtf," + "video/mpeg,mpeg mpg mpe m2v," + "video/quicktime,qt mov," + "video/mp4,mp4," + "video/x-m4v,m4v," + "video/x-flv,flv," + "video/x-ms-wmv,wmv," + "video/avi,avi," + "video/webm,webm," + "video/3gpp,3gpp 3gp," + "video/3gpp2,3g2," + "video/vnd.rn-realvideo,rv," + "video/ogg,ogv," + "video/x-matroska,mkv," + "application/vnd.oasis.opendocument.formula-template,otf," + "application/octet-stream,exe"; var Mime = { mimes: {}, extensions: {}, // Parses the default mime types string into a mimes and extensions lookup maps addMimeType: function (mimeData) { var items = mimeData.split(/,/), i, ii, ext; for (i = 0; i < items.length; i += 2) { ext = items[i + 1].split(/ /); // extension to mime lookup for (ii = 0; ii < ext.length; ii++) { this.mimes[ext[ii]] = items[i]; } // mime to extension lookup this.extensions[items[i]] = ext; } }, extList2mimes: function (filters, addMissingExtensions) { var self = this, ext, i, ii, type, mimes = []; // convert extensions to mime types list for (i = 0; i < filters.length; i++) { ext = filters[i].extensions.split(/\s*,\s*/); for (ii = 0; ii < ext.length; ii++) { // if there's an asterisk in the list, then accept attribute is not required if (ext[ii] === '*') { return []; } type = self.mimes[ext[ii]]; if (!type) { if (addMissingExtensions && /^\w+$/.test(ext[ii])) { mimes.push('.' + ext[ii]); } else { return []; // accept all } } else if (Basic.inArray(type, mimes) === -1) { mimes.push(type); } } } return mimes; }, mimes2exts: function(mimes) { var self = this, exts = []; Basic.each(mimes, function(mime) { if (mime === '*') { exts = []; return false; } // check if this thing looks like mime type var m = mime.match(/^(\w+)\/(\*|\w+)$/); if (m) { if (m[2] === '*') { // wildcard mime type detected Basic.each(self.extensions, function(arr, mime) { if ((new RegExp('^' + m[1] + '/')).test(mime)) { [].push.apply(exts, self.extensions[mime]); } }); } else if (self.extensions[mime]) { [].push.apply(exts, self.extensions[mime]); } } }); return exts; }, mimes2extList: function(mimes) { var accept = [], exts = []; if (Basic.typeOf(mimes) === 'string') { mimes = Basic.trim(mimes).split(/\s*,\s*/); } exts = this.mimes2exts(mimes); accept.push({ title: I18n.translate('Files'), extensions: exts.length ? exts.join(',') : '*' }); // save original mimes string accept.mimes = mimes; return accept; }, getFileExtension: function(fileName) { var matches = fileName && fileName.match(/\.([^.]+)$/); if (matches) { return matches[1].toLowerCase(); } return ''; }, getFileMime: function(fileName) { return this.mimes[this.getFileExtension(fileName)] || ''; } }; Mime.addMimeType(mimeData); return Mime; }); // Included from: src/javascript/core/utils/Env.js /** * Env.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/core/utils/Env", [ "moxie/core/utils/Basic" ], function(Basic) { // UAParser.js v0.6.2 // Lightweight JavaScript-based User-Agent string parser // https://github.com/faisalman/ua-parser-js // // Copyright © 2012-2013 Faisalman <fyzlman@gmail.com> // Dual licensed under GPLv2 & MIT var UAParser = (function (undefined) { ////////////// // Constants ///////////// var EMPTY = '', UNKNOWN = '?', FUNC_TYPE = 'function', UNDEF_TYPE = 'undefined', OBJ_TYPE = 'object', MAJOR = 'major', MODEL = 'model', NAME = 'name', TYPE = 'type', VENDOR = 'vendor', VERSION = 'version', ARCHITECTURE= 'architecture', CONSOLE = 'console', MOBILE = 'mobile', TABLET = 'tablet'; /////////// // Helper ////////// var util = { has : function (str1, str2) { return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1; }, lowerize : function (str) { return str.toLowerCase(); } }; /////////////// // Map helper ////////////// var mapper = { rgx : function () { // loop through all regexes maps for (var result, i = 0, j, k, p, q, matches, match, args = arguments; i < args.length; i += 2) { var regex = args[i], // even sequence (0,2,4,..) props = args[i + 1]; // odd sequence (1,3,5,..) // construct object barebones if (typeof(result) === UNDEF_TYPE) { result = {}; for (p in props) { q = props[p]; if (typeof(q) === OBJ_TYPE) { result[q[0]] = undefined; } else { result[q] = undefined; } } } // try matching uastring with regexes for (j = k = 0; j < regex.length; j++) { matches = regex[j].exec(this.getUA()); if (!!matches) { for (p = 0; p < props.length; p++) { match = matches[++k]; q = props[p]; // check if given property is actually array if (typeof(q) === OBJ_TYPE && q.length > 0) { if (q.length == 2) { if (typeof(q[1]) == FUNC_TYPE) { // assign modified match result[q[0]] = q[1].call(this, match); } else { // assign given value, ignore regex match result[q[0]] = q[1]; } } else if (q.length == 3) { // check whether function or regex if (typeof(q[1]) === FUNC_TYPE && !(q[1].exec && q[1].test)) { // call function (usually string mapper) result[q[0]] = match ? q[1].call(this, match, q[2]) : undefined; } else { // sanitize match using given regex result[q[0]] = match ? match.replace(q[1], q[2]) : undefined; } } else if (q.length == 4) { result[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined; } } else { result[q] = match ? match : undefined; } } break; } } if(!!matches) break; // break the loop immediately if match found } return result; }, str : function (str, map) { for (var i in map) { // check if array if (typeof(map[i]) === OBJ_TYPE && map[i].length > 0) { for (var j = 0; j < map[i].length; j++) { if (util.has(map[i][j], str)) { return (i === UNKNOWN) ? undefined : i; } } } else if (util.has(map[i], str)) { return (i === UNKNOWN) ? undefined : i; } } return str; } }; /////////////// // String map ////////////// var maps = { browser : { oldsafari : { major : { '1' : ['/8', '/1', '/3'], '2' : '/4', '?' : '/' }, version : { '1.0' : '/8', '1.2' : '/1', '1.3' : '/3', '2.0' : '/412', '2.0.2' : '/416', '2.0.3' : '/417', '2.0.4' : '/419', '?' : '/' } } }, device : { sprint : { model : { 'Evo Shift 4G' : '7373KT' }, vendor : { 'HTC' : 'APA', 'Sprint' : 'Sprint' } } }, os : { windows : { version : { 'ME' : '4.90', 'NT 3.11' : 'NT3.51', 'NT 4.0' : 'NT4.0', '2000' : 'NT 5.0', 'XP' : ['NT 5.1', 'NT 5.2'], 'Vista' : 'NT 6.0', '7' : 'NT 6.1', '8' : 'NT 6.2', '8.1' : 'NT 6.3', 'RT' : 'ARM' } } } }; ////////////// // Regex map ///////////// var regexes = { browser : [[ // Presto based /(opera\smini)\/((\d+)?[\w\.-]+)/i, // Opera Mini /(opera\s[mobiletab]+).+version\/((\d+)?[\w\.-]+)/i, // Opera Mobi/Tablet /(opera).+version\/((\d+)?[\w\.]+)/i, // Opera > 9.80 /(opera)[\/\s]+((\d+)?[\w\.]+)/i // Opera < 9.80 ], [NAME, VERSION, MAJOR], [ /\s(opr)\/((\d+)?[\w\.]+)/i // Opera Webkit ], [[NAME, 'Opera'], VERSION, MAJOR], [ // Mixed /(kindle)\/((\d+)?[\w\.]+)/i, // Kindle /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?((\d+)?[\w\.]+)*/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer // Trident based /(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?((\d+)?[\w\.]*)/i, // Avant/IEMobile/SlimBrowser/Baidu /(?:ms|\()(ie)\s((\d+)?[\w\.]+)/i, // Internet Explorer // Webkit/KHTML based /(rekonq)((?:\/)[\w\.]+)*/i, // Rekonq /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron)\/((\d+)?[\w\.-]+)/i // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron ], [NAME, VERSION, MAJOR], [ /(trident).+rv[:\s]((\d+)?[\w\.]+).+like\sgecko/i // IE11 ], [[NAME, 'IE'], VERSION, MAJOR], [ /(yabrowser)\/((\d+)?[\w\.]+)/i // Yandex ], [[NAME, 'Yandex'], VERSION, MAJOR], [ /(comodo_dragon)\/((\d+)?[\w\.]+)/i // Comodo Dragon ], [[NAME, /_/g, ' '], VERSION, MAJOR], [ /(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?((\d+)?[\w\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia ], [NAME, VERSION, MAJOR], [ /(dolfin)\/((\d+)?[\w\.]+)/i // Dolphin ], [[NAME, 'Dolphin'], VERSION, MAJOR], [ /((?:android.+)crmo|crios)\/((\d+)?[\w\.]+)/i // Chrome for Android/iOS ], [[NAME, 'Chrome'], VERSION, MAJOR], [ /((?:android.+))version\/((\d+)?[\w\.]+)\smobile\ssafari/i // Android Browser ], [[NAME, 'Android Browser'], VERSION, MAJOR], [ /version\/((\d+)?[\w\.]+).+?mobile\/\w+\s(safari)/i // Mobile Safari ], [VERSION, MAJOR, [NAME, 'Mobile Safari']], [ /version\/((\d+)?[\w\.]+).+?(mobile\s?safari|safari)/i // Safari & Safari Mobile ], [VERSION, MAJOR, NAME], [ /webkit.+?(mobile\s?safari|safari)((\/[\w\.]+))/i // Safari < 3.0 ], [NAME, [MAJOR, mapper.str, maps.browser.oldsafari.major], [VERSION, mapper.str, maps.browser.oldsafari.version]], [ /(konqueror)\/((\d+)?[\w\.]+)/i, // Konqueror /(webkit|khtml)\/((\d+)?[\w\.]+)/i ], [NAME, VERSION, MAJOR], [ // Gecko based /(navigator|netscape)\/((\d+)?[\w\.-]+)/i // Netscape ], [[NAME, 'Netscape'], VERSION, MAJOR], [ /(swiftfox)/i, // Swiftfox /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?((\d+)?[\w\.\+]+)/i, // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/((\d+)?[\w\.-]+)/i, // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix /(mozilla)\/((\d+)?[\w\.]+).+rv\:.+gecko\/\d+/i, // Mozilla // Other /(uc\s?browser|polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|qqbrowser)[\/\s]?((\d+)?[\w\.]+)/i, // UCBrowser/Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/QQBrowser /(links)\s\(((\d+)?[\w\.]+)/i, // Links /(gobrowser)\/?((\d+)?[\w\.]+)*/i, // GoBrowser /(ice\s?browser)\/v?((\d+)?[\w\._]+)/i, // ICE Browser /(mosaic)[\/\s]((\d+)?[\w\.]+)/i // Mosaic ], [NAME, VERSION, MAJOR] ], engine : [[ /(presto)\/([\w\.]+)/i, // Presto /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m /(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, // KHTML/Tasman/Links /(icab)[\/\s]([23]\.[\d\.]+)/i // iCab ], [NAME, VERSION], [ /rv\:([\w\.]+).*(gecko)/i // Gecko ], [VERSION, NAME] ], os : [[ // Windows based /(windows)\snt\s6\.2;\s(arm)/i, // Windows RT /(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [ /(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [ // Mobile/Embedded OS /\((bb)(10);/i // BlackBerry 10 ], [[NAME, 'BlackBerry'], VERSION], [ /(blackberry)\w*\/?([\w\.]+)*/i, // Blackberry /(tizen)\/([\w\.]+)/i, // Tizen /(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego)[\/\s-]?([\w\.]+)*/i // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo ], [NAME, VERSION], [ /(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i // Symbian ], [[NAME, 'Symbian'], VERSION],[ /mozilla.+\(mobile;.+gecko.+firefox/i // Firefox OS ], [[NAME, 'Firefox OS'], VERSION], [ // Console /(nintendo|playstation)\s([wids3portablevu]+)/i, // Nintendo/Playstation // GNU/Linux based /(mint)[\/\s\(]?(\w+)*/i, // Mint /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)[\/\s-]?([\w\.-]+)*/i, // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk /(hurd|linux)\s?([\w\.]+)*/i, // Hurd/Linux /(gnu)\s?([\w\.]+)*/i // GNU ], [NAME, VERSION], [ /(cros)\s[\w]+\s([\w\.]+\w)/i // Chromium OS ], [[NAME, 'Chromium OS'], VERSION],[ // Solaris /(sunos)\s?([\w\.]+\d)*/i // Solaris ], [[NAME, 'Solaris'], VERSION], [ // BSD based /\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly ], [NAME, VERSION],[ /(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i // iOS ], [[NAME, 'iOS'], [VERSION, /_/g, '.']], [ /(mac\sos\sx)\s?([\w\s\.]+\w)*/i // Mac OS ], [NAME, [VERSION, /_/g, '.']], [ // Other /(haiku)\s(\w+)/i, // Haiku /(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i, // AIX /(macintosh|mac(?=_powerpc)|plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos)/i, // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS /(unix)\s?([\w\.]+)*/i // UNIX ], [NAME, VERSION] ] }; ///////////////// // Constructor //////////////// var UAParser = function (uastring) { var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY); this.getBrowser = function () { return mapper.rgx.apply(this, regexes.browser); }; this.getEngine = function () { return mapper.rgx.apply(this, regexes.engine); }; this.getOS = function () { return mapper.rgx.apply(this, regexes.os); }; this.getResult = function() { return { ua : this.getUA(), browser : this.getBrowser(), engine : this.getEngine(), os : this.getOS() }; }; this.getUA = function () { return ua; }; this.setUA = function (uastring) { ua = uastring; return this; }; this.setUA(ua); }; return new UAParser().getResult(); })(); function version_compare(v1, v2, operator) { // From: http://phpjs.org/functions // + original by: Philippe Jausions (http://pear.php.net/user/jausions) // + original by: Aidan Lister (http://aidanlister.com/) // + reimplemented by: Kankrelune (http://www.webfaktory.info/) // + improved by: Brett Zamir (http://brett-zamir.me) // + improved by: Scott Baker // + improved by: Theriault // * example 1: version_compare('8.2.5rc', '8.2.5a'); // * returns 1: 1 // * example 2: version_compare('8.2.50', '8.2.52', '<'); // * returns 2: true // * example 3: version_compare('5.3.0-dev', '5.3.0'); // * returns 3: -1 // * example 4: version_compare('4.1.0.52','4.01.0.51'); // * returns 4: 1 // Important: compare must be initialized at 0. var i = 0, x = 0, compare = 0, // vm maps textual PHP versions to negatives so they're less than 0. // PHP currently defines these as CASE-SENSITIVE. It is important to // leave these as negatives so that they can come before numerical versions // and as if no letters were there to begin with. // (1alpha is < 1 and < 1.1 but > 1dev1) // If a non-numerical value can't be mapped to this table, it receives // -7 as its value. vm = { 'dev': -6, 'alpha': -5, 'a': -5, 'beta': -4, 'b': -4, 'RC': -3, 'rc': -3, '#': -2, 'p': 1, 'pl': 1 }, // This function will be called to prepare each version argument. // It replaces every _, -, and + with a dot. // It surrounds any nonsequence of numbers/dots with dots. // It replaces sequences of dots with a single dot. // version_compare('4..0', '4.0') == 0 // Important: A string of 0 length needs to be converted into a value // even less than an unexisting value in vm (-7), hence [-8]. // It's also important to not strip spaces because of this. // version_compare('', ' ') == 1 prepVersion = function (v) { v = ('' + v).replace(/[_\-+]/g, '.'); v = v.replace(/([^.\d]+)/g, '.$1.').replace(/\.{2,}/g, '.'); return (!v.length ? [-8] : v.split('.')); }, // This converts a version component to a number. // Empty component becomes 0. // Non-numerical component becomes a negative number. // Numerical component becomes itself as an integer. numVersion = function (v) { return !v ? 0 : (isNaN(v) ? vm[v] || -7 : parseInt(v, 10)); }; v1 = prepVersion(v1); v2 = prepVersion(v2); x = Math.max(v1.length, v2.length); for (i = 0; i < x; i++) { if (v1[i] == v2[i]) { continue; } v1[i] = numVersion(v1[i]); v2[i] = numVersion(v2[i]); if (v1[i] < v2[i]) { compare = -1; break; } else if (v1[i] > v2[i]) { compare = 1; break; } } if (!operator) { return compare; } // Important: operator is CASE-SENSITIVE. // "No operator" seems to be treated as "<." // Any other values seem to make the function return null. switch (operator) { case '>': case 'gt': return (compare > 0); case '>=': case 'ge': return (compare >= 0); case '<=': case 'le': return (compare <= 0); case '==': case '=': case 'eq': return (compare === 0); case '<>': case '!=': case 'ne': return (compare !== 0); case '': case '<': case 'lt': return (compare < 0); default: return null; } } var can = (function() { var caps = { define_property: (function() { /* // currently too much extra code required, not exactly worth it try { // as of IE8, getters/setters are supported only on DOM elements var obj = {}; if (Object.defineProperty) { Object.defineProperty(obj, 'prop', { enumerable: true, configurable: true }); return true; } } catch(ex) {} if (Object.prototype.__defineGetter__ && Object.prototype.__defineSetter__) { return true; }*/ return false; }()), create_canvas: (function() { // On the S60 and BB Storm, getContext exists, but always returns undefined // so we actually have to call getContext() to verify // github.com/Modernizr/Modernizr/issues/issue/97/ var el = document.createElement('canvas'); return !!(el.getContext && el.getContext('2d')); }()), return_response_type: function(responseType) { try { if (Basic.inArray(responseType, ['', 'text', 'document']) !== -1) { return true; } else if (window.XMLHttpRequest) { var xhr = new XMLHttpRequest(); xhr.open('get', '/'); // otherwise Gecko throws an exception if ('responseType' in xhr) { xhr.responseType = responseType; // as of 23.0.1271.64, Chrome switched from throwing exception to merely logging it to the console (why? o why?) if (xhr.responseType !== responseType) { return false; } return true; } } } catch (ex) {} return false; }, // ideas for this heavily come from Modernizr (http://modernizr.com/) use_data_uri: (function() { var du = new Image(); du.onload = function() { caps.use_data_uri = (du.width === 1 && du.height === 1); }; setTimeout(function() { du.src = "data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="; }, 1); return false; }()), use_data_uri_over32kb: function() { // IE8 return caps.use_data_uri && (Env.browser !== 'IE' || Env.version >= 9); }, use_data_uri_of: function(bytes) { return (caps.use_data_uri && bytes < 33000 || caps.use_data_uri_over32kb()); }, use_fileinput: function() { var el = document.createElement('input'); el.setAttribute('type', 'file'); return !el.disabled; } }; return function(cap) { var args = [].slice.call(arguments); args.shift(); // shift of cap return Basic.typeOf(caps[cap]) === 'function' ? caps[cap].apply(this, args) : !!caps[cap]; }; }()); var Env = { can: can, browser: UAParser.browser.name, version: parseFloat(UAParser.browser.major), os: UAParser.os.name, // everybody intuitively types it in a lowercase for some reason osVersion: UAParser.os.version, verComp: version_compare, swf_url: "../flash/Moxie.swf", xap_url: "../silverlight/Moxie.xap", global_event_dispatcher: "moxie.core.EventTarget.instance.dispatchEvent" }; // for backward compatibility // @deprecated Use `Env.os` instead Env.OS = Env.os; return Env; }); // Included from: src/javascript/core/utils/Dom.js /** * Dom.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/utils/Dom', ['moxie/core/utils/Env'], function(Env) { /** Get DOM Element by it's id. @method get @for Utils @param {String} id Identifier of the DOM Element @return {DOMElement} */ var get = function(id) { if (typeof id !== 'string') { return id; } return document.getElementById(id); }; /** Checks if specified DOM element has specified class. @method hasClass @static @param {Object} obj DOM element like object to add handler to. @param {String} name Class name */ var hasClass = function(obj, name) { if (!obj.className) { return false; } var regExp = new RegExp("(^|\\s+)"+name+"(\\s+|$)"); return regExp.test(obj.className); }; /** Adds specified className to specified DOM element. @method addClass @static @param {Object} obj DOM element like object to add handler to. @param {String} name Class name */ var addClass = function(obj, name) { if (!hasClass(obj, name)) { obj.className = !obj.className ? name : obj.className.replace(/\s+$/, '') + ' ' + name; } }; /** Removes specified className from specified DOM element. @method removeClass @static @param {Object} obj DOM element like object to add handler to. @param {String} name Class name */ var removeClass = function(obj, name) { if (obj.className) { var regExp = new RegExp("(^|\\s+)"+name+"(\\s+|$)"); obj.className = obj.className.replace(regExp, function($0, $1, $2) { return $1 === ' ' && $2 === ' ' ? ' ' : ''; }); } }; /** Returns a given computed style of a DOM element. @method getStyle @static @param {Object} obj DOM element like object. @param {String} name Style you want to get from the DOM element */ var getStyle = function(obj, name) { if (obj.currentStyle) { return obj.currentStyle[name]; } else if (window.getComputedStyle) { return window.getComputedStyle(obj, null)[name]; } }; /** Returns the absolute x, y position of an Element. The position will be returned in a object with x, y fields. @method getPos @static @param {Element} node HTML element or element id to get x, y position from. @param {Element} root Optional root element to stop calculations at. @return {object} Absolute position of the specified element object with x, y fields. */ var getPos = function(node, root) { var x = 0, y = 0, parent, doc = document, nodeRect, rootRect; node = node; root = root || doc.body; // Returns the x, y cordinate for an element on IE 6 and IE 7 function getIEPos(node) { var bodyElm, rect, x = 0, y = 0; if (node) { rect = node.getBoundingClientRect(); bodyElm = doc.compatMode === "CSS1Compat" ? doc.documentElement : doc.body; x = rect.left + bodyElm.scrollLeft; y = rect.top + bodyElm.scrollTop; } return { x : x, y : y }; } // Use getBoundingClientRect on IE 6 and IE 7 but not on IE 8 in standards mode if (node && node.getBoundingClientRect && Env.browser === 'IE' && (!doc.documentMode || doc.documentMode < 8)) { nodeRect = getIEPos(node); rootRect = getIEPos(root); return { x : nodeRect.x - rootRect.x, y : nodeRect.y - rootRect.y }; } parent = node; while (parent && parent != root && parent.nodeType) { x += parent.offsetLeft || 0; y += parent.offsetTop || 0; parent = parent.offsetParent; } parent = node.parentNode; while (parent && parent != root && parent.nodeType) { x -= parent.scrollLeft || 0; y -= parent.scrollTop || 0; parent = parent.parentNode; } return { x : x, y : y }; }; /** Returns the size of the specified node in pixels. @method getSize @static @param {Node} node Node to get the size of. @return {Object} Object with a w and h property. */ var getSize = function(node) { return { w : node.offsetWidth || node.clientWidth, h : node.offsetHeight || node.clientHeight }; }; return { get: get, hasClass: hasClass, addClass: addClass, removeClass: removeClass, getStyle: getStyle, getPos: getPos, getSize: getSize }; }); // Included from: src/javascript/core/Exceptions.js /** * Exceptions.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/Exceptions', [ 'moxie/core/utils/Basic' ], function(Basic) { function _findKey(obj, value) { var key; for (key in obj) { if (obj[key] === value) { return key; } } return null; } return { RuntimeError: (function() { var namecodes = { NOT_INIT_ERR: 1, NOT_SUPPORTED_ERR: 9, JS_ERR: 4 }; function RuntimeError(code) { this.code = code; this.name = _findKey(namecodes, code); this.message = this.name + ": RuntimeError " + this.code; } Basic.extend(RuntimeError, namecodes); RuntimeError.prototype = Error.prototype; return RuntimeError; }()), OperationNotAllowedException: (function() { function OperationNotAllowedException(code) { this.code = code; this.name = 'OperationNotAllowedException'; } Basic.extend(OperationNotAllowedException, { NOT_ALLOWED_ERR: 1 }); OperationNotAllowedException.prototype = Error.prototype; return OperationNotAllowedException; }()), ImageError: (function() { var namecodes = { WRONG_FORMAT: 1, MAX_RESOLUTION_ERR: 2 }; function ImageError(code) { this.code = code; this.name = _findKey(namecodes, code); this.message = this.name + ": ImageError " + this.code; } Basic.extend(ImageError, namecodes); ImageError.prototype = Error.prototype; return ImageError; }()), FileException: (function() { var namecodes = { NOT_FOUND_ERR: 1, SECURITY_ERR: 2, ABORT_ERR: 3, NOT_READABLE_ERR: 4, ENCODING_ERR: 5, NO_MODIFICATION_ALLOWED_ERR: 6, INVALID_STATE_ERR: 7, SYNTAX_ERR: 8 }; function FileException(code) { this.code = code; this.name = _findKey(namecodes, code); this.message = this.name + ": FileException " + this.code; } Basic.extend(FileException, namecodes); FileException.prototype = Error.prototype; return FileException; }()), DOMException: (function() { var namecodes = { INDEX_SIZE_ERR: 1, DOMSTRING_SIZE_ERR: 2, HIERARCHY_REQUEST_ERR: 3, WRONG_DOCUMENT_ERR: 4, INVALID_CHARACTER_ERR: 5, NO_DATA_ALLOWED_ERR: 6, NO_MODIFICATION_ALLOWED_ERR: 7, NOT_FOUND_ERR: 8, NOT_SUPPORTED_ERR: 9, INUSE_ATTRIBUTE_ERR: 10, INVALID_STATE_ERR: 11, SYNTAX_ERR: 12, INVALID_MODIFICATION_ERR: 13, NAMESPACE_ERR: 14, INVALID_ACCESS_ERR: 15, VALIDATION_ERR: 16, TYPE_MISMATCH_ERR: 17, SECURITY_ERR: 18, NETWORK_ERR: 19, ABORT_ERR: 20, URL_MISMATCH_ERR: 21, QUOTA_EXCEEDED_ERR: 22, TIMEOUT_ERR: 23, INVALID_NODE_TYPE_ERR: 24, DATA_CLONE_ERR: 25 }; function DOMException(code) { this.code = code; this.name = _findKey(namecodes, code); this.message = this.name + ": DOMException " + this.code; } Basic.extend(DOMException, namecodes); DOMException.prototype = Error.prototype; return DOMException; }()), EventException: (function() { function EventException(code) { this.code = code; this.name = 'EventException'; } Basic.extend(EventException, { UNSPECIFIED_EVENT_TYPE_ERR: 0 }); EventException.prototype = Error.prototype; return EventException; }()) }; }); // Included from: src/javascript/core/EventTarget.js /** * EventTarget.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/EventTarget', [ 'moxie/core/Exceptions', 'moxie/core/utils/Basic' ], function(x, Basic) { /** Parent object for all event dispatching components and objects @class EventTarget @constructor EventTarget */ function EventTarget() { // hash of event listeners by object uid var eventpool = {}; Basic.extend(this, { /** Unique id of the event dispatcher, usually overriden by children @property uid @type String */ uid: null, /** Can be called from within a child in order to acquire uniqie id in automated manner @method init */ init: function() { if (!this.uid) { this.uid = Basic.guid('uid_'); } }, /** Register a handler to a specific event dispatched by the object @method addEventListener @param {String} type Type or basically a name of the event to subscribe to @param {Function} fn Callback function that will be called when event happens @param {Number} [priority=0] Priority of the event handler - handlers with higher priorities will be called first @param {Object} [scope=this] A scope to invoke event handler in */ addEventListener: function(type, fn, priority, scope) { var self = this, list; type = Basic.trim(type); if (/\s/.test(type)) { // multiple event types were passed for one handler Basic.each(type.split(/\s+/), function(type) { self.addEventListener(type, fn, priority, scope); }); return; } type = type.toLowerCase(); priority = parseInt(priority, 10) || 0; list = eventpool[this.uid] && eventpool[this.uid][type] || []; list.push({fn : fn, priority : priority, scope : scope || this}); if (!eventpool[this.uid]) { eventpool[this.uid] = {}; } eventpool[this.uid][type] = list; }, /** Check if any handlers were registered to the specified event @method hasEventListener @param {String} type Type or basically a name of the event to check @return {Mixed} Returns a handler if it was found and false, if - not */ hasEventListener: function(type) { return type ? !!(eventpool[this.uid] && eventpool[this.uid][type]) : !!eventpool[this.uid]; }, /** Unregister the handler from the event, or if former was not specified - unregister all handlers @method removeEventListener @param {String} type Type or basically a name of the event @param {Function} [fn] Handler to unregister */ removeEventListener: function(type, fn) { type = type.toLowerCase(); var list = eventpool[this.uid] && eventpool[this.uid][type], i; if (list) { if (fn) { for (i = list.length - 1; i >= 0; i--) { if (list[i].fn === fn) { list.splice(i, 1); break; } } } else { list = []; } // delete event list if it has become empty if (!list.length) { delete eventpool[this.uid][type]; // and object specific entry in a hash if it has no more listeners attached if (Basic.isEmptyObj(eventpool[this.uid])) { delete eventpool[this.uid]; } } } }, /** Remove all event handlers from the object @method removeAllEventListeners */ removeAllEventListeners: function() { if (eventpool[this.uid]) { delete eventpool[this.uid]; } }, /** Dispatch the event @method dispatchEvent @param {String/Object} Type of event or event object to dispatch @param {Mixed} [...] Variable number of arguments to be passed to a handlers @return {Boolean} true by default and false if any handler returned false */ dispatchEvent: function(type) { var uid, list, args, tmpEvt, evt = {}, result = true, undef; if (Basic.typeOf(type) !== 'string') { // we can't use original object directly (because of Silverlight) tmpEvt = type; if (Basic.typeOf(tmpEvt.type) === 'string') { type = tmpEvt.type; if (tmpEvt.total !== undef && tmpEvt.loaded !== undef) { // progress event evt.total = tmpEvt.total; evt.loaded = tmpEvt.loaded; } evt.async = tmpEvt.async || false; } else { throw new x.EventException(x.EventException.UNSPECIFIED_EVENT_TYPE_ERR); } } // check if event is meant to be dispatched on an object having specific uid if (type.indexOf('::') !== -1) { (function(arr) { uid = arr[0]; type = arr[1]; }(type.split('::'))); } else { uid = this.uid; } type = type.toLowerCase(); list = eventpool[uid] && eventpool[uid][type]; if (list) { // sort event list by prority list.sort(function(a, b) { return b.priority - a.priority; }); args = [].slice.call(arguments); // first argument will be pseudo-event object args.shift(); evt.type = type; args.unshift(evt); // Dispatch event to all listeners var queue = []; Basic.each(list, function(handler) { // explicitly set the target, otherwise events fired from shims do not get it args[0].target = handler.scope; // if event is marked as async, detach the handler if (evt.async) { queue.push(function(cb) { setTimeout(function() { cb(handler.fn.apply(handler.scope, args) === false); }, 1); }); } else { queue.push(function(cb) { cb(handler.fn.apply(handler.scope, args) === false); // if handler returns false stop propagation }); } }); if (queue.length) { Basic.inSeries(queue, function(err) { result = !err; }); } } return result; }, /** Alias for addEventListener @method bind @protected */ bind: function() { this.addEventListener.apply(this, arguments); }, /** Alias for removeEventListener @method unbind @protected */ unbind: function() { this.removeEventListener.apply(this, arguments); }, /** Alias for removeAllEventListeners @method unbindAll @protected */ unbindAll: function() { this.removeAllEventListeners.apply(this, arguments); }, /** Alias for dispatchEvent @method trigger @protected */ trigger: function() { return this.dispatchEvent.apply(this, arguments); }, /** Converts properties of on[event] type to corresponding event handlers, is used to avoid extra hassle around the process of calling them back @method convertEventPropsToHandlers @private */ convertEventPropsToHandlers: function(handlers) { var h; if (Basic.typeOf(handlers) !== 'array') { handlers = [handlers]; } for (var i = 0; i < handlers.length; i++) { h = 'on' + handlers[i]; if (Basic.typeOf(this[h]) === 'function') { this.addEventListener(handlers[i], this[h]); } else if (Basic.typeOf(this[h]) === 'undefined') { this[h] = null; // object must have defined event properties, even if it doesn't make use of them } } } }); } EventTarget.instance = new EventTarget(); return EventTarget; }); // Included from: src/javascript/core/utils/Encode.js /** * Encode.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/utils/Encode', [], function() { /** Encode string with UTF-8 @method utf8_encode @for Utils @static @param {String} str String to encode @return {String} UTF-8 encoded string */ var utf8_encode = function(str) { return unescape(encodeURIComponent(str)); }; /** Decode UTF-8 encoded string @method utf8_decode @static @param {String} str String to decode @return {String} Decoded string */ var utf8_decode = function(str_data) { return decodeURIComponent(escape(str_data)); }; /** Decode Base64 encoded string (uses browser's default method if available), from: https://raw.github.com/kvz/phpjs/master/functions/url/base64_decode.js @method atob @static @param {String} data String to decode @return {String} Decoded string */ var atob = function(data, utf8) { if (typeof(window.atob) === 'function') { return utf8 ? utf8_decode(window.atob(data)) : window.atob(data); } // http://kevin.vanzonneveld.net // + original by: Tyler Akins (http://rumkin.com) // + improved by: Thunder.m // + input by: Aman Gupta // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Onno Marsman // + bugfixed by: Pellentesque Malesuada // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + input by: Brett Zamir (http://brett-zamir.me) // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // * example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA=='); // * returns 1: 'Kevin van Zonneveld' // mozilla has this native // - but breaks in 2.0.0.12! //if (typeof this.window.atob == 'function') { // return atob(data); //} var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, dec = "", tmp_arr = []; if (!data) { return data; } data += ''; do { // unpack four hexets into three octets using index points in b64 h1 = b64.indexOf(data.charAt(i++)); h2 = b64.indexOf(data.charAt(i++)); h3 = b64.indexOf(data.charAt(i++)); h4 = b64.indexOf(data.charAt(i++)); bits = h1 << 18 | h2 << 12 | h3 << 6 | h4; o1 = bits >> 16 & 0xff; o2 = bits >> 8 & 0xff; o3 = bits & 0xff; if (h3 == 64) { tmp_arr[ac++] = String.fromCharCode(o1); } else if (h4 == 64) { tmp_arr[ac++] = String.fromCharCode(o1, o2); } else { tmp_arr[ac++] = String.fromCharCode(o1, o2, o3); } } while (i < data.length); dec = tmp_arr.join(''); return utf8 ? utf8_decode(dec) : dec; }; /** Base64 encode string (uses browser's default method if available), from: https://raw.github.com/kvz/phpjs/master/functions/url/base64_encode.js @method btoa @static @param {String} data String to encode @return {String} Base64 encoded string */ var btoa = function(data, utf8) { if (utf8) { utf8_encode(data); } if (typeof(window.btoa) === 'function') { return window.btoa(data); } // http://kevin.vanzonneveld.net // + original by: Tyler Akins (http://rumkin.com) // + improved by: Bayron Guevara // + improved by: Thunder.m // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Pellentesque Malesuada // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: Rafał Kukawski (http://kukawski.pl) // * example 1: base64_encode('Kevin van Zonneveld'); // * returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA==' // mozilla has this native // - but breaks in 2.0.0.12! var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, enc = "", tmp_arr = []; if (!data) { return data; } do { // pack three octets into four hexets o1 = data.charCodeAt(i++); o2 = data.charCodeAt(i++); o3 = data.charCodeAt(i++); bits = o1 << 16 | o2 << 8 | o3; h1 = bits >> 18 & 0x3f; h2 = bits >> 12 & 0x3f; h3 = bits >> 6 & 0x3f; h4 = bits & 0x3f; // use hexets to index into b64, and append result to encoded string tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); } while (i < data.length); enc = tmp_arr.join(''); var r = data.length % 3; return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3); }; return { utf8_encode: utf8_encode, utf8_decode: utf8_decode, atob: atob, btoa: btoa }; }); // Included from: src/javascript/runtime/Runtime.js /** * Runtime.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/runtime/Runtime', [ "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/EventTarget" ], function(Basic, Dom, EventTarget) { var runtimeConstructors = {}, runtimes = {}; /** Common set of methods and properties for every runtime instance @class Runtime @param {Object} options @param {String} type Sanitized name of the runtime @param {Object} [caps] Set of capabilities that differentiate specified runtime @param {Object} [modeCaps] Set of capabilities that do require specific operational mode @param {String} [preferredMode='browser'] Preferred operational mode to choose if no required capabilities were requested */ function Runtime(options, type, caps, modeCaps, preferredMode) { /** Dispatched when runtime is initialized and ready. Results in RuntimeInit on a connected component. @event Init */ /** Dispatched when runtime fails to initialize. Results in RuntimeError on a connected component. @event Error */ var self = this , _shim , _uid = Basic.guid(type + '_') , defaultMode = preferredMode || 'browser' ; options = options || {}; // register runtime in private hash runtimes[_uid] = this; /** Default set of capabilities, which can be redifined later by specific runtime @private @property caps @type Object */ caps = Basic.extend({ // Runtime can: // provide access to raw binary data of the file access_binary: false, // provide access to raw binary data of the image (image extension is optional) access_image_binary: false, // display binary data as thumbs for example display_media: false, // make cross-domain requests do_cors: false, // accept files dragged and dropped from the desktop drag_and_drop: false, // filter files in selection dialog by their extensions filter_by_extension: true, // resize image (and manipulate it raw data of any file in general) resize_image: false, // periodically report how many bytes of total in the file were uploaded (loaded) report_upload_progress: false, // provide access to the headers of http response return_response_headers: false, // support response of specific type, which should be passed as an argument // e.g. runtime.can('return_response_type', 'blob') return_response_type: false, // return http status code of the response return_status_code: true, // send custom http header with the request send_custom_headers: false, // pick up the files from a dialog select_file: false, // select whole folder in file browse dialog select_folder: false, // select multiple files at once in file browse dialog select_multiple: true, // send raw binary data, that is generated after image resizing or manipulation of other kind send_binary_string: false, // send cookies with http request and therefore retain session send_browser_cookies: true, // send data formatted as multipart/form-data send_multipart: true, // slice the file or blob to smaller parts slice_blob: false, // upload file without preloading it to memory, stream it out directly from disk stream_upload: false, // programmatically trigger file browse dialog summon_file_dialog: false, // upload file of specific size, size should be passed as argument // e.g. runtime.can('upload_filesize', '500mb') upload_filesize: true, // initiate http request with specific http method, method should be passed as argument // e.g. runtime.can('use_http_method', 'put') use_http_method: true }, caps); // default to the mode that is compatible with preferred caps if (options.preferred_caps) { defaultMode = Runtime.getMode(modeCaps, options.preferred_caps, defaultMode); } // small extension factory here (is meant to be extended with actual extensions constructors) _shim = (function() { var objpool = {}; return { exec: function(uid, comp, fn, args) { if (_shim[comp]) { if (!objpool[uid]) { objpool[uid] = { context: this, instance: new _shim[comp]() }; } if (objpool[uid].instance[fn]) { return objpool[uid].instance[fn].apply(this, args); } } }, removeInstance: function(uid) { delete objpool[uid]; }, removeAllInstances: function() { var self = this; Basic.each(objpool, function(obj, uid) { if (Basic.typeOf(obj.instance.destroy) === 'function') { obj.instance.destroy.call(obj.context); } self.removeInstance(uid); }); } }; }()); // public methods Basic.extend(this, { /** Specifies whether runtime instance was initialized or not @property initialized @type {Boolean} @default false */ initialized: false, // shims require this flag to stop initialization retries /** Unique ID of the runtime @property uid @type {String} */ uid: _uid, /** Runtime type (e.g. flash, html5, etc) @property type @type {String} */ type: type, /** Runtime (not native one) may operate in browser or client mode. @property mode @private @type {String|Boolean} current mode or false, if none possible */ mode: Runtime.getMode(modeCaps, (options.required_caps), defaultMode), /** id of the DOM container for the runtime (if available) @property shimid @type {String} */ shimid: _uid + '_container', /** Number of connected clients. If equal to zero, runtime can be destroyed @property clients @type {Number} */ clients: 0, /** Runtime initialization options @property options @type {Object} */ options: options, /** Checks if the runtime has specific capability @method can @param {String} cap Name of capability to check @param {Mixed} [value] If passed, capability should somehow correlate to the value @param {Object} [refCaps] Set of capabilities to check the specified cap against (defaults to internal set) @return {Boolean} true if runtime has such capability and false, if - not */ can: function(cap, value) { var refCaps = arguments[2] || caps; // if cap var is a comma-separated list of caps, convert it to object (key/value) if (Basic.typeOf(cap) === 'string' && Basic.typeOf(value) === 'undefined') { cap = Runtime.parseCaps(cap); } if (Basic.typeOf(cap) === 'object') { for (var key in cap) { if (!this.can(key, cap[key], refCaps)) { return false; } } return true; } // check the individual cap if (Basic.typeOf(refCaps[cap]) === 'function') { return refCaps[cap].call(this, value); } else { return (value === refCaps[cap]); } }, /** Returns container for the runtime as DOM element @method getShimContainer @return {DOMElement} */ getShimContainer: function() { var container, shimContainer = Dom.get(this.shimid); // if no container for shim, create one if (!shimContainer) { container = this.options.container ? Dom.get(this.options.container) : document.body; // create shim container and insert it at an absolute position into the outer container shimContainer = document.createElement('div'); shimContainer.id = this.shimid; shimContainer.className = 'moxie-shim moxie-shim-' + this.type; Basic.extend(shimContainer.style, { position: 'absolute', top: '0px', left: '0px', width: '1px', height: '1px', overflow: 'hidden' }); container.appendChild(shimContainer); container = null; } return shimContainer; }, /** Returns runtime as DOM element (if appropriate) @method getShim @return {DOMElement} */ getShim: function() { return _shim; }, /** Invokes a method within the runtime itself (might differ across the runtimes) @method shimExec @param {Mixed} [] @protected @return {Mixed} Depends on the action and component */ shimExec: function(component, action) { var args = [].slice.call(arguments, 2); return self.getShim().exec.call(this, this.uid, component, action, args); }, /** Operaional interface that is used by components to invoke specific actions on the runtime (is invoked in the scope of component) @method exec @param {Mixed} []* @protected @return {Mixed} Depends on the action and component */ exec: function(component, action) { // this is called in the context of component, not runtime var args = [].slice.call(arguments, 2); if (self[component] && self[component][action]) { return self[component][action].apply(this, args); } return self.shimExec.apply(this, arguments); }, /** Destroys the runtime (removes all events and deletes DOM structures) @method destroy */ destroy: function() { if (!self) { return; // obviously already destroyed } var shimContainer = Dom.get(this.shimid); if (shimContainer) { shimContainer.parentNode.removeChild(shimContainer); } if (_shim) { _shim.removeAllInstances(); } this.unbindAll(); delete runtimes[this.uid]; this.uid = null; // mark this runtime as destroyed _uid = self = _shim = shimContainer = null; } }); // once we got the mode, test against all caps if (this.mode && options.required_caps && !this.can(options.required_caps)) { this.mode = false; } } /** Default order to try different runtime types @property order @type String @static */ Runtime.order = 'html5,flash,silverlight,html4'; /** Retrieves runtime from private hash by it's uid @method getRuntime @private @static @param {String} uid Unique identifier of the runtime @return {Runtime|Boolean} Returns runtime, if it exists and false, if - not */ Runtime.getRuntime = function(uid) { return runtimes[uid] ? runtimes[uid] : false; }; /** Register constructor for the Runtime of new (or perhaps modified) type @method addConstructor @static @param {String} type Runtime type (e.g. flash, html5, etc) @param {Function} construct Constructor for the Runtime type */ Runtime.addConstructor = function(type, constructor) { constructor.prototype = EventTarget.instance; runtimeConstructors[type] = constructor; }; /** Get the constructor for the specified type. method getConstructor @static @param {String} type Runtime type (e.g. flash, html5, etc) @return {Function} Constructor for the Runtime type */ Runtime.getConstructor = function(type) { return runtimeConstructors[type] || null; }; /** Get info about the runtime (uid, type, capabilities) @method getInfo @static @param {String} uid Unique identifier of the runtime @return {Mixed} Info object or null if runtime doesn't exist */ Runtime.getInfo = function(uid) { var runtime = Runtime.getRuntime(uid); if (runtime) { return { uid: runtime.uid, type: runtime.type, mode: runtime.mode, can: function() { return runtime.can.apply(runtime, arguments); } }; } return null; }; /** Convert caps represented by a comma-separated string to the object representation. @method parseCaps @static @param {String} capStr Comma-separated list of capabilities @return {Object} */ Runtime.parseCaps = function(capStr) { var capObj = {}; if (Basic.typeOf(capStr) !== 'string') { return capStr || {}; } Basic.each(capStr.split(','), function(key) { capObj[key] = true; // we assume it to be - true }); return capObj; }; /** Test the specified runtime for specific capabilities. @method can @static @param {String} type Runtime type (e.g. flash, html5, etc) @param {String|Object} caps Set of capabilities to check @return {Boolean} Result of the test */ Runtime.can = function(type, caps) { var runtime , constructor = Runtime.getConstructor(type) , mode ; if (constructor) { runtime = new constructor({ required_caps: caps }); mode = runtime.mode; runtime.destroy(); return !!mode; } return false; }; /** Figure out a runtime that supports specified capabilities. @method thatCan @static @param {String|Object} caps Set of capabilities to check @param {String} [runtimeOrder] Comma-separated list of runtimes to check against @return {String} Usable runtime identifier or null */ Runtime.thatCan = function(caps, runtimeOrder) { var types = (runtimeOrder || Runtime.order).split(/\s*,\s*/); for (var i in types) { if (Runtime.can(types[i], caps)) { return types[i]; } } return null; }; /** Figure out an operational mode for the specified set of capabilities. @method getMode @static @param {Object} modeCaps Set of capabilities that depend on particular runtime mode @param {Object} [requiredCaps] Supplied set of capabilities to find operational mode for @param {String|Boolean} [defaultMode='browser'] Default mode to use @return {String|Boolean} Compatible operational mode */ Runtime.getMode = function(modeCaps, requiredCaps, defaultMode) { var mode = null; if (Basic.typeOf(defaultMode) === 'undefined') { // only if not specified defaultMode = 'browser'; } if (requiredCaps && !Basic.isEmptyObj(modeCaps)) { // loop over required caps and check if they do require the same mode Basic.each(requiredCaps, function(value, cap) { if (modeCaps.hasOwnProperty(cap)) { var capMode = modeCaps[cap](value); // make sure we always have an array if (typeof(capMode) === 'string') { capMode = [capMode]; } if (!mode) { mode = capMode; } else if (!(mode = Basic.arrayIntersect(mode, capMode))) { // if cap requires conflicting mode - runtime cannot fulfill required caps return (mode = false); } } }); if (mode) { return Basic.inArray(defaultMode, mode) !== -1 ? defaultMode : mode[0]; } else if (mode === false) { return false; } } return defaultMode; }; /** Capability check that always returns true @private @static @return {True} */ Runtime.capTrue = function() { return true; }; /** Capability check that always returns false @private @static @return {False} */ Runtime.capFalse = function() { return false; }; /** Evaluate the expression to boolean value and create a function that always returns it. @private @static @param {Mixed} expr Expression to evaluate @return {Function} Function returning the result of evaluation */ Runtime.capTest = function(expr) { return function() { return !!expr; }; }; return Runtime; }); // Included from: src/javascript/runtime/RuntimeClient.js /** * RuntimeClient.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/runtime/RuntimeClient', [ 'moxie/core/Exceptions', 'moxie/core/utils/Basic', 'moxie/runtime/Runtime' ], function(x, Basic, Runtime) { /** Set of methods and properties, required by a component to acquire ability to connect to a runtime @class RuntimeClient */ return function RuntimeClient() { var runtime; Basic.extend(this, { /** Connects to the runtime specified by the options. Will either connect to existing runtime or create a new one. Increments number of clients connected to the specified runtime. @method connectRuntime @param {Mixed} options Can be a runtme uid or a set of key-value pairs defining requirements and pre-requisites */ connectRuntime: function(options) { var comp = this, ruid; function initialize(items) { var type, constructor; // if we ran out of runtimes if (!items.length) { comp.trigger('RuntimeError', new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR)); runtime = null; return; } type = items.shift(); constructor = Runtime.getConstructor(type); if (!constructor) { initialize(items); return; } // try initializing the runtime runtime = new constructor(options); runtime.bind('Init', function() { // mark runtime as initialized runtime.initialized = true; // jailbreak ... setTimeout(function() { runtime.clients++; // this will be triggered on component comp.trigger('RuntimeInit', runtime); }, 1); }); runtime.bind('Error', function() { runtime.destroy(); // runtime cannot destroy itself from inside at a right moment, thus we do it here initialize(items); }); /*runtime.bind('Exception', function() { });*/ // check if runtime managed to pick-up operational mode if (!runtime.mode) { runtime.trigger('Error'); return; } runtime.init(); } // check if a particular runtime was requested if (Basic.typeOf(options) === 'string') { ruid = options; } else if (Basic.typeOf(options.ruid) === 'string') { ruid = options.ruid; } if (ruid) { runtime = Runtime.getRuntime(ruid); if (runtime) { runtime.clients++; return runtime; } else { // there should be a runtime and there's none - weird case throw new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR); } } // initialize a fresh one, that fits runtime list and required features best initialize((options.runtime_order || Runtime.order).split(/\s*,\s*/)); }, /** Returns the runtime to which the client is currently connected. @method getRuntime @return {Runtime} Runtime or null if client is not connected */ getRuntime: function() { if (runtime && runtime.uid) { return runtime; } runtime = null; // make sure we do not leave zombies rambling around return null; }, /** Disconnects from the runtime. Decrements number of clients connected to the specified runtime. @method disconnectRuntime */ disconnectRuntime: function() { if (runtime && --runtime.clients <= 0) { runtime.destroy(); runtime = null; } } }); }; }); // Included from: src/javascript/file/Blob.js /** * Blob.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/file/Blob', [ 'moxie/core/utils/Basic', 'moxie/core/utils/Encode', 'moxie/runtime/RuntimeClient' ], function(Basic, Encode, RuntimeClient) { var blobpool = {}; /** @class Blob @constructor @param {String} ruid Unique id of the runtime, to which this blob belongs to @param {Object} blob Object "Native" blob object, as it is represented in the runtime */ function Blob(ruid, blob) { function _sliceDetached(start, end, type) { var blob, data = blobpool[this.uid]; if (Basic.typeOf(data) !== 'string' || !data.length) { return null; // or throw exception } blob = new Blob(null, { type: type, size: end - start }); blob.detach(data.substr(start, blob.size)); return blob; } RuntimeClient.call(this); if (ruid) { this.connectRuntime(ruid); } if (!blob) { blob = {}; } else if (Basic.typeOf(blob) === 'string') { // dataUrl or binary string blob = { data: blob }; } Basic.extend(this, { /** Unique id of the component @property uid @type {String} */ uid: blob.uid || Basic.guid('uid_'), /** Unique id of the connected runtime, if falsy, then runtime will have to be initialized before this Blob can be used, modified or sent @property ruid @type {String} */ ruid: ruid, /** Size of blob @property size @type {Number} @default 0 */ size: blob.size || 0, /** Mime type of blob @property type @type {String} @default '' */ type: blob.type || '', /** @method slice @param {Number} [start=0] */ slice: function(start, end, type) { if (this.isDetached()) { return _sliceDetached.apply(this, arguments); } return this.getRuntime().exec.call(this, 'Blob', 'slice', this.getSource(), start, end, type); }, /** Returns "native" blob object (as it is represented in connected runtime) or null if not found @method getSource @return {Blob} Returns "native" blob object or null if not found */ getSource: function() { if (!blobpool[this.uid]) { return null; } return blobpool[this.uid]; }, /** Detaches blob from any runtime that it depends on and initialize with standalone value @method detach @protected @param {DOMString} [data=''] Standalone value */ detach: function(data) { if (this.ruid) { this.getRuntime().exec.call(this, 'Blob', 'destroy'); this.disconnectRuntime(); this.ruid = null; } data = data || ''; // if dataUrl, convert to binary string var matches = data.match(/^data:([^;]*);base64,/); if (matches) { this.type = matches[1]; data = Encode.atob(data.substring(data.indexOf('base64,') + 7)); } this.size = data.length; blobpool[this.uid] = data; }, /** Checks if blob is standalone (detached of any runtime) @method isDetached @protected @return {Boolean} */ isDetached: function() { return !this.ruid && Basic.typeOf(blobpool[this.uid]) === 'string'; }, /** Destroy Blob and free any resources it was using @method destroy */ destroy: function() { this.detach(); delete blobpool[this.uid]; } }); if (blob.data) { this.detach(blob.data); // auto-detach if payload has been passed } else { blobpool[this.uid] = blob; } } return Blob; }); // Included from: src/javascript/file/File.js /** * File.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/file/File', [ 'moxie/core/utils/Basic', 'moxie/core/utils/Mime', 'moxie/file/Blob' ], function(Basic, Mime, Blob) { /** @class File @extends Blob @constructor @param {String} ruid Unique id of the runtime, to which this blob belongs to @param {Object} file Object "Native" file object, as it is represented in the runtime */ function File(ruid, file) { var name, type; if (!file) { // avoid extra errors in case we overlooked something file = {}; } // figure out the type if (file.type && file.type !== '') { type = file.type; } else { type = Mime.getFileMime(file.name); } // sanitize file name or generate new one if (file.name) { name = file.name.replace(/\\/g, '/'); name = name.substr(name.lastIndexOf('/') + 1); } else { var prefix = type.split('/')[0]; name = Basic.guid((prefix !== '' ? prefix : 'file') + '_'); if (Mime.extensions[type]) { name += '.' + Mime.extensions[type][0]; // append proper extension if possible } } Blob.apply(this, arguments); Basic.extend(this, { /** File mime type @property type @type {String} @default '' */ type: type || '', /** File name @property name @type {String} @default UID */ name: name || Basic.guid('file_'), /** Relative path to the file inside a directory @property relativePath @type {String} @default '' */ relativePath: '', /** Date of last modification @property lastModifiedDate @type {String} @default now */ lastModifiedDate: file.lastModifiedDate || (new Date()).toLocaleString() // Thu Aug 23 2012 19:40:00 GMT+0400 (GET) }); } File.prototype = Blob.prototype; return File; }); // Included from: src/javascript/file/FileInput.js /** * FileInput.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/file/FileInput', [ 'moxie/core/utils/Basic', 'moxie/core/utils/Mime', 'moxie/core/utils/Dom', 'moxie/core/Exceptions', 'moxie/core/EventTarget', 'moxie/core/I18n', 'moxie/file/File', 'moxie/runtime/Runtime', 'moxie/runtime/RuntimeClient' ], function(Basic, Mime, Dom, x, EventTarget, I18n, File, Runtime, RuntimeClient) { /** Provides a convenient way to create cross-browser file-picker. Generates file selection dialog on click, converts selected files to _File_ objects, to be used in conjunction with _Image_, preloaded in memory with _FileReader_ or uploaded to a server through _XMLHttpRequest_. @class FileInput @constructor @extends EventTarget @uses RuntimeClient @param {Object|String|DOMElement} options If options is string or node, argument is considered as _browse\_button_. @param {String|DOMElement} options.browse_button DOM Element to turn into file picker. @param {Array} [options.accept] Array of mime types to accept. By default accepts all. @param {String} [options.file='file'] Name of the file field (not the filename). @param {Boolean} [options.multiple=false] Enable selection of multiple files. @param {Boolean} [options.directory=false] Turn file input into the folder input (cannot be both at the same time). @param {String|DOMElement} [options.container] DOM Element to use as a container for file-picker. Defaults to parentNode for _browse\_button_. @param {Object|String} [options.required_caps] Set of required capabilities, that chosen runtime must support. @example <div id="container"> <a id="file-picker" href="javascript:;">Browse...</a> </div> <script> var fileInput = new mOxie.FileInput({ browse_button: 'file-picker', // or document.getElementById('file-picker') container: 'container', accept: [ {title: "Image files", extensions: "jpg,gif,png"} // accept only images ], multiple: true // allow multiple file selection }); fileInput.onchange = function(e) { // do something to files array console.info(e.target.files); // or this.files or fileInput.files }; fileInput.init(); // initialize </script> */ var dispatches = [ /** Dispatched when runtime is connected and file-picker is ready to be used. @event ready @param {Object} event */ 'ready', /** Dispatched right after [ready](#event_ready) event, and whenever [refresh()](#method_refresh) is invoked. Check [corresponding documentation entry](#method_refresh) for more info. @event refresh @param {Object} event */ /** Dispatched when selection of files in the dialog is complete. @event change @param {Object} event */ 'change', 'cancel', // TODO: might be useful /** Dispatched when mouse cursor enters file-picker area. Can be used to style element accordingly. @event mouseenter @param {Object} event */ 'mouseenter', /** Dispatched when mouse cursor leaves file-picker area. Can be used to style element accordingly. @event mouseleave @param {Object} event */ 'mouseleave', /** Dispatched when functional mouse button is pressed on top of file-picker area. @event mousedown @param {Object} event */ 'mousedown', /** Dispatched when functional mouse button is released on top of file-picker area. @event mouseup @param {Object} event */ 'mouseup' ]; function FileInput(options) { var self = this, container, browseButton, defaults; // if flat argument passed it should be browse_button id if (Basic.inArray(Basic.typeOf(options), ['string', 'node']) !== -1) { options = { browse_button : options }; } // this will help us to find proper default container browseButton = Dom.get(options.browse_button); if (!browseButton) { // browse button is required throw new x.DOMException(x.DOMException.NOT_FOUND_ERR); } // figure out the options defaults = { accept: [{ title: I18n.translate('All Files'), extensions: '*' }], name: 'file', multiple: false, required_caps: false, container: browseButton.parentNode || document.body }; options = Basic.extend({}, defaults, options); // convert to object representation if (typeof(options.required_caps) === 'string') { options.required_caps = Runtime.parseCaps(options.required_caps); } // normalize accept option (could be list of mime types or array of title/extensions pairs) if (typeof(options.accept) === 'string') { options.accept = Mime.mimes2extList(options.accept); } container = Dom.get(options.container); // make sure we have container if (!container) { container = document.body; } // make container relative, if it's not if (Dom.getStyle(container, 'position') === 'static') { container.style.position = 'relative'; } container = browseButton = null; // IE RuntimeClient.call(self); Basic.extend(self, { /** Unique id of the component @property uid @protected @readOnly @type {String} @default UID */ uid: Basic.guid('uid_'), /** Unique id of the connected runtime, if any. @property ruid @protected @type {String} */ ruid: null, /** Unique id of the runtime container. Useful to get hold of it for various manipulations. @property shimid @protected @type {String} */ shimid: null, /** Array of selected mOxie.File objects @property files @type {Array} @default null */ files: null, /** Initializes the file-picker, connects it to runtime and dispatches event ready when done. @method init */ init: function() { self.convertEventPropsToHandlers(dispatches); self.bind('RuntimeInit', function(e, runtime) { self.ruid = runtime.uid; self.shimid = runtime.shimid; self.bind("Ready", function() { self.trigger("Refresh"); }, 999); self.bind("Change", function() { var files = runtime.exec.call(self, 'FileInput', 'getFiles'); self.files = []; Basic.each(files, function(file) { // ignore empty files (IE10 for example hangs if you try to send them via XHR) if (file.size === 0) { return true; } self.files.push(new File(self.ruid, file)); }); }, 999); // re-position and resize shim container self.bind('Refresh', function() { var pos, size, browseButton, shimContainer; browseButton = Dom.get(options.browse_button); shimContainer = Dom.get(runtime.shimid); // do not use runtime.getShimContainer(), since it will create container if it doesn't exist if (browseButton) { pos = Dom.getPos(browseButton, Dom.get(options.container)); size = Dom.getSize(browseButton); if (shimContainer) { Basic.extend(shimContainer.style, { top : pos.y + 'px', left : pos.x + 'px', width : size.w + 'px', height : size.h + 'px' }); } } shimContainer = browseButton = null; }); runtime.exec.call(self, 'FileInput', 'init', options); }); // runtime needs: options.required_features, options.runtime_order and options.container self.connectRuntime(Basic.extend({}, options, { required_caps: { select_file: true } })); }, /** Disables file-picker element, so that it doesn't react to mouse clicks. @method disable @param {Boolean} [state=true] Disable component if - true, enable if - false */ disable: function(state) { var runtime = this.getRuntime(); if (runtime) { runtime.exec.call(this, 'FileInput', 'disable', Basic.typeOf(state) === 'undefined' ? true : state); } }, /** Reposition and resize dialog trigger to match the position and size of browse_button element. @method refresh */ refresh: function() { self.trigger("Refresh"); }, /** Destroy component. @method destroy */ destroy: function() { var runtime = this.getRuntime(); if (runtime) { runtime.exec.call(this, 'FileInput', 'destroy'); this.disconnectRuntime(); } if (Basic.typeOf(this.files) === 'array') { // no sense in leaving associated files behind Basic.each(this.files, function(file) { file.destroy(); }); } this.files = null; } }); } FileInput.prototype = EventTarget.instance; return FileInput; }); // Included from: src/javascript/runtime/RuntimeTarget.js /** * RuntimeTarget.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/runtime/RuntimeTarget', [ 'moxie/core/utils/Basic', 'moxie/runtime/RuntimeClient', "moxie/core/EventTarget" ], function(Basic, RuntimeClient, EventTarget) { /** Instance of this class can be used as a target for the events dispatched by shims, when allowing them onto components is for either reason inappropriate @class RuntimeTarget @constructor @protected @extends EventTarget */ function RuntimeTarget() { this.uid = Basic.guid('uid_'); RuntimeClient.call(this); this.destroy = function() { this.disconnectRuntime(); this.unbindAll(); }; } RuntimeTarget.prototype = EventTarget.instance; return RuntimeTarget; }); // Included from: src/javascript/file/FileReader.js /** * FileReader.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/file/FileReader', [ 'moxie/core/utils/Basic', 'moxie/core/utils/Encode', 'moxie/core/Exceptions', 'moxie/core/EventTarget', 'moxie/file/Blob', 'moxie/file/File', 'moxie/runtime/RuntimeTarget' ], function(Basic, Encode, x, EventTarget, Blob, File, RuntimeTarget) { /** Utility for preloading o.Blob/o.File objects in memory. By design closely follows [W3C FileReader](http://www.w3.org/TR/FileAPI/#dfn-filereader) interface. Where possible uses native FileReader, where - not falls back to shims. @class FileReader @constructor FileReader @extends EventTarget @uses RuntimeClient */ var dispatches = [ /** Dispatched when the read starts. @event loadstart @param {Object} event */ 'loadstart', /** Dispatched while reading (and decoding) blob, and reporting partial Blob data (progess.loaded/progress.total). @event progress @param {Object} event */ 'progress', /** Dispatched when the read has successfully completed. @event load @param {Object} event */ 'load', /** Dispatched when the read has been aborted. For instance, by invoking the abort() method. @event abort @param {Object} event */ 'abort', /** Dispatched when the read has failed. @event error @param {Object} event */ 'error', /** Dispatched when the request has completed (either in success or failure). @event loadend @param {Object} event */ 'loadend' ]; function FileReader() { var self = this, _fr; Basic.extend(this, { /** UID of the component instance. @property uid @type {String} */ uid: Basic.guid('uid_'), /** Contains current state of FileReader object. Can take values of FileReader.EMPTY, FileReader.LOADING and FileReader.DONE. @property readyState @type {Number} @default FileReader.EMPTY */ readyState: FileReader.EMPTY, /** Result of the successful read operation. @property result @type {String} */ result: null, /** Stores the error of failed asynchronous read operation. @property error @type {DOMError} */ error: null, /** Initiates reading of File/Blob object contents to binary string. @method readAsBinaryString @param {Blob|File} blob Object to preload */ readAsBinaryString: function(blob) { _read.call(this, 'readAsBinaryString', blob); }, /** Initiates reading of File/Blob object contents to dataURL string. @method readAsDataURL @param {Blob|File} blob Object to preload */ readAsDataURL: function(blob) { _read.call(this, 'readAsDataURL', blob); }, /** Initiates reading of File/Blob object contents to string. @method readAsText @param {Blob|File} blob Object to preload */ readAsText: function(blob) { _read.call(this, 'readAsText', blob); }, /** Aborts preloading process. @method abort */ abort: function() { this.result = null; if (Basic.inArray(this.readyState, [FileReader.EMPTY, FileReader.DONE]) !== -1) { return; } else if (this.readyState === FileReader.LOADING) { this.readyState = FileReader.DONE; } if (_fr) { _fr.getRuntime().exec.call(this, 'FileReader', 'abort'); } this.trigger('abort'); this.trigger('loadend'); }, /** Destroy component and release resources. @method destroy */ destroy: function() { this.abort(); if (_fr) { _fr.getRuntime().exec.call(this, 'FileReader', 'destroy'); _fr.disconnectRuntime(); } self = _fr = null; } }); function _read(op, blob) { _fr = new RuntimeTarget(); function error(err) { self.readyState = FileReader.DONE; self.error = err; self.trigger('error'); loadEnd(); } function loadEnd() { _fr.destroy(); _fr = null; self.trigger('loadend'); } function exec(runtime) { _fr.bind('Error', function(e, err) { error(err); }); _fr.bind('Progress', function(e) { self.result = runtime.exec.call(_fr, 'FileReader', 'getResult'); self.trigger(e); }); _fr.bind('Load', function(e) { self.readyState = FileReader.DONE; self.result = runtime.exec.call(_fr, 'FileReader', 'getResult'); self.trigger(e); loadEnd(); }); runtime.exec.call(_fr, 'FileReader', 'read', op, blob); } this.convertEventPropsToHandlers(dispatches); if (this.readyState === FileReader.LOADING) { return error(new x.DOMException(x.DOMException.INVALID_STATE_ERR)); } this.readyState = FileReader.LOADING; this.trigger('loadstart'); // if source is o.Blob/o.File if (blob instanceof Blob) { if (blob.isDetached()) { var src = blob.getSource(); switch (op) { case 'readAsText': case 'readAsBinaryString': this.result = src; break; case 'readAsDataURL': this.result = 'data:' + blob.type + ';base64,' + Encode.btoa(src); break; } this.readyState = FileReader.DONE; this.trigger('load'); loadEnd(); } else { exec(_fr.connectRuntime(blob.ruid)); } } else { error(new x.DOMException(x.DOMException.NOT_FOUND_ERR)); } } } /** Initial FileReader state @property EMPTY @type {Number} @final @static @default 0 */ FileReader.EMPTY = 0; /** FileReader switches to this state when it is preloading the source @property LOADING @type {Number} @final @static @default 1 */ FileReader.LOADING = 1; /** Preloading is complete, this is a final state @property DONE @type {Number} @final @static @default 2 */ FileReader.DONE = 2; FileReader.prototype = EventTarget.instance; return FileReader; }); // Included from: src/javascript/core/utils/Url.js /** * Url.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/utils/Url', [], function() { /** Parse url into separate components and fill in absent parts with parts from current url, based on https://raw.github.com/kvz/phpjs/master/functions/url/parse_url.js @method parseUrl @for Utils @static @param {String} url Url to parse (defaults to empty string if undefined) @return {Object} Hash containing extracted uri components */ var parseUrl = function(url, currentUrl) { var key = ['source', 'scheme', 'authority', 'userInfo', 'user', 'pass', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'fragment'] , i = key.length , ports = { http: 80, https: 443 } , uri = {} , regex = /^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/ , m = regex.exec(url || '') ; while (i--) { if (m[i]) { uri[key[i]] = m[i]; } } // when url is relative, we set the origin and the path ourselves if (!uri.scheme) { // come up with defaults if (!currentUrl || typeof(currentUrl) === 'string') { currentUrl = parseUrl(currentUrl || document.location.href); } uri.scheme = currentUrl.scheme; uri.host = currentUrl.host; uri.port = currentUrl.port; var path = ''; // for urls without trailing slash we need to figure out the path if (/^[^\/]/.test(uri.path)) { path = currentUrl.path; // if path ends with a filename, strip it if (!/(\/|\/[^\.]+)$/.test(path)) { path = path.replace(/\/[^\/]+$/, '/'); } else { path += '/'; } } uri.path = path + (uri.path || ''); // site may reside at domain.com or domain.com/subdir } if (!uri.port) { uri.port = ports[uri.scheme] || 80; } uri.port = parseInt(uri.port, 10); if (!uri.path) { uri.path = "/"; } delete uri.source; return uri; }; /** Resolve url - among other things will turn relative url to absolute @method resolveUrl @static @param {String} url Either absolute or relative @return {String} Resolved, absolute url */ var resolveUrl = function(url) { var ports = { // we ignore default ports http: 80, https: 443 } , urlp = parseUrl(url) ; return urlp.scheme + '://' + urlp.host + (urlp.port !== ports[urlp.scheme] ? ':' + urlp.port : '') + urlp.path + (urlp.query ? urlp.query : ''); }; /** Check if specified url has the same origin as the current document @method hasSameOrigin @param {String|Object} url @return {Boolean} */ var hasSameOrigin = function(url) { function origin(url) { return [url.scheme, url.host, url.port].join('/'); } if (typeof url === 'string') { url = parseUrl(url); } return origin(parseUrl()) === origin(url); }; return { parseUrl: parseUrl, resolveUrl: resolveUrl, hasSameOrigin: hasSameOrigin }; }); // Included from: src/javascript/file/FileReaderSync.js /** * FileReaderSync.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/file/FileReaderSync', [ 'moxie/core/utils/Basic', 'moxie/runtime/RuntimeClient', 'moxie/core/utils/Encode' ], function(Basic, RuntimeClient, Encode) { /** Synchronous FileReader implementation. Something like this is available in WebWorkers environment, here it can be used to read only preloaded blobs/files and only below certain size (not yet sure what that'd be, but probably < 1mb). Not meant to be used directly by user. @class FileReaderSync @private @constructor */ return function() { RuntimeClient.call(this); Basic.extend(this, { uid: Basic.guid('uid_'), readAsBinaryString: function(blob) { return _read.call(this, 'readAsBinaryString', blob); }, readAsDataURL: function(blob) { return _read.call(this, 'readAsDataURL', blob); }, /*readAsArrayBuffer: function(blob) { return _read.call(this, 'readAsArrayBuffer', blob); },*/ readAsText: function(blob) { return _read.call(this, 'readAsText', blob); } }); function _read(op, blob) { if (blob.isDetached()) { var src = blob.getSource(); switch (op) { case 'readAsBinaryString': return src; case 'readAsDataURL': return 'data:' + blob.type + ';base64,' + Encode.btoa(src); case 'readAsText': var txt = ''; for (var i = 0, length = src.length; i < length; i++) { txt += String.fromCharCode(src[i]); } return txt; } } else { var result = this.connectRuntime(blob.ruid).exec.call(this, 'FileReaderSync', 'read', op, blob); this.disconnectRuntime(); return result; } } }; }); // Included from: src/javascript/xhr/FormData.js /** * FormData.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/xhr/FormData", [ "moxie/core/Exceptions", "moxie/core/utils/Basic", "moxie/file/Blob" ], function(x, Basic, Blob) { /** FormData @class FormData @constructor */ function FormData() { var _blob, _fields = []; Basic.extend(this, { /** Append another key-value pair to the FormData object @method append @param {String} name Name for the new field @param {String|Blob|Array|Object} value Value for the field */ append: function(name, value) { var self = this, valueType = Basic.typeOf(value); // according to specs value might be either Blob or String if (value instanceof Blob) { _blob = { name: name, value: value // unfortunately we can only send single Blob in one FormData }; } else if ('array' === valueType) { name += '[]'; Basic.each(value, function(value) { self.append(name, value); }); } else if ('object' === valueType) { Basic.each(value, function(value, key) { self.append(name + '[' + key + ']', value); }); } else if ('null' === valueType || 'undefined' === valueType || 'number' === valueType && isNaN(value)) { self.append(name, "false"); } else { _fields.push({ name: name, value: value.toString() }); } }, /** Checks if FormData contains Blob. @method hasBlob @return {Boolean} */ hasBlob: function() { return !!this.getBlob(); }, /** Retrieves blob. @method getBlob @return {Object} Either Blob if found or null */ getBlob: function() { return _blob && _blob.value || null; }, /** Retrieves blob field name. @method getBlobName @return {String} Either Blob field name or null */ getBlobName: function() { return _blob && _blob.name || null; }, /** Loop over the fields in FormData and invoke the callback for each of them. @method each @param {Function} cb Callback to call for each field */ each: function(cb) { Basic.each(_fields, function(field) { cb(field.value, field.name); }); if (_blob) { cb(_blob.value, _blob.name); } }, destroy: function() { _blob = null; _fields = []; } }); } return FormData; }); // Included from: src/javascript/xhr/XMLHttpRequest.js /** * XMLHttpRequest.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/xhr/XMLHttpRequest", [ "moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/core/EventTarget", "moxie/core/utils/Encode", "moxie/core/utils/Url", "moxie/runtime/Runtime", "moxie/runtime/RuntimeTarget", "moxie/file/Blob", "moxie/file/FileReaderSync", "moxie/xhr/FormData", "moxie/core/utils/Env", "moxie/core/utils/Mime" ], function(Basic, x, EventTarget, Encode, Url, Runtime, RuntimeTarget, Blob, FileReaderSync, FormData, Env, Mime) { var httpCode = { 100: 'Continue', 101: 'Switching Protocols', 102: 'Processing', 200: 'OK', 201: 'Created', 202: 'Accepted', 203: 'Non-Authoritative Information', 204: 'No Content', 205: 'Reset Content', 206: 'Partial Content', 207: 'Multi-Status', 226: 'IM Used', 300: 'Multiple Choices', 301: 'Moved Permanently', 302: 'Found', 303: 'See Other', 304: 'Not Modified', 305: 'Use Proxy', 306: 'Reserved', 307: 'Temporary Redirect', 400: 'Bad Request', 401: 'Unauthorized', 402: 'Payment Required', 403: 'Forbidden', 404: 'Not Found', 405: 'Method Not Allowed', 406: 'Not Acceptable', 407: 'Proxy Authentication Required', 408: 'Request Timeout', 409: 'Conflict', 410: 'Gone', 411: 'Length Required', 412: 'Precondition Failed', 413: 'Request Entity Too Large', 414: 'Request-URI Too Long', 415: 'Unsupported Media Type', 416: 'Requested Range Not Satisfiable', 417: 'Expectation Failed', 422: 'Unprocessable Entity', 423: 'Locked', 424: 'Failed Dependency', 426: 'Upgrade Required', 500: 'Internal Server Error', 501: 'Not Implemented', 502: 'Bad Gateway', 503: 'Service Unavailable', 504: 'Gateway Timeout', 505: 'HTTP Version Not Supported', 506: 'Variant Also Negotiates', 507: 'Insufficient Storage', 510: 'Not Extended' }; function XMLHttpRequestUpload() { this.uid = Basic.guid('uid_'); } XMLHttpRequestUpload.prototype = EventTarget.instance; /** Implementation of XMLHttpRequest @class XMLHttpRequest @constructor @uses RuntimeClient @extends EventTarget */ var dispatches = ['loadstart', 'progress', 'abort', 'error', 'load', 'timeout', 'loadend']; // & readystatechange (for historical reasons) var NATIVE = 1, RUNTIME = 2; function XMLHttpRequest() { var self = this, // this (together with _p() @see below) is here to gracefully upgrade to setter/getter syntax where possible props = { /** The amount of milliseconds a request can take before being terminated. Initially zero. Zero means there is no timeout. @property timeout @type Number @default 0 */ timeout: 0, /** Current state, can take following values: UNSENT (numeric value 0) The object has been constructed. OPENED (numeric value 1) The open() method has been successfully invoked. During this state request headers can be set using setRequestHeader() and the request can be made using the send() method. HEADERS_RECEIVED (numeric value 2) All redirects (if any) have been followed and all HTTP headers of the final response have been received. Several response members of the object are now available. LOADING (numeric value 3) The response entity body is being received. DONE (numeric value 4) @property readyState @type Number @default 0 (UNSENT) */ readyState: XMLHttpRequest.UNSENT, /** True when user credentials are to be included in a cross-origin request. False when they are to be excluded in a cross-origin request and when cookies are to be ignored in its response. Initially false. @property withCredentials @type Boolean @default false */ withCredentials: false, /** Returns the HTTP status code. @property status @type Number @default 0 */ status: 0, /** Returns the HTTP status text. @property statusText @type String */ statusText: "", /** Returns the response type. Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text". @property responseType @type String */ responseType: "", /** Returns the document response entity body. Throws an "InvalidStateError" exception if responseType is not the empty string or "document". @property responseXML @type Document */ responseXML: null, /** Returns the text response entity body. Throws an "InvalidStateError" exception if responseType is not the empty string or "text". @property responseText @type String */ responseText: null, /** Returns the response entity body (http://www.w3.org/TR/XMLHttpRequest/#response-entity-body). Can become: ArrayBuffer, Blob, Document, JSON, Text @property response @type Mixed */ response: null }, _async = true, _url, _method, _headers = {}, _user, _password, _encoding = null, _mimeType = null, // flags _sync_flag = false, _send_flag = false, _upload_events_flag = false, _upload_complete_flag = false, _error_flag = false, _same_origin_flag = false, // times _start_time, _timeoutset_time, _finalMime = null, _finalCharset = null, _options = {}, _xhr, _responseHeaders = '', _responseHeadersBag ; Basic.extend(this, props, { /** Unique id of the component @property uid @type String */ uid: Basic.guid('uid_'), /** Target for Upload events @property upload @type XMLHttpRequestUpload */ upload: new XMLHttpRequestUpload(), /** Sets the request method, request URL, synchronous flag, request username, and request password. Throws a "SyntaxError" exception if one of the following is true: method is not a valid HTTP method. url cannot be resolved. url contains the "user:password" format in the userinfo production. Throws a "SecurityError" exception if method is a case-insensitive match for CONNECT, TRACE or TRACK. Throws an "InvalidAccessError" exception if one of the following is true: Either user or password is passed as argument and the origin of url does not match the XMLHttpRequest origin. There is an associated XMLHttpRequest document and either the timeout attribute is not zero, the withCredentials attribute is true, or the responseType attribute is not the empty string. @method open @param {String} method HTTP method to use on request @param {String} url URL to request @param {Boolean} [async=true] If false request will be done in synchronous manner. Asynchronous by default. @param {String} [user] Username to use in HTTP authentication process on server-side @param {String} [password] Password to use in HTTP authentication process on server-side */ open: function(method, url, async, user, password) { var urlp; // first two arguments are required if (!method || !url) { throw new x.DOMException(x.DOMException.SYNTAX_ERR); } // 2 - check if any code point in method is higher than U+00FF or after deflating method it does not match the method if (/[\u0100-\uffff]/.test(method) || Encode.utf8_encode(method) !== method) { throw new x.DOMException(x.DOMException.SYNTAX_ERR); } // 3 if (!!~Basic.inArray(method.toUpperCase(), ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'TRACE', 'TRACK'])) { _method = method.toUpperCase(); } // 4 - allowing these methods poses a security risk if (!!~Basic.inArray(_method, ['CONNECT', 'TRACE', 'TRACK'])) { throw new x.DOMException(x.DOMException.SECURITY_ERR); } // 5 url = Encode.utf8_encode(url); // 6 - Resolve url relative to the XMLHttpRequest base URL. If the algorithm returns an error, throw a "SyntaxError". urlp = Url.parseUrl(url); _same_origin_flag = Url.hasSameOrigin(urlp); // 7 - manually build up absolute url _url = Url.resolveUrl(url); // 9-10, 12-13 if ((user || password) && !_same_origin_flag) { throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); } _user = user || urlp.user; _password = password || urlp.pass; // 11 _async = async || true; if (_async === false && (_p('timeout') || _p('withCredentials') || _p('responseType') !== "")) { throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); } // 14 - terminate abort() // 15 - terminate send() // 18 _sync_flag = !_async; _send_flag = false; _headers = {}; _reset.call(this); // 19 _p('readyState', XMLHttpRequest.OPENED); // 20 this.convertEventPropsToHandlers(['readystatechange']); // unify event handlers this.dispatchEvent('readystatechange'); }, /** Appends an header to the list of author request headers, or if header is already in the list of author request headers, combines its value with value. Throws an "InvalidStateError" exception if the state is not OPENED or if the send() flag is set. Throws a "SyntaxError" exception if header is not a valid HTTP header field name or if value is not a valid HTTP header field value. @method setRequestHeader @param {String} header @param {String|Number} value */ setRequestHeader: function(header, value) { var uaHeaders = [ // these headers are controlled by the user agent "accept-charset", "accept-encoding", "access-control-request-headers", "access-control-request-method", "connection", "content-length", "cookie", "cookie2", "content-transfer-encoding", "date", "expect", "host", "keep-alive", "origin", "referer", "te", "trailer", "transfer-encoding", "upgrade", "user-agent", "via" ]; // 1-2 if (_p('readyState') !== XMLHttpRequest.OPENED || _send_flag) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 3 if (/[\u0100-\uffff]/.test(header) || Encode.utf8_encode(header) !== header) { throw new x.DOMException(x.DOMException.SYNTAX_ERR); } // 4 /* this step is seemingly bypassed in browsers, probably to allow various unicode characters in header values if (/[\u0100-\uffff]/.test(value) || Encode.utf8_encode(value) !== value) { throw new x.DOMException(x.DOMException.SYNTAX_ERR); }*/ header = Basic.trim(header).toLowerCase(); // setting of proxy-* and sec-* headers is prohibited by spec if (!!~Basic.inArray(header, uaHeaders) || /^(proxy\-|sec\-)/.test(header)) { return false; } // camelize // browsers lowercase header names (at least for custom ones) // header = header.replace(/\b\w/g, function($1) { return $1.toUpperCase(); }); if (!_headers[header]) { _headers[header] = value; } else { // http://tools.ietf.org/html/rfc2616#section-4.2 (last paragraph) _headers[header] += ', ' + value; } return true; }, /** Returns all headers from the response, with the exception of those whose field name is Set-Cookie or Set-Cookie2. @method getAllResponseHeaders @return {String} reponse headers or empty string */ getAllResponseHeaders: function() { return _responseHeaders || ''; }, /** Returns the header field value from the response of which the field name matches header, unless the field name is Set-Cookie or Set-Cookie2. @method getResponseHeader @param {String} header @return {String} value(s) for the specified header or null */ getResponseHeader: function(header) { header = header.toLowerCase(); if (_error_flag || !!~Basic.inArray(header, ['set-cookie', 'set-cookie2'])) { return null; } if (_responseHeaders && _responseHeaders !== '') { // if we didn't parse response headers until now, do it and keep for later if (!_responseHeadersBag) { _responseHeadersBag = {}; Basic.each(_responseHeaders.split(/\r\n/), function(line) { var pair = line.split(/:\s+/); if (pair.length === 2) { // last line might be empty, omit pair[0] = Basic.trim(pair[0]); // just in case _responseHeadersBag[pair[0].toLowerCase()] = { // simply to retain header name in original form header: pair[0], value: Basic.trim(pair[1]) }; } }); } if (_responseHeadersBag.hasOwnProperty(header)) { return _responseHeadersBag[header].header + ': ' + _responseHeadersBag[header].value; } } return null; }, /** Sets the Content-Type header for the response to mime. Throws an "InvalidStateError" exception if the state is LOADING or DONE. Throws a "SyntaxError" exception if mime is not a valid media type. @method overrideMimeType @param String mime Mime type to set */ overrideMimeType: function(mime) { var matches, charset; // 1 if (!!~Basic.inArray(_p('readyState'), [XMLHttpRequest.LOADING, XMLHttpRequest.DONE])) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 2 mime = Basic.trim(mime.toLowerCase()); if (/;/.test(mime) && (matches = mime.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))) { mime = matches[1]; if (matches[2]) { charset = matches[2]; } } if (!Mime.mimes[mime]) { throw new x.DOMException(x.DOMException.SYNTAX_ERR); } // 3-4 _finalMime = mime; _finalCharset = charset; }, /** Initiates the request. The optional argument provides the request entity body. The argument is ignored if request method is GET or HEAD. Throws an "InvalidStateError" exception if the state is not OPENED or if the send() flag is set. @method send @param {Blob|Document|String|FormData} [data] Request entity body @param {Object} [options] Set of requirements and pre-requisities for runtime initialization */ send: function(data, options) { if (Basic.typeOf(options) === 'string') { _options = { ruid: options }; } else if (!options) { _options = {}; } else { _options = options; } this.convertEventPropsToHandlers(dispatches); this.upload.convertEventPropsToHandlers(dispatches); // 1-2 if (this.readyState !== XMLHttpRequest.OPENED || _send_flag) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 3 // sending Blob if (data instanceof Blob) { _options.ruid = data.ruid; _mimeType = data.type || 'application/octet-stream'; } // FormData else if (data instanceof FormData) { if (data.hasBlob()) { var blob = data.getBlob(); _options.ruid = blob.ruid; _mimeType = blob.type || 'application/octet-stream'; } } // DOMString else if (typeof data === 'string') { _encoding = 'UTF-8'; _mimeType = 'text/plain;charset=UTF-8'; // data should be converted to Unicode and encoded as UTF-8 data = Encode.utf8_encode(data); } // if withCredentials not set, but requested, set it automatically if (!this.withCredentials) { this.withCredentials = (_options.required_caps && _options.required_caps.send_browser_cookies) && !_same_origin_flag; } // 4 - storage mutex // 5 _upload_events_flag = (!_sync_flag && this.upload.hasEventListener()); // DSAP // 6 _error_flag = false; // 7 _upload_complete_flag = !data; // 8 - Asynchronous steps if (!_sync_flag) { // 8.1 _send_flag = true; // 8.2 // this.dispatchEvent('loadstart'); // will be dispatched either by native or runtime xhr // 8.3 //if (!_upload_complete_flag) { // this.upload.dispatchEvent('loadstart'); // will be dispatched either by native or runtime xhr //} } // 8.5 - Return the send() method call, but continue running the steps in this algorithm. _doXHR.call(this, data); }, /** Cancels any network activity. @method abort */ abort: function() { _error_flag = true; _sync_flag = false; if (!~Basic.inArray(_p('readyState'), [XMLHttpRequest.UNSENT, XMLHttpRequest.OPENED, XMLHttpRequest.DONE])) { _p('readyState', XMLHttpRequest.DONE); _send_flag = false; if (_xhr) { _xhr.getRuntime().exec.call(_xhr, 'XMLHttpRequest', 'abort', _upload_complete_flag); } else { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } _upload_complete_flag = true; } else { _p('readyState', XMLHttpRequest.UNSENT); } }, destroy: function() { if (_xhr) { if (Basic.typeOf(_xhr.destroy) === 'function') { _xhr.destroy(); } _xhr = null; } this.unbindAll(); if (this.upload) { this.upload.unbindAll(); this.upload = null; } } }); /* this is nice, but maybe too lengthy // if supported by JS version, set getters/setters for specific properties o.defineProperty(this, 'readyState', { configurable: false, get: function() { return _p('readyState'); } }); o.defineProperty(this, 'timeout', { configurable: false, get: function() { return _p('timeout'); }, set: function(value) { if (_sync_flag) { throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); } // timeout still should be measured relative to the start time of request _timeoutset_time = (new Date).getTime(); _p('timeout', value); } }); // the withCredentials attribute has no effect when fetching same-origin resources o.defineProperty(this, 'withCredentials', { configurable: false, get: function() { return _p('withCredentials'); }, set: function(value) { // 1-2 if (!~o.inArray(_p('readyState'), [XMLHttpRequest.UNSENT, XMLHttpRequest.OPENED]) || _send_flag) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 3-4 if (_anonymous_flag || _sync_flag) { throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); } // 5 _p('withCredentials', value); } }); o.defineProperty(this, 'status', { configurable: false, get: function() { return _p('status'); } }); o.defineProperty(this, 'statusText', { configurable: false, get: function() { return _p('statusText'); } }); o.defineProperty(this, 'responseType', { configurable: false, get: function() { return _p('responseType'); }, set: function(value) { // 1 if (!!~o.inArray(_p('readyState'), [XMLHttpRequest.LOADING, XMLHttpRequest.DONE])) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 2 if (_sync_flag) { throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); } // 3 _p('responseType', value.toLowerCase()); } }); o.defineProperty(this, 'responseText', { configurable: false, get: function() { // 1 if (!~o.inArray(_p('responseType'), ['', 'text'])) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 2-3 if (_p('readyState') !== XMLHttpRequest.DONE && _p('readyState') !== XMLHttpRequest.LOADING || _error_flag) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } return _p('responseText'); } }); o.defineProperty(this, 'responseXML', { configurable: false, get: function() { // 1 if (!~o.inArray(_p('responseType'), ['', 'document'])) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 2-3 if (_p('readyState') !== XMLHttpRequest.DONE || _error_flag) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } return _p('responseXML'); } }); o.defineProperty(this, 'response', { configurable: false, get: function() { if (!!~o.inArray(_p('responseType'), ['', 'text'])) { if (_p('readyState') !== XMLHttpRequest.DONE && _p('readyState') !== XMLHttpRequest.LOADING || _error_flag) { return ''; } } if (_p('readyState') !== XMLHttpRequest.DONE || _error_flag) { return null; } return _p('response'); } }); */ function _p(prop, value) { if (!props.hasOwnProperty(prop)) { return; } if (arguments.length === 1) { // get return Env.can('define_property') ? props[prop] : self[prop]; } else { // set if (Env.can('define_property')) { props[prop] = value; } else { self[prop] = value; } } } /* function _toASCII(str, AllowUnassigned, UseSTD3ASCIIRules) { // TODO: http://tools.ietf.org/html/rfc3490#section-4.1 return str.toLowerCase(); } */ function _doXHR(data) { var self = this; _start_time = new Date().getTime(); _xhr = new RuntimeTarget(); function loadEnd() { if (_xhr) { // it could have been destroyed by now _xhr.destroy(); _xhr = null; } self.dispatchEvent('loadend'); self = null; } function exec(runtime) { _xhr.bind('LoadStart', function(e) { _p('readyState', XMLHttpRequest.LOADING); self.dispatchEvent('readystatechange'); self.dispatchEvent(e); if (_upload_events_flag) { self.upload.dispatchEvent(e); } }); _xhr.bind('Progress', function(e) { if (_p('readyState') !== XMLHttpRequest.LOADING) { _p('readyState', XMLHttpRequest.LOADING); // LoadStart unreliable (in Flash for example) self.dispatchEvent('readystatechange'); } self.dispatchEvent(e); }); _xhr.bind('UploadProgress', function(e) { if (_upload_events_flag) { self.upload.dispatchEvent({ type: 'progress', lengthComputable: false, total: e.total, loaded: e.loaded }); } }); _xhr.bind('Load', function(e) { _p('readyState', XMLHttpRequest.DONE); _p('status', Number(runtime.exec.call(_xhr, 'XMLHttpRequest', 'getStatus') || 0)); _p('statusText', httpCode[_p('status')] || ""); _p('response', runtime.exec.call(_xhr, 'XMLHttpRequest', 'getResponse', _p('responseType'))); if (!!~Basic.inArray(_p('responseType'), ['text', ''])) { _p('responseText', _p('response')); } else if (_p('responseType') === 'document') { _p('responseXML', _p('response')); } _responseHeaders = runtime.exec.call(_xhr, 'XMLHttpRequest', 'getAllResponseHeaders'); self.dispatchEvent('readystatechange'); if (_p('status') > 0) { // status 0 usually means that server is unreachable if (_upload_events_flag) { self.upload.dispatchEvent(e); } self.dispatchEvent(e); } else { _error_flag = true; self.dispatchEvent('error'); } loadEnd(); }); _xhr.bind('Abort', function(e) { self.dispatchEvent(e); loadEnd(); }); _xhr.bind('Error', function(e) { _error_flag = true; _p('readyState', XMLHttpRequest.DONE); self.dispatchEvent('readystatechange'); _upload_complete_flag = true; self.dispatchEvent(e); loadEnd(); }); runtime.exec.call(_xhr, 'XMLHttpRequest', 'send', { url: _url, method: _method, async: _async, user: _user, password: _password, headers: _headers, mimeType: _mimeType, encoding: _encoding, responseType: self.responseType, withCredentials: self.withCredentials, options: _options }, data); } // clarify our requirements if (typeof(_options.required_caps) === 'string') { _options.required_caps = Runtime.parseCaps(_options.required_caps); } _options.required_caps = Basic.extend({}, _options.required_caps, { return_response_type: self.responseType }); if (data instanceof FormData) { _options.required_caps.send_multipart = true; } if (!_same_origin_flag) { _options.required_caps.do_cors = true; } if (_options.ruid) { // we do not need to wait if we can connect directly exec(_xhr.connectRuntime(_options)); } else { _xhr.bind('RuntimeInit', function(e, runtime) { exec(runtime); }); _xhr.bind('RuntimeError', function(e, err) { self.dispatchEvent('RuntimeError', err); }); _xhr.connectRuntime(_options); } } function _reset() { _p('responseText', ""); _p('responseXML', null); _p('response', null); _p('status', 0); _p('statusText', ""); _start_time = _timeoutset_time = null; } } XMLHttpRequest.UNSENT = 0; XMLHttpRequest.OPENED = 1; XMLHttpRequest.HEADERS_RECEIVED = 2; XMLHttpRequest.LOADING = 3; XMLHttpRequest.DONE = 4; XMLHttpRequest.prototype = EventTarget.instance; return XMLHttpRequest; }); // Included from: src/javascript/runtime/flash/Runtime.js /** * Runtime.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /*global ActiveXObject:true */ /** Defines constructor for Flash runtime. @class moxie/runtime/flash/Runtime @private */ define("moxie/runtime/flash/Runtime", [ "moxie/core/utils/Basic", "moxie/core/utils/Env", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/runtime/Runtime" ], function(Basic, Env, Dom, x, Runtime) { var type = 'flash', extensions = {}; /** Get the version of the Flash Player @method getShimVersion @private @return {Number} Flash Player version */ function getShimVersion() { var version; try { version = navigator.plugins['Shockwave Flash']; version = version.description; } catch (e1) { try { version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version'); } catch (e2) { version = '0.0'; } } version = version.match(/\d+/g); return parseFloat(version[0] + '.' + version[1]); } /** Constructor for the Flash Runtime @class FlashRuntime @extends Runtime */ function FlashRuntime(options) { var I = this, initTimer; options = Basic.extend({ swf_url: Env.swf_url }, options); Runtime.call(this, options, type, { access_binary: function(value) { return value && I.mode === 'browser'; }, access_image_binary: function(value) { return value && I.mode === 'browser'; }, display_media: Runtime.capTrue, do_cors: Runtime.capTrue, drag_and_drop: false, report_upload_progress: function() { return I.mode === 'client'; }, resize_image: Runtime.capTrue, return_response_headers: false, return_response_type: function(responseType) { if (responseType === 'json' && !!window.JSON) { return true; } return !Basic.arrayDiff(responseType, ['', 'text', 'document']) || I.mode === 'browser'; }, return_status_code: function(code) { return I.mode === 'browser' || !Basic.arrayDiff(code, [200, 404]); }, select_file: Runtime.capTrue, select_multiple: Runtime.capTrue, send_binary_string: function(value) { return value && I.mode === 'browser'; }, send_browser_cookies: function(value) { return value && I.mode === 'browser'; }, send_custom_headers: function(value) { return value && I.mode === 'browser'; }, send_multipart: Runtime.capTrue, slice_blob: function(value) { return value && I.mode === 'browser'; }, stream_upload: function(value) { return value && I.mode === 'browser'; }, summon_file_dialog: false, upload_filesize: function(size) { return Basic.parseSizeStr(size) <= 2097152 || I.mode === 'client'; }, use_http_method: function(methods) { return !Basic.arrayDiff(methods, ['GET', 'POST']); } }, { // capabilities that require specific mode access_binary: function(value) { return value ? 'browser' : 'client'; }, access_image_binary: function(value) { return value ? 'browser' : 'client'; }, report_upload_progress: function(value) { return value ? 'browser' : 'client'; }, return_response_type: function(responseType) { return Basic.arrayDiff(responseType, ['', 'text', 'json', 'document']) ? 'browser' : ['client', 'browser']; }, return_status_code: function(code) { return Basic.arrayDiff(code, [200, 404]) ? 'browser' : ['client', 'browser']; }, send_binary_string: function(value) { return value ? 'browser' : 'client'; }, send_browser_cookies: function(value) { return value ? 'browser' : 'client'; }, send_custom_headers: function(value) { return value ? 'browser' : 'client'; }, stream_upload: function(value) { return value ? 'client' : 'browser'; }, upload_filesize: function(size) { return Basic.parseSizeStr(size) >= 2097152 ? 'client' : 'browser'; } }, 'client'); // minimal requirement for Flash Player version if (getShimVersion() < 10) { this.mode = false; // with falsy mode, runtime won't operable, no matter what the mode was before } Basic.extend(this, { getShim: function() { return Dom.get(this.uid); }, shimExec: function(component, action) { var args = [].slice.call(arguments, 2); return I.getShim().exec(this.uid, component, action, args); }, init: function() { var html, el, container; container = this.getShimContainer(); // if not the minimal height, shims are not initialized in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc) Basic.extend(container.style, { position: 'absolute', top: '-8px', left: '-8px', width: '9px', height: '9px', overflow: 'hidden' }); // insert flash object html = '<object id="' + this.uid + '" type="application/x-shockwave-flash" data="' + options.swf_url + '" '; if (Env.browser === 'IE') { html += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '; } html += 'width="100%" height="100%" style="outline:0">' + '<param name="movie" value="' + options.swf_url + '" />' + '<param name="flashvars" value="uid=' + escape(this.uid) + '&target=' + Env.global_event_dispatcher + '" />' + '<param name="wmode" value="transparent" />' + '<param name="allowscriptaccess" value="always" />' + '</object>'; if (Env.browser === 'IE') { el = document.createElement('div'); container.appendChild(el); el.outerHTML = html; el = container = null; // just in case } else { container.innerHTML = html; } // Init is dispatched by the shim initTimer = setTimeout(function() { if (I && !I.initialized) { // runtime might be already destroyed by this moment I.trigger("Error", new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR)); } }, 5000); }, destroy: (function(destroy) { // extend default destroy method return function() { destroy.call(I); clearTimeout(initTimer); // initialization check might be still onwait options = initTimer = destroy = I = null; }; }(this.destroy)) }, extensions); } Runtime.addConstructor(type, FlashRuntime); return extensions; }); // Included from: src/javascript/runtime/flash/file/Blob.js /** * Blob.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/file/Blob @private */ define("moxie/runtime/flash/file/Blob", [ "moxie/runtime/flash/Runtime", "moxie/file/Blob" ], function(extensions, Blob) { var FlashBlob = { slice: function(blob, start, end, type) { var self = this.getRuntime(); if (start < 0) { start = Math.max(blob.size + start, 0); } else if (start > 0) { start = Math.min(start, blob.size); } if (end < 0) { end = Math.max(blob.size + end, 0); } else if (end > 0) { end = Math.min(end, blob.size); } blob = self.shimExec.call(this, 'Blob', 'slice', start, end, type || ''); if (blob) { blob = new Blob(self.uid, blob); } return blob; } }; return (extensions.Blob = FlashBlob); }); // Included from: src/javascript/runtime/flash/file/FileInput.js /** * FileInput.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/file/FileInput @private */ define("moxie/runtime/flash/file/FileInput", [ "moxie/runtime/flash/Runtime" ], function(extensions) { var FileInput = { init: function(options) { this.getRuntime().shimExec.call(this, 'FileInput', 'init', { name: options.name, accept: options.accept, multiple: options.multiple }); this.trigger('ready'); } }; return (extensions.FileInput = FileInput); }); // Included from: src/javascript/runtime/flash/file/FileReader.js /** * FileReader.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/file/FileReader @private */ define("moxie/runtime/flash/file/FileReader", [ "moxie/runtime/flash/Runtime", "moxie/core/utils/Encode" ], function(extensions, Encode) { var _result = ''; function _formatData(data, op) { switch (op) { case 'readAsText': return Encode.atob(data, 'utf8'); case 'readAsBinaryString': return Encode.atob(data); case 'readAsDataURL': return data; } return null; } var FileReader = { read: function(op, blob) { var target = this, self = target.getRuntime(); // special prefix for DataURL read mode if (op === 'readAsDataURL') { _result = 'data:' + (blob.type || '') + ';base64,'; } target.bind('Progress', function(e, data) { if (data) { _result += _formatData(data, op); } }); return self.shimExec.call(this, 'FileReader', 'readAsBase64', blob.uid); }, getResult: function() { return _result; }, destroy: function() { _result = null; } }; return (extensions.FileReader = FileReader); }); // Included from: src/javascript/runtime/flash/file/FileReaderSync.js /** * FileReaderSync.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/file/FileReaderSync @private */ define("moxie/runtime/flash/file/FileReaderSync", [ "moxie/runtime/flash/Runtime", "moxie/core/utils/Encode" ], function(extensions, Encode) { function _formatData(data, op) { switch (op) { case 'readAsText': return Encode.atob(data, 'utf8'); case 'readAsBinaryString': return Encode.atob(data); case 'readAsDataURL': return data; } return null; } var FileReaderSync = { read: function(op, blob) { var result, self = this.getRuntime(); result = self.shimExec.call(this, 'FileReaderSync', 'readAsBase64', blob.uid); if (!result) { return null; // or throw ex } // special prefix for DataURL read mode if (op === 'readAsDataURL') { result = 'data:' + (blob.type || '') + ';base64,' + result; } return _formatData(result, op, blob.type); } }; return (extensions.FileReaderSync = FileReaderSync); }); // Included from: src/javascript/runtime/Transporter.js /** * Transporter.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/runtime/Transporter", [ "moxie/core/utils/Basic", "moxie/core/utils/Encode", "moxie/runtime/RuntimeClient", "moxie/core/EventTarget" ], function(Basic, Encode, RuntimeClient, EventTarget) { function Transporter() { var mod, _runtime, _data, _size, _pos, _chunk_size; RuntimeClient.call(this); Basic.extend(this, { uid: Basic.guid('uid_'), state: Transporter.IDLE, result: null, transport: function(data, type, options) { var self = this; options = Basic.extend({ chunk_size: 204798 }, options); // should divide by three, base64 requires this if ((mod = options.chunk_size % 3)) { options.chunk_size += 3 - mod; } _chunk_size = options.chunk_size; _reset.call(this); _data = data; _size = data.length; if (Basic.typeOf(options) === 'string' || options.ruid) { _run.call(self, type, this.connectRuntime(options)); } else { // we require this to run only once var cb = function(e, runtime) { self.unbind("RuntimeInit", cb); _run.call(self, type, runtime); }; this.bind("RuntimeInit", cb); this.connectRuntime(options); } }, abort: function() { var self = this; self.state = Transporter.IDLE; if (_runtime) { _runtime.exec.call(self, 'Transporter', 'clear'); self.trigger("TransportingAborted"); } _reset.call(self); }, destroy: function() { this.unbindAll(); _runtime = null; this.disconnectRuntime(); _reset.call(this); } }); function _reset() { _size = _pos = 0; _data = this.result = null; } function _run(type, runtime) { var self = this; _runtime = runtime; //self.unbind("RuntimeInit"); self.bind("TransportingProgress", function(e) { _pos = e.loaded; if (_pos < _size && Basic.inArray(self.state, [Transporter.IDLE, Transporter.DONE]) === -1) { _transport.call(self); } }, 999); self.bind("TransportingComplete", function() { _pos = _size; self.state = Transporter.DONE; _data = null; // clean a bit self.result = _runtime.exec.call(self, 'Transporter', 'getAsBlob', type || ''); }, 999); self.state = Transporter.BUSY; self.trigger("TransportingStarted"); _transport.call(self); } function _transport() { var self = this, chunk, bytesLeft = _size - _pos; if (_chunk_size > bytesLeft) { _chunk_size = bytesLeft; } chunk = Encode.btoa(_data.substr(_pos, _chunk_size)); _runtime.exec.call(self, 'Transporter', 'receive', chunk, _size); } } Transporter.IDLE = 0; Transporter.BUSY = 1; Transporter.DONE = 2; Transporter.prototype = EventTarget.instance; return Transporter; }); // Included from: src/javascript/runtime/flash/xhr/XMLHttpRequest.js /** * XMLHttpRequest.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/xhr/XMLHttpRequest @private */ define("moxie/runtime/flash/xhr/XMLHttpRequest", [ "moxie/runtime/flash/Runtime", "moxie/core/utils/Basic", "moxie/file/Blob", "moxie/file/File", "moxie/file/FileReaderSync", "moxie/xhr/FormData", "moxie/runtime/Transporter" ], function(extensions, Basic, Blob, File, FileReaderSync, FormData, Transporter) { var XMLHttpRequest = { send: function(meta, data) { var target = this, self = target.getRuntime(); function send() { meta.transport = self.mode; self.shimExec.call(target, 'XMLHttpRequest', 'send', meta, data); } function appendBlob(name, blob) { self.shimExec.call(target, 'XMLHttpRequest', 'appendBlob', name, blob.uid); data = null; send(); } function attachBlob(blob, cb) { var tr = new Transporter(); tr.bind("TransportingComplete", function() { cb(this.result); }); tr.transport(blob.getSource(), blob.type, { ruid: self.uid }); } // copy over the headers if any if (!Basic.isEmptyObj(meta.headers)) { Basic.each(meta.headers, function(value, header) { self.shimExec.call(target, 'XMLHttpRequest', 'setRequestHeader', header, value.toString()); // Silverlight doesn't accept integers into the arguments of type object }); } // transfer over multipart params and blob itself if (data instanceof FormData) { var blobField; data.each(function(value, name) { if (value instanceof Blob) { blobField = name; } else { self.shimExec.call(target, 'XMLHttpRequest', 'append', name, value); } }); if (!data.hasBlob()) { data = null; send(); } else { var blob = data.getBlob(); if (blob.isDetached()) { attachBlob(blob, function(attachedBlob) { blob.destroy(); appendBlob(blobField, attachedBlob); }); } else { appendBlob(blobField, blob); } } } else if (data instanceof Blob) { if (data.isDetached()) { attachBlob(data, function(attachedBlob) { data.destroy(); data = attachedBlob.uid; send(); }); } else { data = data.uid; send(); } } else { send(); } }, getResponse: function(responseType) { var frs, blob, self = this.getRuntime(); blob = self.shimExec.call(this, 'XMLHttpRequest', 'getResponseAsBlob'); if (blob) { blob = new File(self.uid, blob); if ('blob' === responseType) { return blob; } try { frs = new FileReaderSync(); if (!!~Basic.inArray(responseType, ["", "text"])) { return frs.readAsText(blob); } else if ('json' === responseType && !!window.JSON) { return JSON.parse(frs.readAsText(blob)); } } finally { blob.destroy(); } } return null; }, abort: function(upload_complete_flag) { var self = this.getRuntime(); self.shimExec.call(this, 'XMLHttpRequest', 'abort'); this.dispatchEvent('readystatechange'); // this.dispatchEvent('progress'); this.dispatchEvent('abort'); //if (!upload_complete_flag) { // this.dispatchEvent('uploadprogress'); //} } }; return (extensions.XMLHttpRequest = XMLHttpRequest); }); // Included from: src/javascript/runtime/html4/Runtime.js /** * Runtime.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /*global File:true */ /** Defines constructor for HTML4 runtime. @class moxie/runtime/html4/Runtime @private */ define("moxie/runtime/html4/Runtime", [ "moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/runtime/Runtime", "moxie/core/utils/Env" ], function(Basic, x, Runtime, Env) { var type = 'html4', extensions = {}; function Html4Runtime(options) { var I = this , Test = Runtime.capTest , True = Runtime.capTrue ; Runtime.call(this, options, type, { access_binary: Test(window.FileReader || window.File && File.getAsDataURL), access_image_binary: false, display_media: Test(extensions.Image && (Env.can('create_canvas') || Env.can('use_data_uri_over32kb'))), do_cors: false, drag_and_drop: false, filter_by_extension: Test(function() { // if you know how to feature-detect this, please suggest return (Env.browser === 'Chrome' && Env.version >= 28) || (Env.browser === 'IE' && Env.version >= 10); }()), resize_image: function() { return extensions.Image && I.can('access_binary') && Env.can('create_canvas'); }, report_upload_progress: false, return_response_headers: false, return_response_type: function(responseType) { if (responseType === 'json' && !!window.JSON) { return true; } return !!~Basic.inArray(responseType, ['text', 'document', '']); }, return_status_code: function(code) { return !Basic.arrayDiff(code, [200, 404]); }, select_file: function() { return Env.can('use_fileinput'); }, select_multiple: false, send_binary_string: false, send_custom_headers: false, send_multipart: true, slice_blob: false, stream_upload: function() { return I.can('select_file'); }, summon_file_dialog: Test(function() { // yeah... some dirty sniffing here... return (Env.browser === 'Firefox' && Env.version >= 4) || (Env.browser === 'Opera' && Env.version >= 12) || !!~Basic.inArray(Env.browser, ['Chrome', 'Safari']); }()), upload_filesize: True, use_http_method: function(methods) { return !Basic.arrayDiff(methods, ['GET', 'POST']); } }); Basic.extend(this, { init : function() { this.trigger("Init"); }, destroy: (function(destroy) { // extend default destroy method return function() { destroy.call(I); destroy = I = null; }; }(this.destroy)) }); Basic.extend(this.getShim(), extensions); } Runtime.addConstructor(type, Html4Runtime); return extensions; }); // Included from: src/javascript/core/utils/Events.js /** * Events.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/utils/Events', [ 'moxie/core/utils/Basic' ], function(Basic) { var eventhash = {}, uid = 'moxie_' + Basic.guid(); // IE W3C like event funcs function preventDefault() { this.returnValue = false; } function stopPropagation() { this.cancelBubble = true; } /** Adds an event handler to the specified object and store reference to the handler in objects internal Plupload registry (@see removeEvent). @method addEvent @for Utils @static @param {Object} obj DOM element like object to add handler to. @param {String} name Name to add event listener to. @param {Function} callback Function to call when event occurs. @param {String} [key] that might be used to add specifity to the event record. */ var addEvent = function(obj, name, callback, key) { var func, events; name = name.toLowerCase(); // Add event listener if (obj.addEventListener) { func = callback; obj.addEventListener(name, func, false); } else if (obj.attachEvent) { func = function() { var evt = window.event; if (!evt.target) { evt.target = evt.srcElement; } evt.preventDefault = preventDefault; evt.stopPropagation = stopPropagation; callback(evt); }; obj.attachEvent('on' + name, func); } // Log event handler to objects internal mOxie registry if (!obj[uid]) { obj[uid] = Basic.guid(); } if (!eventhash.hasOwnProperty(obj[uid])) { eventhash[obj[uid]] = {}; } events = eventhash[obj[uid]]; if (!events.hasOwnProperty(name)) { events[name] = []; } events[name].push({ func: func, orig: callback, // store original callback for IE key: key }); }; /** Remove event handler from the specified object. If third argument (callback) is not specified remove all events with the specified name. @method removeEvent @static @param {Object} obj DOM element to remove event listener(s) from. @param {String} name Name of event listener to remove. @param {Function|String} [callback] might be a callback or unique key to match. */ var removeEvent = function(obj, name, callback) { var type, undef; name = name.toLowerCase(); if (obj[uid] && eventhash[obj[uid]] && eventhash[obj[uid]][name]) { type = eventhash[obj[uid]][name]; } else { return; } for (var i = type.length - 1; i >= 0; i--) { // undefined or not, key should match if (type[i].orig === callback || type[i].key === callback) { if (obj.removeEventListener) { obj.removeEventListener(name, type[i].func, false); } else if (obj.detachEvent) { obj.detachEvent('on'+name, type[i].func); } type[i].orig = null; type[i].func = null; type.splice(i, 1); // If callback was passed we are done here, otherwise proceed if (callback !== undef) { break; } } } // If event array got empty, remove it if (!type.length) { delete eventhash[obj[uid]][name]; } // If mOxie registry has become empty, remove it if (Basic.isEmptyObj(eventhash[obj[uid]])) { delete eventhash[obj[uid]]; // IE doesn't let you remove DOM object property with - delete try { delete obj[uid]; } catch(e) { obj[uid] = undef; } } }; /** Remove all kind of events from the specified object @method removeAllEvents @static @param {Object} obj DOM element to remove event listeners from. @param {String} [key] unique key to match, when removing events. */ var removeAllEvents = function(obj, key) { if (!obj || !obj[uid]) { return; } Basic.each(eventhash[obj[uid]], function(events, name) { removeEvent(obj, name, key); }); }; return { addEvent: addEvent, removeEvent: removeEvent, removeAllEvents: removeAllEvents }; }); // Included from: src/javascript/runtime/html4/file/FileInput.js /** * FileInput.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/html4/file/FileInput @private */ define("moxie/runtime/html4/file/FileInput", [ "moxie/runtime/html4/Runtime", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/utils/Events", "moxie/core/utils/Mime", "moxie/core/utils/Env" ], function(extensions, Basic, Dom, Events, Mime, Env) { function FileInput() { var _uid, _files = [], _mimes = [], _options; function addInput() { var comp = this, I = comp.getRuntime(), shimContainer, browseButton, currForm, form, input, uid; uid = Basic.guid('uid_'); shimContainer = I.getShimContainer(); // we get new ref everytime to avoid memory leaks in IE if (_uid) { // move previous form out of the view currForm = Dom.get(_uid + '_form'); if (currForm) { Basic.extend(currForm.style, { top: '100%' }); } } // build form in DOM, since innerHTML version not able to submit file for some reason form = document.createElement('form'); form.setAttribute('id', uid + '_form'); form.setAttribute('method', 'post'); form.setAttribute('enctype', 'multipart/form-data'); form.setAttribute('encoding', 'multipart/form-data'); Basic.extend(form.style, { overflow: 'hidden', position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }); input = document.createElement('input'); input.setAttribute('id', uid); input.setAttribute('type', 'file'); input.setAttribute('name', _options.name || 'Filedata'); input.setAttribute('accept', _mimes.join(',')); Basic.extend(input.style, { fontSize: '999px', opacity: 0 }); form.appendChild(input); shimContainer.appendChild(form); // prepare file input to be placed underneath the browse_button element Basic.extend(input.style, { position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }); if (Env.browser === 'IE' && Env.version < 10) { Basic.extend(input.style, { filter : "progid:DXImageTransform.Microsoft.Alpha(opacity=0)" }); } input.onchange = function() { // there should be only one handler for this var file; if (!this.value) { return; } if (this.files) { file = this.files[0]; } else { file = { name: this.value }; } _files = [file]; this.onchange = function() {}; // clear event handler addInput.call(comp); // after file is initialized as o.File, we need to update form and input ids comp.bind('change', function onChange() { var input = Dom.get(uid), form = Dom.get(uid + '_form'), file; comp.unbind('change', onChange); if (comp.files.length && input && form) { file = comp.files[0]; input.setAttribute('id', file.uid); form.setAttribute('id', file.uid + '_form'); // set upload target form.setAttribute('target', file.uid + '_iframe'); } input = form = null; }, 998); input = form = null; comp.trigger('change'); }; // route click event to the input if (I.can('summon_file_dialog')) { browseButton = Dom.get(_options.browse_button); Events.removeEvent(browseButton, 'click', comp.uid); Events.addEvent(browseButton, 'click', function(e) { if (input && !input.disabled) { // for some reason FF (up to 8.0.1 so far) lets to click disabled input[type=file] input.click(); } e.preventDefault(); }, comp.uid); } _uid = uid; shimContainer = currForm = browseButton = null; } Basic.extend(this, { init: function(options) { var comp = this, I = comp.getRuntime(), shimContainer; // figure out accept string _options = options; _mimes = options.accept.mimes || Mime.extList2mimes(options.accept, I.can('filter_by_extension')); shimContainer = I.getShimContainer(); (function() { var browseButton, zIndex, top; browseButton = Dom.get(options.browse_button); // Route click event to the input[type=file] element for browsers that support such behavior if (I.can('summon_file_dialog')) { if (Dom.getStyle(browseButton, 'position') === 'static') { browseButton.style.position = 'relative'; } zIndex = parseInt(Dom.getStyle(browseButton, 'z-index'), 10) || 1; browseButton.style.zIndex = zIndex; shimContainer.style.zIndex = zIndex - 1; } /* Since we have to place input[type=file] on top of the browse_button for some browsers, browse_button loses interactivity, so we restore it here */ top = I.can('summon_file_dialog') ? browseButton : shimContainer; Events.addEvent(top, 'mouseover', function() { comp.trigger('mouseenter'); }, comp.uid); Events.addEvent(top, 'mouseout', function() { comp.trigger('mouseleave'); }, comp.uid); Events.addEvent(top, 'mousedown', function() { comp.trigger('mousedown'); }, comp.uid); Events.addEvent(Dom.get(options.container), 'mouseup', function() { comp.trigger('mouseup'); }, comp.uid); browseButton = null; }()); addInput.call(this); shimContainer = null; // trigger ready event asynchronously comp.trigger({ type: 'ready', async: true }); }, getFiles: function() { return _files; }, disable: function(state) { var input; if ((input = Dom.get(_uid))) { input.disabled = !!state; } }, destroy: function() { var I = this.getRuntime() , shim = I.getShim() , shimContainer = I.getShimContainer() ; Events.removeAllEvents(shimContainer, this.uid); Events.removeAllEvents(_options && Dom.get(_options.container), this.uid); Events.removeAllEvents(_options && Dom.get(_options.browse_button), this.uid); if (shimContainer) { shimContainer.innerHTML = ''; } shim.removeInstance(this.uid); _uid = _files = _mimes = _options = shimContainer = shim = null; } }); } return (extensions.FileInput = FileInput); }); // Included from: src/javascript/runtime/html5/Runtime.js /** * Runtime.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /*global File:true */ /** Defines constructor for HTML5 runtime. @class moxie/runtime/html5/Runtime @private */ define("moxie/runtime/html5/Runtime", [ "moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/runtime/Runtime", "moxie/core/utils/Env" ], function(Basic, x, Runtime, Env) { var type = "html5", extensions = {}; function Html5Runtime(options) { var I = this , Test = Runtime.capTest , True = Runtime.capTrue ; var caps = Basic.extend({ access_binary: Test(window.FileReader || window.File && window.File.getAsDataURL), access_image_binary: function() { return I.can('access_binary') && !!extensions.Image; }, display_media: Test(Env.can('create_canvas') || Env.can('use_data_uri_over32kb')), do_cors: Test(window.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest()), drag_and_drop: Test(function() { // this comes directly from Modernizr: http://www.modernizr.com/ var div = document.createElement('div'); // IE has support for drag and drop since version 5, but doesn't support dropping files from desktop return (('draggable' in div) || ('ondragstart' in div && 'ondrop' in div)) && (Env.browser !== 'IE' || Env.version > 9); }()), filter_by_extension: Test(function() { // if you know how to feature-detect this, please suggest return (Env.browser === 'Chrome' && Env.version >= 28) || (Env.browser === 'IE' && Env.version >= 10); }()), return_response_headers: True, return_response_type: function(responseType) { if (responseType === 'json' && !!window.JSON) { // we can fake this one even if it's not supported return true; } return Env.can('return_response_type', responseType); }, return_status_code: True, report_upload_progress: Test(window.XMLHttpRequest && new XMLHttpRequest().upload), resize_image: function() { return I.can('access_binary') && Env.can('create_canvas'); }, select_file: function() { return Env.can('use_fileinput') && window.File; }, select_folder: function() { return I.can('select_file') && Env.browser === 'Chrome' && Env.version >= 21; }, select_multiple: function() { // it is buggy on Safari Windows and iOS return I.can('select_file') && !(Env.browser === 'Safari' && Env.os === 'Windows') && !(Env.os === 'iOS' && Env.verComp(Env.osVersion, "7.0.4", '<')); }, send_binary_string: Test(window.XMLHttpRequest && (new XMLHttpRequest().sendAsBinary || (window.Uint8Array && window.ArrayBuffer))), send_custom_headers: Test(window.XMLHttpRequest), send_multipart: function() { return !!(window.XMLHttpRequest && new XMLHttpRequest().upload && window.FormData) || I.can('send_binary_string'); }, slice_blob: Test(window.File && (File.prototype.mozSlice || File.prototype.webkitSlice || File.prototype.slice)), stream_upload: function(){ return I.can('slice_blob') && I.can('send_multipart'); }, summon_file_dialog: Test(function() { // yeah... some dirty sniffing here... return (Env.browser === 'Firefox' && Env.version >= 4) || (Env.browser === 'Opera' && Env.version >= 12) || (Env.browser === 'IE' && Env.version >= 10) || !!~Basic.inArray(Env.browser, ['Chrome', 'Safari']); }()), upload_filesize: True }, arguments[2] ); Runtime.call(this, options, (arguments[1] || type), caps); Basic.extend(this, { init : function() { this.trigger("Init"); }, destroy: (function(destroy) { // extend default destroy method return function() { destroy.call(I); destroy = I = null; }; }(this.destroy)) }); Basic.extend(this.getShim(), extensions); } Runtime.addConstructor(type, Html5Runtime); return extensions; }); // Included from: src/javascript/runtime/html5/file/FileReader.js /** * FileReader.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/html5/file/FileReader @private */ define("moxie/runtime/html5/file/FileReader", [ "moxie/runtime/html5/Runtime", "moxie/core/utils/Encode", "moxie/core/utils/Basic" ], function(extensions, Encode, Basic) { function FileReader() { var _fr, _convertToBinary = false; Basic.extend(this, { read: function(op, blob) { var target = this; _fr = new window.FileReader(); _fr.addEventListener('progress', function(e) { target.trigger(e); }); _fr.addEventListener('load', function(e) { target.trigger(e); }); _fr.addEventListener('error', function(e) { target.trigger(e, _fr.error); }); _fr.addEventListener('loadend', function() { _fr = null; }); if (Basic.typeOf(_fr[op]) === 'function') { _convertToBinary = false; _fr[op](blob.getSource()); } else if (op === 'readAsBinaryString') { // readAsBinaryString is depricated in general and never existed in IE10+ _convertToBinary = true; _fr.readAsDataURL(blob.getSource()); } }, getResult: function() { return _fr && _fr.result ? (_convertToBinary ? _toBinary(_fr.result) : _fr.result) : null; }, abort: function() { if (_fr) { _fr.abort(); } }, destroy: function() { _fr = null; } }); function _toBinary(str) { return Encode.atob(str.substring(str.indexOf('base64,') + 7)); } } return (extensions.FileReader = FileReader); }); // Included from: src/javascript/runtime/html4/file/FileReader.js /** * FileReader.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/html4/file/FileReader @private */ define("moxie/runtime/html4/file/FileReader", [ "moxie/runtime/html4/Runtime", "moxie/runtime/html5/file/FileReader" ], function(extensions, FileReader) { return (extensions.FileReader = FileReader); }); // Included from: src/javascript/runtime/html4/xhr/XMLHttpRequest.js /** * XMLHttpRequest.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/html4/xhr/XMLHttpRequest @private */ define("moxie/runtime/html4/xhr/XMLHttpRequest", [ "moxie/runtime/html4/Runtime", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/utils/Url", "moxie/core/Exceptions", "moxie/core/utils/Events", "moxie/file/Blob", "moxie/xhr/FormData" ], function(extensions, Basic, Dom, Url, x, Events, Blob, FormData) { function XMLHttpRequest() { var _status, _response, _iframe; function cleanup(cb) { var target = this, uid, form, inputs, i, hasFile = false; if (!_iframe) { return; } uid = _iframe.id.replace(/_iframe$/, ''); form = Dom.get(uid + '_form'); if (form) { inputs = form.getElementsByTagName('input'); i = inputs.length; while (i--) { switch (inputs[i].getAttribute('type')) { case 'hidden': inputs[i].parentNode.removeChild(inputs[i]); break; case 'file': hasFile = true; // flag the case for later break; } } inputs = []; if (!hasFile) { // we need to keep the form for sake of possible retries form.parentNode.removeChild(form); } form = null; } // without timeout, request is marked as canceled (in console) setTimeout(function() { Events.removeEvent(_iframe, 'load', target.uid); if (_iframe.parentNode) { // #382 _iframe.parentNode.removeChild(_iframe); } // check if shim container has any other children, if - not, remove it as well var shimContainer = target.getRuntime().getShimContainer(); if (!shimContainer.children.length) { shimContainer.parentNode.removeChild(shimContainer); } shimContainer = _iframe = null; cb(); }, 1); } Basic.extend(this, { send: function(meta, data) { var target = this, I = target.getRuntime(), uid, form, input, blob; _status = _response = null; function createIframe() { var container = I.getShimContainer() || document.body , temp = document.createElement('div') ; // IE 6 won't be able to set the name using setAttribute or iframe.name temp.innerHTML = '<iframe id="' + uid + '_iframe" name="' + uid + '_iframe" src="javascript:&quot;&quot;" style="display:none"></iframe>'; _iframe = temp.firstChild; container.appendChild(_iframe); /* _iframe.onreadystatechange = function() { console.info(_iframe.readyState); };*/ Events.addEvent(_iframe, 'load', function() { // _iframe.onload doesn't work in IE lte 8 var el; try { el = _iframe.contentWindow.document || _iframe.contentDocument || window.frames[_iframe.id].document; // try to detect some standard error pages if (/^4(0[0-9]|1[0-7]|2[2346])\s/.test(el.title)) { // test if title starts with 4xx HTTP error _status = el.title.replace(/^(\d+).*$/, '$1'); } else { _status = 200; // get result _response = Basic.trim(el.body.innerHTML); // we need to fire these at least once target.trigger({ type: 'progress', loaded: _response.length, total: _response.length }); if (blob) { // if we were uploading a file target.trigger({ type: 'uploadprogress', loaded: blob.size || 1025, total: blob.size || 1025 }); } } } catch (ex) { if (Url.hasSameOrigin(meta.url)) { // if response is sent with error code, iframe in IE gets redirected to res://ieframe.dll/http_x.htm // which obviously results to cross domain error (wtf?) _status = 404; } else { cleanup.call(target, function() { target.trigger('error'); }); return; } } cleanup.call(target, function() { target.trigger('load'); }); }, target.uid); } // end createIframe // prepare data to be sent and convert if required if (data instanceof FormData && data.hasBlob()) { blob = data.getBlob(); uid = blob.uid; input = Dom.get(uid); form = Dom.get(uid + '_form'); if (!form) { throw new x.DOMException(x.DOMException.NOT_FOUND_ERR); } } else { uid = Basic.guid('uid_'); form = document.createElement('form'); form.setAttribute('id', uid + '_form'); form.setAttribute('method', meta.method); form.setAttribute('enctype', 'multipart/form-data'); form.setAttribute('encoding', 'multipart/form-data'); form.setAttribute('target', uid + '_iframe'); I.getShimContainer().appendChild(form); } if (data instanceof FormData) { data.each(function(value, name) { if (value instanceof Blob) { if (input) { input.setAttribute('name', name); } } else { var hidden = document.createElement('input'); Basic.extend(hidden, { type : 'hidden', name : name, value : value }); // make sure that input[type="file"], if it's there, comes last if (input) { form.insertBefore(hidden, input); } else { form.appendChild(hidden); } } }); } // set destination url form.setAttribute("action", meta.url); createIframe(); form.submit(); target.trigger('loadstart'); }, getStatus: function() { return _status; }, getResponse: function(responseType) { if ('json' === responseType) { // strip off <pre>..</pre> tags that might be enclosing the response if (Basic.typeOf(_response) === 'string' && !!window.JSON) { try { return JSON.parse(_response.replace(/^\s*<pre[^>]*>/, '').replace(/<\/pre>\s*$/, '')); } catch (ex) { return null; } } } else if ('document' === responseType) { } return _response; }, abort: function() { var target = this; if (_iframe && _iframe.contentWindow) { if (_iframe.contentWindow.stop) { // FireFox/Safari/Chrome _iframe.contentWindow.stop(); } else if (_iframe.contentWindow.document.execCommand) { // IE _iframe.contentWindow.document.execCommand('Stop'); } else { _iframe.src = "about:blank"; } } cleanup.call(this, function() { // target.dispatchEvent('readystatechange'); target.dispatchEvent('abort'); }); } }); } return (extensions.XMLHttpRequest = XMLHttpRequest); }); // Included from: src/javascript/runtime/silverlight/Runtime.js /** * RunTime.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /*global ActiveXObject:true */ /** Defines constructor for Silverlight runtime. @class moxie/runtime/silverlight/Runtime @private */ define("moxie/runtime/silverlight/Runtime", [ "moxie/core/utils/Basic", "moxie/core/utils/Env", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/runtime/Runtime" ], function(Basic, Env, Dom, x, Runtime) { var type = "silverlight", extensions = {}; function isInstalled(version) { var isVersionSupported = false, control = null, actualVer, actualVerArray, reqVerArray, requiredVersionPart, actualVersionPart, index = 0; try { try { control = new ActiveXObject('AgControl.AgControl'); if (control.IsVersionSupported(version)) { isVersionSupported = true; } control = null; } catch (e) { var plugin = navigator.plugins["Silverlight Plug-In"]; if (plugin) { actualVer = plugin.description; if (actualVer === "1.0.30226.2") { actualVer = "2.0.30226.2"; } actualVerArray = actualVer.split("."); while (actualVerArray.length > 3) { actualVerArray.pop(); } while ( actualVerArray.length < 4) { actualVerArray.push(0); } reqVerArray = version.split("."); while (reqVerArray.length > 4) { reqVerArray.pop(); } do { requiredVersionPart = parseInt(reqVerArray[index], 10); actualVersionPart = parseInt(actualVerArray[index], 10); index++; } while (index < reqVerArray.length && requiredVersionPart === actualVersionPart); if (requiredVersionPart <= actualVersionPart && !isNaN(requiredVersionPart)) { isVersionSupported = true; } } } } catch (e2) { isVersionSupported = false; } return isVersionSupported; } /** Constructor for the Silverlight Runtime @class SilverlightRuntime @extends Runtime */ function SilverlightRuntime(options) { var I = this, initTimer; options = Basic.extend({ xap_url: Env.xap_url }, options); Runtime.call(this, options, type, { access_binary: Runtime.capTrue, access_image_binary: Runtime.capTrue, display_media: Runtime.capTrue, do_cors: Runtime.capTrue, drag_and_drop: false, report_upload_progress: Runtime.capTrue, resize_image: Runtime.capTrue, return_response_headers: function(value) { return value && I.mode === 'client'; }, return_response_type: function(responseType) { if (responseType !== 'json') { return true; } else { return !!window.JSON; } }, return_status_code: function(code) { return I.mode === 'client' || !Basic.arrayDiff(code, [200, 404]); }, select_file: Runtime.capTrue, select_multiple: Runtime.capTrue, send_binary_string: Runtime.capTrue, send_browser_cookies: function(value) { return value && I.mode === 'browser'; }, send_custom_headers: function(value) { return value && I.mode === 'client'; }, send_multipart: Runtime.capTrue, slice_blob: Runtime.capTrue, stream_upload: true, summon_file_dialog: false, upload_filesize: Runtime.capTrue, use_http_method: function(methods) { return I.mode === 'client' || !Basic.arrayDiff(methods, ['GET', 'POST']); } }, { // capabilities that require specific mode return_response_headers: function(value) { return value ? 'client' : 'browser'; }, return_status_code: function(code) { return Basic.arrayDiff(code, [200, 404]) ? 'client' : ['client', 'browser']; }, send_browser_cookies: function(value) { return value ? 'browser' : 'client'; }, send_custom_headers: function(value) { return value ? 'client' : 'browser'; }, use_http_method: function(methods) { return Basic.arrayDiff(methods, ['GET', 'POST']) ? 'client' : ['client', 'browser']; } }); // minimal requirement if (!isInstalled('2.0.31005.0') || Env.browser === 'Opera') { this.mode = false; } Basic.extend(this, { getShim: function() { return Dom.get(this.uid).content.Moxie; }, shimExec: function(component, action) { var args = [].slice.call(arguments, 2); return I.getShim().exec(this.uid, component, action, args); }, init : function() { var container; container = this.getShimContainer(); container.innerHTML = '<object id="' + this.uid + '" data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%" style="outline:none;">' + '<param name="source" value="' + options.xap_url + '"/>' + '<param name="background" value="Transparent"/>' + '<param name="windowless" value="true"/>' + '<param name="enablehtmlaccess" value="true"/>' + '<param name="initParams" value="uid=' + this.uid + ',target=' + Env.global_event_dispatcher + '"/>' + '</object>'; // Init is dispatched by the shim initTimer = setTimeout(function() { if (I && !I.initialized) { // runtime might be already destroyed by this moment I.trigger("Error", new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR)); } }, Env.OS !== 'Windows'? 10000 : 5000); // give it more time to initialize in non Windows OS (like Mac) }, destroy: (function(destroy) { // extend default destroy method return function() { destroy.call(I); clearTimeout(initTimer); // initialization check might be still onwait options = initTimer = destroy = I = null; }; }(this.destroy)) }, extensions); } Runtime.addConstructor(type, SilverlightRuntime); return extensions; }); // Included from: src/javascript/runtime/silverlight/file/Blob.js /** * Blob.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/silverlight/file/Blob @private */ define("moxie/runtime/silverlight/file/Blob", [ "moxie/runtime/silverlight/Runtime", "moxie/core/utils/Basic", "moxie/runtime/flash/file/Blob" ], function(extensions, Basic, Blob) { return (extensions.Blob = Basic.extend({}, Blob)); }); // Included from: src/javascript/runtime/silverlight/file/FileInput.js /** * FileInput.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/silverlight/file/FileInput @private */ define("moxie/runtime/silverlight/file/FileInput", [ "moxie/runtime/silverlight/Runtime" ], function(extensions) { var FileInput = { init: function(options) { function toFilters(accept) { var filter = ''; for (var i = 0; i < accept.length; i++) { filter += (filter !== '' ? '|' : '') + accept[i].title + " | *." + accept[i].extensions.replace(/,/g, ';*.'); } return filter; } this.getRuntime().shimExec.call(this, 'FileInput', 'init', toFilters(options.accept), options.name, options.multiple); this.trigger('ready'); } }; return (extensions.FileInput = FileInput); }); // Included from: src/javascript/runtime/silverlight/file/FileReader.js /** * FileReader.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/silverlight/file/FileReader @private */ define("moxie/runtime/silverlight/file/FileReader", [ "moxie/runtime/silverlight/Runtime", "moxie/core/utils/Basic", "moxie/runtime/flash/file/FileReader" ], function(extensions, Basic, FileReader) { return (extensions.FileReader = Basic.extend({}, FileReader)); }); // Included from: src/javascript/runtime/silverlight/file/FileReaderSync.js /** * FileReaderSync.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/silverlight/file/FileReaderSync @private */ define("moxie/runtime/silverlight/file/FileReaderSync", [ "moxie/runtime/silverlight/Runtime", "moxie/core/utils/Basic", "moxie/runtime/flash/file/FileReaderSync" ], function(extensions, Basic, FileReaderSync) { return (extensions.FileReaderSync = Basic.extend({}, FileReaderSync)); }); // Included from: src/javascript/runtime/silverlight/xhr/XMLHttpRequest.js /** * XMLHttpRequest.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/silverlight/xhr/XMLHttpRequest @private */ define("moxie/runtime/silverlight/xhr/XMLHttpRequest", [ "moxie/runtime/silverlight/Runtime", "moxie/core/utils/Basic", "moxie/runtime/flash/xhr/XMLHttpRequest" ], function(extensions, Basic, XMLHttpRequest) { return (extensions.XMLHttpRequest = Basic.extend({}, XMLHttpRequest)); }); expose(["moxie/core/utils/Basic","moxie/core/I18n","moxie/core/utils/Mime","moxie/core/utils/Env","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/EventTarget","moxie/core/utils/Encode","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/file/Blob","moxie/file/File","moxie/file/FileInput","moxie/runtime/RuntimeTarget","moxie/file/FileReader","moxie/core/utils/Url","moxie/file/FileReaderSync","moxie/xhr/FormData","moxie/xhr/XMLHttpRequest","moxie/runtime/Transporter","moxie/core/utils/Events"]); })(this);/** * o.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /*global moxie:true */ /** Globally exposed namespace with the most frequently used public classes and handy methods. @class o @static @private */ (function(exports) { "use strict"; var o = {}, inArray = exports.moxie.core.utils.Basic.inArray; // directly add some public classes // (we do it dynamically here, since for custom builds we cannot know beforehand what modules were included) (function addAlias(ns) { var name, itemType; for (name in ns) { itemType = typeof(ns[name]); if (itemType === 'object' && !~inArray(name, ['Exceptions', 'Env', 'Mime'])) { addAlias(ns[name]); } else if (itemType === 'function') { o[name] = ns[name]; } } })(exports.moxie); // add some manually o.Env = exports.moxie.core.utils.Env; o.Mime = exports.moxie.core.utils.Mime; o.Exceptions = exports.moxie.core.Exceptions; // expose globally exports.mOxie = o; if (!exports.o) { exports.o = o; } return o; })(this); ;webshim.register('filereader', function($, webshim, window, document, undefined, featureOptions){ "use strict"; var mOxie, moxie, hasXDomain; var FormData = $.noop; var sel = 'input[type="file"].ws-filereader'; var loadMoxie = function (){ webshim.loader.loadList(['moxie']); }; var _createFilePicker = function(){ var $input, picker, $parent, onReset; var input = this; if(webshim.implement(input, 'filepicker')){ input = this; $input = $(this); $parent = $input.parent(); onReset = function(){ if(!input.value){ $input.prop('value', ''); } }; $input.attr('tabindex', '-1').on('mousedown.filereaderwaiting click.filereaderwaiting', false); $parent.addClass('ws-loading'); picker = new mOxie.FileInput({ browse_button: this, accept: $.prop(this, 'accept'), multiple: $.prop(this, 'multiple') }); $input.jProp('form').on('reset', function(){ setTimeout(onReset); }); picker.onready = function(){ $input.off('.fileraderwaiting'); $parent.removeClass('ws-waiting'); }; picker.onchange = function(e){ webshim.data(input, 'fileList', e.target.files); $input.trigger('change'); }; picker.onmouseenter = function(){ $input.trigger('mouseover'); $parent.addClass('ws-mouseenter'); }; picker.onmouseleave = function(){ $input.trigger('mouseout'); $parent.removeClass('ws-mouseenter'); }; picker.onmousedown = function(){ $input.trigger('mousedown'); $parent.addClass('ws-active'); }; picker.onmouseup = function(){ $input.trigger('mouseup'); $parent.removeClass('ws-active'); }; webshim.data(input, 'filePicker', picker); webshim.ready('WINDOWLOAD', function(){ var lastWidth; $input.onWSOff('updateshadowdom', function(){ var curWitdth = input.offsetWidth; if(curWitdth && lastWidth != curWitdth){ lastWidth = curWitdth; picker.refresh(); } }); }); webshim.addShadowDom(); picker.init(); if(input.disabled){ picker.disable(true); } } }; var getFileNames = function(file){ return file.name; }; var createFilePicker = function(){ var elem = this; loadMoxie(); $(elem) .on('mousedown.filereaderwaiting click.filereaderwaiting', false) .parent() .addClass('ws-loading') ; webshim.ready('moxie', function(){ createFilePicker.call(elem); }); }; var noxhr = /^(?:script|jsonp)$/i; var notReadyYet = function(){ loadMoxie(); webshim.error('filereader/formdata not ready yet. please wait for moxie to load `webshim.ready("moxie", callbackFn);`` or wait for the first change event on input[type="file"].ws-filereader.') }; var inputValueDesc = webshim.defineNodeNameProperty('input', 'value', { prop: { get: function(){ var fileList = webshim.data(this, 'fileList'); if(fileList && fileList.map){ return fileList.map(getFileNames).join(', '); } return inputValueDesc.prop._supget.call(this); } } } ); var shimMoxiePath = webshim.cfg.basePath+'moxie/'; var crossXMLMessage = 'You nedd a crossdomain.xml to get all "filereader" / "XHR2" / "CORS" features to work. Or host moxie.swf/moxie.xap on your server an configure filereader options: "swfpath"/"xappath"'; var testMoxie = function(options){ return (options.wsType == 'moxie' || (options.data && options.data instanceof mOxie.FormData) || (options.crossDomain && $.support.cors !== false && hasXDomain != 'no' && !noxhr.test(options.dataType || ''))); }; var createMoxieTransport = function (options){ if(testMoxie(options)){ var ajax; webshim.info('moxie transfer used for $.ajax'); if(hasXDomain == 'no'){ webshim.error(crossXMLMessage); } return { send: function( headers, completeCallback ) { var proressEvent = function(obj, name){ if(options[name]){ var called = false; ajax.addEventListener('load', function(e){ if(!called){ options[name]({type: 'progress', lengthComputable: true, total: 1, loaded: 1}); } else if(called.lengthComputable && called.total > called.loaded){ options[name]({type: 'progress', lengthComputable: true, total: called.total, loaded: called.total}); } }); obj.addEventListener('progress', function(e){ called = e; options[name](e); }); } }; ajax = new moxie.xhr.XMLHttpRequest(); ajax.open(options.type, options.url, options.async, options.username, options.password); proressEvent(ajax.upload, featureOptions.uploadprogress); proressEvent(ajax.upload, featureOptions.progress); ajax.addEventListener('load', function(e){ var responses = { text: ajax.responseText, xml: ajax.responseXML }; completeCallback(ajax.status, ajax.statusText, responses, ajax.getAllResponseHeaders()); }); if(options.xhrFields && options.xhrFields.withCredentials){ ajax.withCredentials = true; } if(options.timeout){ ajax.timeout = options.timeout; } $.each(headers, function(name, value){ ajax.setRequestHeader(name, value); }); ajax.send(options.data); }, abort: function() { if(ajax){ ajax.abort(); } } }; } }; var transports = { //based on script: https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest xdomain: (function(){ var httpRegEx = /^https?:\/\//i; var getOrPostRegEx = /^get|post$/i; var sameSchemeRegEx = new RegExp('^'+location.protocol, 'i'); return function(options, userOptions, jqXHR) { // Only continue if the request is: asynchronous, uses GET or POST method, has HTTP or HTTPS protocol, and has the same scheme as the calling page if (!options.crossDomain || options.username || (options.xhrFields && options.xhrFields.withCredentials) || !options.async || !getOrPostRegEx.test(options.type) || !httpRegEx.test(options.url) || !sameSchemeRegEx.test(options.url) || (options.data && options.data instanceof mOxie.FormData) || noxhr.test(options.dataType || '')) { return; } var xdr = null; webshim.info('xdomain transport used.'); return { send: function(headers, complete) { var postData = ''; var userType = (userOptions.dataType || '').toLowerCase(); xdr = new XDomainRequest(); if (/^\d+$/.test(userOptions.timeout)) { xdr.timeout = userOptions.timeout; } xdr.ontimeout = function() { complete(500, 'timeout'); }; xdr.onload = function() { var allResponseHeaders = 'Content-Length: ' + xdr.responseText.length + '\r\nContent-Type: ' + xdr.contentType; var status = { code: xdr.status || 200, message: xdr.statusText || 'OK' }; var responses = { text: xdr.responseText, xml: xdr.responseXML }; try { if (userType === 'html' || /text\/html/i.test(xdr.contentType)) { responses.html = xdr.responseText; } else if (userType === 'json' || (userType !== 'text' && /\/json/i.test(xdr.contentType))) { try { responses.json = $.parseJSON(xdr.responseText); } catch(e) { } } else if (userType === 'xml' && !xdr.responseXML) { var doc; try { doc = new ActiveXObject('Microsoft.XMLDOM'); doc.async = false; doc.loadXML(xdr.responseText); } catch(e) { } responses.xml = doc; } } catch(parseMessage) {} complete(status.code, status.message, responses, allResponseHeaders); }; // set an empty handler for 'onprogress' so requests don't get aborted xdr.onprogress = function(){}; xdr.onerror = function() { complete(500, 'error', { text: xdr.responseText }); }; if (userOptions.data) { postData = ($.type(userOptions.data) === 'string') ? userOptions.data : $.param(userOptions.data); } xdr.open(options.type, options.url); xdr.send(postData); }, abort: function() { if (xdr) { xdr.abort(); } } }; }; })(), moxie: function (options, originalOptions, jqXHR){ if(testMoxie(options)){ loadMoxie(options); var ajax; var tmpTransport = { send: function( headers, completeCallback ) { ajax = true; webshim.ready('moxie', function(){ if(ajax){ ajax = createMoxieTransport(options, originalOptions, jqXHR); tmpTransport.send = ajax.send; tmpTransport.abort = ajax.abort; ajax.send(headers, completeCallback); } }); }, abort: function() { ajax = false; } }; return tmpTransport; } } }; if(!featureOptions.progress){ featureOptions.progress = 'onprogress'; } if(!featureOptions.uploadprogress){ featureOptions.uploadprogress = 'onuploadprogress'; } if(!featureOptions.swfpath){ featureOptions.swfpath = shimMoxiePath+'flash/Moxie.min.swf'; } if(!featureOptions.xappath){ featureOptions.xappath = shimMoxiePath+'silverlight/Moxie.min.xap'; } if($.support.cors !== false || !window.XDomainRequest){ delete transports.xdomain; } $.ajaxTransport("+*", function( options, originalOptions, jqXHR ) { var ajax, type; if(options.wsType || transports[transports]){ ajax = transports[transports](options, originalOptions, jqXHR); } if(!ajax){ for(type in transports){ ajax = transports[type](options, originalOptions, jqXHR); if(ajax){break;} } } return ajax; }); webshim.defineNodeNameProperty('input', 'files', { prop: { writeable: false, get: function(){ if(this.type != 'file'){return null;} if(!$(this).hasClass('ws-filereader')){ webshim.info("please add the 'ws-filereader' class to your input[type='file'] to implement files-property"); } return webshim.data(this, 'fileList') || []; } } } ); webshim.reflectProperties(['input'], ['accept']); if($('<input />').prop('multiple') == null){ webshim.defineNodeNamesBooleanProperty(['input'], ['multiple']); } webshim.onNodeNamesPropertyModify('input', 'disabled', function(value, boolVal, type){ var picker = webshim.data(this, 'filePicker'); if(picker){ picker.disable(boolVal); } }); webshim.onNodeNamesPropertyModify('input', 'value', function(value, boolVal, type){ if(value === '' && this.type == 'file' && $(this).hasClass('ws-filereader')){ webshim.data(this, 'fileList', []); } }); window.FileReader = notReadyYet; window.FormData = notReadyYet; webshim.ready('moxie', function(){ var wsMimes = 'application/xml,xml'; moxie = window.moxie; mOxie = window.mOxie; mOxie.Env.swf_url = featureOptions.swfpath; mOxie.Env.xap_url = featureOptions.xappath; window.FileReader = mOxie.FileReader; window.FormData = function(form){ var appendData, i, len, files, fileI, fileLen, inputName; var moxieData = new mOxie.FormData(); if(form && $.nodeName(form, 'form')){ appendData = $(form).serializeArray(); for(i = 0; i < appendData.length; i++){ if(Array.isArray(appendData[i].value)){ appendData[i].value.forEach(function(val){ moxieData.append(appendData[i].name, val); }); } else { moxieData.append(appendData[i].name, appendData[i].value); } } appendData = form.querySelectorAll('input[type="file"][name]'); for(i = 0, len = appendData.length; i < appendData.length; i++){ inputName = appendData[i].name; if(inputName && !$(appendData[i]).is(':disabled')){ files = $.prop(appendData[i], 'files') || []; if(files.length){ if(files.length > 1 || (moxieData.hasBlob && moxieData.hasBlob())){ webshim.error('FormData shim can only handle one file per ajax. Use multiple ajax request. One per file.'); } for(fileI = 0, fileLen = files.length; fileI < fileLen; fileI++){ moxieData.append(inputName, files[fileI]); } } } } } return moxieData; }; FormData = window.FormData; createFilePicker = _createFilePicker; transports.moxie = createMoxieTransport; featureOptions.mimeTypes = (featureOptions.mimeTypes) ? wsMimes+','+featureOptions.mimeTypes : wsMimes; try { mOxie.Mime.addMimeType(featureOptions.mimeTypes); } catch(e){ webshim.warn('mimetype to moxie error: '+e); } }); webshim.addReady(function(context, contextElem){ $(context.querySelectorAll(sel)).add(contextElem.filter(sel)).each(createFilePicker); }); webshim.ready('WINDOWLOAD', loadMoxie); if(webshim.cfg.debug !== false && featureOptions.swfpath.indexOf((location.protocol+'//'+location.hostname)) && featureOptions.swfpath.indexOf(('https://'+location.hostname))){ webshim.ready('WINDOWLOAD', function(){ var printMessage = function(){ if(hasXDomain == 'no'){ webshim.error(crossXMLMessage); } }; try { hasXDomain = sessionStorage.getItem('wsXdomain.xml'); } catch(e){} printMessage(); if(hasXDomain == null){ $.ajax({ url: 'crossdomain.xml', type: 'HEAD', dataType: 'xml', success: function(){ hasXDomain = 'yes'; }, error: function(){ hasXDomain = 'no'; }, complete: function(){ try { sessionStorage.setItem('wsXdomain.xml', hasXDomain); } catch(e){} printMessage(); } }); } }); } });
ajax/libs/intl-tel-input/6.4.0/js/intlTelInput.js
dada0423/cdnjs
/* International Telephone Input v6.4.0 https://github.com/Bluefieldscom/intl-tel-input.git */ // wrap in UMD - see https://github.com/umdjs/umd/blob/master/jqueryPluginCommonjs.js (function(factory) { if (typeof define === "function" && define.amd) { define([ "jquery" ], function($) { factory($, window, document); }); } else if (typeof module === "object" && module.exports) { module.exports = factory(require("jquery"), window, document); } else { factory(jQuery, window, document); } })(function($, window, document, undefined) { "use strict"; // these vars persist through all instances of the plugin var pluginName = "intlTelInput", id = 1, // give each instance it's own id for namespaced event handling defaults = { // typing digits after a valid number will be added to the extension part of the number allowExtensions: false, // automatically format the number according to the selected country autoFormat: true, // if there is just a dial code in the input: remove it on blur, and re-add it on focus autoHideDialCode: true, // add or remove input placeholder with an example number for the selected country autoPlaceholder: true, // default country defaultCountry: "", // append menu to a specific element dropdownContainer: false, // don't display these countries excludeCountries: [], // geoIp lookup function geoIpLookup: null, // don't insert international dial codes nationalMode: true, // number type to use for placeholders numberType: "MOBILE", // display only these countries onlyCountries: [], // the countries at the top of the list. defaults to united states and united kingdom preferredCountries: [ "us", "gb" ], // specify the path to the libphonenumber script to enable validation/formatting utilsScript: "" }, keys = { UP: 38, DOWN: 40, ENTER: 13, ESC: 27, PLUS: 43, A: 65, Z: 90, ZERO: 48, NINE: 57, SPACE: 32, BSPACE: 8, TAB: 9, DEL: 46, CTRL: 17, CMD1: 91, // Chrome CMD2: 224 }, windowLoaded = false; // keep track of if the window.load event has fired as impossible to check after the fact $(window).load(function() { windowLoaded = true; }); function Plugin(element, options) { this.element = element; this.options = $.extend({}, defaults, options); this._defaults = defaults; // event namespace this.ns = "." + pluginName + id++; // Chrome, FF, Safari, IE9+ this.isGoodBrowser = Boolean(element.setSelectionRange); this.hadInitialPlaceholder = Boolean($(element).attr("placeholder")); this._name = pluginName; } Plugin.prototype = { _init: function() { // if in nationalMode, disable options relating to dial codes if (this.options.nationalMode) { this.options.autoHideDialCode = false; } // IE Mobile doesn't support the keypress event (see issue 68) which makes autoFormat impossible if (navigator.userAgent.match(/IEMobile/i)) { this.options.autoFormat = false; } // we cannot just test screen size as some smartphones/website meta tags will report desktop resolutions // Note: for some reason jasmine fucks up if you put this in the main Plugin function with the rest of these declarations // Note: to target Android Mobiles (and not Tablets), we must find "Android" and "Mobile" this.isMobile = /Android.+Mobile|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); // we return these deferred objects from the _init() call so they can be watched, and then we resolve them when each specific request returns // Note: again, jasmine had a spazz when I put these in the Plugin function this.autoCountryDeferred = new $.Deferred(); this.utilsScriptDeferred = new $.Deferred(); // process all the data: onlyCountries, excludeCountries, preferredCountries etc this._processCountryData(); // generate the markup this._generateMarkup(); // set the initial state of the input value and the selected flag this._setInitialState(); // start all of the event listeners: autoHideDialCode, input keydown, selectedFlag click this._initListeners(); // utils script, and auto country this._initRequests(); // return the deferreds return [ this.autoCountryDeferred, this.utilsScriptDeferred ]; }, /******************** * PRIVATE METHODS ********************/ // prepare all of the country data, including onlyCountries, excludeCountries and preferredCountries options _processCountryData: function() { // set the instances country data objects this._setInstanceCountryData(); // set the preferredCountries property this._setPreferredCountries(); }, // add a country code to this.countryCodes _addCountryCode: function(iso2, dialCode, priority) { if (!(dialCode in this.countryCodes)) { this.countryCodes[dialCode] = []; } var index = priority || 0; this.countryCodes[dialCode][index] = iso2; }, // process countries processCountries: function(countryArray, processFunc) { var i; // standardise case for (i = 0; i < countryArray.length; i++) { countryArray[i] = countryArray[i].toLowerCase(); } // build instance country array this.countries = []; for (i = 0; i < allCountries.length; i++) { if (processFunc($.inArray(allCountries[i].iso2, countryArray))) { this.countries.push(allCountries[i]); } } }, // process onlyCountries or excludeCountries array if present, and generate the countryCodes map _setInstanceCountryData: function() { // process onlyCountries option if (this.options.onlyCountries.length) { this.processCountries(this.options.onlyCountries, function(inArray) { // if country is in array return inArray != -1; }); } else if (this.options.excludeCountries.length) { this.processCountries(this.options.excludeCountries, function(inArray) { // if country is not in array return inArray == -1; }); } else { this.countries = allCountries; } // generate countryCodes map this.countryCodes = {}; for (var i = 0; i < this.countries.length; i++) { var c = this.countries[i]; this._addCountryCode(c.iso2, c.dialCode, c.priority); // area codes if (c.areaCodes) { for (var j = 0; j < c.areaCodes.length; j++) { // full dial code is country code + dial code this._addCountryCode(c.iso2, c.dialCode + c.areaCodes[j]); } } } }, // process preferred countries - iterate through the preferences, // fetching the country data for each one _setPreferredCountries: function() { this.preferredCountries = []; for (var i = 0; i < this.options.preferredCountries.length; i++) { var countryCode = this.options.preferredCountries[i].toLowerCase(), countryData = this._getCountryData(countryCode, false, true); if (countryData) { this.preferredCountries.push(countryData); } } }, // generate all of the markup for the plugin: the selected flag overlay, and the dropdown _generateMarkup: function() { // telephone input this.telInput = $(this.element); // prevent autocomplete as there's no safe, cross-browser event we can react to, so it can easily put the plugin in an inconsistent state e.g. the wrong flag selected for the autocompleted number, which on submit could mean the wrong number is saved (esp in nationalMode) this.telInput.attr("autocomplete", "off"); // containers (mostly for positioning) this.telInput.wrap($("<div>", { "class": "intl-tel-input" })); this.flagsContainer = $("<div>", { "class": "flag-container" }).insertBefore(this.telInput); // currently selected flag (displayed to left of input) var selectedFlag = $("<div>", { // make element focusable and tab naviagable tabindex: "0", "class": "selected-flag" }).appendTo(this.flagsContainer); this.selectedFlagInner = $("<div>", { "class": "iti-flag" }).appendTo(selectedFlag); // CSS triangle $("<div>", { "class": "arrow" }).appendTo(selectedFlag); // country list // mobile is just a native select element // desktop is a proper list containing: preferred countries, then divider, then all countries if (this.isMobile) { this.countryList = $("<select>", { "class": "iti-mobile-select" }).appendTo(this.flagsContainer); } else { this.countryList = $("<ul>", { "class": "country-list hide" }); if (this.preferredCountries.length && !this.isMobile) { this._appendListItems(this.preferredCountries, "preferred"); $("<li>", { "class": "divider" }).appendTo(this.countryList); } } this._appendListItems(this.countries, ""); if (!this.isMobile) { // this is useful in lots of places this.countryListItems = this.countryList.children(".country"); // create dropdownContainer markup if (this.options.dropdownContainer) { this.dropdown = $("<div>", { "class": "intl-tel-input iti-container" }).append(this.countryList); } else { this.countryList.appendTo(this.flagsContainer); } } }, // add a country <li> to the countryList <ul> container // UPDATE: if isMobile, add an <option> to the countryList <select> container _appendListItems: function(countries, className) { // we create so many DOM elements, it is faster to build a temp string // and then add everything to the DOM in one go at the end var tmp = ""; // for each country for (var i = 0; i < countries.length; i++) { var c = countries[i]; if (this.isMobile) { tmp += "<option data-dial-code='" + c.dialCode + "' value='" + c.iso2 + "'>"; tmp += c.name + " +" + c.dialCode; tmp += "</option>"; } else { // open the list item tmp += "<li class='country " + className + "' data-dial-code='" + c.dialCode + "' data-country-code='" + c.iso2 + "'>"; // add the flag tmp += "<div class='flag'><div class='iti-flag " + c.iso2 + "'></div></div>"; // and the country name and dial code tmp += "<span class='country-name'>" + c.name + "</span>"; tmp += "<span class='dial-code'>+" + c.dialCode + "</span>"; // close the list item tmp += "</li>"; } } this.countryList.append(tmp); }, // set the initial state of the input value and the selected flag _setInitialState: function() { var val = this.telInput.val(); // if there is a number, and it's valid, we can go ahead and set the flag, else fall back to default if (this._getDialCode(val)) { this._updateFlagFromNumber(val, true); } else if (this.options.defaultCountry != "auto") { // check the defaultCountry option, else fall back to the first in the list if (this.options.defaultCountry) { this.options.defaultCountry = this._getCountryData(this.options.defaultCountry.toLowerCase(), false, false); } else { this.options.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0] : this.countries[0]; } this._selectFlag(this.options.defaultCountry.iso2); // if empty, insert the default dial code (this function will check !nationalMode and !autoHideDialCode) if (!val) { this._updateDialCode(this.options.defaultCountry.dialCode, false); } } // format if (val) { // this wont be run after _updateDialCode as that's only called if no val this._updateVal(val); } }, // initialise the main event listeners: input keyup, and click selected flag _initListeners: function() { var that = this; this._initKeyListeners(); // autoFormat prevents the change event from firing, so we need to check for changes between focus and blur in order to manually trigger it if (this.options.autoHideDialCode || this.options.autoFormat) { this._initFocusListeners(); } if (this.isMobile) { this.countryList.on("change" + this.ns, function(e) { that._selectListItem($(this).find("option:selected")); }); } else { // hack for input nested inside label: clicking the selected-flag to open the dropdown would then automatically trigger a 2nd click on the input which would close it again var label = this.telInput.closest("label"); if (label.length) { label.on("click" + this.ns, function(e) { // if the dropdown is closed, then focus the input, else ignore the click if (that.countryList.hasClass("hide")) { that.telInput.focus(); } else { e.preventDefault(); } }); } // toggle country dropdown on click var selectedFlag = this.selectedFlagInner.parent(); selectedFlag.on("click" + this.ns, function(e) { // only intercept this event if we're opening the dropdown // else let it bubble up to the top ("click-off-to-close" listener) // we cannot just stopPropagation as it may be needed to close another instance if (that.countryList.hasClass("hide") && !that.telInput.prop("disabled") && !that.telInput.prop("readonly")) { that._showDropdown(); } }); } // open dropdown list if currently focused this.flagsContainer.on("keydown" + that.ns, function(e) { var isDropdownHidden = that.countryList.hasClass("hide"); if (isDropdownHidden && (e.which == keys.UP || e.which == keys.DOWN || e.which == keys.SPACE || e.which == keys.ENTER)) { // prevent form from being submitted if "ENTER" was pressed e.preventDefault(); // prevent event from being handled again by document e.stopPropagation(); that._showDropdown(); } // allow navigation from dropdown to input on TAB if (e.which == keys.TAB) { that._closeDropdown(); } }); }, _initRequests: function() { var that = this; // if the user has specified the path to the utils script, fetch it on window.load if (this.options.utilsScript) { // if the plugin is being initialised after the window.load event has already been fired if (windowLoaded) { this.loadUtils(); } else { // wait until the load event so we don't block any other requests e.g. the flags image $(window).load(function() { that.loadUtils(); }); } } else { this.utilsScriptDeferred.resolve(); } if (this.options.defaultCountry == "auto") { this._loadAutoCountry(); } else { this.autoCountryDeferred.resolve(); } }, _loadAutoCountry: function() { var that = this; // check for cookie var cookieAutoCountry = $.cookie ? $.cookie("itiAutoCountry") : ""; if (cookieAutoCountry) { $.fn[pluginName].autoCountry = cookieAutoCountry; } // 3 options: // 1) already loaded (we're done) // 2) not already started loading (start) // 3) already started loading (do nothing - just wait for loading callback to fire) if ($.fn[pluginName].autoCountry) { this.autoCountryLoaded(); } else if (!$.fn[pluginName].startedLoadingAutoCountry) { // don't do this twice! $.fn[pluginName].startedLoadingAutoCountry = true; if (typeof this.options.geoIpLookup === "function") { this.options.geoIpLookup(function(countryCode) { $.fn[pluginName].autoCountry = countryCode.toLowerCase(); if ($.cookie) { $.cookie("itiAutoCountry", $.fn[pluginName].autoCountry, { path: "/" }); } // tell all instances the auto country is ready // TODO: this should just be the current instances // UPDATE: use setTimeout in case their geoIpLookup function calls this callback straight away (e.g. if they have already done the geo ip lookup somewhere else). Using setTimeout means that the current thread of execution will finish before executing this, which allows the plugin to finish initialising. setTimeout(function() { $(".intl-tel-input input").intlTelInput("autoCountryLoaded"); }); }); } } }, _initKeyListeners: function() { var that = this; if (this.options.autoFormat) { // format number and update flag on keypress // use keypress event as we want to ignore all input except for a select few keys, // but we dont want to ignore the navigation keys like the arrows etc. // NOTE: no point in refactoring this to only bind these listeners on focus/blur because then you would need to have those 2 listeners running the whole time anyway... this.telInput.on("keypress" + this.ns, function(e) { // 32 is space, and after that it's all chars (not meta/nav keys) // this fix is needed for Firefox, which triggers keypress event for some meta/nav keys // Update: also ignore if this is a metaKey e.g. FF and Safari trigger keypress on the v of Ctrl+v // Update: also ignore if ctrlKey (FF on Windows/Ubuntu) // Update: also check that we have utils before we do any autoFormat stuff if (e.which >= keys.SPACE && !e.ctrlKey && !e.metaKey && window.intlTelInputUtils && !that.telInput.prop("readonly")) { e.preventDefault(); // allowed keys are just numeric keys and plus // we must allow plus for the case where the user does select-all and then hits plus to start typing a new number. we could refine this logic to first check that the selection contains a plus, but that wont work in old browsers, and I think it's overkill anyway var isAllowedKey = e.which >= keys.ZERO && e.which <= keys.NINE || e.which == keys.PLUS, input = that.telInput[0], noSelection = that.isGoodBrowser && input.selectionStart == input.selectionEnd, max = that.telInput.attr("maxlength"), val = that.telInput.val(), // assumes that if max exists, it is >0 isBelowMax = max ? val.length < max : true; // first: ensure we dont go over maxlength. we must do this here to prevent adding digits in the middle of the number // still reformat even if not an allowed key as they could by typing a formatting char, but ignore if there's a selection as doesn't make sense to replace selection with illegal char and then immediately remove it if (isBelowMax && (isAllowedKey || noSelection)) { var newChar = isAllowedKey ? String.fromCharCode(e.which) : null; that._handleInputKey(newChar, true, isAllowedKey); // if something has changed, trigger the input event (which was otherwised squashed by the preventDefault) if (val != that.telInput.val()) { that.telInput.trigger("input"); } } if (!isAllowedKey) { that._handleInvalidKey(); } } }); } // handle cut/paste event (now supported in all major browsers) this.telInput.on("cut" + this.ns + " paste" + this.ns, function() { // hack because "paste" event is fired before input is updated setTimeout(function() { if (that.options.autoFormat && window.intlTelInputUtils) { var cursorAtEnd = that.isGoodBrowser && that.telInput[0].selectionStart == that.telInput.val().length; that._handleInputKey(null, cursorAtEnd); that._ensurePlus(); } else { // if no autoFormat, just update flag that._updateFlagFromNumber(that.telInput.val()); } }); }); // handle keyup event // if autoFormat enabled: we use keyup to catch delete events (after the fact) // if no autoFormat, this is used to update the flag this.telInput.on("keyup" + this.ns, function(e) { // the "enter" key event from selecting a dropdown item is triggered here on the input, because the document.keydown handler that initially handles that event triggers a focus on the input, and so the keyup for that same key event gets triggered here. weird, but just make sure we dont bother doing any re-formatting in this case (we've already done preventDefault in the keydown handler, so it wont actually submit the form or anything). // ALSO: ignore keyup if readonly if (e.which == keys.ENTER || that.telInput.prop("readonly")) {} else if (that.options.autoFormat && window.intlTelInputUtils) { // cursorAtEnd defaults to false for bad browsers else they would never get a reformat on delete var cursorAtEnd = that.isGoodBrowser && that.telInput[0].selectionStart == that.telInput.val().length; if (!that.telInput.val()) { // if they just cleared the input, update the flag to the default that._updateFlagFromNumber(""); } else if (e.which == keys.DEL && !cursorAtEnd || e.which == keys.BSPACE) { // if delete in the middle: reformat with no suffix (no need to reformat if delete at end) // if backspace: reformat with no suffix (need to reformat if at end to remove any lingering suffix - this is a feature) // important to remember never to add suffix on any delete key as can fuck up in ie8 so you can never delete a formatting char at the end that._handleInputKey(); } that._ensurePlus(); } else { // if no autoFormat, just update flag that._updateFlagFromNumber(that.telInput.val()); } }); }, // prevent deleting the plus (if not in nationalMode) _ensurePlus: function() { if (!this.options.nationalMode) { var val = this.telInput.val(), input = this.telInput[0]; if (val.charAt(0) != "+") { // newCursorPos is current pos + 1 to account for the plus we are about to add var newCursorPos = this.isGoodBrowser ? input.selectionStart + 1 : 0; this.telInput.val("+" + val); if (this.isGoodBrowser) { input.setSelectionRange(newCursorPos, newCursorPos); } } } }, // alert the user to an invalid key event _handleInvalidKey: function() { var that = this; this.telInput.trigger("invalidkey").addClass("iti-invalid-key"); setTimeout(function() { that.telInput.removeClass("iti-invalid-key"); }, 100); }, // when autoFormat is enabled: handle various key events on the input: // 1) adding a new number character, which will replace any selection, reformat, and preserve the cursor position // 2) reformatting on backspace/delete // 3) cut/paste event _handleInputKey: function(newNumericChar, addSuffix, isAllowedKey) { var val = this.telInput.val(), cleanBefore = this._getClean(val), originalLeftChars, // raw DOM element input = this.telInput[0], digitsOnRight = 0; if (this.isGoodBrowser) { // cursor strategy: maintain the number of digits on the right. we use the right instead of the left so that A) we dont have to account for the new digit (or multiple digits if paste event), and B) we're always on the right side of formatting suffixes digitsOnRight = this._getDigitsOnRight(val, input.selectionEnd); // if handling a new number character: insert it in the right place if (newNumericChar) { // replace any selection they may have made with the new char val = val.substr(0, input.selectionStart) + newNumericChar + val.substring(input.selectionEnd, val.length); } else { // here we're not handling a new char, we're just doing a re-format (e.g. on delete/backspace/paste, after the fact), but we still need to maintain the cursor position. so make note of the char on the left, and then after the re-format, we'll count in the same number of digits from the right, and then keep going through any formatting chars until we hit the same left char that we had before. // UPDATE: now have to store 2 chars as extensions formatting contains 2 spaces so you need to be able to distinguish originalLeftChars = val.substr(input.selectionStart - 2, 2); } } else if (newNumericChar) { val += newNumericChar; } // update the number and flag this.setNumber(val, null, addSuffix, true, isAllowedKey); // update the cursor position if (this.isGoodBrowser) { var newCursor; val = this.telInput.val(); // if it was at the end, keep it there if (!digitsOnRight) { newCursor = val.length; } else { // else count in the same number of digits from the right newCursor = this._getCursorFromDigitsOnRight(val, digitsOnRight); // but if delete/paste etc, keep going left until hit the same left char as before if (!newNumericChar) { newCursor = this._getCursorFromLeftChar(val, newCursor, originalLeftChars); } } // set the new cursor input.setSelectionRange(newCursor, newCursor); } }, // we start from the position in guessCursor, and work our way left until we hit the originalLeftChars or a number to make sure that after reformatting the cursor has the same char on the left in the case of a delete etc _getCursorFromLeftChar: function(val, guessCursor, originalLeftChars) { for (var i = guessCursor; i > 0; i--) { var leftChar = val.charAt(i - 1); if ($.isNumeric(leftChar) || val.substr(i - 2, 2) == originalLeftChars) { return i; } } return 0; }, // after a reformat we need to make sure there are still the same number of digits to the right of the cursor _getCursorFromDigitsOnRight: function(val, digitsOnRight) { for (var i = val.length - 1; i >= 0; i--) { if ($.isNumeric(val.charAt(i))) { if (--digitsOnRight === 0) { return i; } } } return 0; }, // get the number of numeric digits to the right of the cursor so we can reposition the cursor correctly after the reformat has happened _getDigitsOnRight: function(val, selectionEnd) { var digitsOnRight = 0; for (var i = selectionEnd; i < val.length; i++) { if ($.isNumeric(val.charAt(i))) { digitsOnRight++; } } return digitsOnRight; }, // listen for focus and blur _initFocusListeners: function() { var that = this; if (this.options.autoHideDialCode) { // mousedown decides where the cursor goes, so if we're focusing we must preventDefault as we'll be inserting the dial code, and we want the cursor to be at the end no matter where they click this.telInput.on("mousedown" + this.ns, function(e) { if (!that.telInput.is(":focus") && !that.telInput.val()) { e.preventDefault(); // but this also cancels the focus, so we must trigger that manually that.telInput.focus(); } }); } this.telInput.on("focus" + this.ns, function(e) { var value = that.telInput.val(); // save this to compare on blur that.telInput.data("focusVal", value); // on focus: if empty, insert the dial code for the currently selected flag if (that.options.autoHideDialCode && !value && !that.telInput.prop("readonly") && that.selectedCountryData.dialCode) { that._updateVal("+" + that.selectedCountryData.dialCode, null, true); // after auto-inserting a dial code, if the first key they hit is '+' then assume they are entering a new number, so remove the dial code. use keypress instead of keydown because keydown gets triggered for the shift key (required to hit the + key), and instead of keyup because that shows the new '+' before removing the old one that.telInput.one("keypress.plus" + that.ns, function(e) { if (e.which == keys.PLUS) { // if autoFormat is enabled, this key event will have already have been handled by another keypress listener (hence we need to add the "+"). if disabled, it will be handled after this by a keyup listener (hence no need to add the "+"). var newVal = that.options.autoFormat && window.intlTelInputUtils ? "+" : ""; that.telInput.val(newVal); } }); // after tabbing in, make sure the cursor is at the end we must use setTimeout to get outside of the focus handler as it seems the selection happens after that setTimeout(function() { var input = that.telInput[0]; if (that.isGoodBrowser) { var len = that.telInput.val().length; input.setSelectionRange(len, len); } }); } }); this.telInput.on("blur" + this.ns, function() { if (that.options.autoHideDialCode) { // on blur: if just a dial code then remove it var value = that.telInput.val(), startsPlus = value.charAt(0) == "+"; if (startsPlus) { var numeric = that._getNumeric(value); // if just a plus, or if just a dial code if (!numeric || that.selectedCountryData.dialCode == numeric) { that.telInput.val(""); } } // remove the keypress listener we added on focus that.telInput.off("keypress.plus" + that.ns); } // if autoFormat, we must manually trigger change event if value has changed if (that.options.autoFormat && window.intlTelInputUtils && that.telInput.val() != that.telInput.data("focusVal")) { that.telInput.trigger("change"); } }); }, // extract the numeric digits from the given string _getNumeric: function(s) { return s.replace(/\D/g, ""); }, _getClean: function(s) { var prefix = s.charAt(0) == "+" ? "+" : ""; return prefix + this._getNumeric(s); }, // show the dropdown _showDropdown: function() { this._setDropdownPosition(); // update highlighting and scroll to active list item var activeListItem = this.countryList.children(".active"); if (activeListItem.length) { this._highlightListItem(activeListItem); } if (activeListItem.length) { this._scrollTo(activeListItem); } // bind all the dropdown-related listeners: mouseover, click, click-off, keydown this._bindDropdownListeners(); // update the arrow this.selectedFlagInner.children(".arrow").addClass("up"); }, // decide where to position dropdown (depends on position within viewport, and scroll) _setDropdownPosition: function() { var showDropdownContainer = this.options.dropdownContainer && !this.isMobile; if (showDropdownContainer) this.dropdown.appendTo(this.options.dropdownContainer); // show the menu and grab the dropdown height this.dropdownHeight = this.countryList.removeClass("hide").outerHeight(); var that = this, pos = this.telInput.offset(), inputTop = pos.top, windowTop = $(window).scrollTop(), // dropdownFitsBelow = (dropdownBottom < windowBottom) dropdownFitsBelow = inputTop + this.telInput.outerHeight() + this.dropdownHeight < windowTop + $(window).height(), dropdownFitsAbove = inputTop - this.dropdownHeight > windowTop; // by default, the dropdown will be below the input. If we want to position it above the input, we add the dropup class. this.countryList.toggleClass("dropup", !dropdownFitsBelow && dropdownFitsAbove); // if dropdownContainer is enabled, calculate postion if (showDropdownContainer) { // by default the dropdown will be directly over the input because it's not in the flow. If we want to position it below, we need to add some extra top value. var extraTop = !dropdownFitsBelow && dropdownFitsAbove ? 0 : this.telInput.innerHeight(); // calculate placement this.dropdown.css({ top: inputTop + extraTop, left: pos.left }); // close menu on window scroll $(window).on("scroll" + this.ns, function() { that._closeDropdown(); }); } }, // we only bind dropdown listeners when the dropdown is open _bindDropdownListeners: function() { var that = this; // when mouse over a list item, just highlight that one // we add the class "highlight", so if they hit "enter" we know which one to select this.countryList.on("mouseover" + this.ns, ".country", function(e) { that._highlightListItem($(this)); }); // listen for country selection this.countryList.on("click" + this.ns, ".country", function(e) { that._selectListItem($(this)); }); // click off to close // (except when this initial opening click is bubbling up) // we cannot just stopPropagation as it may be needed to close another instance var isOpening = true; $("html").on("click" + this.ns, function(e) { if (!isOpening) { that._closeDropdown(); } isOpening = false; }); // listen for up/down scrolling, enter to select, or letters to jump to country name. // use keydown as keypress doesn't fire for non-char keys and we want to catch if they // just hit down and hold it to scroll down (no keyup event). // listen on the document because that's where key events are triggered if no input has focus var query = "", queryTimer = null; $(document).on("keydown" + this.ns, function(e) { // prevent down key from scrolling the whole page, // and enter key from submitting a form etc e.preventDefault(); if (e.which == keys.UP || e.which == keys.DOWN) { // up and down to navigate that._handleUpDownKey(e.which); } else if (e.which == keys.ENTER) { // enter to select that._handleEnterKey(); } else if (e.which == keys.ESC) { // esc to close that._closeDropdown(); } else if (e.which >= keys.A && e.which <= keys.Z || e.which == keys.SPACE) { // upper case letters (note: keyup/keydown only return upper case letters) // jump to countries that start with the query string if (queryTimer) { clearTimeout(queryTimer); } query += String.fromCharCode(e.which); that._searchForCountry(query); // if the timer hits 1 second, reset the query queryTimer = setTimeout(function() { query = ""; }, 1e3); } }); }, // highlight the next/prev item in the list (and ensure it is visible) _handleUpDownKey: function(key) { var current = this.countryList.children(".highlight").first(); var next = key == keys.UP ? current.prev() : current.next(); if (next.length) { // skip the divider if (next.hasClass("divider")) { next = key == keys.UP ? next.prev() : next.next(); } this._highlightListItem(next); this._scrollTo(next); } }, // select the currently highlighted item _handleEnterKey: function() { var currentCountry = this.countryList.children(".highlight").first(); if (currentCountry.length) { this._selectListItem(currentCountry); } }, // find the first list item whose name starts with the query string _searchForCountry: function(query) { for (var i = 0; i < this.countries.length; i++) { if (this._startsWith(this.countries[i].name, query)) { var listItem = this.countryList.children("[data-country-code=" + this.countries[i].iso2 + "]").not(".preferred"); // update highlighting and scroll this._highlightListItem(listItem); this._scrollTo(listItem, true); break; } } }, // check if (uppercase) string a starts with string b _startsWith: function(a, b) { return a.substr(0, b.length).toUpperCase() == b; }, // update the input's value to the given val // if autoFormat=true, format it first according to the country-specific formatting rules // Note: preventConversion will be false (i.e. we allow conversion) on init and when dev calls public method setNumber _updateVal: function(val, format, addSuffix, preventConversion, isAllowedKey) { var formatted; if (this.options.autoFormat && window.intlTelInputUtils && this.selectedCountryData) { if (typeof format == "number" && intlTelInputUtils.isValidNumber(val, this.selectedCountryData.iso2)) { // if user specified a format, and it's a valid number, then format it accordingly formatted = intlTelInputUtils.formatNumberByType(val, this.selectedCountryData.iso2, format); } else if (!preventConversion && this.options.nationalMode && val.charAt(0) == "+" && intlTelInputUtils.isValidNumber(val, this.selectedCountryData.iso2)) { // if nationalMode and we have a valid intl number, convert it to ntl formatted = intlTelInputUtils.formatNumberByType(val, this.selectedCountryData.iso2, intlTelInputUtils.numberFormat.NATIONAL); } else { // else do the regular AsYouType formatting formatted = intlTelInputUtils.formatNumber(val, this.selectedCountryData.iso2, addSuffix, this.options.allowExtensions, isAllowedKey); } // ensure we dont go over maxlength. we must do this here to truncate any formatting suffix, and also handle paste events var max = this.telInput.attr("maxlength"); if (max && formatted.length > max) { formatted = formatted.substr(0, max); } } else { // no autoFormat, so just insert the original value formatted = val; } this.telInput.val(formatted); }, // check if need to select a new flag based on the given number _updateFlagFromNumber: function(number, updateDefault) { // if we're in nationalMode and we're on US/Canada, make sure the number starts with a +1 so _getDialCode will be able to extract the area code // update: if we dont yet have selectedCountryData, but we're here (trying to update the flag from the number), that means we're initialising the plugin with a number that already has a dial code, so fine to ignore this bit if (number && this.options.nationalMode && this.selectedCountryData && this.selectedCountryData.dialCode == "1" && number.charAt(0) != "+") { if (number.charAt(0) != "1") { number = "1" + number; } number = "+" + number; } // try and extract valid dial code from input var dialCode = this._getDialCode(number), countryCode = null; if (dialCode) { // check if one of the matching countries is already selected var countryCodes = this.countryCodes[this._getNumeric(dialCode)], alreadySelected = this.selectedCountryData && $.inArray(this.selectedCountryData.iso2, countryCodes) != -1; // if a matching country is not already selected (or this is an unknown NANP area code): choose the first in the list if (!alreadySelected || this._isUnknownNanp(number, dialCode)) { // if using onlyCountries option, countryCodes[0] may be empty, so we must find the first non-empty index for (var j = 0; j < countryCodes.length; j++) { if (countryCodes[j]) { countryCode = countryCodes[j]; break; } } } } else if (number.charAt(0) == "+" && this._getNumeric(number).length) { // invalid dial code, so empty // Note: use getNumeric here because the number has not been formatted yet, so could contain bad shit countryCode = ""; } else if (!number || number == "+") { // empty, or just a plus, so default countryCode = this.options.defaultCountry.iso2; } if (countryCode !== null) { this._selectFlag(countryCode, updateDefault); } }, // check if the given number contains an unknown area code from the North American Numbering Plan i.e. the only dialCode that could be extracted was +1 but the actual number's length is >=4 _isUnknownNanp: function(number, dialCode) { return dialCode == "+1" && this._getNumeric(number).length >= 4; }, // remove highlighting from other list items and highlight the given item _highlightListItem: function(listItem) { this.countryListItems.removeClass("highlight"); listItem.addClass("highlight"); }, // find the country data for the given country code // the ignoreOnlyCountriesOption is only used during init() while parsing the onlyCountries array _getCountryData: function(countryCode, ignoreOnlyCountriesOption, allowFail) { var countryList = ignoreOnlyCountriesOption ? allCountries : this.countries; for (var i = 0; i < countryList.length; i++) { if (countryList[i].iso2 == countryCode) { return countryList[i]; } } if (allowFail) { return null; } else { throw new Error("No country data for '" + countryCode + "'"); } }, // select the given flag, update the placeholder and the active list item _selectFlag: function(countryCode, updateDefault) { // do this first as it will throw an error and stop if countryCode is invalid this.selectedCountryData = countryCode ? this._getCountryData(countryCode, false, false) : {}; // update the "defaultCountry" - we only need the iso2 from now on, so just store that if (updateDefault && this.selectedCountryData.iso2) { // can't just make this equal to selectedCountryData as would be a ref to that object this.options.defaultCountry = { iso2: this.selectedCountryData.iso2 }; } this.selectedFlagInner.attr("class", "iti-flag " + countryCode); // update the selected country's title attribute var title = countryCode ? this.selectedCountryData.name + ": +" + this.selectedCountryData.dialCode : "Unknown"; this.selectedFlagInner.parent().attr("title", title); // and the input's placeholder this._updatePlaceholder(); if (this.isMobile) { this.countryList.val(countryCode); } else { // update the active list item this.countryListItems.removeClass("active"); if (countryCode) { this.countryListItems.find(".iti-flag." + countryCode).first().closest(".country").addClass("active"); } } }, // update the input placeholder to an example number from the currently selected country _updatePlaceholder: function() { if (window.intlTelInputUtils && !this.hadInitialPlaceholder && this.options.autoPlaceholder && this.selectedCountryData) { var iso2 = this.selectedCountryData.iso2, numberType = intlTelInputUtils.numberType[this.options.numberType || "FIXED_LINE"], placeholder = iso2 ? intlTelInputUtils.getExampleNumber(iso2, this.options.nationalMode, numberType) : ""; if (typeof this.options.customPlaceholder === "function") { placeholder = this.options.customPlaceholder(placeholder, this.selectedCountryData); } this.telInput.attr("placeholder", placeholder); } }, // called when the user selects a list item from the dropdown _selectListItem: function(listItem) { var countryCodeAttr = this.isMobile ? "value" : "data-country-code"; // update selected flag and active list item this._selectFlag(listItem.attr(countryCodeAttr), true); if (!this.isMobile) { this._closeDropdown(); } this._updateDialCode(listItem.attr("data-dial-code"), true); // always fire the change event as even if nationalMode=true (and we haven't updated the input val), the system as a whole has still changed - see country-sync example. think of it as making a selection from a select element. this.telInput.trigger("change"); // focus the input this.telInput.focus(); // fix for FF and IE11 (with nationalMode=false i.e. auto inserting dial code), who try to put the cursor at the beginning the first time if (this.isGoodBrowser) { var len = this.telInput.val().length; this.telInput[0].setSelectionRange(len, len); } }, // close the dropdown and unbind any listeners _closeDropdown: function() { this.countryList.addClass("hide"); // update the arrow this.selectedFlagInner.children(".arrow").removeClass("up"); // unbind key events $(document).off(this.ns); // unbind click-off-to-close $("html").off(this.ns); // unbind hover and click listeners this.countryList.off(this.ns); // remove menu from container if (this.options.dropdownContainer && !this.isMobile) { $(window).off("scroll" + this.ns); this.dropdown.detach(); } }, // check if an element is visible within it's container, else scroll until it is _scrollTo: function(element, middle) { var container = this.countryList, containerHeight = container.height(), containerTop = container.offset().top, containerBottom = containerTop + containerHeight, elementHeight = element.outerHeight(), elementTop = element.offset().top, elementBottom = elementTop + elementHeight, newScrollTop = elementTop - containerTop + container.scrollTop(), middleOffset = containerHeight / 2 - elementHeight / 2; if (elementTop < containerTop) { // scroll up if (middle) { newScrollTop -= middleOffset; } container.scrollTop(newScrollTop); } else if (elementBottom > containerBottom) { // scroll down if (middle) { newScrollTop += middleOffset; } var heightDifference = containerHeight - elementHeight; container.scrollTop(newScrollTop - heightDifference); } }, // replace any existing dial code with the new one (if not in nationalMode) // also we need to know if we're focusing for a couple of reasons e.g. if so, we want to add any formatting suffix, also if the input is empty and we're not in nationalMode, then we want to insert the dial code _updateDialCode: function(newDialCode, focusing) { var inputVal = this.telInput.val(), newNumber; // save having to pass this every time newDialCode = "+" + newDialCode; if (this.options.nationalMode && inputVal.charAt(0) != "+") { // if nationalMode, we just want to re-format newNumber = inputVal; } else if (inputVal) { // if the previous number contained a valid dial code, replace it // (if more than just a plus character) var prevDialCode = this._getDialCode(inputVal); if (prevDialCode.length > 1) { newNumber = inputVal.replace(prevDialCode, newDialCode); } else { // if the previous number didn't contain a dial code, we should persist it var existingNumber = inputVal.charAt(0) != "+" ? $.trim(inputVal) : ""; newNumber = newDialCode + existingNumber; } } else { newNumber = !this.options.autoHideDialCode || focusing ? newDialCode : ""; } this._updateVal(newNumber, null, focusing); }, // try and extract a valid international dial code from a full telephone number // Note: returns the raw string inc plus character and any whitespace/dots etc _getDialCode: function(number) { var dialCode = ""; // only interested in international numbers (starting with a plus) if (number.charAt(0) == "+") { var numericChars = ""; // iterate over chars for (var i = 0; i < number.length; i++) { var c = number.charAt(i); // if char is number if ($.isNumeric(c)) { numericChars += c; // if current numericChars make a valid dial code if (this.countryCodes[numericChars]) { // store the actual raw string (useful for matching later) dialCode = number.substr(0, i + 1); } // longest dial code is 4 chars if (numericChars.length == 4) { break; } } } } return dialCode; }, /******************** * PUBLIC METHODS ********************/ // this is called when the geoip call returns autoCountryLoaded: function() { if (this.options.defaultCountry == "auto") { this.options.defaultCountry = $.fn[pluginName].autoCountry; this._setInitialState(); this.autoCountryDeferred.resolve(); } }, // remove plugin destroy: function() { if (!this.isMobile) { // make sure the dropdown is closed (and unbind listeners) this._closeDropdown(); } // key events, and focus/blur events if autoHideDialCode=true this.telInput.off(this.ns); if (this.isMobile) { // change event on select country this.countryList.off(this.ns); } else { // click event to open dropdown this.selectedFlagInner.parent().off(this.ns); // label click hack this.telInput.closest("label").off(this.ns); } // remove markup var container = this.telInput.parent(); container.before(this.telInput).remove(); }, // extract the phone number extension if present getExtension: function() { return this.telInput.val().split(" ext. ")[1] || ""; }, // format the number to the given type getNumber: function(type) { if (window.intlTelInputUtils) { return intlTelInputUtils.formatNumberByType(this.telInput.val(), this.selectedCountryData.iso2, type); } return ""; }, // get the type of the entered number e.g. landline/mobile getNumberType: function() { if (window.intlTelInputUtils) { return intlTelInputUtils.getNumberType(this.telInput.val(), this.selectedCountryData.iso2); } return -99; }, // get the country data for the currently selected flag getSelectedCountryData: function() { // if this is undefined, the plugin will return it's instance instead, so in that case an empty object makes more sense return this.selectedCountryData || {}; }, // get the validation error getValidationError: function() { if (window.intlTelInputUtils) { return intlTelInputUtils.getValidationError(this.telInput.val(), this.selectedCountryData.iso2); } return -99; }, // validate the input val - assumes the global function isValidNumber (from utilsScript) isValidNumber: function() { var val = $.trim(this.telInput.val()), countryCode = this.options.nationalMode ? this.selectedCountryData.iso2 : ""; if (window.intlTelInputUtils) { return intlTelInputUtils.isValidNumber(val, countryCode); } return false; }, // load the utils script loadUtils: function(path) { var that = this; var utilsScript = path || this.options.utilsScript; if (utilsScript) { if (!$.fn[pluginName].loadedUtilsScript) { // don't do this twice! (dont just check if the global intlTelInputUtils exists as if init plugin multiple times in quick succession, it may not have finished loading yet) $.fn[pluginName].loadedUtilsScript = true; // dont use $.getScript as it prevents caching $.ajax({ url: utilsScript, complete: function() { // tell all instances that the utils request is complete $(".intl-tel-input input").intlTelInput("utilsRequestComplete"); }, dataType: "script", cache: true }); } } else { this.utilsScriptDeferred.resolve(); } }, // update the selected flag, and update the input val accordingly selectCountry: function(countryCode) { countryCode = countryCode.toLowerCase(); // check if already selected if (!this.selectedFlagInner.hasClass(countryCode)) { this._selectFlag(countryCode, true); this._updateDialCode(this.selectedCountryData.dialCode, false); } }, // set the input value and update the flag setNumber: function(number, format, addSuffix, preventConversion, isAllowedKey) { // ensure starts with plus if (!this.options.nationalMode && number.charAt(0) != "+") { number = "+" + number; } // we must update the flag first, which updates this.selectedCountryData, which is used later for formatting the number before displaying it this._updateFlagFromNumber(number); this._updateVal(number, format, addSuffix, preventConversion, isAllowedKey); }, // this is called when the utils request completes utilsRequestComplete: function() { // if the request was successful if (window.intlTelInputUtils) { // if autoFormat is enabled and there's an initial value in the input, then format it if (this.options.autoFormat && this.telInput.val()) { this._updateVal(this.telInput.val()); } this._updatePlaceholder(); } this.utilsScriptDeferred.resolve(); } }; // adapted to allow public functions // using https://github.com/jquery-boilerplate/jquery-boilerplate/wiki/Extending-jQuery-Boilerplate $.fn[pluginName] = function(options) { var args = arguments; // Is the first parameter an object (options), or was omitted, // instantiate a new instance of the plugin. if (options === undefined || typeof options === "object") { var deferreds = []; this.each(function() { if (!$.data(this, "plugin_" + pluginName)) { var instance = new Plugin(this, options); var instanceDeferreds = instance._init(); // we now have 2 deffereds: 1 for auto country, 1 for utils script deferreds.push(instanceDeferreds[0]); deferreds.push(instanceDeferreds[1]); $.data(this, "plugin_" + pluginName, instance); } }); // return the promise from the "master" deferred object that tracks all the others return $.when.apply(null, deferreds); } else if (typeof options === "string" && options[0] !== "_") { // If the first parameter is a string and it doesn't start // with an underscore or "contains" the `init`-function, // treat this as a call to a public method. // Cache the method call to make it possible to return a value var returns; this.each(function() { var instance = $.data(this, "plugin_" + pluginName); // Tests that there's already a plugin-instance // and checks that the requested public method exists if (instance instanceof Plugin && typeof instance[options] === "function") { // Call the method of our plugin instance, // and pass it the supplied arguments. returns = instance[options].apply(instance, Array.prototype.slice.call(args, 1)); } // Allow instances to be destroyed via the 'destroy' method if (options === "destroy") { $.data(this, "plugin_" + pluginName, null); } }); // If the earlier cached method gives a value back return the value, // otherwise return this to preserve chainability. return returns !== undefined ? returns : this; } }; /******************** * STATIC METHODS ********************/ // get the country data object $.fn[pluginName].getCountryData = function() { return allCountries; }; $.fn[pluginName].version = "6.4.0"; // Tell JSHint to ignore this warning: "character may get silently deleted by one or more browsers" // jshint -W100 // Array of country objects for the flag dropdown. // Each contains a name, country code (ISO 3166-1 alpha-2) and dial code. // Originally from https://github.com/mledoze/countries // then with a couple of manual re-arrangements to be alphabetical // then changed Kazakhstan from +76 to +7 // and Vatican City from +379 to +39 (see issue 50) // and Caribean Netherlands from +5997 to +599 // and Curacao from +5999 to +599 // Removed: Kosovo, Pitcairn Islands, South Georgia // UPDATE Sept 12th 2015 // List of regions that have iso2 country codes, which I have chosen to omit: // (based on this information: https://en.wikipedia.org/wiki/List_of_country_calling_codes) // AQ - Antarctica - all different country codes depending on which "base" // BV - Bouvet Island - no calling code // GS - South Georgia and the South Sandwich Islands - "inhospitable collection of islands" - same flag and calling code as Falkland Islands // HM - Heard Island and McDonald Islands - no calling code // PN - Pitcairn - tiny population (56), same calling code as New Zealand // TF - French Southern Territories - no calling code // UM - United States Minor Outlying Islands - no calling code // UPDATE the criteria of supported countries or territories (see issue 297) // Have an iso2 code: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 // Have a country calling code: https://en.wikipedia.org/wiki/List_of_country_calling_codes // Have a flag // Must be supported by libphonenumber: https://github.com/googlei18n/libphonenumber // Update: converted objects to arrays to save bytes! // Update: added "priority" for countries with the same dialCode as others // Update: added array of area codes for countries with the same dialCode as others // So each country array has the following information: // [ // Country name, // iso2 code, // International dial code, // Order (if >1 country with same dial code), // Area codes (if >1 country with same dial code) // ] var allCountries = [ [ "Afghanistan (‫افغانستان‬‎)", "af", "93" ], [ "Albania (Shqipëri)", "al", "355" ], [ "Algeria (‫الجزائر‬‎)", "dz", "213" ], [ "American Samoa", "as", "1684" ], [ "Andorra", "ad", "376" ], [ "Angola", "ao", "244" ], [ "Anguilla", "ai", "1264" ], [ "Antigua and Barbuda", "ag", "1268" ], [ "Argentina", "ar", "54" ], [ "Armenia (Հայաստան)", "am", "374" ], [ "Aruba", "aw", "297" ], [ "Australia", "au", "61", 0 ], [ "Austria (Österreich)", "at", "43" ], [ "Azerbaijan (Azərbaycan)", "az", "994" ], [ "Bahamas", "bs", "1242" ], [ "Bahrain (‫البحرين‬‎)", "bh", "973" ], [ "Bangladesh (বাংলাদেশ)", "bd", "880" ], [ "Barbados", "bb", "1246" ], [ "Belarus (Беларусь)", "by", "375" ], [ "Belgium (België)", "be", "32" ], [ "Belize", "bz", "501" ], [ "Benin (Bénin)", "bj", "229" ], [ "Bermuda", "bm", "1441" ], [ "Bhutan (འབྲུག)", "bt", "975" ], [ "Bolivia", "bo", "591" ], [ "Bosnia and Herzegovina (Босна и Херцеговина)", "ba", "387" ], [ "Botswana", "bw", "267" ], [ "Brazil (Brasil)", "br", "55" ], [ "British Indian Ocean Territory", "io", "246" ], [ "British Virgin Islands", "vg", "1284" ], [ "Brunei", "bn", "673" ], [ "Bulgaria (България)", "bg", "359" ], [ "Burkina Faso", "bf", "226" ], [ "Burundi (Uburundi)", "bi", "257" ], [ "Cambodia (កម្ពុជា)", "kh", "855" ], [ "Cameroon (Cameroun)", "cm", "237" ], [ "Canada", "ca", "1", 1, [ "204", "226", "236", "249", "250", "289", "306", "343", "365", "387", "403", "416", "418", "431", "437", "438", "450", "506", "514", "519", "548", "579", "581", "587", "604", "613", "639", "647", "672", "705", "709", "742", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905" ] ], [ "Cape Verde (Kabu Verdi)", "cv", "238" ], [ "Caribbean Netherlands", "bq", "599", 1 ], [ "Cayman Islands", "ky", "1345" ], [ "Central African Republic (République centrafricaine)", "cf", "236" ], [ "Chad (Tchad)", "td", "235" ], [ "Chile", "cl", "56" ], [ "China (中国)", "cn", "86" ], [ "Christmas Island", "cx", "61", 2 ], [ "Cocos (Keeling) Islands", "cc", "61", 1 ], [ "Colombia", "co", "57" ], [ "Comoros (‫جزر القمر‬‎)", "km", "269" ], [ "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)", "cd", "243" ], [ "Congo (Republic) (Congo-Brazzaville)", "cg", "242" ], [ "Cook Islands", "ck", "682" ], [ "Costa Rica", "cr", "506" ], [ "Côte d’Ivoire", "ci", "225" ], [ "Croatia (Hrvatska)", "hr", "385" ], [ "Cuba", "cu", "53" ], [ "Curaçao", "cw", "599", 0 ], [ "Cyprus (Κύπρος)", "cy", "357" ], [ "Czech Republic (Česká republika)", "cz", "420" ], [ "Denmark (Danmark)", "dk", "45" ], [ "Djibouti", "dj", "253" ], [ "Dominica", "dm", "1767" ], [ "Dominican Republic (República Dominicana)", "do", "1", 2, [ "809", "829", "849" ] ], [ "Ecuador", "ec", "593" ], [ "Egypt (‫مصر‬‎)", "eg", "20" ], [ "El Salvador", "sv", "503" ], [ "Equatorial Guinea (Guinea Ecuatorial)", "gq", "240" ], [ "Eritrea", "er", "291" ], [ "Estonia (Eesti)", "ee", "372" ], [ "Ethiopia", "et", "251" ], [ "Falkland Islands (Islas Malvinas)", "fk", "500" ], [ "Faroe Islands (Føroyar)", "fo", "298" ], [ "Fiji", "fj", "679" ], [ "Finland (Suomi)", "fi", "358", 0 ], [ "France", "fr", "33" ], [ "French Guiana (Guyane française)", "gf", "594" ], [ "French Polynesia (Polynésie française)", "pf", "689" ], [ "Gabon", "ga", "241" ], [ "Gambia", "gm", "220" ], [ "Georgia (საქართველო)", "ge", "995" ], [ "Germany (Deutschland)", "de", "49" ], [ "Ghana (Gaana)", "gh", "233" ], [ "Gibraltar", "gi", "350" ], [ "Greece (Ελλάδα)", "gr", "30" ], [ "Greenland (Kalaallit Nunaat)", "gl", "299" ], [ "Grenada", "gd", "1473" ], [ "Guadeloupe", "gp", "590", 0 ], [ "Guam", "gu", "1671" ], [ "Guatemala", "gt", "502" ], [ "Guernsey", "gg", "44", 1 ], [ "Guinea (Guinée)", "gn", "224" ], [ "Guinea-Bissau (Guiné Bissau)", "gw", "245" ], [ "Guyana", "gy", "592" ], [ "Haiti", "ht", "509" ], [ "Honduras", "hn", "504" ], [ "Hong Kong (香港)", "hk", "852" ], [ "Hungary (Magyarország)", "hu", "36" ], [ "Iceland (Ísland)", "is", "354" ], [ "India (भारत)", "in", "91" ], [ "Indonesia", "id", "62" ], [ "Iran (‫ایران‬‎)", "ir", "98" ], [ "Iraq (‫العراق‬‎)", "iq", "964" ], [ "Ireland", "ie", "353" ], [ "Isle of Man", "im", "44", 2 ], [ "Israel (‫ישראל‬‎)", "il", "972" ], [ "Italy (Italia)", "it", "39", 0 ], [ "Jamaica", "jm", "1876" ], [ "Japan (日本)", "jp", "81" ], [ "Jersey", "je", "44", 3 ], [ "Jordan (‫الأردن‬‎)", "jo", "962" ], [ "Kazakhstan (Казахстан)", "kz", "7", 1 ], [ "Kenya", "ke", "254" ], [ "Kiribati", "ki", "686" ], [ "Kuwait (‫الكويت‬‎)", "kw", "965" ], [ "Kyrgyzstan (Кыргызстан)", "kg", "996" ], [ "Laos (ລາວ)", "la", "856" ], [ "Latvia (Latvija)", "lv", "371" ], [ "Lebanon (‫لبنان‬‎)", "lb", "961" ], [ "Lesotho", "ls", "266" ], [ "Liberia", "lr", "231" ], [ "Libya (‫ليبيا‬‎)", "ly", "218" ], [ "Liechtenstein", "li", "423" ], [ "Lithuania (Lietuva)", "lt", "370" ], [ "Luxembourg", "lu", "352" ], [ "Macau (澳門)", "mo", "853" ], [ "Macedonia (FYROM) (Македонија)", "mk", "389" ], [ "Madagascar (Madagasikara)", "mg", "261" ], [ "Malawi", "mw", "265" ], [ "Malaysia", "my", "60" ], [ "Maldives", "mv", "960" ], [ "Mali", "ml", "223" ], [ "Malta", "mt", "356" ], [ "Marshall Islands", "mh", "692" ], [ "Martinique", "mq", "596" ], [ "Mauritania (‫موريتانيا‬‎)", "mr", "222" ], [ "Mauritius (Moris)", "mu", "230" ], [ "Mayotte", "yt", "262", 1 ], [ "Mexico (México)", "mx", "52" ], [ "Micronesia", "fm", "691" ], [ "Moldova (Republica Moldova)", "md", "373" ], [ "Monaco", "mc", "377" ], [ "Mongolia (Монгол)", "mn", "976" ], [ "Montenegro (Crna Gora)", "me", "382" ], [ "Montserrat", "ms", "1664" ], [ "Morocco (‫المغرب‬‎)", "ma", "212", 0 ], [ "Mozambique (Moçambique)", "mz", "258" ], [ "Myanmar (Burma) (မြန်မာ)", "mm", "95" ], [ "Namibia (Namibië)", "na", "264" ], [ "Nauru", "nr", "674" ], [ "Nepal (नेपाल)", "np", "977" ], [ "Netherlands (Nederland)", "nl", "31" ], [ "New Caledonia (Nouvelle-Calédonie)", "nc", "687" ], [ "New Zealand", "nz", "64" ], [ "Nicaragua", "ni", "505" ], [ "Niger (Nijar)", "ne", "227" ], [ "Nigeria", "ng", "234" ], [ "Niue", "nu", "683" ], [ "Norfolk Island", "nf", "672" ], [ "North Korea (조선 민주주의 인민 공화국)", "kp", "850" ], [ "Northern Mariana Islands", "mp", "1670" ], [ "Norway (Norge)", "no", "47", 0 ], [ "Oman (‫عُمان‬‎)", "om", "968" ], [ "Pakistan (‫پاکستان‬‎)", "pk", "92" ], [ "Palau", "pw", "680" ], [ "Palestine (‫فلسطين‬‎)", "ps", "970" ], [ "Panama (Panamá)", "pa", "507" ], [ "Papua New Guinea", "pg", "675" ], [ "Paraguay", "py", "595" ], [ "Peru (Perú)", "pe", "51" ], [ "Philippines", "ph", "63" ], [ "Poland (Polska)", "pl", "48" ], [ "Portugal", "pt", "351" ], [ "Puerto Rico", "pr", "1", 3, [ "787", "939" ] ], [ "Qatar (‫قطر‬‎)", "qa", "974" ], [ "Réunion (La Réunion)", "re", "262", 0 ], [ "Romania (România)", "ro", "40" ], [ "Russia (Россия)", "ru", "7", 0 ], [ "Rwanda", "rw", "250" ], [ "Saint Barthélemy (Saint-Barthélemy)", "bl", "590", 1 ], [ "Saint Helena", "sh", "290" ], [ "Saint Kitts and Nevis", "kn", "1869" ], [ "Saint Lucia", "lc", "1758" ], [ "Saint Martin (Saint-Martin (partie française))", "mf", "590", 2 ], [ "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)", "pm", "508" ], [ "Saint Vincent and the Grenadines", "vc", "1784" ], [ "Samoa", "ws", "685" ], [ "San Marino", "sm", "378" ], [ "São Tomé and Príncipe (São Tomé e Príncipe)", "st", "239" ], [ "Saudi Arabia (‫المملكة العربية السعودية‬‎)", "sa", "966" ], [ "Senegal (Sénégal)", "sn", "221" ], [ "Serbia (Србија)", "rs", "381" ], [ "Seychelles", "sc", "248" ], [ "Sierra Leone", "sl", "232" ], [ "Singapore", "sg", "65" ], [ "Sint Maarten", "sx", "1721" ], [ "Slovakia (Slovensko)", "sk", "421" ], [ "Slovenia (Slovenija)", "si", "386" ], [ "Solomon Islands", "sb", "677" ], [ "Somalia (Soomaaliya)", "so", "252" ], [ "South Africa", "za", "27" ], [ "South Korea (대한민국)", "kr", "82" ], [ "South Sudan (‫جنوب السودان‬‎)", "ss", "211" ], [ "Spain (España)", "es", "34" ], [ "Sri Lanka (ශ්‍රී ලංකාව)", "lk", "94" ], [ "Sudan (‫السودان‬‎)", "sd", "249" ], [ "Suriname", "sr", "597" ], [ "Svalbard and Jan Mayen", "sj", "47", 1 ], [ "Swaziland", "sz", "268" ], [ "Sweden (Sverige)", "se", "46" ], [ "Switzerland (Schweiz)", "ch", "41" ], [ "Syria (‫سوريا‬‎)", "sy", "963" ], [ "Taiwan (台灣)", "tw", "886" ], [ "Tajikistan", "tj", "992" ], [ "Tanzania", "tz", "255" ], [ "Thailand (ไทย)", "th", "66" ], [ "Timor-Leste", "tl", "670" ], [ "Togo", "tg", "228" ], [ "Tokelau", "tk", "690" ], [ "Tonga", "to", "676" ], [ "Trinidad and Tobago", "tt", "1868" ], [ "Tunisia (‫تونس‬‎)", "tn", "216" ], [ "Turkey (Türkiye)", "tr", "90" ], [ "Turkmenistan", "tm", "993" ], [ "Turks and Caicos Islands", "tc", "1649" ], [ "Tuvalu", "tv", "688" ], [ "U.S. Virgin Islands", "vi", "1340" ], [ "Uganda", "ug", "256" ], [ "Ukraine (Україна)", "ua", "380" ], [ "United Arab Emirates (‫الإمارات العربية المتحدة‬‎)", "ae", "971" ], [ "United Kingdom", "gb", "44", 0 ], [ "United States", "us", "1", 0 ], [ "Uruguay", "uy", "598" ], [ "Uzbekistan (Oʻzbekiston)", "uz", "998" ], [ "Vanuatu", "vu", "678" ], [ "Vatican City (Città del Vaticano)", "va", "39", 1 ], [ "Venezuela", "ve", "58" ], [ "Vietnam (Việt Nam)", "vn", "84" ], [ "Wallis and Futuna", "wf", "681" ], [ "Western Sahara (‫الصحراء الغربية‬‎)", "eh", "212", 1 ], [ "Yemen (‫اليمن‬‎)", "ye", "967" ], [ "Zambia", "zm", "260" ], [ "Zimbabwe", "zw", "263" ], [ "Åland Islands", "ax", "358", 1 ] ]; // loop over all of the countries above for (var i = 0; i < allCountries.length; i++) { var c = allCountries[i]; allCountries[i] = { name: c[0], iso2: c[1], dialCode: c[2], priority: c[3] || 0, areaCodes: c[4] || null }; } });
web/bundles/gcprojet/js/jquery.js
Loghrenar/Projets4
/*! 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});
ui/src/main/js/components/UpdateDiff.js
apache/aurora
import React from 'react'; import Diff from 'components/Diff'; import PanelGroup, { Container, StandardPanelTitle } from 'components/Layout'; import { instanceRangeToString } from 'utils/Task'; export default class UpdateDiff extends React.Component { constructor(props) { super(props); this.state = {groupIdx: 0}; } diffNavigation() { const that = this; const { initialState } = this.props.update.update.instructions; const currentGroup = initialState[this.state.groupIdx]; if (initialState.length < 2) { return ''; } else { const otherOptions = initialState.map((g, i) => i).filter((i) => i !== that.state.groupIdx); return (<div className='update-diff-picker'> Current Instances: <select onChange={(e) => this.setState({groupIdx: parseInt(e.target.value, 10)})}> <option key='current'>{instanceRangeToString(currentGroup.instances)}</option> {otherOptions.map((i) => (<option key={i} value={i}> {instanceRangeToString(initialState[i].instances)} </option>))} </select> </div>); } } render() { const { initialState, desiredState } = this.props.update.update.instructions; return (<Container> <PanelGroup noPadding title={<StandardPanelTitle title='Update Diff' />}> <div className='task-diff'> {this.diffNavigation()} <Diff left={initialState[this.state.groupIdx].task} right={desiredState.task} /> </div> </PanelGroup> </Container>); } }
client/test/components/comicDetails/index.spec.js
nicksenger/marvelous
/* eslint-env mocha */ import React from 'react'; import { expect } from 'chai'; import { shallow } from 'enzyme'; import sinon from 'sinon'; import { ComicDetails } from '../../../src/js/components/comicDetails/index'; describe('<ComicDetails />', () => { it('should render if no details', () => { const wrapper = shallow( <ComicDetails comicDetails={false} clearComicDetails={() => []} getComicDetails={() => []} params={{ comicId: 0 }} /> ); expect(wrapper.find('h1').length).to.equal(1); }); it('should render if details present', (done) => { const wrapper = shallow( <ComicDetails comicDetails={{ title: 'foobar' }} clearComicDetails={() => []} getComicDetails={() => []} params={{ comicId: 0 }} /> ); expect(wrapper.find('.character-portrait').length).to.equal(1); done(); }); it('should render if details & description present', (done) => { const wrapper = shallow( <ComicDetails comicDetails={{ title: 'foobar', description: 'the great journey of foobar' }} clearComicDetails={() => []} getComicDetails={() => []} params={{ comicId: 0 }} /> ); expect(wrapper.find('p').length).to.equal(1); done(); }); describe('componentWillMount', () => { it('should call clearComicDetails & getComicDetails', (done) => { const clearComicDetails = sinon.spy(); const getComicDetails = sinon.spy(); const wrapper = shallow( <ComicDetails comicDetails={{ title: 'foobar', description: 'the great journey of foobar' }} clearComicDetails={clearComicDetails} getComicDetails={getComicDetails} params={{ comicId: 0 }} /> ); const instance = wrapper.instance(); instance.componentWillMount(); expect(clearComicDetails.called).to.equal(true); expect(getComicDetails.called).to.equal(true); done(); }); }); });
public/client/routes/client/containers/client.js
nearform/concorda-dashboard
'use strict' import React from 'react' import {connect} from 'react-redux' import { pushPath } from 'redux-simple-router' import {reduxForm} from 'redux-form' import _ from 'lodash' import RadioGroup from 'react-radio-group' import CheckboxGroup from 'react-checkbox-group' import {validateEditClient} from '../../../lib/validations' import {getClient, upsertClient, editClient} from '../../../modules/client/actions/index' export let Client = React.createClass({ propTypes: { fields: React.PropTypes.object.isRequired, handleSubmit: React.PropTypes.func.isRequired }, getInitialState () { return { } }, componentDidMount () { const {route, dispatch} = this.props if (_.endsWith(route.path, '/edit') && !this.props.edit) { dispatch(editClient()) } dispatch(getClient(this.props.params.id)) }, componentWillReceiveProps: function (nextProps) { if (nextProps.client) { this.setState({ appkey: nextProps.client.appkey }) } }, componentWillUnmount () { }, handleSubmit (data) { const {dispatch} = this.props data.appkey = this.state.appkey dispatch(upsertClient(this.props.params.id, data)) }, handleEditClient () { const {dispatch} = this.props dispatch(editClient()) dispatch(pushPath(`/client/${this.props.params.id}/edit`)) }, render () { const { fields: {name, protocol, host, port, registerWidgets, appkey, emailTemplateFolder}, handleSubmit } = this.props const {client, edit} = this.props const {handleEditClient} = this return ( <div className="page page-client container-fluid"> <div className="row middle-xs page-heading"> <h2 className="col-xs-12 col-sm-6">Application Settings</h2> </div> {(() => { if (edit && client) { return ( <form className="login-form col-xs-12 txt-left form-full-width form-panel" onSubmit={handleSubmit(this.handleSubmit)}> <div className="row"> <div className="col-xs-12 col-sm-6"> <label>Name</label> <input {...name} placeholder="Name" className="input-large"/> {name.error && name.touched && <div className="form-err">{name.error}</div>} </div> <div className="col-xs-4 col-sm-2"> <label>Protocol</label> <input type="text" {...protocol} placeholder="Protocol" className="input-large"/> {protocol.error && protocol.touched && <div className="form-err">{protocol.error}</div>} </div> <div className="col-xs-4 col-sm-2"> <label>Host</label> <input type="text" {...host} placeholder="Host" className="input-large"/> {host.error && host.touched && <div className="form-err">{host.error}</div>} </div> <div className="col-xs-4 col-sm-2"> <label>Port</label> <input type="text" {...port} placeholder="Port" className="input-large"/> {port.error && port.touched && <div className="form-err">{port.error}</div>} </div> </div> <div className="row"> <div className="col-xs-12 col-sm-6"> <label>Application key</label> <input {...appkey} placeholder="Application key" className="input-large"/> </div> <div className="col-xs-12 col-sm-6"> <label>Widgets for user</label> <input {...registerWidgets} placeholder="user widgets (comma separated)" className="input-large"/> {registerWidgets.error && registerWidgets.touched && <div className="form-err">{registerWidgets.error}</div>} </div> </div> <div className="row"> <div className="col-xs-12 col-sm-6"> <label>Email templates folder (if other than default)</label> <input {...emailTemplateFolder} placeholder="Email template folder" className="input-large"/> </div> </div> <div className="row"> <div className="col-lg-2 col-md-4 col-sm-6 col-xs-12"> <button type="submit" className="btn btn-large submit">Submit</button> </div> </div> </form> ) } else if (client) { return ( <div className="row middle-xs center-xs"> <div className="login-form col-xs-12 col-md-6 col-lg-4 txt-left form-full-width form-panel"> <div className="row"> <div className="col-xs-12"><p className="m0 mt"><strong>Name:</strong> {client.name}</p></div> <div className="col-xs-12"><p className="m0 mt"><strong>Url:</strong> {client.url}</p></div> </div> <button onClick={handleEditClient} className="btn btn-large submit">Edit</button> </div> </div> ) } })()} </div> ) } }) Client = reduxForm( { form: 'editClient', fields: ['name', 'protocol', 'host', 'port', 'appkey', 'registerWidgets', 'emailTemplateFolder'], validate: validateEditClient }, state => ({ initialValues: state.client.details ? state.client.details : null }))(Client) export default connect((state) => { return { client: state.client.details ? state.client.details : null, edit: state.client.edit } })(Client)
src/components/Route/RouteList.js
mark4carter/react-hrtbus
import React from 'react' import Radium from 'radium' import Route from './Route'; class RouteList extends React.Component { render() { return ( <section> <pre>RouteList</pre> <Route /> <Route /> <Route /> </section> ) } } export default RouteList
src/components/UserOptions.spec.js
madox2/fortune-app
/*eslint-env jest, jasmine*/ import React from 'react' import {shallow} from 'enzyme' import {UserOptions} from './UserOptions' import {View} from 'react-native' describe('<UserOptions />', () => { it('should render view', () => { const wrapper = shallow(<UserOptions />) expect(wrapper.type()).toBe(View) }) it('should render options with default values', () => { const options = { number: { type: 'number', label: 'Number', defaultValue: 1, }, myText: { type: 'text', label: 'My text', defaultValue: 'Hello world', }, } const wrapper = shallow(<UserOptions options={options} />) expect(wrapper.find({children: 'Number: 1'}).length).toBe(1) expect(wrapper.find({children: 'My text: Hello world'}).length).toBe(1) }) it('should render change button', () => { const wrapper = shallow(<UserOptions showChangeButton={true} />) expect(wrapper.find('Button[children="Change"]').length).toBe(1) }) it('should not render change button', () => { const wrapper = shallow(<UserOptions />) expect(wrapper.find('Button[children="Change"]').length).toBe(0) }) it('should display edit mode', () => { const options = { number: { type: 'number', label: 'Number', defaultValue: 1, }, } const wrapper = shallow( <UserOptions options={options} showChangeButton={true} />, ) const change = wrapper.find('Button[children="Change"]') expect(wrapper.find('Button[children="Cancel"]').length).toBe(0) expect(wrapper.find('Button[children="Save"]').length).toBe(0) expect(wrapper.find('InputNumber[label="Number"]').length).toBe(0) change.simulate('press') wrapper.update() expect(wrapper.find('Button[children="Cancel"]').length).toBe(1) expect(wrapper.find('Button[children="Save"]').length).toBe(1) expect(wrapper.find('InputNumber[label="Number"]').length).toBe(1) }) it('should cancel editing', () => { const options = { number: { type: 'number', label: 'Number', defaultValue: 1, }, } const wrapper = shallow( <UserOptions options={options} showChangeButton={true} />, ) const change = wrapper.find('Button[children="Change"]') change.simulate('press') wrapper.update() const input = wrapper.find('InputNumber[label="Number"]') input.simulate('change', 3) const close = wrapper.find('Button[children="Cancel"]') close.simulate('press') wrapper.update() expect(wrapper.find('Button[children="Cancel"]').length).toBe(0) expect(wrapper.find('Button[children="Save"]').length).toBe(0) expect(wrapper.find('InputNumber[key="Number"]').length).toBe(0) expect(wrapper.find('Button[children="Change"]').length).toBe(1) expect(wrapper.find({children: 'Number: 1'}).length).toBe(1) }) it('should edit and trigger onChange event', () => { const options = { number: { type: 'number', label: 'Number', defaultValue: 1, }, } const onChange = jest.fn() const wrapper = shallow( <UserOptions options={options} onChange={onChange} showChangeButton={true} />, ) const change = wrapper.find('Button[children="Change"]') change.simulate('press') wrapper.update() const input = wrapper.find('InputNumber[label="Number"]') input.simulate('change', 3) wrapper.update() const save = wrapper.find('Button[children="Save"]') save.simulate('press') wrapper.update() expect(wrapper.find({children: 'Number: 1'}).length).toBe(0) expect(wrapper.find({children: 'Number: 3'}).length).toBe(1) expect(onChange.mock.calls.length).toBe(1) expect(onChange.mock.calls[0][0]).toEqual({ number: { type: 'number', label: 'Number', defaultValue: 1, value: 3, err: undefined, customErr: null, }, }) }) it('should not pass via validation', () => { const options = { number: { type: 'number', label: 'Number', constraints: {min: 0}, defaultValue: 1, }, } const onChange = jest.fn() const wrapper = shallow( <UserOptions options={options} onChange={onChange} showChangeButton={true} />, ) const change = wrapper.find('Button[children="Change"]') change.simulate('press') wrapper.update() const input = wrapper.find('InputNumber[label="Number"]') input.simulate('change', -3, 'some error') wrapper.update() const save = wrapper.find('Button[children="Save"]') save.simulate('press') wrapper.update() const inputWithError = wrapper.find('InputNumber[label="Number"]') expect(inputWithError.length).toBe(1) expect(!!inputWithError.prop('err')).toBe(true) }) })
lib/components/LinkList.js
wkirby/hotroutes-website
import React from "react"; import { Icon } from "./Icon"; import cx from "classnames"; export const LinkList = ({ links, className, target="_blank", ...props }) => { const classNames = cx("list-inline", className); return ( <ul className={classNames} {...props}> {links.map((l, i) => { return ( <li className="list-inline-item" key={i}> <a href={l.href} target={target}> {l.icon && <Icon className={`${l.icon} mr-1`} />} {l.label && l.label} </a> </li> ); })} </ul> ); };
src/app/views/AppView/AppView.js
tuxsudo/react-starter
import React from 'react'; import 'normalize.css'; import SiteHeader from '../../components/SiteHeader'; import styles from './style.css'; export default ({homelink, children, nav}) => ( <div className={styles.app}> <SiteHeader className={styles.header} links={nav} homelink={homelink} /> <div className={styles.wrapper}> <main className={styles.main}>{children}</main> </div> </div> );