/* Minification failed. Returning unminified contents.
(23572,25-26): run-time error JS1003: Expected ':': (
(23572,39-40): run-time error JS1100: Expected ',': {
(23580,5-6): run-time error JS1002: Syntax error: }
(23590,5-6): run-time error JS1002: Syntax error: }
(23598,59-60): run-time error JS1004: Expected ';': {
(23589,9-29): run-time error JS1018: 'return' statement outside of function: return encodedString
(23579,9-28): run-time error JS1018: 'return' statement outside of function: return encodeString
(10731,7350-7357): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: Promise
 */
/*!
 * jQuery JavaScript Library v3.7.1
 * https://jquery.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2023-08-28T13:37Z
 */
( function( global, factory ) {

	"use strict";

	if ( typeof module === "object" && typeof module.exports === "object" ) {

		// For CommonJS and CommonJS-like environments where a proper `window`
		// is present, execute the factory and get jQuery.
		// For environments that do not have a `window` with a `document`
		// (such as Node.js), expose a factory as module.exports.
		// This accentuates the need for the creation of a real `window`.
		// e.g. var jQuery = require("jquery")(window);
		// See ticket trac-14549 for more info.
		module.exports = global.document ?
			factory( global, true ) :
			function( w ) {
				if ( !w.document ) {
					throw new Error( "jQuery requires a window with a document" );
				}
				return factory( w );
			};
	} else {
		factory( global );
	}

// Pass this if window is not defined yet
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {

// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
// enough that all such attempts are guarded in a try block.
"use strict";

var arr = [];

var getProto = Object.getPrototypeOf;

var slice = arr.slice;

var flat = arr.flat ? function( array ) {
	return arr.flat.call( array );
} : function( array ) {
	return arr.concat.apply( [], array );
};


var push = arr.push;

var indexOf = arr.indexOf;

var class2type = {};

var toString = class2type.toString;

var hasOwn = class2type.hasOwnProperty;

var fnToString = hasOwn.toString;

var ObjectFunctionString = fnToString.call( Object );

var support = {};

var isFunction = function isFunction( obj ) {

		// Support: Chrome <=57, Firefox <=52
		// In some browsers, typeof returns "function" for HTML <object> elements
		// (i.e., `typeof document.createElement( "object" ) === "function"`).
		// We don't want to classify *any* DOM node as a function.
		// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
		// Plus for old WebKit, typeof returns "function" for HTML collections
		// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
		return typeof obj === "function" && typeof obj.nodeType !== "number" &&
			typeof obj.item !== "function";
	};


var isWindow = function isWindow( obj ) {
		return obj != null && obj === obj.window;
	};


var document = window.document;



	var preservedScriptAttributes = {
		type: true,
		src: true,
		nonce: true,
		noModule: true
	};

	function DOMEval( code, node, doc ) {
		doc = doc || document;

		var i, val,
			script = doc.createElement( "script" );

		script.text = code;
		if ( node ) {
			for ( i in preservedScriptAttributes ) {

				// Support: Firefox 64+, Edge 18+
				// Some browsers don't support the "nonce" property on scripts.
				// On the other hand, just using `getAttribute` is not enough as
				// the `nonce` attribute is reset to an empty string whenever it
				// becomes browsing-context connected.
				// See https://github.com/whatwg/html/issues/2369
				// See https://html.spec.whatwg.org/#nonce-attributes
				// The `node.getAttribute` check was added for the sake of
				// `jQuery.globalEval` so that it can fake a nonce-containing node
				// via an object.
				val = node[ i ] || node.getAttribute && node.getAttribute( i );
				if ( val ) {
					script.setAttribute( i, val );
				}
			}
		}
		doc.head.appendChild( script ).parentNode.removeChild( script );
	}


function toType( obj ) {
	if ( obj == null ) {
		return obj + "";
	}

	// Support: Android <=2.3 only (functionish RegExp)
	return typeof obj === "object" || typeof obj === "function" ?
		class2type[ toString.call( obj ) ] || "object" :
		typeof obj;
}
/* global Symbol */
// Defining this global in .eslintrc.json would create a danger of using the global
// unguarded in another place, it seems safer to define global only for this module



var version = "3.7.1",

	rhtmlSuffix = /HTML$/i,

	// Define a local copy of jQuery
	jQuery = function( selector, context ) {

		// The jQuery object is actually just the init constructor 'enhanced'
		// Need init if jQuery is called (just allow error to be thrown if not included)
		return new jQuery.fn.init( selector, context );
	};

jQuery.fn = jQuery.prototype = {

	// The current version of jQuery being used
	jquery: version,

	constructor: jQuery,

	// The default length of a jQuery object is 0
	length: 0,

	toArray: function() {
		return slice.call( this );
	},

	// Get the Nth element in the matched element set OR
	// Get the whole matched element set as a clean array
	get: function( num ) {

		// Return all the elements in a clean array
		if ( num == null ) {
			return slice.call( this );
		}

		// Return just the one element from the set
		return num < 0 ? this[ num + this.length ] : this[ num ];
	},

	// Take an array of elements and push it onto the stack
	// (returning the new matched element set)
	pushStack: function( elems ) {

		// Build a new jQuery matched element set
		var ret = jQuery.merge( this.constructor(), elems );

		// Add the old object onto the stack (as a reference)
		ret.prevObject = this;

		// Return the newly-formed element set
		return ret;
	},

	// Execute a callback for every element in the matched set.
	each: function( callback ) {
		return jQuery.each( this, callback );
	},

	map: function( callback ) {
		return this.pushStack( jQuery.map( this, function( elem, i ) {
			return callback.call( elem, i, elem );
		} ) );
	},

	slice: function() {
		return this.pushStack( slice.apply( this, arguments ) );
	},

	first: function() {
		return this.eq( 0 );
	},

	last: function() {
		return this.eq( -1 );
	},

	even: function() {
		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
			return ( i + 1 ) % 2;
		} ) );
	},

	odd: function() {
		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
			return i % 2;
		} ) );
	},

	eq: function( i ) {
		var len = this.length,
			j = +i + ( i < 0 ? len : 0 );
		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
	},

	end: function() {
		return this.prevObject || this.constructor();
	},

	// For internal use only.
	// Behaves like an Array's method, not like a jQuery method.
	push: push,
	sort: arr.sort,
	splice: arr.splice
};

jQuery.extend = jQuery.fn.extend = function() {
	var options, name, src, copy, copyIsArray, clone,
		target = arguments[ 0 ] || {},
		i = 1,
		length = arguments.length,
		deep = false;

	// Handle a deep copy situation
	if ( typeof target === "boolean" ) {
		deep = target;

		// Skip the boolean and the target
		target = arguments[ i ] || {};
		i++;
	}

	// Handle case when target is a string or something (possible in deep copy)
	if ( typeof target !== "object" && !isFunction( target ) ) {
		target = {};
	}

	// Extend jQuery itself if only one argument is passed
	if ( i === length ) {
		target = this;
		i--;
	}

	for ( ; i < length; i++ ) {

		// Only deal with non-null/undefined values
		if ( ( options = arguments[ i ] ) != null ) {

			// Extend the base object
			for ( name in options ) {
				copy = options[ name ];

				// Prevent Object.prototype pollution
				// Prevent never-ending loop
				if ( name === "__proto__" || target === copy ) {
					continue;
				}

				// Recurse if we're merging plain objects or arrays
				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
					( copyIsArray = Array.isArray( copy ) ) ) ) {
					src = target[ name ];

					// Ensure proper type for the source value
					if ( copyIsArray && !Array.isArray( src ) ) {
						clone = [];
					} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
						clone = {};
					} else {
						clone = src;
					}
					copyIsArray = false;

					// Never move original objects, clone them
					target[ name ] = jQuery.extend( deep, clone, copy );

				// Don't bring in undefined values
				} else if ( copy !== undefined ) {
					target[ name ] = copy;
				}
			}
		}
	}

	// Return the modified object
	return target;
};

jQuery.extend( {

	// Unique for each copy of jQuery on the page
	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),

	// Assume jQuery is ready without the ready module
	isReady: true,

	error: function( msg ) {
		throw new Error( msg );
	},

	noop: function() {},

	isPlainObject: function( obj ) {
		var proto, Ctor;

		// Detect obvious negatives
		// Use toString instead of jQuery.type to catch host objects
		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
			return false;
		}

		proto = getProto( obj );

		// Objects with no prototype (e.g., `Object.create( null )`) are plain
		if ( !proto ) {
			return true;
		}

		// Objects with prototype are plain iff they were constructed by a global Object function
		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
	},

	isEmptyObject: function( obj ) {
		var name;

		for ( name in obj ) {
			return false;
		}
		return true;
	},

	// Evaluates a script in a provided context; falls back to the global one
	// if not specified.
	globalEval: function( code, options, doc ) {
		DOMEval( code, { nonce: options && options.nonce }, doc );
	},

	each: function( obj, callback ) {
		var length, i = 0;

		if ( isArrayLike( obj ) ) {
			length = obj.length;
			for ( ; i < length; i++ ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		} else {
			for ( i in obj ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		}

		return obj;
	},


	// Retrieve the text value of an array of DOM nodes
	text: function( elem ) {
		var node,
			ret = "",
			i = 0,
			nodeType = elem.nodeType;

		if ( !nodeType ) {

			// If no nodeType, this is expected to be an array
			while ( ( node = elem[ i++ ] ) ) {

				// Do not traverse comment nodes
				ret += jQuery.text( node );
			}
		}
		if ( nodeType === 1 || nodeType === 11 ) {
			return elem.textContent;
		}
		if ( nodeType === 9 ) {
			return elem.documentElement.textContent;
		}
		if ( nodeType === 3 || nodeType === 4 ) {
			return elem.nodeValue;
		}

		// Do not include comment or processing instruction nodes

		return ret;
	},

	// results is for internal usage only
	makeArray: function( arr, results ) {
		var ret = results || [];

		if ( arr != null ) {
			if ( isArrayLike( Object( arr ) ) ) {
				jQuery.merge( ret,
					typeof arr === "string" ?
						[ arr ] : arr
				);
			} else {
				push.call( ret, arr );
			}
		}

		return ret;
	},

	inArray: function( elem, arr, i ) {
		return arr == null ? -1 : indexOf.call( arr, elem, i );
	},

	isXMLDoc: function( elem ) {
		var namespace = elem && elem.namespaceURI,
			docElem = elem && ( elem.ownerDocument || elem ).documentElement;

		// Assume HTML when documentElement doesn't yet exist, such as inside
		// document fragments.
		return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" );
	},

	// Support: Android <=4.0 only, PhantomJS 1 only
	// push.apply(_, arraylike) throws on ancient WebKit
	merge: function( first, second ) {
		var len = +second.length,
			j = 0,
			i = first.length;

		for ( ; j < len; j++ ) {
			first[ i++ ] = second[ j ];
		}

		first.length = i;

		return first;
	},

	grep: function( elems, callback, invert ) {
		var callbackInverse,
			matches = [],
			i = 0,
			length = elems.length,
			callbackExpect = !invert;

		// Go through the array, only saving the items
		// that pass the validator function
		for ( ; i < length; i++ ) {
			callbackInverse = !callback( elems[ i ], i );
			if ( callbackInverse !== callbackExpect ) {
				matches.push( elems[ i ] );
			}
		}

		return matches;
	},

	// arg is for internal usage only
	map: function( elems, callback, arg ) {
		var length, value,
			i = 0,
			ret = [];

		// Go through the array, translating each of the items to their new values
		if ( isArrayLike( elems ) ) {
			length = elems.length;
			for ( ; i < length; i++ ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}

		// Go through every key on the object,
		} else {
			for ( i in elems ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}
		}

		// Flatten any nested arrays
		return flat( ret );
	},

	// A global GUID counter for objects
	guid: 1,

	// jQuery.support is not used in Core but other projects attach their
	// properties to it so it needs to exist.
	support: support
} );

if ( typeof Symbol === "function" ) {
	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}

// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
	function( _i, name ) {
		class2type[ "[object " + name + "]" ] = name.toLowerCase();
	} );

function isArrayLike( obj ) {

	// Support: real iOS 8.2 only (not reproducible in simulator)
	// `in` check used to prevent JIT error (gh-2145)
	// hasOwn isn't used here due to false negatives
	// regarding Nodelist length in IE
	var length = !!obj && "length" in obj && obj.length,
		type = toType( obj );

	if ( isFunction( obj ) || isWindow( obj ) ) {
		return false;
	}

	return type === "array" || length === 0 ||
		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}


function nodeName( elem, name ) {

	return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();

}
var pop = arr.pop;


var sort = arr.sort;


var splice = arr.splice;


var whitespace = "[\\x20\\t\\r\\n\\f]";


var rtrimCSS = new RegExp(
	"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
	"g"
);




// Note: an element does not contain itself
jQuery.contains = function( a, b ) {
	var bup = b && b.parentNode;

	return a === bup || !!( bup && bup.nodeType === 1 && (

		// Support: IE 9 - 11+
		// IE doesn't have `contains` on SVG.
		a.contains ?
			a.contains( bup ) :
			a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
	) );
};




// CSS string/identifier serialization
// https://drafts.csswg.org/cssom/#common-serializing-idioms
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;

function fcssescape( ch, asCodePoint ) {
	if ( asCodePoint ) {

		// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
		if ( ch === "\0" ) {
			return "\uFFFD";
		}

		// Control characters and (dependent upon position) numbers get escaped as code points
		return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
	}

	// Other potentially-special ASCII characters get backslash-escaped
	return "\\" + ch;
}

jQuery.escapeSelector = function( sel ) {
	return ( sel + "" ).replace( rcssescape, fcssescape );
};




var preferredDoc = document,
	pushNative = push;

( function() {

var i,
	Expr,
	outermostContext,
	sortInput,
	hasDuplicate,
	push = pushNative,

	// Local document vars
	document,
	documentElement,
	documentIsHTML,
	rbuggyQSA,
	matches,

	// Instance-specific data
	expando = jQuery.expando,
	dirruns = 0,
	done = 0,
	classCache = createCache(),
	tokenCache = createCache(),
	compilerCache = createCache(),
	nonnativeSelectorCache = createCache(),
	sortOrder = function( a, b ) {
		if ( a === b ) {
			hasDuplicate = true;
		}
		return 0;
	},

	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" +
		"loop|multiple|open|readonly|required|scoped",

	// Regular expressions

	// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
	identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
		"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",

	// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +

		// Operator (capture 2)
		"*([*^$|!~]?=)" + whitespace +

		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
		whitespace + "*\\]",

	pseudos = ":(" + identifier + ")(?:\\((" +

		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
		// 1. quoted (capture 3; capture 4 or capture 5)
		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +

		// 2. simple (capture 6)
		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +

		// 3. anything else (capture 2)
		".*" +
		")\\)|)",

	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
	rwhitespace = new RegExp( whitespace + "+", "g" ),

	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
	rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" +
		whitespace + "*" ),
	rdescend = new RegExp( whitespace + "|>" ),

	rpseudo = new RegExp( pseudos ),
	ridentifier = new RegExp( "^" + identifier + "$" ),

	matchExpr = {
		ID: new RegExp( "^#(" + identifier + ")" ),
		CLASS: new RegExp( "^\\.(" + identifier + ")" ),
		TAG: new RegExp( "^(" + identifier + "|[*])" ),
		ATTR: new RegExp( "^" + attributes ),
		PSEUDO: new RegExp( "^" + pseudos ),
		CHILD: new RegExp(
			"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
				whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
				whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
		bool: new RegExp( "^(?:" + booleans + ")$", "i" ),

		// For use in libraries implementing .is()
		// We use this for POS matching in `select`
		needsContext: new RegExp( "^" + whitespace +
			"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
			"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
	},

	rinputs = /^(?:input|select|textarea|button)$/i,
	rheader = /^h\d$/i,

	// Easily-parseable/retrievable ID or TAG or CLASS selectors
	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,

	rsibling = /[+~]/,

	// CSS escapes
	// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters
	runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
		"?|\\\\([^\\r\\n\\f])", "g" ),
	funescape = function( escape, nonHex ) {
		var high = "0x" + escape.slice( 1 ) - 0x10000;

		if ( nonHex ) {

			// Strip the backslash prefix from a non-hex escape sequence
			return nonHex;
		}

		// Replace a hexadecimal escape sequence with the encoded Unicode code point
		// Support: IE <=11+
		// For values outside the Basic Multilingual Plane (BMP), manually construct a
		// surrogate pair
		return high < 0 ?
			String.fromCharCode( high + 0x10000 ) :
			String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
	},

	// Used for iframes; see `setDocument`.
	// Support: IE 9 - 11+, Edge 12 - 18+
	// Removing the function wrapper causes a "Permission Denied"
	// error in IE/Edge.
	unloadHandler = function() {
		setDocument();
	},

	inDisabledFieldset = addCombinator(
		function( elem ) {
			return elem.disabled === true && nodeName( elem, "fieldset" );
		},
		{ dir: "parentNode", next: "legend" }
	);

// Support: IE <=9 only
// Accessing document.activeElement can throw unexpectedly
// https://bugs.jquery.com/ticket/13393
function safeActiveElement() {
	try {
		return document.activeElement;
	} catch ( err ) { }
}

// Optimize for push.apply( _, NodeList )
try {
	push.apply(
		( arr = slice.call( preferredDoc.childNodes ) ),
		preferredDoc.childNodes
	);

	// Support: Android <=4.0
	// Detect silently failing push.apply
	// eslint-disable-next-line no-unused-expressions
	arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {
	push = {
		apply: function( target, els ) {
			pushNative.apply( target, slice.call( els ) );
		},
		call: function( target ) {
			pushNative.apply( target, slice.call( arguments, 1 ) );
		}
	};
}

function find( selector, context, results, seed ) {
	var m, i, elem, nid, match, groups, newSelector,
		newContext = context && context.ownerDocument,

		// nodeType defaults to 9, since context defaults to document
		nodeType = context ? context.nodeType : 9;

	results = results || [];

	// Return early from calls with invalid selector or context
	if ( typeof selector !== "string" || !selector ||
		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {

		return results;
	}

	// Try to shortcut find operations (as opposed to filters) in HTML documents
	if ( !seed ) {
		setDocument( context );
		context = context || document;

		if ( documentIsHTML ) {

			// If the selector is sufficiently simple, try using a "get*By*" DOM method
			// (excepting DocumentFragment context, where the methods don't exist)
			if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {

				// ID selector
				if ( ( m = match[ 1 ] ) ) {

					// Document context
					if ( nodeType === 9 ) {
						if ( ( elem = context.getElementById( m ) ) ) {

							// Support: IE 9 only
							// getElementById can match elements by name instead of ID
							if ( elem.id === m ) {
								push.call( results, elem );
								return results;
							}
						} else {
							return results;
						}

					// Element context
					} else {

						// Support: IE 9 only
						// getElementById can match elements by name instead of ID
						if ( newContext && ( elem = newContext.getElementById( m ) ) &&
							find.contains( context, elem ) &&
							elem.id === m ) {

							push.call( results, elem );
							return results;
						}
					}

				// Type selector
				} else if ( match[ 2 ] ) {
					push.apply( results, context.getElementsByTagName( selector ) );
					return results;

				// Class selector
				} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {
					push.apply( results, context.getElementsByClassName( m ) );
					return results;
				}
			}

			// Take advantage of querySelectorAll
			if ( !nonnativeSelectorCache[ selector + " " ] &&
				( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {

				newSelector = selector;
				newContext = context;

				// qSA considers elements outside a scoping root when evaluating child or
				// descendant combinators, which is not what we want.
				// In such cases, we work around the behavior by prefixing every selector in the
				// list with an ID selector referencing the scope context.
				// The technique has to be used as well when a leading combinator is used
				// as such selectors are not recognized by querySelectorAll.
				// Thanks to Andrew Dupont for this technique.
				if ( nodeType === 1 &&
					( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {

					// Expand context for sibling selectors
					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
						context;

					// We can use :scope instead of the ID hack if the browser
					// supports it & if we're not changing the context.
					// Support: IE 11+, Edge 17 - 18+
					// IE/Edge sometimes throw a "Permission denied" error when
					// strict-comparing two documents; shallow comparisons work.
					// eslint-disable-next-line eqeqeq
					if ( newContext != context || !support.scope ) {

						// Capture the context ID, setting it first if necessary
						if ( ( nid = context.getAttribute( "id" ) ) ) {
							nid = jQuery.escapeSelector( nid );
						} else {
							context.setAttribute( "id", ( nid = expando ) );
						}
					}

					// Prefix every selector in the list
					groups = tokenize( selector );
					i = groups.length;
					while ( i-- ) {
						groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
							toSelector( groups[ i ] );
					}
					newSelector = groups.join( "," );
				}

				try {
					push.apply( results,
						newContext.querySelectorAll( newSelector )
					);
					return results;
				} catch ( qsaError ) {
					nonnativeSelectorCache( selector, true );
				} finally {
					if ( nid === expando ) {
						context.removeAttribute( "id" );
					}
				}
			}
		}
	}

	// All others
	return select( selector.replace( rtrimCSS, "$1" ), context, results, seed );
}

/**
 * Create key-value caches of limited size
 * @returns {function(string, object)} Returns the Object data after storing it on itself with
 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
 *	deleting the oldest entry
 */
function createCache() {
	var keys = [];

	function cache( key, value ) {

		// Use (key + " ") to avoid collision with native prototype properties
		// (see https://github.com/jquery/sizzle/issues/157)
		if ( keys.push( key + " " ) > Expr.cacheLength ) {

			// Only keep the most recent entries
			delete cache[ keys.shift() ];
		}
		return ( cache[ key + " " ] = value );
	}
	return cache;
}

/**
 * Mark a function for special use by jQuery selector module
 * @param {Function} fn The function to mark
 */
function markFunction( fn ) {
	fn[ expando ] = true;
	return fn;
}

/**
 * Support testing using an element
 * @param {Function} fn Passed the created element and returns a boolean result
 */
function assert( fn ) {
	var el = document.createElement( "fieldset" );

	try {
		return !!fn( el );
	} catch ( e ) {
		return false;
	} finally {

		// Remove from its parent by default
		if ( el.parentNode ) {
			el.parentNode.removeChild( el );
		}

		// release memory in IE
		el = null;
	}
}

/**
 * Returns a function to use in pseudos for input types
 * @param {String} type
 */
function createInputPseudo( type ) {
	return function( elem ) {
		return nodeName( elem, "input" ) && elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for buttons
 * @param {String} type
 */
function createButtonPseudo( type ) {
	return function( elem ) {
		return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) &&
			elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for :enabled/:disabled
 * @param {Boolean} disabled true for :disabled; false for :enabled
 */
function createDisabledPseudo( disabled ) {

	// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
	return function( elem ) {

		// Only certain elements can match :enabled or :disabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
		if ( "form" in elem ) {

			// Check for inherited disabledness on relevant non-disabled elements:
			// * listed form-associated elements in a disabled fieldset
			//   https://html.spec.whatwg.org/multipage/forms.html#category-listed
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
			// * option elements in a disabled optgroup
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
			// All such elements have a "form" property.
			if ( elem.parentNode && elem.disabled === false ) {

				// Option elements defer to a parent optgroup if present
				if ( "label" in elem ) {
					if ( "label" in elem.parentNode ) {
						return elem.parentNode.disabled === disabled;
					} else {
						return elem.disabled === disabled;
					}
				}

				// Support: IE 6 - 11+
				// Use the isDisabled shortcut property to check for disabled fieldset ancestors
				return elem.isDisabled === disabled ||

					// Where there is no isDisabled, check manually
					elem.isDisabled !== !disabled &&
						inDisabledFieldset( elem ) === disabled;
			}

			return elem.disabled === disabled;

		// Try to winnow out elements that can't be disabled before trusting the disabled property.
		// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
		// even exist on them, let alone have a boolean value.
		} else if ( "label" in elem ) {
			return elem.disabled === disabled;
		}

		// Remaining elements are neither :enabled nor :disabled
		return false;
	};
}

/**
 * Returns a function to use in pseudos for positionals
 * @param {Function} fn
 */
function createPositionalPseudo( fn ) {
	return markFunction( function( argument ) {
		argument = +argument;
		return markFunction( function( seed, matches ) {
			var j,
				matchIndexes = fn( [], seed.length, argument ),
				i = matchIndexes.length;

			// Match elements found at the specified indexes
			while ( i-- ) {
				if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
					seed[ j ] = !( matches[ j ] = seed[ j ] );
				}
			}
		} );
	} );
}

/**
 * Checks a node for validity as a jQuery selector context
 * @param {Element|Object=} context
 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
 */
function testContext( context ) {
	return context && typeof context.getElementsByTagName !== "undefined" && context;
}

/**
 * Sets document-related variables once based on the current document
 * @param {Element|Object} [node] An element or document object to use to set the document
 * @returns {Object} Returns the current document
 */
function setDocument( node ) {
	var subWindow,
		doc = node ? node.ownerDocument || node : preferredDoc;

	// Return early if doc is invalid or already selected
	// Support: IE 11+, Edge 17 - 18+
	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {
		return document;
	}

	// Update global variables
	document = doc;
	documentElement = document.documentElement;
	documentIsHTML = !jQuery.isXMLDoc( document );

	// Support: iOS 7 only, IE 9 - 11+
	// Older browsers didn't support unprefixed `matches`.
	matches = documentElement.matches ||
		documentElement.webkitMatchesSelector ||
		documentElement.msMatchesSelector;

	// Support: IE 9 - 11+, Edge 12 - 18+
	// Accessing iframe documents after unload throws "permission denied" errors
	// (see trac-13936).
	// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,
	// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.
	if ( documentElement.msMatchesSelector &&

		// Support: IE 11+, Edge 17 - 18+
		// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
		// two documents; shallow comparisons work.
		// eslint-disable-next-line eqeqeq
		preferredDoc != document &&
		( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {

		// Support: IE 9 - 11+, Edge 12 - 18+
		subWindow.addEventListener( "unload", unloadHandler );
	}

	// Support: IE <10
	// Check if getElementById returns elements by name
	// The broken getElementById methods don't pick up programmatically-set names,
	// so use a roundabout getElementsByName test
	support.getById = assert( function( el ) {
		documentElement.appendChild( el ).id = jQuery.expando;
		return !document.getElementsByName ||
			!document.getElementsByName( jQuery.expando ).length;
	} );

	// Support: IE 9 only
	// Check to see if it's possible to do matchesSelector
	// on a disconnected node.
	support.disconnectedMatch = assert( function( el ) {
		return matches.call( el, "*" );
	} );

	// Support: IE 9 - 11+, Edge 12 - 18+
	// IE/Edge don't support the :scope pseudo-class.
	support.scope = assert( function() {
		return document.querySelectorAll( ":scope" );
	} );

	// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only
	// Make sure the `:has()` argument is parsed unforgivingly.
	// We include `*` in the test to detect buggy implementations that are
	// _selectively_ forgiving (specifically when the list includes at least
	// one valid selector).
	// Note that we treat complete lack of support for `:has()` as if it were
	// spec-compliant support, which is fine because use of `:has()` in such
	// environments will fail in the qSA path and fall back to jQuery traversal
	// anyway.
	support.cssHas = assert( function() {
		try {
			document.querySelector( ":has(*,:jqfake)" );
			return false;
		} catch ( e ) {
			return true;
		}
	} );

	// ID filter and find
	if ( support.getById ) {
		Expr.filter.ID = function( id ) {
			var attrId = id.replace( runescape, funescape );
			return function( elem ) {
				return elem.getAttribute( "id" ) === attrId;
			};
		};
		Expr.find.ID = function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var elem = context.getElementById( id );
				return elem ? [ elem ] : [];
			}
		};
	} else {
		Expr.filter.ID =  function( id ) {
			var attrId = id.replace( runescape, funescape );
			return function( elem ) {
				var node = typeof elem.getAttributeNode !== "undefined" &&
					elem.getAttributeNode( "id" );
				return node && node.value === attrId;
			};
		};

		// Support: IE 6 - 7 only
		// getElementById is not reliable as a find shortcut
		Expr.find.ID = function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var node, i, elems,
					elem = context.getElementById( id );

				if ( elem ) {

					// Verify the id attribute
					node = elem.getAttributeNode( "id" );
					if ( node && node.value === id ) {
						return [ elem ];
					}

					// Fall back on getElementsByName
					elems = context.getElementsByName( id );
					i = 0;
					while ( ( elem = elems[ i++ ] ) ) {
						node = elem.getAttributeNode( "id" );
						if ( node && node.value === id ) {
							return [ elem ];
						}
					}
				}

				return [];
			}
		};
	}

	// Tag
	Expr.find.TAG = function( tag, context ) {
		if ( typeof context.getElementsByTagName !== "undefined" ) {
			return context.getElementsByTagName( tag );

		// DocumentFragment nodes don't have gEBTN
		} else {
			return context.querySelectorAll( tag );
		}
	};

	// Class
	Expr.find.CLASS = function( className, context ) {
		if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
			return context.getElementsByClassName( className );
		}
	};

	/* QSA/matchesSelector
	---------------------------------------------------------------------- */

	// QSA and matchesSelector support

	rbuggyQSA = [];

	// Build QSA regex
	// Regex strategy adopted from Diego Perini
	assert( function( el ) {

		var input;

		documentElement.appendChild( el ).innerHTML =
			"<a id='" + expando + "' href='' disabled='disabled'></a>" +
			"<select id='" + expando + "-\r\\' disabled='disabled'>" +
			"<option selected=''></option></select>";

		// Support: iOS <=7 - 8 only
		// Boolean attributes and "value" are not treated correctly in some XML documents
		if ( !el.querySelectorAll( "[selected]" ).length ) {
			rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
		}

		// Support: iOS <=7 - 8 only
		if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
			rbuggyQSA.push( "~=" );
		}

		// Support: iOS 8 only
		// https://bugs.webkit.org/show_bug.cgi?id=136851
		// In-page `selector#id sibling-combinator selector` fails
		if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
			rbuggyQSA.push( ".#.+[+~]" );
		}

		// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
		// In some of the document kinds, these selectors wouldn't work natively.
		// This is probably OK but for backwards compatibility we want to maintain
		// handling them through jQuery traversal in jQuery 3.x.
		if ( !el.querySelectorAll( ":checked" ).length ) {
			rbuggyQSA.push( ":checked" );
		}

		// Support: Windows 8 Native Apps
		// The type and name attributes are restricted during .innerHTML assignment
		input = document.createElement( "input" );
		input.setAttribute( "type", "hidden" );
		el.appendChild( input ).setAttribute( "name", "D" );

		// Support: IE 9 - 11+
		// IE's :disabled selector does not pick up the children of disabled fieldsets
		// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
		// In some of the document kinds, these selectors wouldn't work natively.
		// This is probably OK but for backwards compatibility we want to maintain
		// handling them through jQuery traversal in jQuery 3.x.
		documentElement.appendChild( el ).disabled = true;
		if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
			rbuggyQSA.push( ":enabled", ":disabled" );
		}

		// Support: IE 11+, Edge 15 - 18+
		// IE 11/Edge don't find elements on a `[name='']` query in some cases.
		// Adding a temporary attribute to the document before the selection works
		// around the issue.
		// Interestingly, IE 10 & older don't seem to have the issue.
		input = document.createElement( "input" );
		input.setAttribute( "name", "" );
		el.appendChild( input );
		if ( !el.querySelectorAll( "[name='']" ).length ) {
			rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
				whitespace + "*(?:''|\"\")" );
		}
	} );

	if ( !support.cssHas ) {

		// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
		// Our regular `try-catch` mechanism fails to detect natively-unsupported
		// pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)
		// in browsers that parse the `:has()` argument as a forgiving selector list.
		// https://drafts.csswg.org/selectors/#relational now requires the argument
		// to be parsed unforgivingly, but browsers have not yet fully adjusted.
		rbuggyQSA.push( ":has" );
	}

	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );

	/* Sorting
	---------------------------------------------------------------------- */

	// Document order sorting
	sortOrder = function( a, b ) {

		// Flag for duplicate removal
		if ( a === b ) {
			hasDuplicate = true;
			return 0;
		}

		// Sort on method existence if only one input has compareDocumentPosition
		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
		if ( compare ) {
			return compare;
		}

		// Calculate position if both inputs belong to the same document
		// Support: IE 11+, Edge 17 - 18+
		// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
		// two documents; shallow comparisons work.
		// eslint-disable-next-line eqeqeq
		compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
			a.compareDocumentPosition( b ) :

			// Otherwise we know they are disconnected
			1;

		// Disconnected nodes
		if ( compare & 1 ||
			( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {

			// Choose the first element that is related to our preferred document
			// Support: IE 11+, Edge 17 - 18+
			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			// eslint-disable-next-line eqeqeq
			if ( a === document || a.ownerDocument == preferredDoc &&
				find.contains( preferredDoc, a ) ) {
				return -1;
			}

			// Support: IE 11+, Edge 17 - 18+
			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			// eslint-disable-next-line eqeqeq
			if ( b === document || b.ownerDocument == preferredDoc &&
				find.contains( preferredDoc, b ) ) {
				return 1;
			}

			// Maintain original order
			return sortInput ?
				( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
				0;
		}

		return compare & 4 ? -1 : 1;
	};

	return document;
}

find.matches = function( expr, elements ) {
	return find( expr, null, null, elements );
};

find.matchesSelector = function( elem, expr ) {
	setDocument( elem );

	if ( documentIsHTML &&
		!nonnativeSelectorCache[ expr + " " ] &&
		( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {

		try {
			var ret = matches.call( elem, expr );

			// IE 9's matchesSelector returns false on disconnected nodes
			if ( ret || support.disconnectedMatch ||

					// As well, disconnected nodes are said to be in a document
					// fragment in IE 9
					elem.document && elem.document.nodeType !== 11 ) {
				return ret;
			}
		} catch ( e ) {
			nonnativeSelectorCache( expr, true );
		}
	}

	return find( expr, document, null, [ elem ] ).length > 0;
};

find.contains = function( context, elem ) {

	// Set document vars if needed
	// Support: IE 11+, Edge 17 - 18+
	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( ( context.ownerDocument || context ) != document ) {
		setDocument( context );
	}
	return jQuery.contains( context, elem );
};


find.attr = function( elem, name ) {

	// Set document vars if needed
	// Support: IE 11+, Edge 17 - 18+
	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( ( elem.ownerDocument || elem ) != document ) {
		setDocument( elem );
	}

	var fn = Expr.attrHandle[ name.toLowerCase() ],

		// Don't get fooled by Object.prototype properties (see trac-13807)
		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
			fn( elem, name, !documentIsHTML ) :
			undefined;

	if ( val !== undefined ) {
		return val;
	}

	return elem.getAttribute( name );
};

find.error = function( msg ) {
	throw new Error( "Syntax error, unrecognized expression: " + msg );
};

/**
 * Document sorting and removing duplicates
 * @param {ArrayLike} results
 */
jQuery.uniqueSort = function( results ) {
	var elem,
		duplicates = [],
		j = 0,
		i = 0;

	// Unless we *know* we can detect duplicates, assume their presence
	//
	// Support: Android <=4.0+
	// Testing for detecting duplicates is unpredictable so instead assume we can't
	// depend on duplicate detection in all browsers without a stable sort.
	hasDuplicate = !support.sortStable;
	sortInput = !support.sortStable && slice.call( results, 0 );
	sort.call( results, sortOrder );

	if ( hasDuplicate ) {
		while ( ( elem = results[ i++ ] ) ) {
			if ( elem === results[ i ] ) {
				j = duplicates.push( i );
			}
		}
		while ( j-- ) {
			splice.call( results, duplicates[ j ], 1 );
		}
	}

	// Clear input after sorting to release objects
	// See https://github.com/jquery/sizzle/pull/225
	sortInput = null;

	return results;
};

jQuery.fn.uniqueSort = function() {
	return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );
};

Expr = jQuery.expr = {

	// Can be adjusted by the user
	cacheLength: 50,

	createPseudo: markFunction,

	match: matchExpr,

	attrHandle: {},

	find: {},

	relative: {
		">": { dir: "parentNode", first: true },
		" ": { dir: "parentNode" },
		"+": { dir: "previousSibling", first: true },
		"~": { dir: "previousSibling" }
	},

	preFilter: {
		ATTR: function( match ) {
			match[ 1 ] = match[ 1 ].replace( runescape, funescape );

			// Move the given value to match[3] whether quoted or unquoted
			match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" )
				.replace( runescape, funescape );

			if ( match[ 2 ] === "~=" ) {
				match[ 3 ] = " " + match[ 3 ] + " ";
			}

			return match.slice( 0, 4 );
		},

		CHILD: function( match ) {

			/* matches from matchExpr["CHILD"]
				1 type (only|nth|...)
				2 what (child|of-type)
				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
				4 xn-component of xn+y argument ([+-]?\d*n|)
				5 sign of xn-component
				6 x of xn-component
				7 sign of y-component
				8 y of y-component
			*/
			match[ 1 ] = match[ 1 ].toLowerCase();

			if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {

				// nth-* requires argument
				if ( !match[ 3 ] ) {
					find.error( match[ 0 ] );
				}

				// numeric x and y parameters for Expr.filter.CHILD
				// remember that false/true cast respectively to 0/1
				match[ 4 ] = +( match[ 4 ] ?
					match[ 5 ] + ( match[ 6 ] || 1 ) :
					2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
				);
				match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );

			// other types prohibit arguments
			} else if ( match[ 3 ] ) {
				find.error( match[ 0 ] );
			}

			return match;
		},

		PSEUDO: function( match ) {
			var excess,
				unquoted = !match[ 6 ] && match[ 2 ];

			if ( matchExpr.CHILD.test( match[ 0 ] ) ) {
				return null;
			}

			// Accept quoted arguments as-is
			if ( match[ 3 ] ) {
				match[ 2 ] = match[ 4 ] || match[ 5 ] || "";

			// Strip excess characters from unquoted arguments
			} else if ( unquoted && rpseudo.test( unquoted ) &&

				// Get excess from tokenize (recursively)
				( excess = tokenize( unquoted, true ) ) &&

				// advance to the next closing parenthesis
				( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {

				// excess is a negative index
				match[ 0 ] = match[ 0 ].slice( 0, excess );
				match[ 2 ] = unquoted.slice( 0, excess );
			}

			// Return only captures needed by the pseudo filter method (type and argument)
			return match.slice( 0, 3 );
		}
	},

	filter: {

		TAG: function( nodeNameSelector ) {
			var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
			return nodeNameSelector === "*" ?
				function() {
					return true;
				} :
				function( elem ) {
					return nodeName( elem, expectedNodeName );
				};
		},

		CLASS: function( className ) {
			var pattern = classCache[ className + " " ];

			return pattern ||
				( pattern = new RegExp( "(^|" + whitespace + ")" + className +
					"(" + whitespace + "|$)" ) ) &&
				classCache( className, function( elem ) {
					return pattern.test(
						typeof elem.className === "string" && elem.className ||
							typeof elem.getAttribute !== "undefined" &&
								elem.getAttribute( "class" ) ||
							""
					);
				} );
		},

		ATTR: function( name, operator, check ) {
			return function( elem ) {
				var result = find.attr( elem, name );

				if ( result == null ) {
					return operator === "!=";
				}
				if ( !operator ) {
					return true;
				}

				result += "";

				if ( operator === "=" ) {
					return result === check;
				}
				if ( operator === "!=" ) {
					return result !== check;
				}
				if ( operator === "^=" ) {
					return check && result.indexOf( check ) === 0;
				}
				if ( operator === "*=" ) {
					return check && result.indexOf( check ) > -1;
				}
				if ( operator === "$=" ) {
					return check && result.slice( -check.length ) === check;
				}
				if ( operator === "~=" ) {
					return ( " " + result.replace( rwhitespace, " " ) + " " )
						.indexOf( check ) > -1;
				}
				if ( operator === "|=" ) {
					return result === check || result.slice( 0, check.length + 1 ) === check + "-";
				}

				return false;
			};
		},

		CHILD: function( type, what, _argument, first, last ) {
			var simple = type.slice( 0, 3 ) !== "nth",
				forward = type.slice( -4 ) !== "last",
				ofType = what === "of-type";

			return first === 1 && last === 0 ?

				// Shortcut for :nth-*(n)
				function( elem ) {
					return !!elem.parentNode;
				} :

				function( elem, _context, xml ) {
					var cache, outerCache, node, nodeIndex, start,
						dir = simple !== forward ? "nextSibling" : "previousSibling",
						parent = elem.parentNode,
						name = ofType && elem.nodeName.toLowerCase(),
						useCache = !xml && !ofType,
						diff = false;

					if ( parent ) {

						// :(first|last|only)-(child|of-type)
						if ( simple ) {
							while ( dir ) {
								node = elem;
								while ( ( node = node[ dir ] ) ) {
									if ( ofType ?
										nodeName( node, name ) :
										node.nodeType === 1 ) {

										return false;
									}
								}

								// Reverse direction for :only-* (if we haven't yet done so)
								start = dir = type === "only" && !start && "nextSibling";
							}
							return true;
						}

						start = [ forward ? parent.firstChild : parent.lastChild ];

						// non-xml :nth-child(...) stores cache data on `parent`
						if ( forward && useCache ) {

							// Seek `elem` from a previously-cached index
							outerCache = parent[ expando ] || ( parent[ expando ] = {} );
							cache = outerCache[ type ] || [];
							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
							diff = nodeIndex && cache[ 2 ];
							node = nodeIndex && parent.childNodes[ nodeIndex ];

							while ( ( node = ++nodeIndex && node && node[ dir ] ||

								// Fallback to seeking `elem` from the start
								( diff = nodeIndex = 0 ) || start.pop() ) ) {

								// When found, cache indexes on `parent` and break
								if ( node.nodeType === 1 && ++diff && node === elem ) {
									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
									break;
								}
							}

						} else {

							// Use previously-cached element index if available
							if ( useCache ) {
								outerCache = elem[ expando ] || ( elem[ expando ] = {} );
								cache = outerCache[ type ] || [];
								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
								diff = nodeIndex;
							}

							// xml :nth-child(...)
							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
							if ( diff === false ) {

								// Use the same loop as above to seek `elem` from the start
								while ( ( node = ++nodeIndex && node && node[ dir ] ||
									( diff = nodeIndex = 0 ) || start.pop() ) ) {

									if ( ( ofType ?
										nodeName( node, name ) :
										node.nodeType === 1 ) &&
										++diff ) {

										// Cache the index of each encountered element
										if ( useCache ) {
											outerCache = node[ expando ] ||
												( node[ expando ] = {} );
											outerCache[ type ] = [ dirruns, diff ];
										}

										if ( node === elem ) {
											break;
										}
									}
								}
							}
						}

						// Incorporate the offset, then check against cycle size
						diff -= last;
						return diff === first || ( diff % first === 0 && diff / first >= 0 );
					}
				};
		},

		PSEUDO: function( pseudo, argument ) {

			// pseudo-class names are case-insensitive
			// https://www.w3.org/TR/selectors/#pseudo-classes
			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
			// Remember that setFilters inherits from pseudos
			var args,
				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
					find.error( "unsupported pseudo: " + pseudo );

			// The user may use createPseudo to indicate that
			// arguments are needed to create the filter function
			// just as jQuery does
			if ( fn[ expando ] ) {
				return fn( argument );
			}

			// But maintain support for old signatures
			if ( fn.length > 1 ) {
				args = [ pseudo, pseudo, "", argument ];
				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
					markFunction( function( seed, matches ) {
						var idx,
							matched = fn( seed, argument ),
							i = matched.length;
						while ( i-- ) {
							idx = indexOf.call( seed, matched[ i ] );
							seed[ idx ] = !( matches[ idx ] = matched[ i ] );
						}
					} ) :
					function( elem ) {
						return fn( elem, 0, args );
					};
			}

			return fn;
		}
	},

	pseudos: {

		// Potentially complex pseudos
		not: markFunction( function( selector ) {

			// Trim the selector passed to compile
			// to avoid treating leading and trailing
			// spaces as combinators
			var input = [],
				results = [],
				matcher = compile( selector.replace( rtrimCSS, "$1" ) );

			return matcher[ expando ] ?
				markFunction( function( seed, matches, _context, xml ) {
					var elem,
						unmatched = matcher( seed, null, xml, [] ),
						i = seed.length;

					// Match elements unmatched by `matcher`
					while ( i-- ) {
						if ( ( elem = unmatched[ i ] ) ) {
							seed[ i ] = !( matches[ i ] = elem );
						}
					}
				} ) :
				function( elem, _context, xml ) {
					input[ 0 ] = elem;
					matcher( input, null, xml, results );

					// Don't keep the element
					// (see https://github.com/jquery/sizzle/issues/299)
					input[ 0 ] = null;
					return !results.pop();
				};
		} ),

		has: markFunction( function( selector ) {
			return function( elem ) {
				return find( selector, elem ).length > 0;
			};
		} ),

		contains: markFunction( function( text ) {
			text = text.replace( runescape, funescape );
			return function( elem ) {
				return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;
			};
		} ),

		// "Whether an element is represented by a :lang() selector
		// is based solely on the element's language value
		// being equal to the identifier C,
		// or beginning with the identifier C immediately followed by "-".
		// The matching of C against the element's language value is performed case-insensitively.
		// The identifier C does not have to be a valid language name."
		// https://www.w3.org/TR/selectors/#lang-pseudo
		lang: markFunction( function( lang ) {

			// lang value must be a valid identifier
			if ( !ridentifier.test( lang || "" ) ) {
				find.error( "unsupported lang: " + lang );
			}
			lang = lang.replace( runescape, funescape ).toLowerCase();
			return function( elem ) {
				var elemLang;
				do {
					if ( ( elemLang = documentIsHTML ?
						elem.lang :
						elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {

						elemLang = elemLang.toLowerCase();
						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
					}
				} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
				return false;
			};
		} ),

		// Miscellaneous
		target: function( elem ) {
			var hash = window.location && window.location.hash;
			return hash && hash.slice( 1 ) === elem.id;
		},

		root: function( elem ) {
			return elem === documentElement;
		},

		focus: function( elem ) {
			return elem === safeActiveElement() &&
				document.hasFocus() &&
				!!( elem.type || elem.href || ~elem.tabIndex );
		},

		// Boolean properties
		enabled: createDisabledPseudo( false ),
		disabled: createDisabledPseudo( true ),

		checked: function( elem ) {

			// In CSS3, :checked should return both checked and selected elements
			// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
			return ( nodeName( elem, "input" ) && !!elem.checked ) ||
				( nodeName( elem, "option" ) && !!elem.selected );
		},

		selected: function( elem ) {

			// Support: IE <=11+
			// Accessing the selectedIndex property
			// forces the browser to treat the default option as
			// selected when in an optgroup.
			if ( elem.parentNode ) {
				// eslint-disable-next-line no-unused-expressions
				elem.parentNode.selectedIndex;
			}

			return elem.selected === true;
		},

		// Contents
		empty: function( elem ) {

			// https://www.w3.org/TR/selectors/#empty-pseudo
			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
			//   but not by others (comment: 8; processing instruction: 7; etc.)
			// nodeType < 6 works because attributes (2) do not appear as children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				if ( elem.nodeType < 6 ) {
					return false;
				}
			}
			return true;
		},

		parent: function( elem ) {
			return !Expr.pseudos.empty( elem );
		},

		// Element/input types
		header: function( elem ) {
			return rheader.test( elem.nodeName );
		},

		input: function( elem ) {
			return rinputs.test( elem.nodeName );
		},

		button: function( elem ) {
			return nodeName( elem, "input" ) && elem.type === "button" ||
				nodeName( elem, "button" );
		},

		text: function( elem ) {
			var attr;
			return nodeName( elem, "input" ) && elem.type === "text" &&

				// Support: IE <10 only
				// New HTML5 attribute values (e.g., "search") appear
				// with elem.type === "text"
				( ( attr = elem.getAttribute( "type" ) ) == null ||
					attr.toLowerCase() === "text" );
		},

		// Position-in-collection
		first: createPositionalPseudo( function() {
			return [ 0 ];
		} ),

		last: createPositionalPseudo( function( _matchIndexes, length ) {
			return [ length - 1 ];
		} ),

		eq: createPositionalPseudo( function( _matchIndexes, length, argument ) {
			return [ argument < 0 ? argument + length : argument ];
		} ),

		even: createPositionalPseudo( function( matchIndexes, length ) {
			var i = 0;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		odd: createPositionalPseudo( function( matchIndexes, length ) {
			var i = 1;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		lt: createPositionalPseudo( function( matchIndexes, length, argument ) {
			var i;

			if ( argument < 0 ) {
				i = argument + length;
			} else if ( argument > length ) {
				i = length;
			} else {
				i = argument;
			}

			for ( ; --i >= 0; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		gt: createPositionalPseudo( function( matchIndexes, length, argument ) {
			var i = argument < 0 ? argument + length : argument;
			for ( ; ++i < length; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} )
	}
};

Expr.pseudos.nth = Expr.pseudos.eq;

// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
	Expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {
	Expr.pseudos[ i ] = createButtonPseudo( i );
}

// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();

function tokenize( selector, parseOnly ) {
	var matched, match, tokens, type,
		soFar, groups, preFilters,
		cached = tokenCache[ selector + " " ];

	if ( cached ) {
		return parseOnly ? 0 : cached.slice( 0 );
	}

	soFar = selector;
	groups = [];
	preFilters = Expr.preFilter;

	while ( soFar ) {

		// Comma and first run
		if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
			if ( match ) {

				// Don't consume trailing commas as valid
				soFar = soFar.slice( match[ 0 ].length ) || soFar;
			}
			groups.push( ( tokens = [] ) );
		}

		matched = false;

		// Combinators
		if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
			matched = match.shift();
			tokens.push( {
				value: matched,

				// Cast descendant combinators to space
				type: match[ 0 ].replace( rtrimCSS, " " )
			} );
			soFar = soFar.slice( matched.length );
		}

		// Filters
		for ( type in Expr.filter ) {
			if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
				( match = preFilters[ type ]( match ) ) ) ) {
				matched = match.shift();
				tokens.push( {
					value: matched,
					type: type,
					matches: match
				} );
				soFar = soFar.slice( matched.length );
			}
		}

		if ( !matched ) {
			break;
		}
	}

	// Return the length of the invalid excess
	// if we're just parsing
	// Otherwise, throw an error or return tokens
	if ( parseOnly ) {
		return soFar.length;
	}

	return soFar ?
		find.error( selector ) :

		// Cache the tokens
		tokenCache( selector, groups ).slice( 0 );
}

function toSelector( tokens ) {
	var i = 0,
		len = tokens.length,
		selector = "";
	for ( ; i < len; i++ ) {
		selector += tokens[ i ].value;
	}
	return selector;
}

function addCombinator( matcher, combinator, base ) {
	var dir = combinator.dir,
		skip = combinator.next,
		key = skip || dir,
		checkNonElements = base && key === "parentNode",
		doneName = done++;

	return combinator.first ?

		// Check against closest ancestor/preceding element
		function( elem, context, xml ) {
			while ( ( elem = elem[ dir ] ) ) {
				if ( elem.nodeType === 1 || checkNonElements ) {
					return matcher( elem, context, xml );
				}
			}
			return false;
		} :

		// Check against all ancestor/preceding elements
		function( elem, context, xml ) {
			var oldCache, outerCache,
				newCache = [ dirruns, doneName ];

			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
			if ( xml ) {
				while ( ( elem = elem[ dir ] ) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						if ( matcher( elem, context, xml ) ) {
							return true;
						}
					}
				}
			} else {
				while ( ( elem = elem[ dir ] ) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						outerCache = elem[ expando ] || ( elem[ expando ] = {} );

						if ( skip && nodeName( elem, skip ) ) {
							elem = elem[ dir ] || elem;
						} else if ( ( oldCache = outerCache[ key ] ) &&
							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {

							// Assign to newCache so results back-propagate to previous elements
							return ( newCache[ 2 ] = oldCache[ 2 ] );
						} else {

							// Reuse newcache so results back-propagate to previous elements
							outerCache[ key ] = newCache;

							// A match means we're done; a fail means we have to keep checking
							if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
								return true;
							}
						}
					}
				}
			}
			return false;
		};
}

function elementMatcher( matchers ) {
	return matchers.length > 1 ?
		function( elem, context, xml ) {
			var i = matchers.length;
			while ( i-- ) {
				if ( !matchers[ i ]( elem, context, xml ) ) {
					return false;
				}
			}
			return true;
		} :
		matchers[ 0 ];
}

function multipleContexts( selector, contexts, results ) {
	var i = 0,
		len = contexts.length;
	for ( ; i < len; i++ ) {
		find( selector, contexts[ i ], results );
	}
	return results;
}

function condense( unmatched, map, filter, context, xml ) {
	var elem,
		newUnmatched = [],
		i = 0,
		len = unmatched.length,
		mapped = map != null;

	for ( ; i < len; i++ ) {
		if ( ( elem = unmatched[ i ] ) ) {
			if ( !filter || filter( elem, context, xml ) ) {
				newUnmatched.push( elem );
				if ( mapped ) {
					map.push( i );
				}
			}
		}
	}

	return newUnmatched;
}

function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
	if ( postFilter && !postFilter[ expando ] ) {
		postFilter = setMatcher( postFilter );
	}
	if ( postFinder && !postFinder[ expando ] ) {
		postFinder = setMatcher( postFinder, postSelector );
	}
	return markFunction( function( seed, results, context, xml ) {
		var temp, i, elem, matcherOut,
			preMap = [],
			postMap = [],
			preexisting = results.length,

			// Get initial elements from seed or context
			elems = seed ||
				multipleContexts( selector || "*",
					context.nodeType ? [ context ] : context, [] ),

			// Prefilter to get matcher input, preserving a map for seed-results synchronization
			matcherIn = preFilter && ( seed || !selector ) ?
				condense( elems, preMap, preFilter, context, xml ) :
				elems;

		if ( matcher ) {

			// If we have a postFinder, or filtered seed, or non-seed postFilter
			// or preexisting results,
			matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?

				// ...intermediate processing is necessary
				[] :

				// ...otherwise use results directly
				results;

			// Find primary matches
			matcher( matcherIn, matcherOut, context, xml );
		} else {
			matcherOut = matcherIn;
		}

		// Apply postFilter
		if ( postFilter ) {
			temp = condense( matcherOut, postMap );
			postFilter( temp, [], context, xml );

			// Un-match failing elements by moving them back to matcherIn
			i = temp.length;
			while ( i-- ) {
				if ( ( elem = temp[ i ] ) ) {
					matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
				}
			}
		}

		if ( seed ) {
			if ( postFinder || preFilter ) {
				if ( postFinder ) {

					// Get the final matcherOut by condensing this intermediate into postFinder contexts
					temp = [];
					i = matcherOut.length;
					while ( i-- ) {
						if ( ( elem = matcherOut[ i ] ) ) {

							// Restore matcherIn since elem is not yet a final match
							temp.push( ( matcherIn[ i ] = elem ) );
						}
					}
					postFinder( null, ( matcherOut = [] ), temp, xml );
				}

				// Move matched elements from seed to results to keep them synchronized
				i = matcherOut.length;
				while ( i-- ) {
					if ( ( elem = matcherOut[ i ] ) &&
						( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {

						seed[ temp ] = !( results[ temp ] = elem );
					}
				}
			}

		// Add elements to results, through postFinder if defined
		} else {
			matcherOut = condense(
				matcherOut === results ?
					matcherOut.splice( preexisting, matcherOut.length ) :
					matcherOut
			);
			if ( postFinder ) {
				postFinder( null, results, matcherOut, xml );
			} else {
				push.apply( results, matcherOut );
			}
		}
	} );
}

function matcherFromTokens( tokens ) {
	var checkContext, matcher, j,
		len = tokens.length,
		leadingRelative = Expr.relative[ tokens[ 0 ].type ],
		implicitRelative = leadingRelative || Expr.relative[ " " ],
		i = leadingRelative ? 1 : 0,

		// The foundational matcher ensures that elements are reachable from top-level context(s)
		matchContext = addCombinator( function( elem ) {
			return elem === checkContext;
		}, implicitRelative, true ),
		matchAnyContext = addCombinator( function( elem ) {
			return indexOf.call( checkContext, elem ) > -1;
		}, implicitRelative, true ),
		matchers = [ function( elem, context, xml ) {

			// Support: IE 11+, Edge 17 - 18+
			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			// eslint-disable-next-line eqeqeq
			var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (
				( checkContext = context ).nodeType ?
					matchContext( elem, context, xml ) :
					matchAnyContext( elem, context, xml ) );

			// Avoid hanging onto element
			// (see https://github.com/jquery/sizzle/issues/299)
			checkContext = null;
			return ret;
		} ];

	for ( ; i < len; i++ ) {
		if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {
			matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
		} else {
			matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );

			// Return special upon seeing a positional matcher
			if ( matcher[ expando ] ) {

				// Find the next relative operator (if any) for proper handling
				j = ++i;
				for ( ; j < len; j++ ) {
					if ( Expr.relative[ tokens[ j ].type ] ) {
						break;
					}
				}
				return setMatcher(
					i > 1 && elementMatcher( matchers ),
					i > 1 && toSelector(

						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
						tokens.slice( 0, i - 1 )
							.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
					).replace( rtrimCSS, "$1" ),
					matcher,
					i < j && matcherFromTokens( tokens.slice( i, j ) ),
					j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
					j < len && toSelector( tokens )
				);
			}
			matchers.push( matcher );
		}
	}

	return elementMatcher( matchers );
}

function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
	var bySet = setMatchers.length > 0,
		byElement = elementMatchers.length > 0,
		superMatcher = function( seed, context, xml, results, outermost ) {
			var elem, j, matcher,
				matchedCount = 0,
				i = "0",
				unmatched = seed && [],
				setMatched = [],
				contextBackup = outermostContext,

				// We must always have either seed elements or outermost context
				elems = seed || byElement && Expr.find.TAG( "*", outermost ),

				// Use integer dirruns iff this is the outermost matcher
				dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
				len = elems.length;

			if ( outermost ) {

				// Support: IE 11+, Edge 17 - 18+
				// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
				// two documents; shallow comparisons work.
				// eslint-disable-next-line eqeqeq
				outermostContext = context == document || context || outermost;
			}

			// Add elements passing elementMatchers directly to results
			// Support: iOS <=7 - 9 only
			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching
			// elements by id. (see trac-14142)
			for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
				if ( byElement && elem ) {
					j = 0;

					// Support: IE 11+, Edge 17 - 18+
					// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
					// two documents; shallow comparisons work.
					// eslint-disable-next-line eqeqeq
					if ( !context && elem.ownerDocument != document ) {
						setDocument( elem );
						xml = !documentIsHTML;
					}
					while ( ( matcher = elementMatchers[ j++ ] ) ) {
						if ( matcher( elem, context || document, xml ) ) {
							push.call( results, elem );
							break;
						}
					}
					if ( outermost ) {
						dirruns = dirrunsUnique;
					}
				}

				// Track unmatched elements for set filters
				if ( bySet ) {

					// They will have gone through all possible matchers
					if ( ( elem = !matcher && elem ) ) {
						matchedCount--;
					}

					// Lengthen the array for every element, matched or not
					if ( seed ) {
						unmatched.push( elem );
					}
				}
			}

			// `i` is now the count of elements visited above, and adding it to `matchedCount`
			// makes the latter nonnegative.
			matchedCount += i;

			// Apply set filters to unmatched elements
			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
			// no element matchers and no seed.
			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
			// numerically zero.
			if ( bySet && i !== matchedCount ) {
				j = 0;
				while ( ( matcher = setMatchers[ j++ ] ) ) {
					matcher( unmatched, setMatched, context, xml );
				}

				if ( seed ) {

					// Reintegrate element matches to eliminate the need for sorting
					if ( matchedCount > 0 ) {
						while ( i-- ) {
							if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
								setMatched[ i ] = pop.call( results );
							}
						}
					}

					// Discard index placeholder values to get only actual matches
					setMatched = condense( setMatched );
				}

				// Add matches to results
				push.apply( results, setMatched );

				// Seedless set matches succeeding multiple successful matchers stipulate sorting
				if ( outermost && !seed && setMatched.length > 0 &&
					( matchedCount + setMatchers.length ) > 1 ) {

					jQuery.uniqueSort( results );
				}
			}

			// Override manipulation of globals by nested matchers
			if ( outermost ) {
				dirruns = dirrunsUnique;
				outermostContext = contextBackup;
			}

			return unmatched;
		};

	return bySet ?
		markFunction( superMatcher ) :
		superMatcher;
}

function compile( selector, match /* Internal Use Only */ ) {
	var i,
		setMatchers = [],
		elementMatchers = [],
		cached = compilerCache[ selector + " " ];

	if ( !cached ) {

		// Generate a function of recursive functions that can be used to check each element
		if ( !match ) {
			match = tokenize( selector );
		}
		i = match.length;
		while ( i-- ) {
			cached = matcherFromTokens( match[ i ] );
			if ( cached[ expando ] ) {
				setMatchers.push( cached );
			} else {
				elementMatchers.push( cached );
			}
		}

		// Cache the compiled function
		cached = compilerCache( selector,
			matcherFromGroupMatchers( elementMatchers, setMatchers ) );

		// Save selector and tokenization
		cached.selector = selector;
	}
	return cached;
}

/**
 * A low-level selection function that works with jQuery's compiled
 *  selector functions
 * @param {String|Function} selector A selector or a pre-compiled
 *  selector function built with jQuery selector compile
 * @param {Element} context
 * @param {Array} [results]
 * @param {Array} [seed] A set of elements to match against
 */
function select( selector, context, results, seed ) {
	var i, tokens, token, type, find,
		compiled = typeof selector === "function" && selector,
		match = !seed && tokenize( ( selector = compiled.selector || selector ) );

	results = results || [];

	// Try to minimize operations if there is only one selector in the list and no seed
	// (the latter of which guarantees us context)
	if ( match.length === 1 ) {

		// Reduce context if the leading compound selector is an ID
		tokens = match[ 0 ] = match[ 0 ].slice( 0 );
		if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
				context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {

			context = ( Expr.find.ID(
				token.matches[ 0 ].replace( runescape, funescape ),
				context
			) || [] )[ 0 ];
			if ( !context ) {
				return results;

			// Precompiled matchers will still verify ancestry, so step up a level
			} else if ( compiled ) {
				context = context.parentNode;
			}

			selector = selector.slice( tokens.shift().value.length );
		}

		// Fetch a seed set for right-to-left matching
		i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;
		while ( i-- ) {
			token = tokens[ i ];

			// Abort if we hit a combinator
			if ( Expr.relative[ ( type = token.type ) ] ) {
				break;
			}
			if ( ( find = Expr.find[ type ] ) ) {

				// Search, expanding context for leading sibling combinators
				if ( ( seed = find(
					token.matches[ 0 ].replace( runescape, funescape ),
					rsibling.test( tokens[ 0 ].type ) &&
						testContext( context.parentNode ) || context
				) ) ) {

					// If seed is empty or no tokens remain, we can return early
					tokens.splice( i, 1 );
					selector = seed.length && toSelector( tokens );
					if ( !selector ) {
						push.apply( results, seed );
						return results;
					}

					break;
				}
			}
		}
	}

	// Compile and execute a filtering function if one is not provided
	// Provide `match` to avoid retokenization if we modified the selector above
	( compiled || compile( selector, match ) )(
		seed,
		context,
		!documentIsHTML,
		results,
		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
	);
	return results;
}

// One-time assignments

// Support: Android <=4.0 - 4.1+
// Sort stability
support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;

// Initialize against the default document
setDocument();

// Support: Android <=4.0 - 4.1+
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert( function( el ) {

	// Should return 1, but returns 4 (following)
	return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
} );

jQuery.find = find;

// Deprecated
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
jQuery.unique = jQuery.uniqueSort;

// These have always been private, but they used to be documented as part of
// Sizzle so let's maintain them for now for backwards compatibility purposes.
find.compile = compile;
find.select = select;
find.setDocument = setDocument;
find.tokenize = tokenize;

find.escape = jQuery.escapeSelector;
find.getText = jQuery.text;
find.isXML = jQuery.isXMLDoc;
find.selectors = jQuery.expr;
find.support = jQuery.support;
find.uniqueSort = jQuery.uniqueSort;

	/* eslint-enable */

} )();


var dir = function( elem, dir, until ) {
	var matched = [],
		truncate = until !== undefined;

	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
		if ( elem.nodeType === 1 ) {
			if ( truncate && jQuery( elem ).is( until ) ) {
				break;
			}
			matched.push( elem );
		}
	}
	return matched;
};


var siblings = function( n, elem ) {
	var matched = [];

	for ( ; n; n = n.nextSibling ) {
		if ( n.nodeType === 1 && n !== elem ) {
			matched.push( n );
		}
	}

	return matched;
};


var rneedsContext = jQuery.expr.match.needsContext;

var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );



// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {
	if ( isFunction( qualifier ) ) {
		return jQuery.grep( elements, function( elem, i ) {
			return !!qualifier.call( elem, i, elem ) !== not;
		} );
	}

	// Single element
	if ( qualifier.nodeType ) {
		return jQuery.grep( elements, function( elem ) {
			return ( elem === qualifier ) !== not;
		} );
	}

	// Arraylike of elements (jQuery, arguments, Array)
	if ( typeof qualifier !== "string" ) {
		return jQuery.grep( elements, function( elem ) {
			return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
		} );
	}

	// Filtered directly for both simple and complex selectors
	return jQuery.filter( qualifier, elements, not );
}

jQuery.filter = function( expr, elems, not ) {
	var elem = elems[ 0 ];

	if ( not ) {
		expr = ":not(" + expr + ")";
	}

	if ( elems.length === 1 && elem.nodeType === 1 ) {
		return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
	}

	return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
		return elem.nodeType === 1;
	} ) );
};

jQuery.fn.extend( {
	find: function( selector ) {
		var i, ret,
			len = this.length,
			self = this;

		if ( typeof selector !== "string" ) {
			return this.pushStack( jQuery( selector ).filter( function() {
				for ( i = 0; i < len; i++ ) {
					if ( jQuery.contains( self[ i ], this ) ) {
						return true;
					}
				}
			} ) );
		}

		ret = this.pushStack( [] );

		for ( i = 0; i < len; i++ ) {
			jQuery.find( selector, self[ i ], ret );
		}

		return len > 1 ? jQuery.uniqueSort( ret ) : ret;
	},
	filter: function( selector ) {
		return this.pushStack( winnow( this, selector || [], false ) );
	},
	not: function( selector ) {
		return this.pushStack( winnow( this, selector || [], true ) );
	},
	is: function( selector ) {
		return !!winnow(
			this,

			// If this is a positional/relative selector, check membership in the returned set
			// so $("p:first").is("p:last") won't return true for a doc with two "p".
			typeof selector === "string" && rneedsContext.test( selector ) ?
				jQuery( selector ) :
				selector || [],
			false
		).length;
	}
} );


// Initialize a jQuery object


// A central reference to the root jQuery(document)
var rootjQuery,

	// A simple way to check for HTML strings
	// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)
	// Strict HTML recognition (trac-11290: must start with <)
	// Shortcut simple #id case for speed
	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,

	init = jQuery.fn.init = function( selector, context, root ) {
		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {
			return this;
		}

		// Method init() accepts an alternate rootjQuery
		// so migrate can support jQuery.sub (gh-2101)
		root = root || rootjQuery;

		// Handle HTML strings
		if ( typeof selector === "string" ) {
			if ( selector[ 0 ] === "<" &&
				selector[ selector.length - 1 ] === ">" &&
				selector.length >= 3 ) {

				// Assume that strings that start and end with <> are HTML and skip the regex check
				match = [ null, selector, null ];

			} else {
				match = rquickExpr.exec( selector );
			}

			// Match html or make sure no context is specified for #id
			if ( match && ( match[ 1 ] || !context ) ) {

				// HANDLE: $(html) -> $(array)
				if ( match[ 1 ] ) {
					context = context instanceof jQuery ? context[ 0 ] : context;

					// Option to run scripts is true for back-compat
					// Intentionally let the error be thrown if parseHTML is not present
					jQuery.merge( this, jQuery.parseHTML(
						match[ 1 ],
						context && context.nodeType ? context.ownerDocument || context : document,
						true
					) );

					// HANDLE: $(html, props)
					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
						for ( match in context ) {

							// Properties of context are called as methods if possible
							if ( isFunction( this[ match ] ) ) {
								this[ match ]( context[ match ] );

							// ...and otherwise set as attributes
							} else {
								this.attr( match, context[ match ] );
							}
						}
					}

					return this;

				// HANDLE: $(#id)
				} else {
					elem = document.getElementById( match[ 2 ] );

					if ( elem ) {

						// Inject the element directly into the jQuery object
						this[ 0 ] = elem;
						this.length = 1;
					}
					return this;
				}

			// HANDLE: $(expr, $(...))
			} else if ( !context || context.jquery ) {
				return ( context || root ).find( selector );

			// HANDLE: $(expr, context)
			// (which is just equivalent to: $(context).find(expr)
			} else {
				return this.constructor( context ).find( selector );
			}

		// HANDLE: $(DOMElement)
		} else if ( selector.nodeType ) {
			this[ 0 ] = selector;
			this.length = 1;
			return this;

		// HANDLE: $(function)
		// Shortcut for document ready
		} else if ( isFunction( selector ) ) {
			return root.ready !== undefined ?
				root.ready( selector ) :

				// Execute immediately if ready is not present
				selector( jQuery );
		}

		return jQuery.makeArray( selector, this );
	};

// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;

// Initialize central reference
rootjQuery = jQuery( document );


var rparentsprev = /^(?:parents|prev(?:Until|All))/,

	// Methods guaranteed to produce a unique set when starting from a unique set
	guaranteedUnique = {
		children: true,
		contents: true,
		next: true,
		prev: true
	};

jQuery.fn.extend( {
	has: function( target ) {
		var targets = jQuery( target, this ),
			l = targets.length;

		return this.filter( function() {
			var i = 0;
			for ( ; i < l; i++ ) {
				if ( jQuery.contains( this, targets[ i ] ) ) {
					return true;
				}
			}
		} );
	},

	closest: function( selectors, context ) {
		var cur,
			i = 0,
			l = this.length,
			matched = [],
			targets = typeof selectors !== "string" && jQuery( selectors );

		// Positional selectors never match, since there's no _selection_ context
		if ( !rneedsContext.test( selectors ) ) {
			for ( ; i < l; i++ ) {
				for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {

					// Always skip document fragments
					if ( cur.nodeType < 11 && ( targets ?
						targets.index( cur ) > -1 :

						// Don't pass non-elements to jQuery#find
						cur.nodeType === 1 &&
							jQuery.find.matchesSelector( cur, selectors ) ) ) {

						matched.push( cur );
						break;
					}
				}
			}
		}

		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
	},

	// Determine the position of an element within the set
	index: function( elem ) {

		// No argument, return index in parent
		if ( !elem ) {
			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
		}

		// Index in selector
		if ( typeof elem === "string" ) {
			return indexOf.call( jQuery( elem ), this[ 0 ] );
		}

		// Locate the position of the desired element
		return indexOf.call( this,

			// If it receives a jQuery object, the first element is used
			elem.jquery ? elem[ 0 ] : elem
		);
	},

	add: function( selector, context ) {
		return this.pushStack(
			jQuery.uniqueSort(
				jQuery.merge( this.get(), jQuery( selector, context ) )
			)
		);
	},

	addBack: function( selector ) {
		return this.add( selector == null ?
			this.prevObject : this.prevObject.filter( selector )
		);
	}
} );

function sibling( cur, dir ) {
	while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
	return cur;
}

jQuery.each( {
	parent: function( elem ) {
		var parent = elem.parentNode;
		return parent && parent.nodeType !== 11 ? parent : null;
	},
	parents: function( elem ) {
		return dir( elem, "parentNode" );
	},
	parentsUntil: function( elem, _i, until ) {
		return dir( elem, "parentNode", until );
	},
	next: function( elem ) {
		return sibling( elem, "nextSibling" );
	},
	prev: function( elem ) {
		return sibling( elem, "previousSibling" );
	},
	nextAll: function( elem ) {
		return dir( elem, "nextSibling" );
	},
	prevAll: function( elem ) {
		return dir( elem, "previousSibling" );
	},
	nextUntil: function( elem, _i, until ) {
		return dir( elem, "nextSibling", until );
	},
	prevUntil: function( elem, _i, until ) {
		return dir( elem, "previousSibling", until );
	},
	siblings: function( elem ) {
		return siblings( ( elem.parentNode || {} ).firstChild, elem );
	},
	children: function( elem ) {
		return siblings( elem.firstChild );
	},
	contents: function( elem ) {
		if ( elem.contentDocument != null &&

			// Support: IE 11+
			// <object> elements with no `data` attribute has an object
			// `contentDocument` with a `null` prototype.
			getProto( elem.contentDocument ) ) {

			return elem.contentDocument;
		}

		// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
		// Treat the template element as a regular one in browsers that
		// don't support it.
		if ( nodeName( elem, "template" ) ) {
			elem = elem.content || elem;
		}

		return jQuery.merge( [], elem.childNodes );
	}
}, function( name, fn ) {
	jQuery.fn[ name ] = function( until, selector ) {
		var matched = jQuery.map( this, fn, until );

		if ( name.slice( -5 ) !== "Until" ) {
			selector = until;
		}

		if ( selector && typeof selector === "string" ) {
			matched = jQuery.filter( selector, matched );
		}

		if ( this.length > 1 ) {

			// Remove duplicates
			if ( !guaranteedUnique[ name ] ) {
				jQuery.uniqueSort( matched );
			}

			// Reverse order for parents* and prev-derivatives
			if ( rparentsprev.test( name ) ) {
				matched.reverse();
			}
		}

		return this.pushStack( matched );
	};
} );
var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );



// Convert String-formatted options into Object-formatted ones
function createOptions( options ) {
	var object = {};
	jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
		object[ flag ] = true;
	} );
	return object;
}

/*
 * Create a callback list using the following parameters:
 *
 *	options: an optional list of space-separated options that will change how
 *			the callback list behaves or a more traditional option object
 *
 * By default a callback list will act like an event callback list and can be
 * "fired" multiple times.
 *
 * Possible options:
 *
 *	once:			will ensure the callback list can only be fired once (like a Deferred)
 *
 *	memory:			will keep track of previous values and will call any callback added
 *					after the list has been fired right away with the latest "memorized"
 *					values (like a Deferred)
 *
 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
 *
 *	stopOnFalse:	interrupt callings when a callback returns false
 *
 */
jQuery.Callbacks = function( options ) {

	// Convert options from String-formatted to Object-formatted if needed
	// (we check in cache first)
	options = typeof options === "string" ?
		createOptions( options ) :
		jQuery.extend( {}, options );

	var // Flag to know if list is currently firing
		firing,

		// Last fire value for non-forgettable lists
		memory,

		// Flag to know if list was already fired
		fired,

		// Flag to prevent firing
		locked,

		// Actual callback list
		list = [],

		// Queue of execution data for repeatable lists
		queue = [],

		// Index of currently firing callback (modified by add/remove as needed)
		firingIndex = -1,

		// Fire callbacks
		fire = function() {

			// Enforce single-firing
			locked = locked || options.once;

			// Execute callbacks for all pending executions,
			// respecting firingIndex overrides and runtime changes
			fired = firing = true;
			for ( ; queue.length; firingIndex = -1 ) {
				memory = queue.shift();
				while ( ++firingIndex < list.length ) {

					// Run callback and check for early termination
					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
						options.stopOnFalse ) {

						// Jump to end and forget the data so .add doesn't re-fire
						firingIndex = list.length;
						memory = false;
					}
				}
			}

			// Forget the data if we're done with it
			if ( !options.memory ) {
				memory = false;
			}

			firing = false;

			// Clean up if we're done firing for good
			if ( locked ) {

				// Keep an empty list if we have data for future add calls
				if ( memory ) {
					list = [];

				// Otherwise, this object is spent
				} else {
					list = "";
				}
			}
		},

		// Actual Callbacks object
		self = {

			// Add a callback or a collection of callbacks to the list
			add: function() {
				if ( list ) {

					// If we have memory from a past run, we should fire after adding
					if ( memory && !firing ) {
						firingIndex = list.length - 1;
						queue.push( memory );
					}

					( function add( args ) {
						jQuery.each( args, function( _, arg ) {
							if ( isFunction( arg ) ) {
								if ( !options.unique || !self.has( arg ) ) {
									list.push( arg );
								}
							} else if ( arg && arg.length && toType( arg ) !== "string" ) {

								// Inspect recursively
								add( arg );
							}
						} );
					} )( arguments );

					if ( memory && !firing ) {
						fire();
					}
				}
				return this;
			},

			// Remove a callback from the list
			remove: function() {
				jQuery.each( arguments, function( _, arg ) {
					var index;
					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
						list.splice( index, 1 );

						// Handle firing indexes
						if ( index <= firingIndex ) {
							firingIndex--;
						}
					}
				} );
				return this;
			},

			// Check if a given callback is in the list.
			// If no argument is given, return whether or not list has callbacks attached.
			has: function( fn ) {
				return fn ?
					jQuery.inArray( fn, list ) > -1 :
					list.length > 0;
			},

			// Remove all callbacks from the list
			empty: function() {
				if ( list ) {
					list = [];
				}
				return this;
			},

			// Disable .fire and .add
			// Abort any current/pending executions
			// Clear all callbacks and values
			disable: function() {
				locked = queue = [];
				list = memory = "";
				return this;
			},
			disabled: function() {
				return !list;
			},

			// Disable .fire
			// Also disable .add unless we have memory (since it would have no effect)
			// Abort any pending executions
			lock: function() {
				locked = queue = [];
				if ( !memory && !firing ) {
					list = memory = "";
				}
				return this;
			},
			locked: function() {
				return !!locked;
			},

			// Call all callbacks with the given context and arguments
			fireWith: function( context, args ) {
				if ( !locked ) {
					args = args || [];
					args = [ context, args.slice ? args.slice() : args ];
					queue.push( args );
					if ( !firing ) {
						fire();
					}
				}
				return this;
			},

			// Call all the callbacks with the given arguments
			fire: function() {
				self.fireWith( this, arguments );
				return this;
			},

			// To know if the callbacks have already been called at least once
			fired: function() {
				return !!fired;
			}
		};

	return self;
};


function Identity( v ) {
	return v;
}
function Thrower( ex ) {
	throw ex;
}

function adoptValue( value, resolve, reject, noValue ) {
	var method;

	try {

		// Check for promise aspect first to privilege synchronous behavior
		if ( value && isFunction( ( method = value.promise ) ) ) {
			method.call( value ).done( resolve ).fail( reject );

		// Other thenables
		} else if ( value && isFunction( ( method = value.then ) ) ) {
			method.call( value, resolve, reject );

		// Other non-thenables
		} else {

			// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
			// * false: [ value ].slice( 0 ) => resolve( value )
			// * true: [ value ].slice( 1 ) => resolve()
			resolve.apply( undefined, [ value ].slice( noValue ) );
		}

	// For Promises/A+, convert exceptions into rejections
	// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
	// Deferred#then to conditionally suppress rejection.
	} catch ( value ) {

		// Support: Android 4.0 only
		// Strict mode functions invoked without .call/.apply get global-object context
		reject.apply( undefined, [ value ] );
	}
}

jQuery.extend( {

	Deferred: function( func ) {
		var tuples = [

				// action, add listener, callbacks,
				// ... .then handlers, argument index, [final state]
				[ "notify", "progress", jQuery.Callbacks( "memory" ),
					jQuery.Callbacks( "memory" ), 2 ],
				[ "resolve", "done", jQuery.Callbacks( "once memory" ),
					jQuery.Callbacks( "once memory" ), 0, "resolved" ],
				[ "reject", "fail", jQuery.Callbacks( "once memory" ),
					jQuery.Callbacks( "once memory" ), 1, "rejected" ]
			],
			state = "pending",
			promise = {
				state: function() {
					return state;
				},
				always: function() {
					deferred.done( arguments ).fail( arguments );
					return this;
				},
				"catch": function( fn ) {
					return promise.then( null, fn );
				},

				// Keep pipe for back-compat
				pipe: function( /* fnDone, fnFail, fnProgress */ ) {
					var fns = arguments;

					return jQuery.Deferred( function( newDefer ) {
						jQuery.each( tuples, function( _i, tuple ) {

							// Map tuples (progress, done, fail) to arguments (done, fail, progress)
							var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];

							// deferred.progress(function() { bind to newDefer or newDefer.notify })
							// deferred.done(function() { bind to newDefer or newDefer.resolve })
							// deferred.fail(function() { bind to newDefer or newDefer.reject })
							deferred[ tuple[ 1 ] ]( function() {
								var returned = fn && fn.apply( this, arguments );
								if ( returned && isFunction( returned.promise ) ) {
									returned.promise()
										.progress( newDefer.notify )
										.done( newDefer.resolve )
										.fail( newDefer.reject );
								} else {
									newDefer[ tuple[ 0 ] + "With" ](
										this,
										fn ? [ returned ] : arguments
									);
								}
							} );
						} );
						fns = null;
					} ).promise();
				},
				then: function( onFulfilled, onRejected, onProgress ) {
					var maxDepth = 0;
					function resolve( depth, deferred, handler, special ) {
						return function() {
							var that = this,
								args = arguments,
								mightThrow = function() {
									var returned, then;

									// Support: Promises/A+ section 2.3.3.3.3
									// https://promisesaplus.com/#point-59
									// Ignore double-resolution attempts
									if ( depth < maxDepth ) {
										return;
									}

									returned = handler.apply( that, args );

									// Support: Promises/A+ section 2.3.1
									// https://promisesaplus.com/#point-48
									if ( returned === deferred.promise() ) {
										throw new TypeError( "Thenable self-resolution" );
									}

									// Support: Promises/A+ sections 2.3.3.1, 3.5
									// https://promisesaplus.com/#point-54
									// https://promisesaplus.com/#point-75
									// Retrieve `then` only once
									then = returned &&

										// Support: Promises/A+ section 2.3.4
										// https://promisesaplus.com/#point-64
										// Only check objects and functions for thenability
										( typeof returned === "object" ||
											typeof returned === "function" ) &&
										returned.then;

									// Handle a returned thenable
									if ( isFunction( then ) ) {

										// Special processors (notify) just wait for resolution
										if ( special ) {
											then.call(
												returned,
												resolve( maxDepth, deferred, Identity, special ),
												resolve( maxDepth, deferred, Thrower, special )
											);

										// Normal processors (resolve) also hook into progress
										} else {

											// ...and disregard older resolution values
											maxDepth++;

											then.call(
												returned,
												resolve( maxDepth, deferred, Identity, special ),
												resolve( maxDepth, deferred, Thrower, special ),
												resolve( maxDepth, deferred, Identity,
													deferred.notifyWith )
											);
										}

									// Handle all other returned values
									} else {

										// Only substitute handlers pass on context
										// and multiple values (non-spec behavior)
										if ( handler !== Identity ) {
											that = undefined;
											args = [ returned ];
										}

										// Process the value(s)
										// Default process is resolve
										( special || deferred.resolveWith )( that, args );
									}
								},

								// Only normal processors (resolve) catch and reject exceptions
								process = special ?
									mightThrow :
									function() {
										try {
											mightThrow();
										} catch ( e ) {

											if ( jQuery.Deferred.exceptionHook ) {
												jQuery.Deferred.exceptionHook( e,
													process.error );
											}

											// Support: Promises/A+ section 2.3.3.3.4.1
											// https://promisesaplus.com/#point-61
											// Ignore post-resolution exceptions
											if ( depth + 1 >= maxDepth ) {

												// Only substitute handlers pass on context
												// and multiple values (non-spec behavior)
												if ( handler !== Thrower ) {
													that = undefined;
													args = [ e ];
												}

												deferred.rejectWith( that, args );
											}
										}
									};

							// Support: Promises/A+ section 2.3.3.3.1
							// https://promisesaplus.com/#point-57
							// Re-resolve promises immediately to dodge false rejection from
							// subsequent errors
							if ( depth ) {
								process();
							} else {

								// Call an optional hook to record the error, in case of exception
								// since it's otherwise lost when execution goes async
								if ( jQuery.Deferred.getErrorHook ) {
									process.error = jQuery.Deferred.getErrorHook();

								// The deprecated alias of the above. While the name suggests
								// returning the stack, not an error instance, jQuery just passes
								// it directly to `console.warn` so both will work; an instance
								// just better cooperates with source maps.
								} else if ( jQuery.Deferred.getStackHook ) {
									process.error = jQuery.Deferred.getStackHook();
								}
								window.setTimeout( process );
							}
						};
					}

					return jQuery.Deferred( function( newDefer ) {

						// progress_handlers.add( ... )
						tuples[ 0 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onProgress ) ?
									onProgress :
									Identity,
								newDefer.notifyWith
							)
						);

						// fulfilled_handlers.add( ... )
						tuples[ 1 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onFulfilled ) ?
									onFulfilled :
									Identity
							)
						);

						// rejected_handlers.add( ... )
						tuples[ 2 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onRejected ) ?
									onRejected :
									Thrower
							)
						);
					} ).promise();
				},

				// Get a promise for this deferred
				// If obj is provided, the promise aspect is added to the object
				promise: function( obj ) {
					return obj != null ? jQuery.extend( obj, promise ) : promise;
				}
			},
			deferred = {};

		// Add list-specific methods
		jQuery.each( tuples, function( i, tuple ) {
			var list = tuple[ 2 ],
				stateString = tuple[ 5 ];

			// promise.progress = list.add
			// promise.done = list.add
			// promise.fail = list.add
			promise[ tuple[ 1 ] ] = list.add;

			// Handle state
			if ( stateString ) {
				list.add(
					function() {

						// state = "resolved" (i.e., fulfilled)
						// state = "rejected"
						state = stateString;
					},

					// rejected_callbacks.disable
					// fulfilled_callbacks.disable
					tuples[ 3 - i ][ 2 ].disable,

					// rejected_handlers.disable
					// fulfilled_handlers.disable
					tuples[ 3 - i ][ 3 ].disable,

					// progress_callbacks.lock
					tuples[ 0 ][ 2 ].lock,

					// progress_handlers.lock
					tuples[ 0 ][ 3 ].lock
				);
			}

			// progress_handlers.fire
			// fulfilled_handlers.fire
			// rejected_handlers.fire
			list.add( tuple[ 3 ].fire );

			// deferred.notify = function() { deferred.notifyWith(...) }
			// deferred.resolve = function() { deferred.resolveWith(...) }
			// deferred.reject = function() { deferred.rejectWith(...) }
			deferred[ tuple[ 0 ] ] = function() {
				deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
				return this;
			};

			// deferred.notifyWith = list.fireWith
			// deferred.resolveWith = list.fireWith
			// deferred.rejectWith = list.fireWith
			deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
		} );

		// Make the deferred a promise
		promise.promise( deferred );

		// Call given func if any
		if ( func ) {
			func.call( deferred, deferred );
		}

		// All done!
		return deferred;
	},

	// Deferred helper
	when: function( singleValue ) {
		var

			// count of uncompleted subordinates
			remaining = arguments.length,

			// count of unprocessed arguments
			i = remaining,

			// subordinate fulfillment data
			resolveContexts = Array( i ),
			resolveValues = slice.call( arguments ),

			// the primary Deferred
			primary = jQuery.Deferred(),

			// subordinate callback factory
			updateFunc = function( i ) {
				return function( value ) {
					resolveContexts[ i ] = this;
					resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
					if ( !( --remaining ) ) {
						primary.resolveWith( resolveContexts, resolveValues );
					}
				};
			};

		// Single- and empty arguments are adopted like Promise.resolve
		if ( remaining <= 1 ) {
			adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
				!remaining );

			// Use .then() to unwrap secondary thenables (cf. gh-3000)
			if ( primary.state() === "pending" ||
				isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {

				return primary.then();
			}
		}

		// Multiple arguments are aggregated like Promise.all array elements
		while ( i-- ) {
			adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
		}

		return primary.promise();
	}
} );


// These usually indicate a programmer mistake during development,
// warn about them ASAP rather than swallowing them by default.
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;

// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
// captured before the async barrier to get the original error cause
// which may otherwise be hidden.
jQuery.Deferred.exceptionHook = function( error, asyncError ) {

	// Support: IE 8 - 9 only
	// Console exists when dev tools are open, which can happen at any time
	if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
		window.console.warn( "jQuery.Deferred exception: " + error.message,
			error.stack, asyncError );
	}
};




jQuery.readyException = function( error ) {
	window.setTimeout( function() {
		throw error;
	} );
};




// The deferred used on DOM ready
var readyList = jQuery.Deferred();

jQuery.fn.ready = function( fn ) {

	readyList
		.then( fn )

		// Wrap jQuery.readyException in a function so that the lookup
		// happens at the time of error handling instead of callback
		// registration.
		.catch( function( error ) {
			jQuery.readyException( error );
		} );

	return this;
};

jQuery.extend( {

	// Is the DOM ready to be used? Set to true once it occurs.
	isReady: false,

	// A counter to track how many items to wait for before
	// the ready event fires. See trac-6781
	readyWait: 1,

	// Handle when the DOM is ready
	ready: function( wait ) {

		// Abort if there are pending holds or we're already ready
		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
			return;
		}

		// Remember that the DOM is ready
		jQuery.isReady = true;

		// If a normal DOM Ready event fired, decrement, and wait if need be
		if ( wait !== true && --jQuery.readyWait > 0 ) {
			return;
		}

		// If there are functions bound, to execute
		readyList.resolveWith( document, [ jQuery ] );
	}
} );

jQuery.ready.then = readyList.then;

// The ready event handler and self cleanup method
function completed() {
	document.removeEventListener( "DOMContentLoaded", completed );
	window.removeEventListener( "load", completed );
	jQuery.ready();
}

// Catch cases where $(document).ready() is called
// after the browser event has already occurred.
// Support: IE <=9 - 10 only
// Older IE sometimes signals "interactive" too soon
if ( document.readyState === "complete" ||
	( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {

	// Handle it asynchronously to allow scripts the opportunity to delay ready
	window.setTimeout( jQuery.ready );

} else {

	// Use the handy event callback
	document.addEventListener( "DOMContentLoaded", completed );

	// A fallback to window.onload, that will always work
	window.addEventListener( "load", completed );
}




// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
	var i = 0,
		len = elems.length,
		bulk = key == null;

	// Sets many values
	if ( toType( key ) === "object" ) {
		chainable = true;
		for ( i in key ) {
			access( elems, fn, i, key[ i ], true, emptyGet, raw );
		}

	// Sets one value
	} else if ( value !== undefined ) {
		chainable = true;

		if ( !isFunction( value ) ) {
			raw = true;
		}

		if ( bulk ) {

			// Bulk operations run against the entire set
			if ( raw ) {
				fn.call( elems, value );
				fn = null;

			// ...except when executing function values
			} else {
				bulk = fn;
				fn = function( elem, _key, value ) {
					return bulk.call( jQuery( elem ), value );
				};
			}
		}

		if ( fn ) {
			for ( ; i < len; i++ ) {
				fn(
					elems[ i ], key, raw ?
						value :
						value.call( elems[ i ], i, fn( elems[ i ], key ) )
				);
			}
		}
	}

	if ( chainable ) {
		return elems;
	}

	// Gets
	if ( bulk ) {
		return fn.call( elems );
	}

	return len ? fn( elems[ 0 ], key ) : emptyGet;
};


// Matches dashed string for camelizing
var rmsPrefix = /^-ms-/,
	rdashAlpha = /-([a-z])/g;

// Used by camelCase as callback to replace()
function fcamelCase( _all, letter ) {
	return letter.toUpperCase();
}

// Convert dashed to camelCase; used by the css and data modules
// Support: IE <=9 - 11, Edge 12 - 15
// Microsoft forgot to hump their vendor prefix (trac-9572)
function camelCase( string ) {
	return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
}
var acceptData = function( owner ) {

	// Accepts only:
	//  - Node
	//    - Node.ELEMENT_NODE
	//    - Node.DOCUMENT_NODE
	//  - Object
	//    - Any
	return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
};




function Data() {
	this.expando = jQuery.expando + Data.uid++;
}

Data.uid = 1;

Data.prototype = {

	cache: function( owner ) {

		// Check if the owner object already has a cache
		var value = owner[ this.expando ];

		// If not, create one
		if ( !value ) {
			value = {};

			// We can accept data for non-element nodes in modern browsers,
			// but we should not, see trac-8335.
			// Always return an empty object.
			if ( acceptData( owner ) ) {

				// If it is a node unlikely to be stringify-ed or looped over
				// use plain assignment
				if ( owner.nodeType ) {
					owner[ this.expando ] = value;

				// Otherwise secure it in a non-enumerable property
				// configurable must be true to allow the property to be
				// deleted when data is removed
				} else {
					Object.defineProperty( owner, this.expando, {
						value: value,
						configurable: true
					} );
				}
			}
		}

		return value;
	},
	set: function( owner, data, value ) {
		var prop,
			cache = this.cache( owner );

		// Handle: [ owner, key, value ] args
		// Always use camelCase key (gh-2257)
		if ( typeof data === "string" ) {
			cache[ camelCase( data ) ] = value;

		// Handle: [ owner, { properties } ] args
		} else {

			// Copy the properties one-by-one to the cache object
			for ( prop in data ) {
				cache[ camelCase( prop ) ] = data[ prop ];
			}
		}
		return cache;
	},
	get: function( owner, key ) {
		return key === undefined ?
			this.cache( owner ) :

			// Always use camelCase key (gh-2257)
			owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
	},
	access: function( owner, key, value ) {

		// In cases where either:
		//
		//   1. No key was specified
		//   2. A string key was specified, but no value provided
		//
		// Take the "read" path and allow the get method to determine
		// which value to return, respectively either:
		//
		//   1. The entire cache object
		//   2. The data stored at the key
		//
		if ( key === undefined ||
				( ( key && typeof key === "string" ) && value === undefined ) ) {

			return this.get( owner, key );
		}

		// When the key is not a string, or both a key and value
		// are specified, set or extend (existing objects) with either:
		//
		//   1. An object of properties
		//   2. A key and value
		//
		this.set( owner, key, value );

		// Since the "set" path can have two possible entry points
		// return the expected data based on which path was taken[*]
		return value !== undefined ? value : key;
	},
	remove: function( owner, key ) {
		var i,
			cache = owner[ this.expando ];

		if ( cache === undefined ) {
			return;
		}

		if ( key !== undefined ) {

			// Support array or space separated string of keys
			if ( Array.isArray( key ) ) {

				// If key is an array of keys...
				// We always set camelCase keys, so remove that.
				key = key.map( camelCase );
			} else {
				key = camelCase( key );

				// If a key with the spaces exists, use it.
				// Otherwise, create an array by matching non-whitespace
				key = key in cache ?
					[ key ] :
					( key.match( rnothtmlwhite ) || [] );
			}

			i = key.length;

			while ( i-- ) {
				delete cache[ key[ i ] ];
			}
		}

		// Remove the expando if there's no more data
		if ( key === undefined || jQuery.isEmptyObject( cache ) ) {

			// Support: Chrome <=35 - 45
			// Webkit & Blink performance suffers when deleting properties
			// from DOM nodes, so set to undefined instead
			// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
			if ( owner.nodeType ) {
				owner[ this.expando ] = undefined;
			} else {
				delete owner[ this.expando ];
			}
		}
	},
	hasData: function( owner ) {
		var cache = owner[ this.expando ];
		return cache !== undefined && !jQuery.isEmptyObject( cache );
	}
};
var dataPriv = new Data();

var dataUser = new Data();



//	Implementation Summary
//
//	1. Enforce API surface and semantic compatibility with 1.9.x branch
//	2. Improve the module's maintainability by reducing the storage
//		paths to a single mechanism.
//	3. Use the same single mechanism to support "private" and "user" data.
//	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
//	5. Avoid exposing implementation details on user objects (eg. expando properties)
//	6. Provide a clear path for implementation upgrade to WeakMap in 2014

var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
	rmultiDash = /[A-Z]/g;

function getData( data ) {
	if ( data === "true" ) {
		return true;
	}

	if ( data === "false" ) {
		return false;
	}

	if ( data === "null" ) {
		return null;
	}

	// Only convert to a number if it doesn't change the string
	if ( data === +data + "" ) {
		return +data;
	}

	if ( rbrace.test( data ) ) {
		return JSON.parse( data );
	}

	return data;
}

function dataAttr( elem, key, data ) {
	var name;

	// If nothing was found internally, try to fetch any
	// data from the HTML5 data-* attribute
	if ( data === undefined && elem.nodeType === 1 ) {
		name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
		data = elem.getAttribute( name );

		if ( typeof data === "string" ) {
			try {
				data = getData( data );
			} catch ( e ) {}

			// Make sure we set the data so it isn't changed later
			dataUser.set( elem, key, data );
		} else {
			data = undefined;
		}
	}
	return data;
}

jQuery.extend( {
	hasData: function( elem ) {
		return dataUser.hasData( elem ) || dataPriv.hasData( elem );
	},

	data: function( elem, name, data ) {
		return dataUser.access( elem, name, data );
	},

	removeData: function( elem, name ) {
		dataUser.remove( elem, name );
	},

	// TODO: Now that all calls to _data and _removeData have been replaced
	// with direct calls to dataPriv methods, these can be deprecated.
	_data: function( elem, name, data ) {
		return dataPriv.access( elem, name, data );
	},

	_removeData: function( elem, name ) {
		dataPriv.remove( elem, name );
	}
} );

jQuery.fn.extend( {
	data: function( key, value ) {
		var i, name, data,
			elem = this[ 0 ],
			attrs = elem && elem.attributes;

		// Gets all values
		if ( key === undefined ) {
			if ( this.length ) {
				data = dataUser.get( elem );

				if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
					i = attrs.length;
					while ( i-- ) {

						// Support: IE 11 only
						// The attrs elements can be null (trac-14894)
						if ( attrs[ i ] ) {
							name = attrs[ i ].name;
							if ( name.indexOf( "data-" ) === 0 ) {
								name = camelCase( name.slice( 5 ) );
								dataAttr( elem, name, data[ name ] );
							}
						}
					}
					dataPriv.set( elem, "hasDataAttrs", true );
				}
			}

			return data;
		}

		// Sets multiple values
		if ( typeof key === "object" ) {
			return this.each( function() {
				dataUser.set( this, key );
			} );
		}

		return access( this, function( value ) {
			var data;

			// The calling jQuery object (element matches) is not empty
			// (and therefore has an element appears at this[ 0 ]) and the
			// `value` parameter was not undefined. An empty jQuery object
			// will result in `undefined` for elem = this[ 0 ] which will
			// throw an exception if an attempt to read a data cache is made.
			if ( elem && value === undefined ) {

				// Attempt to get data from the cache
				// The key will always be camelCased in Data
				data = dataUser.get( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// Attempt to "discover" the data in
				// HTML5 custom data-* attrs
				data = dataAttr( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// We tried really hard, but the data doesn't exist.
				return;
			}

			// Set the data...
			this.each( function() {

				// We always store the camelCased key
				dataUser.set( this, key, value );
			} );
		}, null, value, arguments.length > 1, null, true );
	},

	removeData: function( key ) {
		return this.each( function() {
			dataUser.remove( this, key );
		} );
	}
} );


jQuery.extend( {
	queue: function( elem, type, data ) {
		var queue;

		if ( elem ) {
			type = ( type || "fx" ) + "queue";
			queue = dataPriv.get( elem, type );

			// Speed up dequeue by getting out quickly if this is just a lookup
			if ( data ) {
				if ( !queue || Array.isArray( data ) ) {
					queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
				} else {
					queue.push( data );
				}
			}
			return queue || [];
		}
	},

	dequeue: function( elem, type ) {
		type = type || "fx";

		var queue = jQuery.queue( elem, type ),
			startLength = queue.length,
			fn = queue.shift(),
			hooks = jQuery._queueHooks( elem, type ),
			next = function() {
				jQuery.dequeue( elem, type );
			};

		// If the fx queue is dequeued, always remove the progress sentinel
		if ( fn === "inprogress" ) {
			fn = queue.shift();
			startLength--;
		}

		if ( fn ) {

			// Add a progress sentinel to prevent the fx queue from being
			// automatically dequeued
			if ( type === "fx" ) {
				queue.unshift( "inprogress" );
			}

			// Clear up the last queue stop function
			delete hooks.stop;
			fn.call( elem, next, hooks );
		}

		if ( !startLength && hooks ) {
			hooks.empty.fire();
		}
	},

	// Not public - generate a queueHooks object, or return the current one
	_queueHooks: function( elem, type ) {
		var key = type + "queueHooks";
		return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
			empty: jQuery.Callbacks( "once memory" ).add( function() {
				dataPriv.remove( elem, [ type + "queue", key ] );
			} )
		} );
	}
} );

jQuery.fn.extend( {
	queue: function( type, data ) {
		var setter = 2;

		if ( typeof type !== "string" ) {
			data = type;
			type = "fx";
			setter--;
		}

		if ( arguments.length < setter ) {
			return jQuery.queue( this[ 0 ], type );
		}

		return data === undefined ?
			this :
			this.each( function() {
				var queue = jQuery.queue( this, type, data );

				// Ensure a hooks for this queue
				jQuery._queueHooks( this, type );

				if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
					jQuery.dequeue( this, type );
				}
			} );
	},
	dequeue: function( type ) {
		return this.each( function() {
			jQuery.dequeue( this, type );
		} );
	},
	clearQueue: function( type ) {
		return this.queue( type || "fx", [] );
	},

	// Get a promise resolved when queues of a certain type
	// are emptied (fx is the type by default)
	promise: function( type, obj ) {
		var tmp,
			count = 1,
			defer = jQuery.Deferred(),
			elements = this,
			i = this.length,
			resolve = function() {
				if ( !( --count ) ) {
					defer.resolveWith( elements, [ elements ] );
				}
			};

		if ( typeof type !== "string" ) {
			obj = type;
			type = undefined;
		}
		type = type || "fx";

		while ( i-- ) {
			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
			if ( tmp && tmp.empty ) {
				count++;
				tmp.empty.add( resolve );
			}
		}
		resolve();
		return defer.promise( obj );
	}
} );
var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;

var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );


var cssExpand = [ "Top", "Right", "Bottom", "Left" ];

var documentElement = document.documentElement;



	var isAttached = function( elem ) {
			return jQuery.contains( elem.ownerDocument, elem );
		},
		composed = { composed: true };

	// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
	// Check attachment across shadow DOM boundaries when possible (gh-3504)
	// Support: iOS 10.0-10.2 only
	// Early iOS 10 versions support `attachShadow` but not `getRootNode`,
	// leading to errors. We need to check for `getRootNode`.
	if ( documentElement.getRootNode ) {
		isAttached = function( elem ) {
			return jQuery.contains( elem.ownerDocument, elem ) ||
				elem.getRootNode( composed ) === elem.ownerDocument;
		};
	}
var isHiddenWithinTree = function( elem, el ) {

		// isHiddenWithinTree might be called from jQuery#filter function;
		// in that case, element will be second argument
		elem = el || elem;

		// Inline style trumps all
		return elem.style.display === "none" ||
			elem.style.display === "" &&

			// Otherwise, check computed style
			// Support: Firefox <=43 - 45
			// Disconnected elements can have computed display: none, so first confirm that elem is
			// in the document.
			isAttached( elem ) &&

			jQuery.css( elem, "display" ) === "none";
	};



function adjustCSS( elem, prop, valueParts, tween ) {
	var adjusted, scale,
		maxIterations = 20,
		currentValue = tween ?
			function() {
				return tween.cur();
			} :
			function() {
				return jQuery.css( elem, prop, "" );
			},
		initial = currentValue(),
		unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),

		// Starting value computation is required for potential unit mismatches
		initialInUnit = elem.nodeType &&
			( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
			rcssNum.exec( jQuery.css( elem, prop ) );

	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {

		// Support: Firefox <=54
		// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
		initial = initial / 2;

		// Trust units reported by jQuery.css
		unit = unit || initialInUnit[ 3 ];

		// Iteratively approximate from a nonzero starting point
		initialInUnit = +initial || 1;

		while ( maxIterations-- ) {

			// Evaluate and update our best guess (doubling guesses that zero out).
			// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
			jQuery.style( elem, prop, initialInUnit + unit );
			if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
				maxIterations = 0;
			}
			initialInUnit = initialInUnit / scale;

		}

		initialInUnit = initialInUnit * 2;
		jQuery.style( elem, prop, initialInUnit + unit );

		// Make sure we update the tween properties later on
		valueParts = valueParts || [];
	}

	if ( valueParts ) {
		initialInUnit = +initialInUnit || +initial || 0;

		// Apply relative offset (+=/-=) if specified
		adjusted = valueParts[ 1 ] ?
			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
			+valueParts[ 2 ];
		if ( tween ) {
			tween.unit = unit;
			tween.start = initialInUnit;
			tween.end = adjusted;
		}
	}
	return adjusted;
}


var defaultDisplayMap = {};

function getDefaultDisplay( elem ) {
	var temp,
		doc = elem.ownerDocument,
		nodeName = elem.nodeName,
		display = defaultDisplayMap[ nodeName ];

	if ( display ) {
		return display;
	}

	temp = doc.body.appendChild( doc.createElement( nodeName ) );
	display = jQuery.css( temp, "display" );

	temp.parentNode.removeChild( temp );

	if ( display === "none" ) {
		display = "block";
	}
	defaultDisplayMap[ nodeName ] = display;

	return display;
}

function showHide( elements, show ) {
	var display, elem,
		values = [],
		index = 0,
		length = elements.length;

	// Determine new display value for elements that need to change
	for ( ; index < length; index++ ) {
		elem = elements[ index ];
		if ( !elem.style ) {
			continue;
		}

		display = elem.style.display;
		if ( show ) {

			// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
			// check is required in this first loop unless we have a nonempty display value (either
			// inline or about-to-be-restored)
			if ( display === "none" ) {
				values[ index ] = dataPriv.get( elem, "display" ) || null;
				if ( !values[ index ] ) {
					elem.style.display = "";
				}
			}
			if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
				values[ index ] = getDefaultDisplay( elem );
			}
		} else {
			if ( display !== "none" ) {
				values[ index ] = "none";

				// Remember what we're overwriting
				dataPriv.set( elem, "display", display );
			}
		}
	}

	// Set the display of the elements in a second loop to avoid constant reflow
	for ( index = 0; index < length; index++ ) {
		if ( values[ index ] != null ) {
			elements[ index ].style.display = values[ index ];
		}
	}

	return elements;
}

jQuery.fn.extend( {
	show: function() {
		return showHide( this, true );
	},
	hide: function() {
		return showHide( this );
	},
	toggle: function( state ) {
		if ( typeof state === "boolean" ) {
			return state ? this.show() : this.hide();
		}

		return this.each( function() {
			if ( isHiddenWithinTree( this ) ) {
				jQuery( this ).show();
			} else {
				jQuery( this ).hide();
			}
		} );
	}
} );
var rcheckableType = ( /^(?:checkbox|radio)$/i );

var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );

var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );



( function() {
	var fragment = document.createDocumentFragment(),
		div = fragment.appendChild( document.createElement( "div" ) ),
		input = document.createElement( "input" );

	// Support: Android 4.0 - 4.3 only
	// Check state lost if the name is set (trac-11217)
	// Support: Windows Web Apps (WWA)
	// `name` and `type` must use .setAttribute for WWA (trac-14901)
	input.setAttribute( "type", "radio" );
	input.setAttribute( "checked", "checked" );
	input.setAttribute( "name", "t" );

	div.appendChild( input );

	// Support: Android <=4.1 only
	// Older WebKit doesn't clone checked state correctly in fragments
	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;

	// Support: IE <=11 only
	// Make sure textarea (and checkbox) defaultValue is properly cloned
	div.innerHTML = "<textarea>x</textarea>";
	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;

	// Support: IE <=9 only
	// IE <=9 replaces <option> tags with their contents when inserted outside of
	// the select element.
	div.innerHTML = "<option></option>";
	support.option = !!div.lastChild;
} )();


// We have to close these tags to support XHTML (trac-13200)
var wrapMap = {

	// XHTML parsers do not magically insert elements in the
	// same way that tag soup parsers do. So we cannot shorten
	// this by omitting <tbody> or other required elements.
	thead: [ 1, "<table>", "</table>" ],
	col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
	tr: [ 2, "<table><tbody>", "</tbody></table>" ],
	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],

	_default: [ 0, "", "" ]
};

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;

// Support: IE <=9 only
if ( !support.option ) {
	wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
}


function getAll( context, tag ) {

	// Support: IE <=9 - 11 only
	// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
	var ret;

	if ( typeof context.getElementsByTagName !== "undefined" ) {
		ret = context.getElementsByTagName( tag || "*" );

	} else if ( typeof context.querySelectorAll !== "undefined" ) {
		ret = context.querySelectorAll( tag || "*" );

	} else {
		ret = [];
	}

	if ( tag === undefined || tag && nodeName( context, tag ) ) {
		return jQuery.merge( [ context ], ret );
	}

	return ret;
}


// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {
	var i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		dataPriv.set(
			elems[ i ],
			"globalEval",
			!refElements || dataPriv.get( refElements[ i ], "globalEval" )
		);
	}
}


var rhtml = /<|&#?\w+;/;

function buildFragment( elems, context, scripts, selection, ignored ) {
	var elem, tmp, tag, wrap, attached, j,
		fragment = context.createDocumentFragment(),
		nodes = [],
		i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		elem = elems[ i ];

		if ( elem || elem === 0 ) {

			// Add nodes directly
			if ( toType( elem ) === "object" ) {

				// Support: Android <=4.0 only, PhantomJS 1 only
				// push.apply(_, arraylike) throws on ancient WebKit
				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );

			// Convert non-html into a text node
			} else if ( !rhtml.test( elem ) ) {
				nodes.push( context.createTextNode( elem ) );

			// Convert html into DOM nodes
			} else {
				tmp = tmp || fragment.appendChild( context.createElement( "div" ) );

				// Deserialize a standard representation
				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
				wrap = wrapMap[ tag ] || wrapMap._default;
				tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];

				// Descend through wrappers to the right content
				j = wrap[ 0 ];
				while ( j-- ) {
					tmp = tmp.lastChild;
				}

				// Support: Android <=4.0 only, PhantomJS 1 only
				// push.apply(_, arraylike) throws on ancient WebKit
				jQuery.merge( nodes, tmp.childNodes );

				// Remember the top-level container
				tmp = fragment.firstChild;

				// Ensure the created nodes are orphaned (trac-12392)
				tmp.textContent = "";
			}
		}
	}

	// Remove wrapper from fragment
	fragment.textContent = "";

	i = 0;
	while ( ( elem = nodes[ i++ ] ) ) {

		// Skip elements already in the context collection (trac-4087)
		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
			if ( ignored ) {
				ignored.push( elem );
			}
			continue;
		}

		attached = isAttached( elem );

		// Append to fragment
		tmp = getAll( fragment.appendChild( elem ), "script" );

		// Preserve script evaluation history
		if ( attached ) {
			setGlobalEval( tmp );
		}

		// Capture executables
		if ( scripts ) {
			j = 0;
			while ( ( elem = tmp[ j++ ] ) ) {
				if ( rscriptType.test( elem.type || "" ) ) {
					scripts.push( elem );
				}
			}
		}
	}

	return fragment;
}


var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;

function returnTrue() {
	return true;
}

function returnFalse() {
	return false;
}

function on( elem, types, selector, data, fn, one ) {
	var origFn, type;

	// Types can be a map of types/handlers
	if ( typeof types === "object" ) {

		// ( types-Object, selector, data )
		if ( typeof selector !== "string" ) {

			// ( types-Object, data )
			data = data || selector;
			selector = undefined;
		}
		for ( type in types ) {
			on( elem, type, selector, data, types[ type ], one );
		}
		return elem;
	}

	if ( data == null && fn == null ) {

		// ( types, fn )
		fn = selector;
		data = selector = undefined;
	} else if ( fn == null ) {
		if ( typeof selector === "string" ) {

			// ( types, selector, fn )
			fn = data;
			data = undefined;
		} else {

			// ( types, data, fn )
			fn = data;
			data = selector;
			selector = undefined;
		}
	}
	if ( fn === false ) {
		fn = returnFalse;
	} else if ( !fn ) {
		return elem;
	}

	if ( one === 1 ) {
		origFn = fn;
		fn = function( event ) {

			// Can use an empty set, since event contains the info
			jQuery().off( event );
			return origFn.apply( this, arguments );
		};

		// Use same guid so caller can remove using origFn
		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
	}
	return elem.each( function() {
		jQuery.event.add( this, types, fn, data, selector );
	} );
}

/*
 * Helper functions for managing events -- not part of the public interface.
 * Props to Dean Edwards' addEvent library for many of the ideas.
 */
jQuery.event = {

	global: {},

	add: function( elem, types, handler, data, selector ) {

		var handleObjIn, eventHandle, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.get( elem );

		// Only attach events to objects that accept data
		if ( !acceptData( elem ) ) {
			return;
		}

		// Caller can pass in an object of custom data in lieu of the handler
		if ( handler.handler ) {
			handleObjIn = handler;
			handler = handleObjIn.handler;
			selector = handleObjIn.selector;
		}

		// Ensure that invalid selectors throw exceptions at attach time
		// Evaluate against documentElement in case elem is a non-element node (e.g., document)
		if ( selector ) {
			jQuery.find.matchesSelector( documentElement, selector );
		}

		// Make sure that the handler has a unique ID, used to find/remove it later
		if ( !handler.guid ) {
			handler.guid = jQuery.guid++;
		}

		// Init the element's event structure and main handler, if this is the first
		if ( !( events = elemData.events ) ) {
			events = elemData.events = Object.create( null );
		}
		if ( !( eventHandle = elemData.handle ) ) {
			eventHandle = elemData.handle = function( e ) {

				// Discard the second event of a jQuery.event.trigger() and
				// when an event is called after a page has unloaded
				return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
					jQuery.event.dispatch.apply( elem, arguments ) : undefined;
			};
		}

		// Handle multiple events separated by a space
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// There *must* be a type, no attaching namespace-only handlers
			if ( !type ) {
				continue;
			}

			// If event changes its type, use the special event handlers for the changed type
			special = jQuery.event.special[ type ] || {};

			// If selector defined, determine special event api type, otherwise given type
			type = ( selector ? special.delegateType : special.bindType ) || type;

			// Update special based on newly reset type
			special = jQuery.event.special[ type ] || {};

			// handleObj is passed to all event handlers
			handleObj = jQuery.extend( {
				type: type,
				origType: origType,
				data: data,
				handler: handler,
				guid: handler.guid,
				selector: selector,
				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
				namespace: namespaces.join( "." )
			}, handleObjIn );

			// Init the event handler queue if we're the first
			if ( !( handlers = events[ type ] ) ) {
				handlers = events[ type ] = [];
				handlers.delegateCount = 0;

				// Only use addEventListener if the special events handler returns false
				if ( !special.setup ||
					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {

					if ( elem.addEventListener ) {
						elem.addEventListener( type, eventHandle );
					}
				}
			}

			if ( special.add ) {
				special.add.call( elem, handleObj );

				if ( !handleObj.handler.guid ) {
					handleObj.handler.guid = handler.guid;
				}
			}

			// Add to the element's handler list, delegates in front
			if ( selector ) {
				handlers.splice( handlers.delegateCount++, 0, handleObj );
			} else {
				handlers.push( handleObj );
			}

			// Keep track of which events have ever been used, for event optimization
			jQuery.event.global[ type ] = true;
		}

	},

	// Detach an event or set of events from an element
	remove: function( elem, types, handler, selector, mappedTypes ) {

		var j, origCount, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );

		if ( !elemData || !( events = elemData.events ) ) {
			return;
		}

		// Once for each type.namespace in types; type may be omitted
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// Unbind all events (on this namespace, if provided) for the element
			if ( !type ) {
				for ( type in events ) {
					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
				}
				continue;
			}

			special = jQuery.event.special[ type ] || {};
			type = ( selector ? special.delegateType : special.bindType ) || type;
			handlers = events[ type ] || [];
			tmp = tmp[ 2 ] &&
				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );

			// Remove matching events
			origCount = j = handlers.length;
			while ( j-- ) {
				handleObj = handlers[ j ];

				if ( ( mappedTypes || origType === handleObj.origType ) &&
					( !handler || handler.guid === handleObj.guid ) &&
					( !tmp || tmp.test( handleObj.namespace ) ) &&
					( !selector || selector === handleObj.selector ||
						selector === "**" && handleObj.selector ) ) {
					handlers.splice( j, 1 );

					if ( handleObj.selector ) {
						handlers.delegateCount--;
					}
					if ( special.remove ) {
						special.remove.call( elem, handleObj );
					}
				}
			}

			// Remove generic event handler if we removed something and no more handlers exist
			// (avoids potential for endless recursion during removal of special event handlers)
			if ( origCount && !handlers.length ) {
				if ( !special.teardown ||
					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {

					jQuery.removeEvent( elem, type, elemData.handle );
				}

				delete events[ type ];
			}
		}

		// Remove data and the expando if it's no longer used
		if ( jQuery.isEmptyObject( events ) ) {
			dataPriv.remove( elem, "handle events" );
		}
	},

	dispatch: function( nativeEvent ) {

		var i, j, ret, matched, handleObj, handlerQueue,
			args = new Array( arguments.length ),

			// Make a writable jQuery.Event from the native event object
			event = jQuery.event.fix( nativeEvent ),

			handlers = (
				dataPriv.get( this, "events" ) || Object.create( null )
			)[ event.type ] || [],
			special = jQuery.event.special[ event.type ] || {};

		// Use the fix-ed jQuery.Event rather than the (read-only) native event
		args[ 0 ] = event;

		for ( i = 1; i < arguments.length; i++ ) {
			args[ i ] = arguments[ i ];
		}

		event.delegateTarget = this;

		// Call the preDispatch hook for the mapped type, and let it bail if desired
		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
			return;
		}

		// Determine handlers
		handlerQueue = jQuery.event.handlers.call( this, event, handlers );

		// Run delegates first; they may want to stop propagation beneath us
		i = 0;
		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
			event.currentTarget = matched.elem;

			j = 0;
			while ( ( handleObj = matched.handlers[ j++ ] ) &&
				!event.isImmediatePropagationStopped() ) {

				// If the event is namespaced, then each handler is only invoked if it is
				// specially universal or its namespaces are a superset of the event's.
				if ( !event.rnamespace || handleObj.namespace === false ||
					event.rnamespace.test( handleObj.namespace ) ) {

					event.handleObj = handleObj;
					event.data = handleObj.data;

					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
						handleObj.handler ).apply( matched.elem, args );

					if ( ret !== undefined ) {
						if ( ( event.result = ret ) === false ) {
							event.preventDefault();
							event.stopPropagation();
						}
					}
				}
			}
		}

		// Call the postDispatch hook for the mapped type
		if ( special.postDispatch ) {
			special.postDispatch.call( this, event );
		}

		return event.result;
	},

	handlers: function( event, handlers ) {
		var i, handleObj, sel, matchedHandlers, matchedSelectors,
			handlerQueue = [],
			delegateCount = handlers.delegateCount,
			cur = event.target;

		// Find delegate handlers
		if ( delegateCount &&

			// Support: IE <=9
			// Black-hole SVG <use> instance trees (trac-13180)
			cur.nodeType &&

			// Support: Firefox <=42
			// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
			// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
			// Support: IE 11 only
			// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
			!( event.type === "click" && event.button >= 1 ) ) {

			for ( ; cur !== this; cur = cur.parentNode || this ) {

				// Don't check non-elements (trac-13208)
				// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)
				if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
					matchedHandlers = [];
					matchedSelectors = {};
					for ( i = 0; i < delegateCount; i++ ) {
						handleObj = handlers[ i ];

						// Don't conflict with Object.prototype properties (trac-13203)
						sel = handleObj.selector + " ";

						if ( matchedSelectors[ sel ] === undefined ) {
							matchedSelectors[ sel ] = handleObj.needsContext ?
								jQuery( sel, this ).index( cur ) > -1 :
								jQuery.find( sel, this, null, [ cur ] ).length;
						}
						if ( matchedSelectors[ sel ] ) {
							matchedHandlers.push( handleObj );
						}
					}
					if ( matchedHandlers.length ) {
						handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
					}
				}
			}
		}

		// Add the remaining (directly-bound) handlers
		cur = this;
		if ( delegateCount < handlers.length ) {
			handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
		}

		return handlerQueue;
	},

	addProp: function( name, hook ) {
		Object.defineProperty( jQuery.Event.prototype, name, {
			enumerable: true,
			configurable: true,

			get: isFunction( hook ) ?
				function() {
					if ( this.originalEvent ) {
						return hook( this.originalEvent );
					}
				} :
				function() {
					if ( this.originalEvent ) {
						return this.originalEvent[ name ];
					}
				},

			set: function( value ) {
				Object.defineProperty( this, name, {
					enumerable: true,
					configurable: true,
					writable: true,
					value: value
				} );
			}
		} );
	},

	fix: function( originalEvent ) {
		return originalEvent[ jQuery.expando ] ?
			originalEvent :
			new jQuery.Event( originalEvent );
	},

	special: {
		load: {

			// Prevent triggered image.load events from bubbling to window.load
			noBubble: true
		},
		click: {

			// Utilize native event to ensure correct state for checkable inputs
			setup: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Claim the first handler
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					// dataPriv.set( el, "click", ... )
					leverageNative( el, "click", true );
				}

				// Return false to allow normal processing in the caller
				return false;
			},
			trigger: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Force setup before triggering a click
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					leverageNative( el, "click" );
				}

				// Return non-false to allow normal event-path propagation
				return true;
			},

			// For cross-browser consistency, suppress native .click() on links
			// Also prevent it if we're currently inside a leveraged native-event stack
			_default: function( event ) {
				var target = event.target;
				return rcheckableType.test( target.type ) &&
					target.click && nodeName( target, "input" ) &&
					dataPriv.get( target, "click" ) ||
					nodeName( target, "a" );
			}
		},

		beforeunload: {
			postDispatch: function( event ) {

				// Support: Firefox 20+
				// Firefox doesn't alert if the returnValue field is not set.
				if ( event.result !== undefined && event.originalEvent ) {
					event.originalEvent.returnValue = event.result;
				}
			}
		}
	}
};

// Ensure the presence of an event listener that handles manually-triggered
// synthetic events by interrupting progress until reinvoked in response to
// *native* events that it fires directly, ensuring that state changes have
// already occurred before other listeners are invoked.
function leverageNative( el, type, isSetup ) {

	// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
	if ( !isSetup ) {
		if ( dataPriv.get( el, type ) === undefined ) {
			jQuery.event.add( el, type, returnTrue );
		}
		return;
	}

	// Register the controller as a special universal handler for all event namespaces
	dataPriv.set( el, type, false );
	jQuery.event.add( el, type, {
		namespace: false,
		handler: function( event ) {
			var result,
				saved = dataPriv.get( this, type );

			if ( ( event.isTrigger & 1 ) && this[ type ] ) {

				// Interrupt processing of the outer synthetic .trigger()ed event
				if ( !saved ) {

					// Store arguments for use when handling the inner native event
					// There will always be at least one argument (an event object), so this array
					// will not be confused with a leftover capture object.
					saved = slice.call( arguments );
					dataPriv.set( this, type, saved );

					// Trigger the native event and capture its result
					this[ type ]();
					result = dataPriv.get( this, type );
					dataPriv.set( this, type, false );

					if ( saved !== result ) {

						// Cancel the outer synthetic event
						event.stopImmediatePropagation();
						event.preventDefault();

						return result;
					}

				// If this is an inner synthetic event for an event with a bubbling surrogate
				// (focus or blur), assume that the surrogate already propagated from triggering
				// the native event and prevent that from happening again here.
				// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
				// bubbling surrogate propagates *after* the non-bubbling base), but that seems
				// less bad than duplication.
				} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
					event.stopPropagation();
				}

			// If this is a native event triggered above, everything is now in order
			// Fire an inner synthetic event with the original arguments
			} else if ( saved ) {

				// ...and capture the result
				dataPriv.set( this, type, jQuery.event.trigger(
					saved[ 0 ],
					saved.slice( 1 ),
					this
				) );

				// Abort handling of the native event by all jQuery handlers while allowing
				// native handlers on the same element to run. On target, this is achieved
				// by stopping immediate propagation just on the jQuery event. However,
				// the native event is re-wrapped by a jQuery one on each level of the
				// propagation so the only way to stop it for jQuery is to stop it for
				// everyone via native `stopPropagation()`. This is not a problem for
				// focus/blur which don't bubble, but it does also stop click on checkboxes
				// and radios. We accept this limitation.
				event.stopPropagation();
				event.isImmediatePropagationStopped = returnTrue;
			}
		}
	} );
}

jQuery.removeEvent = function( elem, type, handle ) {

	// This "if" is needed for plain objects
	if ( elem.removeEventListener ) {
		elem.removeEventListener( type, handle );
	}
};

jQuery.Event = function( src, props ) {

	// Allow instantiation without the 'new' keyword
	if ( !( this instanceof jQuery.Event ) ) {
		return new jQuery.Event( src, props );
	}

	// Event object
	if ( src && src.type ) {
		this.originalEvent = src;
		this.type = src.type;

		// Events bubbling up the document may have been marked as prevented
		// by a handler lower down the tree; reflect the correct value.
		this.isDefaultPrevented = src.defaultPrevented ||
				src.defaultPrevented === undefined &&

				// Support: Android <=2.3 only
				src.returnValue === false ?
			returnTrue :
			returnFalse;

		// Create target properties
		// Support: Safari <=6 - 7 only
		// Target should not be a text node (trac-504, trac-13143)
		this.target = ( src.target && src.target.nodeType === 3 ) ?
			src.target.parentNode :
			src.target;

		this.currentTarget = src.currentTarget;
		this.relatedTarget = src.relatedTarget;

	// Event type
	} else {
		this.type = src;
	}

	// Put explicitly provided properties onto the event object
	if ( props ) {
		jQuery.extend( this, props );
	}

	// Create a timestamp if incoming event doesn't have one
	this.timeStamp = src && src.timeStamp || Date.now();

	// Mark it as fixed
	this[ jQuery.expando ] = true;
};

// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
	constructor: jQuery.Event,
	isDefaultPrevented: returnFalse,
	isPropagationStopped: returnFalse,
	isImmediatePropagationStopped: returnFalse,
	isSimulated: false,

	preventDefault: function() {
		var e = this.originalEvent;

		this.isDefaultPrevented = returnTrue;

		if ( e && !this.isSimulated ) {
			e.preventDefault();
		}
	},
	stopPropagation: function() {
		var e = this.originalEvent;

		this.isPropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopPropagation();
		}
	},
	stopImmediatePropagation: function() {
		var e = this.originalEvent;

		this.isImmediatePropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopImmediatePropagation();
		}

		this.stopPropagation();
	}
};

// Includes all common event props including KeyEvent and MouseEvent specific props
jQuery.each( {
	altKey: true,
	bubbles: true,
	cancelable: true,
	changedTouches: true,
	ctrlKey: true,
	detail: true,
	eventPhase: true,
	metaKey: true,
	pageX: true,
	pageY: true,
	shiftKey: true,
	view: true,
	"char": true,
	code: true,
	charCode: true,
	key: true,
	keyCode: true,
	button: true,
	buttons: true,
	clientX: true,
	clientY: true,
	offsetX: true,
	offsetY: true,
	pointerId: true,
	pointerType: true,
	screenX: true,
	screenY: true,
	targetTouches: true,
	toElement: true,
	touches: true,
	which: true
}, jQuery.event.addProp );

jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {

	function focusMappedHandler( nativeEvent ) {
		if ( document.documentMode ) {

			// Support: IE 11+
			// Attach a single focusin/focusout handler on the document while someone wants
			// focus/blur. This is because the former are synchronous in IE while the latter
			// are async. In other browsers, all those handlers are invoked synchronously.

			// `handle` from private data would already wrap the event, but we need
			// to change the `type` here.
			var handle = dataPriv.get( this, "handle" ),
				event = jQuery.event.fix( nativeEvent );
			event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
			event.isSimulated = true;

			// First, handle focusin/focusout
			handle( nativeEvent );

			// ...then, handle focus/blur
			//
			// focus/blur don't bubble while focusin/focusout do; simulate the former by only
			// invoking the handler at the lower level.
			if ( event.target === event.currentTarget ) {

				// The setup part calls `leverageNative`, which, in turn, calls
				// `jQuery.event.add`, so event handle will already have been set
				// by this point.
				handle( event );
			}
		} else {

			// For non-IE browsers, attach a single capturing handler on the document
			// while someone wants focusin/focusout.
			jQuery.event.simulate( delegateType, nativeEvent.target,
				jQuery.event.fix( nativeEvent ) );
		}
	}

	jQuery.event.special[ type ] = {

		// Utilize native event if possible so blur/focus sequence is correct
		setup: function() {

			var attaches;

			// Claim the first handler
			// dataPriv.set( this, "focus", ... )
			// dataPriv.set( this, "blur", ... )
			leverageNative( this, type, true );

			if ( document.documentMode ) {

				// Support: IE 9 - 11+
				// We use the same native handler for focusin & focus (and focusout & blur)
				// so we need to coordinate setup & teardown parts between those events.
				// Use `delegateType` as the key as `type` is already used by `leverageNative`.
				attaches = dataPriv.get( this, delegateType );
				if ( !attaches ) {
					this.addEventListener( delegateType, focusMappedHandler );
				}
				dataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );
			} else {

				// Return false to allow normal processing in the caller
				return false;
			}
		},
		trigger: function() {

			// Force setup before trigger
			leverageNative( this, type );

			// Return non-false to allow normal event-path propagation
			return true;
		},

		teardown: function() {
			var attaches;

			if ( document.documentMode ) {
				attaches = dataPriv.get( this, delegateType ) - 1;
				if ( !attaches ) {
					this.removeEventListener( delegateType, focusMappedHandler );
					dataPriv.remove( this, delegateType );
				} else {
					dataPriv.set( this, delegateType, attaches );
				}
			} else {

				// Return false to indicate standard teardown should be applied
				return false;
			}
		},

		// Suppress native focus or blur if we're currently inside
		// a leveraged native-event stack
		_default: function( event ) {
			return dataPriv.get( event.target, type );
		},

		delegateType: delegateType
	};

	// Support: Firefox <=44
	// Firefox doesn't have focus(in | out) events
	// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
	//
	// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
	// focus(in | out) events fire after focus & blur events,
	// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
	// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
	//
	// Support: IE 9 - 11+
	// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,
	// attach a single handler for both events in IE.
	jQuery.event.special[ delegateType ] = {
		setup: function() {

			// Handle: regular nodes (via `this.ownerDocument`), window
			// (via `this.document`) & document (via `this`).
			var doc = this.ownerDocument || this.document || this,
				dataHolder = document.documentMode ? this : doc,
				attaches = dataPriv.get( dataHolder, delegateType );

			// Support: IE 9 - 11+
			// We use the same native handler for focusin & focus (and focusout & blur)
			// so we need to coordinate setup & teardown parts between those events.
			// Use `delegateType` as the key as `type` is already used by `leverageNative`.
			if ( !attaches ) {
				if ( document.documentMode ) {
					this.addEventListener( delegateType, focusMappedHandler );
				} else {
					doc.addEventListener( type, focusMappedHandler, true );
				}
			}
			dataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );
		},
		teardown: function() {
			var doc = this.ownerDocument || this.document || this,
				dataHolder = document.documentMode ? this : doc,
				attaches = dataPriv.get( dataHolder, delegateType ) - 1;

			if ( !attaches ) {
				if ( document.documentMode ) {
					this.removeEventListener( delegateType, focusMappedHandler );
				} else {
					doc.removeEventListener( type, focusMappedHandler, true );
				}
				dataPriv.remove( dataHolder, delegateType );
			} else {
				dataPriv.set( dataHolder, delegateType, attaches );
			}
		}
	};
} );

// Create mouseenter/leave events using mouseover/out and event-time checks
// so that event delegation works in jQuery.
// Do the same for pointerenter/pointerleave and pointerover/pointerout
//
// Support: Safari 7 only
// Safari sends mouseenter too often; see:
// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
// for the description of the bug (it existed in older Chrome versions as well).
jQuery.each( {
	mouseenter: "mouseover",
	mouseleave: "mouseout",
	pointerenter: "pointerover",
	pointerleave: "pointerout"
}, function( orig, fix ) {
	jQuery.event.special[ orig ] = {
		delegateType: fix,
		bindType: fix,

		handle: function( event ) {
			var ret,
				target = this,
				related = event.relatedTarget,
				handleObj = event.handleObj;

			// For mouseenter/leave call the handler if related is outside the target.
			// NB: No relatedTarget if the mouse left/entered the browser window
			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
				event.type = handleObj.origType;
				ret = handleObj.handler.apply( this, arguments );
				event.type = fix;
			}
			return ret;
		}
	};
} );

jQuery.fn.extend( {

	on: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn );
	},
	one: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn, 1 );
	},
	off: function( types, selector, fn ) {
		var handleObj, type;
		if ( types && types.preventDefault && types.handleObj ) {

			// ( event )  dispatched jQuery.Event
			handleObj = types.handleObj;
			jQuery( types.delegateTarget ).off(
				handleObj.namespace ?
					handleObj.origType + "." + handleObj.namespace :
					handleObj.origType,
				handleObj.selector,
				handleObj.handler
			);
			return this;
		}
		if ( typeof types === "object" ) {

			// ( types-object [, selector] )
			for ( type in types ) {
				this.off( type, selector, types[ type ] );
			}
			return this;
		}
		if ( selector === false || typeof selector === "function" ) {

			// ( types [, fn] )
			fn = selector;
			selector = undefined;
		}
		if ( fn === false ) {
			fn = returnFalse;
		}
		return this.each( function() {
			jQuery.event.remove( this, types, fn, selector );
		} );
	}
} );


var

	// Support: IE <=10 - 11, Edge 12 - 13 only
	// In IE/Edge using regex groups here causes severe slowdowns.
	// See https://connect.microsoft.com/IE/feedback/details/1736512/
	rnoInnerhtml = /<script|<style|<link/i,

	// checked="checked" or checked
	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,

	rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;

// Prefer a tbody over its parent table for containing new rows
function manipulationTarget( elem, content ) {
	if ( nodeName( elem, "table" ) &&
		nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {

		return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
	}

	return elem;
}

// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
	elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
	return elem;
}
function restoreScript( elem ) {
	if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
		elem.type = elem.type.slice( 5 );
	} else {
		elem.removeAttribute( "type" );
	}

	return elem;
}

function cloneCopyEvent( src, dest ) {
	var i, l, type, pdataOld, udataOld, udataCur, events;

	if ( dest.nodeType !== 1 ) {
		return;
	}

	// 1. Copy private data: events, handlers, etc.
	if ( dataPriv.hasData( src ) ) {
		pdataOld = dataPriv.get( src );
		events = pdataOld.events;

		if ( events ) {
			dataPriv.remove( dest, "handle events" );

			for ( type in events ) {
				for ( i = 0, l = events[ type ].length; i < l; i++ ) {
					jQuery.event.add( dest, type, events[ type ][ i ] );
				}
			}
		}
	}

	// 2. Copy user data
	if ( dataUser.hasData( src ) ) {
		udataOld = dataUser.access( src );
		udataCur = jQuery.extend( {}, udataOld );

		dataUser.set( dest, udataCur );
	}
}

// Fix IE bugs, see support tests
function fixInput( src, dest ) {
	var nodeName = dest.nodeName.toLowerCase();

	// Fails to persist the checked state of a cloned checkbox or radio button.
	if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
		dest.checked = src.checked;

	// Fails to return the selected option to the default selected state when cloning options
	} else if ( nodeName === "input" || nodeName === "textarea" ) {
		dest.defaultValue = src.defaultValue;
	}
}

function domManip( collection, args, callback, ignored ) {

	// Flatten any nested arrays
	args = flat( args );

	var fragment, first, scripts, hasScripts, node, doc,
		i = 0,
		l = collection.length,
		iNoClone = l - 1,
		value = args[ 0 ],
		valueIsFunction = isFunction( value );

	// We can't cloneNode fragments that contain checked, in WebKit
	if ( valueIsFunction ||
			( l > 1 && typeof value === "string" &&
				!support.checkClone && rchecked.test( value ) ) ) {
		return collection.each( function( index ) {
			var self = collection.eq( index );
			if ( valueIsFunction ) {
				args[ 0 ] = value.call( this, index, self.html() );
			}
			domManip( self, args, callback, ignored );
		} );
	}

	if ( l ) {
		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
		first = fragment.firstChild;

		if ( fragment.childNodes.length === 1 ) {
			fragment = first;
		}

		// Require either new content or an interest in ignored elements to invoke the callback
		if ( first || ignored ) {
			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
			hasScripts = scripts.length;

			// Use the original fragment for the last item
			// instead of the first because it can end up
			// being emptied incorrectly in certain situations (trac-8070).
			for ( ; i < l; i++ ) {
				node = fragment;

				if ( i !== iNoClone ) {
					node = jQuery.clone( node, true, true );

					// Keep references to cloned scripts for later restoration
					if ( hasScripts ) {

						// Support: Android <=4.0 only, PhantomJS 1 only
						// push.apply(_, arraylike) throws on ancient WebKit
						jQuery.merge( scripts, getAll( node, "script" ) );
					}
				}

				callback.call( collection[ i ], node, i );
			}

			if ( hasScripts ) {
				doc = scripts[ scripts.length - 1 ].ownerDocument;

				// Re-enable scripts
				jQuery.map( scripts, restoreScript );

				// Evaluate executable scripts on first document insertion
				for ( i = 0; i < hasScripts; i++ ) {
					node = scripts[ i ];
					if ( rscriptType.test( node.type || "" ) &&
						!dataPriv.access( node, "globalEval" ) &&
						jQuery.contains( doc, node ) ) {

						if ( node.src && ( node.type || "" ).toLowerCase()  !== "module" ) {

							// Optional AJAX dependency, but won't run scripts if not present
							if ( jQuery._evalUrl && !node.noModule ) {
								jQuery._evalUrl( node.src, {
									nonce: node.nonce || node.getAttribute( "nonce" )
								}, doc );
							}
						} else {

							// Unwrap a CDATA section containing script contents. This shouldn't be
							// needed as in XML documents they're already not visible when
							// inspecting element contents and in HTML documents they have no
							// meaning but we're preserving that logic for backwards compatibility.
							// This will be removed completely in 4.0. See gh-4904.
							DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
						}
					}
				}
			}
		}
	}

	return collection;
}

function remove( elem, selector, keepData ) {
	var node,
		nodes = selector ? jQuery.filter( selector, elem ) : elem,
		i = 0;

	for ( ; ( node = nodes[ i ] ) != null; i++ ) {
		if ( !keepData && node.nodeType === 1 ) {
			jQuery.cleanData( getAll( node ) );
		}

		if ( node.parentNode ) {
			if ( keepData && isAttached( node ) ) {
				setGlobalEval( getAll( node, "script" ) );
			}
			node.parentNode.removeChild( node );
		}
	}

	return elem;
}

jQuery.extend( {
	htmlPrefilter: function( html ) {
		return html;
	},

	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
		var i, l, srcElements, destElements,
			clone = elem.cloneNode( true ),
			inPage = isAttached( elem );

		// Fix IE cloning issues
		if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
				!jQuery.isXMLDoc( elem ) ) {

			// We eschew jQuery#find here for performance reasons:
			// https://jsperf.com/getall-vs-sizzle/2
			destElements = getAll( clone );
			srcElements = getAll( elem );

			for ( i = 0, l = srcElements.length; i < l; i++ ) {
				fixInput( srcElements[ i ], destElements[ i ] );
			}
		}

		// Copy the events from the original to the clone
		if ( dataAndEvents ) {
			if ( deepDataAndEvents ) {
				srcElements = srcElements || getAll( elem );
				destElements = destElements || getAll( clone );

				for ( i = 0, l = srcElements.length; i < l; i++ ) {
					cloneCopyEvent( srcElements[ i ], destElements[ i ] );
				}
			} else {
				cloneCopyEvent( elem, clone );
			}
		}

		// Preserve script evaluation history
		destElements = getAll( clone, "script" );
		if ( destElements.length > 0 ) {
			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
		}

		// Return the cloned set
		return clone;
	},

	cleanData: function( elems ) {
		var data, elem, type,
			special = jQuery.event.special,
			i = 0;

		for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
			if ( acceptData( elem ) ) {
				if ( ( data = elem[ dataPriv.expando ] ) ) {
					if ( data.events ) {
						for ( type in data.events ) {
							if ( special[ type ] ) {
								jQuery.event.remove( elem, type );

							// This is a shortcut to avoid jQuery.event.remove's overhead
							} else {
								jQuery.removeEvent( elem, type, data.handle );
							}
						}
					}

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataPriv.expando ] = undefined;
				}
				if ( elem[ dataUser.expando ] ) {

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataUser.expando ] = undefined;
				}
			}
		}
	}
} );

jQuery.fn.extend( {
	detach: function( selector ) {
		return remove( this, selector, true );
	},

	remove: function( selector ) {
		return remove( this, selector );
	},

	text: function( value ) {
		return access( this, function( value ) {
			return value === undefined ?
				jQuery.text( this ) :
				this.empty().each( function() {
					if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
						this.textContent = value;
					}
				} );
		}, null, value, arguments.length );
	},

	append: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.appendChild( elem );
			}
		} );
	},

	prepend: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.insertBefore( elem, target.firstChild );
			}
		} );
	},

	before: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this );
			}
		} );
	},

	after: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this.nextSibling );
			}
		} );
	},

	empty: function() {
		var elem,
			i = 0;

		for ( ; ( elem = this[ i ] ) != null; i++ ) {
			if ( elem.nodeType === 1 ) {

				// Prevent memory leaks
				jQuery.cleanData( getAll( elem, false ) );

				// Remove any remaining nodes
				elem.textContent = "";
			}
		}

		return this;
	},

	clone: function( dataAndEvents, deepDataAndEvents ) {
		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;

		return this.map( function() {
			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
		} );
	},

	html: function( value ) {
		return access( this, function( value ) {
			var elem = this[ 0 ] || {},
				i = 0,
				l = this.length;

			if ( value === undefined && elem.nodeType === 1 ) {
				return elem.innerHTML;
			}

			// See if we can take a shortcut and just use innerHTML
			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {

				value = jQuery.htmlPrefilter( value );

				try {
					for ( ; i < l; i++ ) {
						elem = this[ i ] || {};

						// Remove element nodes and prevent memory leaks
						if ( elem.nodeType === 1 ) {
							jQuery.cleanData( getAll( elem, false ) );
							elem.innerHTML = value;
						}
					}

					elem = 0;

				// If using innerHTML throws an exception, use the fallback method
				} catch ( e ) {}
			}

			if ( elem ) {
				this.empty().append( value );
			}
		}, null, value, arguments.length );
	},

	replaceWith: function() {
		var ignored = [];

		// Make the changes, replacing each non-ignored context element with the new content
		return domManip( this, arguments, function( elem ) {
			var parent = this.parentNode;

			if ( jQuery.inArray( this, ignored ) < 0 ) {
				jQuery.cleanData( getAll( this ) );
				if ( parent ) {
					parent.replaceChild( elem, this );
				}
			}

		// Force callback invocation
		}, ignored );
	}
} );

jQuery.each( {
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after",
	replaceAll: "replaceWith"
}, function( name, original ) {
	jQuery.fn[ name ] = function( selector ) {
		var elems,
			ret = [],
			insert = jQuery( selector ),
			last = insert.length - 1,
			i = 0;

		for ( ; i <= last; i++ ) {
			elems = i === last ? this : this.clone( true );
			jQuery( insert[ i ] )[ original ]( elems );

			// Support: Android <=4.0 only, PhantomJS 1 only
			// .get() because push.apply(_, arraylike) throws on ancient WebKit
			push.apply( ret, elems.get() );
		}

		return this.pushStack( ret );
	};
} );
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

var rcustomProp = /^--/;


var getStyles = function( elem ) {

		// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)
		// IE throws on elements created in popups
		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
		var view = elem.ownerDocument.defaultView;

		if ( !view || !view.opener ) {
			view = window;
		}

		return view.getComputedStyle( elem );
	};

var swap = function( elem, options, callback ) {
	var ret, name,
		old = {};

	// Remember the old values, and insert the new ones
	for ( name in options ) {
		old[ name ] = elem.style[ name ];
		elem.style[ name ] = options[ name ];
	}

	ret = callback.call( elem );

	// Revert the old values
	for ( name in options ) {
		elem.style[ name ] = old[ name ];
	}

	return ret;
};


var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );



( function() {

	// Executing both pixelPosition & boxSizingReliable tests require only one layout
	// so they're executed at the same time to save the second computation.
	function computeStyleTests() {

		// This is a singleton, we need to execute it only once
		if ( !div ) {
			return;
		}

		container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
			"margin-top:1px;padding:0;border:0";
		div.style.cssText =
			"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
			"margin:auto;border:1px;padding:1px;" +
			"width:60%;top:1%";
		documentElement.appendChild( container ).appendChild( div );

		var divStyle = window.getComputedStyle( div );
		pixelPositionVal = divStyle.top !== "1%";

		// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
		reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;

		// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
		// Some styles come back with percentage values, even though they shouldn't
		div.style.right = "60%";
		pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;

		// Support: IE 9 - 11 only
		// Detect misreporting of content dimensions for box-sizing:border-box elements
		boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;

		// Support: IE 9 only
		// Detect overflow:scroll screwiness (gh-3699)
		// Support: Chrome <=64
		// Don't get tricked when zoom affects offsetWidth (gh-4029)
		div.style.position = "absolute";
		scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;

		documentElement.removeChild( container );

		// Nullify the div so it wouldn't be stored in the memory and
		// it will also be a sign that checks already performed
		div = null;
	}

	function roundPixelMeasures( measure ) {
		return Math.round( parseFloat( measure ) );
	}

	var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
		reliableTrDimensionsVal, reliableMarginLeftVal,
		container = document.createElement( "div" ),
		div = document.createElement( "div" );

	// Finish early in limited (non-browser) environments
	if ( !div.style ) {
		return;
	}

	// Support: IE <=9 - 11 only
	// Style of cloned element affects source element cloned (trac-8908)
	div.style.backgroundClip = "content-box";
	div.cloneNode( true ).style.backgroundClip = "";
	support.clearCloneStyle = div.style.backgroundClip === "content-box";

	jQuery.extend( support, {
		boxSizingReliable: function() {
			computeStyleTests();
			return boxSizingReliableVal;
		},
		pixelBoxStyles: function() {
			computeStyleTests();
			return pixelBoxStylesVal;
		},
		pixelPosition: function() {
			computeStyleTests();
			return pixelPositionVal;
		},
		reliableMarginLeft: function() {
			computeStyleTests();
			return reliableMarginLeftVal;
		},
		scrollboxSize: function() {
			computeStyleTests();
			return scrollboxSizeVal;
		},

		// Support: IE 9 - 11+, Edge 15 - 18+
		// IE/Edge misreport `getComputedStyle` of table rows with width/height
		// set in CSS while `offset*` properties report correct values.
		// Behavior in IE 9 is more subtle than in newer versions & it passes
		// some versions of this test; make sure not to make it pass there!
		//
		// Support: Firefox 70+
		// Only Firefox includes border widths
		// in computed dimensions. (gh-4529)
		reliableTrDimensions: function() {
			var table, tr, trChild, trStyle;
			if ( reliableTrDimensionsVal == null ) {
				table = document.createElement( "table" );
				tr = document.createElement( "tr" );
				trChild = document.createElement( "div" );

				table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
				tr.style.cssText = "box-sizing:content-box;border:1px solid";

				// Support: Chrome 86+
				// Height set through cssText does not get applied.
				// Computed height then comes back as 0.
				tr.style.height = "1px";
				trChild.style.height = "9px";

				// Support: Android 8 Chrome 86+
				// In our bodyBackground.html iframe,
				// display for all div elements is set to "inline",
				// which causes a problem only in Android 8 Chrome 86.
				// Ensuring the div is `display: block`
				// gets around this issue.
				trChild.style.display = "block";

				documentElement
					.appendChild( table )
					.appendChild( tr )
					.appendChild( trChild );

				trStyle = window.getComputedStyle( tr );
				reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
					parseInt( trStyle.borderTopWidth, 10 ) +
					parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;

				documentElement.removeChild( table );
			}
			return reliableTrDimensionsVal;
		}
	} );
} )();


function curCSS( elem, name, computed ) {
	var width, minWidth, maxWidth, ret,
		isCustomProp = rcustomProp.test( name ),

		// Support: Firefox 51+
		// Retrieving style before computed somehow
		// fixes an issue with getting wrong values
		// on detached elements
		style = elem.style;

	computed = computed || getStyles( elem );

	// getPropertyValue is needed for:
	//   .css('filter') (IE 9 only, trac-12537)
	//   .css('--customProperty) (gh-3144)
	if ( computed ) {

		// Support: IE <=9 - 11+
		// IE only supports `"float"` in `getPropertyValue`; in computed styles
		// it's only available as `"cssFloat"`. We no longer modify properties
		// sent to `.css()` apart from camelCasing, so we need to check both.
		// Normally, this would create difference in behavior: if
		// `getPropertyValue` returns an empty string, the value returned
		// by `.css()` would be `undefined`. This is usually the case for
		// disconnected elements. However, in IE even disconnected elements
		// with no styles return `"none"` for `getPropertyValue( "float" )`
		ret = computed.getPropertyValue( name ) || computed[ name ];

		if ( isCustomProp && ret ) {

			// Support: Firefox 105+, Chrome <=105+
			// Spec requires trimming whitespace for custom properties (gh-4926).
			// Firefox only trims leading whitespace. Chrome just collapses
			// both leading & trailing whitespace to a single space.
			//
			// Fall back to `undefined` if empty string returned.
			// This collapses a missing definition with property defined
			// and set to an empty string but there's no standard API
			// allowing us to differentiate them without a performance penalty
			// and returning `undefined` aligns with older jQuery.
			//
			// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED
			// as whitespace while CSS does not, but this is not a problem
			// because CSS preprocessing replaces them with U+000A LINE FEED
			// (which *is* CSS whitespace)
			// https://www.w3.org/TR/css-syntax-3/#input-preprocessing
			ret = ret.replace( rtrimCSS, "$1" ) || undefined;
		}

		if ( ret === "" && !isAttached( elem ) ) {
			ret = jQuery.style( elem, name );
		}

		// A tribute to the "awesome hack by Dean Edwards"
		// Android Browser returns percentage for some values,
		// but width seems to be reliably pixels.
		// This is against the CSSOM draft spec:
		// https://drafts.csswg.org/cssom/#resolved-values
		if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {

			// Remember the original values
			width = style.width;
			minWidth = style.minWidth;
			maxWidth = style.maxWidth;

			// Put in the new values to get a computed value out
			style.minWidth = style.maxWidth = style.width = ret;
			ret = computed.width;

			// Revert the changed values
			style.width = width;
			style.minWidth = minWidth;
			style.maxWidth = maxWidth;
		}
	}

	return ret !== undefined ?

		// Support: IE <=9 - 11 only
		// IE returns zIndex value as an integer.
		ret + "" :
		ret;
}


function addGetHookIf( conditionFn, hookFn ) {

	// Define the hook, we'll check on the first run if it's really needed.
	return {
		get: function() {
			if ( conditionFn() ) {

				// Hook not needed (or it's not possible to use it due
				// to missing dependency), remove it.
				delete this.get;
				return;
			}

			// Hook needed; redefine it so that the support test is not executed again.
			return ( this.get = hookFn ).apply( this, arguments );
		}
	};
}


var cssPrefixes = [ "Webkit", "Moz", "ms" ],
	emptyStyle = document.createElement( "div" ).style,
	vendorProps = {};

// Return a vendor-prefixed property or undefined
function vendorPropName( name ) {

	// Check for vendor prefixed names
	var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
		i = cssPrefixes.length;

	while ( i-- ) {
		name = cssPrefixes[ i ] + capName;
		if ( name in emptyStyle ) {
			return name;
		}
	}
}

// Return a potentially-mapped jQuery.cssProps or vendor prefixed property
function finalPropName( name ) {
	var final = jQuery.cssProps[ name ] || vendorProps[ name ];

	if ( final ) {
		return final;
	}
	if ( name in emptyStyle ) {
		return name;
	}
	return vendorProps[ name ] = vendorPropName( name ) || name;
}


var

	// Swappable if display is none or starts with table
	// except "table", "table-cell", or "table-caption"
	// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
	cssNormalTransform = {
		letterSpacing: "0",
		fontWeight: "400"
	};

function setPositiveNumber( _elem, value, subtract ) {

	// Any relative (+/-) values have already been
	// normalized at this point
	var matches = rcssNum.exec( value );
	return matches ?

		// Guard against undefined "subtract", e.g., when used as in cssHooks
		Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
		value;
}

function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
	var i = dimension === "width" ? 1 : 0,
		extra = 0,
		delta = 0,
		marginDelta = 0;

	// Adjustment may not be necessary
	if ( box === ( isBorderBox ? "border" : "content" ) ) {
		return 0;
	}

	for ( ; i < 4; i += 2 ) {

		// Both box models exclude margin
		// Count margin delta separately to only add it after scroll gutter adjustment.
		// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).
		if ( box === "margin" ) {
			marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
		}

		// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
		if ( !isBorderBox ) {

			// Add padding
			delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );

			// For "border" or "margin", add border
			if ( box !== "padding" ) {
				delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );

			// But still keep track of it otherwise
			} else {
				extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}

		// If we get here with a border-box (content + padding + border), we're seeking "content" or
		// "padding" or "margin"
		} else {

			// For "content", subtract padding
			if ( box === "content" ) {
				delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
			}

			// For "content" or "padding", subtract border
			if ( box !== "margin" ) {
				delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}
		}
	}

	// Account for positive content-box scroll gutter when requested by providing computedVal
	if ( !isBorderBox && computedVal >= 0 ) {

		// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
		// Assuming integer scroll gutter, subtract the rest and round down
		delta += Math.max( 0, Math.ceil(
			elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
			computedVal -
			delta -
			extra -
			0.5

		// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
		// Use an explicit zero to avoid NaN (gh-3964)
		) ) || 0;
	}

	return delta + marginDelta;
}

function getWidthOrHeight( elem, dimension, extra ) {

	// Start with computed style
	var styles = getStyles( elem ),

		// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
		// Fake content-box until we know it's needed to know the true value.
		boxSizingNeeded = !support.boxSizingReliable() || extra,
		isBorderBox = boxSizingNeeded &&
			jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
		valueIsBorderBox = isBorderBox,

		val = curCSS( elem, dimension, styles ),
		offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );

	// Support: Firefox <=54
	// Return a confounding non-pixel value or feign ignorance, as appropriate.
	if ( rnumnonpx.test( val ) ) {
		if ( !extra ) {
			return val;
		}
		val = "auto";
	}


	// Support: IE 9 - 11 only
	// Use offsetWidth/offsetHeight for when box sizing is unreliable.
	// In those cases, the computed value can be trusted to be border-box.
	if ( ( !support.boxSizingReliable() && isBorderBox ||

		// Support: IE 10 - 11+, Edge 15 - 18+
		// IE/Edge misreport `getComputedStyle` of table rows with width/height
		// set in CSS while `offset*` properties report correct values.
		// Interestingly, in some cases IE 9 doesn't suffer from this issue.
		!support.reliableTrDimensions() && nodeName( elem, "tr" ) ||

		// Fall back to offsetWidth/offsetHeight when value is "auto"
		// This happens for inline elements with no explicit setting (gh-3571)
		val === "auto" ||

		// Support: Android <=4.1 - 4.3 only
		// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
		!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&

		// Make sure the element is visible & connected
		elem.getClientRects().length ) {

		isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";

		// Where available, offsetWidth/offsetHeight approximate border box dimensions.
		// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
		// retrieved value as a content box dimension.
		valueIsBorderBox = offsetProp in elem;
		if ( valueIsBorderBox ) {
			val = elem[ offsetProp ];
		}
	}

	// Normalize "" and auto
	val = parseFloat( val ) || 0;

	// Adjust for the element's box model
	return ( val +
		boxModelAdjustment(
			elem,
			dimension,
			extra || ( isBorderBox ? "border" : "content" ),
			valueIsBorderBox,
			styles,

			// Provide the current computed size to request scroll gutter calculation (gh-3589)
			val
		)
	) + "px";
}

jQuery.extend( {

	// Add in style property hooks for overriding the default
	// behavior of getting and setting a style property
	cssHooks: {
		opacity: {
			get: function( elem, computed ) {
				if ( computed ) {

					// We should always get a number back from opacity
					var ret = curCSS( elem, "opacity" );
					return ret === "" ? "1" : ret;
				}
			}
		}
	},

	// Don't automatically add "px" to these possibly-unitless properties
	cssNumber: {
		animationIterationCount: true,
		aspectRatio: true,
		borderImageSlice: true,
		columnCount: true,
		flexGrow: true,
		flexShrink: true,
		fontWeight: true,
		gridArea: true,
		gridColumn: true,
		gridColumnEnd: true,
		gridColumnStart: true,
		gridRow: true,
		gridRowEnd: true,
		gridRowStart: true,
		lineHeight: true,
		opacity: true,
		order: true,
		orphans: true,
		scale: true,
		widows: true,
		zIndex: true,
		zoom: true,

		// SVG-related
		fillOpacity: true,
		floodOpacity: true,
		stopOpacity: true,
		strokeMiterlimit: true,
		strokeOpacity: true
	},

	// Add in properties whose names you wish to fix before
	// setting or getting the value
	cssProps: {},

	// Get and set the style property on a DOM Node
	style: function( elem, name, value, extra ) {

		// Don't set styles on text and comment nodes
		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
			return;
		}

		// Make sure that we're working with the right name
		var ret, type, hooks,
			origName = camelCase( name ),
			isCustomProp = rcustomProp.test( name ),
			style = elem.style;

		// Make sure that we're working with the right name. We don't
		// want to query the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Gets hook for the prefixed version, then unprefixed version
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// Check if we're setting a value
		if ( value !== undefined ) {
			type = typeof value;

			// Convert "+=" or "-=" to relative numbers (trac-7345)
			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
				value = adjustCSS( elem, name, ret );

				// Fixes bug trac-9237
				type = "number";
			}

			// Make sure that null and NaN values aren't set (trac-7116)
			if ( value == null || value !== value ) {
				return;
			}

			// If a number was passed in, add the unit (except for certain CSS properties)
			// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
			// "px" to a few hardcoded values.
			if ( type === "number" && !isCustomProp ) {
				value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
			}

			// background-* props affect original clone's values
			if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
				style[ name ] = "inherit";
			}

			// If a hook was provided, use that value, otherwise just set the specified value
			if ( !hooks || !( "set" in hooks ) ||
				( value = hooks.set( elem, value, extra ) ) !== undefined ) {

				if ( isCustomProp ) {
					style.setProperty( name, value );
				} else {
					style[ name ] = value;
				}
			}

		} else {

			// If a hook was provided get the non-computed value from there
			if ( hooks && "get" in hooks &&
				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {

				return ret;
			}

			// Otherwise just get the value from the style object
			return style[ name ];
		}
	},

	css: function( elem, name, extra, styles ) {
		var val, num, hooks,
			origName = camelCase( name ),
			isCustomProp = rcustomProp.test( name );

		// Make sure that we're working with the right name. We don't
		// want to modify the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Try prefixed name followed by the unprefixed name
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// If a hook was provided get the computed value from there
		if ( hooks && "get" in hooks ) {
			val = hooks.get( elem, true, extra );
		}

		// Otherwise, if a way to get the computed value exists, use that
		if ( val === undefined ) {
			val = curCSS( elem, name, styles );
		}

		// Convert "normal" to computed value
		if ( val === "normal" && name in cssNormalTransform ) {
			val = cssNormalTransform[ name ];
		}

		// Make numeric if forced or a qualifier was provided and val looks numeric
		if ( extra === "" || extra ) {
			num = parseFloat( val );
			return extra === true || isFinite( num ) ? num || 0 : val;
		}

		return val;
	}
} );

jQuery.each( [ "height", "width" ], function( _i, dimension ) {
	jQuery.cssHooks[ dimension ] = {
		get: function( elem, computed, extra ) {
			if ( computed ) {

				// Certain elements can have dimension info if we invisibly show them
				// but it must have a current display style that would benefit
				return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&

					// Support: Safari 8+
					// Table columns in Safari have non-zero offsetWidth & zero
					// getBoundingClientRect().width unless display is changed.
					// Support: IE <=11 only
					// Running getBoundingClientRect on a disconnected node
					// in IE throws an error.
					( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
					swap( elem, cssShow, function() {
						return getWidthOrHeight( elem, dimension, extra );
					} ) :
					getWidthOrHeight( elem, dimension, extra );
			}
		},

		set: function( elem, value, extra ) {
			var matches,
				styles = getStyles( elem ),

				// Only read styles.position if the test has a chance to fail
				// to avoid forcing a reflow.
				scrollboxSizeBuggy = !support.scrollboxSize() &&
					styles.position === "absolute",

				// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
				boxSizingNeeded = scrollboxSizeBuggy || extra,
				isBorderBox = boxSizingNeeded &&
					jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
				subtract = extra ?
					boxModelAdjustment(
						elem,
						dimension,
						extra,
						isBorderBox,
						styles
					) :
					0;

			// Account for unreliable border-box dimensions by comparing offset* to computed and
			// faking a content-box to get border and padding (gh-3699)
			if ( isBorderBox && scrollboxSizeBuggy ) {
				subtract -= Math.ceil(
					elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
					parseFloat( styles[ dimension ] ) -
					boxModelAdjustment( elem, dimension, "border", false, styles ) -
					0.5
				);
			}

			// Convert to pixels if value adjustment is needed
			if ( subtract && ( matches = rcssNum.exec( value ) ) &&
				( matches[ 3 ] || "px" ) !== "px" ) {

				elem.style[ dimension ] = value;
				value = jQuery.css( elem, dimension );
			}

			return setPositiveNumber( elem, value, subtract );
		}
	};
} );

jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
	function( elem, computed ) {
		if ( computed ) {
			return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
				elem.getBoundingClientRect().left -
					swap( elem, { marginLeft: 0 }, function() {
						return elem.getBoundingClientRect().left;
					} )
			) + "px";
		}
	}
);

// These hooks are used by animate to expand properties
jQuery.each( {
	margin: "",
	padding: "",
	border: "Width"
}, function( prefix, suffix ) {
	jQuery.cssHooks[ prefix + suffix ] = {
		expand: function( value ) {
			var i = 0,
				expanded = {},

				// Assumes a single number if not a string
				parts = typeof value === "string" ? value.split( " " ) : [ value ];

			for ( ; i < 4; i++ ) {
				expanded[ prefix + cssExpand[ i ] + suffix ] =
					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
			}

			return expanded;
		}
	};

	if ( prefix !== "margin" ) {
		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
	}
} );

jQuery.fn.extend( {
	css: function( name, value ) {
		return access( this, function( elem, name, value ) {
			var styles, len,
				map = {},
				i = 0;

			if ( Array.isArray( name ) ) {
				styles = getStyles( elem );
				len = name.length;

				for ( ; i < len; i++ ) {
					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
				}

				return map;
			}

			return value !== undefined ?
				jQuery.style( elem, name, value ) :
				jQuery.css( elem, name );
		}, name, value, arguments.length > 1 );
	}
} );


function Tween( elem, options, prop, end, easing ) {
	return new Tween.prototype.init( elem, options, prop, end, easing );
}
jQuery.Tween = Tween;

Tween.prototype = {
	constructor: Tween,
	init: function( elem, options, prop, end, easing, unit ) {
		this.elem = elem;
		this.prop = prop;
		this.easing = easing || jQuery.easing._default;
		this.options = options;
		this.start = this.now = this.cur();
		this.end = end;
		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
	},
	cur: function() {
		var hooks = Tween.propHooks[ this.prop ];

		return hooks && hooks.get ?
			hooks.get( this ) :
			Tween.propHooks._default.get( this );
	},
	run: function( percent ) {
		var eased,
			hooks = Tween.propHooks[ this.prop ];

		if ( this.options.duration ) {
			this.pos = eased = jQuery.easing[ this.easing ](
				percent, this.options.duration * percent, 0, 1, this.options.duration
			);
		} else {
			this.pos = eased = percent;
		}
		this.now = ( this.end - this.start ) * eased + this.start;

		if ( this.options.step ) {
			this.options.step.call( this.elem, this.now, this );
		}

		if ( hooks && hooks.set ) {
			hooks.set( this );
		} else {
			Tween.propHooks._default.set( this );
		}
		return this;
	}
};

Tween.prototype.init.prototype = Tween.prototype;

Tween.propHooks = {
	_default: {
		get: function( tween ) {
			var result;

			// Use a property on the element directly when it is not a DOM element,
			// or when there is no matching style property that exists.
			if ( tween.elem.nodeType !== 1 ||
				tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
				return tween.elem[ tween.prop ];
			}

			// Passing an empty string as a 3rd parameter to .css will automatically
			// attempt a parseFloat and fallback to a string if the parse fails.
			// Simple values such as "10px" are parsed to Float;
			// complex values such as "rotate(1rad)" are returned as-is.
			result = jQuery.css( tween.elem, tween.prop, "" );

			// Empty strings, null, undefined and "auto" are converted to 0.
			return !result || result === "auto" ? 0 : result;
		},
		set: function( tween ) {

			// Use step hook for back compat.
			// Use cssHook if its there.
			// Use .style if available and use plain properties where available.
			if ( jQuery.fx.step[ tween.prop ] ) {
				jQuery.fx.step[ tween.prop ]( tween );
			} else if ( tween.elem.nodeType === 1 && (
				jQuery.cssHooks[ tween.prop ] ||
					tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
			} else {
				tween.elem[ tween.prop ] = tween.now;
			}
		}
	}
};

// Support: IE <=9 only
// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
	set: function( tween ) {
		if ( tween.elem.nodeType && tween.elem.parentNode ) {
			tween.elem[ tween.prop ] = tween.now;
		}
	}
};

jQuery.easing = {
	linear: function( p ) {
		return p;
	},
	swing: function( p ) {
		return 0.5 - Math.cos( p * Math.PI ) / 2;
	},
	_default: "swing"
};

jQuery.fx = Tween.prototype.init;

// Back compat <1.8 extension point
jQuery.fx.step = {};




var
	fxNow, inProgress,
	rfxtypes = /^(?:toggle|show|hide)$/,
	rrun = /queueHooks$/;

function schedule() {
	if ( inProgress ) {
		if ( document.hidden === false && window.requestAnimationFrame ) {
			window.requestAnimationFrame( schedule );
		} else {
			window.setTimeout( schedule, jQuery.fx.interval );
		}

		jQuery.fx.tick();
	}
}

// Animations created synchronously will run synchronously
function createFxNow() {
	window.setTimeout( function() {
		fxNow = undefined;
	} );
	return ( fxNow = Date.now() );
}

// Generate parameters to create a standard animation
function genFx( type, includeWidth ) {
	var which,
		i = 0,
		attrs = { height: type };

	// If we include width, step value is 1 to do all cssExpand values,
	// otherwise step value is 2 to skip over Left and Right
	includeWidth = includeWidth ? 1 : 0;
	for ( ; i < 4; i += 2 - includeWidth ) {
		which = cssExpand[ i ];
		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
	}

	if ( includeWidth ) {
		attrs.opacity = attrs.width = type;
	}

	return attrs;
}

function createTween( value, prop, animation ) {
	var tween,
		collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
		index = 0,
		length = collection.length;
	for ( ; index < length; index++ ) {
		if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {

			// We're done with this property
			return tween;
		}
	}
}

function defaultPrefilter( elem, props, opts ) {
	var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
		isBox = "width" in props || "height" in props,
		anim = this,
		orig = {},
		style = elem.style,
		hidden = elem.nodeType && isHiddenWithinTree( elem ),
		dataShow = dataPriv.get( elem, "fxshow" );

	// Queue-skipping animations hijack the fx hooks
	if ( !opts.queue ) {
		hooks = jQuery._queueHooks( elem, "fx" );
		if ( hooks.unqueued == null ) {
			hooks.unqueued = 0;
			oldfire = hooks.empty.fire;
			hooks.empty.fire = function() {
				if ( !hooks.unqueued ) {
					oldfire();
				}
			};
		}
		hooks.unqueued++;

		anim.always( function() {

			// Ensure the complete handler is called before this completes
			anim.always( function() {
				hooks.unqueued--;
				if ( !jQuery.queue( elem, "fx" ).length ) {
					hooks.empty.fire();
				}
			} );
		} );
	}

	// Detect show/hide animations
	for ( prop in props ) {
		value = props[ prop ];
		if ( rfxtypes.test( value ) ) {
			delete props[ prop ];
			toggle = toggle || value === "toggle";
			if ( value === ( hidden ? "hide" : "show" ) ) {

				// Pretend to be hidden if this is a "show" and
				// there is still data from a stopped show/hide
				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
					hidden = true;

				// Ignore all other no-op show/hide data
				} else {
					continue;
				}
			}
			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
		}
	}

	// Bail out if this is a no-op like .hide().hide()
	propTween = !jQuery.isEmptyObject( props );
	if ( !propTween && jQuery.isEmptyObject( orig ) ) {
		return;
	}

	// Restrict "overflow" and "display" styles during box animations
	if ( isBox && elem.nodeType === 1 ) {

		// Support: IE <=9 - 11, Edge 12 - 15
		// Record all 3 overflow attributes because IE does not infer the shorthand
		// from identically-valued overflowX and overflowY and Edge just mirrors
		// the overflowX value there.
		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];

		// Identify a display type, preferring old show/hide data over the CSS cascade
		restoreDisplay = dataShow && dataShow.display;
		if ( restoreDisplay == null ) {
			restoreDisplay = dataPriv.get( elem, "display" );
		}
		display = jQuery.css( elem, "display" );
		if ( display === "none" ) {
			if ( restoreDisplay ) {
				display = restoreDisplay;
			} else {

				// Get nonempty value(s) by temporarily forcing visibility
				showHide( [ elem ], true );
				restoreDisplay = elem.style.display || restoreDisplay;
				display = jQuery.css( elem, "display" );
				showHide( [ elem ] );
			}
		}

		// Animate inline elements as inline-block
		if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
			if ( jQuery.css( elem, "float" ) === "none" ) {

				// Restore the original display value at the end of pure show/hide animations
				if ( !propTween ) {
					anim.done( function() {
						style.display = restoreDisplay;
					} );
					if ( restoreDisplay == null ) {
						display = style.display;
						restoreDisplay = display === "none" ? "" : display;
					}
				}
				style.display = "inline-block";
			}
		}
	}

	if ( opts.overflow ) {
		style.overflow = "hidden";
		anim.always( function() {
			style.overflow = opts.overflow[ 0 ];
			style.overflowX = opts.overflow[ 1 ];
			style.overflowY = opts.overflow[ 2 ];
		} );
	}

	// Implement show/hide animations
	propTween = false;
	for ( prop in orig ) {

		// General show/hide setup for this element animation
		if ( !propTween ) {
			if ( dataShow ) {
				if ( "hidden" in dataShow ) {
					hidden = dataShow.hidden;
				}
			} else {
				dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
			}

			// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
			if ( toggle ) {
				dataShow.hidden = !hidden;
			}

			// Show elements before animating them
			if ( hidden ) {
				showHide( [ elem ], true );
			}

			/* eslint-disable no-loop-func */

			anim.done( function() {

				/* eslint-enable no-loop-func */

				// The final step of a "hide" animation is actually hiding the element
				if ( !hidden ) {
					showHide( [ elem ] );
				}
				dataPriv.remove( elem, "fxshow" );
				for ( prop in orig ) {
					jQuery.style( elem, prop, orig[ prop ] );
				}
			} );
		}

		// Per-property setup
		propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
		if ( !( prop in dataShow ) ) {
			dataShow[ prop ] = propTween.start;
			if ( hidden ) {
				propTween.end = propTween.start;
				propTween.start = 0;
			}
		}
	}
}

function propFilter( props, specialEasing ) {
	var index, name, easing, value, hooks;

	// camelCase, specialEasing and expand cssHook pass
	for ( index in props ) {
		name = camelCase( index );
		easing = specialEasing[ name ];
		value = props[ index ];
		if ( Array.isArray( value ) ) {
			easing = value[ 1 ];
			value = props[ index ] = value[ 0 ];
		}

		if ( index !== name ) {
			props[ name ] = value;
			delete props[ index ];
		}

		hooks = jQuery.cssHooks[ name ];
		if ( hooks && "expand" in hooks ) {
			value = hooks.expand( value );
			delete props[ name ];

			// Not quite $.extend, this won't overwrite existing keys.
			// Reusing 'index' because we have the correct "name"
			for ( index in value ) {
				if ( !( index in props ) ) {
					props[ index ] = value[ index ];
					specialEasing[ index ] = easing;
				}
			}
		} else {
			specialEasing[ name ] = easing;
		}
	}
}

function Animation( elem, properties, options ) {
	var result,
		stopped,
		index = 0,
		length = Animation.prefilters.length,
		deferred = jQuery.Deferred().always( function() {

			// Don't match elem in the :animated selector
			delete tick.elem;
		} ),
		tick = function() {
			if ( stopped ) {
				return false;
			}
			var currentTime = fxNow || createFxNow(),
				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),

				// Support: Android 2.3 only
				// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)
				temp = remaining / animation.duration || 0,
				percent = 1 - temp,
				index = 0,
				length = animation.tweens.length;

			for ( ; index < length; index++ ) {
				animation.tweens[ index ].run( percent );
			}

			deferred.notifyWith( elem, [ animation, percent, remaining ] );

			// If there's more to do, yield
			if ( percent < 1 && length ) {
				return remaining;
			}

			// If this was an empty animation, synthesize a final progress notification
			if ( !length ) {
				deferred.notifyWith( elem, [ animation, 1, 0 ] );
			}

			// Resolve the animation and report its conclusion
			deferred.resolveWith( elem, [ animation ] );
			return false;
		},
		animation = deferred.promise( {
			elem: elem,
			props: jQuery.extend( {}, properties ),
			opts: jQuery.extend( true, {
				specialEasing: {},
				easing: jQuery.easing._default
			}, options ),
			originalProperties: properties,
			originalOptions: options,
			startTime: fxNow || createFxNow(),
			duration: options.duration,
			tweens: [],
			createTween: function( prop, end ) {
				var tween = jQuery.Tween( elem, animation.opts, prop, end,
					animation.opts.specialEasing[ prop ] || animation.opts.easing );
				animation.tweens.push( tween );
				return tween;
			},
			stop: function( gotoEnd ) {
				var index = 0,

					// If we are going to the end, we want to run all the tweens
					// otherwise we skip this part
					length = gotoEnd ? animation.tweens.length : 0;
				if ( stopped ) {
					return this;
				}
				stopped = true;
				for ( ; index < length; index++ ) {
					animation.tweens[ index ].run( 1 );
				}

				// Resolve when we played the last frame; otherwise, reject
				if ( gotoEnd ) {
					deferred.notifyWith( elem, [ animation, 1, 0 ] );
					deferred.resolveWith( elem, [ animation, gotoEnd ] );
				} else {
					deferred.rejectWith( elem, [ animation, gotoEnd ] );
				}
				return this;
			}
		} ),
		props = animation.props;

	propFilter( props, animation.opts.specialEasing );

	for ( ; index < length; index++ ) {
		result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
		if ( result ) {
			if ( isFunction( result.stop ) ) {
				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
					result.stop.bind( result );
			}
			return result;
		}
	}

	jQuery.map( props, createTween, animation );

	if ( isFunction( animation.opts.start ) ) {
		animation.opts.start.call( elem, animation );
	}

	// Attach callbacks from options
	animation
		.progress( animation.opts.progress )
		.done( animation.opts.done, animation.opts.complete )
		.fail( animation.opts.fail )
		.always( animation.opts.always );

	jQuery.fx.timer(
		jQuery.extend( tick, {
			elem: elem,
			anim: animation,
			queue: animation.opts.queue
		} )
	);

	return animation;
}

jQuery.Animation = jQuery.extend( Animation, {

	tweeners: {
		"*": [ function( prop, value ) {
			var tween = this.createTween( prop, value );
			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
			return tween;
		} ]
	},

	tweener: function( props, callback ) {
		if ( isFunction( props ) ) {
			callback = props;
			props = [ "*" ];
		} else {
			props = props.match( rnothtmlwhite );
		}

		var prop,
			index = 0,
			length = props.length;

		for ( ; index < length; index++ ) {
			prop = props[ index ];
			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
			Animation.tweeners[ prop ].unshift( callback );
		}
	},

	prefilters: [ defaultPrefilter ],

	prefilter: function( callback, prepend ) {
		if ( prepend ) {
			Animation.prefilters.unshift( callback );
		} else {
			Animation.prefilters.push( callback );
		}
	}
} );

jQuery.speed = function( speed, easing, fn ) {
	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
		complete: fn || !fn && easing ||
			isFunction( speed ) && speed,
		duration: speed,
		easing: fn && easing || easing && !isFunction( easing ) && easing
	};

	// Go to the end state if fx are off
	if ( jQuery.fx.off ) {
		opt.duration = 0;

	} else {
		if ( typeof opt.duration !== "number" ) {
			if ( opt.duration in jQuery.fx.speeds ) {
				opt.duration = jQuery.fx.speeds[ opt.duration ];

			} else {
				opt.duration = jQuery.fx.speeds._default;
			}
		}
	}

	// Normalize opt.queue - true/undefined/null -> "fx"
	if ( opt.queue == null || opt.queue === true ) {
		opt.queue = "fx";
	}

	// Queueing
	opt.old = opt.complete;

	opt.complete = function() {
		if ( isFunction( opt.old ) ) {
			opt.old.call( this );
		}

		if ( opt.queue ) {
			jQuery.dequeue( this, opt.queue );
		}
	};

	return opt;
};

jQuery.fn.extend( {
	fadeTo: function( speed, to, easing, callback ) {

		// Show any hidden elements after setting opacity to 0
		return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()

			// Animate to the value specified
			.end().animate( { opacity: to }, speed, easing, callback );
	},
	animate: function( prop, speed, easing, callback ) {
		var empty = jQuery.isEmptyObject( prop ),
			optall = jQuery.speed( speed, easing, callback ),
			doAnimation = function() {

				// Operate on a copy of prop so per-property easing won't be lost
				var anim = Animation( this, jQuery.extend( {}, prop ), optall );

				// Empty animations, or finishing resolves immediately
				if ( empty || dataPriv.get( this, "finish" ) ) {
					anim.stop( true );
				}
			};

		doAnimation.finish = doAnimation;

		return empty || optall.queue === false ?
			this.each( doAnimation ) :
			this.queue( optall.queue, doAnimation );
	},
	stop: function( type, clearQueue, gotoEnd ) {
		var stopQueue = function( hooks ) {
			var stop = hooks.stop;
			delete hooks.stop;
			stop( gotoEnd );
		};

		if ( typeof type !== "string" ) {
			gotoEnd = clearQueue;
			clearQueue = type;
			type = undefined;
		}
		if ( clearQueue ) {
			this.queue( type || "fx", [] );
		}

		return this.each( function() {
			var dequeue = true,
				index = type != null && type + "queueHooks",
				timers = jQuery.timers,
				data = dataPriv.get( this );

			if ( index ) {
				if ( data[ index ] && data[ index ].stop ) {
					stopQueue( data[ index ] );
				}
			} else {
				for ( index in data ) {
					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
						stopQueue( data[ index ] );
					}
				}
			}

			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this &&
					( type == null || timers[ index ].queue === type ) ) {

					timers[ index ].anim.stop( gotoEnd );
					dequeue = false;
					timers.splice( index, 1 );
				}
			}

			// Start the next in the queue if the last step wasn't forced.
			// Timers currently will call their complete callbacks, which
			// will dequeue but only if they were gotoEnd.
			if ( dequeue || !gotoEnd ) {
				jQuery.dequeue( this, type );
			}
		} );
	},
	finish: function( type ) {
		if ( type !== false ) {
			type = type || "fx";
		}
		return this.each( function() {
			var index,
				data = dataPriv.get( this ),
				queue = data[ type + "queue" ],
				hooks = data[ type + "queueHooks" ],
				timers = jQuery.timers,
				length = queue ? queue.length : 0;

			// Enable finishing flag on private data
			data.finish = true;

			// Empty the queue first
			jQuery.queue( this, type, [] );

			if ( hooks && hooks.stop ) {
				hooks.stop.call( this, true );
			}

			// Look for any active animations, and finish them
			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
					timers[ index ].anim.stop( true );
					timers.splice( index, 1 );
				}
			}

			// Look for any animations in the old queue and finish them
			for ( index = 0; index < length; index++ ) {
				if ( queue[ index ] && queue[ index ].finish ) {
					queue[ index ].finish.call( this );
				}
			}

			// Turn off finishing flag
			delete data.finish;
		} );
	}
} );

jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) {
	var cssFn = jQuery.fn[ name ];
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return speed == null || typeof speed === "boolean" ?
			cssFn.apply( this, arguments ) :
			this.animate( genFx( name, true ), speed, easing, callback );
	};
} );

// Generate shortcuts for custom animations
jQuery.each( {
	slideDown: genFx( "show" ),
	slideUp: genFx( "hide" ),
	slideToggle: genFx( "toggle" ),
	fadeIn: { opacity: "show" },
	fadeOut: { opacity: "hide" },
	fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return this.animate( props, speed, easing, callback );
	};
} );

jQuery.timers = [];
jQuery.fx.tick = function() {
	var timer,
		i = 0,
		timers = jQuery.timers;

	fxNow = Date.now();

	for ( ; i < timers.length; i++ ) {
		timer = timers[ i ];

		// Run the timer and safely remove it when done (allowing for external removal)
		if ( !timer() && timers[ i ] === timer ) {
			timers.splice( i--, 1 );
		}
	}

	if ( !timers.length ) {
		jQuery.fx.stop();
	}
	fxNow = undefined;
};

jQuery.fx.timer = function( timer ) {
	jQuery.timers.push( timer );
	jQuery.fx.start();
};

jQuery.fx.interval = 13;
jQuery.fx.start = function() {
	if ( inProgress ) {
		return;
	}

	inProgress = true;
	schedule();
};

jQuery.fx.stop = function() {
	inProgress = null;
};

jQuery.fx.speeds = {
	slow: 600,
	fast: 200,

	// Default speed
	_default: 400
};


// Based off of the plugin by Clint Helfers, with permission.
jQuery.fn.delay = function( time, type ) {
	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
	type = type || "fx";

	return this.queue( type, function( next, hooks ) {
		var timeout = window.setTimeout( next, time );
		hooks.stop = function() {
			window.clearTimeout( timeout );
		};
	} );
};


( function() {
	var input = document.createElement( "input" ),
		select = document.createElement( "select" ),
		opt = select.appendChild( document.createElement( "option" ) );

	input.type = "checkbox";

	// Support: Android <=4.3 only
	// Default value for a checkbox should be "on"
	support.checkOn = input.value !== "";

	// Support: IE <=11 only
	// Must access selectedIndex to make default options select
	support.optSelected = opt.selected;

	// Support: IE <=11 only
	// An input loses its value after becoming a radio
	input = document.createElement( "input" );
	input.value = "t";
	input.type = "radio";
	support.radioValue = input.value === "t";
} )();


var boolHook,
	attrHandle = jQuery.expr.attrHandle;

jQuery.fn.extend( {
	attr: function( name, value ) {
		return access( this, jQuery.attr, name, value, arguments.length > 1 );
	},

	removeAttr: function( name ) {
		return this.each( function() {
			jQuery.removeAttr( this, name );
		} );
	}
} );

jQuery.extend( {
	attr: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set attributes on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		// Fallback to prop when attributes are not supported
		if ( typeof elem.getAttribute === "undefined" ) {
			return jQuery.prop( elem, name, value );
		}

		// Attribute hooks are determined by the lowercase version
		// Grab necessary hook if one is defined
		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
			hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
				( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
		}

		if ( value !== undefined ) {
			if ( value === null ) {
				jQuery.removeAttr( elem, name );
				return;
			}

			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			elem.setAttribute( name, value + "" );
			return value;
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		ret = jQuery.find.attr( elem, name );

		// Non-existent attributes return null, we normalize to undefined
		return ret == null ? undefined : ret;
	},

	attrHooks: {
		type: {
			set: function( elem, value ) {
				if ( !support.radioValue && value === "radio" &&
					nodeName( elem, "input" ) ) {
					var val = elem.value;
					elem.setAttribute( "type", value );
					if ( val ) {
						elem.value = val;
					}
					return value;
				}
			}
		}
	},

	removeAttr: function( elem, value ) {
		var name,
			i = 0,

			// Attribute names can contain non-HTML whitespace characters
			// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
			attrNames = value && value.match( rnothtmlwhite );

		if ( attrNames && elem.nodeType === 1 ) {
			while ( ( name = attrNames[ i++ ] ) ) {
				elem.removeAttribute( name );
			}
		}
	}
} );

// Hooks for boolean attributes
boolHook = {
	set: function( elem, value, name ) {
		if ( value === false ) {

			// Remove boolean attributes when set to false
			jQuery.removeAttr( elem, name );
		} else {
			elem.setAttribute( name, name );
		}
		return name;
	}
};

jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {
	var getter = attrHandle[ name ] || jQuery.find.attr;

	attrHandle[ name ] = function( elem, name, isXML ) {
		var ret, handle,
			lowercaseName = name.toLowerCase();

		if ( !isXML ) {

			// Avoid an infinite loop by temporarily removing this function from the getter
			handle = attrHandle[ lowercaseName ];
			attrHandle[ lowercaseName ] = ret;
			ret = getter( elem, name, isXML ) != null ?
				lowercaseName :
				null;
			attrHandle[ lowercaseName ] = handle;
		}
		return ret;
	};
} );




var rfocusable = /^(?:input|select|textarea|button)$/i,
	rclickable = /^(?:a|area)$/i;

jQuery.fn.extend( {
	prop: function( name, value ) {
		return access( this, jQuery.prop, name, value, arguments.length > 1 );
	},

	removeProp: function( name ) {
		return this.each( function() {
			delete this[ jQuery.propFix[ name ] || name ];
		} );
	}
} );

jQuery.extend( {
	prop: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set properties on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {

			// Fix name and attach hooks
			name = jQuery.propFix[ name ] || name;
			hooks = jQuery.propHooks[ name ];
		}

		if ( value !== undefined ) {
			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			return ( elem[ name ] = value );
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		return elem[ name ];
	},

	propHooks: {
		tabIndex: {
			get: function( elem ) {

				// Support: IE <=9 - 11 only
				// elem.tabIndex doesn't always return the
				// correct value when it hasn't been explicitly set
				// Use proper attribute retrieval (trac-12072)
				var tabindex = jQuery.find.attr( elem, "tabindex" );

				if ( tabindex ) {
					return parseInt( tabindex, 10 );
				}

				if (
					rfocusable.test( elem.nodeName ) ||
					rclickable.test( elem.nodeName ) &&
					elem.href
				) {
					return 0;
				}

				return -1;
			}
		}
	},

	propFix: {
		"for": "htmlFor",
		"class": "className"
	}
} );

// Support: IE <=11 only
// Accessing the selectedIndex property
// forces the browser to respect setting selected
// on the option
// The getter ensures a default option is selected
// when in an optgroup
// eslint rule "no-unused-expressions" is disabled for this code
// since it considers such accessions noop
if ( !support.optSelected ) {
	jQuery.propHooks.selected = {
		get: function( elem ) {

			/* eslint no-unused-expressions: "off" */

			var parent = elem.parentNode;
			if ( parent && parent.parentNode ) {
				parent.parentNode.selectedIndex;
			}
			return null;
		},
		set: function( elem ) {

			/* eslint no-unused-expressions: "off" */

			var parent = elem.parentNode;
			if ( parent ) {
				parent.selectedIndex;

				if ( parent.parentNode ) {
					parent.parentNode.selectedIndex;
				}
			}
		}
	};
}

jQuery.each( [
	"tabIndex",
	"readOnly",
	"maxLength",
	"cellSpacing",
	"cellPadding",
	"rowSpan",
	"colSpan",
	"useMap",
	"frameBorder",
	"contentEditable"
], function() {
	jQuery.propFix[ this.toLowerCase() ] = this;
} );




	// Strip and collapse whitespace according to HTML spec
	// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
	function stripAndCollapse( value ) {
		var tokens = value.match( rnothtmlwhite ) || [];
		return tokens.join( " " );
	}


function getClass( elem ) {
	return elem.getAttribute && elem.getAttribute( "class" ) || "";
}

function classesToArray( value ) {
	if ( Array.isArray( value ) ) {
		return value;
	}
	if ( typeof value === "string" ) {
		return value.match( rnothtmlwhite ) || [];
	}
	return [];
}

jQuery.fn.extend( {
	addClass: function( value ) {
		var classNames, cur, curValue, className, i, finalValue;

		if ( isFunction( value ) ) {
			return this.each( function( j ) {
				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		classNames = classesToArray( value );

		if ( classNames.length ) {
			return this.each( function() {
				curValue = getClass( this );
				cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					for ( i = 0; i < classNames.length; i++ ) {
						className = classNames[ i ];
						if ( cur.indexOf( " " + className + " " ) < 0 ) {
							cur += className + " ";
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						this.setAttribute( "class", finalValue );
					}
				}
			} );
		}

		return this;
	},

	removeClass: function( value ) {
		var classNames, cur, curValue, className, i, finalValue;

		if ( isFunction( value ) ) {
			return this.each( function( j ) {
				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		if ( !arguments.length ) {
			return this.attr( "class", "" );
		}

		classNames = classesToArray( value );

		if ( classNames.length ) {
			return this.each( function() {
				curValue = getClass( this );

				// This expression is here for better compressibility (see addClass)
				cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					for ( i = 0; i < classNames.length; i++ ) {
						className = classNames[ i ];

						// Remove *all* instances
						while ( cur.indexOf( " " + className + " " ) > -1 ) {
							cur = cur.replace( " " + className + " ", " " );
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						this.setAttribute( "class", finalValue );
					}
				}
			} );
		}

		return this;
	},

	toggleClass: function( value, stateVal ) {
		var classNames, className, i, self,
			type = typeof value,
			isValidValue = type === "string" || Array.isArray( value );

		if ( isFunction( value ) ) {
			return this.each( function( i ) {
				jQuery( this ).toggleClass(
					value.call( this, i, getClass( this ), stateVal ),
					stateVal
				);
			} );
		}

		if ( typeof stateVal === "boolean" && isValidValue ) {
			return stateVal ? this.addClass( value ) : this.removeClass( value );
		}

		classNames = classesToArray( value );

		return this.each( function() {
			if ( isValidValue ) {

				// Toggle individual class names
				self = jQuery( this );

				for ( i = 0; i < classNames.length; i++ ) {
					className = classNames[ i ];

					// Check each className given, space separated list
					if ( self.hasClass( className ) ) {
						self.removeClass( className );
					} else {
						self.addClass( className );
					}
				}

			// Toggle whole class name
			} else if ( value === undefined || type === "boolean" ) {
				className = getClass( this );
				if ( className ) {

					// Store className if set
					dataPriv.set( this, "__className__", className );
				}

				// If the element has a class name or if we're passed `false`,
				// then remove the whole classname (if there was one, the above saved it).
				// Otherwise bring back whatever was previously saved (if anything),
				// falling back to the empty string if nothing was stored.
				if ( this.setAttribute ) {
					this.setAttribute( "class",
						className || value === false ?
							"" :
							dataPriv.get( this, "__className__" ) || ""
					);
				}
			}
		} );
	},

	hasClass: function( selector ) {
		var className, elem,
			i = 0;

		className = " " + selector + " ";
		while ( ( elem = this[ i++ ] ) ) {
			if ( elem.nodeType === 1 &&
				( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
				return true;
			}
		}

		return false;
	}
} );




var rreturn = /\r/g;

jQuery.fn.extend( {
	val: function( value ) {
		var hooks, ret, valueIsFunction,
			elem = this[ 0 ];

		if ( !arguments.length ) {
			if ( elem ) {
				hooks = jQuery.valHooks[ elem.type ] ||
					jQuery.valHooks[ elem.nodeName.toLowerCase() ];

				if ( hooks &&
					"get" in hooks &&
					( ret = hooks.get( elem, "value" ) ) !== undefined
				) {
					return ret;
				}

				ret = elem.value;

				// Handle most common string cases
				if ( typeof ret === "string" ) {
					return ret.replace( rreturn, "" );
				}

				// Handle cases where value is null/undef or number
				return ret == null ? "" : ret;
			}

			return;
		}

		valueIsFunction = isFunction( value );

		return this.each( function( i ) {
			var val;

			if ( this.nodeType !== 1 ) {
				return;
			}

			if ( valueIsFunction ) {
				val = value.call( this, i, jQuery( this ).val() );
			} else {
				val = value;
			}

			// Treat null/undefined as ""; convert numbers to string
			if ( val == null ) {
				val = "";

			} else if ( typeof val === "number" ) {
				val += "";

			} else if ( Array.isArray( val ) ) {
				val = jQuery.map( val, function( value ) {
					return value == null ? "" : value + "";
				} );
			}

			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];

			// If set returns undefined, fall back to normal setting
			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
				this.value = val;
			}
		} );
	}
} );

jQuery.extend( {
	valHooks: {
		option: {
			get: function( elem ) {

				var val = jQuery.find.attr( elem, "value" );
				return val != null ?
					val :

					// Support: IE <=10 - 11 only
					// option.text throws exceptions (trac-14686, trac-14858)
					// Strip and collapse whitespace
					// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
					stripAndCollapse( jQuery.text( elem ) );
			}
		},
		select: {
			get: function( elem ) {
				var value, option, i,
					options = elem.options,
					index = elem.selectedIndex,
					one = elem.type === "select-one",
					values = one ? null : [],
					max = one ? index + 1 : options.length;

				if ( index < 0 ) {
					i = max;

				} else {
					i = one ? index : 0;
				}

				// Loop through all the selected options
				for ( ; i < max; i++ ) {
					option = options[ i ];

					// Support: IE <=9 only
					// IE8-9 doesn't update selected after form reset (trac-2551)
					if ( ( option.selected || i === index ) &&

							// Don't return options that are disabled or in a disabled optgroup
							!option.disabled &&
							( !option.parentNode.disabled ||
								!nodeName( option.parentNode, "optgroup" ) ) ) {

						// Get the specific value for the option
						value = jQuery( option ).val();

						// We don't need an array for one selects
						if ( one ) {
							return value;
						}

						// Multi-Selects return an array
						values.push( value );
					}
				}

				return values;
			},

			set: function( elem, value ) {
				var optionSet, option,
					options = elem.options,
					values = jQuery.makeArray( value ),
					i = options.length;

				while ( i-- ) {
					option = options[ i ];

					/* eslint-disable no-cond-assign */

					if ( option.selected =
						jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
					) {
						optionSet = true;
					}

					/* eslint-enable no-cond-assign */
				}

				// Force browsers to behave consistently when non-matching value is set
				if ( !optionSet ) {
					elem.selectedIndex = -1;
				}
				return values;
			}
		}
	}
} );

// Radios and checkboxes getter/setter
jQuery.each( [ "radio", "checkbox" ], function() {
	jQuery.valHooks[ this ] = {
		set: function( elem, value ) {
			if ( Array.isArray( value ) ) {
				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
			}
		}
	};
	if ( !support.checkOn ) {
		jQuery.valHooks[ this ].get = function( elem ) {
			return elem.getAttribute( "value" ) === null ? "on" : elem.value;
		};
	}
} );




// Return jQuery for attributes-only inclusion
var location = window.location;

var nonce = { guid: Date.now() };

var rquery = ( /\?/ );



// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
	var xml, parserErrorElem;
	if ( !data || typeof data !== "string" ) {
		return null;
	}

	// Support: IE 9 - 11 only
	// IE throws on parseFromString with invalid input.
	try {
		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
	} catch ( e ) {}

	parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
	if ( !xml || parserErrorElem ) {
		jQuery.error( "Invalid XML: " + (
			parserErrorElem ?
				jQuery.map( parserErrorElem.childNodes, function( el ) {
					return el.textContent;
				} ).join( "\n" ) :
				data
		) );
	}
	return xml;
};


var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
	stopPropagationCallback = function( e ) {
		e.stopPropagation();
	};

jQuery.extend( jQuery.event, {

	trigger: function( event, data, elem, onlyHandlers ) {

		var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
			eventPath = [ elem || document ],
			type = hasOwn.call( event, "type" ) ? event.type : event,
			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];

		cur = lastElement = tmp = elem = elem || document;

		// Don't do events on text and comment nodes
		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
			return;
		}

		// focus/blur morphs to focusin/out; ensure we're not firing them right now
		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
			return;
		}

		if ( type.indexOf( "." ) > -1 ) {

			// Namespaced trigger; create a regexp to match event type in handle()
			namespaces = type.split( "." );
			type = namespaces.shift();
			namespaces.sort();
		}
		ontype = type.indexOf( ":" ) < 0 && "on" + type;

		// Caller can pass in a jQuery.Event object, Object, or just an event type string
		event = event[ jQuery.expando ] ?
			event :
			new jQuery.Event( type, typeof event === "object" && event );

		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
		event.isTrigger = onlyHandlers ? 2 : 3;
		event.namespace = namespaces.join( "." );
		event.rnamespace = event.namespace ?
			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
			null;

		// Clean up the event in case it is being reused
		event.result = undefined;
		if ( !event.target ) {
			event.target = elem;
		}

		// Clone any incoming data and prepend the event, creating the handler arg list
		data = data == null ?
			[ event ] :
			jQuery.makeArray( data, [ event ] );

		// Allow special events to draw outside the lines
		special = jQuery.event.special[ type ] || {};
		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
			return;
		}

		// Determine event propagation path in advance, per W3C events spec (trac-9951)
		// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)
		if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {

			bubbleType = special.delegateType || type;
			if ( !rfocusMorph.test( bubbleType + type ) ) {
				cur = cur.parentNode;
			}
			for ( ; cur; cur = cur.parentNode ) {
				eventPath.push( cur );
				tmp = cur;
			}

			// Only add window if we got to document (e.g., not plain obj or detached DOM)
			if ( tmp === ( elem.ownerDocument || document ) ) {
				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
			}
		}

		// Fire handlers on the event path
		i = 0;
		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
			lastElement = cur;
			event.type = i > 1 ?
				bubbleType :
				special.bindType || type;

			// jQuery handler
			handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
				dataPriv.get( cur, "handle" );
			if ( handle ) {
				handle.apply( cur, data );
			}

			// Native handler
			handle = ontype && cur[ ontype ];
			if ( handle && handle.apply && acceptData( cur ) ) {
				event.result = handle.apply( cur, data );
				if ( event.result === false ) {
					event.preventDefault();
				}
			}
		}
		event.type = type;

		// If nobody prevented the default action, do it now
		if ( !onlyHandlers && !event.isDefaultPrevented() ) {

			if ( ( !special._default ||
				special._default.apply( eventPath.pop(), data ) === false ) &&
				acceptData( elem ) ) {

				// Call a native DOM method on the target with the same name as the event.
				// Don't do default actions on window, that's where global variables be (trac-6170)
				if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {

					// Don't re-trigger an onFOO event when we call its FOO() method
					tmp = elem[ ontype ];

					if ( tmp ) {
						elem[ ontype ] = null;
					}

					// Prevent re-triggering of the same event, since we already bubbled it above
					jQuery.event.triggered = type;

					if ( event.isPropagationStopped() ) {
						lastElement.addEventListener( type, stopPropagationCallback );
					}

					elem[ type ]();

					if ( event.isPropagationStopped() ) {
						lastElement.removeEventListener( type, stopPropagationCallback );
					}

					jQuery.event.triggered = undefined;

					if ( tmp ) {
						elem[ ontype ] = tmp;
					}
				}
			}
		}

		return event.result;
	},

	// Piggyback on a donor event to simulate a different one
	// Used only for `focus(in | out)` events
	simulate: function( type, elem, event ) {
		var e = jQuery.extend(
			new jQuery.Event(),
			event,
			{
				type: type,
				isSimulated: true
			}
		);

		jQuery.event.trigger( e, null, elem );
	}

} );

jQuery.fn.extend( {

	trigger: function( type, data ) {
		return this.each( function() {
			jQuery.event.trigger( type, data, this );
		} );
	},
	triggerHandler: function( type, data ) {
		var elem = this[ 0 ];
		if ( elem ) {
			return jQuery.event.trigger( type, data, elem, true );
		}
	}
} );


var
	rbracket = /\[\]$/,
	rCRLF = /\r?\n/g,
	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
	rsubmittable = /^(?:input|select|textarea|keygen)/i;

function buildParams( prefix, obj, traditional, add ) {
	var name;

	if ( Array.isArray( obj ) ) {

		// Serialize array item.
		jQuery.each( obj, function( i, v ) {
			if ( traditional || rbracket.test( prefix ) ) {

				// Treat each array item as a scalar.
				add( prefix, v );

			} else {

				// Item is non-scalar (array or object), encode its numeric index.
				buildParams(
					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
					v,
					traditional,
					add
				);
			}
		} );

	} else if ( !traditional && toType( obj ) === "object" ) {

		// Serialize object item.
		for ( name in obj ) {
			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
		}

	} else {

		// Serialize scalar item.
		add( prefix, obj );
	}
}

// Serialize an array of form elements or a set of
// key/values into a query string
jQuery.param = function( a, traditional ) {
	var prefix,
		s = [],
		add = function( key, valueOrFunction ) {

			// If value is a function, invoke it and use its return value
			var value = isFunction( valueOrFunction ) ?
				valueOrFunction() :
				valueOrFunction;

			s[ s.length ] = encodeURIComponent( key ) + "=" +
				encodeURIComponent( value == null ? "" : value );
		};

	if ( a == null ) {
		return "";
	}

	// If an array was passed in, assume that it is an array of form elements.
	if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {

		// Serialize the form elements
		jQuery.each( a, function() {
			add( this.name, this.value );
		} );

	} else {

		// If traditional, encode the "old" way (the way 1.3.2 or older
		// did it), otherwise encode params recursively.
		for ( prefix in a ) {
			buildParams( prefix, a[ prefix ], traditional, add );
		}
	}

	// Return the resulting serialization
	return s.join( "&" );
};

jQuery.fn.extend( {
	serialize: function() {
		return jQuery.param( this.serializeArray() );
	},
	serializeArray: function() {
		return this.map( function() {

			// Can add propHook for "elements" to filter or add form elements
			var elements = jQuery.prop( this, "elements" );
			return elements ? jQuery.makeArray( elements ) : this;
		} ).filter( function() {
			var type = this.type;

			// Use .is( ":disabled" ) so that fieldset[disabled] works
			return this.name && !jQuery( this ).is( ":disabled" ) &&
				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
				( this.checked || !rcheckableType.test( type ) );
		} ).map( function( _i, elem ) {
			var val = jQuery( this ).val();

			if ( val == null ) {
				return null;
			}

			if ( Array.isArray( val ) ) {
				return jQuery.map( val, function( val ) {
					return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
				} );
			}

			return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
		} ).get();
	}
} );


var
	r20 = /%20/g,
	rhash = /#.*$/,
	rantiCache = /([?&])_=[^&]*/,
	rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,

	// trac-7653, trac-8125, trac-8152: local protocol detection
	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
	rnoContent = /^(?:GET|HEAD)$/,
	rprotocol = /^\/\//,

	/* Prefilters
	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
	 * 2) These are called:
	 *    - BEFORE asking for a transport
	 *    - AFTER param serialization (s.data is a string if s.processData is true)
	 * 3) key is the dataType
	 * 4) the catchall symbol "*" can be used
	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
	 */
	prefilters = {},

	/* Transports bindings
	 * 1) key is the dataType
	 * 2) the catchall symbol "*" can be used
	 * 3) selection will start with transport dataType and THEN go to "*" if needed
	 */
	transports = {},

	// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression
	allTypes = "*/".concat( "*" ),

	// Anchor tag for parsing the document origin
	originAnchor = document.createElement( "a" );

originAnchor.href = location.href;

// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {

	// dataTypeExpression is optional and defaults to "*"
	return function( dataTypeExpression, func ) {

		if ( typeof dataTypeExpression !== "string" ) {
			func = dataTypeExpression;
			dataTypeExpression = "*";
		}

		var dataType,
			i = 0,
			dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];

		if ( isFunction( func ) ) {

			// For each dataType in the dataTypeExpression
			while ( ( dataType = dataTypes[ i++ ] ) ) {

				// Prepend if requested
				if ( dataType[ 0 ] === "+" ) {
					dataType = dataType.slice( 1 ) || "*";
					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );

				// Otherwise append
				} else {
					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
				}
			}
		}
	};
}

// Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {

	var inspected = {},
		seekingTransport = ( structure === transports );

	function inspect( dataType ) {
		var selected;
		inspected[ dataType ] = true;
		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
			if ( typeof dataTypeOrTransport === "string" &&
				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {

				options.dataTypes.unshift( dataTypeOrTransport );
				inspect( dataTypeOrTransport );
				return false;
			} else if ( seekingTransport ) {
				return !( selected = dataTypeOrTransport );
			}
		} );
		return selected;
	}

	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
}

// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes trac-9887
function ajaxExtend( target, src ) {
	var key, deep,
		flatOptions = jQuery.ajaxSettings.flatOptions || {};

	for ( key in src ) {
		if ( src[ key ] !== undefined ) {
			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
		}
	}
	if ( deep ) {
		jQuery.extend( true, target, deep );
	}

	return target;
}

/* Handles responses to an ajax request:
 * - finds the right dataType (mediates between content-type and expected dataType)
 * - returns the corresponding response
 */
function ajaxHandleResponses( s, jqXHR, responses ) {

	var ct, type, finalDataType, firstDataType,
		contents = s.contents,
		dataTypes = s.dataTypes;

	// Remove auto dataType and get content-type in the process
	while ( dataTypes[ 0 ] === "*" ) {
		dataTypes.shift();
		if ( ct === undefined ) {
			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
		}
	}

	// Check if we're dealing with a known content-type
	if ( ct ) {
		for ( type in contents ) {
			if ( contents[ type ] && contents[ type ].test( ct ) ) {
				dataTypes.unshift( type );
				break;
			}
		}
	}

	// Check to see if we have a response for the expected dataType
	if ( dataTypes[ 0 ] in responses ) {
		finalDataType = dataTypes[ 0 ];
	} else {

		// Try convertible dataTypes
		for ( type in responses ) {
			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
				finalDataType = type;
				break;
			}
			if ( !firstDataType ) {
				firstDataType = type;
			}
		}

		// Or just use first one
		finalDataType = finalDataType || firstDataType;
	}

	// If we found a dataType
	// We add the dataType to the list if needed
	// and return the corresponding response
	if ( finalDataType ) {
		if ( finalDataType !== dataTypes[ 0 ] ) {
			dataTypes.unshift( finalDataType );
		}
		return responses[ finalDataType ];
	}
}

/* Chain conversions given the request and the original response
 * Also sets the responseXXX fields on the jqXHR instance
 */
function ajaxConvert( s, response, jqXHR, isSuccess ) {
	var conv2, current, conv, tmp, prev,
		converters = {},

		// Work with a copy of dataTypes in case we need to modify it for conversion
		dataTypes = s.dataTypes.slice();

	// Create converters map with lowercased keys
	if ( dataTypes[ 1 ] ) {
		for ( conv in s.converters ) {
			converters[ conv.toLowerCase() ] = s.converters[ conv ];
		}
	}

	current = dataTypes.shift();

	// Convert to each sequential dataType
	while ( current ) {

		if ( s.responseFields[ current ] ) {
			jqXHR[ s.responseFields[ current ] ] = response;
		}

		// Apply the dataFilter if provided
		if ( !prev && isSuccess && s.dataFilter ) {
			response = s.dataFilter( response, s.dataType );
		}

		prev = current;
		current = dataTypes.shift();

		if ( current ) {

			// There's only work to do if current dataType is non-auto
			if ( current === "*" ) {

				current = prev;

			// Convert response if prev dataType is non-auto and differs from current
			} else if ( prev !== "*" && prev !== current ) {

				// Seek a direct converter
				conv = converters[ prev + " " + current ] || converters[ "* " + current ];

				// If none found, seek a pair
				if ( !conv ) {
					for ( conv2 in converters ) {

						// If conv2 outputs current
						tmp = conv2.split( " " );
						if ( tmp[ 1 ] === current ) {

							// If prev can be converted to accepted input
							conv = converters[ prev + " " + tmp[ 0 ] ] ||
								converters[ "* " + tmp[ 0 ] ];
							if ( conv ) {

								// Condense equivalence converters
								if ( conv === true ) {
									conv = converters[ conv2 ];

								// Otherwise, insert the intermediate dataType
								} else if ( converters[ conv2 ] !== true ) {
									current = tmp[ 0 ];
									dataTypes.unshift( tmp[ 1 ] );
								}
								break;
							}
						}
					}
				}

				// Apply converter (if not an equivalence)
				if ( conv !== true ) {

					// Unless errors are allowed to bubble, catch and return them
					if ( conv && s.throws ) {
						response = conv( response );
					} else {
						try {
							response = conv( response );
						} catch ( e ) {
							return {
								state: "parsererror",
								error: conv ? e : "No conversion from " + prev + " to " + current
							};
						}
					}
				}
			}
		}
	}

	return { state: "success", data: response };
}

jQuery.extend( {

	// Counter for holding the number of active queries
	active: 0,

	// Last-Modified header cache for next request
	lastModified: {},
	etag: {},

	ajaxSettings: {
		url: location.href,
		type: "GET",
		isLocal: rlocalProtocol.test( location.protocol ),
		global: true,
		processData: true,
		async: true,
		contentType: "application/x-www-form-urlencoded; charset=UTF-8",

		/*
		timeout: 0,
		data: null,
		dataType: null,
		username: null,
		password: null,
		cache: null,
		throws: false,
		traditional: false,
		headers: {},
		*/

		accepts: {
			"*": allTypes,
			text: "text/plain",
			html: "text/html",
			xml: "application/xml, text/xml",
			json: "application/json, text/javascript"
		},

		contents: {
			xml: /\bxml\b/,
			html: /\bhtml/,
			json: /\bjson\b/
		},

		responseFields: {
			xml: "responseXML",
			text: "responseText",
			json: "responseJSON"
		},

		// Data converters
		// Keys separate source (or catchall "*") and destination types with a single space
		converters: {

			// Convert anything to text
			"* text": String,

			// Text to html (true = no transformation)
			"text html": true,

			// Evaluate text as a json expression
			"text json": JSON.parse,

			// Parse text as xml
			"text xml": jQuery.parseXML
		},

		// For options that shouldn't be deep extended:
		// you can add your own custom options here if
		// and when you create one that shouldn't be
		// deep extended (see ajaxExtend)
		flatOptions: {
			url: true,
			context: true
		}
	},

	// Creates a full fledged settings object into target
	// with both ajaxSettings and settings fields.
	// If target is omitted, writes into ajaxSettings.
	ajaxSetup: function( target, settings ) {
		return settings ?

			// Building a settings object
			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :

			// Extending ajaxSettings
			ajaxExtend( jQuery.ajaxSettings, target );
	},

	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
	ajaxTransport: addToPrefiltersOrTransports( transports ),

	// Main method
	ajax: function( url, options ) {

		// If url is an object, simulate pre-1.5 signature
		if ( typeof url === "object" ) {
			options = url;
			url = undefined;
		}

		// Force options to be an object
		options = options || {};

		var transport,

			// URL without anti-cache param
			cacheURL,

			// Response headers
			responseHeadersString,
			responseHeaders,

			// timeout handle
			timeoutTimer,

			// Url cleanup var
			urlAnchor,

			// Request state (becomes false upon send and true upon completion)
			completed,

			// To know if global events are to be dispatched
			fireGlobals,

			// Loop variable
			i,

			// uncached part of the url
			uncached,

			// Create the final options object
			s = jQuery.ajaxSetup( {}, options ),

			// Callbacks context
			callbackContext = s.context || s,

			// Context for global events is callbackContext if it is a DOM node or jQuery collection
			globalEventContext = s.context &&
				( callbackContext.nodeType || callbackContext.jquery ) ?
				jQuery( callbackContext ) :
				jQuery.event,

			// Deferreds
			deferred = jQuery.Deferred(),
			completeDeferred = jQuery.Callbacks( "once memory" ),

			// Status-dependent callbacks
			statusCode = s.statusCode || {},

			// Headers (they are sent all at once)
			requestHeaders = {},
			requestHeadersNames = {},

			// Default abort message
			strAbort = "canceled",

			// Fake xhr
			jqXHR = {
				readyState: 0,

				// Builds headers hashtable if needed
				getResponseHeader: function( key ) {
					var match;
					if ( completed ) {
						if ( !responseHeaders ) {
							responseHeaders = {};
							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
								responseHeaders[ match[ 1 ].toLowerCase() + " " ] =
									( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )
										.concat( match[ 2 ] );
							}
						}
						match = responseHeaders[ key.toLowerCase() + " " ];
					}
					return match == null ? null : match.join( ", " );
				},

				// Raw string
				getAllResponseHeaders: function() {
					return completed ? responseHeadersString : null;
				},

				// Caches the header
				setRequestHeader: function( name, value ) {
					if ( completed == null ) {
						name = requestHeadersNames[ name.toLowerCase() ] =
							requestHeadersNames[ name.toLowerCase() ] || name;
						requestHeaders[ name ] = value;
					}
					return this;
				},

				// Overrides response content-type header
				overrideMimeType: function( type ) {
					if ( completed == null ) {
						s.mimeType = type;
					}
					return this;
				},

				// Status-dependent callbacks
				statusCode: function( map ) {
					var code;
					if ( map ) {
						if ( completed ) {

							// Execute the appropriate callbacks
							jqXHR.always( map[ jqXHR.status ] );
						} else {

							// Lazy-add the new callbacks in a way that preserves old ones
							for ( code in map ) {
								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
							}
						}
					}
					return this;
				},

				// Cancel the request
				abort: function( statusText ) {
					var finalText = statusText || strAbort;
					if ( transport ) {
						transport.abort( finalText );
					}
					done( 0, finalText );
					return this;
				}
			};

		// Attach deferreds
		deferred.promise( jqXHR );

		// Add protocol if not provided (prefilters might expect it)
		// Handle falsy url in the settings object (trac-10093: consistency with old signature)
		// We also use the url parameter if available
		s.url = ( ( url || s.url || location.href ) + "" )
			.replace( rprotocol, location.protocol + "//" );

		// Alias method option to type as per ticket trac-12004
		s.type = options.method || options.type || s.method || s.type;

		// Extract dataTypes list
		s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];

		// A cross-domain request is in order when the origin doesn't match the current origin.
		if ( s.crossDomain == null ) {
			urlAnchor = document.createElement( "a" );

			// Support: IE <=8 - 11, Edge 12 - 15
			// IE throws exception on accessing the href property if url is malformed,
			// e.g. http://example.com:80x/
			try {
				urlAnchor.href = s.url;

				// Support: IE <=8 - 11 only
				// Anchor's host property isn't correctly set when s.url is relative
				urlAnchor.href = urlAnchor.href;
				s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
					urlAnchor.protocol + "//" + urlAnchor.host;
			} catch ( e ) {

				// If there is an error parsing the URL, assume it is crossDomain,
				// it can be rejected by the transport if it is invalid
				s.crossDomain = true;
			}
		}

		// Convert data if not already a string
		if ( s.data && s.processData && typeof s.data !== "string" ) {
			s.data = jQuery.param( s.data, s.traditional );
		}

		// Apply prefilters
		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );

		// If request was aborted inside a prefilter, stop there
		if ( completed ) {
			return jqXHR;
		}

		// We can fire global events as of now if asked to
		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)
		fireGlobals = jQuery.event && s.global;

		// Watch for a new set of requests
		if ( fireGlobals && jQuery.active++ === 0 ) {
			jQuery.event.trigger( "ajaxStart" );
		}

		// Uppercase the type
		s.type = s.type.toUpperCase();

		// Determine if request has content
		s.hasContent = !rnoContent.test( s.type );

		// Save the URL in case we're toying with the If-Modified-Since
		// and/or If-None-Match header later on
		// Remove hash to simplify url manipulation
		cacheURL = s.url.replace( rhash, "" );

		// More options handling for requests with no content
		if ( !s.hasContent ) {

			// Remember the hash so we can put it back
			uncached = s.url.slice( cacheURL.length );

			// If data is available and should be processed, append data to url
			if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
				cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;

				// trac-9682: remove data so that it's not used in an eventual retry
				delete s.data;
			}

			// Add or update anti-cache param if needed
			if ( s.cache === false ) {
				cacheURL = cacheURL.replace( rantiCache, "$1" );
				uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +
					uncached;
			}

			// Put hash and anti-cache on the URL that will be requested (gh-1732)
			s.url = cacheURL + uncached;

		// Change '%20' to '+' if this is encoded form body content (gh-2658)
		} else if ( s.data && s.processData &&
			( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
			s.data = s.data.replace( r20, "+" );
		}

		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
		if ( s.ifModified ) {
			if ( jQuery.lastModified[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
			}
			if ( jQuery.etag[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
			}
		}

		// Set the correct header, if data is being sent
		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
			jqXHR.setRequestHeader( "Content-Type", s.contentType );
		}

		// Set the Accepts header for the server, depending on the dataType
		jqXHR.setRequestHeader(
			"Accept",
			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
				s.accepts[ s.dataTypes[ 0 ] ] +
					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
				s.accepts[ "*" ]
		);

		// Check for headers option
		for ( i in s.headers ) {
			jqXHR.setRequestHeader( i, s.headers[ i ] );
		}

		// Allow custom headers/mimetypes and early abort
		if ( s.beforeSend &&
			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {

			// Abort if not done already and return
			return jqXHR.abort();
		}

		// Aborting is no longer a cancellation
		strAbort = "abort";

		// Install callbacks on deferreds
		completeDeferred.add( s.complete );
		jqXHR.done( s.success );
		jqXHR.fail( s.error );

		// Get transport
		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );

		// If no transport, we auto-abort
		if ( !transport ) {
			done( -1, "No Transport" );
		} else {
			jqXHR.readyState = 1;

			// Send global event
			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
			}

			// If request was aborted inside ajaxSend, stop there
			if ( completed ) {
				return jqXHR;
			}

			// Timeout
			if ( s.async && s.timeout > 0 ) {
				timeoutTimer = window.setTimeout( function() {
					jqXHR.abort( "timeout" );
				}, s.timeout );
			}

			try {
				completed = false;
				transport.send( requestHeaders, done );
			} catch ( e ) {

				// Rethrow post-completion exceptions
				if ( completed ) {
					throw e;
				}

				// Propagate others as results
				done( -1, e );
			}
		}

		// Callback for when everything is done
		function done( status, nativeStatusText, responses, headers ) {
			var isSuccess, success, error, response, modified,
				statusText = nativeStatusText;

			// Ignore repeat invocations
			if ( completed ) {
				return;
			}

			completed = true;

			// Clear timeout if it exists
			if ( timeoutTimer ) {
				window.clearTimeout( timeoutTimer );
			}

			// Dereference transport for early garbage collection
			// (no matter how long the jqXHR object will be used)
			transport = undefined;

			// Cache response headers
			responseHeadersString = headers || "";

			// Set readyState
			jqXHR.readyState = status > 0 ? 4 : 0;

			// Determine if successful
			isSuccess = status >= 200 && status < 300 || status === 304;

			// Get response data
			if ( responses ) {
				response = ajaxHandleResponses( s, jqXHR, responses );
			}

			// Use a noop converter for missing script but not if jsonp
			if ( !isSuccess &&
				jQuery.inArray( "script", s.dataTypes ) > -1 &&
				jQuery.inArray( "json", s.dataTypes ) < 0 ) {
				s.converters[ "text script" ] = function() {};
			}

			// Convert no matter what (that way responseXXX fields are always set)
			response = ajaxConvert( s, response, jqXHR, isSuccess );

			// If successful, handle type chaining
			if ( isSuccess ) {

				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
				if ( s.ifModified ) {
					modified = jqXHR.getResponseHeader( "Last-Modified" );
					if ( modified ) {
						jQuery.lastModified[ cacheURL ] = modified;
					}
					modified = jqXHR.getResponseHeader( "etag" );
					if ( modified ) {
						jQuery.etag[ cacheURL ] = modified;
					}
				}

				// if no content
				if ( status === 204 || s.type === "HEAD" ) {
					statusText = "nocontent";

				// if not modified
				} else if ( status === 304 ) {
					statusText = "notmodified";

				// If we have data, let's convert it
				} else {
					statusText = response.state;
					success = response.data;
					error = response.error;
					isSuccess = !error;
				}
			} else {

				// Extract error from statusText and normalize for non-aborts
				error = statusText;
				if ( status || !statusText ) {
					statusText = "error";
					if ( status < 0 ) {
						status = 0;
					}
				}
			}

			// Set data for the fake xhr object
			jqXHR.status = status;
			jqXHR.statusText = ( nativeStatusText || statusText ) + "";

			// Success/Error
			if ( isSuccess ) {
				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
			} else {
				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
			}

			// Status-dependent callbacks
			jqXHR.statusCode( statusCode );
			statusCode = undefined;

			if ( fireGlobals ) {
				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
					[ jqXHR, s, isSuccess ? success : error ] );
			}

			// Complete
			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );

			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );

				// Handle the global AJAX counter
				if ( !( --jQuery.active ) ) {
					jQuery.event.trigger( "ajaxStop" );
				}
			}
		}

		return jqXHR;
	},

	getJSON: function( url, data, callback ) {
		return jQuery.get( url, data, callback, "json" );
	},

	getScript: function( url, callback ) {
		return jQuery.get( url, undefined, callback, "script" );
	}
} );

jQuery.each( [ "get", "post" ], function( _i, method ) {
	jQuery[ method ] = function( url, data, callback, type ) {

		// Shift arguments if data argument was omitted
		if ( isFunction( data ) ) {
			type = type || callback;
			callback = data;
			data = undefined;
		}

		// The url can be an options object (which then must have .url)
		return jQuery.ajax( jQuery.extend( {
			url: url,
			type: method,
			dataType: type,
			data: data,
			success: callback
		}, jQuery.isPlainObject( url ) && url ) );
	};
} );

jQuery.ajaxPrefilter( function( s ) {
	var i;
	for ( i in s.headers ) {
		if ( i.toLowerCase() === "content-type" ) {
			s.contentType = s.headers[ i ] || "";
		}
	}
} );


jQuery._evalUrl = function( url, options, doc ) {
	return jQuery.ajax( {
		url: url,

		// Make this explicit, since user can override this through ajaxSetup (trac-11264)
		type: "GET",
		dataType: "script",
		cache: true,
		async: false,
		global: false,

		// Only evaluate the response if it is successful (gh-4126)
		// dataFilter is not invoked for failure responses, so using it instead
		// of the default converter is kludgy but it works.
		converters: {
			"text script": function() {}
		},
		dataFilter: function( response ) {
			jQuery.globalEval( response, options, doc );
		}
	} );
};


jQuery.fn.extend( {
	wrapAll: function( html ) {
		var wrap;

		if ( this[ 0 ] ) {
			if ( isFunction( html ) ) {
				html = html.call( this[ 0 ] );
			}

			// The elements to wrap the target around
			wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );

			if ( this[ 0 ].parentNode ) {
				wrap.insertBefore( this[ 0 ] );
			}

			wrap.map( function() {
				var elem = this;

				while ( elem.firstElementChild ) {
					elem = elem.firstElementChild;
				}

				return elem;
			} ).append( this );
		}

		return this;
	},

	wrapInner: function( html ) {
		if ( isFunction( html ) ) {
			return this.each( function( i ) {
				jQuery( this ).wrapInner( html.call( this, i ) );
			} );
		}

		return this.each( function() {
			var self = jQuery( this ),
				contents = self.contents();

			if ( contents.length ) {
				contents.wrapAll( html );

			} else {
				self.append( html );
			}
		} );
	},

	wrap: function( html ) {
		var htmlIsFunction = isFunction( html );

		return this.each( function( i ) {
			jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
		} );
	},

	unwrap: function( selector ) {
		this.parent( selector ).not( "body" ).each( function() {
			jQuery( this ).replaceWith( this.childNodes );
		} );
		return this;
	}
} );


jQuery.expr.pseudos.hidden = function( elem ) {
	return !jQuery.expr.pseudos.visible( elem );
};
jQuery.expr.pseudos.visible = function( elem ) {
	return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
};




jQuery.ajaxSettings.xhr = function() {
	try {
		return new window.XMLHttpRequest();
	} catch ( e ) {}
};

var xhrSuccessStatus = {

		// File protocol always yields status code 0, assume 200
		0: 200,

		// Support: IE <=9 only
		// trac-1450: sometimes IE returns 1223 when it should be 204
		1223: 204
	},
	xhrSupported = jQuery.ajaxSettings.xhr();

support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
support.ajax = xhrSupported = !!xhrSupported;

jQuery.ajaxTransport( function( options ) {
	var callback, errorCallback;

	// Cross domain only allowed if supported through XMLHttpRequest
	if ( support.cors || xhrSupported && !options.crossDomain ) {
		return {
			send: function( headers, complete ) {
				var i,
					xhr = options.xhr();

				xhr.open(
					options.type,
					options.url,
					options.async,
					options.username,
					options.password
				);

				// Apply custom fields if provided
				if ( options.xhrFields ) {
					for ( i in options.xhrFields ) {
						xhr[ i ] = options.xhrFields[ i ];
					}
				}

				// Override mime type if needed
				if ( options.mimeType && xhr.overrideMimeType ) {
					xhr.overrideMimeType( options.mimeType );
				}

				// X-Requested-With header
				// For cross-domain requests, seeing as conditions for a preflight are
				// akin to a jigsaw puzzle, we simply never set it to be sure.
				// (it can always be set on a per-request basis or even using ajaxSetup)
				// For same-domain requests, won't change header if already provided.
				if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
					headers[ "X-Requested-With" ] = "XMLHttpRequest";
				}

				// Set headers
				for ( i in headers ) {
					xhr.setRequestHeader( i, headers[ i ] );
				}

				// Callback
				callback = function( type ) {
					return function() {
						if ( callback ) {
							callback = errorCallback = xhr.onload =
								xhr.onerror = xhr.onabort = xhr.ontimeout =
									xhr.onreadystatechange = null;

							if ( type === "abort" ) {
								xhr.abort();
							} else if ( type === "error" ) {

								// Support: IE <=9 only
								// On a manual native abort, IE9 throws
								// errors on any property access that is not readyState
								if ( typeof xhr.status !== "number" ) {
									complete( 0, "error" );
								} else {
									complete(

										// File: protocol always yields status 0; see trac-8605, trac-14207
										xhr.status,
										xhr.statusText
									);
								}
							} else {
								complete(
									xhrSuccessStatus[ xhr.status ] || xhr.status,
									xhr.statusText,

									// Support: IE <=9 only
									// IE9 has no XHR2 but throws on binary (trac-11426)
									// For XHR2 non-text, let the caller handle it (gh-2498)
									( xhr.responseType || "text" ) !== "text"  ||
									typeof xhr.responseText !== "string" ?
										{ binary: xhr.response } :
										{ text: xhr.responseText },
									xhr.getAllResponseHeaders()
								);
							}
						}
					};
				};

				// Listen to events
				xhr.onload = callback();
				errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );

				// Support: IE 9 only
				// Use onreadystatechange to replace onabort
				// to handle uncaught aborts
				if ( xhr.onabort !== undefined ) {
					xhr.onabort = errorCallback;
				} else {
					xhr.onreadystatechange = function() {

						// Check readyState before timeout as it changes
						if ( xhr.readyState === 4 ) {

							// Allow onerror to be called first,
							// but that will not handle a native abort
							// Also, save errorCallback to a variable
							// as xhr.onerror cannot be accessed
							window.setTimeout( function() {
								if ( callback ) {
									errorCallback();
								}
							} );
						}
					};
				}

				// Create the abort callback
				callback = callback( "abort" );

				try {

					// Do send the request (this may raise an exception)
					xhr.send( options.hasContent && options.data || null );
				} catch ( e ) {

					// trac-14683: Only rethrow if this hasn't been notified as an error yet
					if ( callback ) {
						throw e;
					}
				}
			},

			abort: function() {
				if ( callback ) {
					callback();
				}
			}
		};
	}
} );




// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
jQuery.ajaxPrefilter( function( s ) {
	if ( s.crossDomain ) {
		s.contents.script = false;
	}
} );

// Install script dataType
jQuery.ajaxSetup( {
	accepts: {
		script: "text/javascript, application/javascript, " +
			"application/ecmascript, application/x-ecmascript"
	},
	contents: {
		script: /\b(?:java|ecma)script\b/
	},
	converters: {
		"text script": function( text ) {
			jQuery.globalEval( text );
			return text;
		}
	}
} );

// Handle cache's special case and crossDomain
jQuery.ajaxPrefilter( "script", function( s ) {
	if ( s.cache === undefined ) {
		s.cache = false;
	}
	if ( s.crossDomain ) {
		s.type = "GET";
	}
} );

// Bind script tag hack transport
jQuery.ajaxTransport( "script", function( s ) {

	// This transport only deals with cross domain or forced-by-attrs requests
	if ( s.crossDomain || s.scriptAttrs ) {
		var script, callback;
		return {
			send: function( _, complete ) {
				script = jQuery( "<script>" )
					.attr( s.scriptAttrs || {} )
					.prop( { charset: s.scriptCharset, src: s.url } )
					.on( "load error", callback = function( evt ) {
						script.remove();
						callback = null;
						if ( evt ) {
							complete( evt.type === "error" ? 404 : 200, evt.type );
						}
					} );

				// Use native DOM manipulation to avoid our domManip AJAX trickery
				document.head.appendChild( script[ 0 ] );
			},
			abort: function() {
				if ( callback ) {
					callback();
				}
			}
		};
	}
} );




var oldCallbacks = [],
	rjsonp = /(=)\?(?=&|$)|\?\?/;

// Default jsonp settings
jQuery.ajaxSetup( {
	jsonp: "callback",
	jsonpCallback: function() {
		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );
		this[ callback ] = true;
		return callback;
	}
} );

// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {

	var callbackName, overwritten, responseContainer,
		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
			"url" :
			typeof s.data === "string" &&
				( s.contentType || "" )
					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
				rjsonp.test( s.data ) && "data"
		);

	// Handle iff the expected data type is "jsonp" or we have a parameter to set
	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {

		// Get callback name, remembering preexisting value associated with it
		callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
			s.jsonpCallback() :
			s.jsonpCallback;

		// Insert callback into url or form data
		if ( jsonProp ) {
			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
		} else if ( s.jsonp !== false ) {
			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
		}

		// Use data converter to retrieve json after script execution
		s.converters[ "script json" ] = function() {
			if ( !responseContainer ) {
				jQuery.error( callbackName + " was not called" );
			}
			return responseContainer[ 0 ];
		};

		// Force json dataType
		s.dataTypes[ 0 ] = "json";

		// Install callback
		overwritten = window[ callbackName ];
		window[ callbackName ] = function() {
			responseContainer = arguments;
		};

		// Clean-up function (fires after converters)
		jqXHR.always( function() {

			// If previous value didn't exist - remove it
			if ( overwritten === undefined ) {
				jQuery( window ).removeProp( callbackName );

			// Otherwise restore preexisting value
			} else {
				window[ callbackName ] = overwritten;
			}

			// Save back as free
			if ( s[ callbackName ] ) {

				// Make sure that re-using the options doesn't screw things around
				s.jsonpCallback = originalSettings.jsonpCallback;

				// Save the callback name for future use
				oldCallbacks.push( callbackName );
			}

			// Call if it was a function and we have a response
			if ( responseContainer && isFunction( overwritten ) ) {
				overwritten( responseContainer[ 0 ] );
			}

			responseContainer = overwritten = undefined;
		} );

		// Delegate to script
		return "script";
	}
} );




// Support: Safari 8 only
// In Safari 8 documents created via document.implementation.createHTMLDocument
// collapse sibling forms: the second one becomes a child of the first one.
// Because of that, this security measure has to be disabled in Safari 8.
// https://bugs.webkit.org/show_bug.cgi?id=137337
support.createHTMLDocument = ( function() {
	var body = document.implementation.createHTMLDocument( "" ).body;
	body.innerHTML = "<form></form><form></form>";
	return body.childNodes.length === 2;
} )();


// Argument "data" should be string of html
// context (optional): If specified, the fragment will be created in this context,
// defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
	if ( typeof data !== "string" ) {
		return [];
	}
	if ( typeof context === "boolean" ) {
		keepScripts = context;
		context = false;
	}

	var base, parsed, scripts;

	if ( !context ) {

		// Stop scripts or inline event handlers from being executed immediately
		// by using document.implementation
		if ( support.createHTMLDocument ) {
			context = document.implementation.createHTMLDocument( "" );

			// Set the base href for the created document
			// so any parsed elements with URLs
			// are based on the document's URL (gh-2965)
			base = context.createElement( "base" );
			base.href = document.location.href;
			context.head.appendChild( base );
		} else {
			context = document;
		}
	}

	parsed = rsingleTag.exec( data );
	scripts = !keepScripts && [];

	// Single tag
	if ( parsed ) {
		return [ context.createElement( parsed[ 1 ] ) ];
	}

	parsed = buildFragment( [ data ], context, scripts );

	if ( scripts && scripts.length ) {
		jQuery( scripts ).remove();
	}

	return jQuery.merge( [], parsed.childNodes );
};


/**
 * Load a url into a page
 */
jQuery.fn.load = function( url, params, callback ) {
	var selector, type, response,
		self = this,
		off = url.indexOf( " " );

	if ( off > -1 ) {
		selector = stripAndCollapse( url.slice( off ) );
		url = url.slice( 0, off );
	}

	// If it's a function
	if ( isFunction( params ) ) {

		// We assume that it's the callback
		callback = params;
		params = undefined;

	// Otherwise, build a param string
	} else if ( params && typeof params === "object" ) {
		type = "POST";
	}

	// If we have elements to modify, make the request
	if ( self.length > 0 ) {
		jQuery.ajax( {
			url: url,

			// If "type" variable is undefined, then "GET" method will be used.
			// Make value of this field explicit since
			// user can override it through ajaxSetup method
			type: type || "GET",
			dataType: "html",
			data: params
		} ).done( function( responseText ) {

			// Save response for use in complete callback
			response = arguments;

			self.html( selector ?

				// If a selector was specified, locate the right elements in a dummy div
				// Exclude scripts to avoid IE 'Permission Denied' errors
				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :

				// Otherwise use the full result
				responseText );

		// If the request succeeds, this function gets "data", "status", "jqXHR"
		// but they are ignored because response was set above.
		// If it fails, this function gets "jqXHR", "status", "error"
		} ).always( callback && function( jqXHR, status ) {
			self.each( function() {
				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
			} );
		} );
	}

	return this;
};




jQuery.expr.pseudos.animated = function( elem ) {
	return jQuery.grep( jQuery.timers, function( fn ) {
		return elem === fn.elem;
	} ).length;
};




jQuery.offset = {
	setOffset: function( elem, options, i ) {
		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
			position = jQuery.css( elem, "position" ),
			curElem = jQuery( elem ),
			props = {};

		// Set position first, in-case top/left are set even on static elem
		if ( position === "static" ) {
			elem.style.position = "relative";
		}

		curOffset = curElem.offset();
		curCSSTop = jQuery.css( elem, "top" );
		curCSSLeft = jQuery.css( elem, "left" );
		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
			( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;

		// Need to be able to calculate position if either
		// top or left is auto and position is either absolute or fixed
		if ( calculatePosition ) {
			curPosition = curElem.position();
			curTop = curPosition.top;
			curLeft = curPosition.left;

		} else {
			curTop = parseFloat( curCSSTop ) || 0;
			curLeft = parseFloat( curCSSLeft ) || 0;
		}

		if ( isFunction( options ) ) {

			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
		}

		if ( options.top != null ) {
			props.top = ( options.top - curOffset.top ) + curTop;
		}
		if ( options.left != null ) {
			props.left = ( options.left - curOffset.left ) + curLeft;
		}

		if ( "using" in options ) {
			options.using.call( elem, props );

		} else {
			curElem.css( props );
		}
	}
};

jQuery.fn.extend( {

	// offset() relates an element's border box to the document origin
	offset: function( options ) {

		// Preserve chaining for setter
		if ( arguments.length ) {
			return options === undefined ?
				this :
				this.each( function( i ) {
					jQuery.offset.setOffset( this, options, i );
				} );
		}

		var rect, win,
			elem = this[ 0 ];

		if ( !elem ) {
			return;
		}

		// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
		// Support: IE <=11 only
		// Running getBoundingClientRect on a
		// disconnected node in IE throws an error
		if ( !elem.getClientRects().length ) {
			return { top: 0, left: 0 };
		}

		// Get document-relative position by adding viewport scroll to viewport-relative gBCR
		rect = elem.getBoundingClientRect();
		win = elem.ownerDocument.defaultView;
		return {
			top: rect.top + win.pageYOffset,
			left: rect.left + win.pageXOffset
		};
	},

	// position() relates an element's margin box to its offset parent's padding box
	// This corresponds to the behavior of CSS absolute positioning
	position: function() {
		if ( !this[ 0 ] ) {
			return;
		}

		var offsetParent, offset, doc,
			elem = this[ 0 ],
			parentOffset = { top: 0, left: 0 };

		// position:fixed elements are offset from the viewport, which itself always has zero offset
		if ( jQuery.css( elem, "position" ) === "fixed" ) {

			// Assume position:fixed implies availability of getBoundingClientRect
			offset = elem.getBoundingClientRect();

		} else {
			offset = this.offset();

			// Account for the *real* offset parent, which can be the document or its root element
			// when a statically positioned element is identified
			doc = elem.ownerDocument;
			offsetParent = elem.offsetParent || doc.documentElement;
			while ( offsetParent &&
				( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
				jQuery.css( offsetParent, "position" ) === "static" ) {

				offsetParent = offsetParent.parentNode;
			}
			if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {

				// Incorporate borders into its offset, since they are outside its content origin
				parentOffset = jQuery( offsetParent ).offset();
				parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
				parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
			}
		}

		// Subtract parent offsets and element margins
		return {
			top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
		};
	},

	// This method will return documentElement in the following cases:
	// 1) For the element inside the iframe without offsetParent, this method will return
	//    documentElement of the parent window
	// 2) For the hidden or detached element
	// 3) For body or html element, i.e. in case of the html node - it will return itself
	//
	// but those exceptions were never presented as a real life use-cases
	// and might be considered as more preferable results.
	//
	// This logic, however, is not guaranteed and can change at any point in the future
	offsetParent: function() {
		return this.map( function() {
			var offsetParent = this.offsetParent;

			while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
				offsetParent = offsetParent.offsetParent;
			}

			return offsetParent || documentElement;
		} );
	}
} );

// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
	var top = "pageYOffset" === prop;

	jQuery.fn[ method ] = function( val ) {
		return access( this, function( elem, method, val ) {

			// Coalesce documents and windows
			var win;
			if ( isWindow( elem ) ) {
				win = elem;
			} else if ( elem.nodeType === 9 ) {
				win = elem.defaultView;
			}

			if ( val === undefined ) {
				return win ? win[ prop ] : elem[ method ];
			}

			if ( win ) {
				win.scrollTo(
					!top ? val : win.pageXOffset,
					top ? val : win.pageYOffset
				);

			} else {
				elem[ method ] = val;
			}
		}, method, val, arguments.length );
	};
} );

// Support: Safari <=7 - 9.1, Chrome <=37 - 49
// Add the top/left cssHooks using jQuery.fn.position
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
// getComputedStyle returns percent when specified for top/left/bottom/right;
// rather than make the css module depend on the offset module, just check for it here
jQuery.each( [ "top", "left" ], function( _i, prop ) {
	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
		function( elem, computed ) {
			if ( computed ) {
				computed = curCSS( elem, prop );

				// If curCSS returns percentage, fallback to offset
				return rnumnonpx.test( computed ) ?
					jQuery( elem ).position()[ prop ] + "px" :
					computed;
			}
		}
	);
} );


// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
	jQuery.each( {
		padding: "inner" + name,
		content: type,
		"": "outer" + name
	}, function( defaultExtra, funcName ) {

		// Margin is only for outerHeight, outerWidth
		jQuery.fn[ funcName ] = function( margin, value ) {
			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );

			return access( this, function( elem, type, value ) {
				var doc;

				if ( isWindow( elem ) ) {

					// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
					return funcName.indexOf( "outer" ) === 0 ?
						elem[ "inner" + name ] :
						elem.document.documentElement[ "client" + name ];
				}

				// Get document width or height
				if ( elem.nodeType === 9 ) {
					doc = elem.documentElement;

					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
					// whichever is greatest
					return Math.max(
						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
						elem.body[ "offset" + name ], doc[ "offset" + name ],
						doc[ "client" + name ]
					);
				}

				return value === undefined ?

					// Get width or height on the element, requesting but not forcing parseFloat
					jQuery.css( elem, type, extra ) :

					// Set width or height on the element
					jQuery.style( elem, type, value, extra );
			}, type, chainable ? margin : undefined, chainable );
		};
	} );
} );


jQuery.each( [
	"ajaxStart",
	"ajaxStop",
	"ajaxComplete",
	"ajaxError",
	"ajaxSuccess",
	"ajaxSend"
], function( _i, type ) {
	jQuery.fn[ type ] = function( fn ) {
		return this.on( type, fn );
	};
} );




jQuery.fn.extend( {

	bind: function( types, data, fn ) {
		return this.on( types, null, data, fn );
	},
	unbind: function( types, fn ) {
		return this.off( types, null, fn );
	},

	delegate: function( selector, types, data, fn ) {
		return this.on( types, selector, data, fn );
	},
	undelegate: function( selector, types, fn ) {

		// ( namespace ) or ( selector, types [, fn] )
		return arguments.length === 1 ?
			this.off( selector, "**" ) :
			this.off( types, selector || "**", fn );
	},

	hover: function( fnOver, fnOut ) {
		return this
			.on( "mouseenter", fnOver )
			.on( "mouseleave", fnOut || fnOver );
	}
} );

jQuery.each(
	( "blur focus focusin focusout resize scroll click dblclick " +
	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
	function( _i, name ) {

		// Handle event binding
		jQuery.fn[ name ] = function( data, fn ) {
			return arguments.length > 0 ?
				this.on( name, null, data, fn ) :
				this.trigger( name );
		};
	}
);




// Support: Android <=4.0 only
// Make sure we trim BOM and NBSP
// Require that the "whitespace run" starts from a non-whitespace
// to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position.
var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;

// Bind a function to a context, optionally partially applying any
// arguments.
// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
// However, it is not slated for removal any time soon
jQuery.proxy = function( fn, context ) {
	var tmp, args, proxy;

	if ( typeof context === "string" ) {
		tmp = fn[ context ];
		context = fn;
		fn = tmp;
	}

	// Quick check to determine if target is callable, in the spec
	// this throws a TypeError, but we will just return undefined.
	if ( !isFunction( fn ) ) {
		return undefined;
	}

	// Simulated bind
	args = slice.call( arguments, 2 );
	proxy = function() {
		return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
	};

	// Set the guid of unique handler to the same of original handler, so it can be removed
	proxy.guid = fn.guid = fn.guid || jQuery.guid++;

	return proxy;
};

jQuery.holdReady = function( hold ) {
	if ( hold ) {
		jQuery.readyWait++;
	} else {
		jQuery.ready( true );
	}
};
jQuery.isArray = Array.isArray;
jQuery.parseJSON = JSON.parse;
jQuery.nodeName = nodeName;
jQuery.isFunction = isFunction;
jQuery.isWindow = isWindow;
jQuery.camelCase = camelCase;
jQuery.type = toType;

jQuery.now = Date.now;

jQuery.isNumeric = function( obj ) {

	// As of jQuery 3.0, isNumeric is limited to
	// strings and numbers (primitives or objects)
	// that can be coerced to finite numbers (gh-2662)
	var type = jQuery.type( obj );
	return ( type === "number" || type === "string" ) &&

		// parseFloat NaNs numeric-cast false positives ("")
		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
		// subtraction forces infinities to NaN
		!isNaN( obj - parseFloat( obj ) );
};

jQuery.trim = function( text ) {
	return text == null ?
		"" :
		( text + "" ).replace( rtrim, "$1" );
};



// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.

// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon

if ( typeof define === "function" && define.amd ) {
	define( "jquery", [], function() {
		return jQuery;
	} );
}




var

	// Map over jQuery in case of overwrite
	_jQuery = window.jQuery,

	// Map over the $ in case of overwrite
	_$ = window.$;

jQuery.noConflict = function( deep ) {
	if ( window.$ === jQuery ) {
		window.$ = _$;
	}

	if ( deep && window.jQuery === jQuery ) {
		window.jQuery = _jQuery;
	}

	return jQuery;
};

// Expose jQuery and $ identifiers, even in AMD
// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (trac-13566)
if ( typeof noGlobal === "undefined" ) {
	window.jQuery = window.$ = jQuery;
}




return jQuery;
} );
;
/*! jQuery Migrate v3.5.0 | (c) OpenJS Foundation and other contributors | jquery.com/license */
"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.5.0";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]]},s.migrateIsPatchEnabled=function(e){return!t[e]},n.console&&n.console.log&&(s&&e("3.0.0")&&!e("5.0.0")||n.console.log("JQMIGRATE: jQuery 3.x-4.x REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var o={};function u(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()))}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n,o),r},set:function(e){u(n,o),r=e}})}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&u(n,o),(s.migrateIsPatchEnabled(n)?r:a||s.noop).apply(this,arguments)}}function c(e,t,r,n,o){if(!o)throw new Error("No warning message provided");return a(e,t,r,n,o),0}function i(e,t,r,n){return a(e,t,r,n),0}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("quirks","jQuery is not compatible with Quirks Mode");var d,l,p,f={},m=s.fn.init,y=s.find,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;for(d in i(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(u("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,i(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&g.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(h,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("selector-hash","Attribute selector with '#' was not fixed: "+r[0])}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,d)&&(s.find[d]=y[d]);c(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),c(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),c(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),c(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&c(s,"trim",function(e){return null==e?"":(e+"").replace(v,"$1")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(c(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),c(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(c(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),c(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),c(s,"isFunction",function(e){return"function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),c(s,"isWindow",function(e){return null!=e&&e===e.window},"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,i(s,"ajax",function(){var e=l.apply(this,arguments);return e.promise&&(c(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),c(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),c(e,"complete",e.always,"jqXHR-methods","jQXHR.complete is deprecated and removed")),e},"jqXHR-methods"),e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(p.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&p.test(e.data))&&u("jsonp-promotion","JSON-to-JSONP auto-promotion is deprecated")}));var j=s.fn.removeAttr,b=s.fn.toggleClass,Q=/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,w=/\S+/g;function x(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}i(s.fn,"removeAttr",function(e){var r=this,n=!1;return s.each(e.match(w),function(e,t){Q.test(t)&&r.each(function(){if(!1!==s(this).prop(t))return!(n=!0)}),n&&(u("removeAttr-bool","jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),j.apply(this,arguments)},"removeAttr-bool"),i(s.fn,"toggleClass",function(t){return void 0!==t&&"boolean"!=typeof t?b.apply(this,arguments):(u("toggleClass-bool","jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))},"toggleClass-bool");var A,R,S=!1,k=/^[a-z]/,N=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return S=!0,e=r.apply(this,arguments),S=!1,e})}),i(s,"swap",function(e,t,r,n){var o,a,i={};for(a in S||u("swap","jQuery.swap() is undocumented and deprecated"),t)i[a]=e.style[a],e.style[a]=t[a];for(a in o=r.apply(e,n||[]),t)e.style[a]=i[a];return o},"swap"),e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("cssProps","jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),e("4.0.0")?(R={animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},"undefined"!=typeof Proxy?s.cssNumber=new Proxy(R,{get:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.get.apply(this,arguments)},set:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.set.apply(this,arguments)}}):s.cssNumber=R):R=s.cssNumber,A=s.fn.css,i(s.fn,"css",function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=x(e),n=r,k.test(n)&&N.test(n[0].toUpperCase()+n.slice(1))||R[r]||u("css-number",'Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),A.apply(this,arguments))},"css-number");var P,C,H,E,M=s.data;i(s,"data",function(e,t,r){var n,o,a;if(t&&"object"==typeof t&&2===arguments.length){for(a in n=s.hasData(e)&&M.call(this,e),o={},t)a!==x(a)?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+a),n[a]=t[a]):o[a]=t[a];return M.call(this,e,o),t}return t&&"string"==typeof t&&t!==x(t)&&(n=s.hasData(e)&&M.call(this,e))&&t in n?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):M.apply(this,arguments)},"data-camelCase"),s.fx&&(H=s.Tween.prototype.run,E=function(e){return e},i(s.Tween.prototype,"run",function(){1<s.easing[this.easing].length&&(u("easing-one-arg","'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=E),H.apply(this,arguments)},"easing-one-arg"),P=s.fx.interval,C="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u("fx-interval",C),s.migrateIsPatchEnabled("fx-interval")&&void 0===P?13:P},set:function(e){u("fx-interval",C),P=e}}));var q=s.fn.load,O=s.event.add,F=s.event.fix;s.event.props=[],s.event.fixHooks={},r(s.event.props,"concat",s.event.props.concat,"event-old-patch","jQuery.event.props.concat() is deprecated and removed"),i(s.event,"fix",function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("event-old-patch","jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("event-old-patch","jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=F.call(this,e),n&&n.filter?n.filter(t,e):t},"event-old-patch"),i(s.event,"add",function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("load-after-event","jQuery(window).on('load'...) called after load event occurred"),O.apply(this,arguments)},"load-after-event"),s.each(["load","unload","error"],function(e,t){i(s.fn,t,function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?q.apply(this,e):(u("shorthand-removed-v3","jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))},"shorthand-removed-v3")}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){c(s.fn,r,function(e,t){return 0<arguments.length?this.on(r,null,e,t):this.trigger(r)},"shorthand-deprecated-v3","jQuery.fn."+r+"() event shorthand is deprecated")}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("ready-event","'ready' event is deprecated")}},c(s.fn,"bind",function(e,t,r){return this.on(e,null,t,r)},"pre-on-methods","jQuery.fn.bind() is deprecated"),c(s.fn,"unbind",function(e,t){return this.off(e,null,t)},"pre-on-methods","jQuery.fn.unbind() is deprecated"),c(s.fn,"delegate",function(e,t,r,n){return this.on(t,e,r,n)},"pre-on-methods","jQuery.fn.delegate() is deprecated"),c(s.fn,"undelegate",function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},"pre-on-methods","jQuery.fn.undelegate() is deprecated"),c(s.fn,"hover",function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)},"pre-on-methods","jQuery.fn.hover() is deprecated");function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}var D=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;c(s,"UNSAFE_restoreLegacyHtmlPrefilter",function(){s.migrateEnablePatches("self-closed-tags")},"legacy-self-closed-tags",'jQuery.UNSAFE_restoreLegacyHtmlPrefilter deprecated; use `jQuery.migrateEnablePatches( "self-closed-tags" )`'),i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(D,"<$1></$2>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(D,"<$1></$2>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var _,I,W,J=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?J.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(_=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),_.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(I=s.Deferred,W=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=I(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(W,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=I.exceptionHook),s});
;
/*!
 * https://github.com/paulmillr/es6-shim
 * @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com)
 *   and contributors,  MIT License
 * es6-shim: v0.35.4
 * see https://github.com/paulmillr/es6-shim/blob/0.35.3/LICENSE
 * Details and documentation:
 * https://github.com/paulmillr/es6-shim/
 */
(function(e,t){if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{e.returnExports=t()}})(this,function(){"use strict";var e=Function.call.bind(Function.apply);var t=Function.call.bind(Function.call);var r=Array.isArray;var n=Object.keys;var o=function notThunker(t){return function notThunk(){return!e(t,this,arguments)}};var i=function(e){try{e();return false}catch(t){return true}};var a=function valueOrFalseIfThrows(e){try{return e()}catch(t){return false}};var u=o(i);var f=function(){return!i(function(){return Object.defineProperty({},"x",{get:function(){}})})};var s=!!Object.defineProperty&&f();var c=function foo(){}.name==="foo";var l=Function.call.bind(Array.prototype.forEach);var p=Function.call.bind(Array.prototype.reduce);var v=Function.call.bind(Array.prototype.filter);var y=Function.call.bind(Array.prototype.some);var h=function(e,t,r,n){if(!n&&t in e){return}if(s){Object.defineProperty(e,t,{configurable:true,enumerable:false,writable:true,value:r})}else{e[t]=r}};var b=function(e,t,r){l(n(t),function(n){var o=t[n];h(e,n,o,!!r)})};var g=Function.call.bind(Object.prototype.toString);var d=typeof/abc/==="function"?function IsCallableSlow(e){return typeof e==="function"&&g(e)==="[object Function]"}:function IsCallableFast(e){return typeof e==="function"};var m={getter:function(e,t,r){if(!s){throw new TypeError("getters require true ES5 support")}Object.defineProperty(e,t,{configurable:true,enumerable:false,get:r})},proxy:function(e,t,r){if(!s){throw new TypeError("getters require true ES5 support")}var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,{configurable:n.configurable,enumerable:n.enumerable,get:function getKey(){return e[t]},set:function setKey(r){e[t]=r}})},redefine:function(e,t,r){if(s){var n=Object.getOwnPropertyDescriptor(e,t);n.value=r;Object.defineProperty(e,t,n)}else{e[t]=r}},defineByDescriptor:function(e,t,r){if(s){Object.defineProperty(e,t,r)}else if("value"in r){e[t]=r.value}},preserveToString:function(e,t){if(t&&d(t.toString)){h(e,"toString",t.toString.bind(t),true)}}};var O=Object.create||function(e,t){var r=function Prototype(){};r.prototype=e;var o=new r;if(typeof t!=="undefined"){n(t).forEach(function(e){m.defineByDescriptor(o,e,t[e])})}return o};var w=function(e,t){if(!Object.setPrototypeOf){return false}return a(function(){var r=function Subclass(t){var r=new e(t);Object.setPrototypeOf(r,Subclass.prototype);return r};Object.setPrototypeOf(r,e);r.prototype=O(e.prototype,{constructor:{value:r}});return t(r)})};var j=function(){if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}throw new Error("unable to locate global object")};var S=j();var T=S.isFinite;var I=Function.call.bind(String.prototype.indexOf);var E=Function.apply.bind(Array.prototype.indexOf);var P=Function.call.bind(Array.prototype.concat);var C=Function.call.bind(String.prototype.slice);var M=Function.call.bind(Array.prototype.push);var x=Function.apply.bind(Array.prototype.push);var N=Function.call.bind(Array.prototype.shift);var A=Math.max;var R=Math.min;var _=Math.floor;var k=Math.abs;var L=Math.exp;var F=Math.log;var D=Math.sqrt;var z=Function.call.bind(Object.prototype.hasOwnProperty);var q;var W=function(){};var G=S.Map;var H=G&&G.prototype["delete"];var V=G&&G.prototype.get;var B=G&&G.prototype.has;var U=G&&G.prototype.set;var $=S.Symbol||{};var J=$.species||"@@species";var X=Number.isNaN||function isNaN(e){return e!==e};var K=Number.isFinite||function isFinite(e){return typeof e==="number"&&T(e)};var Z=d(Math.sign)?Math.sign:function sign(e){var t=Number(e);if(t===0){return t}if(X(t)){return t}return t<0?-1:1};var Y=function log1p(e){var t=Number(e);if(t<-1||X(t)){return NaN}if(t===0||t===Infinity){return t}if(t===-1){return-Infinity}return 1+t-1===0?t:t*(F(1+t)/(1+t-1))};var Q=function isArguments(e){return g(e)==="[object Arguments]"};var ee=function isArguments(e){return e!==null&&typeof e==="object"&&typeof e.length==="number"&&e.length>=0&&g(e)!=="[object Array]"&&g(e.callee)==="[object Function]"};var te=Q(arguments)?Q:ee;var re={primitive:function(e){return e===null||typeof e!=="function"&&typeof e!=="object"},string:function(e){return g(e)==="[object String]"},regex:function(e){return g(e)==="[object RegExp]"},symbol:function(e){return typeof S.Symbol==="function"&&typeof e==="symbol"}};var ne=function overrideNative(e,t,r){var n=e[t];h(e,t,r,true);m.preserveToString(e[t],n)};var oe=typeof $==="function"&&typeof $["for"]==="function"&&re.symbol($());var ie=re.symbol($.iterator)?$.iterator:"_es6-shim iterator_";if(S.Set&&typeof(new S.Set)["@@iterator"]==="function"){ie="@@iterator"}if(!S.Reflect){h(S,"Reflect",{},true)}var ae=S.Reflect;var ue=String;var fe=typeof document==="undefined"||!document?null:document.all;var se=fe==null?function isNullOrUndefined(e){return e==null}:function isNullOrUndefinedAndNotDocumentAll(e){return e==null&&e!==fe};var ce={Call:function Call(t,r){var n=arguments.length>2?arguments[2]:[];if(!ce.IsCallable(t)){throw new TypeError(t+" is not a function")}return e(t,r,n)},RequireObjectCoercible:function(e,t){if(se(e)){throw new TypeError(t||"Cannot call method on "+e)}return e},TypeIsObject:function(e){if(e===void 0||e===null||e===true||e===false){return false}return typeof e==="function"||typeof e==="object"||e===fe},ToObject:function(e,t){return Object(ce.RequireObjectCoercible(e,t))},IsCallable:d,IsConstructor:function(e){return ce.IsCallable(e)},ToInt32:function(e){return ce.ToNumber(e)>>0},ToUint32:function(e){return ce.ToNumber(e)>>>0},ToNumber:function(e){if(g(e)==="[object Symbol]"){throw new TypeError("Cannot convert a Symbol value to a number")}return+e},ToInteger:function(e){var t=ce.ToNumber(e);if(X(t)){return 0}if(t===0||!K(t)){return t}return(t>0?1:-1)*_(k(t))},ToLength:function(e){var t=ce.ToInteger(e);if(t<=0){return 0}if(t>Number.MAX_SAFE_INTEGER){return Number.MAX_SAFE_INTEGER}return t},SameValue:function(e,t){if(e===t){if(e===0){return 1/e===1/t}return true}return X(e)&&X(t)},SameValueZero:function(e,t){return e===t||X(e)&&X(t)},IsIterable:function(e){return ce.TypeIsObject(e)&&(typeof e[ie]!=="undefined"||te(e))},GetIterator:function(e){if(te(e)){return new q(e,"value")}var t=ce.GetMethod(e,ie);if(!ce.IsCallable(t)){throw new TypeError("value is not an iterable")}var r=ce.Call(t,e);if(!ce.TypeIsObject(r)){throw new TypeError("bad iterator")}return r},GetMethod:function(e,t){var r=ce.ToObject(e)[t];if(se(r)){return void 0}if(!ce.IsCallable(r)){throw new TypeError("Method not callable: "+t)}return r},IteratorComplete:function(e){return!!e.done},IteratorClose:function(e,t){var r=ce.GetMethod(e,"return");if(r===void 0){return}var n,o;try{n=ce.Call(r,e)}catch(i){o=i}if(t){return}if(o){throw o}if(!ce.TypeIsObject(n)){throw new TypeError("Iterator's return method returned a non-object.")}},IteratorNext:function(e){var t=arguments.length>1?e.next(arguments[1]):e.next();if(!ce.TypeIsObject(t)){throw new TypeError("bad iterator")}return t},IteratorStep:function(e){var t=ce.IteratorNext(e);var r=ce.IteratorComplete(t);return r?false:t},Construct:function(e,t,r,n){var o=typeof r==="undefined"?e:r;if(!n&&ae.construct){return ae.construct(e,t,o)}var i=o.prototype;if(!ce.TypeIsObject(i)){i=Object.prototype}var a=O(i);var u=ce.Call(e,a,t);return ce.TypeIsObject(u)?u:a},SpeciesConstructor:function(e,t){var r=e.constructor;if(r===void 0){return t}if(!ce.TypeIsObject(r)){throw new TypeError("Bad constructor")}var n=r[J];if(se(n)){return t}if(!ce.IsConstructor(n)){throw new TypeError("Bad @@species")}return n},CreateHTML:function(e,t,r,n){var o=ce.ToString(e);var i="<"+t;if(r!==""){var a=ce.ToString(n);var u=a.replace(/"/g,"&quot;");i+=" "+r+'="'+u+'"'}var f=i+">";var s=f+o;return s+"</"+t+">"},IsRegExp:function IsRegExp(e){if(!ce.TypeIsObject(e)){return false}var t=e[$.match];if(typeof t!=="undefined"){return!!t}return re.regex(e)},ToString:function ToString(e){return ue(e)}};if(s&&oe){var le=function defineWellKnownSymbol(e){if(re.symbol($[e])){return $[e]}var t=$["for"]("Symbol."+e);Object.defineProperty($,e,{configurable:false,enumerable:false,writable:false,value:t});return t};if(!re.symbol($.search)){var pe=le("search");var ve=String.prototype.search;h(RegExp.prototype,pe,function search(e){return ce.Call(ve,e,[this])});var ye=function search(e){var t=ce.RequireObjectCoercible(this);if(!se(e)){var r=ce.GetMethod(e,pe);if(typeof r!=="undefined"){return ce.Call(r,e,[t])}}return ce.Call(ve,t,[ce.ToString(e)])};ne(String.prototype,"search",ye)}if(!re.symbol($.replace)){var he=le("replace");var be=String.prototype.replace;h(RegExp.prototype,he,function replace(e,t){return ce.Call(be,e,[this,t])});var ge=function replace(e,t){var r=ce.RequireObjectCoercible(this);if(!se(e)){var n=ce.GetMethod(e,he);if(typeof n!=="undefined"){return ce.Call(n,e,[r,t])}}return ce.Call(be,r,[ce.ToString(e),t])};ne(String.prototype,"replace",ge)}if(!re.symbol($.split)){var de=le("split");var me=String.prototype.split;h(RegExp.prototype,de,function split(e,t){return ce.Call(me,e,[this,t])});var Oe=function split(e,t){var r=ce.RequireObjectCoercible(this);if(!se(e)){var n=ce.GetMethod(e,de);if(typeof n!=="undefined"){return ce.Call(n,e,[r,t])}}return ce.Call(me,r,[ce.ToString(e),t])};ne(String.prototype,"split",Oe)}var we=re.symbol($.match);var je=we&&function(){var e={};e[$.match]=function(){return 42};return"a".match(e)!==42}();if(!we||je){var Se=le("match");var Te=String.prototype.match;h(RegExp.prototype,Se,function match(e){return ce.Call(Te,e,[this])});var Ie=function match(e){var t=ce.RequireObjectCoercible(this);if(!se(e)){var r=ce.GetMethod(e,Se);if(typeof r!=="undefined"){return ce.Call(r,e,[t])}}return ce.Call(Te,t,[ce.ToString(e)])};ne(String.prototype,"match",Ie)}}var Ee=function wrapConstructor(e,t,r){m.preserveToString(t,e);if(Object.setPrototypeOf){Object.setPrototypeOf(e,t)}if(s){l(Object.getOwnPropertyNames(e),function(n){if(n in W||r[n]){return}m.proxy(e,n,t)})}else{l(Object.keys(e),function(n){if(n in W||r[n]){return}t[n]=e[n]})}t.prototype=e.prototype;m.redefine(e.prototype,"constructor",t)};var Pe=function(){return this};var Ce=function(e){if(s&&!z(e,J)){m.getter(e,J,Pe)}};var Me=function(e,t){var r=t||function iterator(){return this};h(e,ie,r);if(!e[ie]&&re.symbol(ie)){e[ie]=r}};var xe=function createDataProperty(e,t,r){if(s){Object.defineProperty(e,t,{configurable:true,enumerable:true,writable:true,value:r})}else{e[t]=r}};var Ne=function createDataPropertyOrThrow(e,t,r){xe(e,t,r);if(!ce.SameValue(e[t],r)){throw new TypeError("property is nonconfigurable")}};var Ae=function(e,t,r,n){if(!ce.TypeIsObject(e)){throw new TypeError("Constructor requires `new`: "+t.name)}var o=t.prototype;if(!ce.TypeIsObject(o)){o=r}var i=O(o);for(var a in n){if(z(n,a)){var u=n[a];h(i,a,u,true)}}return i};if(String.fromCodePoint&&String.fromCodePoint.length!==1){var Re=String.fromCodePoint;ne(String,"fromCodePoint",function fromCodePoint(e){return ce.Call(Re,this,arguments)})}var _e={fromCodePoint:function fromCodePoint(e){var t=[];var r;for(var n=0,o=arguments.length;n<o;n++){r=Number(arguments[n]);if(!ce.SameValue(r,ce.ToInteger(r))||r<0||r>1114111){throw new RangeError("Invalid code point "+r)}if(r<65536){M(t,String.fromCharCode(r))}else{r-=65536;M(t,String.fromCharCode((r>>10)+55296));M(t,String.fromCharCode(r%1024+56320))}}return t.join("")},raw:function raw(e){var t=ce.ToObject(e,"bad callSite");var r=ce.ToObject(t.raw,"bad raw value");var n=r.length;var o=ce.ToLength(n);if(o<=0){return""}var i=[];var a=0;var u,f,s,c;while(a<o){u=ce.ToString(a);s=ce.ToString(r[u]);M(i,s);if(a+1>=o){break}f=a+1<arguments.length?arguments[a+1]:"";c=ce.ToString(f);M(i,c);a+=1}return i.join("")}};if(String.raw&&String.raw({raw:{0:"x",1:"y",length:2}})!=="xy"){ne(String,"raw",_e.raw)}b(String,_e);var ke=function repeat(e,t){if(t<1){return""}if(t%2){return repeat(e,t-1)+e}var r=repeat(e,t/2);return r+r};var Le=Infinity;var Fe={repeat:function repeat(e){var t=ce.ToString(ce.RequireObjectCoercible(this));var r=ce.ToInteger(e);if(r<0||r>=Le){throw new RangeError("repeat count must be less than infinity and not overflow maximum string size")}return ke(t,r)},startsWith:function startsWith(e){var t=ce.ToString(ce.RequireObjectCoercible(this));if(ce.IsRegExp(e)){throw new TypeError('Cannot call method "startsWith" with a regex')}var r=ce.ToString(e);var n;if(arguments.length>1){n=arguments[1]}var o=A(ce.ToInteger(n),0);return C(t,o,o+r.length)===r},endsWith:function endsWith(e){var t=ce.ToString(ce.RequireObjectCoercible(this));if(ce.IsRegExp(e)){throw new TypeError('Cannot call method "endsWith" with a regex')}var r=ce.ToString(e);var n=t.length;var o;if(arguments.length>1){o=arguments[1]}var i=typeof o==="undefined"?n:ce.ToInteger(o);var a=R(A(i,0),n);return C(t,a-r.length,a)===r},includes:function includes(e){if(ce.IsRegExp(e)){throw new TypeError('"includes" does not accept a RegExp')}var t=ce.ToString(e);var r;if(arguments.length>1){r=arguments[1]}return I(this,t,r)!==-1},codePointAt:function codePointAt(e){var t=ce.ToString(ce.RequireObjectCoercible(this));var r=ce.ToInteger(e);var n=t.length;if(r>=0&&r<n){var o=t.charCodeAt(r);var i=r+1===n;if(o<55296||o>56319||i){return o}var a=t.charCodeAt(r+1);if(a<56320||a>57343){return o}return(o-55296)*1024+(a-56320)+65536}}};if(String.prototype.includes&&"a".includes("a",Infinity)!==false){ne(String.prototype,"includes",Fe.includes)}if(String.prototype.startsWith&&String.prototype.endsWith){var De=i(function(){return"/a/".startsWith(/a/)});var ze=a(function(){return"abc".startsWith("a",Infinity)===false});if(!De||!ze){ne(String.prototype,"startsWith",Fe.startsWith);ne(String.prototype,"endsWith",Fe.endsWith)}}if(oe){var qe=a(function(){var e=/a/;e[$.match]=false;return"/a/".startsWith(e)});if(!qe){ne(String.prototype,"startsWith",Fe.startsWith)}var We=a(function(){var e=/a/;e[$.match]=false;return"/a/".endsWith(e)});if(!We){ne(String.prototype,"endsWith",Fe.endsWith)}var Ge=a(function(){var e=/a/;e[$.match]=false;return"/a/".includes(e)});if(!Ge){ne(String.prototype,"includes",Fe.includes)}}b(String.prototype,Fe);var He=["\t\n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003","\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028","\u2029\ufeff"].join("");var Ve=new RegExp("(^["+He+"]+)|(["+He+"]+$)","g");var Be=function trim(){return ce.ToString(ce.RequireObjectCoercible(this)).replace(Ve,"")};var Ue=["\x85","\u200b","\ufffe"].join("");var $e=new RegExp("["+Ue+"]","g");var Je=/^[-+]0x[0-9a-f]+$/i;var Xe=Ue.trim().length!==Ue.length;h(String.prototype,"trim",Be,Xe);var Ke=function(e){return{value:e,done:arguments.length===0}};var Ze=function(e){ce.RequireObjectCoercible(e);this._s=ce.ToString(e);this._i=0};Ze.prototype.next=function(){var e=this._s;var t=this._i;if(typeof e==="undefined"||t>=e.length){this._s=void 0;return Ke()}var r=e.charCodeAt(t);var n,o;if(r<55296||r>56319||t+1===e.length){o=1}else{n=e.charCodeAt(t+1);o=n<56320||n>57343?1:2}this._i=t+o;return Ke(e.substr(t,o))};Me(Ze.prototype);Me(String.prototype,function(){return new Ze(this)});var Ye={from:function from(e){var r=this;var n;if(arguments.length>1){n=arguments[1]}var o,i;if(typeof n==="undefined"){o=false}else{if(!ce.IsCallable(n)){throw new TypeError("Array.from: when provided, the second argument must be a function")}if(arguments.length>2){i=arguments[2]}o=true}var a=typeof(te(e)||ce.GetMethod(e,ie))!=="undefined";var u,f,s;if(a){f=ce.IsConstructor(r)?Object(new r):[];var c=ce.GetIterator(e);var l,p;s=0;while(true){l=ce.IteratorStep(c);if(l===false){break}p=l.value;try{if(o){p=typeof i==="undefined"?n(p,s):t(n,i,p,s)}f[s]=p}catch(v){ce.IteratorClose(c,true);throw v}s+=1}u=s}else{var y=ce.ToObject(e);u=ce.ToLength(y.length);f=ce.IsConstructor(r)?Object(new r(u)):new Array(u);var h;for(s=0;s<u;++s){h=y[s];if(o){h=typeof i==="undefined"?n(h,s):t(n,i,h,s)}Ne(f,s,h)}}f.length=u;return f},of:function of(){var e=arguments.length;var t=this;var n=r(t)||!ce.IsCallable(t)?new Array(e):ce.Construct(t,[e]);for(var o=0;o<e;++o){Ne(n,o,arguments[o])}n.length=e;return n}};b(Array,Ye);Ce(Array);q=function(e,t){this.i=0;this.array=e;this.kind=t};b(q.prototype,{next:function(){var e=this.i;var t=this.array;if(!(this instanceof q)){throw new TypeError("Not an ArrayIterator")}if(typeof t!=="undefined"){var r=ce.ToLength(t.length);for(;e<r;e++){var n=this.kind;var o;if(n==="key"){o=e}else if(n==="value"){o=t[e]}else if(n==="entry"){o=[e,t[e]]}this.i=e+1;return Ke(o)}}this.array=void 0;return Ke()}});Me(q.prototype);var Qe=Array.of===Ye.of||function(){var e=function Foo(e){this.length=e};e.prototype=[];var t=Array.of.apply(e,[1,2]);return t instanceof e&&t.length===2}();if(!Qe){ne(Array,"of",Ye.of)}var et={copyWithin:function copyWithin(e,t){var r=ce.ToObject(this);var n=ce.ToLength(r.length);var o=ce.ToInteger(e);var i=ce.ToInteger(t);var a=o<0?A(n+o,0):R(o,n);var u=i<0?A(n+i,0):R(i,n);var f;if(arguments.length>2){f=arguments[2]}var s=typeof f==="undefined"?n:ce.ToInteger(f);var c=s<0?A(n+s,0):R(s,n);var l=R(c-u,n-a);var p=1;if(u<a&&a<u+l){p=-1;u+=l-1;a+=l-1}while(l>0){if(u in r){r[a]=r[u]}else{delete r[a]}u+=p;a+=p;l-=1}return r},fill:function fill(e){var t;if(arguments.length>1){t=arguments[1]}var r;if(arguments.length>2){r=arguments[2]}var n=ce.ToObject(this);var o=ce.ToLength(n.length);t=ce.ToInteger(typeof t==="undefined"?0:t);r=ce.ToInteger(typeof r==="undefined"?o:r);var i=t<0?A(o+t,0):R(t,o);var a=r<0?o+r:r;for(var u=i;u<o&&u<a;++u){n[u]=e}return n},find:function find(e){var r=ce.ToObject(this);var n=ce.ToLength(r.length);if(!ce.IsCallable(e)){throw new TypeError("Array#find: predicate must be a function")}var o=arguments.length>1?arguments[1]:null;for(var i=0,a;i<n;i++){a=r[i];if(o){if(t(e,o,a,i,r)){return a}}else if(e(a,i,r)){return a}}},findIndex:function findIndex(e){var r=ce.ToObject(this);var n=ce.ToLength(r.length);if(!ce.IsCallable(e)){throw new TypeError("Array#findIndex: predicate must be a function")}var o=arguments.length>1?arguments[1]:null;for(var i=0;i<n;i++){if(o){if(t(e,o,r[i],i,r)){return i}}else if(e(r[i],i,r)){return i}}return-1},keys:function keys(){return new q(this,"key")},values:function values(){return new q(this,"value")},entries:function entries(){return new q(this,"entry")}};if(Array.prototype.keys&&!ce.IsCallable([1].keys().next)){delete Array.prototype.keys}if(Array.prototype.entries&&!ce.IsCallable([1].entries().next)){delete Array.prototype.entries}if(Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[ie]){b(Array.prototype,{values:Array.prototype[ie]});if(re.symbol($.unscopables)){Array.prototype[$.unscopables].values=true}}if(c&&Array.prototype.values&&Array.prototype.values.name!=="values"){var tt=Array.prototype.values;ne(Array.prototype,"values",function values(){return ce.Call(tt,this,arguments)});h(Array.prototype,ie,Array.prototype.values,true)}b(Array.prototype,et);if(1/[true].indexOf(true,-0)<0){h(Array.prototype,"indexOf",function indexOf(e){var t=E(this,arguments);if(t===0&&1/t<0){return 0}return t},true)}Me(Array.prototype,function(){return this.values()});if(Object.getPrototypeOf){Me(Object.getPrototypeOf([].values()))}var rt=function(){return a(function(){return Array.from({length:-1}).length===0})}();var nt=function(){var e=Array.from([0].entries());return e.length===1&&r(e[0])&&e[0][0]===0&&e[0][1]===0}();if(!rt||!nt){ne(Array,"from",Ye.from)}var ot=function(){return a(function(){return Array.from([0],void 0)})}();if(!ot){var it=Array.from;ne(Array,"from",function from(e){if(arguments.length>1&&typeof arguments[1]!=="undefined"){return ce.Call(it,this,arguments)}else{return t(it,this,e)}})}var at=-(Math.pow(2,32)-1);var ut=function(e,r){var n={length:at};n[r?(n.length>>>0)-1:0]=true;return a(function(){t(e,n,function(){throw new RangeError("should not reach here")},[]);return true})};if(!ut(Array.prototype.forEach)){var ft=Array.prototype.forEach;ne(Array.prototype,"forEach",function forEach(e){return ce.Call(ft,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.map)){var st=Array.prototype.map;ne(Array.prototype,"map",function map(e){return ce.Call(st,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.filter)){var ct=Array.prototype.filter;ne(Array.prototype,"filter",function filter(e){return ce.Call(ct,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.some)){var lt=Array.prototype.some;ne(Array.prototype,"some",function some(e){return ce.Call(lt,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.every)){var pt=Array.prototype.every;ne(Array.prototype,"every",function every(e){return ce.Call(pt,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.reduce)){var vt=Array.prototype.reduce;ne(Array.prototype,"reduce",function reduce(e){return ce.Call(vt,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.reduceRight,true)){var yt=Array.prototype.reduceRight;ne(Array.prototype,"reduceRight",function reduceRight(e){return ce.Call(yt,this.length>=0?this:[],arguments)},true)}var ht=Number("0o10")!==8;var bt=Number("0b10")!==2;var gt=y(Ue,function(e){return Number(e+0+e)===0});if(ht||bt||gt){var dt=Number;var mt=/^0b[01]+$/i;var Ot=/^0o[0-7]+$/i;var wt=mt.test.bind(mt);var jt=Ot.test.bind(Ot);var St=function(e){var t;if(typeof e.valueOf==="function"){t=e.valueOf();if(re.primitive(t)){return t}}if(typeof e.toString==="function"){t=e.toString();if(re.primitive(t)){return t}}throw new TypeError("No default value")};var Tt=$e.test.bind($e);var It=Je.test.bind(Je);var Et=function(){var e=function Number(t){var r;if(arguments.length>0){r=re.primitive(t)?t:St(t,"number")}else{r=0}if(typeof r==="string"){r=ce.Call(Be,r);if(wt(r)){r=parseInt(C(r,2),2)}else if(jt(r)){r=parseInt(C(r,2),8)}else if(Tt(r)||It(r)){r=NaN}}var n=this;var o=a(function(){dt.prototype.valueOf.call(n);return true});if(n instanceof e&&!o){return new dt(r)}return dt(r)};return e}();Ee(dt,Et,{});b(Et,{NaN:dt.NaN,MAX_VALUE:dt.MAX_VALUE,MIN_VALUE:dt.MIN_VALUE,NEGATIVE_INFINITY:dt.NEGATIVE_INFINITY,POSITIVE_INFINITY:dt.POSITIVE_INFINITY});Number=Et;m.redefine(S,"Number",Et)}var Pt=Math.pow(2,53)-1;b(Number,{MAX_SAFE_INTEGER:Pt,MIN_SAFE_INTEGER:-Pt,EPSILON:2.220446049250313e-16,parseInt:S.parseInt,parseFloat:S.parseFloat,isFinite:K,isInteger:function isInteger(e){return K(e)&&ce.ToInteger(e)===e},isSafeInteger:function isSafeInteger(e){return Number.isInteger(e)&&k(e)<=Number.MAX_SAFE_INTEGER},isNaN:X});h(Number,"parseInt",S.parseInt,Number.parseInt!==S.parseInt);if([,1].find(function(){return true})===1){ne(Array.prototype,"find",et.find)}if([,1].findIndex(function(){return true})!==0){ne(Array.prototype,"findIndex",et.findIndex)}var Ct=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable);var Mt=function ensureEnumerable(e,t){if(s&&Ct(e,t)){Object.defineProperty(e,t,{enumerable:false})}};var xt=function sliceArgs(){var e=Number(this);var t=arguments.length;var r=t-e;var n=new Array(r<0?0:r);for(var o=e;o<t;++o){n[o-e]=arguments[o]}return n};var Nt=function assignTo(e){return function assignToSource(t,r){t[r]=e[r];return t}};var At=function(e,t){var r=n(Object(t));var o;if(ce.IsCallable(Object.getOwnPropertySymbols)){o=v(Object.getOwnPropertySymbols(Object(t)),Ct(t))}return p(P(r,o||[]),Nt(t),e)};var Rt={assign:function(e,t){var r=ce.ToObject(e,"Cannot convert undefined or null to object");return p(ce.Call(xt,1,arguments),At,r)},is:function is(e,t){return ce.SameValue(e,t)}};var _t=Object.assign&&Object.preventExtensions&&function(){var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return e[1]==="y"}}();if(_t){ne(Object,"assign",Rt.assign)}b(Object,Rt);if(s){var kt={setPrototypeOf:function(e,r){var n;var o=function(e,t){if(!ce.TypeIsObject(e)){throw new TypeError("cannot set prototype on a non-object")}if(!(t===null||ce.TypeIsObject(t))){throw new TypeError("can only set prototype to an object or null"+t)}};var i=function(e,r){o(e,r);t(n,e,r);return e};try{n=e.getOwnPropertyDescriptor(e.prototype,r).set;t(n,{},null)}catch(a){if(e.prototype!=={}[r]){return}n=function(e){this[r]=e};i.polyfill=i(i({},null),e.prototype)instanceof e}return i}(Object,"__proto__")};b(Object,kt)}if(Object.setPrototypeOf&&Object.getPrototypeOf&&Object.getPrototypeOf(Object.setPrototypeOf({},null))!==null&&Object.getPrototypeOf(Object.create(null))===null){(function(){var e=Object.create(null);var t=Object.getPrototypeOf;var r=Object.setPrototypeOf;Object.getPrototypeOf=function(r){var n=t(r);return n===e?null:n};Object.setPrototypeOf=function(t,n){var o=n===null?e:n;return r(t,o)};Object.setPrototypeOf.polyfill=false})()}var Lt=!i(function(){return Object.keys("foo")});if(!Lt){var Ft=Object.keys;ne(Object,"keys",function keys(e){return Ft(ce.ToObject(e))});n=Object.keys}var Dt=i(function(){return Object.keys(/a/g)});if(Dt){var zt=Object.keys;ne(Object,"keys",function keys(e){if(re.regex(e)){var t=[];for(var r in e){if(z(e,r)){M(t,r)}}return t}return zt(e)});n=Object.keys}if(Object.getOwnPropertyNames){var qt=!i(function(){return Object.getOwnPropertyNames("foo")});if(!qt){var Wt=typeof window==="object"?Object.getOwnPropertyNames(window):[];var Gt=Object.getOwnPropertyNames;ne(Object,"getOwnPropertyNames",function getOwnPropertyNames(e){var t=ce.ToObject(e);if(g(t)==="[object Window]"){try{return Gt(t)}catch(r){return P([],Wt)}}return Gt(t)})}}if(Object.getOwnPropertyDescriptor){var Ht=!i(function(){return Object.getOwnPropertyDescriptor("foo","bar")});if(!Ht){var Vt=Object.getOwnPropertyDescriptor;ne(Object,"getOwnPropertyDescriptor",function getOwnPropertyDescriptor(e,t){return Vt(ce.ToObject(e),t)})}}if(Object.seal){var Bt=!i(function(){return Object.seal("foo")});if(!Bt){var Ut=Object.seal;ne(Object,"seal",function seal(e){if(!ce.TypeIsObject(e)){return e}return Ut(e)})}}if(Object.isSealed){var $t=!i(function(){return Object.isSealed("foo")});if(!$t){var Jt=Object.isSealed;ne(Object,"isSealed",function isSealed(e){if(!ce.TypeIsObject(e)){return true}return Jt(e)})}}if(Object.freeze){var Xt=!i(function(){return Object.freeze("foo")});if(!Xt){var Kt=Object.freeze;ne(Object,"freeze",function freeze(e){if(!ce.TypeIsObject(e)){return e}return Kt(e)})}}if(Object.isFrozen){var Zt=!i(function(){return Object.isFrozen("foo")});if(!Zt){var Yt=Object.isFrozen;ne(Object,"isFrozen",function isFrozen(e){if(!ce.TypeIsObject(e)){return true}return Yt(e)})}}if(Object.preventExtensions){var Qt=!i(function(){return Object.preventExtensions("foo")});if(!Qt){var er=Object.preventExtensions;ne(Object,"preventExtensions",function preventExtensions(e){if(!ce.TypeIsObject(e)){return e}return er(e)})}}if(Object.isExtensible){var tr=!i(function(){return Object.isExtensible("foo")});if(!tr){var rr=Object.isExtensible;ne(Object,"isExtensible",function isExtensible(e){if(!ce.TypeIsObject(e)){return false}return rr(e)})}}if(Object.getPrototypeOf){var nr=!i(function(){return Object.getPrototypeOf("foo")});if(!nr){var or=Object.getPrototypeOf;ne(Object,"getPrototypeOf",function getPrototypeOf(e){return or(ce.ToObject(e))})}}var ir=s&&function(){var e=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags");return e&&ce.IsCallable(e.get)}();if(s&&!ir){var ar=function flags(){if(!ce.TypeIsObject(this)){throw new TypeError("Method called on incompatible type: must be an object.")}var e="";if(this.global){e+="g"}if(this.ignoreCase){e+="i"}if(this.multiline){e+="m"}if(this.unicode){e+="u"}if(this.sticky){e+="y"}return e};m.getter(RegExp.prototype,"flags",ar)}var ur=s&&a(function(){return String(new RegExp(/a/g,"i"))==="/a/i"});var fr=oe&&s&&function(){var e=/./;e[$.match]=false;return RegExp(e)===e}();var sr=a(function(){return RegExp.prototype.toString.call({source:"abc"})==="/abc/"});var cr=sr&&a(function(){return RegExp.prototype.toString.call({source:"a",flags:"b"})==="/a/b"});if(!sr||!cr){var lr=RegExp.prototype.toString;h(RegExp.prototype,"toString",function toString(){var e=ce.RequireObjectCoercible(this);if(re.regex(e)){return t(lr,e)}var r=ue(e.source);var n=ue(e.flags);return"/"+r+"/"+n},true);m.preserveToString(RegExp.prototype.toString,lr)}if(s&&(!ur||fr)){var pr=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags").get;var vr=Object.getOwnPropertyDescriptor(RegExp.prototype,"source")||{};var yr=function(){return this.source};var hr=ce.IsCallable(vr.get)?vr.get:yr;var br=RegExp;var gr=function(){return function RegExp(e,t){var r=ce.IsRegExp(e);var n=this instanceof RegExp;if(!n&&r&&typeof t==="undefined"&&e.constructor===RegExp){return e}var o=e;var i=t;if(re.regex(e)){o=ce.Call(hr,e);i=typeof t==="undefined"?ce.Call(pr,e):t;return new RegExp(o,i)}else if(r){o=e.source;i=typeof t==="undefined"?e.flags:t}return new br(e,t)}}();Ee(br,gr,{$input:true});RegExp=gr;m.redefine(S,"RegExp",gr)}if(s){var dr={input:"$_",lastMatch:"$&",lastParen:"$+",leftContext:"$`",rightContext:"$'"};l(n(dr),function(e){if(e in RegExp&&!(dr[e]in RegExp)){m.getter(RegExp,dr[e],function get(){return RegExp[e]})}})}Ce(RegExp);var mr=1/Number.EPSILON;var Or=function roundTiesToEven(e){return e+mr-mr};var wr=Math.pow(2,-23);var jr=Math.pow(2,127)*(2-wr);var Sr=Math.pow(2,-126);var Tr=Math.E;var Ir=Math.LOG2E;var Er=Math.LOG10E;var Pr=Number.prototype.clz;delete Number.prototype.clz;var Cr={acosh:function acosh(e){var t=Number(e);if(X(t)||e<1){return NaN}if(t===1){return 0}if(t===Infinity){return t}var r=1/(t*t);if(t<2){return Y(t-1+D(1-r)*t)}var n=t/2;return Y(n+D(1-r)*n-1)+1/Ir},asinh:function asinh(e){var t=Number(e);if(t===0||!T(t)){return t}var r=k(t);var n=r*r;var o=Z(t);if(r<1){return o*Y(r+n/(D(n+1)+1))}return o*(Y(r/2+D(1+1/n)*r/2-1)+1/Ir)},atanh:function atanh(e){var t=Number(e);if(t===0){return t}if(t===-1){return-Infinity}if(t===1){return Infinity}if(X(t)||t<-1||t>1){return NaN}var r=k(t);return Z(t)*Y(2*r/(1-r))/2},cbrt:function cbrt(e){var t=Number(e);if(t===0){return t}var r=t<0;var n;if(r){t=-t}if(t===Infinity){n=Infinity}else{n=L(F(t)/3);n=(t/(n*n)+2*n)/3}return r?-n:n},clz32:function clz32(e){var t=Number(e);var r=ce.ToUint32(t);if(r===0){return 32}return Pr?ce.Call(Pr,r):31-_(F(r+.5)*Ir)},cosh:function cosh(e){var t=Number(e);if(t===0){return 1}if(X(t)){return NaN}if(!T(t)){return Infinity}var r=L(k(t)-1);return(r+1/(r*Tr*Tr))*(Tr/2)},expm1:function expm1(e){var t=Number(e);if(t===-Infinity){return-1}if(!T(t)||t===0){return t}if(k(t)>.5){return L(t)-1}var r=t;var n=0;var o=1;while(n+r!==n){n+=r;o+=1;r*=t/o}return n},hypot:function hypot(e,t){var r=0;var n=0;for(var o=0;o<arguments.length;++o){var i=k(Number(arguments[o]));if(n<i){r*=n/i*(n/i);r+=1;n=i}else{r+=i>0?i/n*(i/n):i}}return n===Infinity?Infinity:n*D(r)},log2:function log2(e){return F(e)*Ir},log10:function log10(e){return F(e)*Er},log1p:Y,sign:Z,sinh:function sinh(e){var t=Number(e);if(!T(t)||t===0){return t}var r=k(t);if(r<1){var n=Math.expm1(r);return Z(t)*n*(1+1/(n+1))/2}var o=L(r-1);return Z(t)*(o-1/(o*Tr*Tr))*(Tr/2)},tanh:function tanh(e){var t=Number(e);if(X(t)||t===0){return t}if(t>=20){return 1}if(t<=-20){return-1}return(Math.expm1(t)-Math.expm1(-t))/(L(t)+L(-t))},trunc:function trunc(e){var t=Number(e);return t<0?-_(-t):_(t)},imul:function imul(e,t){var r=ce.ToUint32(e);var n=ce.ToUint32(t);var o=r>>>16&65535;var i=r&65535;var a=n>>>16&65535;var u=n&65535;return i*u+(o*u+i*a<<16>>>0)|0},fround:function fround(e){var t=Number(e);if(t===0||t===Infinity||t===-Infinity||X(t)){return t}var r=Z(t);var n=k(t);if(n<Sr){return r*Or(n/Sr/wr)*Sr*wr}var o=(1+wr/Number.EPSILON)*n;var i=o-(o-n);if(i>jr||X(i)){return r*Infinity}return r*i}};var Mr=function withinULPDistance(e,t,r){return k(1-e/t)/Number.EPSILON<(r||8)};b(Math,Cr);h(Math,"sinh",Cr.sinh,Math.sinh(710)===Infinity);h(Math,"cosh",Cr.cosh,Math.cosh(710)===Infinity);h(Math,"log1p",Cr.log1p,Math.log1p(-1e-17)!==-1e-17);h(Math,"asinh",Cr.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7));h(Math,"asinh",Cr.asinh,Math.asinh(1e300)===Infinity);h(Math,"atanh",Cr.atanh,Math.atanh(1e-300)===0);h(Math,"tanh",Cr.tanh,Math.tanh(-2e-17)!==-2e-17);
h(Math,"acosh",Cr.acosh,Math.acosh(Number.MAX_VALUE)===Infinity);h(Math,"acosh",Cr.acosh,!Mr(Math.acosh(1+Number.EPSILON),Math.sqrt(2*Number.EPSILON)));h(Math,"cbrt",Cr.cbrt,!Mr(Math.cbrt(1e-300),1e-100));h(Math,"sinh",Cr.sinh,Math.sinh(-2e-17)!==-2e-17);var xr=Math.expm1(10);h(Math,"expm1",Cr.expm1,xr>22025.465794806718||xr<22025.465794806718);var Nr=Math.round;var Ar=Math.round(.5-Number.EPSILON/4)===0&&Math.round(-.5+Number.EPSILON/3.99)===1;var Rr=mr+1;var _r=2*mr-1;var kr=[Rr,_r].every(function(e){return Math.round(e)===e});h(Math,"round",function round(e){var t=_(e);var r=t===-1?-0:t+1;return e-t<.5?t:r},!Ar||!kr);m.preserveToString(Math.round,Nr);var Lr=Math.imul;if(Math.imul(4294967295,5)!==-5){Math.imul=Cr.imul;m.preserveToString(Math.imul,Lr)}if(Math.imul.length!==2){ne(Math,"imul",function imul(e,t){return ce.Call(Lr,Math,arguments)})}var Fr=function(){var e=S.setTimeout;if(typeof e!=="function"&&typeof e!=="object"){return}ce.IsPromise=function(e){if(!ce.TypeIsObject(e)){return false}if(typeof e._promise==="undefined"){return false}return true};var r=function(e){if(!ce.IsConstructor(e)){throw new TypeError("Bad promise constructor")}var t=this;var r=function(e,r){if(t.resolve!==void 0||t.reject!==void 0){throw new TypeError("Bad Promise implementation!")}t.resolve=e;t.reject=r};t.resolve=void 0;t.reject=void 0;t.promise=new e(r);if(!(ce.IsCallable(t.resolve)&&ce.IsCallable(t.reject))){throw new TypeError("Bad promise constructor")}};var n;if(typeof window!=="undefined"&&ce.IsCallable(window.postMessage)){n=function(){var e=[];var t="zero-timeout-message";var r=function(r){M(e,r);window.postMessage(t,"*")};var n=function(r){if(r.source===window&&r.data===t){r.stopPropagation();if(e.length===0){return}var n=N(e);n()}};window.addEventListener("message",n,true);return r}}var o=function(){var e=S.Promise;var t=e&&e.resolve&&e.resolve();return t&&function(e){return t.then(e)}};var i=ce.IsCallable(S.setImmediate)?S.setImmediate:typeof process==="object"&&process.nextTick?process.nextTick:o()||(ce.IsCallable(n)?n():function(t){e(t,0)});var a=function(e){return e};var u=function(e){throw e};var f=0;var s=1;var c=2;var l=0;var p=1;var v=2;var y={};var h=function(e,t,r){i(function(){g(e,t,r)})};var g=function(e,t,r){var n,o;if(t===y){return e(r)}try{n=e(r);o=t.resolve}catch(i){n=i;o=t.reject}o(n)};var d=function(e,t){var r=e._promise;var n=r.reactionLength;if(n>0){h(r.fulfillReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o<n;o++,i+=3){h(r[i+l],r[i+v],t);e[i+l]=void 0;e[i+p]=void 0;e[i+v]=void 0}}}r.result=t;r.state=s;r.reactionLength=0};var m=function(e,t){var r=e._promise;var n=r.reactionLength;if(n>0){h(r.rejectReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o<n;o++,i+=3){h(r[i+p],r[i+v],t);e[i+l]=void 0;e[i+p]=void 0;e[i+v]=void 0}}}r.result=t;r.state=c;r.reactionLength=0};var O=function(e){var t=false;var r=function(r){var n;if(t){return}t=true;if(r===e){return m(e,new TypeError("Self resolution"))}if(!ce.TypeIsObject(r)){return d(e,r)}try{n=r.then}catch(o){return m(e,o)}if(!ce.IsCallable(n)){return d(e,r)}i(function(){j(e,r,n)})};var n=function(r){if(t){return}t=true;return m(e,r)};return{resolve:r,reject:n}};var w=function(e,r,n,o){if(e===I){t(e,r,n,o,y)}else{t(e,r,n,o)}};var j=function(e,t,r){var n=O(e);var o=n.resolve;var i=n.reject;try{w(r,t,o,i)}catch(a){i(a)}};var T,I;var E=function(){var e=function Promise(t){if(!(this instanceof e)){throw new TypeError('Constructor Promise requires "new"')}if(this&&this._promise){throw new TypeError("Bad construction")}if(!ce.IsCallable(t)){throw new TypeError("not a valid resolver")}var r=Ae(this,e,T,{_promise:{result:void 0,state:f,reactionLength:0,fulfillReactionHandler0:void 0,rejectReactionHandler0:void 0,reactionCapability0:void 0}});var n=O(r);var o=n.reject;try{t(n.resolve,o)}catch(i){o(i)}return r};return e}();T=E.prototype;var P=function(e,t,r,n){var o=false;return function(i){if(o){return}o=true;t[e]=i;if(--n.count===0){var a=r.resolve;a(t)}}};var C=function(e,t,r){var n=e.iterator;var o=[];var i={count:1};var a,u;var f=0;while(true){try{a=ce.IteratorStep(n);if(a===false){e.done=true;break}u=a.value}catch(s){e.done=true;throw s}o[f]=void 0;var c=t.resolve(u);var l=P(f,o,r,i);i.count+=1;w(c.then,c,l,r.reject);f+=1}if(--i.count===0){var p=r.resolve;p(o)}return r.promise};var x=function(e,t,r){var n=e.iterator;var o,i,a;while(true){try{o=ce.IteratorStep(n);if(o===false){e.done=true;break}i=o.value}catch(u){e.done=true;throw u}a=t.resolve(i);w(a.then,a,r.resolve,r.reject)}return r.promise};b(E,{all:function all(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Promise is not object")}var n=new r(t);var o,i;try{o=ce.GetIterator(e);i={iterator:o,done:false};return C(i,t,n)}catch(a){var u=a;if(i&&!i.done){try{ce.IteratorClose(o,true)}catch(f){u=f}}var s=n.reject;s(u);return n.promise}},race:function race(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Promise is not object")}var n=new r(t);var o,i;try{o=ce.GetIterator(e);i={iterator:o,done:false};return x(i,t,n)}catch(a){var u=a;if(i&&!i.done){try{ce.IteratorClose(o,true)}catch(f){u=f}}var s=n.reject;s(u);return n.promise}},reject:function reject(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Bad promise constructor")}var n=new r(t);var o=n.reject;o(e);return n.promise},resolve:function resolve(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Bad promise constructor")}if(ce.IsPromise(e)){var n=e.constructor;if(n===t){return e}}var o=new r(t);var i=o.resolve;i(e);return o.promise}});b(T,{"catch":function(e){return this.then(null,e)},then:function then(e,t){var n=this;if(!ce.IsPromise(n)){throw new TypeError("not a promise")}var o=ce.SpeciesConstructor(n,E);var i;var b=arguments.length>2&&arguments[2]===y;if(b&&o===E){i=y}else{i=new r(o)}var g=ce.IsCallable(e)?e:a;var d=ce.IsCallable(t)?t:u;var m=n._promise;var O;if(m.state===f){if(m.reactionLength===0){m.fulfillReactionHandler0=g;m.rejectReactionHandler0=d;m.reactionCapability0=i}else{var w=3*(m.reactionLength-1);m[w+l]=g;m[w+p]=d;m[w+v]=i}m.reactionLength+=1}else if(m.state===s){O=m.result;h(g,i,O)}else if(m.state===c){O=m.result;h(d,i,O)}else{throw new TypeError("unexpected Promise state")}return i.promise}});y=new r(E);I=T.then;return E}();if(S.Promise){delete S.Promise.accept;delete S.Promise.defer;delete S.Promise.prototype.chain}if(typeof Fr==="function"){b(S,{Promise:Fr});var Dr=w(S.Promise,function(e){return e.resolve(42).then(function(){})instanceof e});var zr=!i(function(){return S.Promise.reject(42).then(null,5).then(null,W)});var qr=i(function(){return S.Promise.call(3,W)});var Wr=function(e){var t=e.resolve(5);t.constructor={};var r=e.resolve(t);try{r.then(null,W).then(null,W)}catch(n){return true}return t===r}(S.Promise);var Gr=s&&function(){var e=0;var t=Object.defineProperty({},"then",{get:function(){e+=1}});Promise.resolve(t);return e===1}();var Hr=function BadResolverPromise(e){var t=new Promise(e);e(3,function(){});this.then=t.then;this.constructor=BadResolverPromise};Hr.prototype=Promise.prototype;Hr.all=Promise.all;var Vr=a(function(){return!!Hr.all([1,2])});if(!Dr||!zr||!qr||Wr||!Gr||Vr){Promise=Fr;ne(S,"Promise",Fr)}if(Promise.all.length!==1){var Br=Promise.all;ne(Promise,"all",function all(e){return ce.Call(Br,this,arguments)})}if(Promise.race.length!==1){var Ur=Promise.race;ne(Promise,"race",function race(e){return ce.Call(Ur,this,arguments)})}if(Promise.resolve.length!==1){var $r=Promise.resolve;ne(Promise,"resolve",function resolve(e){return ce.Call($r,this,arguments)})}if(Promise.reject.length!==1){var Jr=Promise.reject;ne(Promise,"reject",function reject(e){return ce.Call(Jr,this,arguments)})}Mt(Promise,"all");Mt(Promise,"race");Mt(Promise,"resolve");Mt(Promise,"reject");Ce(Promise)}var Xr=function(e){var t=n(p(e,function(e,t){e[t]=true;return e},{}));return e.join(":")===t.join(":")};var Kr=Xr(["z","a","bb"]);var Zr=Xr(["z",1,"a","3",2]);if(s){var Yr=function fastkey(e,t){if(!t&&!Kr){return null}if(se(e)){return"^"+ce.ToString(e)}else if(typeof e==="string"){return"$"+e}else if(typeof e==="number"){if(!Zr){return"n"+e}return e}else if(typeof e==="boolean"){return"b"+e}return null};var Qr=function emptyObject(){return Object.create?Object.create(null):{}};var en=function addIterableToMap(e,n,o){if(r(o)||re.string(o)){l(o,function(e){if(!ce.TypeIsObject(e)){throw new TypeError("Iterator value "+e+" is not an entry object")}n.set(e[0],e[1])})}else if(o instanceof e){t(e.prototype.forEach,o,function(e,t){n.set(t,e)})}else{var i,a;if(!se(o)){a=n.set;if(!ce.IsCallable(a)){throw new TypeError("bad map")}i=ce.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=ce.IteratorStep(i);if(u===false){break}var f=u.value;try{if(!ce.TypeIsObject(f)){throw new TypeError("Iterator value "+f+" is not an entry object")}t(a,n,f[0],f[1])}catch(s){ce.IteratorClose(i,true);throw s}}}}};var tn=function addIterableToSet(e,n,o){if(r(o)||re.string(o)){l(o,function(e){n.add(e)})}else if(o instanceof e){t(e.prototype.forEach,o,function(e){n.add(e)})}else{var i,a;if(!se(o)){a=n.add;if(!ce.IsCallable(a)){throw new TypeError("bad set")}i=ce.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=ce.IteratorStep(i);if(u===false){break}var f=u.value;try{t(a,n,f)}catch(s){ce.IteratorClose(i,true);throw s}}}}};var rn={Map:function(){var e={};var r=function MapEntry(e,t){this.key=e;this.value=t;this.next=null;this.prev=null};r.prototype.isRemoved=function isRemoved(){return this.key===e};var n=function isMap(e){return!!e._es6map};var o=function requireMapSlot(e,t){if(!ce.TypeIsObject(e)||!n(e)){throw new TypeError("Method Map.prototype."+t+" called on incompatible receiver "+ce.ToString(e))}};var i=function MapIterator(e,t){o(e,"[[MapIterator]]");this.head=e._head;this.i=this.head;this.kind=t};i.prototype={isMapIterator:true,next:function next(){if(!this.isMapIterator){throw new TypeError("Not a MapIterator")}var e=this.i;var t=this.kind;var r=this.head;if(typeof this.i==="undefined"){return Ke()}while(e.isRemoved()&&e!==r){e=e.prev}var n;while(e.next!==r){e=e.next;if(!e.isRemoved()){if(t==="key"){n=e.key}else if(t==="value"){n=e.value}else{n=[e.key,e.value]}this.i=e;return Ke(n)}}this.i=void 0;return Ke()}};Me(i.prototype);var a;var u=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}if(this&&this._es6map){throw new TypeError("Bad construction")}var e=Ae(this,Map,a,{_es6map:true,_head:null,_map:G?new G:null,_size:0,_storage:Qr()});var t=new r(null,null);t.next=t.prev=t;e._head=t;if(arguments.length>0){en(Map,e,arguments[0])}return e};a=u.prototype;m.getter(a,"size",function(){if(typeof this._size==="undefined"){throw new TypeError("size method called on incompatible Map")}return this._size});b(a,{get:function get(e){o(this,"get");var t;var r=Yr(e,true);if(r!==null){t=this._storage[r];if(t){return t.value}else{return}}if(this._map){t=V.call(this._map,e);if(t){return t.value}else{return}}var n=this._head;var i=n;while((i=i.next)!==n){if(ce.SameValueZero(i.key,e)){return i.value}}},has:function has(e){o(this,"has");var t=Yr(e,true);if(t!==null){return typeof this._storage[t]!=="undefined"}if(this._map){return B.call(this._map,e)}var r=this._head;var n=r;while((n=n.next)!==r){if(ce.SameValueZero(n.key,e)){return true}}return false},set:function set(e,t){o(this,"set");var n=this._head;var i=n;var a;var u=Yr(e,true);if(u!==null){if(typeof this._storage[u]!=="undefined"){this._storage[u].value=t;return this}else{a=this._storage[u]=new r(e,t);i=n.prev}}else if(this._map){if(B.call(this._map,e)){V.call(this._map,e).value=t}else{a=new r(e,t);U.call(this._map,e,a);i=n.prev}}while((i=i.next)!==n){if(ce.SameValueZero(i.key,e)){i.value=t;return this}}a=a||new r(e,t);if(ce.SameValue(-0,e)){a.key=+0}a.next=this._head;a.prev=this._head.prev;a.prev.next=a;a.next.prev=a;this._size+=1;return this},"delete":function(t){o(this,"delete");var r=this._head;var n=r;var i=Yr(t,true);if(i!==null){if(typeof this._storage[i]==="undefined"){return false}n=this._storage[i].prev;delete this._storage[i]}else if(this._map){if(!B.call(this._map,t)){return false}n=V.call(this._map,t).prev;H.call(this._map,t)}while((n=n.next)!==r){if(ce.SameValueZero(n.key,t)){n.key=e;n.value=e;n.prev.next=n.next;n.next.prev=n.prev;this._size-=1;return true}}return false},clear:function clear(){o(this,"clear");this._map=G?new G:null;this._size=0;this._storage=Qr();var t=this._head;var r=t;var n=r.next;while((r=n)!==t){r.key=e;r.value=e;n=r.next;r.next=r.prev=t}t.next=t.prev=t},keys:function keys(){o(this,"keys");return new i(this,"key")},values:function values(){o(this,"values");return new i(this,"value")},entries:function entries(){o(this,"entries");return new i(this,"key+value")},forEach:function forEach(e){o(this,"forEach");var r=arguments.length>1?arguments[1]:null;var n=this.entries();for(var i=n.next();!i.done;i=n.next()){if(r){t(e,r,i.value[1],i.value[0],this)}else{e(i.value[1],i.value[0],this)}}}});Me(a,a.entries);return u}(),Set:function(){var e=function isSet(e){return e._es6set&&typeof e._storage!=="undefined"};var r=function requireSetSlot(t,r){if(!ce.TypeIsObject(t)||!e(t)){throw new TypeError("Set.prototype."+r+" called on incompatible receiver "+ce.ToString(t))}};var o;var i=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}if(this&&this._es6set){throw new TypeError("Bad construction")}var e=Ae(this,Set,o,{_es6set:true,"[[SetData]]":null,_storage:Qr()});if(!e._es6set){throw new TypeError("bad set")}if(arguments.length>0){tn(Set,e,arguments[0])}return e};o=i.prototype;var a=function(e){var t=e;if(t==="^null"){return null}else if(t==="^undefined"){return void 0}else{var r=t.charAt(0);if(r==="$"){return C(t,1)}else if(r==="n"){return+C(t,1)}else if(r==="b"){return t==="btrue"}}return+t};var u=function ensureMap(e){if(!e["[[SetData]]"]){var t=new rn.Map;e["[[SetData]]"]=t;l(n(e._storage),function(e){var r=a(e);t.set(r,r)});e["[[SetData]]"]=t}e._storage=null};m.getter(i.prototype,"size",function(){r(this,"size");if(this._storage){return n(this._storage).length}u(this);return this["[[SetData]]"].size});b(i.prototype,{has:function has(e){r(this,"has");var t;if(this._storage&&(t=Yr(e))!==null){return!!this._storage[t]}u(this);return this["[[SetData]]"].has(e)},add:function add(e){r(this,"add");var t;if(this._storage&&(t=Yr(e))!==null){this._storage[t]=true;return this}u(this);this["[[SetData]]"].set(e,e);return this},"delete":function(e){r(this,"delete");var t;if(this._storage&&(t=Yr(e))!==null){var n=z(this._storage,t);return delete this._storage[t]&&n}u(this);return this["[[SetData]]"]["delete"](e)},clear:function clear(){r(this,"clear");if(this._storage){this._storage=Qr()}if(this["[[SetData]]"]){this["[[SetData]]"].clear()}},values:function values(){r(this,"values");u(this);return new f(this["[[SetData]]"].values())},entries:function entries(){r(this,"entries");u(this);return new f(this["[[SetData]]"].entries())},forEach:function forEach(e){r(this,"forEach");var n=arguments.length>1?arguments[1]:null;var o=this;u(o);this["[[SetData]]"].forEach(function(r,i){if(n){t(e,n,i,i,o)}else{e(i,i,o)}})}});h(i.prototype,"keys",i.prototype.values,true);Me(i.prototype,i.prototype.values);var f=function SetIterator(e){this.it=e};f.prototype={isSetIterator:true,next:function next(){if(!this.isSetIterator){throw new TypeError("Not a SetIterator")}return this.it.next()}};Me(f.prototype);return i}()};var nn=S.Set&&!Set.prototype["delete"]&&Set.prototype.remove&&Set.prototype.items&&Set.prototype.map&&Array.isArray((new Set).keys);if(nn){S.Set=rn.Set}if(S.Map||S.Set){var on=a(function(){return new Map([[1,2]]).get(1)===2});if(!on){S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new G;if(arguments.length>0){en(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,S.Map.prototype);return e};S.Map.prototype=O(G.prototype);h(S.Map.prototype,"constructor",S.Map,true);m.preserveToString(S.Map,G)}var an=new Map;var un=function(){var e=new Map([[1,0],[2,0],[3,0],[4,0]]);e.set(-0,e);return e.get(0)===e&&e.get(-0)===e&&e.has(0)&&e.has(-0)}();var fn=an.set(1,2)===an;if(!un||!fn){ne(Map.prototype,"set",function set(e,r){t(U,this,e===0?0:e,r);return this})}if(!un){b(Map.prototype,{get:function get(e){return t(V,this,e===0?0:e)},has:function has(e){return t(B,this,e===0?0:e)}},true);m.preserveToString(Map.prototype.get,V);m.preserveToString(Map.prototype.has,B)}var sn=new Set;var cn=Set.prototype["delete"]&&Set.prototype.add&&Set.prototype.has&&function(e){e["delete"](0);e.add(-0);return!e.has(0)}(sn);var ln=sn.add(1)===sn;if(!cn||!ln){var pn=Set.prototype.add;Set.prototype.add=function add(e){t(pn,this,e===0?0:e);return this};m.preserveToString(Set.prototype.add,pn)}if(!cn){var vn=Set.prototype.has;Set.prototype.has=function has(e){return t(vn,this,e===0?0:e)};m.preserveToString(Set.prototype.has,vn);var yn=Set.prototype["delete"];Set.prototype["delete"]=function SetDelete(e){return t(yn,this,e===0?0:e)};m.preserveToString(Set.prototype["delete"],yn)}var hn=w(S.Map,function(e){var t=new e([]);t.set(42,42);return t instanceof e});var bn=Object.setPrototypeOf&&!hn;var gn=function(){try{return!(S.Map()instanceof S.Map)}catch(e){return e instanceof TypeError}}();if(S.Map.length!==0||bn||!gn){S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new G;if(arguments.length>0){en(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Map.prototype);return e};S.Map.prototype=G.prototype;h(S.Map.prototype,"constructor",S.Map,true);m.preserveToString(S.Map,G)}var dn=w(S.Set,function(e){var t=new e([]);t.add(42,42);return t instanceof e});var mn=Object.setPrototypeOf&&!dn;var On=function(){try{return!(S.Set()instanceof S.Set)}catch(e){return e instanceof TypeError}}();if(S.Set.length!==0||mn||!On){var wn=S.Set;S.Set=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}var e=new wn;if(arguments.length>0){tn(Set,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Set.prototype);return e};S.Set.prototype=wn.prototype;h(S.Set.prototype,"constructor",S.Set,true);m.preserveToString(S.Set,wn)}var jn=new S.Map;var Sn=!a(function(){return jn.keys().next().done});if(typeof S.Map.prototype.clear!=="function"||(new S.Set).size!==0||jn.size!==0||typeof S.Map.prototype.keys!=="function"||typeof S.Set.prototype.keys!=="function"||typeof S.Map.prototype.forEach!=="function"||typeof S.Set.prototype.forEach!=="function"||u(S.Map)||u(S.Set)||typeof jn.keys().next!=="function"||Sn||!hn){b(S,{Map:rn.Map,Set:rn.Set},true)}if(S.Set.prototype.keys!==S.Set.prototype.values){h(S.Set.prototype,"keys",S.Set.prototype.values,true)}Me(Object.getPrototypeOf((new S.Map).keys()));Me(Object.getPrototypeOf((new S.Set).keys()));if(c&&S.Set.prototype.has.name!=="has"){var Tn=S.Set.prototype.has;ne(S.Set.prototype,"has",function has(e){return t(Tn,this,e)})}}b(S,rn);Ce(S.Map);Ce(S.Set)}var In=function throwUnlessTargetIsObject(e){if(!ce.TypeIsObject(e)){throw new TypeError("target must be an object")}};var En={apply:function apply(){return ce.Call(ce.Call,null,arguments)},construct:function construct(e,t){if(!ce.IsConstructor(e)){throw new TypeError("First argument must be a constructor.")}var r=arguments.length>2?arguments[2]:e;if(!ce.IsConstructor(r)){throw new TypeError("new.target must be a constructor.")}return ce.Construct(e,t,r,"internal")},deleteProperty:function deleteProperty(e,t){In(e);if(s){var r=Object.getOwnPropertyDescriptor(e,t);if(r&&!r.configurable){return false}}return delete e[t]},has:function has(e,t){In(e);return t in e}};if(Object.getOwnPropertyNames){Object.assign(En,{ownKeys:function ownKeys(e){In(e);var t=Object.getOwnPropertyNames(e);if(ce.IsCallable(Object.getOwnPropertySymbols)){x(t,Object.getOwnPropertySymbols(e))}return t}})}var Pn=function ConvertExceptionToBoolean(e){return!i(e)};if(Object.preventExtensions){Object.assign(En,{isExtensible:function isExtensible(e){In(e);return Object.isExtensible(e)},preventExtensions:function preventExtensions(e){In(e);return Pn(function(){return Object.preventExtensions(e)})}})}if(s){var Cn=function get(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t);if(!n){var o=Object.getPrototypeOf(e);if(o===null){return void 0}return Cn(o,t,r)}if("value"in n){return n.value}if(n.get){return ce.Call(n.get,r)}return void 0};var Mn=function set(e,r,n,o){var i=Object.getOwnPropertyDescriptor(e,r);if(!i){var a=Object.getPrototypeOf(e);if(a!==null){return Mn(a,r,n,o)}i={value:void 0,writable:true,enumerable:true,configurable:true}}if("value"in i){if(!i.writable){return false}if(!ce.TypeIsObject(o)){return false}var u=Object.getOwnPropertyDescriptor(o,r);if(u){return ae.defineProperty(o,r,{value:n})}else{return ae.defineProperty(o,r,{value:n,writable:true,enumerable:true,configurable:true})}}if(i.set){t(i.set,o,n);return true}return false};Object.assign(En,{defineProperty:function defineProperty(e,t,r){In(e);return Pn(function(){return Object.defineProperty(e,t,r)})},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,t){In(e);return Object.getOwnPropertyDescriptor(e,t)},get:function get(e,t){In(e);var r=arguments.length>2?arguments[2]:e;return Cn(e,t,r)},set:function set(e,t,r){In(e);var n=arguments.length>3?arguments[3]:e;return Mn(e,t,r,n)}})}if(Object.getPrototypeOf){var xn=Object.getPrototypeOf;En.getPrototypeOf=function getPrototypeOf(e){In(e);return xn(e)}}if(Object.setPrototypeOf&&En.getPrototypeOf){var Nn=function(e,t){var r=t;while(r){if(e===r){return true}r=En.getPrototypeOf(r)}return false};Object.assign(En,{setPrototypeOf:function setPrototypeOf(e,t){In(e);if(t!==null&&!ce.TypeIsObject(t)){throw new TypeError("proto must be an object or null")}if(t===ae.getPrototypeOf(e)){return true}if(ae.isExtensible&&!ae.isExtensible(e)){return false}if(Nn(e,t)){return false}Object.setPrototypeOf(e,t);return true}})}var An=function(e,t){if(!ce.IsCallable(S.Reflect[e])){h(S.Reflect,e,t)}else{var r=a(function(){S.Reflect[e](1);S.Reflect[e](NaN);S.Reflect[e](true);return true});if(r){ne(S.Reflect,e,t)}}};Object.keys(En).forEach(function(e){An(e,En[e])});var Rn=S.Reflect.getPrototypeOf;if(c&&Rn&&Rn.name!=="getPrototypeOf"){ne(S.Reflect,"getPrototypeOf",function getPrototypeOf(e){return t(Rn,S.Reflect,e)})}if(S.Reflect.setPrototypeOf){if(a(function(){S.Reflect.setPrototypeOf(1,{});return true})){ne(S.Reflect,"setPrototypeOf",En.setPrototypeOf)}}if(S.Reflect.defineProperty){if(!a(function(){var e=!S.Reflect.defineProperty(1,"test",{value:1});var t=typeof Object.preventExtensions!=="function"||!S.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return e&&t})){ne(S.Reflect,"defineProperty",En.defineProperty)}}if(S.Reflect.construct){if(!a(function(){var e=function F(){};return S.Reflect.construct(function(){},[],e)instanceof e})){ne(S.Reflect,"construct",En.construct)}}if(String(new Date(NaN))!=="Invalid Date"){var _n=Date.prototype.toString;var kn=function toString(){var e=+this;if(e!==e){return"Invalid Date"}return ce.Call(_n,this)};ne(Date.prototype,"toString",kn)}var Ln={anchor:function anchor(e){return ce.CreateHTML(this,"a","name",e)},big:function big(){return ce.CreateHTML(this,"big","","")},blink:function blink(){return ce.CreateHTML(this,"blink","","")},bold:function bold(){return ce.CreateHTML(this,"b","","")},fixed:function fixed(){return ce.CreateHTML(this,"tt","","")},fontcolor:function fontcolor(e){return ce.CreateHTML(this,"font","color",e)},fontsize:function fontsize(e){return ce.CreateHTML(this,"font","size",e)},italics:function italics(){return ce.CreateHTML(this,"i","","")},link:function link(e){return ce.CreateHTML(this,"a","href",e)},small:function small(){return ce.CreateHTML(this,"small","","")},strike:function strike(){return ce.CreateHTML(this,"strike","","")},sub:function sub(){return ce.CreateHTML(this,"sub","","")},sup:function sub(){return ce.CreateHTML(this,"sup","","")}};l(Object.keys(Ln),function(e){var r=String.prototype[e];var n=false;if(ce.IsCallable(r)){var o=t(r,"",' " ');var i=P([],o.match(/"/g)).length;n=o!==o.toLowerCase()||i>2}else{n=true}if(n){ne(String.prototype,e,Ln[e])}});var Fn=function(){if(!oe){return false}var e=typeof JSON==="object"&&typeof JSON.stringify==="function"?JSON.stringify:null;if(!e){return false}if(typeof e($())!=="undefined"){return true}if(e([$()])!=="[null]"){return true}var t={a:$()};t[$()]=true;if(e(t)!=="{}"){return true}return false}();var Dn=a(function(){if(!oe){return true}return JSON.stringify(Object($()))==="{}"&&JSON.stringify([Object($())])==="[{}]"});if(Fn||!Dn){var zn=JSON.stringify;ne(JSON,"stringify",function stringify(e){if(typeof e==="symbol"){return}var n;if(arguments.length>1){n=arguments[1]}var o=[e];if(!r(n)){var i=ce.IsCallable(n)?n:null;var a=function(e,r){var n=i?t(i,this,e,r):r;if(typeof n!=="symbol"){if(re.symbol(n)){return Nt({})(n)}else{return n}}};o.push(a)}else{o.push(n)}if(arguments.length>2){o.push(arguments[2])}return zn.apply(this,o)})}return S});
;
!function i(s, c, u) { function a(e, t) { if (!c[e]) { if (!s[e]) { var r = "function" == typeof require && require; if (!t && r) return r(e, !0); if (f) return f(e, !0); var n = new Error("Cannot find module '" + e + "'"); throw n.code = "MODULE_NOT_FOUND", n } var o = c[e] = { exports: {} }; s[e][0].call(o.exports, function (t) { return a(s[e][1][t] || t) }, o, o.exports, i, s, c, u) } return c[e].exports } for (var f = "function" == typeof require && require, t = 0; t < u.length; t++)a(u[t]); return a }({ 1: [function (n, o, t) { (function (t) { "use strict"; var e, r = (e = n("./tools/protect.js")) && e.__esModule ? e : { default: e }; n("core-js/shim"), n("regenerator/runtime"), r.default(o), t._babelPolyfill, t._babelPolyfill = !0 }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) }, { "./tools/protect.js": 2, "core-js/shim": 93, "regenerator/runtime": 94 }], 2: [function (n, o, i) { (function (t) { "use strict"; i.__esModule = !0; var e, r = ((e = n("path")) && e.__esModule ? e : { default: e }).default.resolve(t, "../../../"); i.default = function (t) { if (t.parent && 0 !== t.parent.filename.indexOf(r)) throw new Error("Don't hotlink internal Babel files.") }, o.exports = i.default }).call(this, "/lib/babel/tools") }, { path: 3 }], 3: [function (t, e, a) { (function (o) { function i(t, e) { for (var r = 0, n = t.length - 1; 0 <= n; n--) { var o = t[n]; "." === o ? t.splice(n, 1) : ".." === o ? (t.splice(n, 1), r++) : r && (t.splice(n, 1), r--) } if (e) for (; r--; r)t.unshift(".."); return t } var e = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/, s = function (t) { return e.exec(t).slice(1) }; function c(t, e) { if (t.filter) return t.filter(e); for (var r = [], n = 0; n < t.length; n++)e(t[n], n, t) && r.push(t[n]); return r } a.resolve = function () { for (var t = "", e = !1, r = arguments.length - 1; -1 <= r && !e; r--) { var n = 0 <= r ? arguments[r] : o.cwd(); if ("string" != typeof n) throw new TypeError("Arguments to path.resolve must be strings"); n && (t = n + "/" + t, e = "/" === n.charAt(0)) } return (e ? "/" : "") + (t = i(c(t.split("/"), function (t) { return !!t }), !e).join("/")) || "." }, a.normalize = function (t) { var e = a.isAbsolute(t), r = "/" === n(t, -1); return (t = i(c(t.split("/"), function (t) { return !!t }), !e).join("/")) || e || (t = "."), t && r && (t += "/"), (e ? "/" : "") + t }, a.isAbsolute = function (t) { return "/" === t.charAt(0) }, a.join = function () { var t = Array.prototype.slice.call(arguments, 0); return a.normalize(c(t, function (t, e) { if ("string" != typeof t) throw new TypeError("Arguments to path.join must be strings"); return t }).join("/")) }, a.relative = function (t, e) { function r(t) { for (var e = 0; e < t.length && "" === t[e]; e++); for (var r = t.length - 1; 0 <= r && "" === t[r]; r--); return r < e ? [] : t.slice(e, r - e + 1) } t = a.resolve(t).substr(1), e = a.resolve(e).substr(1); for (var n = r(t.split("/")), o = r(e.split("/")), i = Math.min(n.length, o.length), s = i, c = 0; c < i; c++)if (n[c] !== o[c]) { s = c; break } var u = []; for (c = s; c < n.length; c++)u.push(".."); return (u = u.concat(o.slice(s))).join("/") }, a.sep = "/", a.delimiter = ":", a.dirname = function (t) { var e = s(t), r = e[0], n = e[1]; return r || n ? (n && (n = n.substr(0, n.length - 1)), r + n) : "." }, a.basename = function (t, e) { var r = s(t)[2]; return e && r.substr(-1 * e.length) === e && (r = r.substr(0, r.length - e.length)), r }, a.extname = function (t) { return s(t)[3] }; var n = "b" === "ab".substr(-1) ? function (t, e, r) { return t.substr(e, r) } : function (t, e, r) { return e < 0 && (e = t.length + e), t.substr(e, r) } }).call(this, t("_process")) }, { _process: 4 }], 4: [function (t, e, r) { var n = e.exports = {}, o = [], i = !1; function s() { if (!i) { var t; i = !0; for (var e = o.length; e;) { t = o, o = []; for (var r = -1; ++r < e;)t[r](); e = o.length } i = !1 } } function c() { } n.nextTick = function (t) { o.push(t), i || setTimeout(s, 0) }, n.title = "browser", n.browser = !0, n.env = {}, n.argv = [], n.version = "", n.versions = {}, n.on = c, n.addListener = c, n.once = c, n.off = c, n.removeListener = c, n.removeAllListeners = c, n.emit = c, n.binding = function (t) { throw new Error("process.binding is not supported") }, n.cwd = function () { return "/" }, n.chdir = function (t) { throw new Error("process.chdir is not supported") }, n.umask = function () { return 0 } }, {}], 5: [function (t, e, r) { var u = t("./$"); e.exports = function (c) { return function (t, e, r) { var n, o = u.toObject(t), i = u.toLength(o.length), s = u.toIndex(r, i); if (c && e != e) { for (; s < i;)if ((n = o[s++]) != n) return !0 } else for (; s < i; s++)if ((c || s in o) && o[s] === e) return c || s; return !c && -1 } } }, { "./$": 26 }], 6: [function (t, e, r) { var y = t("./$"), m = t("./$.ctx"); e.exports = function (l) { var h = 1 == l, d = 2 == l, p = 3 == l, $ = 4 == l, g = 6 == l, v = 5 == l || g; return function (t, e, r) { for (var n, o, i = Object(y.assertDefined(t)), s = y.ES5Object(i), c = m(e, r, 3), u = y.toLength(s.length), a = 0, f = h ? Array(u) : d ? [] : void 0; a < u; a++)if ((v || a in s) && (o = c(n = s[a], a, i), l)) if (h) f[a] = o; else if (o) switch (l) { case 3: return !0; case 5: return n; case 6: return a; case 2: f.push(n) } else if ($) return !1; return g ? -1 : p || $ ? $ : f } } }, { "./$": 26, "./$.ctx": 14 }], 7: [function (t, e, r) { var n = t("./$"); function o(t, e, r) { if (!t) throw TypeError(r ? e + r : e) } o.def = n.assertDefined, o.fn = function (t) { if (!n.isFunction(t)) throw TypeError(t + " is not a function!"); return t }, o.obj = function (t) { if (!n.isObject(t)) throw TypeError(t + " is not an object!"); return t }, o.inst = function (t, e, r) { if (!(t instanceof e)) throw TypeError(r + ": use the 'new' operator!"); return t }, e.exports = o }, { "./$": 26 }], 8: [function (t, e, r) { var f = t("./$"), l = t("./$.enum-keys"); e.exports = Object.assign || function (t, e) { for (var r = Object(f.assertDefined(t)), n = arguments.length, o = 1; o < n;)for (var i, s = f.ES5Object(arguments[o++]), c = l(s), u = c.length, a = 0; a < u;)r[i = c[a++]] = s[i]; return r } }, { "./$": 26, "./$.enum-keys": 17 }], 9: [function (t, e, r) { var n = t("./$"), o = t("./$.wks")("toStringTag"), i = {}.toString; function s(t) { return i.call(t).slice(8, -1) } s.classof = function (t) { var e, r; return null == t ? void 0 === t ? "Undefined" : "Null" : "string" == typeof (r = (e = Object(t))[o]) ? r : s(e) }, s.set = function (t, e, r) { t && !n.has(t = r ? t : t.prototype, o) && n.hide(t, o, e) }, e.exports = s }, { "./$": 26, "./$.wks": 44 }], 10: [function (s, t, e) { "use strict"; var c = s("./$"), u = s("./$.ctx"), r = s("./$.uid").safe, a = s("./$.assert"), f = s("./$.for-of"), n = s("./$.iter").step, o = c.has, l = c.set, i = c.isObject, h = c.hide, d = Object.isExtensible || i, p = r("id"), $ = r("O1"), g = r("last"), v = r("first"), y = r("iter"), m = c.DESC ? r("size") : "size", b = 0; function w(t, e) { if (!i(t)) return "symbol" == typeof t ? t : ("string" == typeof t ? "S" : "P") + t; if (!o(t, p)) { if (!d(t)) return "F"; if (!e) return "E"; h(t, p, ++b) } return "O" + t[p] } function j(t, e) { var r, n = w(e); if ("F" !== n) return t[$][n]; for (r = t[v]; r; r = r.n)if (r.k == e) return r } t.exports = { getConstructor: function (t, r, n, o) { var i = t(function (t, e) { a.inst(t, i, r), l(t, $, c.create(null)), l(t, m, 0), l(t, g, void 0), l(t, v, void 0), null != e && f(e, n, t[o], t) }); return s("./$.mix")(i.prototype, { clear: function () { for (var t = this, e = t[$], r = t[v]; r; r = r.n)r.r = !0, r.p && (r.p = r.p.n = void 0), delete e[r.i]; t[v] = t[g] = void 0, t[m] = 0 }, delete: function (t) { var e = this, r = j(e, t); if (r) { var n = r.n, o = r.p; delete e[$][r.i], r.r = !0, o && (o.n = n), n && (n.p = o), e[v] == r && (e[v] = n), e[g] == r && (e[g] = o), e[m]-- } return !!r }, forEach: function (t) { for (var e, r = u(t, arguments[1], 3); e = e ? e.n : this[v];)for (r(e.v, e.k, this); e && e.r;)e = e.p }, has: function (t) { return !!j(this, t) } }), c.DESC && c.setDesc(i.prototype, "size", { get: function () { return a.def(this[m]) } }), i }, def: function (t, e, r) { var n, o, i = j(t, e); return i ? i.v = r : (t[g] = i = { i: o = w(e, !0), k: e, v: r, p: n = t[g], n: void 0, r: !1 }, t[v] || (t[v] = i), n && (n.n = i), t[m]++ , "F" !== o && (t[$][o] = i)), t }, getEntry: j, setIter: function (t, e, r) { s("./$.iter-define")(t, e, function (t, e) { l(this, y, { o: t, k: e }) }, function () { for (var t = this[y], e = t.k, r = t.l; r && r.r;)r = r.p; return t.o && (t.l = r = r ? r.n : t.o[v]) ? n(0, "keys" == e ? r.k : "values" == e ? r.v : [r.k, r.v]) : (t.o = void 0, n(1)) }, r ? "entries" : "values", !r, !0) } } }, { "./$": 26, "./$.assert": 7, "./$.ctx": 14, "./$.for-of": 18, "./$.iter": 25, "./$.iter-define": 23, "./$.mix": 28, "./$.uid": 42 }], 11: [function (t, e, r) { var n = t("./$.def"), o = t("./$.for-of"); e.exports = function (t) { n(n.P, t, { toJSON: function () { var t = []; return o(this, !1, t.push, t), t } }) } }, { "./$.def": 15, "./$.for-of": 18 }], 12: [function (e, t, r) { "use strict"; var s = e("./$"), n = e("./$.uid").safe, c = e("./$.assert"), u = e("./$.for-of"), a = s.has, f = s.isObject, o = s.hide, l = Object.isExtensible || f, h = 0, d = n("id"), p = n("weak"), i = n("leak"), $ = e("./$.array-methods"), g = $(5), v = $(6); function y(t, e) { return g(t.array, function (t) { return t[0] === e }) } function m(t) { return t[i] || o(t, i, { array: [], get: function (t) { var e = y(this, t); if (e) return e[1] }, has: function (t) { return !!y(this, t) }, set: function (t, e) { var r = y(this, t); r ? r[1] = e : this.array.push([t, e]) }, delete: function (e) { var t = v(this.array, function (t) { return t[0] === e }); return ~t && this.array.splice(t, 1), !!~t } })[i] } t.exports = { getConstructor: function (t, r, n, o) { var i = t(function (t, e) { s.set(c.inst(t, i, r), d, h++), null != e && u(e, n, t[o], t) }); return e("./$.mix")(i.prototype, { delete: function (t) { return !!f(t) && (l(t) ? a(t, p) && a(t[p], this[d]) && delete t[p][this[d]] : m(this).delete(t)) }, has: function (t) { return !!f(t) && (l(t) ? a(t, p) && a(t[p], this[d]) : m(this).has(t)) } }), i }, def: function (t, e, r) { return l(c.obj(e)) ? (a(e, p) || o(e, p, {}), e[p][t[d]] = r) : m(t).set(e, r), t }, leakStore: m, WEAK: p, ID: d } }, { "./$": 26, "./$.array-methods": 6, "./$.assert": 7, "./$.for-of": 18, "./$.mix": 28, "./$.uid": 42 }], 13: [function ($, t, e) { "use strict"; var g = $("./$"), v = $("./$.def"), y = $("./$.iter").BUGGY, m = $("./$.for-of"), b = $("./$.species"), w = $("./$.assert").inst; t.exports = function (n, t, e, r, o, i) { var s = g.g[n], c = s, u = o ? "set" : "add", a = c && c.prototype, f = {}; function l(t) { var r = a[t]; $("./$.redef")(a, t, "delete" == t ? function (t) { return r.call(this, 0 === t ? 0 : t) } : "has" == t ? function (t) { return r.call(this, 0 === t ? 0 : t) } : "get" == t ? function (t) { return r.call(this, 0 === t ? 0 : t) } : "add" == t ? function (t) { return r.call(this, 0 === t ? 0 : t), this } : function (t, e) { return r.call(this, 0 === t ? 0 : t, e), this }) } if (g.isFunction(c) && (i || !y && a.forEach && a.entries)) { var h, d = new c, p = d[u](i ? {} : -0, 1); $("./$.iter-detect")(function (t) { new c(t) }) || (((c = t(function (t, e) { w(t, c, n); var r = new s; return null != e && m(e, o, r[u], r), r })).prototype = a).constructor = c), i || d.forEach(function (t, e) { h = 1 / e == -1 / 0 }), h && (l("delete"), l("has"), o && l("get")), (h || p !== d) && l(u) } else c = r.getConstructor(t, n, o, u), $("./$.mix")(c.prototype, e); return $("./$.cof").set(c, n), f[n] = c, v(v.G + v.W + v.F * (c != s), f), b(c), b(g.core[n]), i || r.setIter(c, n, o), c } }, { "./$": 26, "./$.assert": 7, "./$.cof": 9, "./$.def": 15, "./$.for-of": 18, "./$.iter": 25, "./$.iter-detect": 24, "./$.mix": 28, "./$.redef": 31, "./$.species": 36 }], 14: [function (t, e, r) { var i = t("./$.assert").fn; e.exports = function (n, o, t) { if (i(n), ~t && void 0 === o) return n; switch (t) { case 1: return function (t) { return n.call(o, t) }; case 2: return function (t, e) { return n.call(o, t, e) }; case 3: return function (t, e, r) { return n.call(o, t, e, r) } }return function () { return n.apply(o, arguments) } } }, { "./$.assert": 7 }], 15: [function (t, e, r) { var l = t("./$"), h = l.g, d = l.core, p = l.isFunction, $ = t("./$.redef"); function g(t, e) { return function () { return t.apply(e, arguments) } } function v(t, e, r) { var n, o, i, s, c = t & v.G, u = t & v.P, a = c ? h : t & v.S ? h[e] : (h[e] || {}).prototype, f = c ? d : d[e] || (d[e] = {}); for (n in c && (r = e), r) i = ((o = !(t & v.F) && a && n in a) ? a : r)[n], s = t & v.B && o ? g(i, h) : u && p(i) ? g(Function.call, i) : i, a && !o && $(a, n, i), f[n] != i && l.hide(f, n, s), u && ((f.prototype || (f.prototype = {}))[n] = i) } h.core = d, v.F = 1, v.G = 2, v.S = 4, v.P = 8, v.B = 16, v.W = 32, e.exports = v }, { "./$": 26, "./$.redef": 31 }], 16: [function (t, e, r) { var n = t("./$"), o = n.g.document, i = n.isObject, s = i(o) && i(o.createElement); e.exports = function (t) { return s ? o.createElement(t) : {} } }, { "./$": 26 }], 17: [function (t, e, r) { var o = t("./$"); e.exports = function (e) { var r = o.getKeys(e), n = o.getDesc, t = o.getSymbols; return t && o.each.call(t(e), function (t) { n(e, t).enumerable && r.push(t) }), r } }, { "./$": 26 }], 18: [function (t, e, r) { var c = t("./$.ctx"), u = t("./$.iter").get, a = t("./$.iter-call"); e.exports = function (t, e, r, n) { for (var o, i = u(t), s = c(r, n, e ? 2 : 1); !(o = i.next()).done;)if (!1 === a(i, s, o.value, e)) return a.close(i) } }, { "./$.ctx": 14, "./$.iter": 25, "./$.iter-call": 22 }], 19: [function (t, e, r) { e.exports = function (t) { return t.FW = !0, t.path = t.g, t } }, {}], 20: [function (t, e, r) { var n = t("./$"), o = {}.toString, i = n.getNames, s = "object" == typeof window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; e.exports.get = function (t) { return s && "[object Window]" == o.call(t) ? function (t) { try { return i(t) } catch (t) { return s.slice() } }(t) : i(n.toObject(t)) } }, { "./$": 26 }], 21: [function (t, e, r) { e.exports = function (t, e, r) { var n = void 0 === r; switch (e.length) { case 0: return n ? t() : t.call(r); case 1: return n ? t(e[0]) : t.call(r, e[0]); case 2: return n ? t(e[0], e[1]) : t.call(r, e[0], e[1]); case 3: return n ? t(e[0], e[1], e[2]) : t.call(r, e[0], e[1], e[2]); case 4: return n ? t(e[0], e[1], e[2], e[3]) : t.call(r, e[0], e[1], e[2], e[3]); case 5: return n ? t(e[0], e[1], e[2], e[3], e[4]) : t.call(r, e[0], e[1], e[2], e[3], e[4]) }return t.apply(r, e) } }, {}], 22: [function (t, e, r) { var o = t("./$.assert").obj; function i(t) { var e = t.return; void 0 !== e && o(e.call(t)) } function n(t, e, r, n) { try { return n ? e(o(r)[0], r[1]) : e(r) } catch (e) { throw i(t), e } } n.close = i, e.exports = n }, { "./$.assert": 7 }], 23: [function (t, e, r) { var $ = t("./$.def"), g = t("./$.redef"), v = t("./$"), y = t("./$.cof"), m = t("./$.iter"), b = t("./$.wks")("iterator"), w = "@@iterator", j = "values", S = m.Iterators; e.exports = function (t, e, r, n, o, i, s) { function c(e) { function t(t) { return new r(t, e) } switch (e) { case "keys": case j: return function () { return t(this) } }return function () { return t(this) } } m.create(r, e, n); var u, a, f = e + " Iterator", l = t.prototype, h = l[b] || l[w] || o && l[o], d = h || c(o); if (h) { var p = v.getProto(d.call(new t)); y.set(p, f, !0), v.FW && v.has(l, w) && m.set(p, v.that) } if ((v.FW || s) && m.set(l, d), S[e] = d, S[f] = v.that, o) if (u = { keys: i ? d : c("keys"), values: o == j ? d : c(j), entries: o != j ? d : c("entries") }, s) for (a in u) a in l || g(l, a, u[a]); else $($.P + $.F * m.BUGGY, e, u) } }, { "./$": 26, "./$.cof": 9, "./$.def": 15, "./$.iter": 25, "./$.redef": 31, "./$.wks": 44 }], 24: [function (t, e, r) { var o = t("./$.wks")("iterator"), i = !1; try { var n = [7][o](); n.return = function () { i = !0 }, Array.from(n, function () { throw 2 }) } catch (t) { } e.exports = function (t) { if (!i) return !1; var e = !1; try { var r = [7], n = r[o](); n.next = function () { e = !0 }, r[o] = function () { return n }, t(r) } catch (t) { } return e } }, { "./$.wks": 44 }], 25: [function (t, e, r) { "use strict"; var o = t("./$"), i = t("./$.cof"), n = i.classof, s = t("./$.assert"), c = s.obj, u = t("./$.wks")("iterator"), a = "@@iterator", f = t("./$.shared")("iterators"), l = {}; function h(t, e) { o.hide(t, u, e), a in [] && o.hide(t, a, e) } h(l, o.that), e.exports = { BUGGY: "keys" in [] && !("next" in [].keys()), Iterators: f, step: function (t, e) { return { value: e, done: !!t } }, is: function (t) { var e = Object(t), r = o.g.Symbol; return (r && r.iterator || a) in e || u in e || o.has(f, n(e)) }, get: function (t) { var e, r = o.g.Symbol; return null != t && (e = t[r && r.iterator || a] || t[u] || f[n(t)]), s(o.isFunction(e), t, " is not iterable!"), c(e.call(t)) }, set: h, create: function (t, e, r, n) { t.prototype = o.create(n || l, { next: o.desc(1, r) }), i.set(t, e + " Iterator") } } }, { "./$": 26, "./$.assert": 7, "./$.cof": 9, "./$.shared": 35, "./$.wks": 44 }], 26: [function (t, e, r) { "use strict"; var n = "undefined" != typeof self ? self : Function("return this")(), o = {}, i = Object.defineProperty, s = {}.hasOwnProperty, c = Math.ceil, u = Math.floor, a = Math.max, f = Math.min, l = !!function () { try { return 2 == i({}, "a", { get: function () { return 2 } }).a } catch (t) { } }(), h = g(1); function d(t) { return isNaN(t = +t) ? 0 : (0 < t ? u : c)(t) } function p(t, e) { return { enumerable: !(1 & t), configurable: !(2 & t), writable: !(4 & t), value: e } } function $(t, e, r) { return t[e] = r, t } function g(n) { return l ? function (t, e, r) { return y.setDesc(t, e, p(n, r)) } : $ } function v(t) { if (null == t) throw TypeError("Can't call method on  " + t); return t } var y = e.exports = t("./$.fw")({ g: n, core: o, html: n.document && document.documentElement, isObject: function (t) { return null !== t && ("object" == typeof t || "function" == typeof t) }, isFunction: function (t) { return "function" == typeof t }, that: function () { return this }, toInteger: d, toLength: function (t) { return 0 < t ? f(d(t), 9007199254740991) : 0 }, toIndex: function (t, e) { return (t = d(t)) < 0 ? a(t + e, 0) : f(t, e) }, has: function (t, e) { return s.call(t, e) }, create: Object.create, getProto: Object.getPrototypeOf, DESC: l, desc: p, getDesc: Object.getOwnPropertyDescriptor, setDesc: i, setDescs: Object.defineProperties, getKeys: Object.keys, getNames: Object.getOwnPropertyNames, getSymbols: Object.getOwnPropertySymbols, assertDefined: v, ES5Object: Object, toObject: function (t) { return y.ES5Object(v(t)) }, hide: h, def: g(0), set: n.Symbol ? $ : h, each: [].forEach }); "undefined" != typeof __e && (__e = o), "undefined" != typeof __g && (__g = n) }, { "./$.fw": 19 }], 27: [function (t, e, r) { var c = t("./$"); e.exports = function (t, e) { for (var r, n = c.toObject(t), o = c.getKeys(n), i = o.length, s = 0; s < i;)if (n[r = o[s++]] === e) return r } }, { "./$": 26 }], 28: [function (t, e, r) { var n = t("./$.redef"); e.exports = function (t, e) { for (var r in e) n(t, r, e[r]); return t } }, { "./$.redef": 31 }], 29: [function (t, e, r) { var n = t("./$"), o = t("./$.assert").obj; e.exports = function (t) { o(t); var e = n.getNames(t), r = n.getSymbols; return r ? e.concat(r(t)) : e } }, { "./$": 26, "./$.assert": 7 }], 30: [function (t, e, r) { "use strict"; var n = t("./$"), a = t("./$.invoke"), f = t("./$.assert").fn; e.exports = function () { for (var o = f(this), i = arguments.length, s = Array(i), t = 0, c = n.path._, u = !1; t < i;)(s[t] = arguments[t++]) === c && (u = !0); return function () { var t, e = arguments.length, r = 0, n = 0; if (!u && !e) return a(o, s, this); if (t = s.slice(), u) for (; r < i; r++)t[r] === c && (t[r] = arguments[n++]); for (; n < e;)t.push(arguments[n++]); return a(o, t, this) } } }, { "./$": 26, "./$.assert": 7, "./$.invoke": 21 }], 31: [function (t, e, r) { var i = t("./$"), s = String({}.hasOwnProperty), c = t("./$.uid").safe("src"), n = Function.toString; function o(t, e, r, n) { if (i.isFunction(r)) { var o = t[e]; i.hide(r, c, o ? String(o) : s.replace(/hasOwnProperty/, String(e))), "name" in r || (r.name = e) } t === i.g ? t[e] = r : (n || delete t[e], i.hide(t, e, r)) } o(Function.prototype, "toString", function () { return i.has(this, c) ? this[c] : n.call(this) }), i.core.inspectSource = function (t) { return n.call(t) }, e.exports = o }, { "./$": 26, "./$.uid": 42 }], 32: [function (t, e, r) { "use strict"; e.exports = function (e, r, n) { var o = r === Object(r) ? function (t) { return r[t] } : r; return function (t) { return String(n ? t : this).replace(e, o) } } }, {}], 33: [function (t, e, r) { e.exports = Object.is || function (t, e) { return t === e ? 0 !== t || 1 / t == 1 / e : t != t && e != e } }, {}], 34: [function (t, e, r) { var o = t("./$"), n = t("./$.assert"); function i(t, e) { n.obj(t), n(null === e || o.isObject(e), e, ": can't set as prototype!") } e.exports = { set: Object.setPrototypeOf || ("__proto__" in {} ? function (r, n) { try { (n = t("./$.ctx")(Function.call, o.getDesc(Object.prototype, "__proto__").set, 2))({}, []) } catch (t) { r = !0 } return function (t, e) { return i(t, e), r ? t.__proto__ = e : n(t, e), t } }() : void 0), check: i } }, { "./$": 26, "./$.assert": 7, "./$.ctx": 14 }], 35: [function (t, e, r) { var n = t("./$"), o = "__core-js_shared__", i = n.g[o] || (n.g[o] = {}); e.exports = function (t) { return i[t] || (i[t] = {}) } }, { "./$": 26 }], 36: [function (t, e, r) { var n = t("./$"), o = t("./$.wks")("species"); e.exports = function (t) { !n.DESC || o in t || n.setDesc(t, o, { configurable: !0, get: n.that }) } }, { "./$": 26, "./$.wks": 44 }], 37: [function (t, e, r) { var u = t("./$"); e.exports = function (c) { return function (t, e) { var r, n, o = String(u.assertDefined(t)), i = u.toInteger(e), s = o.length; return i < 0 || s <= i ? c ? "" : void 0 : (r = o.charCodeAt(i)) < 55296 || 56319 < r || i + 1 === s || (n = o.charCodeAt(i + 1)) < 56320 || 57343 < n ? c ? o.charAt(i) : r : c ? o.slice(i, i + 2) : n - 56320 + (r - 55296 << 10) + 65536 } } }, { "./$": 26 }], 38: [function (t, e, r) { var u = t("./$"), a = t("./$.string-repeat"); e.exports = function (t, e, r, n) { var o = String(u.assertDefined(t)); if (void 0 === e) return o; var i = u.toInteger(e) - o.length; if (i < 0 || i === 1 / 0) throw new RangeError("Cannot satisfy string length " + e + " for string: " + o); var s = void 0 === r ? " " : String(r), c = a.call(s, Math.ceil(i / s.length)); return c.length > i && (c = n ? c.slice(c.length - i) : c.slice(0, i)), n ? c.concat(o) : o.concat(c) } }, { "./$": 26, "./$.string-repeat": 39 }], 39: [function (t, e, r) { "use strict"; var o = t("./$"); e.exports = function (t) { var e = String(o.assertDefined(this)), r = "", n = o.toInteger(t); if (n < 0 || n == 1 / 0) throw RangeError("Count can't be negative"); for (; 0 < n; (n >>>= 1) && (e += e))1 & n && (r += e); return r } }, { "./$": 26 }], 40: [function (t, e, r) { "use strict"; var n, o, i, s = t("./$"), c = t("./$.ctx"), u = t("./$.cof"), a = t("./$.invoke"), f = t("./$.dom-create"), l = s.g, h = s.isFunction, d = s.html, p = l.process, $ = l.setImmediate, g = l.clearImmediate, v = l.MessageChannel, y = 0, m = {}, b = "onreadystatechange"; function w() { var t = +this; if (s.has(m, t)) { var e = m[t]; delete m[t], e() } } function j(t) { w.call(t.data) } h($) && h(g) || ($ = function (t) { for (var e = [], r = 1; arguments.length > r;)e.push(arguments[r++]); return m[++y] = function () { a(h(t) ? t : Function(t), e) }, n(y), y }, g = function (t) { delete m[t] }, "process" == u(p) ? n = function (t) { p.nextTick(c(w, t, 1)) } : l.addEventListener && h(l.postMessage) && !l.importScripts ? (n = function (t) { l.postMessage(t, "*") }, l.addEventListener("message", j, !1)) : h(v) ? (i = (o = new v).port2, o.port1.onmessage = j, n = c(i.postMessage, i, 1)) : n = b in f("script") ? function (t) { d.appendChild(f("script"))[b] = function () { d.removeChild(this), w.call(t) } } : function (t) { setTimeout(c(w, t, 1), 0) }), e.exports = { set: $, clear: g } }, { "./$": 26, "./$.cof": 9, "./$.ctx": 14, "./$.dom-create": 16, "./$.invoke": 21 }], 41: [function (t, e, r) { e.exports = function (t) { try { return t(), !1 } catch (t) { return !0 } } }, {}], 42: [function (t, e, r) { var n = 0; function o(t) { return "Symbol(".concat(void 0 === t ? "" : t, ")_", (++n + Math.random()).toString(36)) } o.safe = t("./$").g.Symbol || o, e.exports = o }, { "./$": 26 }], 43: [function (t, e, r) { var n = t("./$.wks")("unscopables"); n in [] || t("./$").hide(Array.prototype, n, {}), e.exports = function (t) { [][n][t] = !0 } }, { "./$": 26, "./$.wks": 44 }], 44: [function (e, t, r) { var n = e("./$").g, o = e("./$.shared")("wks"); t.exports = function (t) { return o[t] || (o[t] = n.Symbol && n.Symbol[t] || e("./$.uid").safe("Symbol." + t)) } }, { "./$": 26, "./$.shared": 35, "./$.uid": 42 }], 45: [function (t, e, r) { var u = t("./$"), n = t("./$.dom-create"), a = t("./$.cof"), o = t("./$.def"), f = t("./$.invoke"), i = t("./$.array-methods"), c = t("./$.uid").safe("__proto__"), l = t("./$.assert"), s = l.obj, h = Object.prototype, d = u.html, p = [], $ = p.slice, g = p.join, v = a.classof, y = u.has, m = u.setDesc, b = u.getDesc, w = u.setDescs, j = u.isFunction, S = u.isObject, x = u.toObject, O = u.toLength, E = u.toIndex, k = !1, F = t("./$.array-includes")(!1), P = i(0), D = i(1), I = i(2), A = i(3), _ = i(4); if (!u.DESC) { try { k = 8 == m(n("div"), "x", { get: function () { return 8 } }).x } catch (t) { } u.setDesc = function (t, e, r) { if (k) try { return m(t, e, r) } catch (t) { } if ("get" in r || "set" in r) throw TypeError("Accessors not supported!"); return "value" in r && (s(t)[e] = r.value), t }, u.getDesc = function (t, e) { if (k) try { return b(t, e) } catch (t) { } if (y(t, e)) return u.desc(!h.propertyIsEnumerable.call(t, e), t[e]) }, u.setDescs = w = function (t, e) { s(t); for (var r, n = u.getKeys(e), o = n.length, i = 0; i < o;)u.setDesc(t, r = n[i++], e[r]); return t } } o(o.S + o.F * !u.DESC, "Object", { getOwnPropertyDescriptor: u.getDesc, defineProperty: u.setDesc, defineProperties: w }); var N = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","), L = N.concat("length", "prototype"), M = N.length, T = function () { var t, e = n("iframe"), r = M; for (e.style.display = "none", d.appendChild(e), e.src = "javascript:", (t = e.contentWindow.document).open(), t.write("<script>document.F=Object<\/script>"), t.close(), T = t.F; r--;)delete T.prototype[N[r]]; return T() }; function C(i, s) { return function (t) { var e, r = x(t), n = 0, o = []; for (e in r) e != c && y(r, e) && o.push(e); for (; n < s;)y(r, e = i[n++]) && (~F(o, e) || o.push(e)); return o } } function W() { } o(o.S, "Object", { getPrototypeOf: u.getProto = u.getProto || function (t) { return t = Object(l.def(t)), y(t, c) ? t[c] : j(t.constructor) && t instanceof t.constructor ? t.constructor.prototype : t instanceof Object ? h : null }, getOwnPropertyNames: u.getNames = u.getNames || C(L, L.length), create: u.create = u.create || function (t, e) { var r; return null !== t ? (W.prototype = s(t), r = new W, W.prototype = null, r[c] = t) : r = T(), void 0 === e ? r : w(r, e) }, keys: u.getKeys = u.getKeys || C(N, M), seal: function (t) { return t }, freeze: function (t) { return t }, preventExtensions: function (t) { return t }, isSealed: function (t) { return !S(t) }, isFrozen: function (t) { return !S(t) }, isExtensible: function (t) { return S(t) } }), o(o.P, "Function", { bind: function (o) { var i = l.fn(this), s = $.call(arguments, 1); function c() { var t = s.concat($.call(arguments)), e = this instanceof c, r = e ? u.create(i.prototype) : o, n = f(i, t, r); return e ? r : n } return i.prototype && (c.prototype = i.prototype), c } }), 0 in Object("z") && "z" == "z"[0] || (u.ES5Object = function (t) { return "String" == a(t) ? t.split("") : Object(t) }); var G = !0; try { d && $.call(d), G = !1 } catch (t) { } function R(s) { return function (t, e) { l.fn(t); var r = x(this), n = O(r.length), o = s ? n - 1 : 0, i = s ? -1 : 1; if (arguments.length < 2) for (; ;) { if (o in r) { e = r[o], o += i; break } o += i, l(s ? 0 <= o : o < n, "Reduce of empty array with no initial value") } for (; s ? 0 <= o : o < n; o += i)o in r && (e = t(e, r[o], o, this)); return e } } function z(t) { return 9 < t ? t : "0" + t } o(o.P + o.F * G, "Array", { slice: function (t, e) { var r = O(this.length), n = a(this); if (e = void 0 === e ? r : e, "Array" == n) return $.call(this, t, e); for (var o = E(t, r), i = E(e, r), s = O(i - o), c = Array(s), u = 0; u < s; u++)c[u] = "String" == n ? this.charAt(o + u) : this[o + u]; return c } }), o(o.P + o.F * (u.ES5Object != Object), "Array", { join: function () { return g.apply(u.ES5Object(this), arguments) } }), o(o.S, "Array", { isArray: function (t) { return "Array" == a(t) } }), o(o.P, "Array", { forEach: u.each = u.each || function (t) { return P(this, t, arguments[1]) }, map: function (t) { return D(this, t, arguments[1]) }, filter: function (t) { return I(this, t, arguments[1]) }, some: function (t) { return A(this, t, arguments[1]) }, every: function (t) { return _(this, t, arguments[1]) }, reduce: R(!1), reduceRight: R(!0), indexOf: function (t) { return F(this, t, arguments[1]) }, lastIndexOf: function (t, e) { var r = x(this), n = O(r.length), o = n - 1; for (1 < arguments.length && (o = Math.min(o, u.toInteger(e))), o < 0 && (o = O(n + o)); 0 <= o; o--)if (o in r && r[o] === t) return o; return -1 } }), o(o.P, "String", { trim: t("./$.replacer")(/^\s*([\s\S]*\S)?\s*$/, "$1") }), o(o.S, "Date", { now: function () { return +new Date } }); var U = new Date(-5e13 - 1), K = !(U.toISOString && "0385-07-25T07:06:39.999Z" == U.toISOString() && t("./$.throws")(function () { new Date(NaN).toISOString() })); o(o.P + o.F * K, "Date", { toISOString: function () { if (!isFinite(this)) throw RangeError("Invalid time value"); var t = this, e = t.getUTCFullYear(), r = t.getUTCMilliseconds(), n = e < 0 ? "-" : 9999 < e ? "+" : ""; return n + ("00000" + Math.abs(e)).slice(n ? -6 : -4) + "-" + z(t.getUTCMonth() + 1) + "-" + z(t.getUTCDate()) + "T" + z(t.getUTCHours()) + ":" + z(t.getUTCMinutes()) + ":" + z(t.getUTCSeconds()) + "." + (99 < r ? r : "0" + z(r)) + "Z" } }), "Object" == v(function () { return arguments }()) && (a.classof = function (t) { var e = v(t); return "Object" == e && j(t.callee) ? "Arguments" : e }) }, { "./$": 26, "./$.array-includes": 5, "./$.array-methods": 6, "./$.assert": 7, "./$.cof": 9, "./$.def": 15, "./$.dom-create": 16, "./$.invoke": 21, "./$.replacer": 32, "./$.throws": 41, "./$.uid": 42 }], 46: [function (t, e, r) { "use strict"; var f = t("./$"), n = t("./$.def"), l = f.toIndex; n(n.P, "Array", { copyWithin: function (t, e) { var r = Object(f.assertDefined(this)), n = f.toLength(r.length), o = l(t, n), i = l(e, n), s = arguments[2], c = void 0 === s ? n : l(s, n), u = Math.min(c - i, n - o), a = 1; for (i < o && o < i + u && (a = -1, i = i + u - 1, o = o + u - 1); 0 < u--;)i in r ? r[o] = r[i] : delete r[o], o += a, i += a; return r } }), t("./$.unscope")("copyWithin") }, { "./$": 26, "./$.def": 15, "./$.unscope": 43 }], 47: [function (t, e, r) { "use strict"; var s = t("./$"), n = t("./$.def"), c = s.toIndex; n(n.P, "Array", { fill: function (t) { for (var e = Object(s.assertDefined(this)), r = s.toLength(e.length), n = c(arguments[1], r), o = arguments[2], i = void 0 === o ? r : c(o, r); n < i;)e[n++] = t; return e } }), t("./$.unscope")("fill") }, { "./$": 26, "./$.def": 15, "./$.unscope": 43 }], 48: [function (t, e, r) { "use strict"; var n = "findIndex", o = t("./$.def"), i = !0, s = t("./$.array-methods")(6); n in [] && Array(1)[n](function () { i = !1 }), o(o.P + o.F * i, "Array", { findIndex: function (t) { return s(this, t, arguments[1]) } }), t("./$.unscope")(n) }, { "./$.array-methods": 6, "./$.def": 15, "./$.unscope": 43 }], 49: [function (t, e, r) { "use strict"; var n = "find", o = t("./$.def"), i = !0, s = t("./$.array-methods")(5); n in [] && Array(1)[n](function () { i = !1 }), o(o.P + o.F * i, "Array", { find: function (t) { return s(this, t, arguments[1]) } }), t("./$.unscope")(n) }, { "./$.array-methods": 6, "./$.def": 15, "./$.unscope": 43 }], 50: [function (t, e, r) { var f = t("./$"), l = t("./$.ctx"), n = t("./$.def"), h = t("./$.iter"), d = t("./$.iter-call"); n(n.S + n.F * !t("./$.iter-detect")(function (t) { Array.from(t) }), "Array", { from: function (t) { var e, r, n, o, i = Object(f.assertDefined(t)), s = arguments[1], c = void 0 !== s, u = c ? l(s, arguments[2], 2) : void 0, a = 0; if (h.is(i)) for (o = h.get(i), r = new ("function" == typeof this ? this : Array); !(n = o.next()).done; a++)r[a] = c ? d(o, u, [n.value, a], !0) : n.value; else for (r = new ("function" == typeof this ? this : Array)(e = f.toLength(i.length)); a < e; a++)r[a] = c ? u(i[a], a) : i[a]; return r.length = a, r } }) }, { "./$": 26, "./$.ctx": 14, "./$.def": 15, "./$.iter": 25, "./$.iter-call": 22, "./$.iter-detect": 24 }], 51: [function (t, e, r) { var n = t("./$"), o = t("./$.unscope"), i = t("./$.uid").safe("iter"), s = t("./$.iter"), c = s.step, u = s.Iterators; t("./$.iter-define")(Array, "Array", function (t, e) { n.set(this, i, { o: n.toObject(t), i: 0, k: e }) }, function () { var t = this[i], e = t.o, r = t.k, n = t.i++; return !e || n >= e.length ? (t.o = void 0, c(1)) : c(0, "keys" == r ? n : "values" == r ? e[n] : [n, e[n]]) }, "values"), u.Arguments = u.Array, o("keys"), o("values"), o("entries") }, { "./$": 26, "./$.iter": 25, "./$.iter-define": 23, "./$.uid": 42, "./$.unscope": 43 }], 52: [function (t, e, r) { var n = t("./$.def"); n(n.S, "Array", { of: function () { for (var t = 0, e = arguments.length, r = new ("function" == typeof this ? this : Array)(e); t < e;)r[t] = arguments[t++]; return r.length = e, r } }) }, { "./$.def": 15 }], 53: [function (t, e, r) { t("./$.species")(Array) }, { "./$.species": 36 }], 54: [function (t, e, r) { var n = t("./$"), o = t("./$.wks")("hasInstance"), i = Function.prototype; o in i || n.setDesc(i, o, { value: function (t) { if (!n.isFunction(this) || !n.isObject(t)) return !1; if (!n.isObject(this.prototype)) return t instanceof this; for (; t = n.getProto(t);)if (this.prototype === t) return !0; return !1 } }) }, { "./$": 26, "./$.wks": 44 }], 55: [function (t, e, r) { "use strict"; var n = t("./$"), o = "name", i = n.setDesc, s = Function.prototype; o in s || n.FW && n.DESC && i(s, o, { configurable: !0, get: function () { var t = String(this).match(/^\s*function ([^ (]*)/), e = t ? t[1] : ""; return n.has(this, o) || i(this, o, n.desc(5, e)), e }, set: function (t) { n.has(this, o) || i(this, o, n.desc(0, t)) } }) }, { "./$": 26 }], 56: [function (t, e, r) { "use strict"; var n = t("./$.collection-strong"); t("./$.collection")("Map", function (t) { return function () { return t(this, arguments[0]) } }, { get: function (t) { var e = n.getEntry(this, t); return e && e.v }, set: function (t, e) { return n.def(this, 0 === t ? 0 : t, e) } }, n, !0) }, { "./$.collection": 13, "./$.collection-strong": 10 }], 57: [function (t, e, r) { var n = t("./$.def"), o = Math.E, i = Math.pow, u = Math.abs, s = Math.exp, c = Math.log, a = Math.sqrt, f = Math.ceil, l = Math.floor, h = i(2, -52), d = i(2, -23), p = i(2, 127) * (2 - d), $ = i(2, -126); function g(t) { return 0 == (t = +t) || t != t ? t : t < 0 ? -1 : 1 } function v(t) { return 0 == (t = +t) ? t : -1e-6 < t && t < 1e-6 ? t + t * t / 2 : s(t) - 1 } n(n.S, "Math", { acosh: function (t) { return (t = +t) < 1 ? NaN : isFinite(t) ? c(t / o + a(t + 1) * a(t - 1) / o) + 1 : t }, asinh: function t(e) { return isFinite(e = +e) && 0 != e ? e < 0 ? -t(-e) : c(e + a(e * e + 1)) : e }, atanh: function (t) { return 0 == (t = +t) ? t : c((1 + t) / (1 - t)) / 2 }, cbrt: function (t) { return g(t = +t) * i(u(t), 1 / 3) }, clz32: function (t) { return (t >>>= 0) ? 31 - l(c(t + .5) * Math.LOG2E) : 32 }, cosh: function (t) { return (s(t = +t) + s(-t)) / 2 }, expm1: v, fround: function (t) { var e, r, n = u(t), o = g(t); return n < $ ? o * (n / $ / d + 1 / h - 1 / h) * $ * d : (r = (e = (1 + d / h) * n) - (e - n)) > p || r != r ? o * (1 / 0) : o * r }, hypot: function (t, e) { for (var r, n, o = 0, i = 0, s = arguments.length, c = 0; i < s;)c < (r = u(arguments[i++])) ? (o = o * (n = c / r) * n + 1, c = r) : o += 0 < r ? (n = r / c) * n : r; return c === 1 / 0 ? 1 / 0 : c * a(o) }, imul: function (t, e) { var r = 65535, n = +t, o = +e, i = r & n, s = r & o; return 0 | i * s + ((r & n >>> 16) * s + i * (r & o >>> 16) << 16 >>> 0) }, log1p: function (t) { return -1e-8 < (t = +t) && t < 1e-8 ? t - t * t / 2 : c(1 + t) }, log10: function (t) { return c(t) / Math.LN10 }, log2: function (t) { return c(t) / Math.LN2 }, sign: g, sinh: function (t) { return u(t = +t) < 1 ? (v(t) - v(-t)) / 2 : (s(t - 1) - s(-t - 1)) * (o / 2) }, tanh: function (t) { var e = v(t = +t), r = v(-t); return e == 1 / 0 ? 1 : r == 1 / 0 ? -1 : (e - r) / (s(t) + s(-t)) }, trunc: function (t) { return (0 < t ? l : f)(t) } }) }, { "./$.def": 15 }], 58: [function (t, e, r) { "use strict"; var n = t("./$"), o = n.isObject, i = n.isFunction, s = n.g.Number, c = s, u = s.prototype; function a(t) { if (o(t) && (t = function (t) { var e, r; if (i(e = t.valueOf) && !o(r = e.call(t))) return r; if (i(e = t.toString) && !o(r = e.call(t))) return r; throw TypeError("Can't convert object to number") }(t)), "string" == typeof t && 2 < t.length && 48 == t.charCodeAt(0)) { var e = !1; switch (t.charCodeAt(1)) { case 66: case 98: e = !0; case 79: case 111: return parseInt(t.slice(2), e ? 2 : 8) } } return +t } !n.FW || s("0o1") && s("0b1") || (s = function (t) { return this instanceof s ? new c(a(t)) : a(t) }, n.each.call(n.DESC ? n.getNames(c) : "MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","), function (t) { n.has(c, t) && !n.has(s, t) && n.setDesc(s, t, n.getDesc(c, t)) }), (s.prototype = u).constructor = s, t("./$.redef")(n.g, "Number", s)) }, { "./$": 26, "./$.redef": 31 }], 59: [function (t, e, r) { var n = t("./$"), o = t("./$.def"), i = Math.abs, s = Math.floor, c = n.g.isFinite, u = 9007199254740991; function a(t) { return !n.isObject(t) && c(t) && s(t) === t } o(o.S, "Number", { EPSILON: Math.pow(2, -52), isFinite: function (t) { return "number" == typeof t && c(t) }, isInteger: a, isNaN: function (t) { return t != t }, isSafeInteger: function (t) { return a(t) && i(t) <= u }, MAX_SAFE_INTEGER: u, MIN_SAFE_INTEGER: -u, parseFloat: parseFloat, parseInt: parseInt }) }, { "./$": 26, "./$.def": 15 }], 60: [function (t, e, r) { var n = t("./$.def"); n(n.S, "Object", { assign: t("./$.assign") }) }, { "./$.assign": 8, "./$.def": 15 }], 61: [function (t, e, r) { var n = t("./$.def"); n(n.S, "Object", { is: t("./$.same") }) }, { "./$.def": 15, "./$.same": 33 }], 62: [function (t, e, r) { var n = t("./$.def"); n(n.S, "Object", { setPrototypeOf: t("./$.set-proto").set }) }, { "./$.def": 15, "./$.set-proto": 34 }], 63: [function (i, t, e) { var s = i("./$"), c = i("./$.def"), u = s.isObject, a = s.toObject; s.each.call("freeze,seal,preventExtensions,isFrozen,isSealed,isExtensible,getOwnPropertyDescriptor,getPrototypeOf,keys,getOwnPropertyNames".split(","), function (t, e) { var r = (s.core.Object || {})[t] || Object[t], n = 0, o = {}; o[t] = 0 == e ? function (t) { return u(t) ? r(t) : t } : 1 == e ? function (t) { return u(t) ? r(t) : t } : 2 == e ? function (t) { return u(t) ? r(t) : t } : 3 == e ? function (t) { return !u(t) || r(t) } : 4 == e ? function (t) { return !u(t) || r(t) } : 5 == e ? function (t) { return !!u(t) && r(t) } : 6 == e ? function (t, e) { return r(a(t), e) } : 7 == e ? function (t) { return r(Object(s.assertDefined(t))) } : 8 == e ? function (t) { return r(a(t)) } : i("./$.get-names").get; try { r("z") } catch (t) { n = 1 } c(c.S + c.F * n, "Object", o) }) }, { "./$": 26, "./$.def": 15, "./$.get-names": 20 }], 64: [function (t, e, r) { "use strict"; var n = t("./$.cof"), o = {}; o[t("./$.wks")("toStringTag")] = "z", t("./$").FW && "z" != n(o) && t("./$.redef")(Object.prototype, "toString", function () { return "[object " + n.classof(this) + "]" }, !0) }, { "./$": 26, "./$.cof": 9, "./$.redef": 31, "./$.wks": 44 }], 65: [function (t, e, r) { "use strict"; var n, c = t("./$"), o = t("./$.ctx"), i = t("./$.cof"), s = t("./$.def"), u = t("./$.assert"), a = t("./$.for-of"), f = t("./$.set-proto").set, l = t("./$.same"), h = t("./$.species"), d = t("./$.wks")("species"), p = t("./$.uid").safe("record"), $ = "Promise", g = c.g, v = g.process, y = "process" == i(v), m = v && v.nextTick || t("./$.task").set, b = g[$], w = c.isFunction, j = c.isObject, S = u.fn, x = u.obj; function O(t) { var e = new b(function () { }); return t && (e.constructor = Object), b.resolve(e) === e } var E = function () { var t = !1; function r(t) { var e = new b(t); return f(e, r.prototype), e } try { if (t = w(b) && w(b.resolve) && O(), f(r, b), r.prototype = c.create(b.prototype, { constructor: { value: r } }), r.resolve(5).then(function () { }) instanceof r || (t = !1), t && c.DESC) { var e = !1; b.resolve(c.setDesc({}, "then", { get: function () { e = !0 } })), t = e } } catch (r) { t = !1 } return t }(); function k(t) { var e = x(t)[d]; return null != e ? e : t } function F(t) { var e; return j(t) && (e = t.then), !!w(e) && e } function P(s) { var r = s.c; r.length && m.call(g, function () { var o = s.v, i = 1 == s.s, t = 0; function e(e) { var t, r, n = i ? e.ok : e.fail; try { n ? (i || (s.h = !0), (t = !0 === n ? o : n(o)) === e.P ? e.rej(TypeError("Promise-chain cycle")) : (r = F(t)) ? r.call(t, e.res, e.rej) : e.res(t)) : e.rej(o) } catch (t) { e.rej(t) } } for (; r.length > t;)e(r[t++]); r.length = 0 }) } function D(t) { var e, r = this; r.d || (r.d = !0, (r = r.r || r).v = t, r.s = 2, r.a = r.c.slice(), setTimeout(function () { m.call(g, function () { (function t(e) { var r, n = e[p], o = n.a || n.c, i = 0; if (n.h) return !1; for (; o.length > i;)if ((r = o[i++]).fail || !t(r.P)) return !1; return !0 })(e = r.p) && (y ? v.emit("unhandledRejection", t, e) : g.console && console.error && console.error("Unhandled promise rejection", t)), r.a = void 0 }) }, 1), P(r)) } function I(t) { var r, n = this; if (!n.d) { n.d = !0, n = n.r || n; try { (r = F(t)) ? m.call(g, function () { var e = { r: n, d: !1 }; try { r.call(t, o(I, e, 1), o(D, e, 1)) } catch (t) { D.call(e, t) } }) : (n.v = t, n.s = 1, P(n)) } catch (t) { D.call({ r: n, d: !1 }, t) } } } E || (b = function (t) { S(t); var e = { p: u.inst(this, b, $), c: [], a: void 0, s: 0, d: !1, v: void 0, h: !1 }; c.hide(this, p, e); try { t(o(I, e, 1), o(D, e, 1)) } catch (t) { D.call(e, t) } }, t("./$.mix")(b.prototype, { then: function (t, e) { var r = x(x(this).constructor)[d], n = { ok: !w(t) || t, fail: !!w(e) && e }, o = n.P = new (null != r ? r : b)(function (t, e) { n.res = S(t), n.rej = S(e) }), i = this[p]; return i.c.push(n), i.a && i.a.push(n), i.s && P(i), o }, catch: function (t) { return this.then(void 0, t) } })), s(s.G + s.W + s.F * !E, { Promise: b }), i.set(b, $), h(b), h(n = c.core[$]), s(s.S + s.F * !E, $, { reject: function (r) { return new (k(this))(function (t, e) { e(r) }) } }), s(s.S + s.F * (!E || O(!0)), $, { resolve: function (e) { return j(r = e) && (E ? "Promise" == i.classof(r) : p in r) && (t = e.constructor, this, !c.FW && t === b && this === n || l(t, this)) ? e : new this(function (t) { t(e) }); var t, r } }), s(s.S + s.F * !(E && t("./$.iter-detect")(function (t) { b.all(t).catch(function () { }) })), $, { all: function (t) { var s = k(this), e = []; return new s(function (r, n) { a(t, !1, e.push, e); var o = e.length, i = Array(o); o ? c.each.call(e, function (t, e) { s.resolve(t).then(function (t) { i[e] = t, --o || r(i) }, n) }) : r(i) }) }, race: function (t) { var n = k(this); return new n(function (e, r) { a(t, !1, function (t) { n.resolve(t).then(e, r) }) }) } }) }, { "./$": 26, "./$.assert": 7, "./$.cof": 9, "./$.ctx": 14, "./$.def": 15, "./$.for-of": 18, "./$.iter-detect": 24, "./$.mix": 28, "./$.same": 33, "./$.set-proto": 34, "./$.species": 36, "./$.task": 40, "./$.uid": 42, "./$.wks": 44 }], 66: [function (t, e, r) { var u = t("./$"), n = t("./$.def"), o = t("./$.set-proto"), i = t("./$.iter"), s = t("./$.wks")("iterator"), c = t("./$.uid").safe("iter"), a = i.step, f = t("./$.assert"), l = u.isObject, h = u.getProto, d = u.g.Reflect, p = Function.apply, $ = f.obj, g = Object.isExtensible || l, v = Object.preventExtensions, y = !(d && d.enumerate && s in d.enumerate({})); function m(t) { u.set(this, c, { o: t, k: void 0, i: 0 }) } i.create(m, "Object", function () { var t, e = this[c], r = e.k; if (null == r) for (t in e.k = r = [], e.o) r.push(t); do { if (e.i >= r.length) return a(1) } while (!((t = r[e.i++]) in e.o)); return a(0, t) }); var b = { apply: function (t, e, r) { return p.call(t, e, r) }, construct: function (t, e) { var r = f.fn(arguments.length < 3 ? t : arguments[2]).prototype, n = u.create(l(r) ? r : Object.prototype), o = p.call(t, n, e); return l(o) ? o : n }, defineProperty: function (t, e, r) { $(t); try { return u.setDesc(t, e, r), !0 } catch (t) { return !1 } }, deleteProperty: function (t, e) { var r = u.getDesc($(t), e); return !(r && !r.configurable) && delete t[e] }, get: function t(e, r) { var n, o = arguments.length < 3 ? e : arguments[2], i = u.getDesc($(e), r); return i ? u.has(i, "value") ? i.value : void 0 === i.get ? void 0 : i.get.call(o) : l(n = h(e)) ? t(n, r, o) : void 0 }, getOwnPropertyDescriptor: function (t, e) { return u.getDesc($(t), e) }, getPrototypeOf: function (t) { return h($(t)) }, has: function (t, e) { return e in t }, isExtensible: function (t) { return g($(t)) }, ownKeys: t("./$.own-keys"), preventExtensions: function (t) { $(t); try { return v && v(t), !0 } catch (t) { return !1 } }, set: function t(e, r, n) { var o, i, s = arguments.length < 4 ? e : arguments[3], c = u.getDesc($(e), r); if (!c) { if (l(i = h(e))) return t(i, r, n, s); c = u.desc(0) } return u.has(c, "value") ? !(!1 === c.writable || !l(s) || ((o = u.getDesc(s, r) || u.desc(0)).value = n, u.setDesc(s, r, o), 0)) : void 0 !== c.set && (c.set.call(s, n), !0) } }; o && (b.setPrototypeOf = function (t, e) { o.check(t, e); try { return o.set(t, e), !0 } catch (t) { return !1 } }), n(n.G, { Reflect: {} }), n(n.S + n.F * y, "Reflect", { enumerate: function (t) { return new m($(t)) } }), n(n.S, "Reflect", b) }, { "./$": 26, "./$.assert": 7, "./$.def": 15, "./$.iter": 25, "./$.own-keys": 29, "./$.set-proto": 34, "./$.uid": 42, "./$.wks": 44 }], 67: [function (t, e, r) { var n = t("./$"), o = t("./$.cof"), i = n.g.RegExp, s = i, c = i.prototype, u = /a/g, a = new i(u) !== u, f = function () { try { return "/a/i" == i(u, "i") } catch (t) { } }(); n.FW && n.DESC && (a && f || (i = function (t, e) { var r = "RegExp" == o(t), n = void 0 === e; return this instanceof i || !r || !n ? a ? new s(r && !n ? t.source : t, e) : new s(r ? t.source : t, r && n ? t.flags : e) : t }, n.each.call(n.getNames(s), function (e) { e in i || n.setDesc(i, e, { configurable: !0, get: function () { return s[e] }, set: function (t) { s[e] = t } }) }), (c.constructor = i).prototype = c, t("./$.redef")(n.g, "RegExp", i)), "g" != /./g.flags && n.setDesc(c, "flags", { configurable: !0, get: t("./$.replacer")(/^.*\/(\w*)$/, "$1") })), t("./$.species")(i) }, { "./$": 26, "./$.cof": 9, "./$.redef": 31, "./$.replacer": 32, "./$.species": 36 }], 68: [function (t, e, r) { "use strict"; var n = t("./$.collection-strong"); t("./$.collection")("Set", function (t) { return function () { return t(this, arguments[0]) } }, { add: function (t) { return n.def(this, t = 0 === t ? 0 : t, t) } }, n) }, { "./$.collection": 13, "./$.collection-strong": 10 }], 69: [function (t, e, r) { "use strict"; var n = t("./$.def"), o = t("./$.string-at")(!1); n(n.P, "String", { codePointAt: function (t) { return o(this, t) } }) }, { "./$.def": 15, "./$.string-at": 37 }], 70: [function (t, e, r) { "use strict"; var i = t("./$"), s = t("./$.cof"), n = t("./$.def"), c = i.toLength; n(n.P + n.F * !t("./$.throws")(function () { "q".endsWith(/./) }), "String", { endsWith: function (t) { if ("RegExp" == s(t)) throw TypeError(); var e = String(i.assertDefined(this)), r = arguments[1], n = c(e.length), o = void 0 === r ? n : Math.min(c(r), n); return t += "", e.slice(o - t.length, o) === t } }) }, { "./$": 26, "./$.cof": 9, "./$.def": 15, "./$.throws": 41 }], 71: [function (t, e, r) { var n = t("./$.def"), i = t("./$").toIndex, s = String.fromCharCode, o = String.fromCodePoint; n(n.S + n.F * (!!o && 1 != o.length), "String", { fromCodePoint: function (t) { for (var e, r = [], n = arguments.length, o = 0; o < n;) { if (e = +arguments[o++], i(e, 1114111) !== e) throw RangeError(e + " is not a valid code point"); r.push(e < 65536 ? s(e) : s(55296 + ((e -= 65536) >> 10), e % 1024 + 56320)) } return r.join("") } }) }, { "./$": 26, "./$.def": 15 }], 72: [function (t, e, r) { "use strict"; var n = t("./$"), o = t("./$.cof"), i = t("./$.def"); i(i.P, "String", { includes: function (t) { if ("RegExp" == o(t)) throw TypeError(); return !!~String(n.assertDefined(this)).indexOf(t, arguments[1]) } }) }, { "./$": 26, "./$.cof": 9, "./$.def": 15 }], 73: [function (t, e, r) { var n = t("./$").set, o = t("./$.string-at")(!0), i = t("./$.uid").safe("iter"), s = t("./$.iter").step; t("./$.iter-define")(String, "String", function (t) { n(this, i, { o: String(t), i: 0 }) }, function () { var t, e = this[i], r = e.o, n = e.i; return n >= r.length ? s(1) : (t = o(r, n), e.i += t.length, s(0, t)) }) }, { "./$": 26, "./$.iter": 25, "./$.iter-define": 23, "./$.string-at": 37, "./$.uid": 42 }], 74: [function (t, e, r) { var s = t("./$"), n = t("./$.def"); n(n.S, "String", { raw: function (t) { for (var e = s.toObject(t.raw), r = s.toLength(e.length), n = arguments.length, o = [], i = 0; i < r;)o.push(String(e[i++])), i < n && o.push(String(arguments[i])); return o.join("") } }) }, { "./$": 26, "./$.def": 15 }], 75: [function (t, e, r) { var n = t("./$.def"); n(n.P, "String", { repeat: t("./$.string-repeat") }) }, { "./$.def": 15, "./$.string-repeat": 39 }], 76: [function (t, e, r) { "use strict"; var n = t("./$"), o = t("./$.cof"), i = t("./$.def"); i(i.P + i.F * !t("./$.throws")(function () { "q".startsWith(/./) }), "String", { startsWith: function (t) { if ("RegExp" == o(t)) throw TypeError(); var e = String(n.assertDefined(this)), r = n.toLength(Math.min(arguments[1], e.length)); return t += "", e.slice(r, r + t.length) === t } }) }, { "./$": 26, "./$.cof": 9, "./$.def": 15, "./$.throws": 41 }], 77: [function (r, t, e) { "use strict"; var n = r("./$"), o = r("./$.cof").set, i = r("./$.uid"), s = r("./$.shared"), c = r("./$.def"), u = r("./$.redef"), a = r("./$.keyof"), f = r("./$.enum-keys"), l = r("./$.assert").obj, h = Object.prototype, d = n.DESC, p = n.has, $ = n.create, g = n.getDesc, v = n.setDesc, y = n.desc, m = r("./$.get-names"), b = m.get, w = n.toObject, j = n.g.Symbol, S = !1, x = i("tag"), O = i("hidden"), E = {}.propertyIsEnumerable, k = s("symbol-registry"), F = s("symbols"), P = n.isFunction(j), D = d ? function () { try { return $(v({}, O, { get: function () { return v(this, O, { value: !1 })[O] } }))[O] || v } catch (t) { return function (t, e, r) { var n = g(h, e); n && delete h[e], v(t, e, r), n && t !== h && v(h, e, n) } } }() : v; function I(e) { var t = F[e] = n.set($(j.prototype), x, e); return d && S && D(h, e, { configurable: !0, set: function (t) { p(this, O) && p(this[O], e) && (this[O][e] = !1), D(this, e, y(1, t)) } }), t } function A(t, e, r) { return r && p(F, e) ? (r.enumerable ? (p(t, O) && t[O][e] && (t[O][e] = !1), r = $(r, { enumerable: y(0, !1) })) : (p(t, O) || v(t, O, y(1, {})), t[O][e] = !0), D(t, e, r)) : v(t, e, r) } function _(t, e) { l(t); for (var r, n = f(e = w(e)), o = 0, i = n.length; o < i;)A(t, r = n[o++], e[r]); return t } function N(t, e) { return void 0 === e ? $(t) : _($(t), e) } function L(t, e) { var r = g(t = w(t), e); return !r || !p(F, e) || p(t, O) && t[O][e] || (r.enumerable = !0), r } function M(t) { for (var e, r = b(w(t)), n = [], o = 0; r.length > o;)p(F, e = r[o++]) || e == O || n.push(e); return n } function T(t) { for (var e, r = b(w(t)), n = [], o = 0; r.length > o;)p(F, e = r[o++]) && n.push(F[e]); return n } P || (u((j = function () { if (this instanceof j) throw TypeError("Symbol is not a constructor"); return I(i(arguments[0])) }).prototype, "toString", function () { return this[x] }), n.create = N, n.setDesc = A, n.getDesc = L, n.setDescs = _, n.getNames = m.get = M, n.getSymbols = T, n.DESC && n.FW && u(h, "propertyIsEnumerable", function (t) { var e = E.call(this, t); return !(e || !p(this, t) || !p(F, t) || p(this, O) && this[O][t]) || e }, !0)); var C = { for: function (t) { return p(k, t += "") ? k[t] : k[t] = j(t) }, keyFor: function (t) { return a(k, t) }, useSetter: function () { S = !0 }, useSimple: function () { S = !1 } }; n.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), function (t) { var e = r("./$.wks")(t); C[t] = P ? e : I(e) }), S = !0, c(c.G + c.W, { Symbol: j }), c(c.S, "Symbol", C), c(c.S + c.F * !P, "Object", { create: N, defineProperty: A, defineProperties: _, getOwnPropertyDescriptor: L, getOwnPropertyNames: M, getOwnPropertySymbols: T }), o(j, "Symbol"), o(Math, "Math", !0), o(n.g.JSON, "JSON", !0) }, { "./$": 26, "./$.assert": 7, "./$.cof": 9, "./$.def": 15, "./$.enum-keys": 17, "./$.get-names": 20, "./$.keyof": 27, "./$.redef": 31, "./$.shared": 35, "./$.uid": 42, "./$.wks": 44 }], 78: [function (e, t, r) { "use strict"; var n = e("./$"), o = e("./$.collection-weak"), i = o.leakStore, s = o.ID, c = o.WEAK, u = n.has, a = n.isObject, f = Object.isExtensible || a, l = {}, h = e("./$.collection")("WeakMap", function (t) { return function () { return t(this, arguments[0]) } }, { get: function (t) { if (a(t)) { if (!f(t)) return i(this).get(t); if (u(t, c)) return t[c][this[s]] } }, set: function (t, e) { return o.def(this, t, e) } }, o, !0, !0); 7 != (new h).set((Object.freeze || Object)(l), 7).get(l) && n.each.call(["delete", "has", "get", "set"], function (n) { var t = h.prototype, o = t[n]; e("./$.redef")(t, n, function (t, e) { if (a(t) && !f(t)) { var r = i(this)[n](t, e); return "set" == n ? this : r } return o.call(this, t, e) }) }) }, { "./$": 26, "./$.collection": 13, "./$.collection-weak": 12, "./$.redef": 31 }], 79: [function (t, e, r) { "use strict"; var n = t("./$.collection-weak"); t("./$.collection")("WeakSet", function (t) { return function () { return t(this, arguments[0]) } }, { add: function (t) { return n.def(this, t, !0) } }, n, !1, !0) }, { "./$.collection": 13, "./$.collection-weak": 12 }], 80: [function (t, e, r) { "use strict"; var n = t("./$.def"), o = t("./$.array-includes")(!0); n(n.P, "Array", { includes: function (t) { return o(this, t, arguments[1]) } }), t("./$.unscope")("includes") }, { "./$.array-includes": 5, "./$.def": 15, "./$.unscope": 43 }], 81: [function (t, e, r) { t("./$.collection-to-json")("Map") }, { "./$.collection-to-json": 11 }], 82: [function (t, e, r) { var n = t("./$"), o = t("./$.def"), i = t("./$.own-keys"); o(o.S, "Object", { getOwnPropertyDescriptors: function (t) { var e = n.toObject(t), r = {}; return n.each.call(i(e), function (t) { n.setDesc(r, t, n.desc(0, n.getDesc(e, t))) }), r } }) }, { "./$": 26, "./$.def": 15, "./$.own-keys": 29 }], 83: [function (t, e, r) { var u = t("./$"), n = t("./$.def"); function o(c) { return function (t) { var e, r = u.toObject(t), n = u.getKeys(r), o = n.length, i = 0, s = Array(o); if (c) for (; i < o;)s[i] = [e = n[i++], r[e]]; else for (; i < o;)s[i] = r[n[i++]]; return s } } n(n.S, "Object", { values: o(!1), entries: o(!0) }) }, { "./$": 26, "./$.def": 15 }], 84: [function (t, e, r) { var n = t("./$.def"); n(n.S, "RegExp", { escape: t("./$.replacer")(/[\\^$*+?.()|[\]{}]/g, "\\$&", !0) }) }, { "./$.def": 15, "./$.replacer": 32 }], 85: [function (t, e, r) { t("./$.collection-to-json")("Set") }, { "./$.collection-to-json": 11 }], 86: [function (t, e, r) { "use strict"; var n = t("./$.def"), o = t("./$.string-at")(!0); n(n.P, "String", { at: function (t) { return o(this, t) } }) }, { "./$.def": 15, "./$.string-at": 37 }], 87: [function (t, e, r) { "use strict"; var n = t("./$.def"), o = t("./$.string-pad"); n(n.P, "String", { lpad: function (t) { return o(this, t, arguments[1], !0) } }) }, { "./$.def": 15, "./$.string-pad": 38 }], 88: [function (t, e, r) { "use strict"; var n = t("./$.def"), o = t("./$.string-pad"); n(n.P, "String", { rpad: function (t) { return o(this, t, arguments[1], !1) } }) }, { "./$.def": 15, "./$.string-pad": 38 }], 89: [function (r, t, e) { var n = r("./$"), o = r("./$.def"), i = n.core.Array || Array, s = {}; function c(t, e) { n.each.call(t.split(","), function (t) { null == e && t in i ? s[t] = i[t] : t in [] && (s[t] = r("./$.ctx")(Function.call, [][t], e)) }) } c("pop,reverse,shift,keys,values,entries", 1), c("indexOf,every,some,forEach,map,filter,find,findIndex,includes", 3), c("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill,turn"), o(o.S, "Array", s) }, { "./$": 26, "./$.ctx": 14, "./$.def": 15 }], 90: [function (t, e, r) { t("./es6.array.iterator"); var n = t("./$"), o = t("./$.iter").Iterators, i = t("./$.wks")("iterator"), s = o.Array, c = n.g.NodeList, u = n.g.HTMLCollection, a = c && c.prototype, f = u && u.prototype; n.FW && (!c || i in a || n.hide(a, i, s), !u || i in f || n.hide(f, i, s)), o.NodeList = o.HTMLCollection = s }, { "./$": 26, "./$.iter": 25, "./$.wks": 44, "./es6.array.iterator": 51 }], 91: [function (t, e, r) { var n = t("./$.def"), o = t("./$.task"); n(n.G + n.B, { setImmediate: o.set, clearImmediate: o.clear }) }, { "./$.def": 15, "./$.task": 40 }], 92: [function (t, e, r) { var n = t("./$"), o = t("./$.def"), i = t("./$.invoke"), s = t("./$.partial"), c = n.g.navigator, u = !!c && /MSIE .\./.test(c.userAgent); function a(r) { return u ? function (t, e) { return r(i(s, [].slice.call(arguments, 2), n.isFunction(t) ? t : Function(t)), e) } : r } o(o.G + o.B + o.F * u, { setTimeout: a(n.g.setTimeout), setInterval: a(n.g.setInterval) }) }, { "./$": 26, "./$.def": 15, "./$.invoke": 21, "./$.partial": 30 }], 93: [function (t, e, r) { t("./modules/es5"), t("./modules/es6.symbol"), t("./modules/es6.object.assign"), t("./modules/es6.object.is"), t("./modules/es6.object.set-prototype-of"), t("./modules/es6.object.to-string"), t("./modules/es6.object.statics-accept-primitives"), t("./modules/es6.function.name"), t("./modules/es6.function.has-instance"), t("./modules/es6.number.constructor"), t("./modules/es6.number.statics"), t("./modules/es6.math"), t("./modules/es6.string.from-code-point"), t("./modules/es6.string.raw"), t("./modules/es6.string.iterator"), t("./modules/es6.string.code-point-at"), t("./modules/es6.string.ends-with"), t("./modules/es6.string.includes"), t("./modules/es6.string.repeat"), t("./modules/es6.string.starts-with"), t("./modules/es6.array.from"), t("./modules/es6.array.of"), t("./modules/es6.array.iterator"), t("./modules/es6.array.species"), t("./modules/es6.array.copy-within"), t("./modules/es6.array.fill"), t("./modules/es6.array.find"), t("./modules/es6.array.find-index"), t("./modules/es6.regexp"), t("./modules/es6.promise"), t("./modules/es6.map"), t("./modules/es6.set"), t("./modules/es6.weak-map"), t("./modules/es6.weak-set"), t("./modules/es6.reflect"), t("./modules/es7.array.includes"), t("./modules/es7.string.at"), t("./modules/es7.string.lpad"), t("./modules/es7.string.rpad"), t("./modules/es7.regexp.escape"), t("./modules/es7.object.get-own-property-descriptors"), t("./modules/es7.object.to-array"), t("./modules/es7.map.to-json"), t("./modules/es7.set.to-json"), t("./modules/js.array.statics"), t("./modules/web.timers"), t("./modules/web.immediate"), t("./modules/web.dom.iterable"), e.exports = t("./modules/$").core }, { "./modules/$": 26, "./modules/es5": 45, "./modules/es6.array.copy-within": 46, "./modules/es6.array.fill": 47, "./modules/es6.array.find": 49, "./modules/es6.array.find-index": 48, "./modules/es6.array.from": 50, "./modules/es6.array.iterator": 51, "./modules/es6.array.of": 52, "./modules/es6.array.species": 53, "./modules/es6.function.has-instance": 54, "./modules/es6.function.name": 55, "./modules/es6.map": 56, "./modules/es6.math": 57, "./modules/es6.number.constructor": 58, "./modules/es6.number.statics": 59, "./modules/es6.object.assign": 60, "./modules/es6.object.is": 61, "./modules/es6.object.set-prototype-of": 62, "./modules/es6.object.statics-accept-primitives": 63, "./modules/es6.object.to-string": 64, "./modules/es6.promise": 65, "./modules/es6.reflect": 66, "./modules/es6.regexp": 67, "./modules/es6.set": 68, "./modules/es6.string.code-point-at": 69, "./modules/es6.string.ends-with": 70, "./modules/es6.string.from-code-point": 71, "./modules/es6.string.includes": 72, "./modules/es6.string.iterator": 73, "./modules/es6.string.raw": 74, "./modules/es6.string.repeat": 75, "./modules/es6.string.starts-with": 76, "./modules/es6.symbol": 77, "./modules/es6.weak-map": 78, "./modules/es6.weak-set": 79, "./modules/es7.array.includes": 80, "./modules/es7.map.to-json": 81, "./modules/es7.object.get-own-property-descriptors": 82, "./modules/es7.object.to-array": 83, "./modules/es7.regexp.escape": 84, "./modules/es7.set.to-json": 85, "./modules/es7.string.at": 86, "./modules/es7.string.lpad": 87, "./modules/es7.string.rpad": 88, "./modules/js.array.statics": 89, "./modules/web.dom.iterable": 90, "./modules/web.immediate": 91, "./modules/web.timers": 92 }], 94: [function (t, E, e) { (function (O, t) { !function (t) { "use strict"; var f, u = Object.prototype.hasOwnProperty, o = "function" == typeof Symbol && Symbol.iterator || "@@iterator", e = "object" == typeof E, i = t.regeneratorRuntime; if (i) e && (E.exports = i); else { (i = t.regeneratorRuntime = e ? E.exports : {}).wrap = s; var l = "suspendedStart", h = "suspendedYield", d = "executing", p = "completed", $ = {}, r = c.prototype = v.prototype; n.prototype = r.constructor = c, (c.constructor = n).displayName = "GeneratorFunction", i.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === n || "GeneratorFunction" === (e.displayName || e.name)) }, i.mark = function (t) { return t.__proto__ = c, t.prototype = Object.create(r), t }, i.awrap = function (t) { return new y(t) }, a(m.prototype), i.async = function (t, e, r, n) { var o = new m(s(t, e, r, n)); return i.isGeneratorFunction(e) ? o : o.next().then(function (t) { return t.done ? t.value : o.next() }) }, a(r), r[o] = function () { return this }, r.toString = function () { return "[object Generator]" }, i.keys = function (r) { var n = []; for (var t in r) n.push(t); return n.reverse(), function t() { for (; n.length;) { var e = n.pop(); if (e in r) return t.value = e, t.done = !1, t } return t.done = !0, t } }, i.values = S, j.prototype = { constructor: j, reset: function () { this.prev = 0, this.next = 0, this.sent = f, this.done = !1, this.delegate = null, this.tryEntries.forEach(w); for (var t, e = 0; u.call(this, t = "t" + e) || e < 20; ++e)this[t] = null }, stop: function () { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval }, dispatchException: function (r) { if (this.done) throw r; var n = this; function t(t, e) { return i.type = "throw", i.arg = r, n.next = t, !!e } for (var e = this.tryEntries.length - 1; 0 <= e; --e) { var o = this.tryEntries[e], i = o.completion; if ("root" === o.tryLoc) return t("end"); if (o.tryLoc <= this.prev) { var s = u.call(o, "catchLoc"), c = u.call(o, "finallyLoc"); if (s && c) { if (this.prev < o.catchLoc) return t(o.catchLoc, !0); if (this.prev < o.finallyLoc) return t(o.finallyLoc) } else if (s) { if (this.prev < o.catchLoc) return t(o.catchLoc, !0) } else { if (!c) throw new Error("try statement without catch or finally"); if (this.prev < o.finallyLoc) return t(o.finallyLoc) } } } }, abrupt: function (t, e) { for (var r = this.tryEntries.length - 1; 0 <= r; --r) { var n = this.tryEntries[r]; if (n.tryLoc <= this.prev && u.call(n, "finallyLoc") && this.prev < n.finallyLoc) { var o = n; break } } o && ("break" === t || "continue" === t) && o.tryLoc <= e && e <= o.finallyLoc && (o = null); var i = o ? o.completion : {}; return i.type = t, i.arg = e, o ? this.next = o.finallyLoc : this.complete(i), $ }, complete: function (t, e) { if ("throw" === t.type) throw t.arg; "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = t.arg, this.next = "end") : "normal" === t.type && e && (this.next = e) }, finish: function (t) { for (var e = this.tryEntries.length - 1; 0 <= e; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), w(r), $ } }, catch: function (t) { for (var e = this.tryEntries.length - 1; 0 <= e; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; w(r) } return o } } throw new Error("illegal catch attempt") }, delegateYield: function (t, e, r) { return this.delegate = { iterator: S(t), resultName: e, nextLoc: r }, $ } } } function s(t, e, r, n) { var s, c, u, a, o = Object.create((e || v).prototype); return o._invoke = (s = t, c = r || null, u = new j(n || []), a = l, function (t, e) { if (a === d) throw new Error("Generator is already running"); if (a === p) return x(); for (; ;) { var r = u.delegate; if (r) { if ("return" === t || "throw" === t && r.iterator[t] === f) { u.delegate = null; var n = r.iterator.return; if (n) if ("throw" === (o = g(n, r.iterator, e)).type) { t = "throw", e = o.arg; continue } if ("return" === t) continue } var o; if ("throw" === (o = g(r.iterator[t], r.iterator, e)).type) { u.delegate = null, t = "throw", e = o.arg; continue } if (t = "next", e = f, !(i = o.arg).done) return a = h, i; u[r.resultName] = i.value, u.next = r.nextLoc, u.delegate = null } if ("next" === t) a === h ? u.sent = e : delete u.sent; else if ("throw" === t) { if (a === l) throw a = p, e; u.dispatchException(e) && (t = "next", e = f) } else "return" === t && u.abrupt("return", e); if (a = d, "normal" === (o = g(s, c, u)).type) { a = u.done ? p : h; var i = { value: o.arg, done: u.done }; if (o.arg !== $) return i; u.delegate && "next" === t && (e = f) } else "throw" === o.type && (a = p, t = "throw", e = o.arg) } }), o } function g(t, e, r) { try { return { type: "normal", arg: t.call(e, r) } } catch (t) { return { type: "throw", arg: t } } } function v() { } function n() { } function c() { } function a(t) { ["next", "throw", "return"].forEach(function (e) { t[e] = function (t) { return this._invoke(e, t) } }) } function y(t) { this.arg = t } function m(o) { function n(t, e) { var r = o[t](e), n = r.value; return n instanceof y ? Promise.resolve(n.arg).then(s, c) : Promise.resolve(n).then(function (t) { return r.value = t, r }, c) } "object" == typeof O && O.domain && (n = O.domain.bind(n)); var i, s = n.bind(o, "next"), c = n.bind(o, "throw"), u = n.bind(o, "return"); this._invoke = function (e, r) { var t = i ? i.then(function () { return n(e, r) }) : new Promise(function (t) { t(n(e, r)) }); return i = t.catch(u), t } } function b(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e) } function w(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e } function j(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(b, this), this.reset() } function S(e) { if (e) { var t = e[o]; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var r = -1, n = function t() { for (; ++r < e.length;)if (u.call(e, r)) return t.value = e[r], t.done = !1, t; return t.value = f, t.done = !0, t }; return n.next = n } } return { next: x } } function x() { return { value: f, done: !0 } } }("object" == typeof t ? t : "object" == typeof window ? window : "object" == typeof self ? self : this) }).call(this, t("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) }, { _process: 4 }] }, {}, [1]);;
/*
jQWidgets v4.1.2 (2016-Apr)
Copyright (c) 2011-2016 jQWidgets.
License: http://jqwidgets.com/license/
*/



var jqxBaseFramework = window.minQuery || window.jQuery;

(function ($) {
    $.jqx = $.jqx || {}

    $.jqx.define = function (namespace, classname, baseclass) {
        namespace[classname] = function () {
            if (this.baseType) {
                this.base = new namespace[this.baseType]();
                this.base.defineInstance();
            }
            this.defineInstance();
        }

        namespace[classname].prototype.defineInstance = function () { };
        namespace[classname].prototype.base = null;
        namespace[classname].prototype.baseType = undefined;

        if (baseclass && namespace[baseclass])
            namespace[classname].prototype.baseType = baseclass;
    }

    // method call
    $.jqx.invoke = function (object, args) {
        if (args.length == 0)
            return;

        var method = typeof (args) == Array || args.length > 0 ? args[0] : args;
        var methodArg = typeof (args) == Array || args.length > 1 ? Array.prototype.slice.call(args, 1) : $({}).toArray();

        while (object[method] == undefined && object.base != null) {
            if (object[method] != undefined && $.isFunction(object[method]))
                return object[method].apply(object, methodArg);

            if (typeof method == 'string') {
                var methodLowerCase = method.toLowerCase();
                if (object[methodLowerCase] != undefined && $.isFunction(object[methodLowerCase])) {
                    return object[methodLowerCase].apply(object, methodArg);
                }
            }
            object = object.base;
        }

        if (object[method] != undefined && $.isFunction(object[method]))
            return object[method].apply(object, methodArg);

        if (typeof method == 'string') {
            var methodLowerCase = method.toLowerCase();
            if (object[methodLowerCase] != undefined && $.isFunction(object[methodLowerCase])) {
                return object[methodLowerCase].apply(object, methodArg);
            }
        }

        return;
    }
    $.jqx.hasProperty = function (obj, property) {
        if (typeof (property) == 'object') {
            for (var prop in property) {
                var o = obj;
                while (o) {
                    if (o.hasOwnProperty(prop))
                        return true;
                    if (o.hasOwnProperty(prop.toLowerCase()))
                        return true;
                    o = o.base;
                }
                return false;
            }
        }
        else {
            while (obj) {
                if (obj.hasOwnProperty(property))
                    return true;
                if (obj.hasOwnProperty(property.toLowerCase()))
                    return true;
                obj = obj.base;
            }
        }

        return false;
    }

    $.jqx.hasFunction = function (object, args) {
        if (args.length == 0)
            return false;

        if (object == undefined)
            return false;

        var method = typeof (args) == Array || args.length > 0 ? args[0] : args;
        var methodArg = typeof (args) == Array || args.length > 1 ? Array.prototype.slice.call(args, 1) : {};

        while (object[method] == undefined && object.base != null) {
            if (object[method] && $.isFunction(object[method]))
                return true;

            if (typeof method == 'string') {
                var methodLowerCase = method.toLowerCase();
                if (object[methodLowerCase] && $.isFunction(object[methodLowerCase]))
                    return true;
            }
            object = object.base;
        }

        if (object[method] && $.isFunction(object[method]))
            return true;

        if (typeof method == 'string') {
            var methodLowerCase = method.toLowerCase();
            if (object[methodLowerCase] && $.isFunction(object[methodLowerCase]))
                return true;
        }

        return false;
    }

    $.jqx.isPropertySetter = function (obj, args) {
        if (args.length == 1 && typeof (args[0]) == 'object')
            return true;

        if (args.length == 2 &&
            typeof (args[0]) == 'string' &&
            !$.jqx.hasFunction(obj, args)) {
            return true;
        }

        return false;
    }

    $.jqx.validatePropertySetter = function (obj, args, suppressException) {
        if (!$.jqx.propertySetterValidation)
            return true;

        if (args.length == 1 && typeof (args[0]) == 'object') {
            for (var i in args[0]) {
                var o = obj;
                while (!o.hasOwnProperty(i) && o.base)
                    o = o.base;

                if (!o || !o.hasOwnProperty(i)) {
                    if (!suppressException) {
                        var hasLowerCase = o.hasOwnProperty(i.toString().toLowerCase());
                        if (!hasLowerCase) {
                            throw 'Invalid property: ' + i;
                        }
                        else return true;
                    }
                    return false;
                }
            }

            return true;
        }

        if (args.length != 2) {
            if (!suppressException)
                throw 'Invalid property: ' + args.length >= 0 ? args[0] : '';

            return false;
        }

        while (!obj.hasOwnProperty(args[0]) && obj.base)
            obj = obj.base;

        if (!obj || !obj.hasOwnProperty(args[0])) {
            if (!suppressException)
                throw 'Invalid property: ' + args[0];

            return false;
        }

        return true;
    }

    if (!Object.keys)
    {
        Object.keys = (function ()
        {
            'use strict';
            var hasOwnProperty = Object.prototype.hasOwnProperty,
                hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),
                dontEnums = [
                  'toString',
                  'toLocaleString',
                  'valueOf',
                  'hasOwnProperty',
                  'isPrototypeOf',
                  'propertyIsEnumerable',
                  'constructor'
                ],
                dontEnumsLength = dontEnums.length;

            return function (obj)
            {
                if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null))
                {
                    throw new TypeError('Object.keys called on non-object');
                }

                var result = [], prop, i;

                for (prop in obj)
                {
                    if (hasOwnProperty.call(obj, prop))
                    {
                        result.push(prop);
                    }
                }

                if (hasDontEnumBug)
                {
                    for (i = 0; i < dontEnumsLength; i++)
                    {
                        if (hasOwnProperty.call(obj, dontEnums[i]))
                        {
                            result.push(dontEnums[i]);
                        }
                    }
                }
                return result;
            };
        }());
    }

    $.jqx.set = function (object, args) {
        var newValuesLength = 0;
        if (args.length == 1 && typeof (args[0]) == 'object') {
            if (object.isInitialized && Object.keys && Object.keys(args[0]).length > 1) {
                var element = !object.base ? object.element : object.base.element;
                var initArgs = $.data(element, object.widgetName).initArgs;
                if (initArgs && JSON && JSON.stringify && args[0] && initArgs[0])
                {
                    try
                    {
                        if (JSON.stringify(args[0]) == JSON.stringify(initArgs[0]))
                        {
                            var toReturn = true;
                            $.each(args[0], function (key, value)
                            {
                                if (object[key] != value)
                                {
                                    toReturn = false;
                                    return false;
                                }
                            });
                            if (toReturn)
                            {
                                return;
                            }
                        }
                    }
                    catch(err)
                    {
                    }
                }
                object.batchUpdate = args[0];
                var oldValues = {};
                var newValues = {};
                $.each(args[0], function (key, value) {
                    var obj = object;
                    while (!obj.hasOwnProperty(key) && obj.base != null)
                        obj = obj.base;

                    if (obj.hasOwnProperty(key)) {
                        if (object[key] != value) {
                            oldValues[key] = object[key];
                            newValues[key] = value;
                            newValuesLength++;
                        }
                    }
                    else if (obj.hasOwnProperty(key.toLowerCase())) {
                        if (object[key.toLowerCase()] != value) {
                            oldValues[key.toLowerCase()] = object[key.toLowerCase()];
                            newValues[key.toLowerCase()] = value;
                            newValuesLength++;
                        }
                    }
                });
                if (newValuesLength < 2) {
                    object.batchUpdate = null;
                }
            }

            $.each(args[0], function (key, value) {
                var obj = object;
                while (!obj.hasOwnProperty(key) && obj.base != null)
                    obj = obj.base;

                if (obj.hasOwnProperty(key)) {
                    $.jqx.setvalueraiseevent(obj, key, value);
                }
                else if (obj.hasOwnProperty(key.toLowerCase())) {
                    $.jqx.setvalueraiseevent(obj, key.toLowerCase(), value);
                }
                else if ($.jqx.propertySetterValidation)
                    throw "jqxCore: invalid property '" + key + "'";
            });

            if (object.batchUpdate != null) {
                object.batchUpdate = null;
                if (object.propertiesChangedHandler && newValuesLength > 1) {
                    object.propertiesChangedHandler(object, oldValues, newValues);
                }
            }
        }
        else if (args.length == 2) {
            while (!object.hasOwnProperty(args[0]) && object.base)
                object = object.base;

            if (object.hasOwnProperty(args[0])) {
                $.jqx.setvalueraiseevent(object, args[0], args[1]);
            }
            else if (object.hasOwnProperty(args[0].toLowerCase())) {
                $.jqx.setvalueraiseevent(object, args[0].toLowerCase(), args[1]);
            }
            else if ($.jqx.propertySetterValidation)
                throw "jqxCore: invalid property '" + args[0] + "'";
        }
    }

    $.jqx.setvalueraiseevent = function (object, key, value) {
        var oldVal = object[key];

        object[key] = value;

        if (!object.isInitialized)
            return;

        if (object.propertyChangedHandler != undefined)
            object.propertyChangedHandler(object, key, oldVal, value);

        if (object.propertyChangeMap != undefined && object.propertyChangeMap[key] != undefined)
            object.propertyChangeMap[key](object, key, oldVal, value);
    };

    $.jqx.get = function (object, args) {
        if (args == undefined || args == null)
            return undefined;

        if (object.propertyMap) {
            var newVal = object.propertyMap(args);
            if (newVal != null)
                return newVal;
        }

        if (object.hasOwnProperty(args))
            return object[args];

        if (object.hasOwnProperty(args.toLowerCase()))
            return object[args.toLowerCase()];

        var arg = undefined;
        if (typeof (args) == Array) {
            if (args.length != 1)
                return undefined;
            arg = args[0];
        }
        else if (typeof (args) == 'string')
            arg = args;

        while (!object.hasOwnProperty(arg) && object.base)
            object = object.base;

        if (object)
            return object[arg];

        return undefined;
    }

    $.jqx.serialize = function (obj) {
        var txt = '';
        if ($.isArray(obj)) {
            txt = '['
            for (var i = 0; i < obj.length; i++) {
                if (i > 0)
                    txt += ', ';
                txt += $.jqx.serialize(obj[i]);
            }
            txt += ']';
        }
        else if (typeof (obj) == 'object') {
            txt = '{';
            var j = 0;
            for (var i in obj) {
                if (j++ > 0)
                    txt += ', ';
                txt += i + ': ' + $.jqx.serialize(obj[i]);
            }
            txt += '}';
        }
        else
            txt = obj.toString();

        return txt;
    }

    $.jqx.propertySetterValidation = true;

    $.jqx.jqxWidgetProxy = function (controlName, element, args) {
        var host = $(element);
        var vars = $.data(element, controlName);
        if (vars == undefined) {
            return undefined;
        }

        var obj = vars.instance;

        if ($.jqx.hasFunction(obj, args))
            return $.jqx.invoke(obj, args);

        if ($.jqx.isPropertySetter(obj, args)) {
            if ($.jqx.validatePropertySetter(obj, args)) {
                $.jqx.set(obj, args);
                return undefined;
            }
        } else {
            if (typeof (args) == 'object' && args.length == 0)
                return;
            else if (typeof (args) == 'object' && args.length == 1 && $.jqx.hasProperty(obj, args[0]))
                return $.jqx.get(obj, args[0]);
            else if (typeof (args) == 'string' && $.jqx.hasProperty(obj, args[0]))
                return $.jqx.get(obj, args);
        }

        throw "jqxCore: Invalid parameter '" + $.jqx.serialize(args) + "' does not exist.";
        return undefined;
    }

    $.jqx.applyWidget = function (element, controlName, args, instance) {
        var WinJS = false;
        try {
            WinJS = window.MSApp != undefined;
        }
        catch (e) {
        }

        var host = $(element);
        if (!instance) {
            instance = new $.jqx['_' + controlName]();
        }
        else {
            instance.host = host;
            instance.element = element;
        }
        if (element.id == "") {
            element.id = $.jqx.utilities.createId();
        }

        var vars = { host: host, element: element, instance: instance, initArgs: args };

        instance.widgetName = controlName;

        $.data(element, controlName, vars);
        $.data(element, 'jqxWidget', vars.instance);

        var inits = new Array();
        var instance = vars.instance;
        while (instance) {
            instance.isInitialized = false;
            inits.push(instance);
            instance = instance.base;
        }
        inits.reverse();
        inits[0].theme = $.jqx.theme || '';

        $.jqx.jqxWidgetProxy(controlName, element, args);

        for (var i in inits) {
            instance = inits[i];
            if (i == 0) {
                instance.host = host;
                instance.element = element;
                instance.WinJS = WinJS;
            }
            if (instance != undefined) {
                if (instance.definedInstance) {
                    instance.definedInstance();
                }
                if (instance.createInstance != null) {
                    if (WinJS) {
                        MSApp.execUnsafeLocalFunction(function () {
                            instance.createInstance(args);
                        });
                    }
                    else {
                        instance.createInstance(args);
                    }
                }
            }
        }

        for (var i in inits) {
            if (inits[i] != undefined) {
                inits[i].isInitialized = true;
            }
        }

        if (WinJS) {
            MSApp.execUnsafeLocalFunction(function () {
                vars.instance.refresh(true);
            });
        }
        else {
            vars.instance.refresh(true);
        }

    }

    $.jqx.jqxWidget = function (name, base, params) {
        var WinJS = false;
        try {
            jqxArgs = Array.prototype.slice.call(params, 0);
        }
        catch (e) {
            jqxArgs = '';
        }

        try {
            WinJS = window.MSApp != undefined;
        }
        catch (e) {
        }

        var controlName = name;

        var baseControl = '';
        if (base)
            baseControl = '_' + base;
        $.jqx.define($.jqx, '_' + controlName, baseControl);

        var widgets = new Array();
     
        if (!window[controlName]) {
            var serializeObject = function(data) {
                if (data == null) return "";
                var dataType = $.type(data);
                switch (dataType) {
                    case "string":
                    case "number":
                    case "date":
                    case "boolean":
                    case "bool":
                        if (data === null)
                            return "";
                        return data.toString()
                }

                var str = "";
                $.each(data, function (index) {
                    var val = this;
                    if (index > 0) str += ', ';
                    str += "[";
                    var m = 0;

                    if ($.type(val) == "object") {
                        for (var obj in val) {
                            if (m > 0) str += ', ';
                            str += '{' + obj + ":" + val[obj] + '}';
                            m++;
                        }
                    }
                    else {
                        if (m > 0) str += ', ';
                        str += '{' + index + ":" + val + '}';
                        m++;
                    }

                    str += "]";
                });
                return str;
            }

            window[controlName] = function (selector, params) {
                var args = [];
                if (!params) {
                    params = {};
                }
                args.push(params);

                var uid = selector;
                if ($.type(uid) === "object" && selector[0]) {
                    uid = selector[0].id;
                    if (uid === "") {
                        uid = selector[0].id = $.jqx.utilities.createId();
                    }
                }
            
                if (window.jqxWidgets && window.jqxWidgets[uid]) {
                    if (params) {
                        $.each(window.jqxWidgets[uid], function (index) {
                            var data = $(this.element).data();
                            if (data && data.jqxWidget) {
                                $(this.element)[controlName](params);
                            }
                        });
                    }
                    if (window.jqxWidgets[uid].length == 1) {
                        var data = $(window.jqxWidgets[uid][0].widgetInstance.element).data();
                        if (data && data.jqxWidget) {
                            return window.jqxWidgets[uid][0];
                        }
                    }

                    var data = $(window.jqxWidgets[uid][0].widgetInstance.element).data();
                    if (data && data.jqxWidget) {
                        return window.jqxWidgets[uid];
                    }
                }

                var elements = $(selector);
                if (elements.length === 0) {
                    throw new Error('Invalid Selector - ' + selector + '! Please, check whether the used ID or CSS Class name is correct.');
                }
                var instances = [];

           
                $.each(elements, function (index) {
                    var element = elements[index];
                    var elementClone = null;
                    if (!widgets[controlName]) {
                        var id = element.id;
                        element.id = "";
                        elementClone = $(element).clone();
                        element.id = id;
                    }
                    $.jqx.applyWidget(element, controlName, args, undefined);
                    if (!widgets[controlName]) {
                        var instance = $.data(element, 'jqxWidget');
                        var properties = elementClone[controlName]().data().jqxWidget.defineInstance();
                        var widgetConstructor = function (element) {
                            var instance = $.data(element, 'jqxWidget');
                            this.widgetInstance = instance;
                            var widget = $.extend(this, instance);
                            widget.on = function (eventName, callback) {
                               widget.addHandler(widget.host, eventName, callback);
                            }
                            widget.off = function (eventName) {
                               widget.removeHandler(widget.host, eventName);
                            }
 
                            return widget;
                        }
                        widgets[controlName] = widgetConstructor;
                        $.each(properties, function (property, currentValue) {
                            Object.defineProperty(widgetConstructor.prototype, property, {
                                get: function () {
                                    if (this.widgetInstance) {
                                        return this.widgetInstance[property];
                                    }
                                    return currentValue;
                                },
                                set: function (newValue) {
                                    if (this.widgetInstance && this.widgetInstance[property] != newValue) {
                                        if (this.widgetInstance[property] != newValue && serializeObject(this.widgetInstance[property]) != serializeObject(newValue)) {
                                            var settings = {};
                                            settings[property] = newValue;
                                            this.widgetInstance.host[controlName](settings);
                                            this.widgetInstance[property] = newValue;
                                        }
                                    }
                                }
                            });
                        });
                    }
                    var instance = new widgets[controlName](element);
                    instances.push(instance);
                    if (!window.jqxWidgets) {
                        window.jqxWidgets = new Array();
                    }
                    if (!window.jqxWidgets[uid]) {
                        window.jqxWidgets[uid] = new Array();
                    }
                    window.jqxWidgets[uid].push(instance);
                });

                if (instances.length === 1)
                    return instances[0];
                
                return instances;

            }
        }

        $.fn[controlName] = function () {
            var args = Array.prototype.slice.call(arguments, 0);

            if (args.length == 0 || (args.length == 1 && typeof (args[0]) == 'object')) {
                if (this.length == 0) {
                    if (this.selector) {
                        throw new Error('Invalid Selector - ' + this.selector + '! Please, check whether the used ID or CSS Class name is correct.');
                    }
                    else {
                        throw new Error('Invalid Selector! Please, check whether the used ID or CSS Class name is correct.');
                    }
                }

                return this.each(function () {
                    var host = $(this);
                    var element = this; // element == this == host[0]
                    var vars = $.data(element, controlName);

                    if (vars == null) {
                        $.jqx.applyWidget(element, controlName, args, undefined);
                    }
                    else {
                        $.jqx.jqxWidgetProxy(controlName, this, args);
                    }
                }); // each
            }
            else {
                if (this.length == 0) {
                    if (this.selector) {
                        throw new Error('Invalid Selector - ' + this.selector + '! Please, check whether the used ID or CSS Class name is correct.');
                    }
                    else {
                        throw new Error('Invalid Selector! Please, check whether the used ID or CSS Class name is correct.');
                    }
                }

                var returnVal = null;

                var cnt = 0;
                this.each(function () {
                    var result = $.jqx.jqxWidgetProxy(controlName, this, args);

                    if (cnt == 0) {
                        returnVal = result;
                        cnt++;
                    }
                    else {
                        if (cnt == 1) {
                            var tmp = [];
                            tmp.push(returnVal);
                            returnVal = tmp;
                        }
                        returnVal.push(result);
                    }
                }); // each
            }

            return returnVal;
        }

        try {
            $.extend($.jqx['_' + controlName].prototype, Array.prototype.slice.call(params, 0)[0]);
        }
        catch (e) {
        }

        $.extend($.jqx['_' + controlName].prototype, {
            toThemeProperty: function (propertyName, override) {
                return $.jqx.toThemeProperty(this, propertyName, override);
            }
        });

        $.jqx['_' + controlName].prototype.refresh = function () {
            if (this.base)
                this.base.refresh(true);
        }
        $.jqx['_' + controlName].prototype.createInstance = function () {
        }
        $.jqx['_' + controlName].prototype.applyTo = function (element, args) {
            if (!(args instanceof Array)) {
                var a = [];
                a.push(args);
                args = a;
            }

            $.jqx.applyWidget(element, controlName, args, this);
        }

        $.jqx['_' + controlName].prototype.getInstance = function () {
            return this;
        }
        $.jqx['_' + controlName].prototype.propertyChangeMap = {};

        $.jqx['_' + controlName].prototype.addHandler = function (source, events, func, data) {
            $.jqx.addHandler(source, events, func, data);
        };

        $.jqx['_' + controlName].prototype.removeHandler = function (source, events, func) {
            $.jqx.removeHandler(source, events, func);
        };
    } // jqxWidget

    $.jqx.toThemeProperty = function (instance, propertyName, override) {
        if (instance.theme == '')
            return propertyName;

        var split = propertyName.split(' ');
        var result = '';
        for (var i = 0; i < split.length; i++) {
            if (i > 0)
                result += ' ';

            var key = split[i];

            if (override != null && override)
                result += key + '-' + instance.theme;
            else
                result += key + ' ' + key + '-' + instance.theme;
        }

        return result;
    }


    $.jqx.addHandler = function (source, eventsList, func, data) {
        var events = eventsList.split(' ');

        for (var i = 0; i < events.length; i++) {
            var event = events[i];

            if (window.addEventListener) {
                switch (event) {
                    case 'mousewheel':
                        if ($.jqx.browser.mozilla) {
                            source[0].addEventListener('DOMMouseScroll', func, false);
                        }
                        else {
                            source[0].addEventListener('mousewheel', func, false);
                        }
                        continue;
                    case 'mousemove':
                        if (!data) {
                            source[0].addEventListener('mousemove', func, false);
                            continue;
                        }
                        break;
                }
            }

            if (data == undefined || data == null) {
                if (source.on)
                    source.on(event, func);
                else
                    source.bind(event, func);
            }
            else {
                if (source.on)
                    source.on(event, data, func);
                else
                    source.bind(event, data, func);
            }
        } // for
    };

    $.jqx.removeHandler = function (source, eventsList, func) {
        if (!eventsList) {
            if (source.off)
                source.off();
            else
                source.unbind();
            return;
        }
        var events = eventsList.split(' ');

        for (var i = 0; i < events.length; i++) {
            var event = events[i];

            if (window.removeEventListener) {
                switch (event) {
                    case 'mousewheel':
						if ($.jqx.browser.mozilla) {
                            source[0].removeEventListener('DOMMouseScroll', func, false);
                        }
                        else {
                            source[0].removeEventListener('mousewheel', func, false);
                        }
                        continue;
                    case 'mousemove':
                        if (func) {
                            source[0].removeEventListener('mousemove', func, false);
                            continue;
                        }
                        break;
                }
            }

            if (event == undefined) {
                if (source.off)
                    source.off();
                else
                    source.unbind();
                continue;
            }

            if (func == undefined) {
                if (source.off)
                    source.off(event);
                else
                    source.unbind(event);
            }
            else {
                if (source.off)
                    source.off(event, func);
                else
                    source.unbind(event, func);
            }
        }
    };

    $.jqx.theme = $.jqx.theme || "";
    $.jqx.scrollAnimation = $.jqx.scrollAnimation || false;
    $.jqx.resizeDelay = $.jqx.resizeDelay || 10;

    $.jqx.ready = function () {
        $(window).trigger('jqxReady');
    }
    $.jqx.init = function () {
        $.each(arguments[0], function (index, value) {
            if (index == "theme") {
                $.jqx.theme = value;
            }
            if (index == "scrollBarSize") {
                $.jqx.utilities.scrollBarSize = value;
            }
            if (index == "touchScrollBarSize") {
                $.jqx.utilities.touchScrollBarSize = value;
            }
            if (index == "scrollBarButtonsVisibility") {
                $.jqx.utilities.scrollBarButtonsVisibility = value;
            }
        });
    }

    // Utilities
    $.jqx.utilities = $.jqx.utilities || {};
    $.extend($.jqx.utilities,
    {
        scrollBarSize: 15,
        touchScrollBarSize: 0,
        scrollBarButtonsVisibility: "visible",
        createId: function () {
            var S4 = function () {
                return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
            };
            return "jqxWidget" + S4() + S4();
        },

        setTheme: function (oldTheme, theme, element) {
            if (typeof element === 'undefined') {
                return;
            }
            var classNames = element[0].className.split(' '),
                oldClasses = [], newClasses = [],
                children = element.children();
            for (var i = 0; i < classNames.length; i += 1) {
                if (classNames[i].indexOf(oldTheme) >= 0) {
                    if (oldTheme.length > 0) {
                        oldClasses.push(classNames[i]);
                        newClasses.push(classNames[i].replace(oldTheme, theme));
                    }
                    else {
                        newClasses.push(classNames[i].replace("-" + theme, "") + '-' + theme);
                    }
                }
            }
            this._removeOldClasses(oldClasses, element);
            this._addNewClasses(newClasses, element);
            for (var i = 0; i < children.length; i += 1) {
                this.setTheme(oldTheme, theme, $(children[i]));
            }
        },

        _removeOldClasses: function (classes, element) {
            for (var i = 0; i < classes.length; i += 1) {
                element.removeClass(classes[i]);
            }
        },

        _addNewClasses: function (classes, element) {
            for (var i = 0; i < classes.length; i += 1) {
                element.addClass(classes[i]);
            }
        },

        getOffset: function (el) {
            var left = $.jqx.mobile.getLeftPos(el[0]);
            var top = $.jqx.mobile.getTopPos(el[0]);
            return { top: top, left: left };
        },

        resize: function (element, callback, destroy, checkForHidden) {
            if (checkForHidden === undefined) {
                checkForHidden = true;
            }

            var index = -1;
            var that = this;
            var getHiddenIndex = function (element) {
                if (!that.hiddenWidgets) {
                    return -1;
                }

                var hiddenIndex = -1;
                for (var i = 0; i < that.hiddenWidgets.length; i++) {
                    if (element.id) {
                        if (that.hiddenWidgets[i].id == element.id) {
                            hiddenIndex = i;
                            break;
                        }
                    }
                    else {
                        if (that.hiddenWidgets[i].id == element[0].id) {
                            hiddenIndex = i;
                            break;
                        }
                    }
                }
                return hiddenIndex;
            }


            if (this.resizeHandlers) {
                for (var i = 0; i < this.resizeHandlers.length; i++) {
                    if (element.id) {
                        if (this.resizeHandlers[i].id == element.id) {
                            index = i;
                            break;
                        }
                    }
                    else {
                        if (this.resizeHandlers[i].id == element[0].id) {
                            index = i;
                            break;
                        }
                    }
                }

                if (destroy === true) {
                    if (index != -1) {
                        this.resizeHandlers.splice(index, 1);
                    }

                    if (this.resizeHandlers.length == 0) {
                        var w = $(window);
                        if (w.off) {
                            w.off('resize.jqx');
                            w.off('orientationchange.jqx');
                            w.off('orientationchanged.jqx');
                        }
                        else {
                            w.unbind('resize.jqx');
                            w.unbind('orientationchange.jqx');
                            w.unbind('orientationchanged.jqx');
                        }
                        this.resizeHandlers = null;
                    }
                    var hiddenIndex = getHiddenIndex(element);
                    if (hiddenIndex != -1 && this.hiddenWidgets) {
                        this.hiddenWidgets.splice(hiddenIndex, 1);
                    }
                    return;
                }
            }
            else if (destroy === true) {
                var hiddenIndex = getHiddenIndex(element);
                if (hiddenIndex != -1 && this.hiddenWidgets) {
                    this.hiddenWidgets.splice(hiddenIndex, 1);
                }
                return;
            }
            var that = this;
            var doResize = function (isHidden, type) {
                if (!that.resizeHandlers)
                    return;

                var getParentsCount = function (element) {
                    var index = -1;
                    var parent = element.parentNode;
                    while (parent) {
                        index++;
                        parent = parent.parentNode;
                    }
                    return index;
                }

                var compare = function (value1, value2) {
                    if (!value1.widget || !value2.widget)
                        return 0;

                    var parents1 = getParentsCount(value1.widget[0]);
                    var parents2 = getParentsCount(value2.widget[0]);

                    try {
                        if (parents1 < parents2) { return -1; }
                        if (parents1 > parents2) { return 1; }
                    }
                    catch (error) {
                        var er = error;
                    }

                    return 0;
                };
                var handleHiddenWidgets = function (delay) {
                    if (that.hiddenWidgets.length > 0) {
                        that.hiddenWidgets.sort(compare);
                        var updateHiddenWidgets = function () {
                            var hasHiddenWidget = false;
                            var currentHiddenWidgets = new Array();
                            for (var p = 0; p < that.hiddenWidgets.length; p++) {
                                var handler = that.hiddenWidgets[p];
                                if ($.jqx.isHidden(handler.widget)) {
                                    hasHiddenWidget = true;
                                    currentHiddenWidgets.push(handler);
                                }
                                else {
                                    if (handler.callback) {
                                        handler.callback(type);
                                    }
                                }
                            }
                            that.hiddenWidgets = currentHiddenWidgets;
                            if (!hasHiddenWidget) {
                                clearInterval(that.__resizeInterval);
                            }
                        }
                        if (delay == false) {
                            updateHiddenWidgets();
                            if (that.__resizeInterval) clearInterval(that.__resizeInterval);
                            return;
                        }
                        if (that.__resizeInterval) clearInterval(that.__resizeInterval);
                        that.__resizeInterval = setInterval(function () {
                            updateHiddenWidgets();
                        }, 100);
                    }
                }

                if (that.hiddenWidgets && that.hiddenWidgets.length > 0) {
                    handleHiddenWidgets(false);
                }
                that.hiddenWidgets = new Array();
                that.resizeHandlers.sort(compare);
                for (var i = 0; i < that.resizeHandlers.length; i++) {
                    var handler = that.resizeHandlers[i];
                    var widget = handler.widget;
                    var data = handler.data;
                    if (!data) continue;
                    if (!data.jqxWidget) continue;

                    var width = data.jqxWidget.width;
                    var height = data.jqxWidget.height;

                    if (data.jqxWidget.base) {
                        if (width == undefined) {
                            width = data.jqxWidget.base.width;
                        }
                        if (height == undefined) {
                            height = data.jqxWidget.base.height;
                        }
                    }

                    if (width === undefined && height === undefined) {
                        width = data.jqxWidget.element.style.width;
                        height = data.jqxWidget.element.style.height;
                    }

                    var percentageSize = false;
                    if (width != null && width.toString().indexOf("%") != -1) {
                        percentageSize = true;
                    }

                    if (height != null && height.toString().indexOf("%") != -1) {
                        percentageSize = true;
                    }

                    if ($.jqx.isHidden(widget)) {
                        if (getHiddenIndex(widget) === -1) {
                            if (percentageSize || isHidden === true) {
                                if (handler.data.nestedWidget !== true) {
                                    that.hiddenWidgets.push(handler);
                                }
                            }
                        }
                    }
                    else if (isHidden === undefined || isHidden !== true) {
                        if (percentageSize) {
                            handler.callback(type);
                            if (that.hiddenWidgets.indexOf(handler) >= 0) {
                                that.hiddenWidgets.splice(that.hiddenWidgets.indexOf(handler), 1);
                            }
                        }
                        if (data.jqxWidget.element) {
                            var widgetClass = data.jqxWidget.element.className;
                            if (widgetClass.indexOf('dropdownlist') >= 0 || widgetClass.indexOf('datetimeinput') >= 0 || widgetClass.indexOf('combobox') >= 0 || widgetClass.indexOf('menu') >= 0) {
                                if (data.jqxWidget.isOpened) {
                                    var opened = data.jqxWidget.isOpened();
                                    if (opened) {
                                        if (type && type == "resize" && $.jqx.mobile.isTouchDevice())
                                            continue;

                                        data.jqxWidget.close();
                                    }
                                }
                            }
                        }
                    }
                };
             
                handleHiddenWidgets();
            }

            if (!this.resizeHandlers) {
                this.resizeHandlers = new Array();

                var w = $(window);
                if (w.on) {
                    this._resizeTimer = null;
                    this._initResize = null;
                    w.on('resize.jqx', function (event) {
                        if (that._resizeTimer != undefined) {
                            clearTimeout(that._resizeTimer);
                        }
                        if (!that._initResize) {
                            that._initResize = true;
                            doResize(null, 'resize');
                        }
                        else {
                            that._resizeTimer = setTimeout(function () {
                                doResize(null, 'resize');
                            }, $.jqx.resizeDelay);
                        }
                    });
                    w.on('orientationchange.jqx', function (event) {
                        doResize(null, 'orientationchange');
                    });
                    w.on('orientationchanged.jqx', function (event) {
                        doResize(null, 'orientationchange');
                    });
                }
                else {
                    w.bind('resize.jqx', function (event) {
                        doResize(null, 'orientationchange');
                    });
                    w.bind('orientationchange.jqx', function (event) {
                        doResize(null, 'orientationchange');
                    });
                    w.bind('orientationchanged.jqx', function (event) {
                        doResize(null, 'orientationchange');
                    });
                }
            }
            var elementData = element.data();
            if (checkForHidden) {
                if (index === -1) {
                    this.resizeHandlers.push({ id: element[0].id, widget: element, callback: callback, data: elementData });
                }
            }
            try
            {
                var width = elementData.jqxWidget.width;
                var height = elementData.jqxWidget.height;

                if (elementData.jqxWidget.base)
                {
                    if (width == undefined)
                    {
                        width = elementData.jqxWidget.base.width;
                    }
                    if (height == undefined)
                    {
                        height = elementData.jqxWidget.base.height;
                    }
                }

                if (width === undefined && height === undefined)
                {
                    width = elementData.jqxWidget.element.style.width;
                    height = elementData.jqxWidget.element.style.height;
                }

                var percentageSize = false;
                if (width != null && width.toString().indexOf("%") != -1)
                {
                    percentageSize = true;
                }

                if (height != null && height.toString().indexOf("%") != -1)
                {
                    percentageSize = true;
                }
                if (percentageSize)
                {
                    if (!this.watchedElementData)
                    {
                        this.watchedElementData = [];
                    }
                    var that = this;
                    var checkForChanges = function (mutations)
                    {
                        if (that.watchedElementData.forEach)
                        {
                            that.watchedElementData.forEach(function (data)
                            {
                                if (data.element.offsetWidth !== data.offsetWidth ||
                                    data.element.offsetHeight !== data.offsetHeight)
                                {
                                    data.offsetWidth = data.element.offsetWidth;
                                    data.offsetHeight = data.element.offsetHeight;
                                    if (data.timer)
                                    {
                                        clearTimeout(data.timer);
                                    }
                                    data.timer = setTimeout(function ()
                                    {
                                        if (!$.jqx.isHidden($(data.element)))
                                        {
                                            data.callback();
                                        }
                                    });
                                }
                            });
                        }
                    };

                    that.watchedElementData.push({
                        element: element[0],
                        offsetWidth: element[0].offsetWidth,
                        offsetHeight: element[0].offsetHeight,
                        callback: callback
                    });
                    if (!that.observer)
                    {
                        that.observer = new MutationObserver(checkForChanges);
                        that.observer.observe(document.body, {
                            attributes: true,
                            childList: true,
                            characterData: true
                        });
                    }
                }
            }
            catch (er)
            {
            }
            if ($.jqx.isHidden(element) && checkForHidden === true) {
                doResize(true);
            }
            $.jqx.resize = function () {
                doResize(null, 'resize');
            }
        },

        html: function (element, value) {
            if (!$(element).on) {
                return $(element).html(value);
            }
            try {
                return $.access(element, function (value) {
                    var elem = element[0] || {},
                        i = 0,
                        l = element.length;

                    if (value === undefined) {
                        return elem.nodeType === 1 ?
                            elem.innerHTML.replace(rinlinejQuery, "") :
                            undefined;
                    }

                    var rnoInnerhtml = /<(?:script|style|link)/i,
                        nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
            "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
                        rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
                        rtagName = /<([\w:]+)/,
                        rnocache = /<(?:script|object|embed|option|style)/i,
                        rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
                        rleadingWhitespace = /^\s+/,
                        wrapMap = {
                            option: [1, "<select multiple='multiple'>", "</select>"],
                            legend: [1, "<fieldset>", "</fieldset>"],
                            thead: [1, "<table>", "</table>"],
                            tr: [2, "<table><tbody>", "</tbody></table>"],
                            td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
                            col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
                            area: [1, "<map>", "</map>"],
                            _default: [0, "", ""]
                        };

                    if (typeof value === "string" && !rnoInnerhtml.test(value) &&
                        ($.support.htmlSerialize || !rnoshimcache.test(value)) &&
                        ($.support.leadingWhitespace || !rleadingWhitespace.test(value)) &&
                        !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) {

                        value = value.replace(rxhtmlTag, "<$1></$2>");

                        try {
                            for (; i < l; i++) {
                                elem = this[i] || {};
                                if (elem.nodeType === 1) {
                                    $.cleanData(elem.getElementsByTagName("*"));
                                    elem.innerHTML = value;
                                }
                            }

                            elem = 0;
                        } catch (e) { }
                    }

                    if (elem) {
                        element.empty().append(value);
                    }
                }, null, value, arguments.length);
            }
            catch (error) {
                return $(element).html(value);
            }
        },

        hasTransform: function (el) {
            var transform = "";
            transform = el.css('transform');

            if (transform == "" || transform == 'none') {
                transform = el.parents().css('transform');
                if (transform == "" || transform == 'none') {
                    var browserInfo = $.jqx.utilities.getBrowser();
                    if (browserInfo.browser == 'msie') {
                        transform = el.css('-ms-transform');
                        if (transform == "" || transform == 'none') {
                            transform = el.parents().css('-ms-transform');
                        }
                    }
                    else if (browserInfo.browser == 'chrome') {
                        transform = el.css('-webkit-transform');
                        if (transform == "" || transform == 'none') {
                            transform = el.parents().css('-webkit-transform');
                        }
                    }
                    else if (browserInfo.browser == 'opera') {
                        transform = el.css('-o-transform');
                        if (transform == "" || transform == 'none') {
                            transform = el.parents().css('-o-transform');
                        }
                    }
                    else if (browserInfo.browser == 'mozilla') {
                        transform = el.css('-moz-transform');
                        if (transform == "" || transform == 'none') {
                            transform = el.parents().css('-moz-transform');
                        }
                    }
                } else {
                    return transform != "" && transform != 'none';
                }
            }
            if (transform == "" || transform == 'none') {
                transform = $(document.body).css('transform');
            }
            return transform != "" && transform != 'none' && transform != null;
        },

        getBrowser: function () {
            var ua = navigator.userAgent.toLowerCase();

            var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
		        /(webkit)[ \/]([\w.]+)/.exec(ua) ||
		        /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
		        /(msie) ([\w.]+)/.exec(ua) ||
		        ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
		        [];

            var obj = {
                browser: match[1] || "",
                version: match[2] || "0"
            };
            if (ua.indexOf("rv:11.0") >= 0 && ua.indexOf(".net4.0c") >= 0) {
                obj.browser = "msie";
                obj.version = "11";
                match[1] = "msie";
            }
            if (ua.indexOf("edge") >= 0) {
                obj.browser = "msie";
                obj.version = "12";
                match[1] = "msie";
            }
            obj[match[1]] = match[1];
            return obj;
        }
    });
    $.jqx.browser = $.jqx.utilities.getBrowser();
    $.jqx.isHidden = function (element) {
        if (!element || !element[0])
            return false;

        var w = element[0].offsetWidth, h = element[0].offsetHeight;
        if (w === 0 || h === 0)
            return true;
        else {
            return false;
        }
    };

    $.jqx.ariaEnabled = true;
    $.jqx.aria = function (that, property, value) {
        if (!$.jqx.ariaEnabled)
            return;

        if (property == undefined) {
            $.each(that.aria, function (index, value) {
                var attrValue = !that.base ? that.host.attr(index) : that.base.host.attr(index);
                if (attrValue != undefined && !$.isFunction(attrValue)) {
                    var newValue = attrValue;
                    switch (value.type) {
                        case "number":
                            newValue = new Number(attrValue);
                            if (isNaN(newValue)) newValue = attrValue;
                            break;
                        case "boolean":
                            newValue = attrValue == "true" ? true : false;
                            break;
                        case "date":
                            newValue = new Date(attrValue);
                            if (newValue == "Invalid Date" || isNaN(newValue)) newValue = attrValue;
                            break;
                    }

                    that[value.name] = newValue;
                }
                else {
                    var attrValue = that[value.name];
                    if ($.isFunction(attrValue)) attrValue = that[value.name]();
                    if (attrValue == undefined) attrValue = "";
                    try {
                        !that.base ? that.host.attr(index, attrValue.toString()) : that.base.host.attr(index, attrValue.toString());
                    }
                    catch (error) {
                    }
                }
            });
        }
        else {
            try {
                if (that.host) {
                    if (!that.base) {
                        if (that.host) {
                            if (that.element.setAttribute) {
                                that.element.setAttribute(property, value.toString());
                            }
                            else {
                                that.host.attr(property, value.toString());
                            }
                        }
                        else {
                            that.attr(property, value.toString());
                        }
                    }
                    else {
                        if (that.base.host) {
                            that.base.host.attr(property, value.toString());
                        }
                        else {
                            that.attr(property, value.toString());
                        }
                    }
                }
                else if (that.setAttribute) {
                    that.setAttribute(property, value.toString());
                }
            }
            catch (error) {
            }
        }
    };

    if (!Array.prototype.indexOf) {
        Array.prototype.indexOf = function (elt /*, from*/) {
            var len = this.length;

            var from = Number(arguments[1]) || 0;
            from = (from < 0)
                ? Math.ceil(from)
                : Math.floor(from);
            if (from < 0)
                from += len;

            for (; from < len; from++) {
                if (from in this &&
                this[from] === elt)
                    return from;
            }
            return -1;
        };
    }

    $.jqx.mobile = $.jqx.mobile || {};
    $.jqx.position = function (event) {
        var left = parseInt(event.pageX);
        var top = parseInt(event.pageY);

        if ($.jqx.mobile.isTouchDevice()) {
            var touches = $.jqx.mobile.getTouches(event);
            var touch = touches[0];
            left = parseInt(touch.pageX);
            top = parseInt(touch.pageY);
        }
        return { left: left, top: top }
    }

    $.extend($.jqx.mobile,
    {
        _touchListener: function (e, me) {
            var createTouchEvent = function (name, e) {
                var event = document.createEvent('MouseEvents');

                event.initMouseEvent(
                    name,
                    e.bubbles,
                    e.cancelable,
                    e.view,
                    e.detail,
                    e.screenX,
                    e.screenY,
                    e.clientX,
                    e.clientY,
                    e.ctrlKey,
                    e.altKey,
                    e.shiftKey,
                    e.metaKey,
                    e.button,
                    e.relatedTarget
                );
                event._pageX = e.pageX;
                event._pageY = e.pageY;

                return event;
            }

            var eventMap = { 'mousedown': 'touchstart', 'mouseup': 'touchend', 'mousemove': 'touchmove' };
            var event = createTouchEvent(eventMap[e.type], e);
            e.target.dispatchEvent(event);

            var fn = e.target['on' + eventMap[e.type]];
            if (typeof fn === 'function') fn(e);
        },

        setMobileSimulator: function (element, value) {
            if (this.isTouchDevice()) {
                return;
            }

            this.simulatetouches = true;
            if (value == false) {
                this.simulatetouches = false;
            }

            var eventMap = { 'mousedown': 'touchstart', 'mouseup': 'touchend', 'mousemove': 'touchmove' };

            var self = this;
            if (window.addEventListener) {
                var subscribeToEvents = function () {
                    for (var key in eventMap) {
                        if (element.addEventListener) {
                            element.removeEventListener(key, self._touchListener);
                            element.addEventListener(key, self._touchListener, false);
                        }

                        //  document.removeEventListener(key, self._touchListener);
                        //  document.addEventListener(key, self._touchListener, false);
                    }
                }

                if ($.jqx.browser.msie) {
                    subscribeToEvents();
                }
                else {
                    subscribeToEvents();
                }
            }
        },

        isTouchDevice: function () {
            if (this.touchDevice != undefined)
                return this.touchDevice;

            var txt = "Browser CodeName: " + navigator.appCodeName + "";
            txt += "Browser Name: " + navigator.appName + "";
            txt += "Browser Version: " + navigator.appVersion + "";
            txt += "Platform: " + navigator.platform + "";
            txt += "User-agent header: " + navigator.userAgent + "";

            if (txt.indexOf('Android') != -1)
                return true;

            if (txt.indexOf('IEMobile') != -1)
                return true;

            if (txt.indexOf('Windows Phone') != -1)
                return true;

            if (txt.indexOf('WPDesktop') != -1)
                return true;

            if (txt.indexOf('ZuneWP7') != -1)
                return true;

            if (txt.indexOf('BlackBerry') != -1 && txt.indexOf('Mobile Safari') != -1)
                return true;

            if (txt.indexOf('ipod') != -1)
                return true;

            if (txt.indexOf('nokia') != -1 || txt.indexOf('Nokia') != -1)
                return true;

            if (txt.indexOf('Chrome/17') != -1)
                return false;

            if (txt.indexOf('CrOS') != -1)
                return false;

            if (txt.indexOf('Opera') != -1 && txt.indexOf('Mobi') == -1 && txt.indexOf('Mini') == -1 && txt.indexOf('Platform: Win') != -1) {
                return false;
            }

            if (txt.indexOf('Opera') != -1 && txt.indexOf('Mobi') != -1 && txt.indexOf('Opera Mobi') != -1) {
                return true;
            }

            var deviceTypes = {
                ios: 'i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ',
                android: '(Android |HTC_|Silk/)',
                blackberry: 'BlackBerry(?:.*)Version\/',
                rimTablet: 'RIM Tablet OS ',
                webos: '(?:webOS|hpwOS)\/',
                bada: 'Bada\/'
            }

            // check for IPad, IPhone, IE and Chrome
            try {
                if (this.touchDevice != undefined)
                    return this.touchDevice;

                this.touchDevice = false;
                for (i in deviceTypes) {
                    if (deviceTypes.hasOwnProperty(i)) {
                        prefix = deviceTypes[i];
                        match = txt.match(new RegExp('(?:' + prefix + ')([^\\s;]+)'));
                        if (match) {
                            if (i.toString() == "blackberry") {
                                // handle touches through mouse pointer.
                                this.touchDevice = false;
                                return false;
                            }

                            this.touchDevice = true;
                            return true;
                        }
                    }
                }

                var userAgent = navigator.userAgent;
                if (navigator.platform.toLowerCase().indexOf('win') != -1) {
                    if (userAgent.indexOf('Windows Phone') >= 0 || userAgent.indexOf('WPDesktop') >= 0 || userAgent.indexOf('IEMobile') >= 0 || userAgent.indexOf('ZuneWP7') >= 0) {
                        this.touchDevice = true;
                        return true;
                    }
                    else {
                        if (userAgent.indexOf('Touch') >= 0) {
                            var supported = ('MSPointerDown' in window) || ('pointerdown' in window);
                            if (supported) {
                                this.touchDevice = true;
                                return true;
                            }
                            if (userAgent.indexOf('ARM') >= 0) {
                                this.touchDevice = true;
                                return true;
                            }

                            this.touchDevice = false;
                            return false;
                        }
                    }
                }

                if (navigator.platform.toLowerCase().indexOf('win') != -1) {
                    this.touchDevice = false;
                    return false;
                }
                if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
                    this.touchDevice = true;
                }
                return this.touchDevice;
            } catch (e) {
                this.touchDevice = false;
                return false;
            }
        },

        getLeftPos: function (inputObj) {
            var returnValue = inputObj.offsetLeft;
            while ((inputObj = inputObj.offsetParent) != null) {
                if (inputObj.tagName != 'HTML') {
                    returnValue += inputObj.offsetLeft;
                    if (document.all) returnValue += inputObj.clientLeft;
                }
            }
            return returnValue;
        },

        getTopPos: function (inputObj) {
            var returnValue = inputObj.offsetTop;
            var initialOffset = $(inputObj).coord();
            while ((inputObj = inputObj.offsetParent) != null) {
                if (inputObj.tagName != 'HTML') {
                    returnValue += (inputObj.offsetTop - inputObj.scrollTop);
                    if (document.all) returnValue += inputObj.clientTop;
                }
            }
            var agent = navigator.userAgent.toLowerCase();
            var wp8 = (agent.indexOf('windows phone') != -1 || agent.indexOf('WPDesktop') != -1 || agent.indexOf('ZuneWP7') != -1 || agent.indexOf('msie 9') != -1 || agent.indexOf('msie 11') != -1 || agent.indexOf('msie 10') != -1) && agent.indexOf('touch') != -1;
            if (wp8) {
                return initialOffset.top;
            }

            if (this.isSafariMobileBrowser()) {
                if (this.isSafari4MobileBrowser() && this.isIPadSafariMobileBrowser()) {
                    return returnValue;
                }
                if (agent.indexOf('version/7') != -1) {
                    return initialOffset.top;
                }
                if (agent.indexOf('version/6') != -1 || agent.indexOf('version/5') != -1) {
                    returnValue = returnValue + $(window).scrollTop();
                }
                if (/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent))
                {
                    return returnValue + $(window).scrollTop();
                }
                if (/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent))
                {
                    return returnValue + $(window).scrollTop();
                }
 
                return initialOffset.top;
            }

            return returnValue;
        },

        isChromeMobileBrowser: function () {
            var agent = navigator.userAgent.toLowerCase();
            var result = agent.indexOf('android') != -1;
            return result;
        },

        isOperaMiniMobileBrowser: function () {
            var agent = navigator.userAgent.toLowerCase();
            var result = agent.indexOf('opera mini') != -1 || agent.indexOf('opera mobi') != -1;
            return result;
        },

        isOperaMiniBrowser: function () {
            var agent = navigator.userAgent.toLowerCase();
            var result = agent.indexOf('opera mini') != -1;
            return result;
        },

        isNewSafariMobileBrowser: function () {
            var agent = navigator.userAgent.toLowerCase();
            var result = agent.indexOf('ipad') != -1 || agent.indexOf('iphone') != -1 || agent.indexOf('ipod') != -1;
            result = result && (agent.indexOf('version/5') != -1);
            return result;
        },

        isSafari4MobileBrowser: function () {
            var agent = navigator.userAgent.toLowerCase();
            var result = agent.indexOf('ipad') != -1 || agent.indexOf('iphone') != -1 || agent.indexOf('ipod') != -1;
            result = result && (agent.indexOf('version/4') != -1);
            return result;
        },

        isWindowsPhone: function () {
            var agent = navigator.userAgent.toLowerCase();
            var result = (agent.indexOf('windows phone') != -1 || agent.indexOf('WPDesktop') != -1 || agent.indexOf('ZuneWP7') != -1 || agent.indexOf('msie 9') != -1 || agent.indexOf('msie 11') != -1 || agent.indexOf('msie 10') != -1 && agent.indexOf('touch') != -1);
            return result;
        },

        isSafariMobileBrowser: function () {
            var agent = navigator.userAgent.toLowerCase();
            if (/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent))
            {
                return true;
            }
            if (/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent))
            {
                return true;
            }

            var result = agent.indexOf('ipad') != -1 || agent.indexOf('iphone') != -1 || agent.indexOf('ipod') != -1 || agent.indexOf('mobile safari') != -1;
            return result;
        },

        isIPadSafariMobileBrowser: function () {
            var agent = navigator.userAgent.toLowerCase();
            var result = agent.indexOf('ipad') != -1;
            return result;
        },

        isMobileBrowser: function () {
            var agent = navigator.userAgent.toLowerCase();
            var result = agent.indexOf('ipad') != -1 || agent.indexOf('iphone') != -1 || agent.indexOf('android') != -1;
            return result;
        },

        // Get the touch points from this event
        getTouches: function (e) {
            if (e.originalEvent) {
                if (e.originalEvent.touches && e.originalEvent.touches.length) {
                    return e.originalEvent.touches;
                } else if (e.originalEvent.changedTouches && e.originalEvent.changedTouches.length) {
                    return e.originalEvent.changedTouches;
                }
            }

            if (!e.touches) {
                e.touches = new Array();
                e.touches[0] = e.originalEvent != undefined ? e.originalEvent : e;

                if (e.originalEvent != undefined && e.pageX)
                    e.touches[0] = e;
                if (e.type == 'mousemove') e.touches[0] = e;
            }

            return e.touches;
        },

        getTouchEventName: function (name) {
            if (this.isWindowsPhone()) {

                var agent = navigator.userAgent.toLowerCase();
                if (agent.indexOf('windows phone 7') != -1) {
                    if (name.toLowerCase().indexOf('start') != -1) return 'MSPointerDown';
                    if (name.toLowerCase().indexOf('move') != -1) return 'MSPointerMove';
                    if (name.toLowerCase().indexOf('end') != -1) return 'MSPointerUp';
                }
                if (name.toLowerCase().indexOf('start') != -1) return 'pointerdown';
                if (name.toLowerCase().indexOf('move') != -1) return 'pointermove';
                if (name.toLowerCase().indexOf('end') != -1) return 'pointerup';
            }
            else {
                return name;
            }
        },

        // Dispatches a fake mouse event from a touch event
        dispatchMouseEvent: function (name, touch, target) {
            if (this.simulatetouches)
                return;

            var e = document.createEvent('MouseEvent');
            e.initMouseEvent(name, true, true, touch.view, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
            if (target != null) {
                target.dispatchEvent(e);
            }
        },

        // Find the root node of this target
        getRootNode: function (target) {
            while (target.nodeType !== 1) {
                target = target.parentNode;
            }
            return target;
        },

        setTouchScroll: function (enable, key) {
            if (!this.enableScrolling) this.enableScrolling = [];
            this.enableScrolling[key] = enable;
        },

        touchScroll: function (element, scrollHeight, callback, key, horizontalScroll, verticalScroll) {
            if (element == null)
                return;

            var me = this;
            var scrollY = 0;
            var touchY = 0;
            var movedY = 0;
            var scrollX = 0;
            var touchX = 0;
            var movedX = 0;
            if (!this.scrolling) this.scrolling = [];
            this.scrolling[key] = false;
            var moved = false;
            var $element = $(element);
            var touchTags = ['select', 'input', 'textarea'];
            var touchStart = 0;
            var touchEnd = 0;
            if (!this.enableScrolling) this.enableScrolling = [];
            this.enableScrolling[key] = true;
            var key = key;
            var touchStartName = this.getTouchEventName('touchstart') + ".touchScroll";
            var touchEndName = this.getTouchEventName('touchend') + ".touchScroll";
            var touchMoveName = this.getTouchEventName('touchmove') + ".touchScroll";

      //      horizontalScroll.fadeOut(0);
      //      verticalScroll.fadeOut(0);

            var view, indicator, relative,
               xmax, min, max, offset, reference, pressed, xform,
               velocity, frame, timestamp, ticker,
               amplitude, target, xtarget, xreference, timeConstant;
            max = scrollHeight;
            min = 0;
            offset = 0;
            xoffset = 0;
            xmax = horizontalScroll.jqxScrollBar('max');
            timeConstant = 325; // ms

            function ypos(e)
            {
                // touch event
                if (e.targetTouches && (e.targetTouches.length >= 1))
                {
                    return e.targetTouches[0].clientY;
                }
                else if (e.originalEvent && e.originalEvent.clientY !== undefined)
                {
                    return e.originalEvent.clientY;
                }
                else
                {
                    var touches = me.getTouches(e);
                    return touches[0].clientY;
                }

                // mouse event
                return e.clientY;
            }

            function xpos(e)
            {
                // touch event
                if (e.targetTouches && (e.targetTouches.length >= 1))
                {
                    return e.targetTouches[0].clientX;
                }
                else if (e.originalEvent && e.originalEvent.clientX !== undefined)
                {
                    return e.originalEvent.clientX;
                }
                else
                {
                    var touches = me.getTouches(e);
                    return touches[0].clientX;
                }

                // mouse event
                return e.clientX;
            }

            var track = function()
            {
                var now, elapsed, delta, v;

                now = Date.now();
                elapsed = now - timestamp;
                timestamp = now;
                delta = offset - frame;
                xdelta = xoffset - xframe;
                frame = offset;
                xframe = xoffset;
                pressed = true;
                v = 1000 * delta / (1 + elapsed);
                xv = 1000 * xdelta / (1 + elapsed);
                velocity = 0.8 * v + 0.2 * velocity;
                xvelocity = 0.8 * xv + 0.2 * xvelocity;
            }

            var touchStart = function (event) {
                if (!me.enableScrolling[key])
                    return true;

                // Allow certain HTML tags to receive touch events
                if ($.inArray(event.target.tagName.toLowerCase(), touchTags) !== -1) {
                    return;
                }
                offset = verticalScroll.jqxScrollBar('value');
                xoffset = horizontalScroll.jqxScrollBar('value');

                var touches = me.getTouches(event);
                var touch = touches[0];
                if (touches.length == 1) {
                    me.dispatchMouseEvent('mousedown', touch, me.getRootNode(touch.target));
                }

                function tap(e)
                {
                    pressed = true;
                    reference = ypos(e);
                    xreference = xpos(e);
                    velocity = amplitude = xvelocity = 0;
                    frame = offset;
                    xframe = xoffset;
                    timestamp = Date.now();
                    clearInterval(ticker);
                    ticker = setInterval(track, 100);

                    e.preventDefault();
                 //   e.stopPropagation();
                   // return false;
                }

                tap(event);
                moved = false;
                touchY = touch.pageY;
                touchX = touch.pageX;
                if (me.simulatetouches) {
                    if (touch._pageY != undefined) {
                        touchY = touch._pageY;
                        touchX = touch._pageX;
                    }
                }
                me.scrolling[key] = true;
                xmax = horizontalScroll.jqxScrollBar('max');
                max = verticalScroll.jqxScrollBar('max');
                scrollY = 0;
                scrollX = 0;
                return true;
            }

            if ($element.on) {
                $element.on(touchStartName, touchStart);
            }
            else {
                $element.bind(touchStartName, touchStart);
            }

            var scroll = function(top, event)
            {
                offset = (top > max) ? max : (top < min) ? min : top;           
                callback(null, top, 0, 0, event);
            }

            var hscroll = function (left, event)
            {
                xoffset = (left > xmax) ? xmax : (left < min) ? min : left;
                callback(left, null, 0, 0, event);
            }

            function autoScroll()
            {
                var elapsed, delta;
                if (amplitude)
                {
                    elapsed = Date.now() - timestamp;
                    delta = -amplitude * Math.exp(-elapsed / timeConstant);
                    if (delta > 0.5 || delta < -0.5)
                    {
                        scroll(target + delta, event);
                        requestAnimationFrame(autoScroll);
                    } else
                    {
                        scroll(target);
                        verticalScroll.fadeOut('fast');
                    }
                }
            }
            function hAutoScroll()
            {
                var elapsed, delta;
                if (amplitude)
                {
                    elapsed = Date.now() - timestamp;
                    delta = -amplitude * Math.exp(-elapsed / timeConstant);
                    if (delta > 0.5 || delta < -0.5)
                    {
                        hscroll(xtarget + delta);
                        requestAnimationFrame(hAutoScroll);
                    } else
                    {
                        hscroll(xtarget);
                        horizontalScroll.fadeOut('fast');
                    }

                }
            }
            var touchMove = function (event) {
                if (!me.enableScrolling[key])
                    return true;

                if (!me.scrolling[key]) {
                    return true;
                }
                var touches = me.getTouches(event);
                if (touches.length > 1) {
                    return true;
                }

                var pageY = touches[0].pageY;
                var pageX = touches[0].pageX;

                if (me.simulatetouches) {
                    if (touches[0]._pageY != undefined) {
                        pageY = touches[0]._pageY;
                        pageX = touches[0]._pageX;
                    }
                }

                var dy = pageY - touchY;
                var dx = pageX - touchX;
                touchEnd = pageY;
                touchHorizontalEnd = pageX;
                movedY = dy - scrollY;
                movedX = dx - scrollX;
                moved = true;
                scrollY = dy;
                scrollX = dx;

                var hScrollVisible = horizontalScroll != null ? horizontalScroll[0].style.visibility != 'hidden' : true;
                var vScrollVisible = verticalScroll != null ? verticalScroll[0].style.visibility != 'hidden' : true;


                function drag(e)
                {
                    var y, delta, x;
                    if (pressed)
                    {
                        y = ypos(e);
                        x = xpos(e);
                        delta = reference - y;
                        xdelta = xreference - x;
                        if (delta > 2 || delta < -2)
                        {
                            reference = y;
                            scroll(offset + delta, e);
                            track();
                            e.preventDefault();
                            e.stopPropagation();
                            return false;
                        }
                        else
                        {
                            if (xdelta > 2 || xdelta < -2)
                            {
                                xreference = x;
                                hscroll(xoffset + xdelta, e);
                                track();
                                e.preventDefault();
                                e.stopPropagation();
                                return false;
                            }
                        }
                        e.preventDefault();
                    }
                }

                if (hScrollVisible || vScrollVisible) {
                    if ((hScrollVisible) || (vScrollVisible)) {
                        drag(event);

                        //      callback(-movedX * 1, -movedY * 1, dx, dy, event);
                        //event.preventDefault();
                        //event.stopPropagation();
                        //if (event.preventManipulation) {
                        //    event.preventManipulation();
                        //}
                        //return false;
                    }
                }
            }

            if ($element.on) {
                $element.on(touchMoveName, touchMove);
            }
            else $element.bind(touchMoveName, touchMove);

   

            var touchCancel = function (event) {
                if (!me.enableScrolling[key])
                    return true;

                var touch = me.getTouches(event)[0];
                if (!me.scrolling[key]) {
                    return true;
                }
           

                pressed = false;
                clearInterval(ticker);
                if (velocity > 10 || velocity < -10)
                {
                    amplitude = 0.8 * velocity;
                    target = Math.round(offset + amplitude);
                    timestamp = Date.now();
                    requestAnimationFrame(autoScroll);
                    verticalScroll.fadeIn(100);
                }
                else if (xvelocity > 10 || xvelocity < -10)
                {
                    amplitude = 0.8 * xvelocity;
                    xtarget = Math.round(xoffset + amplitude);
                    timestamp = Date.now();
                    requestAnimationFrame(hAutoScroll);
                    horizontalScroll.fadeIn(100);
                }
                else
                {
                    horizontalScroll.fadeOut(100);
                    verticalScroll.fadeOut(100);
                }

                me.scrolling[key] = false;
                if (moved) {
                    me.dispatchMouseEvent('mouseup', touch, event.target);
                } else {
                    var touch = me.getTouches(event)[0],
						t = me.getRootNode(touch.target);

                    //        event.preventDefault();
                    //         event.stopPropagation();
                    // Dispatch fake mouse up and click events if this touch event did not move
                    me.dispatchMouseEvent('mouseup', touch, t);
                    me.dispatchMouseEvent('click', touch, t);
                    return true;
                }
            }

            if (this.simulatetouches)
            {
                var windowBindFunc = $(window).on != undefined || $(window).bind;
                var windowMouseUp = function (event)
                {
                    try
                    {
                        touchCancel(event);
                    }
                    catch (er)
                    {
                    }
                    me.scrolling[key] = false;
                };
                $(window).on != undefined ? $(document).on('mouseup.touchScroll', windowMouseUp) : $(document).bind('mouseup.touchScroll', windowMouseUp);

                if (window.frameElement)
                {
                    if (window.top != null)
                    {
                        var eventHandle = function (event)
                        {
                            try
                            {
                                touchCancel(event);
                            }
                            catch (er)
                            {
                            }
                            me.scrolling[key] = false;
                        };

                        if (window.top.document)
                        {
                            $(window.top.document).on ? $(window.top.document).on('mouseup', eventHandle) : $(window.top.document).bind('mouseup', eventHandle);
                        }
                    }
                }

                var docBindFunc = $(document).on != undefined || $(document).bind;
                var touchEndFunc = function (event)
                {
                    if (!me.scrolling[key])
                    {
                        return true;
                    }
                    me.scrolling[key] = false;
                    var touch = me.getTouches(event)[0],
						target = me.getRootNode(touch.target);

                    // Dispatch fake mouse up and click events if this touch event did not move
                    me.dispatchMouseEvent('mouseup', touch, target);
                    me.dispatchMouseEvent('click', touch, target);
                };

                $(document).on != undefined ? $(document).on('touchend', touchEndFunc) : $(document).bind('touchend', touchEndFunc);
            }

            if ($element.on) {
                $element.on('dragstart', function (event) {
                    event.preventDefault();
                });
                $element.on('selectstart', function (event) {
                    event.preventDefault();
                });
            }
            $element.on ? $element.on(touchEndName + ' touchcancel.touchScroll', touchCancel) : $element.bind(touchEndName + ' touchcancel.touchScroll', touchCancel);
        }
    });

    $.jqx.cookie = $.jqx.cookie || {};
    $.extend($.jqx.cookie,
    {
        cookie: function (key, value, options) {
            // set cookie.
            if (arguments.length > 1 && String(value) !== "[object Object]") {
                options = $.extend({}, options);

                if (value === null || value === undefined) {
                    options.expires = -1;
                }

                if (typeof options.expires === 'number') {
                    var days = options.expires, t = options.expires = new Date();
                    t.setDate(t.getDate() + days);
                }

                value = String(value);

                return (document.cookie = [
                encodeURIComponent(key), '=',
                options.raw ? value : encodeURIComponent(value),
                options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
                options.path ? '; path=' + options.path : '',
                options.domain ? '; domain=' + options.domain : '',
                options.secure ? '; secure' : ''
        ].join(''));
            }
            // get cookie...
            options = value || {};
            var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
            return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
        }
    });

    // stringutilities
    $.jqx.string = $.jqx.string || {};
    $.extend($.jqx.string,
    {
        replace: function (text, stringToFind, stringToReplace) {
            if (stringToFind === stringToReplace) return this;
            var temp = text;
            var index = temp.indexOf(stringToFind);
            while (index != -1) {
                temp = temp.replace(stringToFind, stringToReplace);
                index = temp.indexOf(stringToFind);
            }
            return temp;
        },

        contains: function (fullString, value) {
            if (fullString == null || value == null)
                return false;

            return fullString.indexOf(value) != -1;
        },

        containsIgnoreCase: function (fullString, value) {
            if (fullString == null || value == null)
                return false;

            return fullString.toString().toUpperCase().indexOf(value.toString().toUpperCase()) != -1;
        },

        equals: function (fullString, value) {
            if (fullString == null || value == null)
                return false;

            fullString = this.normalize(fullString);

            if (value.length == fullString.length) {
                return fullString.slice(0, value.length) == value;
            }

            return false;
        },

        equalsIgnoreCase: function (fullString, value) {
            if (fullString == null || value == null)
                return false;

            fullString = this.normalize(fullString);

            if (value.length == fullString.length) {
                return fullString.toUpperCase().slice(0, value.length) == value.toUpperCase();
            }

            return false;
        },

        startsWith: function (fullString, value) {
            if (fullString == null || value == null)
                return false;

            return fullString.slice(0, value.length) == value;
        },

        startsWithIgnoreCase: function (fullString, value) {
            if (fullString == null || value == null)
                return false;

            return fullString.toUpperCase().slice(0, value.length) == value.toUpperCase();
        },

        normalize: function (fullString) {
            if (fullString.charCodeAt(fullString.length - 1) == 65279) {
                fullString = fullString.substring(0, fullString.length - 1);
            }

            return fullString;
        },

        endsWith: function (fullString, value) {
            if (fullString == null || value == null)
                return false;

            fullString = this.normalize(fullString);
            return fullString.slice(-value.length) == value;
        },

        endsWithIgnoreCase: function (fullString, value) {
            if (fullString == null || value == null)
                return false;

            fullString = this.normalize(fullString);

            return fullString.toUpperCase().slice(-value.length) == value.toUpperCase();
        }
    });

    $.extend($.easing, {
        easeOutBack: function (x, t, b, c, d, s) {
            if (s == undefined) s = 1.70158;
            return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
        },
        easeInQuad: function (x, t, b, c, d) {
            return c * (t /= d) * t + b;
        },
        easeInOutCirc: function (x, t, b, c, d) {
            if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
            return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
        },
        easeInOutSine: function (x, t, b, c, d) {
            return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
        },
        easeInCubic: function (x, t, b, c, d) {
            return c * (t /= d) * t * t + b;
        },
        easeOutCubic: function (x, t, b, c, d) {
            return c * ((t = t / d - 1) * t * t + 1) + b;
        },
        easeInOutCubic: function (x, t, b, c, d) {
            if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;
            return c / 2 * ((t -= 2) * t * t + 2) + b;
        },
        easeInSine: function (x, t, b, c, d) {
            return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
        },
        easeOutSine: function (x, t, b, c, d) {
            return c * Math.sin(t / d * (Math.PI / 2)) + b;
        },
        easeInOutSine: function (x, t, b, c, d) {
            return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
        }
    });
})(jqxBaseFramework);

(function ($) {
    $.extend($.event.special,
    {
        "close": { noBubble: true },
        "open": { noBubble: true },
        "cellclick": { noBubble: true },
        "rowclick": { noBubble: true },
        "tabclick": { noBubble: true },
        "selected": { noBubble: true },
        "expanded": { noBubble: true },
        "collapsed": { noBubble: true },
        "valuechanged": { noBubble: true },
        "expandedItem": { noBubble: true },
        "collapsedItem": { noBubble: true },
        "expandingItem": { noBubble: true },
        "collapsingItem": { noBubble: true }
    });

    $.fn.extend({
        ischildof: function (filter_string) {
            var parents = $(this).parents().get();

            for (var j = 0; j < parents.length; j++) {
                if (typeof filter_string != "string") {
                    var parent = parents[j];
                    if (filter_string !== undefined) {
                        if (parent == filter_string[0])
                            return true;
                    }
                }
                else {
                    if (filter_string !== undefined) {
                        if ($(parents[j]).is(filter_string)) {
                            return true;
                        }
                    }
                }
            }

            return false;
        }
    });

    $.fn.jqxProxy = function () {
        var widget = $(this).data().jqxWidget;
        var args = Array.prototype.slice.call(arguments, 0);
        var element = widget.element;
        if (!element) element = widget.base.element;
        return $.jqx.jqxWidgetProxy(widget.widgetName, element, args);
    }

    var originalVal = this.originalVal = $.fn.val;
    $.fn.val = function (value) {
        if (typeof value == 'undefined') {
            if ($(this).hasClass('jqx-widget')) {
                var widget = $(this).data().jqxWidget;
                if (widget && widget.val) {
                    return widget.val();
                }
            }
            return originalVal.call(this);
        }
        else {
            if ($(this).hasClass('jqx-widget')) {
                var widget = $(this).data().jqxWidget;
                if (widget && widget.val) {
                    if (arguments.length != 2) {
                        return widget.val(value);
                    }
                    else {
                        return widget.val(value, arguments[1]);
                    }
                }
            }

            return originalVal.call(this, value);
        }
    };

    if ($.fn.modal && $.fn.modal.Constructor) {
        $.fn.modal.Constructor.prototype.enforceFocus = function () {
            $(document)
              .off('focusin.bs.modal') // guard against infinite focus loop
              .on('focusin.bs.modal', $.proxy(function (e) {
                  if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
                      if ($(e.target).parents().hasClass('jqx-popup'))
                          return true;
                      this.$element.trigger('focus')
                  }
              }, this));
        }
    }

    $.fn.coord = function (options) {
        var docElem, win,
            box = { top: 0, left: 0 },
            elem = this[0],
            doc = elem && elem.ownerDocument;
        if (!doc) {
            return;
        }
        docElem = doc.documentElement;
        if (!$.contains(docElem, elem)) {
            return box;
        }
        if (typeof elem.getBoundingClientRect !== undefined) {
            box = elem.getBoundingClientRect();
        }
        var getWindow = function(elem) {
            return $.isWindow(elem) ?
                elem :
                elem.nodeType === 9 ?
                    elem.defaultView || elem.parentWindow :
                    false;
        };

        win = getWindow(doc);
        var additionalLeftOffset = 0;
        var additionalTopOffset = 0;
        var agent = navigator.userAgent.toLowerCase();
        var result = agent.indexOf('ipad') != -1 || agent.indexOf('iphone') != -1;
        if (result) {
            // fix for iphone/ipad left offsets.
            additionalLeftOffset = 2;
        }
        if (true == options) {
            if ($(document.body).css('position') != 'static') {
                var coords = $(document.body).coord();
                additionalLeftOffset = -coords.left;
                additionalTopOffset = -coords.top;
            }
        }

        return {
            top: additionalTopOffset + box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),
            left: additionalLeftOffset + box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0)
        };
    };
})(jqxBaseFramework);
;
/*
jQWidgets v4.1.2 (2016-Apr)
Copyright (c) 2011-2016 jQWidgets.
License: http://jqwidgets.com/license/
*/

(function ($) {

    $.jqx.observableArray = function (items, observeFunction) {
        if (typeof (items) == 'string') {
            items = $.parseJSON(items);
        }

        if (!Object.defineProperty ||
    !(function () { try { Object.defineProperty({}, 'x', {}); return true; } catch (e) { return false; } }())) {
            var orig = Object.defineProperty;
            Object.defineProperty = function (o, prop, desc) {
                // In IE8 try built-in implementation for defining properties on DOM prototypes.
                if (orig) { try { return orig(o, prop, desc); } catch (e) { } }

                if (o !== Object(o)) { throw TypeError("Object.defineProperty called on non-object"); }
                if (Object.prototype.__defineGetter__ && ('get' in desc)) {
                    Object.prototype.__defineGetter__.call(o, prop, desc.get);
                }
                if (Object.prototype.__defineSetter__ && ('set' in desc)) {
                    Object.prototype.__defineSetter__.call(o, prop, desc.set);
                }
                if ('value' in desc) {
                    o[prop] = desc.value;
                }
                else if (!o[prop]) {
                    o[prop] = desc;
                }

                return o;
            };
        }

        if (!Array.prototype.forEach) {
            Array.prototype.forEach = function (fun /*, thisp */) {
                if (this === void 0 || this === null) { throw TypeError(); }

                var t = Object(this);
                var len = t.length >>> 0;
                if (typeof fun !== "function") { throw TypeError(); }

                var thisp = arguments[1], i;
                for (i = 0; i < len; i++) {
                    if (i in t) {
                        fun.call(thisp, t[i], i, t);
                    }
                }
            };
        }

        if (typeof Object.getOwnPropertyNames !== "function") {
            Object.getOwnPropertyNames = function (o) {
                if (o !== Object(o)) { throw TypeError("Object.getOwnPropertyNames called on non-object"); }
                var props = [], p;
                for (p in o) {
                    if (Object.prototype.hasOwnProperty.call(o, p)) {
                        props.push(p);
                    }
                }
                return props;
            };
        }

        var that = this, notifier, array = [];
        that.notifier = null;
        that.name = "observableArray";
        that.observing = true;
        that.changes = new Array();

        var observeFunction = observeFunction;
        that.observe = function () {
            that.observing = true;
            if (arguments.length == 1 ) {
                observeFunction = arguments[0];
            }
        }

        that.unobserve = function () {
            that.observing = false;
        }

        that.toArray = function () {
            return array.slice(0);
        }

        that.toJSON = function (keys, subArray) {
            var value = array;
            if (subArray) {
                value = subArray;
            }
            var escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
            meta = {
             '\b': '\\b',
             '\t': '\\t',
             '\n': '\\n',
             '\f': '\\f',
             '\r': '\\r',
             '"': '\\"',
             '\\': '\\\\'
            };

            function quote(string) {
                return '"' + string.replace(escapable, function (a) {
                    var c = meta[a];
                    return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
                }) + '"';
            }

            function formatNumber(n) {
                return n < 10 ? '0' + n : n;
            }

            function stringifyDate(value) {
                var date;
                if (isFinite(value.valueOf())) {
                    date = value.getUTCFullYear() + '-' + formatNumber(value.getUTCMonth() + 1) + '-' +
                    formatNumber(value.getUTCDate()) + 'T' + formatNumber(value.getUTCHours()) + ':' +
                    formatNumber(value.getUTCMinutes()) + ':' + formatNumber(value.getUTCSeconds()) + 'Z"';
                } else {
                    date = 'null';
                }
                return date;
            }

            function stringifyArray(value) {
                var len = value.length,
                    partial = [],
                    i;
                for (i = 0; i < len; i++) {
                    partial.push(str(i, value) || 'null');
                }

                return '[' + partial.join(',') + ']';
            }

            function stringifyObject(value) {
                var partial = [],
                    i, v;
                for (i in value) {
                    if (Object.prototype.hasOwnProperty.call(value, i)) {
                        if (i != "" && keys && keys.indexOf(i) === -1) {
                            continue;
                        }

                        v = str(i, value);
                        if (v) {
                            partial.push(quote(i) + ':' + v);
                        }
                    }
                }
                return '{' + partial.join(',') + '}';
            }

            function stringifyReference(value) {
                switch (Object.prototype.toString.call(value)) {
                    case '[object Date]':
                        return stringifyDate(value);
                    case '[object Array]':
                        return stringifyArray(value);
                }
                return stringifyObject(value);
            }

            function stringifyPrimitive(value, type) {
                switch (type) {
                    case 'string':
                        return quote(value);
                    case 'number':
                    case 'float':
                    case 'integer':
                    case 'int':
                        return isFinite(value) ? value : 'null';
                    case 'boolean':
                        return value;
                }
                return 'null';
            }

            function str(key, holder) {
                var value = holder[key], type = typeof value;

                if (value && typeof value === 'object' && typeof value.toJSON === 'function') {
                    value = value.toJSON(key);
                    type = typeof value;
                }
                if (/(number|float|int|integer|string|boolean)/.test(type) || (!value && type === 'object')) {
                    return stringifyPrimitive(value, type);
                } else {
                    return stringifyReference(value);
                }
            }
            if (!keys && window.JSON && typeof window.JSON.stringify === 'function') {
                return window.JSON.stringify(value);
            }

            return str("", { "": value });
        }

        that.defineIndexProperty = function (index) {
            if (!(index in that)) {
                var defineProperty = function (obj, property, path, context) {
                    var newValue = obj[property];
                    var oldValue = newValue;
                    var getter = function () {
                        return oldValue;
                    }
                    var setter = function (val) {
                        newValue = val;
                        if (oldValue !== newValue) {
                            var oldValueArg = oldValue;
                            oldValue = newValue;
                            if (typeof notifier === "function") {
                                var index = array.indexOf(context);
                               
                                var propertyPath = "";
                                var getPath = function (obj, path) {
                                    Object.getOwnPropertyNames(obj).forEach(function (name) {
                                        var type = $.type(obj[name]);
                                        if (type == "array" || type == "object") {
                                            getPath(obj[name], path + "." + name);
                                        }
                                        else if (property === name) {
                                            propertyPath = path + "." + name;
                                        }
                                    });
                                }
                                getPath(context, index);
                          
                                notifier({ object: that, type: 'update', path: propertyPath, index: index, name: property, newValue: newValue, oldValue: oldValueArg });
                            }
                        }
                        oldValue = newValue;
                        return newValue;
                    }
                    if (obj[property] != undefined && property != "length") {
                        if (Object.defineProperty) 
                            Object.defineProperty(obj, property, {
                                get: getter,
                                set: setter
                            });
                        else if (Object.prototype.__defineGetter__ && Object.prototype.__defineSetter__) {
                            Object.prototype.__defineGetter__.call(obj, property, getter);
                            Object.prototype.__defineSetter__.call(obj, property, setter);
                        }
                    }
                }

                var defineProperties = function (obj, path, context) {
                    var type = $.type(obj);
                    if (/(number|float|int|integer|string|boolean)/.test(type)) {
                        return;
                    }

                    if (obj === undefined) {
                        return;
                    }

                    Object.getOwnPropertyNames(obj).forEach(function (name) {
                        var type = $.type(obj[name]);
                        if (type == "array" || type == "object") {
                            defineProperty(obj, name, path + "." + name, context);
                            defineProperties(obj[name], path + "." + name, context);
                        }
                        else {
                            defineProperty(obj, name, path + "." + name, context);
                        }
                    });
                }

                Object.defineProperty(that, index, {
                    configurable: true,
                    enumerable: true,
                    get: function () {
                        return array[index];
                    },
                    set: function (newValue) {
                        var oldValue = array[index];
                        if (that.toJSON(null, oldValue) != that.toJSON(null, newValue)) {
                            array[index] = newValue;
                            if (typeof notifier === "function") {
                                notifier({ object: that, type: 'update', path: index.toString(), index: index, name: "index", newValue: newValue, oldValue: oldValue });
                            }
                            defineProperties(newValue, index, newValue);
                        }
                    }
                });
                defineProperties(that[index], index, that[index]);
            }
        }

        that.push = function () {
            var index;
            for (var i = 0, ln = arguments.length; i < ln; i++) {
                index = array.length;
                array.push(arguments[i]);
                that.defineIndexProperty(index);
                if (typeof notifier === "function") {
                    notifier({ object: that, type: 'add', name: "length", index: index, newValue: array.length, oldValue: index });
                }
            }
            return array.length;
        };

        that.pop = function () {
            if (~array.length) {
                var index = array.length - 1,
                    item = array.pop();
                delete that[index];
                if (typeof notifier === "function") {
                    notifier({ object: that, type: 'delete', name: "length", index: index, newValue: array.length, oldValue: index });
                }
                return item;
            }
        };

        that.unshift = function () {
            var index = array.length;
            for (var i = 0, ln = arguments.length; i < ln; i++) {
                array.splice(i, 0, arguments[i]);
                that.defineIndexProperty(array.length - 1);
            }
            if (typeof notifier === "function") {
                notifier({ object: that, type: 'add', index: 0, name: "length", newValue: array.length, oldValue: index });
            }
            return array.length;
        };

        that.shift = function () {
            var index = array.length;
            if (~array.length) {
                var item = array.shift();
                array.length === 0 && delete that[index];
                if (typeof notifier === "function") {
                    notifier({ object: that, type: 'delete', index: index, name: "length", newValue: array.length, oldValue: index });
                }
                return item;
            }
        };

        that.slice = function (start, end, observeFunction) {
            var newArray = array.slice(start, end);
            var observableArray = new $.jqx.observableArray(newArray, observeFunction);
            return observableArray;
        }

        that.splice = function (index, howMany, observeFunction) {
            var removed = [],
                item,
                pos;

            index = !~index ? array.length - index : index;

            howMany = (howMany == null ? array.length - index : howMany) || 0;

            while (howMany--) {
                item = array.splice(index, 1)[0];
                removed.push(item);
                delete that[array.length];
                if (typeof notifier === "function") {
                    notifier({ object: that, type: 'delete', index: index, name: "length", newValue: -1, oldValue: index });
                }
            }

            for (var i = 2, ln = arguments.length; i < ln; i++) {
                array.splice(index, 0, arguments[i]);
                defineIndexProperty(array.length - 1);
                if (typeof notifier === "function") {
                    notifier({ object: that, type: 'add', index: index, name: "length", newValue: array.length - 1, oldValue: index });
                }
                index++;
            }

            var observableArray = new $.jqx.observableArray(removed, observeFunction);
            return observableArray;
        };

        Object.defineProperty(that, "length", {
            configurable: false,
            enumerable: true,
            get: function () {
                return array.length;
            },
            set: function (value) {
                var n = Number(value);
                if (n % 1 === 0 && n >= 0) {
                    if (n < array.length) {
                        that.splice(n);
                    } else if (n > array.length) {
                        that.push.apply(that, new Array(n - array.length));
                    }
                } else {
                    throw new RangeError("Invalid array length");
                }
                return value;
            }
        });

        $.jqx.observableArray.prototype.fromArray = function (array, observeFunction) {
            var observableArray = new $.jqx.observableArray(array, observeFunction);
            return observableArray;
        }

        $.jqx.observableArray.prototype.clone = function () {
            var observableArray = new $.jqx.observableArray(array, observeFunction);
            observableArray.observing = that.observing;
            observableArray.changes = that.changes;
            observableArray.notifier = that.notifier;
            return observableArray;
        }

        that.remove = function (index) {
            if (index < 0 || index >= that.length) {
                throw new Error('Invalid index : ' + index);
            }
            if (that.hasOwnProperty(index)) {
                var oldValue = that[index];
                that[index] = undefined;
                array[index] = undefined;
                if (typeof notifier === "function") {
                    notifier({ object: that, type: 'delete', index: index, name: "index", newValue: undefined, oldValue: oldValue });
                }
                return true;
            }
            return false;
        };

        that.concat = function (args, observeFunction) {
            var newArray = array.concat(args);
            var observableArray = new $.jqx.observableArray(newArray, observeFunction);
            return observableArray;
        };

        Object.getOwnPropertyNames(Array.prototype).forEach(function (name) {
            if (!(name in that)) {
                var fn = function () {
                    var tmp = that.observing;
                    that.observing = false;
                    var arrayFn = array[name];
                    var result = arrayFn.apply(array, arguments);
                    that.observing = tmp;
                    return result;
                }
                Object.defineProperty(that, name, {
                    configurable: false,
                    enumerable: true,
                    writeable: false,
                    value: fn
                });
            }
        });


        that.set = function (index, value) {
            if ($.type(index) == "string" && index.split(".").length > 1) {
                var items = index.split(".");
                var obj = that;
                for (var i = 0; i < items.length; i++) {
                    if (i === 0) {
                        if (items[i] >= that.length) {
                            throw new Error("Invalid Index: " + index);
                        }
                    }
                    if (i < items.length - 1) {
                        obj = obj[items[i]];
                    }
                    else {
                        obj[items[i]] = value;
                    }
                }
                return true;
            }
            if (index >= that.length) {
                that.push(value);
            }
            else {
                that[index] = value;
            }
            return true;
        }

        that.get = function (index) {
            return that[index];
        }

        if (items instanceof Array) {
            that.push.apply(that, items);
        }

        notifier = function () {
            if (!that.observing) {
                return;
            }

            if (arguments && arguments[0]) {
                that.changes.push(arguments[0]);
            }

            if (observeFunction) {
                observeFunction.apply(that, arguments);
            }
            if (that.notifier) {
                that.notifier.apply(that, arguments);
            }
        }
      
        return that;
    }

    $.jqx.formatDate = function(value, format, calendar)
    {
        var result = $.jqx.dataFormat.formatdate(value, format, calendar);
        return result;
    }

    $.jqx.formatNumber = function (value, format, calendar) {
        var result = $.jqx.dataFormat.formatnumber(value, format, calendar);
        return result;
    }

    $.jqx.dataAdapter = function (source, options) {
        if (source != undefined) {
            if (source.dataFields !== undefined) {
                source.datafields = source.dataFields;
            }
            if (source.dataType !== undefined) {
                source.datatype = source.dataType;
            }
            if (source.localData !== undefined) {
                source.localdata = source.localData;
            }
            if (source.sortColumn !== undefined) {
                source.sortcolumn = source.sortColumn;
            }
            if (source.sortDirection !== undefined) {
                source.sortdirection = source.sortDirection;
            }
            if (source.sortOrder !== undefined) {
                source.sortdirection = source.sortOrder;
            }
            if (source.formatData !== undefined) {
                source.formatdata = source.formatData;
            }
            if (source.processData !== undefined) {
                source.processdata = source.processData;
            }
            if (source.pageSize !== undefined) {
                source.pagesize = source.pageSize;
            }
            if (source.pageNum !== undefined) {
                source.pagenum = source.pageNum;
            }
            if (source.updateRow !== undefined) {
                source.updaterow = source.updateRow;
            }
            if (source.addRow !== undefined) {
                source.addrow = source.addRow;
            }
            if (source.deleteRow !== undefined) {
                source.deleterow = source.deleteRow;
            }
            if (source.contentType !== undefined) {
                source.contenttype = source.contentType;
            }
            if (source.totalRecords != undefined) {
                source.totalrecords = source.totalRecords;
            }
            if (source.loadError != undefined) {
                source.loadError = source.loadError;
            }
            if (source.sortComparer != undefined) {
                source.sortcomparer = source.sortComparer;
            }
        }

        this._source = source;
        this._options = options || {};
        if (source.beforeLoadComplete != undefined) {
            this._options.beforeLoadComplete = this._source.beforeLoadComplete;
        }
        if (source.downloadComplete != undefined) {
            this._options.downloadComplete = this._source.downloadComplete;
        }
        if (source.loadComplete != undefined) {
            this._options.loadComplete = this._source.loadComplete;
        }
        if (source.autoBind != undefined) {
            this._options.downloadComplete = this._source.autoBind;
        }
        if (source.formatData != undefined) {
            this._options.formatData = this._source.formatData;
        }
        if (source.loadError != undefined) {
            this._options.loadError = this._source.loadError;
        }
        if (source.beforeSend != undefined) {
            this._options.beforeSend = this._source.beforeSend;
        }
        if (source.contentType != undefined) {
            this._options.contentType = this._source.contentType;
        }
        if (source.async != undefined) {
            this._options.async = this._source.async;
        }
        if (source.loadServerData != undefined) {
            this._options.loadServerData = this._source.loadServerData;
        }
        if (source.uniqueDataFields != undefined) {
            this._options.uniqueDataFields = this._source.uniqueDataFields;
        }

        this.records = new Array();
        this._downloadComplete = new Array();
        this._bindingUpdate = new Array();

        if (source != undefined && source.localdata != null && typeof source.localdata == "function") {
            var localData = source.localdata();
            if (localData != null) {
                source._localdata = source.localdata;
                var me = this;
                if (source._localdata.subscribe) {
                    me._oldlocaldata = [];
                    source._localdata.subscribe(function (value) {
                        var deepClone = function (objThing) {
                            if ($.isArray(objThing)) {
                                return $.makeArray(deepClone($(objThing)));
                            }
                            return $.extend(true, {}, objThing);
                        };
                        if (me.suspendKO == false || me.suspendKO == undefined || me._oldlocaldata.length == 0) {
                            me._oldlocaldata = deepClone(value);
                        }
                    }, source._localdata, 'beforeChange');

                    source._localdata.subscribe(function (value) {
                        if (me.suspendKO == false || me.suspendKO == undefined) {
                            var changeType = "";
                            me._oldrecords = me.records;
                            if (me._oldlocaldata.length == 0) {
                                source.localdata = source._localdata();
                            }

                            if (me._oldlocaldata.length == 0) {
                                changeType = 'change';
                            }
                            else {
                                if (value) {
                                    if (me._oldlocaldata.length == value.length) {
                                        changeType = 'update';
                                    }
                                    if (me._oldlocaldata.length > value.length) {
                                        changeType = 'remove';
                                    }
                                    if (me._oldlocaldata.length < value.length) {
                                        changeType = 'add';
                                    }
                                }
                            }
                            me.dataBind(null, changeType);
                        }
                    }, source._localdata, 'change');

                    me._knockoutdatasource = true;
                }

                source.localdata = localData;
            }
        }
        if (this._options.autoBind == true) {
            this.dataBind();
        }
    }

    $.jqx.dataAdapter.prototype = {
        getrecords: function () {
            return this.records;
        },

        beginUpdate: function () {
            this.isUpdating = true;
        },

        endUpdate: function (refresh) {
            this.isUpdating = false;
            if (refresh != false) {
                if (this._changedrecords && this._changedrecords.length > 0) {
                    this.callBindingUpdate("update");
                    this._changedrecords = [];
                }
                else {
                    this.dataBind(null, "");
                }
            }
        },

        formatDate: function(value, format, calendar)
        {
            var result = $.jqx.dataFormat.formatdate(value, format, calendar);
            return result;
        },

        formatNumber: function (value, format, calendar) {
            var result = $.jqx.dataFormat.formatnumber(value, format, calendar);
            return result;
        },

        dataBind: function (objectuniqueId, collectionChanged) {
            if (this.isUpdating == true)
                return;

            var source = this._source;
            if (!source)
                return;

            if (source.generatedfields) {
                source.datafields = null;
                source.generatedfields = null;
            }

            $.jqx.dataFormat.datescache = new Array();
            if (source.dataFields != null) {
                source.datafields = source.dataFields;
            }

            if (source.recordstartindex == undefined) {
                source.recordstartindex = 0;
            }
            if (source.recordendindex == undefined) {
                source.recordendindex = 0;
            }
            if (source.loadallrecords == undefined) {
                source.loadallrecords = true;
            }
            if (source.root == undefined) source.root = '';
            if (source.record == undefined) source.record = '';

            if (source.sort != undefined) {
                this.sort = source.sort;
            }

            if (source.filter != undefined) {
                this.filter = source.filter;
            }
            else this.filter = null;

            if (source.sortcolumn != undefined) {
                this.sortcolumn = source.sortcolumn;
            }

            if (source.sortdirection != undefined) {
                this.sortdirection = source.sortdirection;
            }

            if (source.sortcomparer != undefined) {
                this.sortcomparer = source.sortcomparer;
            }

            this.records = new Array();
            var options = this._options || {};
            this.virtualmode = options.virtualmode != undefined ? options.virtualmode : false;
            this.totalrecords = options.totalrecords != undefined ? options.totalrecords : 0;
            this.pageable = options.pageable != undefined ? options.pageable : false;
            this.pagesize = options.pagesize != undefined ? options.pagesize : 0;
            this.pagenum = options.pagenum != undefined ? options.pagenum : 0;
            this.cachedrecords = options.cachedrecords != undefined ? options.cachedrecords : new Array();
            this.originaldata = new Array();
            this.recordids = new Array();
            this.updaterow = options.updaterow != undefined ? options.updaterow : null;
            this.addrow = options.addrow != undefined ? options.addrow : null;
            this.deleterow = options.deleterow != undefined ? options.deleterow : null;
            this.cache = options.cache != undefined ? options.cache : false;
            this.unboundmode = false;
            if (source.formatdata != undefined) {
                options.formatData = source.formatdata;
            }
            if (source.data != undefined) {
                if (options.data == undefined) {
                    options.data = {};
                }
                $.extend(options.data, source.data);
            }

            if (source.mapChar != undefined) {
                source.mapchar = source.maxChar;
            }

            if (source.mapchar != undefined) {
                this.mapChar = source.mapchar ? source.mapchar : '>';
            }
            else {
                this.mapChar = options.mapChar ? options.mapChar : '>';
            }

            if (options.unboundmode || source.unboundmode) {
                this.unboundmode = options.unboundmode || source.unboundmode;
            }

            if (source.cache != undefined) {
                this.cache = source.cache;
            }

            if (this.koSubscriptions) {
                for (var subscription = 0; subscription < this.koSubscriptions.length; subscription++) {
                    this.koSubscriptions[subscription].dispose();
                }
            }
            this.koSubscriptions = new Array();

            if (this.pagenum < 0) {
                this.pagenum = 0;
            }

            var me = this;

            var datatype = source.datatype;

            if (source.datatype === 'csv' || source.datatype === 'tab' || source.datatype === 'tsv' || source.datatype == 'text')
                datatype = 'text';

            var async = options.async != undefined ? options.async : true;

            if (source.async != undefined) {
                async = source.async;
            }

            switch (datatype) {
                case "local":
                case "array":
                case "observablearray":
                case "observableArray":
                default:
                    if (source.localdata == undefined && source.length) {
                        source.localdata = new Array();
                        for (var i = 0; i < source.length; i++) {
                            source.localdata[source.localdata.length] = source[i];
                            source[i].uid = i;
                        }
                    }
                    if (source.beforeprocessing && $.isFunction(source.beforeprocessing)) {
                        source.beforeprocessing(source.localdata);
                    }

                    var length = source.localdata.length;
                    this.totalrecords = this.virtualmode ? (source.totalrecords || length) : length;

                    if (this.unboundmode) {
                        this.totalrecords = this.unboundmode ? (source.totalrecords || length) : length;
                        var datafieldslength = source.datafields ? source.datafields.length : 0;
                        if (datafieldslength > 0) {
                            for (var i = 0; i < this.totalrecords; i++) {
                                var record = {};
                                for (var j = 0; j < datafieldslength; j++) {
                                    record[source.datafields[j].name] = "";
                                }
                                record.uid = i;
                                source.localdata[source.localdata.length] = record;
                            }
                        }
                    }

                    if (this.totalrecords == undefined) {
                        this.totalrecords = 0;
                    }

                    var datafieldslength = source.datafields ? source.datafields.length : 0;
                    var getrecord = function (record, datafieldslength) {
                        var datarow = {};
                        for (var j = 0; j < datafieldslength; j++) {
                            var datafield = source.datafields ? source.datafields[j] : {};
                            var value = '';
                            if (undefined == datafield || datafield == null) {
                                continue;
                            }

                            if (datafield.map) {
                                if ($.isFunction(datafield.map)) {
                                    value = datafield.map(record);
                                }
                                else {
                                    var splitMap = datafield.map.split(me.mapChar);
                                    if (splitMap.length > 0) {
                                        var datarecord = record;
                                        for (var p = 0; p < splitMap.length; p++) {
                                            if (!datarecord) continue;
                                            datarecord = datarecord[splitMap[p]];
                                        }
                                        value = datarecord;
                                    }
                                    else {
                                        value = record[datafield.map];
                                    }
                                }

                                if (value != undefined && value != null) {
                                    value = value.toString();
                                }
                                else {
                                    if (value == undefined && value != null) {
                                        value = '';
                                    }
                                }
                            }
                            var isEmptyString = false;
                            // searches by both selectors when necessary.
                            if (value == '') {
                                isEmptyString = true;
                                value = record[datafield.name];
                                if (value != undefined && value != null) {
                                    if (source._localdata && value.subscribe) {
                                        value = value();
                                    }
                                    else {
                                        if (datafield.type != "array") {
                                            value = value.toString();
                                        }
                                    }
                                }
                            }
                            if (value == "[object Object]" && datafield.map && isEmptyString) {
                                value = '';
                            }

                            value = me.getvaluebytype(value, datafield);
                            if (datafield.displayname != undefined) {
                                datarow[datafield.displayname] = value;
                            }
                            else {
                                datarow[datafield.name] = value;
                            }
                        }
                        return datarow;
                    }

                    if (source._localdata) {
                        this._changedrecords = [];
                        this.records = new Array();
                        var localdata = source._localdata();

                        $.each(localdata, function (i, value) {
                            if (typeof value === 'string') {
                                me.records.push(value);
                            }
                            else {
                                var record = {};
                                var _koindex = 0;
                                var dataObject = this;
                                $.each(this, function (obj, objvalue) {
                                    var map = null;
                                    var type = 'string';
                                    var dataFieldName = obj;
                                    if (datafieldslength > 0) {
                                        var hasField = false;
                                        var hasMap = false;
                                        for (var j = 0; j < datafieldslength; j++) {
                                            var datafield = source.datafields[j];
                                            if (datafield != undefined && (datafield.name == obj)) {
                                                hasField = true;
                                                map = datafield.map;
                                                type = datafield.type;
                                                dataFieldName = datafield.name;
                                                break;
                                            }
                                            else if (datafield != undefined && datafield.map && (datafield.map.indexOf(obj) >= 0)) {
                                                hasField = true;
                                                map = datafield.map;
                                                type = datafield.type;
                                                dataFieldName = datafield.name;
                                                hasMap = true;
                                                var value = dataObject[obj];
                                                if (map != null) {
                                                    var splitMap = map.split(me.mapChar);
                                                    if (splitMap.length > 0) {
                                                        var datarecord = dataObject;
                                                        for (var p = 0; p < splitMap.length; p++) {
                                                            datarecord = datarecord[splitMap[p]];
                                                        }
                                                        value = datarecord;
                                                    }
                                                    else {
                                                        value = dataObject[map];
                                                    }
                                                }

                                                if (type != 'string') {
                                                    value = me.getvaluebytype(value, { type: type });
                                                }
                                                record[dataFieldName] = value;
                                                if (record[dataFieldName] != undefined) {
                                                    _koindex += record[dataFieldName].toString().length + record[dataFieldName].toString().substr(0, 1);
                                                }
                                            }
                                        }
                                        if (!hasField) return true;
                                        if (hasMap) return true;
                                    }

                                    var isFunction = $.isFunction(dataObject[obj]);
                                    if (isFunction) {
                                        var value = dataObject[obj]();
                                        if (type != 'string') {
                                            value = me.getvaluebytype(value, { type: type });
                                        }
                                        record[obj] = value;
                                        if (dataObject[obj].subscribe) {
                                            var recordindex = i;
                                            me.koSubscriptions[me.koSubscriptions.length] = dataObject[obj].subscribe(function (value) {
                                                var _changeindex = recordindex;
                                                record[obj] = value;
                                                var changedRecord = { index: _changeindex, oldrecord: record, record: record };
                                                me._changedrecords.push(changedRecord);
                                                if (me.isUpdating)
                                                    return;

                                                me.callBindingUpdate("update");
                                                me._changedrecords = [];
                                                return false;
                                            });
                                        }
                                    }
                                    else {
                                        var value = dataObject[obj];
                                        if (map != null) {
                                            var splitMap = map.split(me.mapChar);
                                            if (splitMap.length > 0) {
                                                var datarecord = dataObject;
                                                for (var p = 0; p < splitMap.length; p++) {
                                                    datarecord = datarecord[splitMap[p]];
                                                }
                                                value = datarecord;
                                            }
                                            else {
                                                value = dataObject[map];
                                            }
                                        }

                                        if (type != 'string') {
                                            value = me.getvaluebytype(value, { type: type });
                                        }
                                        record[dataFieldName] = value;
                                        if (record[dataFieldName] != undefined) {
                                            _koindex += record[dataFieldName].toString().length + record[dataFieldName].toString().substr(0, 1);
                                        }
                                    }
                                });

                                var recordid = me.getid(source.id, dataObject, i);
                                record.uid = recordid;
                                me.records.push(record);
                    
                                record._koindex = _koindex;
                                if (me._oldrecords) {
                                    var _changeindex = me.records.length - 1;
                                    if (collectionChanged == 'update') {
                                        if (me._oldrecords[_changeindex]._koindex != _koindex) {
                                            var changedRecord = { index: _changeindex, oldrecord: me._oldrecords[_changeindex], record: record };
                                            me._changedrecords.push(changedRecord);
                                        }
                                    }
                                }
                            }
                        });
                        if (collectionChanged == 'add') {
                            var length = me.records.length;
                            for (var i = 0; i < length; i++) {
                                var record = me.records[i];
                                var hasOldRecord = false;
                                for (var p = 0; p < me._oldrecords.length; p++) {
                                    if (me._oldrecords[p]._koindex === record._koindex) {
                                        hasOldRecord = true;
                                        break;
                                    }
                                }
                                if (!hasOldRecord) {
                                    me._changedrecords.push({ index: i, oldrecord: null, record: record, position: (i != 0 ? "last" : "first") });
                                }
                            }
                        }
                        else if (collectionChanged == 'remove') {
                            var length = me._oldrecords.length;
                            for (var i = 0; i < length; i++) {
                                var oldrecord = me._oldrecords[i];
                                if (!me.records[i]) {
                                    me._changedrecords.push({ index: i, oldrecord: oldrecord, record: null });
                                }
                                else {
                                    if (me.records[i]._koindex != oldrecord._koindex) {
                                        me._changedrecords.push({ index: i, oldrecord: oldrecord, record: null });
                                    }
                                }
                            }
                        }
                    }
                    else {
                        if (!$.isArray(source.localdata)) {
                            this.records = new Array();
                            var fields = 0;
                            var generatedfields = new Array();
                            $.each(source.localdata, function (i) {
                                var recordid = me.getid(source.id, this, i);
                                if (datafieldslength == 0) {
                                    if (!(typeof this === "string" || this instanceof String)) {
                                        for (var obj in this) {
                                            fields++;
                                            var valueType = $.type(this[obj]);

                                            generatedfields.push({ name: obj, type: valueType });
                                        }
                                        datafieldslength = fields;
                                        source.datafields = generatedfields;
                                        source.generatedfields = generatedfields;
                                    }
                                }
                                if (datafieldslength > 0) {
                                    var record = this;
                                    var datarow = getrecord(record, datafieldslength);
                                    datarow.uid = recordid;
                                    me.records[me.records.length] = datarow;                                  
                                }
                                else {
                                    this.uid = recordid;
                                    me.records[me.records.length] = this;
                                }
                            });
                        }
                        else {
                            if (datafieldslength == 0) {
                                var fields = 0;
                                var generatedfields = new Array();

                                $.each(source.localdata, function (i, value) {
                              //      var record = $.extend({}, this);
                                    var record = new Object(this);
                                    if (typeof value === "string")
                                    {
                                        me.records = source.localdata;
                                        return false;
                                    }
                                    else {
                                        var recordid = me.getid(source.id, record, i);
                                        if (typeof (recordid) === "object") {
                                            recordid = i;
                                        }
                                        record.uid = recordid;
                                        if (i == 0) {
                                            for (var obj in this) {
                                                fields++;
                                                var valueType = $.type(this[obj]);

                                                generatedfields.push({ name: obj, type: valueType });
                                            }
                                            datafieldslength = fields;
                                            source.datafields = generatedfields;
                                            source.generatedfields = generatedfields;
                                        }
                                        if (datafieldslength > 0) {
                                            var datarow = getrecord(record, datafieldslength);
                                            datarow.uid = recordid;
                                            me.records[me.records.length] = datarow;
                                        }
                                        else {
                                            me.records[me.records.length] = record;
                                        }
                                    }
                                });
                            }
                            else {
                                $.each(source.localdata, function (i) {
                                    var record = this;
                                    var datarow = getrecord(record, datafieldslength);
                                    var recordid = me.getid(source.id, datarow, i);
                                    if (typeof (recordid) === "object") {
                                        recordid = i;
                                    }
                              //      var record = $.extend({}, datarow);
                                    var record = new Object(datarow);
                                    record.uid = recordid;
                                    me.records[me.records.length] = record;
                                });
                            }
                        }
                    }

                    this.originaldata = source.localdata;
                    this.cachedrecords = this.records;
                    this.addForeignValues(source);
                    if (options.uniqueDataFields) {
                        var uniquerecords = this.getUniqueRecords(this.records, options.uniqueDataFields);
                        this.records = uniquerecords;
                        this.cachedrecords = uniquerecords;
                    }

                    if (options.beforeLoadComplete) {
                        var newRecords = options.beforeLoadComplete(me.records, this.originaldata);
                        if (newRecords != undefined) {
                            me.records = newRecords;
                            me.cachedrecords = newRecords;
                        }
                    }

                    if (options.autoSort && options.autoSortField) {
                        var tmpToString = Object.prototype.toString;
                        Object.prototype.toString = (typeof field == "function") ? field : function () { return this[options.autoSortField] };
                        me.records.sort(function (value1, value2) {
                            if (value1 === undefined) { value1 = null; }
                            if (value2 === undefined) { value2 = null; }
                            if (value1 === null && value2 === null) {
                                return 0;
                            }
                            if (value1 === null && value2 !== null) {
                                return 1;
                            }
                            if (value1 !== null && value2 === null) {
                                return -1;
                            }

                            value1 = value1.toString();
                            value2 = value2.toString();
                            if (value1 === null && value2 === null) {
                                return 0;
                            }
                            if (value1 === null && value2 !== null) {
                                return 1;
                            }
                            if (value1 !== null && value2 === null) {
                                return -1;
                            }
                            if ($.jqx.dataFormat.isNumber(value1) && $.jqx.dataFormat.isNumber(value2)) {
                                if (value1 < value2) { return -1; }
                                if (value1 > value2) { return 1; }
                                return 0;
                            }
                            else if ($.jqx.dataFormat.isDate(value1) && $.jqx.dataFormat.isDate(value2)) {
                                if (value1 < value2) { return -1; }
                                if (value1 > value2) { return 1; }
                                return 0;
                            }
                            else if (!$.jqx.dataFormat.isNumber(value1) && !$.jqx.dataFormat.isNumber(value2)) {
                                value1 = String(value1).toLowerCase();
                                value2 = String(value2).toLowerCase();
                            }

                            try {
                                if (value1 < value2) { return -1; }
                                if (value1 > value2) { return 1; }
                            }
                            catch (error) {
                                var er = error;
                            }

                            return 0;
                        });
                        Object.prototype.toString = tmpToString;
                    }

                    me.loadedData = source.localdata;
                    me.buildHierarchy();

                    if ($.isFunction(options.loadComplete)) {
                        options.loadComplete(source.localdata, me.records);
                    }
                    break;
                case "json":
                case "jsonp":
                case "xml":
                case "xhtml":
                case "script":
                case "text":
                case "ics":
                    {
                        if (source.localdata != null && !source.url) {
                            if ($.isFunction(source.beforeprocessing)) {
                                source.beforeprocessing(source.localdata);
                            }
                            if (source.datatype === "xml") {
                                me.loadxml(source.localdata, source.localdata, source);
                            }
                            else if (datatype === "text") {
                                me.loadtext(source.localdata, source);
                            }
                            else if (datatype === "ics") {
                                me.loadics(source.localdata, source);
                            }
                            else {
                                me.loadjson(source.localdata, source.localdata, source);
                            }
                            me.addForeignValues(source);
                            if (options.uniqueDataFields) {
                                var uniquerecords = me.getUniqueRecords(me.records, options.uniqueDataFields);
                                me.records = uniquerecords;
                                me.cachedrecords = uniquerecords;
                            }

                            if (options.beforeLoadComplete) {
                                var newRecords = options.beforeLoadComplete(me.records, this.originaldata);
                                if (newRecords != undefined) {
                                    me.records = newRecords;
                                    me.cachedrecords = newRecords;
                                }
                            }

                            me.loadedData = source.localdata;
                            me.buildHierarchy.call(me);
                            if ($.isFunction(options.loadComplete)) {
                                options.loadComplete(source.localdata, me.records);
                            }
                            me.callBindingUpdate(collectionChanged);
                            return;
                        }

                        var postdata = options.data != undefined ? options.data : {};
                        // call the source object's processdata function.
                        if (source.processdata) {
                            source.processdata(postdata);
                        }
                        // call the adapter's process data function.
                        if ($.isFunction(options.processData)) {
                            options.processData(postdata);
                        }

                        // call the adapter's format data function.
                        if ($.isFunction(options.formatData)) {
                            var newpostdata = options.formatData(postdata);
                            if (newpostdata != undefined) {
                                postdata = newpostdata;
                            }
                        }

                        var contentType = 'application/x-www-form-urlencoded';
                        if (options.contentType) {
                            contentType = options.contentType;
                        }

                        var type = "GET";
                        if (source.type) {
                            type = source.type;
                        }

                        if (options.type) {
                            type = options.type;
                        }

                        var dataType = datatype;
                        if (datatype == "ics") dataType = "text";
                        if (source.url && source.url.length > 0) {
                            if ($.isFunction(options.loadServerData)) {
                                me._requestData(postdata, source, options);
                            }
                            else {
                                this.xhr = $.jqx.data.ajax({
                                    dataType: dataType,
                                    cache: this.cache,
                                    type: type,
                                    url: source.url,
                                    async: async,
                                    timeout: source.timeout,
                                    contentType: contentType,
                                    data: postdata,
                                    success: function (data, status, xhr) {
                                        if ($.isFunction(source.beforeprocessing)) {
                                            var tmpdata = source.beforeprocessing(data, status, xhr);
                                            if (tmpdata != undefined) {
                                                data = tmpdata;
                                            }
                                        }
                                        if ($.isFunction(options.downloadComplete)) {
                                            var tmpdata = options.downloadComplete(data, status, xhr);
                                            if (tmpdata != undefined) {
                                                data = tmpdata;
                                            }
                                        }

                                        if (data == null) {
                                            me.records = new Array();
                                            me.cachedrecords = new Array();
                                            me.originaldata = new Array();

                                            me.callDownloadComplete();
                                            if ($.isFunction(options.loadComplete)) {
                                                options.loadComplete(new Array());
                                            }
                                            return;
                                        }

                                        var records = data;
                                        if (data.records) {
                                            records = data.records;
                                        }

                                        if (data.totalrecords != undefined) {
                                            source.totalrecords = data.totalrecords;
                                        }
                                        else if (data.totalRecords != undefined) {
                                            source.totalrecords = data.totalRecords;
                                        }

                                        if (source.datatype === "xml") {
                                            me.loadxml(null, records, source);
                                        }
                                        else if (datatype === "text") {
                                            me.loadtext(records, source);
                                        }
                                        else if (datatype === "ics") {
                                            me.loadics(records, source);
                                        }
                                        else {
                                            me.loadjson(null, records, source);
                                        }

                                        // add foreign values.
                                        me.addForeignValues(source);

                                        if (options.uniqueDataFields) {
                                            var uniquerecords = me.getUniqueRecords(me.records, options.uniqueDataFields);
                                            me.records = uniquerecords;
                                            me.cachedrecords = uniquerecords;
                                        }

                                        if (options.beforeLoadComplete) {
                                            var newRecords = options.beforeLoadComplete(me.records, data);
                                            if (newRecords != undefined) {
                                                me.records = newRecords;
                                                me.cachedrecords = newRecords;
                                            }
                                        }

                                        me.loadedData = data;
                                        me.buildHierarchy.call(me);

                                        me.callDownloadComplete();
                                        if ($.isFunction(options.loadComplete)) {
                                            options.loadComplete(data, status, xhr, me.records);
                                        }
                                    },
                                    error: function (xhr, status, error) {
                                        if ($.isFunction(source.loaderror)) { source.loaderror(xhr, status, error); }
                                        if ($.isFunction(options.loadError)) { options.loadError(xhr, status, error); }
                                        xhr = null;
                                        me.callDownloadComplete();
                                    },
                                    beforeSend: function (xhr, settings) {
                                        if ($.isFunction(options.beforeSend)) { options.beforeSend(xhr, settings); }
                                        if ($.isFunction(source.beforesend)) { source.beforesend(xhr, settings); }
                                    }
                                });
                            }
                        }
                        else {
                            me.buildHierarchy(new Array());
                            me.callDownloadComplete();
                            if ($.isFunction(options.loadComplete)) {
                                if (!data) {
                                    var data = {};
                                }
                                options.loadComplete(data);
                            }
                        }
                    }
                    break;
            }
            this.callBindingUpdate(collectionChanged);
        },

        buildHierarchy: function(dataRecords)
        {
            var source = this._source;
            var hierarchy = new Array();
            if (!source.datafields) {
                return;
            }

            if (source.hierarchy && !source.hierarchy.reservedNames) {
                source.hierarchy.reservedNames = {
                    leaf: "leaf",
                    parent: "parent",
                    expanded: "expanded",
                    checked: "checked",
                    selected: "selected",
                    level: "level",
                    icon: "icon",
                    data: "data"
                }
            }
            else {
                if (source.hierarchy) {
                    var names = source.hierarchy.reservedNames;
                    if (!names.leaf) names.leaf = "leaf";
                    if (!names.parent) names.parent = "parent";
                    if (!names.expanded) names.expanded = "expanded";
                    if (!names.checked) names.checked = "checked";
                    if (!names.selected) names.selected = "selected";
                    if (!names.level) names.level = "level";
                    if (!names.data) names.data = "data";
                }
            }

            if (!source.hierarchy) {
                return;
            }

            var that = this;
            var names = source.hierarchy.reservedNames;
            if (source.hierarchy.root) {
                if (source.dataType == "xml") {
                    var hierarchy = this.getRecordsHierarchy('uid', 'parentuid', 'records', null, dataRecords);
                    this.hierarchy = hierarchy;
                    return hierarchy;
                }
                else {
                    this.hierarchy = this.records;
                    var root = source.hierarchy.root;
                    for (var i = 0; i < this.records.length; i++) {
                        var record = this.records[i];
                        if (!record) {
                            continue;
                        }

                        var addRecords = function (record) {
                            if (source.hierarchy.record) {
                                record.records = record[root][source.hierarchy.record];
                            }
                            else {
                                var splitMap = root.split(that.mapChar);
                                var records = null;
                                if (splitMap.length > 1) {
                                    var d = record;
                                    for (var p = 0; p < splitMap.length; p++) {
                                        if (d != undefined) {
                                            d = d[splitMap[p]];
                                        }
                                    }
                                    records = d;
                                }
                                else records = record[root];
                                record.records = records;
                            }
                            if (record.records == null || (record.records && record.records.length == 0)) {
                                record[names.leaf] = true;
                            }
                        }
                        addRecords(record);
                        record[names.level] = 0;
                        var recordid = this.getid(source.id, record, i);
                        record.uid = recordid;
                        record[names.parent] = null;
                        record[names.data] = record;
                        if (record[names.expanded] === undefined) {
                            record[names.expanded] = false;
                        }
                        var drillThrough = function (parent, records) {
                            if (!records) {
                                parent.records = new Array();
                                return;
                            }

                            for (var i = 0; i < records.length; i++) {
                                var record = records[i];
                                if (!record) {
                                    continue;
                                }

                                addRecords(record);
                                record[names.level] = parent[names.level] + 1;
                                record[names.parent] = parent;
                                record[names.data] = record;
                                var recordid = that.getid(source.id, record, i);
                                if (recordid == i && source.id == null) {
                                    record.uid = parent.uid + "_" + recordid;
                                }
                                else {
                                    record.uid = recordid;
                                }

                                if (record[names.expanded] === undefined) {
                                    record[names.expanded] = false;
                                }
                                drillThrough(record, record.records);
                            }
                        }
                        drillThrough(record, record.records);
                    }
                }             
                return this.hierarchy;
            }

            if (source.hierarchy.keyDataField && source.hierarchy.parentDataField) {
                var hierarchy = this.getRecordsHierarchy(source.hierarchy.keyDataField.name, source.hierarchy.parentDataField.name, 'records', null, dataRecords);
                this.hierarchy = hierarchy;
                return hierarchy;
            }

            if (source.hierarchy.groupingDataFields) {
                var groups = new Array();
                for (var i = 0; i < source.hierarchy.groupingDataFields.length; i++) {
                    groups.push(source.hierarchy.groupingDataFields[i].name);
                }

                var hierarchy = this.getGroupedRecords(groups, 'records', 'label', null, 'data', null, 'parent', dataRecords);
                this.hierarchy = hierarchy;
                return hierarchy;
            }
        },

        addRecord: function (record, position, parentID, virtualMode) {
            var that = this;
            var reservedNames = function()
            {
                return {
                    leaf: "leaf",
                    parent: "parent",
                    expanded: "expanded",
                    checked: "checked",
                    selected: "selected",
                    level: "level",
                    icon: "icon",
                    data: "data"
                }
            }
            if (record != undefined) {
                if (parentID != undefined) {
                    if (this.hierarchy.length > 0) {
                        var traverse = function (records) {
                            if (records) {
                                for (var i = 0; i < records.length; i++) {
                                    var r = records[i];
                                    if (r.uid == parentID) {
                                        var names = (that._source && that._source.hierarchy) ? that._source.hierarchy.reservedNames : null;  
                                        if (names == null) names = reservedNames();

                                        record[names.parent] = r;
                                        record[names.level] = r[names.level] + 1;

                                        if (!r.records) {
                                            r.records = new Array();
                                            r[names.leaf] = false;
                                        }
                                        else {
                                            r[names.leaf] = false;
                                        }

                                        if (position == 'last') {
                                            r.records.push(record);
                                        }
                                        else if (typeof position === 'number' && isFinite(position)) {
                                            r.records.splice(position, 0, record);
                                        }
                                        else {
                                            r.records.splice(0, 0, record);
                                        }
                                        return true;
                                    }
                                    if (r.records) {
                                        traverse(r.records);
                                    }
                                }
                            }
                        }
                        traverse(this.hierarchy);
                    }
                }
                else {
                    if (this.hierarchy && this.hierarchy.length >= 0 && (this._source.hierarchy || virtualMode)) {
                        var names = (that._source && that._source.hierarchy) ? that._source.hierarchy.reservedNames : null;
                        if (names == null) names = reservedNames();

                        record[names.level] = 0;

                        if (position == 'last') {
                            this.hierarchy.push(record);
                        }
                        else if (typeof position === 'number' && isFinite(position)) {
                            this.hierarchy.splice(position, 0, record);
                        }
                        else {
                            this.hierarchy.splice(0, 0, record);
                        }
                    }
                    else {
                        if (position == 'last') {
                            this.records.push(record);
                        }
                        else if (typeof position === 'number' && isFinite(position)) {
                            this.records.splice(position, 0, record);
                        }
                        else {
                            this.records.splice(0, 0, record);
                        }
                    }
                    return true;
                }
            }
            return false;
        },

        deleteRecord: function(uid)
        {
            var that = this;
            if (this.hierarchy.length > 0) {
                var traverse = function (records) {
                    if (records) {
                        for (var i = 0; i < records.length; i++) {
                            var r = records[i];
                            if (r.uid == uid) {
                                records.splice(i, 1);
                                if (that.recordids[uid]) {
                                    delete that.recordids[uid];
                                }

                                var removeChildren = function (children) {
                                    for (var x = 0; x < children.length; x++) {
                                        var uid = children[x].uid;
                                        for (var j = 0; j < that.records.length; j++) {
                                            var r = that.records[j];
                                            if (r.uid == uid) {
                                                that.records.splice(j, 1);
                                                break;
                                            }
                                        }
                                        if (children[x].records) {
                                            removeChildren(children[x].records);
                                        }
                                    }
                                }
                                if (r.records) {
                                    removeChildren(r.records);                              
                                }
                                for (var j = 0; j < that.records.length; j++) {
                                    var r = that.records[j];
                                    if (r.uid == uid) {
                                        that.records.splice(j, 1);
                                        break;
                                    }
                                }
                                return true;
                            }
                            if (r.records) {
                                traverse(r.records);
                            }
                        }
                    }
                }
                traverse(this.hierarchy);
            }
            else {
                for (var i = 0; i < this.records.length; i++) {
                    var r = this.records[i];
                    if (r.uid == uid) {
                        this.records.splice(i, 1);
                        return true;
                    }
                }
            }
            return false;
        },

        addForeignValues: function(source)
        {
            var me = this;
            var datafieldslength = source.datafields ? source.datafields.length : 0;
            for (var j = 0; j < datafieldslength; j++) {
                var datafield = source.datafields[j];
                if (datafield != undefined) {
                    if (datafield.values != undefined) {
                        if (datafield.value == undefined) datafield.value = datafield.name;
                        if (datafield.values['value'] == undefined) {
                            datafield.values['value'] = datafield.value;
                        }

                        var matchedIDs = new Array();
                        var start, end;
                        if (me.pageable && me.virtualmode) {
                            start = me.pagenum * me.pagesize;
                            end = start + me.pagesize;
                            if (end > me.totalrecords) {
                                end = me.totalrecords;
                            }
                        }
                        else if (me.virtualmode) {
                            start = source.recordstartindex;
                            end = source.recordendindex;
                            if (end > me.totalrecords) {
                                end = me.totalrecords;
                            }
                        }
                        else {
                            start = 0;
                            end = me.records.length;
                        }

                        for (var i = start; i < end; i++) {
                            var record = me.records[i];
                            var name = datafield.name;
                            var value = record[datafield.value];

                            if (matchedIDs[value] != undefined) {
                                record[name] = matchedIDs[value];
                            }
                            else {
                                for (var p = 0; p < datafield['values'].source.length; p++) {
                                    var sourcerecord = datafield.values.source[p];
                                    var sourcevalue = sourcerecord[datafield.values['value']];
                                    if (sourcevalue == undefined) {
                                        sourcevalue = sourcerecord.uid;
                                    }
                                    if (sourcevalue == value) {
                                        var label = sourcerecord[datafield.values['name']];
                                        record[name] = label;
                                        matchedIDs[value] = label;
                                        break;
                                    }
                                }
                            }
                        }
                    }
                    else if (datafield.value != undefined) {
                        for (var i = 0; i < me.records.length; i++) {
                            var record = me.records[i];
                            record[datafield.name] = record[datafield.value];
                        }
                    }
                }
            }
        },

        abort: function () {
            if (this.xhr && this.xhr.readyState != 4) {
                this.xhr.abort();
                me.callDownloadComplete();
            }
        },

        _requestData: function (postdata, source, options) {
            var me = this;
            var success = function (requestedData) {
                if (requestedData.totalrecords) {
                    source.totalrecords = requestedData.totalrecords;
                    me.totalrecords = requestedData.totalrecords;
                }
                if (requestedData.records) {
                    me.records = requestedData.records;
                    me.cachedrecords = requestedData.records;
                }
                // add foreign values.
                me.addForeignValues(source);

                if (options.uniqueDataFields) {
                    var uniquerecords = me.getUniqueRecords(me.records, options.uniqueDataFields);
                    me.records = uniquerecords;
                    me.cachedrecords = uniquerecords;
                }

                if (options.beforeLoadComplete) {
                    var newRecords = options.beforeLoadComplete(me.records, data);
                    if (newRecords != undefined) {
                        me.records = newRecords;
                        me.cachedrecords = newRecords;
                    }
                }
                for (var i = 0; i < me.records.length; i++) {
                    var record = me.records[i];
                    if (undefined == record) {
                        continue;
                    }

                    if (undefined == record.uid) {
                        record.uid = me.getid(source.id, record, i);
                    }
                }

                me.buildHierarchy.call(me);
                if ($.isFunction(options.loadComplete)) {
                    options.loadComplete(requestedData);
                }
                me.callDownloadComplete();
            }
            options.loadServerData(postdata, source, success);
        },

        getUniqueRecords: function (records, dataFields) {
            if (records && dataFields) {
                var length = records.length;
                var datafieldslength = dataFields.length;

                var uniqueRecords = new Array();
                var lookupkeys = new Array();
                // loop through all records.
                for (var urec = 0; urec < length; urec++) {
                    var datarow = records[urec];
                    var lookupkey = "";
                    if (datarow == undefined)
                        continue;
                    // build lookup key from the datafield values.
                    for (var datafieldindex = 0; datafieldindex < datafieldslength; datafieldindex++) {
                        var datafield = dataFields[datafieldindex];
                        lookupkey += datarow[datafield] + "_";
                    }
                    // add the unique record.
                    if (!lookupkeys[lookupkey]) {
                        uniqueRecords[uniqueRecords.length] = datarow;
                    }
                    // add the lookup key.
                    lookupkeys[lookupkey] = true;
                }
            }

            return uniqueRecords;
        },

        getAggregatedData: function (aggregates, calendar, records, level) {
            var dataRecords = records;
            if (!dataRecords) {
                dataRecords = this.records;
            }
            var data = {};
            var dataValuesByAggregate = new Array();
            var length = dataRecords.length;
            if (length == 0) return;
            if (length == undefined) return;
            for (var i = 0; i < length; i++) {
                var record = dataRecords[i];
                for (var j = 0; j < aggregates.length; j++) {
                    var aggregate = aggregates[j];
                    var value = record[aggregate.name];
        //            if (value === null) continue;
                    if (aggregate.aggregates) {
                        data[aggregate.name] = data[aggregate.name] || {};
                        dataValuesByAggregate[aggregate.name] = dataValuesByAggregate[aggregate.name] || 0;
                        dataValuesByAggregate[aggregate.name]++;
                        var _customCalcFunc = function (aggObject) {
                            for (obj in aggObject) {
                                var oldValue = data[aggregate.name][obj];
                                if (oldValue == null) {
                                    data[aggregate.name][obj] = 0;
                                    oldValue = 0;
                                }
                                if ($.isFunction(aggObject[obj])) {
                                    oldValue = aggObject[obj](oldValue, value, aggregate.name, record, level);
                                }
                                data[aggregate.name][obj] = oldValue;
                            }
                        }

                        var canParse = parseFloat(value);
                        if (isNaN(canParse)) canParse = false; else canParse = true;
                        if (canParse)
                            value = parseFloat(value);

                        if (typeof value === 'number' && isFinite(value)) {
                            $.each(aggregate.aggregates, function () {
                                var oldValue = data[aggregate.name][this];
                                if (oldValue == null) {
                                    oldValue = 0;
                                    if (this == 'min') oldValue = 9999999999999;
                                    if (this == 'max') oldValue = -9999999999999;
                                }
                                if (this == 'sum' || this == 'avg' || this == 'stdev'
                                || this == 'stdevp' || this == 'var' || this == 'varp') {
                                    oldValue += parseFloat(value);
                                }
                                else if (this == 'product') {
                                    if (i == 0)
                                        oldValue = parseFloat(value);
                                    else
                                        oldValue *= parseFloat(value);
                                }
                                else if (this == 'min') {
                                    oldValue = Math.min(oldValue, parseFloat(value));
                                }
                                else if (this == 'max') {
                                    oldValue = Math.max(oldValue, parseFloat(value));
                                }
                                else if (this == 'count') {
                                    oldValue++;
                                }
                                else if (typeof (this) == 'object') {
                                    _customCalcFunc(this);
                                    return;
                                }
                                data[aggregate.name][this] = oldValue;
                            });
                        }
                        else {
                            $.each(aggregate.aggregates, function () {
                                if (this == 'min' || this == 'max' || this == 'count' || this == 'product' || this == 'sum'
                                 || this == 'avg' || this == 'stdev'
                                || this == 'stdevp' || this == 'var' || this == 'varp') {
                                    if (value === null) return true;
        
                                    var oldValue = data[aggregate.name][this];
                                    if (oldValue == null) {
                                        oldValue = 0;
                                    }
                                    data[aggregate.name][this] = oldValue;
                                    return true;
                                }

                                if (typeof (this) == 'object') {
                                    _customCalcFunc(this);
                                }
                            });
                        }
                    }
                }
            }

            for (var j = 0; j < aggregates.length; j++) {
                var aggregate = aggregates[j];
                if (!data[aggregate.name]) {
                    data[aggregate.name] = {};
                    $.each(aggregate.aggregates, function (index) {
                        data[aggregate.name][this] = 0;
                    });
                }

                if (data[aggregate.name]['avg'] != undefined) {
                    var value = data[aggregate.name]['avg'];
                    var dataValues = dataValuesByAggregate[aggregate.name];
                    if (dataValues === 0 || dataValues == undefined) {
                        data[aggregate.name]['avg'] = 0;
                    }
                    else {
                        data[aggregate.name]['avg'] = value / dataValues;
                    }
                }
                else if (data[aggregate.name]['count'] != undefined) {
                    data[aggregate.name]['count'] = length;
                }

                // stdev, stdevp, var, varp.
                // stdev - Standard deviation on a sample.
                // varp - Variance on an entire population.
                // var - Variance on a sample.
                if (data[aggregate.name]['stdev'] || data[aggregate.name]['stdevp']
                || data[aggregate.name]['var'] || data[aggregate.name]['varp']) {
                    $.each(aggregate.aggregates, function (index) {
                        if (this == 'stdev' || this == 'var' || this == 'varp' || this == 'stdevp') {
                            var value = data[aggregate.name][this];
                            var count = length;
                            var average = (value / length);
                            var sumSq = 0.0;
                            for (var i = 0; i < length; i++) {
                                var record = dataRecords[i];
                                var recordvalue = record[aggregate.name];
                                sumSq += (recordvalue - average) * (recordvalue - average);
                            }

                            var denominator = (this == 'stdevp' || this == 'varp') ? count : count - 1;
                            if (denominator == 0)
                                denominator = 1;

                            if (this == 'var' || this == 'varp') {
                                data[aggregate.name][this] = sumSq / denominator;
                            }
                            else if (this == 'stdevp' || this == 'stdev') {
                                data[aggregate.name][this] = Math.sqrt(sumSq / denominator);
                            }
                        }
                    });
                }

                if (aggregate.formatStrings) {
                    $.each(aggregate.aggregates, function (index) {
                        var formatString = aggregate.formatStrings[index];
                        if (formatString) {
                            if (this == 'min' || this == 'max' || this == 'count' || this == 'product' || this == 'sum'
                                 || this == 'avg' || this == 'stdev'
                                || this == 'stdevp' || this == 'var' || this == 'varp') {
                                var value = data[aggregate.name][this];
                                data[aggregate.name][this] = $.jqx.dataFormat.formatnumber(value, formatString, calendar);
                            }
                            else if (typeof this == 'object') {
                                for (obj in this) {
                                    var value = data[aggregate.name][obj];
                                    data[aggregate.name][obj] = $.jqx.dataFormat.formatnumber(value, formatString, calendar);
                                }
                            }
                        }
                    });
                }
            }
            return data;
        },

        bindDownloadComplete: function (id, func) {
            this._downloadComplete[this._downloadComplete.length] = { id: id, func: func };

        },

        unbindDownloadComplete: function (id) {
            for (var i = 0; i < this._downloadComplete.length; i++) {
                if (this._downloadComplete[i].id == id) {
                    this._downloadComplete[i].func = null;
                    this._downloadComplete.splice(i, 1);
                    break;
                }
            }
        },

        callDownloadComplete: function () {
            for (var complete = 0; complete < this._downloadComplete.length; complete++) {
                var downloadComplete = this._downloadComplete[complete];
                if (downloadComplete.func != null) {
                    downloadComplete.func();
                }
            }
        },

        setSource: function (source) {
            this._source = source;
        },

        generatekey: function () {
            var S4 = function () {
                return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
            };
            return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
        },

        getGroupedRecords: function (groups, collectionName, groupName, mappingFields, recordName, valueName, parentName, data, startIndex) {
            var visualRows = 0;
            var self = this;
            if (!startIndex) startIndex = 0;
            var groupHashCodes = new Array();
            for (var iGroupColumn = 0; iGroupColumn < groups.length; iGroupColumn++) {
                groupHashCodes[iGroupColumn] = self.generatekey();
            }

            if (!collectionName) {
                collectionName = 'items';
            }

            if (!groupName) {
                groupName = 'group';
            }

            if (!recordName) {
                recordName = 'record';
            }

            if (!parentName) {
                parentName = 'parentItem';
            }

            if (undefined === valueName) {
                valueName = 'value';
            }

            var grouprecords = new Array();
            var grouprecordsindex = 0;
            var hashRowGroups = new Array();
            var groupslength = groups.length;
            var groupsHierarchy = new Array();
            if (!data) {
                var data = this.records;
            }

            var dataLength = data.length;

            var itemByRecord = function (record) {
                var itemObj = record;
                if (mappingFields) {
                    $.each(mappingFields, function () {
                        if (this.name && this.map) {
                            itemObj[this.map] = itemObj[this.name];
                        }
                    });
                }

                return itemObj;
            }

            for (var obj = 0; obj < dataLength; obj++) {
                var item = itemByRecord(data[obj]);
                id = item[self.uniqueId];
                var itemKeysHierarchy = new Array();
                var keys = 0;
                for (iGroupColumn = 0; iGroupColumn < groupslength; iGroupColumn++) {
                    var group = groups[iGroupColumn];
                    var value = item[group];

                    if (null == value)
                        continue;

                    itemKeysHierarchy[keys++] = { value: value, hash: groupHashCodes[iGroupColumn] };
                }

                if (itemKeysHierarchy.length != groupslength)
                    break;

                var parentItem = null;

                var lookupKey = "";
                var iLevel = -1;
                for (var q = 0; q < itemKeysHierarchy.length; q++) {
                    iLevel++;
                    var itemKey = itemKeysHierarchy[q].value;
                    var columnHash = itemKeysHierarchy[q].hash;
                    lookupKey = lookupKey + "_" + columnHash + "_" + itemKey;
                    if (hashRowGroups[lookupKey] != undefined && hashRowGroups[lookupKey] != null) {
                        parentItem = hashRowGroups[lookupKey];
                        continue;
                    }
                    if (parentItem == null) {
                        parentItem = { level: 0 };
                        parentItem[parentName] = null;
                        parentItem[groupName] = itemKey;
                        parentItem[recordName] = item;
                        if (item.expanded !== undefined) {
                            parentItem.expanded = item.expanded;
                        }
                        else
                        {
                            parentItem.expanded = false;
                        }

                        if (valueName) {
                            parentItem[valueName] = item[valueName];
                        }
                        parentItem[collectionName] = new Array();
                        var uid = grouprecords.length + startIndex;
                        if (!this._source.id || typeof item.uid === "number" || isFinite(item.uid)) {
                            uid = "Row" + uid;
                        }
                        parentItem.uid = uid;
                        grouprecords[grouprecordsindex++] = parentItem;
                    }
                    else {
                        var subItem = { level: parentItem.level + 1 };
                        subItem[parentName] = parentItem;
                        subItem[groupName] = itemKey;
                        subItem[collectionName] = new Array();
                        subItem[recordName] = item;
                        if (item.expanded !== undefined) {
                            subItem.expanded = item.expanded;
                        }
                        else {
                            subItem.expanded = false;
                        }

                        if (valueName) {
                            subItem[valueName] = item[valueName];
                        }
                        subItem.uid = parentItem.uid + "_" + parentItem[collectionName].length;
                        parentItem[collectionName][parentItem[collectionName].length] = subItem;
                        parentItem = subItem;
                    }

                    hashRowGroups[lookupKey] = parentItem;
                }

                if (item) {
                    item.leaf = true;
                }

                if (parentItem != null) {
                    if (this._source.id == null) {
                        if (undefined == item.uid) {
                            item.uid = parentItem.uid + "_" + parentItem[collectionName].length;
                        }
                        else {
                            if (item.uid.toString().indexOf(parentItem.uid) == -1) {
                                item.uid = parentItem.uid + "_" + item.uid;
                            }
                        }
                    }
                    item[parentName] = parentItem;
                    item.level = parentItem.level + 1;
                    parentItem[collectionName][parentItem[collectionName].length] = item;
                }
                else {
                    if (undefined == item.uid) {
                        item.uid = this.generatekey();
                    }
                }
            }
            return grouprecords;
        },

        getRecordsHierarchy: function (fieldName, parentFieldName, collectionName, mappingFields, dataRecords) {
            var recordsHierarchy = new Array();
            var flatData = this.records;
            if (dataRecords) {
                flatData = dataRecords;
            }

            if (this.records.length == 0)
                return null;

            var subItemsName = collectionName != null ? collectionName : "items";
            var items = [];
            var data = flatData;
            var dataLength = data.length;
            var names = (this._source && this._source.hierarchy) ? this._source.hierarchy.reservedNames : null;

            var itemByRecord = function (record) {
                var itemObj = record;
                if (mappingFields) {
                    $.each(mappingFields, function () {
                        if (this.name && this.map) {
                            itemObj[this.map] = itemObj[this.name];
                        }
                    });
                }

                return itemObj;
            }

            // build hierarchical source.
            for (var i = 0; i < dataLength; i++) {
                var item = $.extend({}, data[i]);
                var parentid = item[parentFieldName];
                var id = item[fieldName];
                items[id] = { parentid: parentid, item: item };
            }

            for (var i = 0; i < dataLength; i++) {
                var item = $.extend({}, data[i]);
                var parentid = item[parentFieldName];
                var id = item[fieldName];

                if (items[parentid] != undefined) {
                    var item = { parentid: parentid, item: items[id].item };
                    var parentItem = items[parentid].item;
                    if (!parentItem[subItemsName]) {
                        parentItem[subItemsName] = [];
                    }
                    var length = parentItem[subItemsName].length;
                    var record = item.item;

                    if (!names)
                    {
                        if (record.parent == undefined) {
                            record.parent = parentItem;
                        }
                    }
                    else
                    {
                        if (record[names.parent] == undefined) {
                            record[names.parent] = parentItem;
                        }                   
                    }

                    var itemObj = itemByRecord(record);
                    parentItem[subItemsName][length] = itemObj;
                    items[parentid].item = parentItem;
                    items[id] = item;
                }
                else {
                    var record = items[id].item;
                    if (!names)
                    {
                        if (record.parent == undefined) {
                            record.parent = null;
                        }
                    }
                    else
                    {
                        if (record[names.parent] == undefined) {
                            record[names.parent] = null;
                        }
                    }

                    var itemObj = itemByRecord(record);
                    if (!names)
                    {
                        itemObj.level = 0;
                    }
                    else
                    {
                        itemObj[names.level] = 0;
                    }

                    recordsHierarchy[recordsHierarchy.length] = itemObj;
                }
            }
            if (recordsHierarchy.length != 0) {
                var updateLevels = function (level, records) {
                    for (var i = 0; i < records.length; i++) {
                        if (!names)
                        {
                            records[i].level = level;
                        }
                        else
                        {
                            records[i][names.level] = level;
                        }

                        var subRecords = records[i][subItemsName];
                        if (subRecords) {
                            if (subRecords.length > 0) {
                                updateLevels(level + 1, subRecords);
                            }
                            else {
                                if (!names)
                                {
                                    records[i].leaf = true;
                                }
                                else
                                {
                                    records[i][names.leaf] = true;
                                }
                            }
                        }
                        else {
                            if (!names)
                            {                 
                                records[i].leaf = true;
                            }
                            else
                            {
                                records[i][names.leaf] = true;
                            }
                        }
                    }
                };
                updateLevels(0, recordsHierarchy);
            }
            return recordsHierarchy;
        },

        bindBindingUpdate: function (id, func) {
            this._bindingUpdate[this._bindingUpdate.length] = { id: id, func: func };

        },

        unbindBindingUpdate: function (id) {
            for (var i = 0; i < this._bindingUpdate.length; i++) {
                if (this._bindingUpdate[i].id == id) {
                    this._bindingUpdate[i].func = null;
                    this._bindingUpdate.splice(i, 1);
                    break;
                }
            }
        },

        callBindingUpdate: function (collectionChanged) {
            for (var update = 0; update < this._bindingUpdate.length; update++) {
                var bindingUpdate = this._bindingUpdate[update];
                if (bindingUpdate.func != null) {
                    bindingUpdate.func(collectionChanged);
                }
            }
        },

        getid: function (id, record, index) {
            if (id != null && id.name != undefined) {
                if (id.name) {
                    var result = $(record).attr(id.name);
                    if (result != null && result.toString().length > 0) {
                        return result;
                    }
                    else if (id.map) {
                        try
                        {
                            var result = $(record).attr(id.map);
                            if (result != null && result.toString().length > 0) {
                                return result;
                            }
                            else if ($(id.map, record).length > 0) {
                                return $(id.map, record).text();
                            }
                            else if ($(id.name, record).length > 0) {
                                return $(id.name, record).text();
                            }
                        }
                        catch (error) {
                            return index;
                        }
                    }
                    return;
                }
            }

            if ($(id, record).length > 0) {
                return $(id, record).text();
            }

            if (id) {
                if (id.toString().length > 0) {
                    var result = $(record).attr(id);
                    if (result != null && result.toString().length > 0) {
                        return $.trim(result).split(" ").join("").replace(/([ #;?%&,.+*~\':"!^$[\]()=>|\/@])/g, '');
                    }
                    else {
                        var splitMap = id.split(this.mapChar);
                        if (splitMap.length > 1) {
                            var d = record;
                            for (var p = 0; p < splitMap.length; p++) {
                                if (d != undefined) {
                                    d = d[splitMap[p]];
                                }
                            }
                            if (d != undefined) {
                                return d;
                            }
                        }
                        else {
                            if (record[id] != undefined) {
                                return record[id];
                            }
                        }
                    }
                }
            }

            return index;
        },

        loadjson: function (jsondata, data, source) {
            if (typeof (jsondata) == 'string') {
                jsondata = $.parseJSON(jsondata);
            }

            if (source.root == undefined) source.root = '';
            if (source.record == undefined) source.record = '';

            var jsondata = jsondata || data;
            if (!jsondata) {
                jsondata = [];
            }

            var me = this;
            if (source.root != '') {
                var splitMap = source.root.split(me.mapChar);
                if (splitMap.length > 1) {
                    var d = jsondata;
                    for (var p = 0; p < splitMap.length; p++) {
                        if (d != undefined) {
                            d = d[splitMap[p]];
                        }
                    }
                    jsondata = d;
                }
                else {
                    if (jsondata[source.root] !== undefined) {
                        jsondata = jsondata[source.root];
                    }
                    else if (jsondata[0] && jsondata[0][source.root] !== undefined) {
                        jsondata = jsondata[0][source.root];
                    }
                    else {
                        $.each(jsondata, function (i) {
                            var root = this;
                            if (this == source.root) {
                                jsondata = this;
                                return false;
                            }
                            else if (this[source.root] != undefined) {
                                jsondata = this[source.root];
                            }
                        });
                    }

                    if (!jsondata) {
                        var splitMap = source.root.split(me.mapChar);
                        if (splitMap.length > 0) {
                            var d = jsondata;
                            for (var p = 0; p < splitMap.length; p++) {
                                if (d != undefined) {
                                    d = d[splitMap[p]];
                                }
                            }
                            jsondata = d;
                        }
                    }
                }
            }
            else {
                if (!jsondata.length) {
                    for (obj in jsondata) {
                        if ($.isArray(jsondata[obj])) {
                            jsondata = jsondata[obj];
                            break;
                        }
                    }
                }
            }

            if (jsondata != null && jsondata.length == undefined) {
                jsondata = $.makeArray(jsondata);
            }

            if (jsondata == null || jsondata == undefined || jsondata == "undefined" || jsondata.length == undefined) {
                throw new Error('jqxDataAdapter: JSON Parse error! Invalid JSON. Please, check your JSON or your jqxDataAdapter initialization!');
                return;
            }

            if (jsondata.length == 0) {
                this.totalrecords = 0;
                return;
            }

            var length = jsondata.length;
            this.totalrecords = this.virtualmode ? (source.totalrecords || length) : length;
            this.records = new Array();
            this.originaldata = new Array();

            var records = this.records;
            var recordsstartindex = !this.pageable ? source.recordstartindex : this.pagesize * this.pagenum;

            this.recordids = new Array();

            if (source.loadallrecords) {
                recordsstartindex = 0;
                length = this.totalrecords;
            }

            var dataoffset = 0;
            if (this.virtualmode) {
                recordsstartindex = !this.pageable ? source.recordstartindex : this.pagesize * this.pagenum;
                dataoffset = recordsstartindex;
                recordsstartindex = 0;
                length = this.totalrecords;
            }

            var datafieldslength = source.datafields ? source.datafields.length : 0;
            // auto-generate data columns
            if (datafieldslength == 0) {
                var firstrecord = jsondata[0];
                var datafields = new Array();
                for (obj in firstrecord) {
                    var field = obj;
                    datafields[datafields.length] = { name: field };
                }
                source.datafields = datafields;
                source.generatedfields = source.datafields;
                datafieldslength = datafields.length;
            }

            var index = recordsstartindex;
            for (var i = recordsstartindex; i < length; i++) {
                var record = jsondata[i];

                if (record == undefined)
                    break;

                if (source.record && source.record != '') {
                    record = record[source.record];
                    if (record == undefined)
                        continue;
                }

                var recordid = this.getid(source.id, record, i);
                if (typeof (recordid) === "object") {
                    recordid = i;
                }

                if (!this.recordids[recordid]) {
                    this.recordids[recordid] = record;
                    var datarow = {};

                    for (var j = 0; j < datafieldslength; j++) {
                        var datafield = source.datafields[j];
                        var value = '';
                        if (undefined == datafield || datafield == null) {
                            continue;
                        }

                        if (datafield.map) {
                            if ($.isFunction(datafield.map)) {
                                value = datafield.map(record);
                            }
                            else {
                                var splitMap = datafield.map.split(me.mapChar);
                                if (splitMap.length > 0) {
                                    var datarecord = record;
                                    for (var p = 0; p < splitMap.length; p++) {
                                        if (datarecord != undefined) {
                                            datarecord = datarecord[splitMap[p]];
                                        }
                                    }
                                    value = datarecord;
                                }
                                else {
                                    value = record[datafield.map];
                                }
                            }

                            if (value != undefined && value != null) {
                                value = this.getvaluebytype(value, datafield);
                            }
                            else if (value == undefined && value != null) {
                                value = '';
                            }
                        }

                        // searches by both selectors when necessary.
                        if (value == '' && !datafield.map) {
                            value = record[datafield.name];
                            if (value == undefined && value != null) {
                                value = '';
                            }
                            // the datafield.value allows you to load values like: "Nombre":{"#text":"FASE 1"}, where the datafield is Nombre, the value is object. 
                            // If the datafield.value is "#text", the value that will be loaded will be "FASE 1".
                            if (datafield.value != undefined) {
                                if (value != undefined) {
                                    var tmpvalue = value[datafield.value];
                                    if (tmpvalue != undefined) {
                                        value = tmpvalue;
                                    }
                                }
                            }
                        }

                        value = this.getvaluebytype(value, datafield);
                        if (datafield.displayname != undefined) {
                            datarow[datafield.displayname] = value;
                        }
                        else {
                            datarow[datafield.name] = value;
                        }

                        if (datafield.type === "array") {
                            var updateValues = function (records) {
                                if (!records) return;
                                for (var t = 0; t < records.length; t++) {
                                    var record = records[t];
                                    if (!record) {
                                        continue;
                                    }

                                    for (var c = 0; c < datafieldslength; c++) {
                                        var datafield = source.datafields[c];
                                        var value = '';
                                        if (undefined == datafield || datafield == null) {
                                            continue;
                                        }

                                        if (datafield.map) {
                                            if ($.isFunction(datafield.map)) {
                                                value = datafield.map(record);
                                            }
                                            else {
                                                var splitMap = datafield.map.split(me.mapChar);
                                                if (splitMap.length > 0) {
                                                    var datarecord = record;
                                                    for (var p = 0; p < splitMap.length; p++) {
                                                        if (datarecord != undefined) {
                                                            datarecord = datarecord[splitMap[p]];
                                                        }
                                                    }
                                                    value = datarecord;
                                                }
                                                else {
                                                    value = record[datafield.map];
                                                }
                                            }

                                            if (value != undefined && value != null) {
                                                value = this.getvaluebytype(value, datafield);
                                            }
                                            else if (value == undefined && value != null) {
                                                value = '';
                                            }
                                        }

                                        // searches by both selectors when necessary.
                                        if (value == '' && !datafield.map) {
                                            value = record[datafield.name];
                                            if (value == undefined && value != null) {
                                                value = '';
                                            }
                                            // the datafield.value allows you to load values like: "Nombre":{"#text":"FASE 1"}, where the datafield is Nombre, the value is object. 
                                            // If the datafield.value is "#text", the value that will be loaded will be "FASE 1".
                                            if (datafield.value != undefined) {
                                                if (value != undefined) {
                                                    var tmpvalue = value[datafield.value];
                                                    if (tmpvalue != undefined) {
                                                        value = tmpvalue;
                                                    }
                                                }
                                            }
                                        }

                                        value = this.getvaluebytype(value, datafield);
                                        if (datafield.displayname != undefined) {
                                            record[datafield.displayname] = value;
                                        }
                                        else {
                                            record[datafield.name] = value;
                                        }
                                        if (datafield.type === "array") {
                                            updateValues.call(this, value);
                                        }
                                    }
                                }
                            }
                            updateValues.call(this, value);
                        }
                    }

                    if (source.recordendindex <= 0 || recordsstartindex < source.recordendindex) {
                        //      records[dataoffset + index] = $.extend({}, datarow);
                        records[dataoffset + index] = new Object(datarow);
                        records[dataoffset + index].uid = recordid;

                        this.originaldata[dataoffset + index] = new Object(records[i]);

                   //     this.originaldata[dataoffset + index] = $.extend({}, records[i]);
                        index++;
                    }
                }
            }
            this.records = records;
            this.cachedrecords = this.records;
        },

        loadxml: function (xmldata, data, source) {
            if (typeof (xmldata) == 'string') {
                xmldata = data = $($.parseXML(xmldata));
                xmldata = null;
            }

            if (source.root == undefined) source.root = '';
            if (source.record == undefined) source.record = '';


            var xmldata;

            if ($.jqx.browser.msie && data) {
                if (data.xml != undefined) {
                    xmldata = $(source.root + " " + source.record, $.parseXML(data.xml));
                }
                else {
                    xmldata = xmldata || $(source.root + " " + source.record, data);
                }
            }
            else xmldata = xmldata || $(source.root + " " + source.record, data);

            if (!xmldata) {
                xmldata = [];
            }

            var length = xmldata.length;
            if (xmldata.length == 0) {
                return;
            }

            this.totalrecords = this.virtualmode ? (source.totalrecords || length) : length;
            this.records = new Array();
            this.originaldata = new Array();

            var records = this.records;
            var recordsstartindex = !this.pageable ? source.recordstartindex : this.pagesize * this.pagenum;

            this.recordids = new Array();

            if (source.loadallrecords) {
                recordsstartindex = 0;
                length = this.totalrecords;
            }

            var dataoffset = 0;
            if (this.virtualmode) {
                recordsstartindex = !this.pageable ? source.recordstartindex : this.pagesize * this.pagenum;
                dataoffset = recordsstartindex;
                recordsstartindex = 0;
                length = this.totalrecords;
            }

            var datafieldslength = source.datafields ? source.datafields.length : 0;
            // auto-generate data columns
            if (datafieldslength == 0) {
                var firstrecord = xmldata[0];
                var datafields = new Array();
                for (obj in firstrecord) {
                    var field = obj;
                    datafields[datafields.length] = { name: field };
                }
                source.datafields = datafields;
                source.generatedfields = source.datafields;

                datafieldslength = datafields.length;
            }

            var p = recordsstartindex;
            var hasArray = false;
            for (var i = recordsstartindex; i < length; i++) {
                var record = xmldata[i];
                if (record == undefined)
                    break;
       
                var recordid = this.getid(source.id, record, i);
                if (!this.recordids[recordid]) {
                    this.recordids[recordid] = record;
                    var datarow = {};

                    var multiLevel = false;
                    if (source.hierarchy && source.hierarchy.root) {           
                        multiLevel = true;
                    }

                    for (var j = 0; j < datafieldslength; j++) {
                        var datafield = source.datafields[j];
                        var value = '';
                        if (undefined == datafield || datafield == null) {
                            continue;
                        }

                        if (datafield.map) {
                            if ($.isFunction(datafield.map)) {
                                value = datafield.map(record);
                            }
                            else {
                                var attributeStartIndex = datafield.map.indexOf('[');
                                if (attributeStartIndex < 0) {
                                    value = $(datafield.map, record);
                                    if (value.length == 1) value = value.text();
                                    else {
                                        hasArray = true;
                                        var subArray = new Array();
                                        for (var f = 0; f < value.length; f++) {
                                            subArray.push($(value[f]).text());
                                        }
                                        value = subArray;
                                        if (multiLevel && subArray.length > 0) {
                                            value = subArray[0];
                                        }
                                    }
                                }
                                else {
                                    var submap = datafield.map.substring(0, attributeStartIndex - 1);
                                    var attributeEndIndex = datafield.map.indexOf(']');
                                    var attribute = datafield.map.substring(attributeStartIndex + 1, attributeEndIndex);
                                    value = $(submap, record).attr(attribute);
                                    if (value == undefined) {
                                        value = $(record).attr(attribute);
                                    }

                                    if (value == undefined) value = '';
                                }
                                if (value == '') {
                                    value = $(record).attr(datafield.map);
                                    if (value == undefined) value = '';
                                }
                            }
                        }
                        // searches by both selectors when necessary.
                        if (value == '') {
                            value = $(datafield.name, record);
                            if (value.length == 1) value = value.text();
                            else {
                                var subArray = new Array();
                                for (var f = 0; f < value.length; f++) {
                                    subArray.push($(value[f]).text());
                                }
                                value = subArray;
                                if (multiLevel && subArray.length > 0) {
                                    value = subArray[0];
                                }
                            }

                            if (value == '') {
                                value = $(record).attr(datafield.name);
                                if (value == undefined) value = '';
                            }
                            if (value == '') {
                                if (record.nodeName && record.nodeName == datafield.name && record.firstChild) {
                                    value = $(record.firstChild).text();
                                }
                            }
                        }

                        var originalvalue = value;
                        value = this.getvaluebytype(value, datafield);
                        if (datafield.displayname != undefined) {
                            datarow[datafield.displayname] = value;
                        }
                        else {
                            datarow[datafield.name] = value;
                        }
                    }
                    if (source.recordendindex <= 0 || recordsstartindex < source.recordendindex) {
                        records[dataoffset + p] = $.extend({}, datarow);
                        records[dataoffset + p].uid = recordid;

                        this.originaldata[dataoffset + p] = $.extend({}, records[i]);
                        p++;
                    }
                }
            }

            if (source.hierarchy && source.hierarchy.root) {
                for (var i = recordsstartindex; i < length; i++) {
                    var record = xmldata[i];
                    var dataRecord = records[i];

                    if ($(record).parent().length > 0) {
                        var recordid = this.getid(source.id, $(record).parents(source.hierarchy.record + ":first" ));
                        dataRecord.parentuid = recordid;
                    }
                    else {
                        dataRecord.parentuid = null;
                    }
                }
            }

            this.records = records;
            this.cachedrecords = this.records;
        },

        loadics: function (data, source) {
            if (data == null) {
                return;
            }

            var rowDelimiter = source.rowDelimiter || this.rowDelimiter || '\n';
            var rows = data.split(rowDelimiter);
            var length = rows.length;
            var rowsWithNewRowDelimiter = data.split('\r');
            if (length == 1 && rowsWithNewRowDelimiter.length > 1) {
                rows = rowsWithNewRowDelimiter;
                length = rows.length;
            }
            this.records = new Array();
            this.originaldata = new Array();

            var records = this.records;
            this.recordids = new Array();

            var dataoffset = 0;
            
            var stringToDate = function (until) {
                var re = /^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z)?$/;
                var bits = re.exec(until);
                if (!bits) {
                    throw new Error('Invalid UNTIL value: ' + until)
                }
                return new Date(
                    Date.UTC(bits[1],
                    bits[2] - 1,
                    bits[3],
                    bits[5] || 0,
                    bits[6] || 0,
                    bits[7] || 0
                ));
            }

            for (var i = 0; i < length; i++) {
                var record = rows[i];
                if (record == "BEGIN:VEVENT") {
                    var appointment = {};
                    continue;
                }

                if (record.indexOf("SUMMARY") >= 0) {
                    appointment.SUMMARY = record.substring(record.indexOf("SUMMARY") + 8);
                    continue;
                }
                if (record.indexOf("LOCATION") >= 0) {
                    appointment.LOCATION = record.substring(record.indexOf("LOCATION") + 9);
                    continue;
                }
                if (record.indexOf("DESCRIPTION") >= 0) {
                    appointment.DESCRIPTION = record.substring(record.indexOf("DESCRIPTION") + 12);
                    continue;
                }
                if (record.indexOf("RRULE") >= 0) {
                    appointment.RRULE = record.substring(record.indexOf("RRULE") + 6);
                    continue;
                }
                if (record.indexOf("EXDATE") >= 0) {
                    var exDate = record.substring(record.indexOf("EXDATE") + 7);
                    appointment.EXDATE = exDate;
                    continue;
                }
                if (record.indexOf("DTEND") >= 0) {
                    appointment.DTEND = stringToDate(record.substring(record.indexOf("DTEND") + 6));
                    continue;
                }
                if (record.indexOf("DTSTART") >= 0) {
                    appointment.DTSTART = stringToDate(record.substring(record.indexOf("DTSTART") + 8));
                    continue;
                }
                if (record.indexOf("UID") >= 0) {
                    appointment.uid = appointment.UID = record.substring(record.indexOf("UID") + 4);
                    continue;
                }
                if (record.indexOf("STATUS") >= 0) {
                    appointment.STATUS = record.substring(record.indexOf("STATUS") + 7);
                    continue;
                }
                if (record == "END:VEVENT") {
                    records.push(appointment);
                    continue;
                }
            }
            this.records = records;
            this.cachedrecords = this.records;
        },

        loadtext: function (data, source) {
            if (data == null) {
                return;
            }

            var rowDelimiter = source.rowDelimiter || this.rowDelimiter || '\n';
            var rows = data.split(rowDelimiter);
            var length = rows.length;
            var rowsWithNewRowDelimiter = data.split('\r');
            if (length == 1 && rowsWithNewRowDelimiter.length > 1) {
                rows = rowsWithNewRowDelimiter;
                length = rows.length;
            }
            this.totalrecords = this.virtualmode ? (source.totalrecords || length) : length;
            this.records = new Array();
            this.originaldata = new Array();

            var records = this.records;
            var recordsstartindex = !this.pageable ? source.recordstartindex : this.pagesize * this.pagenum;

            this.recordids = new Array();

            if (source.loadallrecords) {
                recordsstartindex = 0;
                length = this.totalrecords;
            }

            var dataoffset = 0;
            if (this.virtualmode) {
                recordsstartindex = !this.pageable ? source.recordstartindex : this.pagesize * this.pagenum;
                dataoffset = recordsstartindex;
                recordsstartindex = 0;
                length = this.totalrecords;
            }

            var datafieldslength = source.datafields.length;
            var columnDelimiter = source.columnDelimiter || this.columnDelimiter;
            if (!columnDelimiter)
                columnDelimiter = (source.datatype === 'tab' || source.datatype === 'tsv') ? '\t' : ',';

            for (var i = recordsstartindex; i < length; i++) {
                var record = rows[i];
                var recordid = null;
                if (!this.recordids[recordid]) {
                    if (source.id == null) {
                        recordid = i;
                        this.recordids[recordid] = record;
                    }

                    var datarow = {};
                    var columns = rows[i].split(columnDelimiter);

                    for (var j = 0; j < datafieldslength; j++) {
                        if (j >= columns.length)
                            continue;
                        var datafield = source.datafields[j];

                        var value = columns[j];
                        if (datafield.map && $.isFunction(datafield.map)) {
                            value = datafield.map(record);
                        }

                        if (datafield.type) {
                            value = this.getvaluebytype(value, datafield);
                        }

                        var key = datafield.map || datafield.name || j.toString();
                        datarow[key] = value;
                        if (source.id != null) {
                            if (source.id === datafield.name) {
                                recordid = value;
                                this.recordids[recordid] = record;
                            }
                        }
                    }
                    if (recordid == null) {
                        recordid = i;
                    }

                    records[dataoffset + i] = $.extend({}, datarow);
                    records[dataoffset + i].uid = recordid;

                    this.originaldata[dataoffset + i] = $.extend({}, records[i]);
                }
            }
            this.records = records;
            this.cachedrecords = this.records;
        },

        getvaluebytype: function (value, datafield) {
            var originalvalue = value;
            if (value == null) return value;
            if ($.isArray(value) && datafield.type != "array") {
                for (var t = 0; t < value.length; t++) {
                    value[t] = this.getvaluebytype(value[t], datafield);
                }
                return value;
            }

            if (datafield.type == 'date') {
                if (value == "NaN") {
                    value = "";
                }
                else {
                    var tmpvalue = new Date(value);

                    if (typeof value == 'string') {
                        if (datafield.format) {
                            var newtmpvalue = $.jqx.dataFormat.parsedate(value, datafield.format);
                            if (newtmpvalue != null) {
                                tmpvalue = newtmpvalue;
                            }
                        }
                    }

                    if (tmpvalue.toString() == 'NaN' || tmpvalue.toString() == "Invalid Date") {
                        if ($.jqx.dataFormat) {
                            value = $.jqx.dataFormat.tryparsedate(value);
                        }
                        else value = tmpvalue;
                    }
                    else {
                        value = tmpvalue;
                    }

                    if (value == null) {
                        value = originalvalue;
                    }
                }
            }
            else if (datafield.type == 'float' || datafield.type == 'number' || datafield.type == 'decimal') {
                if (value == "NaN") value = "";
                else {
                    var value = parseFloat(value);
                    if (isNaN(value)) {
                        value = originalvalue;
                    }
                }
            }
            else if (datafield.type == 'int' || datafield.type == 'integer') {
                var value = parseInt(value);
                if (isNaN(value)) {
                    value = originalvalue;
                }
            }
            else if (datafield.type == 'bool' || datafield.type == 'boolean') {
                if (value != null) {
                    if (value.toLowerCase != undefined) {
                        if (value.toLowerCase() == 'false') {
                            value = false;
                        }
                        else if (value.toLowerCase() == 'true') {
                            value = true;
                        }
                    }
                }

                if (value == 1) {
                    value = true;
                }
                else if (value == 0 && value !== "") {
                    value = false;
                }
                else value = '';
            }

            return value;
        }
    }

    $.jqx.dataFormat = {};

    $.extend($.jqx.dataFormat, {
        regexTrim: /^\s+|\s+$/g,
        regexInfinity: /^[+-]?infinity$/i,
        regexHex: /^0x[a-f0-9]+$/i,
        regexParseFloat: /^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,
        toString: Object.prototype.toString,

        isBoolean: function (value) {
            return typeof value === 'boolean';
        },

        isObject: function (value) {
            return (value && (typeof value === 'object' || $.isFunction(value))) || false;
        },

        isDate: function (value) {
            return value instanceof Date;
        },

        arrayIndexOf: function (array, item) {
            if (array.indexOf) {
                return array.indexOf(item);
            }
            for (var i = 0, length = array.length; i < length; i++) {
                if (array[i] === item) {
                    return i;
                }
            }
            return -1;
        },

        isString: function (value) {
            return typeof value === 'string';
        },

        isNumber: function (value) {
            return typeof value === 'number' && isFinite(value);
        },

        isNull: function (value) {
            return value === null;
        },

        isUndefined: function (value) {
            return typeof value === 'undefined';
        },

        isValue: function (value) {
            return (this.isObject(value) || this.isString(value) || this.isNumber(value) || this.isBoolean(value));
        },

        isEmpty: function (value) {
            if (!this.isString(value) && this.isValue(value)) {
                return false;
            } else if (!this.isValue(value)) {
                return true;
            }
            value = $.trim(value).replace(/\&nbsp\;/ig, '').replace(/\&#160\;/ig, '');
            return value === "";
        },

        startsWith: function (value, pattern) {
            return value.indexOf(pattern) === 0;
        },

        endsWith: function (value, pattern) {
            return value.substr(value.length - pattern.length) === pattern;
        },

        trim: function (value) {
            return (value + "").replace(this.regexTrim, "");
        },

        isArray: function (obj) {
            return this.toString.call(obj) === "[object Array]";
        },

        defaultcalendar: function () {
            var calendar = {
                // separator of parts of a date (e.g. '/' in 11/05/1955)
                '/': "/",
                // separator of parts of a time (e.g. ':' in 05:44 PM)
                ':': ":",
                // the first day of the week (0 = Sunday, 1 = Monday, etc)
                firstDay: 0,
                days: {
                    // full day names
                    names: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
                    // abbreviated day names
                    namesAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
                    // shortest day names
                    namesShort: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
                },
                months: {
                    // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar)
                    names: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ""],
                    // abbreviated month names
                    namesAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ""]
                },
                // AM and PM designators in one of these forms:
                // The usual view, and the upper and lower case versions
                //      [standard,lowercase,uppercase]
                // The culture does not use AM or PM (likely all standard date formats use 24 hour time)
                //      null
                AM: ["AM", "am", "AM"],
                PM: ["PM", "pm", "PM"],
                eras: [
                // eras in reverse chronological order.
                // name: the name of the era in this culture (e.g. A.D., C.E.)
                // start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era.
                // offset: offset in years from gregorian calendar
                    {"name": "A.D.", "start": null, "offset": 0 }
                ],
                twoDigitYearMax: 2029,
                patterns: {
                    // short date pattern
                    d: "M/d/yyyy",
                    // long date pattern
                    D: "dddd, MMMM dd, yyyy",
                    // short time pattern
                    t: "h:mm tt",
                    // long time pattern
                    T: "h:mm:ss tt",
                    // long date, short time pattern
                    f: "dddd, MMMM dd, yyyy h:mm tt",
                    // long date, long time pattern
                    F: "dddd, MMMM dd, yyyy h:mm:ss tt",
                    // month/day pattern
                    M: "MMMM dd",
                    // month/year pattern
                    Y: "yyyy MMMM",
                    // S is a sortable format that does not vary by culture
                    S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",
                    // formatting of dates in MySQL DataBases
                    ISO: "yyyy-MM-dd hh:mm:ss",
                    ISO2: "yyyy-MM-dd HH:mm:ss",
                    d1: "dd.MM.yyyy",
                    d2: "dd-MM-yyyy",
                    d3: "MM-dd-yyyy",
                    zone1: "yyyy-MM-ddTHH:mm:ss-HH:mm",
                    zone2: "yyyy-MM-ddTHH:mm:ss+HH:mm",
                    custom: "yyyy-MM-ddTHH:mm:ss.fff",
                    custom2: "yyyy-MM-dd HH:mm:ss.fff"
                },
                percentsymbol: "%",
                currencysymbol: "$",
                currencysymbolposition: "before",
                decimalseparator: '.',
                thousandsseparator: ','
            }
            return calendar;
        },

        expandFormat: function (calendar, format) {
            // expands unspecified or single character date formats into the full pattern.
            format = format || "F";
            var pattern,
                patterns = calendar.patterns,
                len = format.length;
            if (len === 1) {
                pattern = patterns[format];
                if (!pattern) {
                    throw "Invalid date format string '" + format + "'.";
                }
                format = pattern;
            }
            else if (len === 2 && format.charAt(0) === "%") {
                // %X escape format -- intended as a custom format string that is only one character, not a built-in format.
                format = format.charAt(1);
            }
            return format;
        },

        getEra: function (date, eras) {
            if (!eras) return 0;
            if (typeof date === 'string') {
                return 0;
            }

            var start, ticks = date.getTime();
            for (var i = 0, l = eras.length; i < l; i++) {
                start = eras[i].start;
                if (start === null || ticks >= start) {
                    return i;
                }
            }
            return 0;
        },

        toUpper: function (value) {
            // 'he-IL' has non-breaking space in weekday names.
            return value.split("\u00A0").join(' ').toUpperCase();
        },

        toUpperArray: function (arr) {
            var results = [];
            for (var i = 0, l = arr.length; i < l; i++) {
                results[i] = this.toUpper(arr[i]);
            }
            return results;
        },

        getEraYear: function (date, cal, era, sortable) {
            var year = date.getFullYear();
            if (!sortable && cal.eras) {
                // convert normal gregorian year to era-shifted gregorian
                // year by subtracting the era offset
                year -= cal.eras[era].offset;
            }
            return year;
        },

        toUpper: function(value)
        {
            if (value) {
                return value.toUpperCase();
            }
            return "";
        },

        getDayIndex: function (cal, value, abbr) {
            var ret,
                days = cal.days,
                upperDays = cal._upperDays;
            if (!upperDays) {
                cal._upperDays = upperDays = [
                    this.toUpperArray(days.names),
                    this.toUpperArray(days.namesAbbr),
                    this.toUpperArray(days.namesShort)
                ];
            }
            value = value.toUpperCase();
            if (abbr) {
                ret = this.arrayIndexOf(upperDays[1], value);
                if (ret === -1) {
                    ret = this.arrayIndexOf(upperDays[2], value);
                }
            }
            else {
                ret = this.arrayIndexOf(upperDays[0], value);
            }
            return ret;
        },

        getMonthIndex: function (cal, value, abbr) {
            var months = cal.months,
                monthsGen = cal.monthsGenitive || cal.months,
                upperMonths = cal._upperMonths,
                upperMonthsGen = cal._upperMonthsGen;
            if (!upperMonths) {
                cal._upperMonths = upperMonths = [
                    this.toUpperArray(months.names),
                    this.toUpperArray(months.namesAbbr)
                ];
                cal._upperMonthsGen = upperMonthsGen = [
                    this.toUpperArray(monthsGen.names),
                    this.toUpperArray(monthsGen.namesAbbr)
                ];
            }
            value = this.toUpper(value);
            var i = this.arrayIndexOf(abbr ? upperMonths[1] : upperMonths[0], value);
            if (i < 0) {
                i = this.arrayIndexOf(abbr ? upperMonthsGen[1] : upperMonthsGen[0], value);
            }
            return i;
        },

        appendPreOrPostMatch: function (preMatch, strings) {
            // appends pre- and post- token match strings while removing escaped characters.
            // Returns a single quote count which is used to determine if the token occurs
            // in a string literal.
            var quoteCount = 0,
                escaped = false;
            for (var i = 0, il = preMatch.length; i < il; i++) {
                var c = preMatch.charAt(i);
                switch (c) {
                    case '\'':
                        if (escaped) {
                            strings.push("'");
                        }
                        else {
                            quoteCount++;
                        }
                        escaped = false;
                        break;
                    case '\\':
                        if (escaped) {
                            strings.push("\\");
                        }
                        escaped = !escaped;
                        break;
                    default:
                        strings.push(c);
                        escaped = false;
                        break;
                }
            }
            return quoteCount;
        },

        getTokenRegExp: function () {
            // regular expression for matching date and time tokens in format strings.
            return /\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g;
        },

        formatlink: function (value, format) {
            var target = '';
            if (format && format.target) { target = 'target=' + format.target; }
            if (target != '') {
                return "<a " + target + " href=\"" + value + "\">" + value + "</a>";
            }
            return "<a href=\"" + value + "\">" + value + "</a>";
        },

        formatemail: function (value) {
            return "<a href=\"mailto:" + value + "\">" + value + "</a>";
        },

        formatNumber: function (value, format, calendar)
        {
            return this.formatnumber(value, format, calendar);
        },

        formatnumber: function (value, format, calendar) {
            if (calendar == undefined || calendar == null || calendar == "") {
                calendar = this.defaultcalendar();
            }

            if (format === "" || format === null) {
                return value;
            }

            if (!this.isNumber(value)) {
                value *= 1;
            }
            var precision;
            if (format.length > 1) precision = parseInt(format.slice(1), 10);

            var options = {}
            var current = format.charAt(0).toUpperCase();

            options.thousandsSeparator = calendar.thousandsseparator;
            options.decimalSeparator = calendar.decimalseparator;
            switch (current) {
                case "D":
                case "d":
                case "F":
                case "f":
                    options.decimalPlaces = precision;
                    break;
                case "N":
                case "n":
                    options.decimalPlaces = 0;
                    break;
                case "C":
                case "c":
                    options.decimalPlaces = precision;
                    if (calendar.currencysymbolposition == "before") {
                        options.prefix = calendar.currencysymbol;
                    }
                    else {
                        options.suffix = calendar.currencysymbol;
                    }
                    break;
                case "P":
                case "p":
                    options.suffix = calendar.percentsymbol;
                    options.decimalPlaces = precision;
                    break;
                default:
                    throw "Bad number format specifier: " + current;
            }

            if (this.isNumber(value)) {
                var negative = (value < 0);
                var output = value + "";
                var decimalseparator = (options.decimalSeparator) ? options.decimalSeparator : ".";
                var decimalindex;
                if (this.isNumber(options.decimalPlaces)) {
                    // Round to the correct decimal place
                    var decimalplaces = options.decimalPlaces;
                    var decimal = Math.pow(10, decimalplaces);
                    output = (value * decimal).toFixed(0) / decimal + "";
                    decimalindex = output.lastIndexOf(".");
                    if (decimalplaces > 0) {
                        // Add the decimal separator
                        if (decimalindex < 0) {
                            output += decimalseparator;
                            decimalindex = output.length - 1;
                        }
                            // Replace the "."
                        else if (decimalseparator !== ".") {
                            output = output.replace(".", decimalseparator);
                        }
                        // Add missing zeros
                        while ((output.length - 1 - decimalindex) < decimalplaces) {
                            output += "0";
                        }
                    }
                }
                else {
                    var output = value + "";
                    decimalindex = output.lastIndexOf(".");
                    if (decimalindex > 0 && decimalplaces == undefined) {
                          // Replace the "."
                         if (decimalseparator !== ".") {
                            output = output.replace(".", decimalseparator);
                        }
                    }
                }

                if (options.thousandsSeparator) {
                    var groupseparator = options.thousandsSeparator;
                    decimalindex = output.lastIndexOf(decimalseparator);
                    decimalindex = (decimalindex > -1) ? decimalindex : output.length;
                    var newoutput = output.substring(decimalindex);
                    var nCount = -1;
                    for (var i = decimalindex; i > 0; i--) {
                        nCount++;
                        if ((nCount % 3 === 0) && (i !== decimalindex) && (!negative || (i > 1))) {
                            newoutput = groupseparator + newoutput;
                        }
                        newoutput = output.charAt(i - 1) + newoutput;
                    }
                    output = newoutput;
                }
                // Prepend prefix
                output = (options.prefix) ? options.prefix + output : output;
                // Append suffix
                output = (options.suffix) ? output + options.suffix : output;
                return output;

            } else {
                return value;
            }
        },

        tryparsedate: function (value, calendar) {
            if (calendar == undefined || calendar == null) {
                calendar = this.defaultcalendar();
            }
            var me = this;
            if (value == "")
                return null;

            if (value != null && !value.substring) {
                value = value.toString();
            }

            if (value != null && value.substring(0, 6) == "/Date(") {
                var jsonDateRE = /^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;

                var date = new Date(+value.replace(/\/Date\((\d+)\)\//, '$1'));
                if (date == "Invalid Date") {
                    var m = value.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);
                    var date = null;
                    if (m)
                        date = new Date(1 * m[1] + 3600000 * m[2] + 60000 * m[3]);
                }
                if (date == null || date == "Invalid Date" || isNaN(date)) {
                    var arr = jsonDateRE.exec(value);
                    if (arr) {
                        // 0 - complete results; 1 - ticks; 2 - sign; 3 - minutes
                        var result = new Date(parseInt(arr[1]));
                        if (arr[2]) {
                            var mins = parseInt(arr[3]);
                            if (arr[2] === "-") {
                                mins = -mins;
                            }
                            var current = result.getUTCMinutes();
                            result.setUTCMinutes(current - mins);
                        }
                        if (!isNaN(result.valueOf())) {
                            return result;
                        }
                    }
                }

                return date;
            }

            patterns = calendar.patterns;
            for (prop in patterns) {
                date = me.parsedate(value, patterns[prop], calendar);
                if (date) {
                    if (prop == "ISO") {
                        var tmpDate = me.parsedate(value, patterns["ISO2"], calendar);
                        if (tmpDate) return tmpDate;
                    }
                    return date;
                }
            }

            if (value != null) {
                var tmpDate = null;
                var dateParts = [':', '/', '-'];
                var canParse = true;
                for (var part = 0; part < dateParts.length; part++) {
                    if (value.indexOf(dateParts[part]) != -1) {
                        canParse = false;
                    }
                }

                if (canParse) {
                    var number = new Number(value);
                    if (!isNaN(number)) {
                        return new Date(number);
                    }
                }
            }

            if ($.type(value) === "string") {
                var that = me;
                value = that.trim(value);
                var splitParts = [':', '/', '-', ' ', ','];
                var replaceAll = function (find, replace, str) {
                    return str.replace(new RegExp(find, 'g'), replace);
                }
                value = replaceAll(', ', ',', value);
                var timePart = "";
                var datePart = value;
                if (value.indexOf(":") >= 0) {
                    timePart = value.substring(value.indexOf(":") - 2);
                    timePart = that.trim(timePart);
                    datePart = value.substring(0, value.indexOf(":") - 2);
                }
                else if (value.toUpperCase().indexOf("AM") >= 0) {
                    timePart = value.substring(value.toUpperCase().indexOf("AM") - 2);
                    timePart = that.trim(timePart);
                    datePart = value.substring(0, value.toUpperCase().indexOf("AM") - 2);
                }
                else if (value.toUpperCase().indexOf("PM") >= 0) {
                    timePart = value.substring(value.toUpperCase().indexOf("PM") - 2);
                    timePart = that.trim(timePart);
                    datePart = value.substring(0, value.toUpperCase().indexOf("PM") - 2);
                }
                var parseDate = new Date();
                var parsed = false;
                if (datePart) {
                    for (var i = 0; i < splitParts.length; i++) {
                        if (datePart.indexOf(splitParts[i]) >= 0) {
                            dateParts = datePart.split(splitParts[i]);
                            break;
                        }
                    }

                    var days = new Array();
                    var months = new Array();
                    var years = new Array();
                    var dayPart = null;
                    var monthPart = null;
                    for (var i = 0; i < dateParts.length; i++) {
                        var part = dateParts[i];
                        var isDay = that.parsedate(part, "d", calendar) || that.parsedate(part, "dd", calendar) || that.parsedate(part, "ddd", calendar) || that.parsedate(part, "dddd", calendar);
                        if (isDay) {
                            if (part.length <= 2) {
                                dayPart = i;
                                days.push(isDay.getDate());
                                break
                            }
                        }
                    }
                    for (var i = 0; i < dateParts.length; i++) {
                        var part = dateParts[i];
                        var isMonth = that.parsedate(part, "M", calendar) || that.parsedate(part, "MM", calendar) || that.parsedate(part, "MMM", calendar) || that.parsedate(part, "MMMM", calendar);
                        if (isMonth) {
                            if (dayPart != undefined && dayPart == i)
                                continue;

                            months.push(isMonth.getMonth());

                            if (part.length > 2) {
                                monthPart = i;
                                break;
                            }
                        }
                    }
                    for (var i = 0; i < dateParts.length; i++) {
                        var part = dateParts[i];
                        var isYear = that.parsedate(part, "yyyy", calendar);
                        if (isYear) {
                            if (dayPart != undefined && dayPart == i)
                                continue;

                            if (monthPart != undefined && monthPart == i)
                                continue;

                            years.push(isYear.getFullYear());
                        }
                    }
                    var dates = new Array();
                    for (var d = 0; d < days.length; d++) {
                        for (var m = 0; m < months.length; m++) {
                            for (var y = 0; y < years.length; y++) {
                                var result = new Date(years[y], months[m], days[d]);
                                if (years[y] < 1970)
                                    result.setFullYear(years[y]);
                                if (result.getTime() != NaN) {
                                    dates.push(result);
                                }
                            }
                        }
                    }
                    if (dates.length > 0) {
                        parseDate = dates[0];
                        parsed = true;
                    }
                }
                if (timePart) {
                    var timeParts = timePart.indexOf(":") >= 0 ? timePart.split(':') : timePart;
                    var parsedTime = that.parsedate(timePart, "h:mm tt", calendar) || that.parsedate(timePart, "h:mm:ss tt", calendar) || that.parsedate(timePart, "HH:mm:ss.fff", calendar) || that.parsedate(timePart, "HH:mm:ss.ff", calendar) || that.parsedate(timePart, "HH:mm:ss.tttt", calendar) || that.parsedate(timePart, "HH:mm:ss", calendar) || that.parsedate(timePart, "HH:mm", calendar) || that.parsedate(timePart, "HH", calendar);

                    var hour = 0, minute = 0, second = 0, milisecond = 0;
                    if (parsedTime && parsedTime.getTime() != NaN) {
                        hour = parsedTime.getHours();
                        minute = parsedTime.getMinutes();
                        second = parsedTime.getSeconds();
                        milisecond = parsedTime.getMilliseconds();
                    }
                    else {
                        if (timeParts.length == 1) {
                            hour = parseInt(timeParts[0]);
                        }
                        if (timeParts.length == 2) {
                            hour = parseInt(timeParts[0]);
                            minute = parseInt(timeParts[1]);
                        }
                        if (timeParts.length == 3) {
                            hour = parseInt(timeParts[0]);
                            minute = parseInt(timeParts[1]);
                            if (timeParts[2].indexOf(".") >= 0) {
                                second = parseInt(timeParts[2].toString().split(".")[0]);
                                milisecond = parseInt(timeParts[2].toString().split(".")[1]);
                            }
                            else {
                                second = parseInt(timeParts[2]);
                            }
                        }
                        if (timeParts.length == 4) {
                            hour = parseInt(timeParts[0]);
                            minute = parseInt(timeParts[1]);
                            second = parseInt(timeParts[2]);
                            milisecond = parseInt(timeParts[3]);
                        }
                    }
                    if (parseDate && !isNaN(hour) && !isNaN(minute) && !isNaN(second) && !isNaN(milisecond)) {
                        parseDate.setHours(hour, minute, second, milisecond);
                        parsed = true;
                    }
                }
                if (parsed) {
                    return parseDate;
                }
            }

            return null;
        },

        getparseregexp: function (cal, format) {
            // converts a format string into a regular expression with groups that
            // can be used to extract date fields from a date string.
            // check for a cached parse regex.
            var re = cal._parseRegExp;
            if (!re) {
                cal._parseRegExp = re = {};
            }
            else {
                var reFormat = re[format];
                if (reFormat) {
                    return reFormat;
                }
            }

            // expand single digit formats, then escape regular expression characters.
            var expFormat = this.expandFormat(cal, format).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g, "\\\\$1"),
                regexp = ["^"],
                groups = [],
                index = 0,
                quoteCount = 0,
                tokenRegExp = this.getTokenRegExp(),
                match;

            // iterate through each date token found.
            while ((match = tokenRegExp.exec(expFormat)) !== null) {
                var preMatch = expFormat.slice(index, match.index);
                index = tokenRegExp.lastIndex;

                // don't replace any matches that occur inside a string literal.
                quoteCount += this.appendPreOrPostMatch(preMatch, regexp);
                if (quoteCount % 2) {
                    regexp.push(match[0]);
                    continue;
                }

                // add a regex group for the token.
                var m = match[0],
                    len = m.length,
                    add;
                switch (m) {
                    case 'dddd': case 'ddd':
                    case 'MMMM': case 'MMM':
                    case 'gg': case 'g':
                        add = "(\\D+)";
                        break;
                    case 'tt': case 't':
                        add = "(\\D*)";
                        break;
                    case 'yyyy':
                    case 'fff':
                    case 'ff':
                    case 'f':
                        add = "(\\d{" + len + "})";
                        break;
                    case 'dd': case 'd':
                    case 'MM': case 'M':
                    case 'yy': case 'y':
                    case 'HH': case 'H':
                    case 'hh': case 'h':
                    case 'mm': case 'm':
                    case 'ss': case 's':
                        add = "(\\d\\d?)";
                        break;
                    case 'zzz':
                        add = "([+-]?\\d\\d?:\\d{2})";
                        break;
                    case 'zz': case 'z':
                        add = "([+-]?\\d\\d?)";
                        break;
                    case '/':
                        add = "(\\" + cal["/"] + ")";
                        break;
                    default:
                        throw "Invalid date format pattern '" + m + "'.";
                        break;
                }
                if (add) {
                    regexp.push(add);
                }
                groups.push(match[0]);
            }
            this.appendPreOrPostMatch(expFormat.slice(index), regexp);
            regexp.push("$");

            // allow whitespace to differ when matching formats.
            var regexpStr = regexp.join('').replace(/\s+/g, "\\s+"),
                parseRegExp = { 'regExp': regexpStr, 'groups': groups };

            // cache the regex for this format.
            return re[format] = parseRegExp;
        },

        outOfRange: function (value, low, high) {
            return value < low || value > high;
        },

        expandYear: function (cal, year) {
            // expands 2-digit year into 4 digits.
            var now = new Date(),
        era = this.getEra(now);
            if (year < 100) {
                var twoDigitYearMax = cal.twoDigitYearMax;
                twoDigitYearMax = typeof twoDigitYearMax === 'string' ? new Date().getFullYear() % 100 + parseInt(twoDigitYearMax, 10) : twoDigitYearMax;
                var curr = this.getEraYear(now, cal, era);
                year += curr - (curr % 100);
                if (year > twoDigitYearMax) {
                    year -= 100;
                }
            }
            return year;
        },

        parsedate: function (value, format, calendar) {
            if (calendar == undefined || calendar == null) {
                calendar = this.defaultcalendar();
            }
            // try to parse the date string by matching against the format string
            // while using the specified culture for date field names.
            value = this.trim(value);
            var cal = calendar,
            // convert date formats into regular expressions with groupings.
            // use the regexp to determine the input format and extract the date fields.
                parseInfo = this.getparseregexp(cal, format),
                match = new RegExp(parseInfo.regExp).exec(value);
            if (match === null) {
                return null;
            }
            // found a date format that matches the input.
            var groups = parseInfo.groups,
                era = null, year = null, month = null, date = null, weekDay = null,
                hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null,
                pmHour = false;
            // iterate the format groups to extract and set the date fields.
            for (var j = 0, jl = groups.length; j < jl; j++) {
                var matchGroup = match[j + 1];
                if (matchGroup) {
                    var current = groups[j],
                        clength = current.length,
                        matchInt = parseInt(matchGroup, 10);
                    switch (current) {
                        case 'dd': case 'd':
                            // Day of month.
                            date = matchInt;
                            // check that date is generally in valid range, also checking overflow below.
                            if (this.outOfRange(date, 1, 31)) return null;
                            break;
                        case 'MMM':
                        case 'MMMM':
                            month = this.getMonthIndex(cal, matchGroup, clength === 3);
                            if (this.outOfRange(month, 0, 11)) return null;
                            break;
                        case 'M': case 'MM':
                            // Month.
                            month = matchInt - 1;
                            if (this.outOfRange(month, 0, 11)) return null;
                            break;
                        case 'y': case 'yy':
                        case 'yyyy':
                            year = clength < 4 ? this.expandYear(cal, matchInt) : matchInt;
                            if (this.outOfRange(year, 0, 9999)) return null;
                            break;
                        case 'h': case 'hh':
                            // Hours (12-hour clock).
                            hour = matchInt;
                            if (hour === 12) hour = 0;
                            if (this.outOfRange(hour, 0, 11)) return null;
                            break;
                        case 'H': case 'HH':
                            // Hours (24-hour clock).
                            hour = matchInt;
                            if (this.outOfRange(hour, 0, 23)) return null;
                            break;
                        case 'm': case 'mm':
                            // Minutes.
                            min = matchInt;
                            if (this.outOfRange(min, 0, 59)) return null;
                            break;
                        case 's': case 'ss':
                            // Seconds.
                            sec = matchInt;
                            if (this.outOfRange(sec, 0, 59)) return null;
                            break;
                        case 'tt': case 't':
                            // AM/PM designator.
                            // see if it is standard, upper, or lower case PM. If not, ensure it is at least one of
                            // the AM tokens. If not, fail the parse for this format.
                            pmHour = cal.PM && (matchGroup === cal.PM[0] || matchGroup === cal.PM[1] || matchGroup === cal.PM[2]);
                            if (!pmHour && (!cal.AM || (matchGroup !== cal.AM[0] && matchGroup !== cal.AM[1] && matchGroup !== cal.AM[2]))) return null;
                            break;
                        case 'f':
                            // Deciseconds.
                        case 'ff':
                            // Centiseconds.
                        case 'fff':
                            // Milliseconds.
                            msec = matchInt * Math.pow(10, 3 - clength);
                            if (this.outOfRange(msec, 0, 999)) return null;
                            break;
                        case 'ddd':
                            // Day of week.
                        case 'dddd':
                            // Day of week.
                            weekDay = this.getDayIndex(cal, matchGroup, clength === 3);
                            if (this.outOfRange(weekDay, 0, 6)) return null;
                            break;
                        case 'zzz':
                            // Time zone offset in +/- hours:min.
                            var offsets = matchGroup.split(/:/);
                            if (offsets.length !== 2) return null;
                            hourOffset = parseInt(offsets[0], 10);
                            if (this.outOfRange(hourOffset, -12, 13)) return null;
                            var minOffset = parseInt(offsets[1], 10);
                            if (this.outOfRange(minOffset, 0, 59)) return null;
                            tzMinOffset = (hourOffset * 60) + (this.startsWith(matchGroup, '-') ? -minOffset : minOffset);
                            break;
                        case 'z': case 'zz':
                            // Time zone offset in +/- hours.
                            hourOffset = matchInt;
                            if (this.outOfRange(hourOffset, -12, 13)) return null;
                            tzMinOffset = hourOffset * 60;
                            break;
                        case 'g': case 'gg':
                            var eraName = matchGroup;
                            if (!eraName || !cal.eras) return null;
                            eraName = trim(eraName.toLowerCase());
                            for (var i = 0, l = cal.eras.length; i < l; i++) {
                                if (eraName === cal.eras[i].name.toLowerCase()) {
                                    era = i;
                                    break;
                                }
                            }
                            // could not find an era with that name
                            if (era === null) return null;
                            break;
                    }
                }
            }
            var result = new Date(), defaultYear, convert = cal.convert;
            defaultYear = result.getFullYear();
            if (year === null) {
                year = defaultYear;
            }
            else if (cal.eras) {
                // year must be shifted to normal gregorian year
                // but not if year was not specified, its already normal gregorian
                // per the main if clause above.
                year += cal.eras[(era || 0)].offset;
            }
            // set default day and month to 1 and January, so if unspecified, these are the defaults
            // instead of the current day/month.
            if (month === null) {
                month = 0;
            }
            if (date === null) {
                date = 1;
            }
            // now have year, month, and date, but in the culture's calendar.
            // convert to gregorian if necessary
            if (convert) {
                result = convert.toGregorian(year, month, date);
                // conversion failed, must be an invalid match
                if (result === null) return null;
            }
            else {
                // have to set year, month and date together to avoid overflow based on current date.
                result.setFullYear(year, month, date);
                // check to see if date overflowed for specified month (only checked 1-31 above).
                if (result.getDate() !== date) return null;
                // invalid day of week.
                if (weekDay !== null && result.getDay() !== weekDay) {
                    return null;
                }
            }
            // if pm designator token was found make sure the hours fit the 24-hour clock.
            if (pmHour && hour < 12) {
                hour += 12;
            }
            result.setHours(hour, min, sec, msec);
            if (tzMinOffset !== null) {
                // adjust timezone to utc before applying local offset.
                var adjustedMin = result.getMinutes() - (tzMinOffset + result.getTimezoneOffset());
                // Safari limits hours and minutes to the range of -127 to 127.  We need to use setHours
                // to ensure both these fields will not exceed this range.  adjustedMin will range
                // somewhere between -1440 and 1500, so we only need to split this into hours.
                result.setHours(result.getHours() + parseInt(adjustedMin / 60, 10), adjustedMin % 60);
            }
            return result;
        },

        cleardatescache: function () {
            this.datescache = new Array();
        },

        formatDate: function (value, format, calendar)
        {
            return this.formatdate(value, format, calendar);
        },

        formatdate: function (value, format, calendar) {
            if (calendar == undefined || calendar == null) {
                calendar = this.defaultcalendar();
            }

            if (typeof value === 'string') {
                return value;
            }

            var lookupkey = value.toString() + "_" + format;
            if (this.datescache && this.datescache[lookupkey]) {
                return this.datescache[lookupkey];
            }

            if (!format || !format.length || format === 'i') {
                var ret;
                ret = this.formatDate(value, calendar.patterns.F, calendar);
                return ret;
            }

            var eras = calendar.eras,
            sortable = format === "s";
            format = this.expandFormat(calendar, format);

            // Start with an empty string
            ret = [];
            var hour,
            zeros = ['0', '00', '000'],
            foundDay,
            checkedDay,
            dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g,
            quoteCount = 0,
            tokenRegExp = this.getTokenRegExp(),
            converted;

            function padZeros(num, c) {
                var r, s = num + '';
                if (c > 1 && s.length < c) {
                    r = (zeros[c - 2] + s);
                    return r.substr(r.length - c, c);
                }
                else {
                    r = s;
                }
                return r;
            }

            function hasDay() {
                if (foundDay || checkedDay) {
                    return foundDay;
                }
                foundDay = dayPartRegExp.test(format);
                checkedDay = true;
                return foundDay;
            }

            function getPart(date, part) {
                if (converted) {
                    return converted[part];
                }
                if (date.getMonth != undefined) {
                    switch (part) {
                        case 0: return date.getFullYear();
                        case 1: return date.getMonth();
                        case 2: return date.getDate();
                    }
                }
            }

            for (; ; ) {
                // Save the current index
                var index = tokenRegExp.lastIndex,
                // Look for the next pattern
                ar = tokenRegExp.exec(format);

                // Append the text before the pattern (or the end of the string if not found)
                var preMatch = format.slice(index, ar ? ar.index : format.length);
                quoteCount += this.appendPreOrPostMatch(preMatch, ret);

                if (!ar) {
                    break;
                }

                // do not replace any matches that occur inside a string literal.
                if (quoteCount % 2) {
                    ret.push(ar[0]);
                    continue;
                }

                var current = ar[0],
                clength = current.length;

                switch (current) {
                    case "ddd":
                        //Day of the week, as a three-letter abbreviation
                    case "dddd":
                        // Day of the week, using the full name
                        var names = (clength === 3) ? calendar.days.namesAbbr : calendar.days.names;
                        ret.push(names[value.getDay()]);
                        break;
                    case "d":
                        // Day of month, without leading zero for single-digit days
                    case "dd":
                        // Day of month, with leading zero for single-digit days
                        foundDay = true;
                        ret.push(padZeros(getPart(value, 2), clength));
                        break;
                    case "MMM":
                        // Month, as a three-letter abbreviation
                    case "MMMM":
                        // Month, using the full name
                        var part = getPart(value, 1);
                        ret.push(calendar.months[clength === 3 ? "namesAbbr" : "names"][part]);
                        break;
                    case "M":
                        // Month, as digits, with no leading zero for single-digit months
                    case "MM":
                        // Month, as digits, with leading zero for single-digit months
                        ret.push(padZeros(getPart(value, 1) + 1, clength));
                        break;
                    case "y":
                        // Year, as two digits, but with no leading zero for years less than 10
                    case "yy":
                        // Year, as two digits, with leading zero for years less than 10
                    case "yyyy":
                        // Year represented by four full digits
                        part = this.getEraYear(value, calendar, this.getEra(value, eras), sortable);
                        if (clength < 4) {
                            part = part % 100;
                        }
                        ret.push(padZeros(part, clength));
                        break;
                    case "h":
                        // Hours with no leading zero for single-digit hours, using 12-hour clock
                    case "hh":
                        // Hours with leading zero for single-digit hours, using 12-hour clock
                        hour = value.getHours() % 12;
                        if (hour === 0) hour = 12;
                        ret.push(padZeros(hour, clength));
                        break;
                    case "H":
                        // Hours with no leading zero for single-digit hours, using 24-hour clock
                    case "HH":
                        // Hours with leading zero for single-digit hours, using 24-hour clock
                        ret.push(padZeros(value.getHours(), clength));
                        break;
                    case "m":
                        // Minutes with no leading zero  for single-digit minutes
                    case "mm":
                        // Minutes with leading zero  for single-digit minutes
                        ret.push(padZeros(value.getMinutes(), clength));
                        break;
                    case "s":
                        // Seconds with no leading zero for single-digit seconds
                    case "ss":
                        // Seconds with leading zero for single-digit seconds
                        ret.push(padZeros(value.getSeconds(), clength));
                        break;
                    case "t":
                        // One character am/pm indicator ("a" or "p")
                    case "tt":
                        // Multicharacter am/pm indicator
                        part = value.getHours() < 12 ? (calendar.AM ? calendar.AM[0] : " ") : (calendar.PM ? calendar.PM[0] : " ");
                        ret.push(clength === 1 ? part.charAt(0) : part);
                        break;
                    case "f":
                        // Deciseconds
                    case "ff":
                        // Centiseconds
                    case "fff":
                        // Milliseconds
                        ret.push(padZeros(value.getMilliseconds(), 3).substr(0, clength));
                        break;
                    case "z":
                        // Time zone offset, no leading zero
                    case "zz":
                        // Time zone offset with leading zero
                        hour = value.getTimezoneOffset() / 60;
                        ret.push((hour <= 0 ? '+' : '-') + padZeros(Math.floor(Math.abs(hour)), clength));
                        break;
                    case "zzz":
                        // Time zone offset with leading zero
                        hour = value.getTimezoneOffset() / 60;
                        ret.push((hour <= 0 ? '+' : '-') + padZeros(Math.floor(Math.abs(hour)), 2) +
                        // Hard coded ":" separator, rather than using calendar.TimeSeparator
                        // Repeated here for consistency, plus ":" was already assumed in date parsing.
                    ":" + padZeros(Math.abs(value.getTimezoneOffset() % 60), 2));
                        break;
                    case "g":
                    case "gg":
                        if (calendar.eras) {
                            ret.push(calendar.eras[this.getEra(value, eras)].name);
                        }
                        break;
                    case "/":
                        ret.push(calendar["/"]);
                        break;
                    default:
                        throw "Invalid date format pattern '" + current + "'.";
                        break;
                }
            }

            var result = ret.join('');

            if (!this.datescache) {
                this.datescache = new Array();
            }

            this.datescache[lookupkey] = result;
            return result;
        }
    });

    // AJAX
    $.jqx.data = {};
    var
        ajaxLocParts,
        ajaxLocation,

        rhash = /#.*$/,
        rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
        rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
        rnoContent = /^(?:GET|HEAD)$/,
        rprotocol = /^\/\//,
        rquery = /\?/,
        rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
        rts = /([?&])_=[^&]*/,
        rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
        core_rspace = /\s+/,
        _load = $.fn.load,
        prefilters = {},
        transports = {},
        allTypes = ["*/"] + ["*"];

    try {
        ajaxLocation = location.href;
    } catch (e) {
        ajaxLocation = document.createElement("a");
        ajaxLocation.href = "";
        ajaxLocation = ajaxLocation.href;
    }

    ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [];

    function addToPrefiltersOrTransports(structure) {

        return function (dataTypeExpression, func) {

            if (typeof dataTypeExpression !== "string") {
                func = dataTypeExpression;
                dataTypeExpression = "*";
            }

            var dataType, list, placeBefore,
                dataTypes = dataTypeExpression.toLowerCase().split(core_rspace),
                i = 0,
                length = dataTypes.length;

            if ($.isFunction(func)) {
                for (; i < length; i++) {
                    dataType = dataTypes[i];
                    placeBefore = /^\+/.test(dataType);
                    if (placeBefore) {
                        dataType = dataType.substr(1) || "*";
                    }
                    list = structure[dataType] = structure[dataType] || [];
                    list[placeBefore ? "unshift" : "push"](func);
                }
            }
        };
    }

    function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR,
            dataType /* internal */, inspected /* internal */) {

        dataType = dataType || options.dataTypes[0];
        inspected = inspected || {};

        inspected[dataType] = true;

        var selection,
            list = structure[dataType],
            i = 0,
            length = list ? list.length : 0,
            executeOnly = (structure === prefilters);

        for (; i < length && (executeOnly || !selection) ; i++) {
            selection = list[i](options, originalOptions, jqXHR);
            if (typeof selection === "string") {
                if (!executeOnly || inspected[selection]) {
                    selection = undefined;
                } else {
                    options.dataTypes.unshift(selection);
                    selection = inspectPrefiltersOrTransports(
                            structure, options, originalOptions, jqXHR, selection, inspected);
                }
            }
        }
        if ((executeOnly || !selection) && !inspected["*"]) {
            selection = inspectPrefiltersOrTransports(
                    structure, options, originalOptions, jqXHR, "*", inspected);
        }
        return selection;
    }

    function ajaxExtend(target, src) {
        var key, deep,
            flatOptions = $.jqx.data.ajaxSettings.flatOptions || {};
        for (key in src) {
            if (src[key] !== undefined) {
                (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];
            }
        }
        if (deep) {
            $.extend(true, target, deep);
        }
    }

    $.extend($.jqx.data, {
        ajaxSetup: function (target, settings) {
            if (settings) {
                ajaxExtend(target, $.jqx.data.ajaxSettings);
            } else {
                settings = target;
                target = $.jqx.data.ajaxSettings;
            }
            ajaxExtend(target, settings);
            return target;
        },

        ajaxSettings: {
            url: ajaxLocation,
            isLocal: rlocalProtocol.test(ajaxLocParts[1]),
            global: true,
            type: "GET",
            contentType: "application/x-www-form-urlencoded; charset=UTF-8",
            processData: true,
            async: true,
          
            accepts: {
                xml: "application/xml, text/xml",
                html: "text/html",
                text: "text/plain",
                json: "application/json, text/javascript",
                "*": allTypes
            },

            contents: {
                xml: /xml/,
                html: /html/,
                json: /json/
            },

            responseFields: {
                xml: "responseXML",
                text: "responseText"
            },

            converters: {
                "* text": window.String,
                "text html": true,
                "text json": $.parseJSON,
                "text xml": $.parseXML
            },

            flatOptions: {
                context: true,
                url: true
            }
        },

        ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
        ajaxTransport: addToPrefiltersOrTransports(transports),

        ajax: function (url, options) {

            if (typeof url === "object") {
                options = url;
                url = undefined;
            }

            options = options || {};

            var ifModifiedKey,
                responseHeadersString,
                responseHeaders,
                transport,
                timeoutTimer,
                parts,
                fireGlobals,
                i,
                s = $.jqx.data.ajaxSetup({}, options),
                callbackContext = s.context || s,
                globalEventContext = callbackContext !== s &&
                    (callbackContext.nodeType || callbackContext instanceof $) ?
                            $(callbackContext) : $.event,
                deferred = $.Deferred(),
                completeDeferred = $.Callbacks("once memory"),
                statusCode = s.statusCode || {},
                requestHeaders = {},
                requestHeadersNames = {},
                state = 0,
                strAbort = "canceled",
                jqXHR = {
                    readyState: 0,
                    setRequestHeader: function (name, value) {
                        if (!state) {
                            var lname = name.toLowerCase();
                            name = requestHeadersNames[lname] = requestHeadersNames[lname] || name;
                            requestHeaders[name] = value;
                        }
                        return this;
                    },
                    getAllResponseHeaders: function () {
                        return state === 2 ? responseHeadersString : null;
                    },
                    getResponseHeader: function (key) {
                        var match;
                        if (state === 2) {
                            if (!responseHeaders) {
                                responseHeaders = {};
                                while ((match = rheaders.exec(responseHeadersString))) {
                                    responseHeaders[match[1].toLowerCase()] = match[2];
                                }
                            }
                            match = responseHeaders[key.toLowerCase()];
                        }
                        return match === undefined ? null : match;
                    },

                    overrideMimeType: function (type) {
                        if (!state) {
                            s.mimeType = type;
                        }
                        return this;
                    },

                    abort: function (statusText) {
                        statusText = statusText || strAbort;
                        if (transport) {
                            transport.abort(statusText);
                        }
                        done(0, statusText);
                        return this;
                    }
                };

            function done(status, nativeStatusText, responses, headers) {
                var isSuccess, success, error, response, modified,
                    statusText = nativeStatusText;

                if (state === 2) {
                    return;
                }

                state = 2;
                if (timeoutTimer) {
                    clearTimeout(timeoutTimer);
                }

                transport = undefined;
                responseHeadersString = headers || "";
                jqXHR.readyState = status > 0 ? 4 : 0;

                if (responses) {
                    response = ajaxHandleResponses(s, jqXHR, responses);
                }

                if (status >= 200 && status < 300 || status === 304) {

                    if (s.ifModified) {

                        modified = jqXHR.getResponseHeader("Last-Modified");
                        if (modified) {
                            $.lastModified[ifModifiedKey] = modified;
                        }
                        modified = jqXHR.getResponseHeader("Etag");
                        if (modified) {
                            $.etag[ifModifiedKey] = modified;
                        }
                    }

                    if (status === 304) {
                        statusText = "notmodified";
                        isSuccess = true;
                    } else {

                        isSuccess = ajaxConvert(s, response);
                        statusText = isSuccess.state;
                        success = isSuccess.data;
                        error = isSuccess.error;
                        isSuccess = !error;
                    }
                } else {
                    error = statusText;
                    if (!statusText || status) {
                        statusText = "error";
                        if (status < 0) {
                            status = 0;
                        }
                    }
                }

                jqXHR.status = status;
                jqXHR.statusText = (nativeStatusText || statusText) + "";

                if (isSuccess) {
                    deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
                } else {
                    deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
                }

                jqXHR.statusCode(statusCode);
                statusCode = undefined;

                if (fireGlobals) {
                    globalEventContext.trigger("ajax" + (isSuccess ? "Success" : "Error"),
                            [jqXHR, s, isSuccess ? success : error]);
                }

                completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);

                if (fireGlobals) {
                    globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
                    if (!(--$.active)) {
                        $.event.trigger("ajaxStop");
                    }
                }
            }

            deferred.promise(jqXHR);
            jqXHR.success = jqXHR.done;
            jqXHR.error = jqXHR.fail;
            jqXHR.complete = completeDeferred.add;

            jqXHR.statusCode = function (map) {
                if (map) {
                    var tmp;
                    if (state < 2) {
                        for (tmp in map) {
                            statusCode[tmp] = [statusCode[tmp], map[tmp]];
                        }
                    } else {
                        tmp = map[jqXHR.status];
                        jqXHR.always(tmp);
                    }
                }
                return this;
            };

            s.url = ((url || s.url) + "").replace(rhash, "").replace(rprotocol, ajaxLocParts[1] + "//");
            s.dataTypes = $.trim(s.dataType || "*").toLowerCase().split(core_rspace);

            if (s.crossDomain == null) {
                parts = rurl.exec(s.url.toLowerCase());
                s.crossDomain = !!(parts &&
                    (parts[1] !== ajaxLocParts[1] || parts[2] !== ajaxLocParts[2] ||
                        (parts[3] || (parts[1] === "http:" ? 80 : 443)) !=
                            (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? 80 : 443)))
                );
            }

            if (s.data && s.processData && typeof s.data !== "string") {
                s.data = $.param(s.data, s.traditional);
            }

            inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);

            if (state === 2) {
                return jqXHR;
            }

            fireGlobals = s.global;
            s.type = s.type.toUpperCase();
            s.hasContent = !rnoContent.test(s.type);

            if (fireGlobals && $.active++ === 0) {
                $.event.trigger("ajaxStart");
            }

            if (!s.hasContent) {
                if (s.data) {
                    s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
                    delete s.data;
                }

                ifModifiedKey = s.url;

                if (s.cache === false) {

                    var ts = $.now(),
                        ret = s.url.replace(rts, "$1_=" + ts);

                    s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
                }
            }

            if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
                jqXHR.setRequestHeader("Content-Type", s.contentType);
            }

            if (s.ifModified) {
                ifModifiedKey = ifModifiedKey || s.url;
                if ($.lastModified[ifModifiedKey]) {
                    jqXHR.setRequestHeader("If-Modified-Since", $.lastModified[ifModifiedKey]);
                }
                if ($.etag[ifModifiedKey]) {
                    jqXHR.setRequestHeader("If-None-Match", $.etag[ifModifiedKey]);
                }
            }

            jqXHR.setRequestHeader(
                "Accept",
                s.dataTypes[0] && s.accepts[s.dataTypes[0]] ?
                    s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") :
                    s.accepts["*"]
            );

            for (i in s.headers) {
                jqXHR.setRequestHeader(i, s.headers[i]);
            }

            if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) {
                return jqXHR.abort();

            }

            strAbort = "abort";

            for (i in { success: 1, error: 1, complete: 1 }) {
                jqXHR[i](s[i]);
            }

            transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);

            if (!transport) {
                done(-1, "No Transport");
            } else {
                jqXHR.readyState = 1;
                if (fireGlobals) {
                    globalEventContext.trigger("ajaxSend", [jqXHR, s]);
                }
                if (s.async && s.timeout > 0) {
                    timeoutTimer = setTimeout(function () {
                        jqXHR.abort("timeout");
                    }, s.timeout);
                }

                try {
                    state = 1;
                    transport.send(requestHeaders, done);
                } catch (e) {
                    if (state < 2) {
                        done(-1, e);
                    } else {
                        throw e;
                    }
                }
            }

            return jqXHR;
        },

        active: 0,

        lastModified: {},
        etag: {}

    });

    function ajaxHandleResponses(s, jqXHR, responses) {

        var ct, type, finalDataType, firstDataType,
            contents = s.contents,
            dataTypes = s.dataTypes,
            responseFields = s.responseFields;

        for (type in responseFields) {
            if (type in responses) {
                jqXHR[responseFields[type]] = responses[type];
            }
        }

        while (dataTypes[0] === "*") {
            dataTypes.shift();
            if (ct === undefined) {
                ct = s.mimeType || jqXHR.getResponseHeader("content-type");
            }
        }

        if (ct) {
            for (type in contents) {
                if (contents[type] && contents[type].test(ct)) {
                    dataTypes.unshift(type);
                    break;
                }
            }
        }

        if (dataTypes[0] in responses) {
            finalDataType = dataTypes[0];
        } else {
            for (type in responses) {
                if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
                    finalDataType = type;
                    break;
                }
                if (!firstDataType) {
                    firstDataType = type;
                }
            }
            finalDataType = finalDataType || firstDataType;
        }

        if (finalDataType) {
            if (finalDataType !== dataTypes[0]) {
                dataTypes.unshift(finalDataType);
            }
            return responses[finalDataType];
        }
    }

    function ajaxConvert(s, response) {
        var conv, conv2, current, tmp,
            dataTypes = s.dataTypes.slice(),
            prev = dataTypes[0],
            converters = {},
            i = 0;

        if (s.dataFilter) {
            response = s.dataFilter(response, s.dataType);
        }

        if (dataTypes[1]) {
            for (conv in s.converters) {
                converters[conv.toLowerCase()] = s.converters[conv];
            }
        }

        for (; (current = dataTypes[++i]) ;) {
            if (current !== "*") {
                if (prev !== "*" && prev !== current) {
                    conv = converters[prev + " " + current] || converters["* " + current];

                    if (!conv) {
                        for (conv2 in converters) {
                            tmp = conv2.split(" ");
                            if (tmp[1] === current) {
                                conv = converters[prev + " " + tmp[0]] ||
                                    converters["* " + tmp[0]];
                                if (conv) {
                                    if (conv === true) {
                                        conv = converters[conv2];

                                    } else if (converters[conv2] !== true) {
                                        current = tmp[0];
                                        dataTypes.splice(i--, 0, current);
                                    }

                                    break;
                                }
                            }
                        }
                    }

                    if (conv !== true) {
                        if (conv && s["throws"]) {
                            response = conv(response);
                        } else {
                            try {
                                response = conv(response);
                            } catch (e) {
                                return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
                            }
                        }
                    }
                }

                prev = current;
            }
        }

        return { state: "success", data: response };
    }
    var oldCallbacks = [],
        rquestion = /\?/,
        rjsonp = /(=)\?(?=&|$)|\?\?/,
        nonce = $.now();

    $.jqx.data.ajaxSetup({
        jsonp: "callback",
        jsonpCallback: function () {
            var callback = oldCallbacks.pop() || ($.expando + "_" + (nonce++));
            this[callback] = true;
            return callback;
        }
    });

    $.jqx.data.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) {

        var callbackName, overwritten, responseContainer,
            data = s.data,
            url = s.url,
            hasCallback = s.jsonp !== false,
            replaceInUrl = hasCallback && rjsonp.test(url),
            replaceInData = hasCallback && !replaceInUrl && typeof data === "string" &&
                !(s.contentType || "").indexOf("application/x-www-form-urlencoded") &&
                rjsonp.test(data);

        if (s.dataTypes[0] === "jsonp" || replaceInUrl || replaceInData) {

            callbackName = s.jsonpCallback = $.isFunction(s.jsonpCallback) ?
                s.jsonpCallback() :
                s.jsonpCallback;
            overwritten = window[callbackName];

            if (replaceInUrl) {
                s.url = url.replace(rjsonp, "$1" + callbackName);
            } else if (replaceInData) {
                s.data = data.replace(rjsonp, "$1" + callbackName);
            } else if (hasCallback) {
                s.url += (rquestion.test(url) ? "&" : "?") + s.jsonp + "=" + callbackName;
            }

            s.converters["script json"] = function () {
                if (!responseContainer) {
                    $.error(callbackName + " was not called");
                }
                return responseContainer[0];
            };

            s.dataTypes[0] = "json";

            window[callbackName] = function () {
                responseContainer = arguments;
            };

            jqXHR.always(function () {
                window[callbackName] = overwritten;
                if (s[callbackName]) {
                    s.jsonpCallback = originalSettings.jsonpCallback;

                    oldCallbacks.push(callbackName);
                }

                if (responseContainer && $.isFunction(overwritten)) {
                    overwritten(responseContainer[0]);
                }

                responseContainer = overwritten = undefined;
            });

            return "script";
        }
    });

    $.jqx.data.ajaxSetup({
        accepts: {
            script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
        },
        contents: {
            script: /javascript|ecmascript/
        },
        converters: {
            "text script": function (text) {
                $.globalEval(text);
                return text;
            }
        }
    });

    $.jqx.data.ajaxPrefilter("script", function (s) {
        if (s.cache === undefined) {
            s.cache = false;
        }
        if (s.crossDomain) {
            s.type = "GET";
            s.global = false;
        }
    });

    $.jqx.data.ajaxTransport("script", function (s) {
        if (s.crossDomain) {
            var script,
                head = document.head || document.getElementsByTagName("head")[0] || document.documentElement;

            return {

                send: function (_, callback) {

                    script = document.createElement("script");

                    script.async = "async";

                    if (s.scriptCharset) {
                        script.charset = s.scriptCharset;
                    }

                    script.src = s.url;

                    script.onload = script.onreadystatechange = function (_, isAbort) {

                        if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) {

                            script.onload = script.onreadystatechange = null;

                            if (head && script.parentNode) {
                                head.removeChild(script);
                            }

                            script = undefined;

                            if (!isAbort) {
                                callback(200, "success");
                            }
                        }
                    };
                    head.insertBefore(script, head.firstChild);
                },

                abort: function () {
                    if (script) {
                        script.onload(0, 1);
                    }
                }
            };
        }
    });
    var xhrCallbacks,
        xhrOnUnloadAbort = window.ActiveXObject ? function () {
            for (var key in xhrCallbacks) {
                xhrCallbacks[key](0, 1);
            }
        } : false,
        xhrId = 0;

    function createStandardXHR() {
        try {
            return new window.XMLHttpRequest();
        } catch (e) { }
    }

    function createActiveXHR() {
        try {
            return new window.ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) { }
    }

    $.jqx.data.ajaxSettings.xhr = window.ActiveXObject ?
        function () {
            return !this.isLocal && createStandardXHR() || createActiveXHR();
        } :
        createStandardXHR;

    (function (xhr) {
        $.extend($.support, {
            ajax: !!xhr,
            cors: !!xhr && ("withCredentials" in xhr)
        });
    })($.jqx.data.ajaxSettings.xhr());

    if ($.support.ajax) {

        $.jqx.data.ajaxTransport(function (s) {
            if (!s.crossDomain || $.support.cors) {

                var callback;

                return {
                    send: function (headers, complete) {

                        var handle, i,
                            xhr = s.xhr();

                        if (s.username) {
                            xhr.open(s.type, s.url, s.async, s.username, s.password);
                        } else {
                            xhr.open(s.type, s.url, s.async);
                        }

                        if (s.xhrFields) {
                            for (i in s.xhrFields) {
                                xhr[i] = s.xhrFields[i];
                            }
                        }

                        if (s.mimeType && xhr.overrideMimeType) {
                            xhr.overrideMimeType(s.mimeType);
                        }


                        if (!s.crossDomain && !headers["X-Requested-With"]) {
                            headers["X-Requested-With"] = "XMLHttpRequest";
                        }

                        try {
                            for (i in headers) {
                                xhr.setRequestHeader(i, headers[i]);
                            }
                        } catch (_) { }

                        xhr.send((s.hasContent && s.data) || null);

                        callback = function (_, isAbort) {

                            var status,
                                statusText,
                                responseHeaders,
                                responses,
                                xml;
                            try {

                                if (callback && (isAbort || xhr.readyState === 4)) {
                                    callback = undefined;
                                    if (handle) {
                                        xhr.onreadystatechange = $.noop;
                                        if (xhrOnUnloadAbort) {
                                            delete xhrCallbacks[handle];
                                        }
                                    }

                                    if (isAbort) {
                                        if (xhr.readyState !== 4) {
                                            xhr.abort();
                                        }
                                    } else {
                                        status = xhr.status;
                                        responseHeaders = xhr.getAllResponseHeaders();
                                        responses = {};
                                        xml = xhr.responseXML;

                                        if (xml && xml.documentElement /* #4958 */) {
                                            responses.xml = xml;
                                        }

                                        try {
                                            responses.text = xhr.responseText;
                                        } catch (e) {
                                        }

                                        try {
                                            statusText = xhr.statusText;
                                        } catch (e) {
                                            statusText = "";
                                        }

                                        if (!status && s.isLocal && !s.crossDomain) {
                                            status = responses.text ? 200 : 404;
                                        } else if (status === 1223) {
                                            status = 204;
                                        }
                                    }
                                }
                            } catch (firefoxAccessException) {
                                if (!isAbort) {
                                    complete(-1, firefoxAccessException);
                                }
                            }

                            if (responses) {
                                complete(status, statusText, responses, responseHeaders);
                            }
                        };

                        if (!s.async) {
                            callback();
                        } else if (xhr.readyState === 4) {
                            setTimeout(callback, 0);
                        } else {
                            handle = ++xhrId;
                            if (xhrOnUnloadAbort) {
                                if (!xhrCallbacks) {
                                    xhrCallbacks = {};
                                    $(window).unload(xhrOnUnloadAbort);
                                }
                                xhrCallbacks[handle] = callback;
                            }
                            xhr.onreadystatechange = callback;
                        }
                    },

                    abort: function () {
                        if (callback) {
                            callback(0, 1);
                        }
                    }
                };
            }
        });
    }
    $.jqx.filter = function () {
        this.operator = 'and';
        var and_operator = 0;
        var or_operator = 1;
        var stringcomparisonoperators = ['EMPTY', 'NOT_EMPTY', 'CONTAINS', 'CONTAINS_CASE_SENSITIVE',
        'DOES_NOT_CONTAIN', 'DOES_NOT_CONTAIN_CASE_SENSITIVE', 'STARTS_WITH', 'STARTS_WITH_CASE_SENSITIVE',
        'ENDS_WITH', 'ENDS_WITH_CASE_SENSITIVE', 'EQUAL', 'EQUAL_CASE_SENSITIVE', 'NULL', 'NOT_NULL'];
        var numericcomparisonoperators = ['EQUAL', 'NOT_EQUAL', 'LESS_THAN', 'LESS_THAN_OR_EQUAL', 'GREATER_THAN', 'GREATER_THAN_OR_EQUAL', 'NULL', 'NOT_NULL'];
        var datecomparisonoperators = ['EQUAL', 'NOT_EQUAL', 'LESS_THAN', 'LESS_THAN_OR_EQUAL', 'GREATER_THAN', 'GREATER_THAN_OR_EQUAL', 'NULL', 'NOT_NULL'];
        var booleancomparisonoperators = ['EQUAL', 'NOT_EQUAL'];

        var filters = new Array();
        var comparisonoperators = new Array();

        this.evaluate = function (value) {
            var result = true;
            for (var i = 0; i < filters.length; i++) {
                var currentResult = filters[i].evaluate(value);
                if (i == 0) {
                    result = currentResult;
                }
                else {
                    if (comparisonoperators[i] == or_operator || comparisonoperators[i] == "or")
                        result = result || currentResult;
                    else
                        result = result && currentResult;
                }
            }

            return result;
        }

        this.getfilterscount = function () {
            return filters.length;
        }

        this.setoperatorsbyfiltertype = function (type, array) {
            switch (type) {
                case "numericfilter":
                    numericcomparisonoperators = array;
                    break;
                case "stringfilter":
                    stringcomparisonoperators = array;
                    break;
                case "datefilter":
                    datecomparisonoperators = array;
                    break;
                case "booleanfilter":
                    booleancomparisonoperators = array;
                    break;
            }
        }

        this.getoperatorsbyfiltertype = function (type) {
            var array = new Array();
            switch (type) {
                case "numericfilter":
                    array = numericcomparisonoperators.slice(0);
                    break;
                case "stringfilter":
                    array = stringcomparisonoperators.slice(0);
                    break;
                case "datefilter":
                    array = datecomparisonoperators.slice(0);
                    break;
                case "booleanfilter":
                    array = booleancomparisonoperators.slice(0);
                    break;
            }
            return array;
        }

        var generatefilterkey = function () {
            var S4 = function () {
                return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
            };
            return (S4() + "-" + S4() + "-" + S4());
        }

        this.createfilter = function (filtertype, filtervalue, filtercomparisonoperator, customfilter, formatstring, localization) {
            if (filtertype == null || filtertype == undefined)
                return null;

            switch (filtertype) {
                case 'numericfilter':
                    return new numericfilter(filtervalue, filtercomparisonoperator.toUpperCase());
                case 'stringfilter':
                    return new stringfilter(filtervalue, filtercomparisonoperator.toUpperCase());
                case 'datefilter':
                    return new datefilter(filtervalue, filtercomparisonoperator.toUpperCase(), formatstring, localization);
                case 'booleanfilter':
                    return new booleanfilter(filtervalue, filtercomparisonoperator.toUpperCase());
                case 'custom':
                    return new filter(filtervalue, filtercomparisonoperator.toUpperCase(), customfilter);
            }

            throw new Error("jqxGrid: There is no such filter type. The available filter types are: 'numericfilter', 'stringfilter', 'datefilter' and 'booleanfilter'");
            return null;
        }

        this.getfilters = function () {
            var filtersarray = new Array();
            for (var i = 0; i < filters.length; i++) {
                var filter = { value: filters[i].filtervalue, condition: filters[i].comparisonoperator, operator: comparisonoperators[i], type: filters[i].type };
                if (filters[i].data) {
                    filter.id = filters[i].data;
                }
                filtersarray[i] = filter;
            }
            return filtersarray;
        }

        this.addfilter = function (comparisonoperator, filter) {
            filters[filters.length] = filter;
            filter.key = generatefilterkey();
            comparisonoperators[comparisonoperators.length] = comparisonoperator;
        }

        this.removefilter = function (filter) {
            for (var i = 0; i < filters.length; i++) {
                if (filters[i].key == filter.key) {
                    filters.splice(i, 1);
                    comparisonoperators.splice(i, 1);
                    break;
                }
            }
        }

        this.getoperatorat = function (index) {
            if (index == undefined || index == null)
                return null;

            if (index < 0 || index > filters.length)
                return null;

            return comparisonoperators[index];
        }

        this.setoperatorat = function (index, comparisonoperator) {
            if (index == undefined || index == null)
                return null;

            if (index < 0 || index > filters.length)
                return null;

            comparisonoperators[comparisonoperator] = comparisonoperator;
        }

        this.getfilterat = function (index) {
            if (index == undefined || index == null)
                return null;

            if (index < 0 || index > filters.length)
                return null;

            return filters[index];
        }

        this.setfilterat = function (index, filter) {
            if (index == undefined || index == null)
                return null;

            if (index < 0 || index > filters.length)
                return null;

            filter.key = generatefilterkey();
            filters[index] = filter;
        }

        this.clear = function () {
            filters = new Array();
            comparisonoperators = new Array();
        }

        var stringfilter = function (filtervalue, comparisonoperator) {
            this.filtervalue = filtervalue;
            this.comparisonoperator = comparisonoperator;
            this.type = 'stringfilter';
            this.evaluate = function (value) {
                var filtervalue = this.filtervalue;
                var comparisonoperator = this.comparisonoperator;
                if (value == null || value == undefined || value == "") {
                    if (comparisonoperator == 'NULL')
                        return true;

                    if (comparisonoperator == "EQUAL" && value == filtervalue) {
                        return true;
                    }

                    if (comparisonoperator == "NOT_EQUAL" && value != filtervalue) {
                        return true;
                    }

                    if (comparisonoperator != 'EMPTY')
                        return false;
                    else if (value == "")
                        return true;
                }

                var val = "";
                try {
                    val = value.toString();
                }
                catch (error) {
                    return true;
                }

                var compare = function (val, filtervalue) {
                    switch (comparisonoperator) {
                        case 'EQUAL':
                            return $.jqx.string.equalsIgnoreCase(val, filtervalue);
                        case 'EQUAL_CASE_SENSITIVE':
                            return $.jqx.string.equals(val, filtervalue);
                        case 'NOT_EQUAL':
                            return !$.jqx.string.equalsIgnoreCase(val, filtervalue);
                        case 'NOT_EQUAL_CASE_SENSITIVE':
                            return !$.jqx.string.equals(val, filtervalue);
                        case 'CONTAINS':
                            return $.jqx.string.containsIgnoreCase(val, filtervalue);
                        case 'CONTAINS_CASE_SENSITIVE':
                            return $.jqx.string.contains(val, filtervalue);
                        case 'DOES_NOT_CONTAIN':
                            return !$.jqx.string.containsIgnoreCase(val, filtervalue);
                        case 'DOES_NOT_CONTAIN_CASE_SENSITIVE':
                            return !$.jqx.string.contains(val, filtervalue);
                        case 'EMPTY':
                            return val == '';
                        case 'NOT_EMPTY':
                            return val != '';
                        case 'NOT_NULL':
                            return val != null;
                        case 'STARTS_WITH':
                            return $.jqx.string.startsWithIgnoreCase(val, filtervalue);
                        case 'ENDS_WITH':
                            return $.jqx.string.endsWithIgnoreCase(val, filtervalue);
                        case 'ENDS_WITH_CASE_SENSITIVE':
                            return $.jqx.string.endsWith(val, filtervalue);
                        case 'STARTS_WITH_CASE_SENSITIVE':
                            return $.jqx.string.startsWith(val, filtervalue);
                        default:
                            return false;
                    }
                }

                var filterValues = new Array();
                if (filtervalue && filtervalue.indexOf)
                    if(filtervalue.indexOf("|") >= 0 || filtervalue.indexOf(" AND ") >= 0 || filtervalue.indexOf(" OR ") >= 0 || filtervalue.indexOf(" and ") >= 0 || filtervalue.indexOf(" or ") >= 0) {
                    var result = compare(val, filtervalue);
                    if (result) {
                        return result;
                    }

                    var andFilters = filtervalue.indexOf(" AND ") >= 0 ? filtervalue.split(" AND ") : new Array();
                    var orFilters = filtervalue.indexOf(" OR ") >= 0 ? filtervalue.split(" OR ") : new Array();
                    var andLowerCaseFilters = filtervalue.indexOf(" and ") >= 0 ? filtervalue.split(" and ") : new Array();
                    var orLowerCaseFilters = filtervalue.indexOf(" or ") >= 0 ? filtervalue.split(" or ") : new Array();
                    var delimiterFilters = filtervalue.indexOf("|") >= 0 ? filtervalue.split("|") : new Array();
                    if (delimiterFilters.length > 0) {
                        for (var i = 0; i < delimiterFilters.length; i++) {
                            delimiterFilters[i] = $.trim(delimiterFilters[i]);
                        }
                    }
                    var commaFilters = filtervalue.indexOf(" ") >= 0 ? filtervalue.split(" ") : new Array();
                    if (commaFilters.length > 0) {
                        for (var i = 0; i < commaFilters.length; i++) {
                            commaFilters[i] = $.trim(commaFilters[i]);
                        }
                    }

                    andFilters = andFilters.concat(commaFilters);
                    andFilters = andFilters.concat(andLowerCaseFilters);
                    orFilters = orFilters.concat(delimiterFilters);
                    orFilters = orFilters.concat(orLowerCaseFilters);

                    if (andFilters.length > 0) {
                        for (var i = 0; i < andFilters.length; i++) {
                            if (!andFilters[i].indexOf(" OR ") >= 0) {
                                filterValues.push(andFilters[i]);
                            }
                        }
                    }
                    if (orFilters.length > 0) {
                        for (var i = 0; i < orFilters.length; i++) {
                            if (!orFilters[i].indexOf(" AND ") >= 0) {
                                filterValues.push(orFilters[i]);
                            }
                        }
                    }

                    var filterresult = undefined;
                    for (var j = 0; j < filterValues.length; j++) {
                        var value = filterValues[j];
                        var result = compare(val, value);
                        var filteroperator = j < andFilters.length ? "and" : "or";
                        if (filterresult == undefined) {
                            filterresult = result;
                        }
                        else {
                            if (filteroperator == 'or') {
                                filterresult = filterresult || result;
                            }
                            else {
                                filterresult = filterresult && result;
                            }
                        }
                    }
                    return filterresult;
                }
         
                return compare(val, filtervalue);
            }
        }

        var booleanfilter = function (filtervalue, comparisonoperator) {
            this.filtervalue = filtervalue;
            this.comparisonoperator = comparisonoperator;
            this.type = 'booleanfilter';
            this.evaluate = function (value) {
                var filtervalue = this.filtervalue;
                var comparisonoperator = this.comparisonoperator;
                if (value == null || value == undefined) {
                    if (comparisonoperator == 'NULL')
                        return true;

                    return false;
                }

                var val = value;

                switch (comparisonoperator) {
                    case 'EQUAL':
                        return val == filtervalue || val.toString() == filtervalue.toString();
                    case 'NOT_EQUAL':
                        return val != filtervalue && val.toString() != filtervalue.toString();
                    default:
                        return false;
                }
            }
        }

        var numericfilter = function (filtervalue, comparisonoperator) {
            this.filtervalue = filtervalue;
            this.comparisonoperator = comparisonoperator;
            this.type = 'numericfilter';
            this.evaluate = function (value) {
                var filtervalue = this.filtervalue;
                var comparisonoperator = this.comparisonoperator;
                if (value === null || value === undefined || value === "") {
                    if (comparisonoperator == 'NOT_NULL')
                        return false;

                    if (comparisonoperator == 'NULL')
                        return true;
                    else {
                        switch (comparisonoperator) {
                            case 'EQUAL':
                                return value == filtervalue;
                            case 'NOT_EQUAL':
                                return value != filtervalue;
                        }
                        return false;
                    }
                }
                else {
                    if (comparisonoperator == 'NULL')
                        return false;

                    if (comparisonoperator == 'NOT_NULL')
                        return true;
                }

                var val = value;

                try {
                    val = parseFloat(val);
                }
                catch (error) {
                    if (value.toString() != "")
                        return false;
                }

                var compare = function (val, filtervalue) {
                    switch (comparisonoperator) {
                        case 'EQUAL':
                            return val == filtervalue;
                        case 'NOT_EQUAL':
                            return val != filtervalue;
                        case 'GREATER_THAN':
                            return val > filtervalue;
                        case 'GREATER_THAN_OR_EQUAL':
                            return val >= filtervalue;
                        case 'LESS_THAN':
                            return val < filtervalue;
                        case 'LESS_THAN_OR_EQUAL':
                            return val <= filtervalue;
                        case 'STARTS_WITH':
                            return $.jqx.string.startsWithIgnoreCase(val.toString(), filtervalue.toString());
                        case 'ENDS_WITH':
                            return $.jqx.string.endsWithIgnoreCase(val.toString(), filtervalue.toString());
                        case 'ENDS_WITH_CASE_SENSITIVE':
                            return $.jqx.string.endsWith(val.toString(), filtervalue.toString());
                        case 'STARTS_WITH_CASE_SENSITIVE':
                            return $.jqx.string.startsWith(val.toString(), filtervalue.toString());
                        case 'CONTAINS':
                            return $.jqx.string.containsIgnoreCase(val.toString(), filtervalue.toString());
                        case 'CONTAINS_CASE_SENSITIVE':
                            return $.jqx.string.contains(val.toString(), filtervalue.toString());
                        case 'DOES_NOT_CONTAIN':
                            return !$.jqx.string.containsIgnoreCase(val.toString(), filtervalue.toString());
                        case 'DOES_NOT_CONTAIN_CASE_SENSITIVE':
                            return !$.jqx.string.contains(val.toString(), filtervalue.toString());
                        default:
                            return true;
                    }
                }

                var filterValues = new Array();

                if (filtervalue && filtervalue.indexOf)
                    if(filtervalue.indexOf("|") >= 0  || filtervalue.indexOf(" AND ") >= 0 || filtervalue.indexOf(" OR ") >= 0 || filtervalue.indexOf(" and ") >= 0 || filtervalue.indexOf(" or ") >= 0) {
                    var result = compare(val, filtervalue);
                    if (result) {
                        return result;
                    }
                    filtervalue = filtervalue.toString();
                    var andFilters = filtervalue.indexOf(" AND ") >= 0 ? filtervalue.split(" AND ") : new Array();
                    var orFilters = filtervalue.indexOf(" OR ") >= 0 ? filtervalue.split(" OR ") : new Array();
                    var andLowerCaseFilters = filtervalue.indexOf(" and ") >= 0 ? filtervalue.split(" and ") : new Array();
                    var orLowerCaseFilters = filtervalue.indexOf(" or ") >= 0 ? filtervalue.split(" or ") : new Array();
                    andFilters = andFilters.concat(andLowerCaseFilters);
                    orFilters = orFilters.concat(orLowerCaseFilters);
                    var delimiterFilters = filtervalue.indexOf("|") >= 0 ? filtervalue.split("|") : new Array();
                    if (delimiterFilters.length > 0) {
                        for (var i = 0; i < delimiterFilters.length; i++) {
                            delimiterFilters[i] = $.trim(delimiterFilters[i]);
                        }
                    }
                    orFilters = orFilters.concat(delimiterFilters);

                    if (andFilters.length > 0) {
                        for (var i = 0; i < andFilters.length; i++) {
                            if (!andFilters[i].indexOf(" OR ") >= 0) {
                                filterValues.push(andFilters[i]);
                            }
                        }
                    }
                    if (orFilters.length > 0) {
                        for (var i = 0; i < orFilters.length; i++) {
                            if (!orFilters[i].indexOf(" AND ") >= 0) {
                                filterValues.push(orFilters[i]);
                            }
                        }
                    }

                    var filterresult = undefined;
                    for (var j = 0; j < filterValues.length; j++) {
                        var value = filterValues[j];

                        if (value && value.indexOf && value.indexOf("..") >= 0) {
                            var values = value.toString().split("..");
                            if (values.length == 2) {
                                result = val >= values[0] && val <= values[1];
                            }
                        }
                        else {
                            var result = compare(val, value);
                        }
                        var filteroperator = j < andFilters.length ? "and" : "or";
                        if (filterresult == undefined) {
                            filterresult = result;
                        }
                        else {
                            if (filteroperator == 'or') {
                                filterresult = filterresult || result;
                            }
                            else {
                                filterresult = filterresult && result;
                            }
                        }
                    }
                    return filterresult;
                }
                if (filtervalue && filtervalue.indexOf && filtervalue.indexOf("..") >= 0) {
                    filterValues = filtervalue.toString().split("..");
                    if (filterValues.length == 2) {
                        return val >= filterValues[0] && val <= filterValues[1];
                    }
                }
                return compare(val, filtervalue);             
            }
        }

        var datefilter = function (filtervalue, comparisonoperator, formatstring, localization) {
            this.filtervalue = filtervalue;
            this.type = 'datefilter';
            var that = this;
            if (formatstring != undefined && localization != undefined) {
                var parsedDate = $.jqx.dataFormat.parsedate(filtervalue, formatstring, localization);
                if (parsedDate != null) {
                    this.filterdate = parsedDate;
                }
                else {
                    var result = $.jqx.dataFormat.tryparsedate(filtervalue, localization);
                    if (result != null) this.filterdate = result;
                }

            }
            else {
                var tmpvalue = new Date(filtervalue);
                if (tmpvalue.toString() == 'NaN' || tmpvalue.toString() == "Invalid Date") {
                    this.filterdate = $.jqx.dataFormat.tryparsedate(filtervalue);
                }
                else {
                    this.filterdate = tmpvalue;
                }
            }
            if (!this.filterdate) {
                var tmpvalue = new Date(filtervalue);
                if (tmpvalue.toString() == 'NaN' || tmpvalue.toString() == "Invalid Date") {
                    this.filterdate = $.jqx.dataFormat.tryparsedate(filtervalue);
                }
                else {
                    this.filterdate = tmpvalue;
                }
            }

            this.comparisonoperator = comparisonoperator;
            this.evaluate = function (value) {
                var filtervalue = this.filtervalue;
                var comparisonoperator = this.comparisonoperator;
                if (value == null || value == undefined || value == "") {
                    if (comparisonoperator == 'NOT_NULL')
                        return false;

                    if (comparisonoperator == 'NULL')
                        return true;
                    else {
                        switch (comparisonoperator) {
                            case 'EQUAL':
                                return value == filtervalue;
                            case 'NOT_EQUAL':
                                return value != filtervalue;
                        }
                        return false;
                    }
                }
                else {
                    if (comparisonoperator == 'NULL')
                        return false;

                    if (comparisonoperator == 'NOT_NULL')
                        return true;
                }

                var val = new Date();
                val.setFullYear(1900, 0, 1);
                val.setHours(12, 0, 0, 0);
                try {
                    var tmpvalue = new Date(value);

                    if (tmpvalue.toString() == 'NaN' || tmpvalue.toString() == "Invalid Date") {
                        value = $.jqx.dataFormat.tryparsedate(value);
                    }
                    else {
                        value = tmpvalue;
                    }

                    val = value;

                    var compareTimePart = false;
                    if (formatstring != undefined && localization != undefined) {
                        if (formatstring.indexOf('t') >= 0 || formatstring.indexOf('T') >= 0 || formatstring.indexOf(':') >= 0 || formatstring.indexOf('f') >= 0) {
                            compareTimePart = true;
                            if (filtervalue && filtervalue.toString().indexOf(':') == -1) {
                                var result = $.jqx.dataFormat.tryparsedate(filtervalue.toString() + ":00", localization);
                                if (result != null) that.filterdate = result;
                            }
                        }
                    }
                    if (!compareTimePart) {
                        val.setHours(0);
                        val.setMinutes(0);
                        val.setSeconds(0);
                    }
                }
                catch (error) {
                    if (value.toString() != "")
                        return false;
                }

                if (that.filterdate != null) {
                    filtervalue = that.filterdate;
                }
                else {
                    if (filtervalue && filtervalue.indexOf) {
                        if (filtervalue.indexOf(':') != -1 || !isNaN(parseInt(filtervalue))) {
                            var tmpFilter = new Date(val);
                            tmpFilter.setHours(12, 0, 0, 0);
                            var timeStrings = filtervalue.split(':');
                            for (var i = 0; i < timeStrings.length; i++) {
                                if (i == 0) {
                                    tmpFilter.setHours(timeStrings[i]);
                                }
                                if (i == 1) {
                                    tmpFilter.setMinutes(timeStrings[i]);
                                }
                                if (i == 2) {
                                    tmpFilter.setSeconds(timeStrings[i]);
                                }
                            }
                            filtervalue = tmpFilter;
                        }
                    }
                }
                if (compareTimePart) {
                    if (filtervalue && filtervalue.setFullYear) {
                        if (val && val.getFullYear) {
                            if (formatstring.indexOf('d') == -1 && formatstring.indexOf('M') == -1 && formatstring.indexOf('y') == -1) {
                                filtervalue.setFullYear(val.getFullYear(), val.getMonth(), val.getDate());
                            }
                        }
                    }
                }


                var compare = function (val, filtervalue) {
                    if (val == null) val = "";
                    switch (comparisonoperator) {
                        case 'EQUAL':
                            return val.toString() == filtervalue.toString();
                        case 'NOT_EQUAL':
                            return val.toString() != filtervalue.toString();
                        case 'GREATER_THAN':
                            return val > filtervalue;
                        case 'GREATER_THAN_OR_EQUAL':
                            return val >= filtervalue;
                        case 'LESS_THAN':
                            return val < filtervalue;
                        case 'LESS_THAN_OR_EQUAL':
                            return val <= filtervalue;
                        case 'STARTS_WITH':
                            return $.jqx.string.startsWithIgnoreCase(val.toString(), filtervalue.toString());
                        case 'ENDS_WITH':
                            return $.jqx.string.endsWithIgnoreCase(val.toString(), filtervalue.toString());
                        case 'ENDS_WITH_CASE_SENSITIVE':
                            return $.jqx.string.endsWith(val.toString(), filtervalue.toString());
                        case 'STARTS_WITH_CASE_SENSITIVE':
                            return $.jqx.string.startsWith(val.toString(), filtervalue.toString());
                        case 'CONTAINS':
                            return $.jqx.string.containsIgnoreCase(val.toString(), filtervalue.toString());
                        case 'CONTAINS_CASE_SENSITIVE':
                            return $.jqx.string.contains(val.toString(), filtervalue.toString());
                        case 'DOES_NOT_CONTAIN':
                            return !$.jqx.string.containsIgnoreCase(val.toString(), filtervalue.toString());
                        case 'DOES_NOT_CONTAIN_CASE_SENSITIVE':
                            return !$.jqx.string.contains(val.toString(), filtervalue.toString());
                        default:
                            return true;
                    }
                }
                var filterValues = new Array();
                if (filtervalue && filtervalue.indexOf)
                    if (filtervalue.indexOf("|") >= 0 || filtervalue.indexOf(" AND ") >= 0 || filtervalue.indexOf(" OR ") >= 0 || filtervalue.indexOf(" and ") >= 0 || filtervalue.indexOf(" or ") >= 0) {
                    var result = compare(val, filtervalue);
                    if (result) {
                        return result;
                    }
                    var andFilters = filtervalue.indexOf(" AND ") >= 0 ? filtervalue.split(" AND ") : new Array();
                    var orFilters = filtervalue.indexOf(" OR ") >= 0 ? filtervalue.split(" OR ") : new Array();
                    var andLowerCaseFilters = filtervalue.indexOf(" and ") >= 0 ? filtervalue.split(" and ") : new Array();
                    var orLowerCaseFilters = filtervalue.indexOf(" or ") >= 0 ? filtervalue.split(" or ") : new Array();
                    andFilters = andFilters.concat(andLowerCaseFilters);
                    orFilters = orFilters.concat(orLowerCaseFilters);
                    var delimiterFilters = filtervalue.indexOf("|") >= 0 ? filtervalue.split("|") : new Array();
                    if (delimiterFilters.length > 0) {
                        for (var i = 0; i < delimiterFilters.length; i++) {
                            delimiterFilters[i] = $.trim(delimiterFilters[i]);
                        }
                    }
                    orFilters = orFilters.concat(delimiterFilters);

                    if (andFilters.length > 0) {
                        for (var i = 0; i < andFilters.length; i++) {
                            if (!andFilters[i].indexOf(" OR ") >= 0) {
                                filterValues.push(andFilters[i]);
                            }
                        }
                    }
                    if (orFilters.length > 0) {
                        for (var i = 0; i < orFilters.length; i++) {
                            if (!orFilters[i].indexOf(" AND ") >= 0) {
                                filterValues.push(orFilters[i]);
                            }
                        }
                    }

                    var filterresult = undefined;
                    for (var j = 0; j < filterValues.length; j++) {
                        var value = filterValues[j];
                        if (value && value.indexOf && value.indexOf("..") >= 0) {
                            var values = value.toString().split("..");
                            if (values.length == 2) {
                                result = val >= values[0] && val <= values[1];
                            }
                        }
                        else {
                            var result = compare(val, value);
                        }
                        var filteroperator = j < andFilters.length ? "and" : "or";
                        if (filterresult == undefined) {
                            filterresult = result;
                        }
                        else {
                            if (filteroperator == 'or') {
                                filterresult = filterresult || result;
                            }
                            else {
                                filterresult = filterresult && result;
                            }
                        }
                    }
                    return filterresult;
                }
                if (filtervalue && filtervalue.indexOf && filtervalue.indexOf("..") >= 0) {
                    filterValues = filtervalue.toString().split("..");
                    if (filterValues.length == 2) {
                        return val >= filterValues[0] && val <= filterValues[1];
                    }
                }
                return compare(val, filtervalue);
            }
        }

        var filter = function (filtervalue, comparisonoperator, customfilter) {
            this.filtervalue = filtervalue;
            this.comparisonoperator = comparisonoperator;
            this.evaluate = function (value, comparisonoperator) {
                return customfilter(this.filtervalue, value, this.comparisonoperator);
            }
        }
    }
})(jqxBaseFramework);
;
/*!
 * Globalize
 *
 * http://github.com/jquery/globalize
 *
 * Copyright Software Freedom Conservancy, Inc.
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */

(function( window, undefined ) {

var Globalize,
	// private variables
	regexHex,
	regexInfinity,
	regexParseFloat,
	regexTrim,
	// private JavaScript utility functions
	arrayIndexOf,
	endsWith,
	extend,
	isArray,
	isFunction,
	isObject,
	startsWith,
	trim,
	truncate,
	zeroPad,
	// private Globalization utility functions
	appendPreOrPostMatch,
	expandFormat,
	formatDate,
	formatNumber,
	getTokenRegExp,
	getEra,
	getEraYear,
	parseExact,
	parseNegativePattern;

// Global variable (Globalize) or CommonJS module (globalize)
Globalize = function( cultureSelector ) {
	return new Globalize.prototype.init( cultureSelector );
};

if ( typeof require !== "undefined" &&
	typeof exports !== "undefined" &&
	typeof module !== "undefined" ) {
	// Assume CommonJS
	module.exports = Globalize;
} else {
	// Export as global variable
	window.Globalize = Globalize;
}

Globalize.cultures = {};

Globalize.prototype = {
	constructor: Globalize,
	init: function( cultureSelector ) {
		this.cultures = Globalize.cultures;
		this.cultureSelector = cultureSelector;

		return this;
	}
};
Globalize.prototype.init.prototype = Globalize.prototype;

// 1. When defining a culture, all fields are required except the ones stated as optional.
// 2. Each culture should have a ".calendars" object with at least one calendar named "standard"
//    which serves as the default calendar in use by that culture.
// 3. Each culture should have a ".calendar" object which is the current calendar being used,
//    it may be dynamically changed at any time to one of the calendars in ".calendars".
Globalize.cultures[ "default" ] = {
	// A unique name for the culture in the form <language code>-<country/region code>
	name: "en",
	// the name of the culture in the english language
	englishName: "English",
	// the name of the culture in its own language
	nativeName: "English",
	// whether the culture uses right-to-left text
	isRTL: false,
	// "language" is used for so-called "specific" cultures.
	// For example, the culture "es-CL" means "Spanish, in Chili".
	// It represents the Spanish-speaking culture as it is in Chili,
	// which might have different formatting rules or even translations
	// than Spanish in Spain. A "neutral" culture is one that is not
	// specific to a region. For example, the culture "es" is the generic
	// Spanish culture, which may be a more generalized version of the language
	// that may or may not be what a specific culture expects.
	// For a specific culture like "es-CL", the "language" field refers to the
	// neutral, generic culture information for the language it is using.
	// This is not always a simple matter of the string before the dash.
	// For example, the "zh-Hans" culture is netural (Simplified Chinese).
	// And the "zh-SG" culture is Simplified Chinese in Singapore, whose lanugage
	// field is "zh-CHS", not "zh".
	// This field should be used to navigate from a specific culture to it's
	// more general, neutral culture. If a culture is already as general as it
	// can get, the language may refer to itself.
	language: "en",
	// numberFormat defines general number formatting rules, like the digits in
	// each grouping, the group separator, and how negative numbers are displayed.
	numberFormat: {
		// [negativePattern]
		// Note, numberFormat.pattern has no "positivePattern" unlike percent and currency,
		// but is still defined as an array for consistency with them.
		//   negativePattern: one of "(n)|-n|- n|n-|n -"
		pattern: [ "-n" ],
		// number of decimal places normally shown
		decimals: 2,
		// string that separates number groups, as in 1,000,000
		",": ",",
		// string that separates a number from the fractional portion, as in 1.99
		".": ".",
		// array of numbers indicating the size of each number group.
		// TODO: more detailed description and example
		groupSizes: [ 3 ],
		// symbol used for positive numbers
		"+": "+",
		// symbol used for negative numbers
		"-": "-",
		// symbol used for NaN (Not-A-Number)
		"NaN": "NaN",
		// symbol used for Negative Infinity
		negativeInfinity: "-Infinity",
		// symbol used for Positive Infinity
		positiveInfinity: "Infinity",
		percent: {
			// [negativePattern, positivePattern]
			//   negativePattern: one of "-n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %"
			//   positivePattern: one of "n %|n%|%n|% n"
			pattern: [ "-n %", "n %" ],
			// number of decimal places normally shown
			decimals: 2,
			// array of numbers indicating the size of each number group.
			// TODO: more detailed description and example
			groupSizes: [ 3 ],
			// string that separates number groups, as in 1,000,000
			",": ",",
			// string that separates a number from the fractional portion, as in 1.99
			".": ".",
			// symbol used to represent a percentage
			symbol: "%"
		},
		currency: {
			// [negativePattern, positivePattern]
			//   negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)"
			//   positivePattern: one of "$n|n$|$ n|n $"
			pattern: [ "($n)", "$n" ],
			// number of decimal places normally shown
			decimals: 2,
			// array of numbers indicating the size of each number group.
			// TODO: more detailed description and example
			groupSizes: [ 3 ],
			// string that separates number groups, as in 1,000,000
			",": ",",
			// string that separates a number from the fractional portion, as in 1.99
			".": ".",
			// symbol used to represent currency
			symbol: "$"
		}
	},
	// calendars defines all the possible calendars used by this culture.
	// There should be at least one defined with name "standard", and is the default
	// calendar used by the culture.
	// A calendar contains information about how dates are formatted, information about
	// the calendar's eras, a standard set of the date formats,
	// translations for day and month names, and if the calendar is not based on the Gregorian
	// calendar, conversion functions to and from the Gregorian calendar.
	calendars: {
		standard: {
			// name that identifies the type of calendar this is
			name: "Gregorian_USEnglish",
			// separator of parts of a date (e.g. "/" in 11/05/1955)
			"/": "/",
			// separator of parts of a time (e.g. ":" in 05:44 PM)
			":": ":",
			// the first day of the week (0 = Sunday, 1 = Monday, etc)
			firstDay: 0,
			days: {
				// full day names
				names: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
				// abbreviated day names
				namesAbbr: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ],
				// shortest day names
				namesShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ]
			},
			months: {
				// full month names (13 months for lunar calendards -- 13th month should be "" if not lunar)
				names: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "" ],
				// abbreviated month names
				namesAbbr: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" ]
			},
			// AM and PM designators in one of these forms:
			// The usual view, and the upper and lower case versions
			//   [ standard, lowercase, uppercase ]
			// The culture does not use AM or PM (likely all standard date formats use 24 hour time)
			//   null
			AM: [ "AM", "am", "AM" ],
			PM: [ "PM", "pm", "PM" ],
			eras: [
				// eras in reverse chronological order.
				// name: the name of the era in this culture (e.g. A.D., C.E.)
				// start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era.
				// offset: offset in years from gregorian calendar
				{
					"name": "A.D.",
					"start": null,
					"offset": 0
				}
			],
			// when a two digit year is given, it will never be parsed as a four digit
			// year greater than this year (in the appropriate era for the culture)
			// Set it as a full year (e.g. 2029) or use an offset format starting from
			// the current year: "+19" would correspond to 2029 if the current year 2010.
			twoDigitYearMax: 2029,
			// set of predefined date and time patterns used by the culture
			// these represent the format someone in this culture would expect
			// to see given the portions of the date that are shown.
			patterns: {
				// short date pattern
				d: "M/d/yyyy",
				// long date pattern
				D: "dddd, MMMM dd, yyyy",
				// short time pattern
				t: "h:mm tt",
				// long time pattern
				T: "h:mm:ss tt",
				// long date, short time pattern
				f: "dddd, MMMM dd, yyyy h:mm tt",
				// long date, long time pattern
				F: "dddd, MMMM dd, yyyy h:mm:ss tt",
				// month/day pattern
				M: "MMMM dd",
				// month/year pattern
				Y: "yyyy MMMM",
				// S is a sortable format that does not vary by culture
				S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"
			}
			// optional fields for each calendar:
			/*
			monthsGenitive:
				Same as months but used when the day preceeds the month.
				Omit if the culture has no genitive distinction in month names.
				For an explaination of genitive months, see http://blogs.msdn.com/michkap/archive/2004/12/25/332259.aspx
			convert:
				Allows for the support of non-gregorian based calendars. This convert object is used to
				to convert a date to and from a gregorian calendar date to handle parsing and formatting.
				The two functions:
					fromGregorian( date )
						Given the date as a parameter, return an array with parts [ year, month, day ]
						corresponding to the non-gregorian based year, month, and day for the calendar.
					toGregorian( year, month, day )
						Given the non-gregorian year, month, and day, return a new Date() object
						set to the corresponding date in the gregorian calendar.
			*/
		}
	},
	// For localized strings
	messages: {}
};

Globalize.cultures[ "default" ].calendar = Globalize.cultures[ "default" ].calendars.standard;

Globalize.cultures.en = Globalize.cultures[ "default" ];

Globalize.cultureSelector = "en";

//
// private variables
//

regexHex = /^0x[a-f0-9]+$/i;
regexInfinity = /^[+\-]?infinity$/i;
regexParseFloat = /^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/;
regexTrim = /^\s+|\s+$/g;

//
// private JavaScript utility functions
//

arrayIndexOf = function( array, item ) {
	if ( array.indexOf ) {
		return array.indexOf( item );
	}
	for ( var i = 0, length = array.length; i < length; i++ ) {
		if ( array[i] === item ) {
			return i;
		}
	}
	return -1;
};

endsWith = function( value, pattern ) {
	return value.substr( value.length - pattern.length ) === pattern;
};

extend = function() {
	var options, name, src, copy, copyIsArray, clone,
		target = arguments[0] || {},
		i = 1,
		length = arguments.length,
		deep = false;

	// Handle a deep copy situation
	if ( typeof target === "boolean" ) {
		deep = target;
		target = arguments[1] || {};
		// skip the boolean and the target
		i = 2;
	}

	// Handle case when target is a string or something (possible in deep copy)
	if ( typeof target !== "object" && !isFunction(target) ) {
		target = {};
	}

	for ( ; i < length; i++ ) {
		// Only deal with non-null/undefined values
		if ( (options = arguments[ i ]) != null ) {
			// Extend the base object
			for ( name in options ) {
				src = target[ name ];
				copy = options[ name ];

				// Prevent never-ending loop
				if ( target === copy ) {
					continue;
				}

				// Recurse if we're merging plain objects or arrays
				if ( deep && copy && ( isObject(copy) || (copyIsArray = isArray(copy)) ) ) {
					if ( copyIsArray ) {
						copyIsArray = false;
						clone = src && isArray(src) ? src : [];

					} else {
						clone = src && isObject(src) ? src : {};
					}

					// Never move original objects, clone them
					target[ name ] = extend( deep, clone, copy );

				// Don't bring in undefined values
				} else if ( copy !== undefined ) {
					target[ name ] = copy;
				}
			}
		}
	}

	// Return the modified object
	return target;
};

isArray = Array.isArray || function( obj ) {
	return Object.prototype.toString.call( obj ) === "[object Array]";
};

isFunction = function( obj ) {
	return Object.prototype.toString.call( obj ) === "[object Function]";
};

isObject = function( obj ) {
	return Object.prototype.toString.call( obj ) === "[object Object]";
};

startsWith = function( value, pattern ) {
	return value.indexOf( pattern ) === 0;
};

trim = function( value ) {
	return ( value + "" ).replace( regexTrim, "" );
};

truncate = function( value ) {
	if ( isNaN( value ) ) {
		return NaN;
	}
	return Math[ value < 0 ? "ceil" : "floor" ]( value );
};

zeroPad = function( str, count, left ) {
	var l;
	for ( l = str.length; l < count; l += 1 ) {
		str = ( left ? ("0" + str) : (str + "0") );
	}
	return str;
};

//
// private Globalization utility functions
//

appendPreOrPostMatch = function( preMatch, strings ) {
	// appends pre- and post- token match strings while removing escaped characters.
	// Returns a single quote count which is used to determine if the token occurs
	// in a string literal.
	var quoteCount = 0,
		escaped = false;
	for ( var i = 0, il = preMatch.length; i < il; i++ ) {
		var c = preMatch.charAt( i );
		switch ( c ) {
			case "\'":
				if ( escaped ) {
					strings.push( "\'" );
				}
				else {
					quoteCount++;
				}
				escaped = false;
				break;
			case "\\":
				if ( escaped ) {
					strings.push( "\\" );
				}
				escaped = !escaped;
				break;
			default:
				strings.push( c );
				escaped = false;
				break;
		}
	}
	return quoteCount;
};

expandFormat = function( cal, format ) {
	// expands unspecified or single character date formats into the full pattern.
	format = format || "F";
	var pattern,
		patterns = cal.patterns,
		len = format.length;
	if ( len === 1 ) {
		pattern = patterns[ format ];
		if ( !pattern ) {
			throw "Invalid date format string \'" + format + "\'.";
		}
		format = pattern;
	}
	else if ( len === 2 && format.charAt(0) === "%" ) {
		// %X escape format -- intended as a custom format string that is only one character, not a built-in format.
		format = format.charAt( 1 );
	}
	return format;
};

formatDate = function( value, format, culture ) {
	var cal = culture.calendar,
		convert = cal.convert,
		ret;

	if ( !format || !format.length || format === "i" ) {
		if ( culture && culture.name.length ) {
			if ( convert ) {
				// non-gregorian calendar, so we cannot use built-in toLocaleString()
				ret = formatDate( value, cal.patterns.F, culture );
			}
			else {
				var eraDate = new Date( value.getTime() ),
					era = getEra( value, cal.eras );
				eraDate.setFullYear( getEraYear(value, cal, era) );
				ret = eraDate.toLocaleString();
			}
		}
		else {
			ret = value.toString();
		}
		return ret;
	}

	var eras = cal.eras,
		sortable = format === "s";
	format = expandFormat( cal, format );

	// Start with an empty string
	ret = [];
	var hour,
		zeros = [ "0", "00", "000" ],
		foundDay,
		checkedDay,
		dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g,
		quoteCount = 0,
		tokenRegExp = getTokenRegExp(),
		converted;

	function padZeros( num, c ) {
		var r, s = num + "";
		if ( c > 1 && s.length < c ) {
			r = ( zeros[c - 2] + s);
			return r.substr( r.length - c, c );
		}
		else {
			r = s;
		}
		return r;
	}

	function hasDay() {
		if ( foundDay || checkedDay ) {
			return foundDay;
		}
		foundDay = dayPartRegExp.test( format );
		checkedDay = true;
		return foundDay;
	}

	function getPart( date, part ) {
		if ( converted ) {
			return converted[ part ];
		}
		switch ( part ) {
			case 0:
				return date.getFullYear();
			case 1:
				return date.getMonth();
			case 2:
				return date.getDate();
			default:
				throw "Invalid part value " + part;
		}
	}

	if ( !sortable && convert ) {
		converted = convert.fromGregorian( value );
	}

	for ( ; ; ) {
		// Save the current index
		var index = tokenRegExp.lastIndex,
			// Look for the next pattern
			ar = tokenRegExp.exec( format );

		// Append the text before the pattern (or the end of the string if not found)
		var preMatch = format.slice( index, ar ? ar.index : format.length );
		quoteCount += appendPreOrPostMatch( preMatch, ret );

		if ( !ar ) {
			break;
		}

		// do not replace any matches that occur inside a string literal.
		if ( quoteCount % 2 ) {
			ret.push( ar[0] );
			continue;
		}

		var current = ar[ 0 ],
			clength = current.length;

		switch ( current ) {
			case "ddd":
				//Day of the week, as a three-letter abbreviation
			case "dddd":
				// Day of the week, using the full name
				var names = ( clength === 3 ) ? cal.days.namesAbbr : cal.days.names;
				ret.push( names[value.getDay()] );
				break;
			case "d":
				// Day of month, without leading zero for single-digit days
			case "dd":
				// Day of month, with leading zero for single-digit days
				foundDay = true;
				ret.push(
					padZeros( getPart(value, 2), clength )
				);
				break;
			case "MMM":
				// Month, as a three-letter abbreviation
			case "MMMM":
				// Month, using the full name
				var part = getPart( value, 1 );
				ret.push(
					( cal.monthsGenitive && hasDay() ) ?
					( cal.monthsGenitive[ clength === 3 ? "namesAbbr" : "names" ][ part ] ) :
					( cal.months[ clength === 3 ? "namesAbbr" : "names" ][ part ] )
				);
				break;
			case "M":
				// Month, as digits, with no leading zero for single-digit months
			case "MM":
				// Month, as digits, with leading zero for single-digit months
				ret.push(
					padZeros( getPart(value, 1) + 1, clength )
				);
				break;
			case "y":
				// Year, as two digits, but with no leading zero for years less than 10
			case "yy":
				// Year, as two digits, with leading zero for years less than 10
			case "yyyy":
				// Year represented by four full digits
				part = converted ? converted[ 0 ] : getEraYear( value, cal, getEra(value, eras), sortable );
				if ( clength < 4 ) {
					part = part % 100;
				}
				ret.push(
					padZeros( part, clength )
				);
				break;
			case "h":
				// Hours with no leading zero for single-digit hours, using 12-hour clock
			case "hh":
				// Hours with leading zero for single-digit hours, using 12-hour clock
				hour = value.getHours() % 12;
				if ( hour === 0 ) hour = 12;
				ret.push(
					padZeros( hour, clength )
				);
				break;
			case "H":
				// Hours with no leading zero for single-digit hours, using 24-hour clock
			case "HH":
				// Hours with leading zero for single-digit hours, using 24-hour clock
				ret.push(
					padZeros( value.getHours(), clength )
				);
				break;
			case "m":
				// Minutes with no leading zero for single-digit minutes
			case "mm":
				// Minutes with leading zero for single-digit minutes
				ret.push(
					padZeros( value.getMinutes(), clength )
				);
				break;
			case "s":
				// Seconds with no leading zero for single-digit seconds
			case "ss":
				// Seconds with leading zero for single-digit seconds
				ret.push(
					padZeros( value.getSeconds(), clength )
				);
				break;
			case "t":
				// One character am/pm indicator ("a" or "p")
			case "tt":
				// Multicharacter am/pm indicator
				part = value.getHours() < 12 ? ( cal.AM ? cal.AM[0] : " " ) : ( cal.PM ? cal.PM[0] : " " );
				ret.push( clength === 1 ? part.charAt(0) : part );
				break;
			case "f":
				// Deciseconds
			case "ff":
				// Centiseconds
			case "fff":
				// Milliseconds
				ret.push(
					padZeros( value.getMilliseconds(), 3 ).substr( 0, clength )
				);
				break;
			case "z":
				// Time zone offset, no leading zero
			case "zz":
				// Time zone offset with leading zero
				hour = value.getTimezoneOffset() / 60;
				ret.push(
					( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), clength )
				);
				break;
			case "zzz":
				// Time zone offset with leading zero
				hour = value.getTimezoneOffset() / 60;
				ret.push(
					( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), 2 ) +
					// Hard coded ":" separator, rather than using cal.TimeSeparator
					// Repeated here for consistency, plus ":" was already assumed in date parsing.
					":" + padZeros( Math.abs(value.getTimezoneOffset() % 60), 2 )
				);
				break;
			case "g":
			case "gg":
				if ( cal.eras ) {
					ret.push(
						cal.eras[ getEra(value, eras) ].name
					);
				}
				break;
		case "/":
			ret.push( cal["/"] );
			break;
		default:
			throw "Invalid date format pattern \'" + current + "\'.";
		}
	}
	return ret.join( "" );
};

// formatNumber
(function() {
	var expandNumber;

	expandNumber = function( number, precision, formatInfo ) {
		var groupSizes = formatInfo.groupSizes,
			curSize = groupSizes[ 0 ],
			curGroupIndex = 1,
			factor = Math.pow( 10, precision ),
			rounded = Math.round( number * factor ) / factor;

		if ( !isFinite(rounded) ) {
			rounded = number;
		}
		number = rounded;

		var numberString = number+"",
			right = "",
			split = numberString.split( /e/i ),
			exponent = split.length > 1 ? parseInt( split[1], 10 ) : 0;
		numberString = split[ 0 ];
		split = numberString.split( "." );
		numberString = split[ 0 ];
		right = split.length > 1 ? split[ 1 ] : "";

		var l;
		if ( exponent > 0 ) {
			right = zeroPad( right, exponent, false );
			numberString += right.slice( 0, exponent );
			right = right.substr( exponent );
		}
		else if ( exponent < 0 ) {
			exponent = -exponent;
			numberString = zeroPad( numberString, exponent + 1, true );
			right = numberString.slice( -exponent, numberString.length ) + right;
			numberString = numberString.slice( 0, -exponent );
		}

		if ( precision > 0 ) {
			right = formatInfo[ "." ] +
				( (right.length > precision) ? right.slice(0, precision) : zeroPad(right, precision) );
		}
		else {
			right = "";
		}

		var stringIndex = numberString.length - 1,
			sep = formatInfo[ "," ],
			ret = "";

		while ( stringIndex >= 0 ) {
			if ( curSize === 0 || curSize > stringIndex ) {
				return numberString.slice( 0, stringIndex + 1 ) + ( ret.length ? (sep + ret + right) : right );
			}
			ret = numberString.slice( stringIndex - curSize + 1, stringIndex + 1 ) + ( ret.length ? (sep + ret) : "" );

			stringIndex -= curSize;

			if ( curGroupIndex < groupSizes.length ) {
				curSize = groupSizes[ curGroupIndex ];
				curGroupIndex++;
			}
		}

		return numberString.slice( 0, stringIndex + 1 ) + sep + ret + right;
	};

	formatNumber = function( value, format, culture ) {
		if ( !isFinite(value) ) {
			if ( value === Infinity ) {
				return culture.numberFormat.positiveInfinity;
			}
			if ( value === -Infinity ) {
				return culture.numberFormat.negativeInfinity;
			}
			return culture.numberFormat.NaN;
		}
		if ( !format || format === "i" ) {
			return culture.name.length ? value.toLocaleString() : value.toString();
		}
		format = format || "D";

		var nf = culture.numberFormat,
			number = Math.abs( value ),
			precision = -1,
			pattern;
		if ( format.length > 1 ) precision = parseInt( format.slice(1), 10 );

		var current = format.charAt( 0 ).toUpperCase(),
			formatInfo;

		switch ( current ) {
			case "D":
				pattern = "n";
				number = truncate( number );
				if ( precision !== -1 ) {
					number = zeroPad( "" + number, precision, true );
				}
				if ( value < 0 ) number = "-" + number;
				break;
			case "N":
				formatInfo = nf;
				/* falls through */
			case "C":
				formatInfo = formatInfo || nf.currency;
				/* falls through */
			case "P":
				formatInfo = formatInfo || nf.percent;
				pattern = value < 0 ? formatInfo.pattern[ 0 ] : ( formatInfo.pattern[1] || "n" );
				if ( precision === -1 ) precision = formatInfo.decimals;
				number = expandNumber( number * (current === "P" ? 100 : 1), precision, formatInfo );
				break;
			default:
				throw "Bad number format specifier: " + current;
		}

		var patternParts = /n|\$|-|%/g,
			ret = "";
		for ( ; ; ) {
			var index = patternParts.lastIndex,
				ar = patternParts.exec( pattern );

			ret += pattern.slice( index, ar ? ar.index : pattern.length );

			if ( !ar ) {
				break;
			}

			switch ( ar[0] ) {
				case "n":
					ret += number;
					break;
				case "$":
					ret += nf.currency.symbol;
					break;
				case "-":
					// don't make 0 negative
					if ( /[1-9]/.test(number) ) {
						ret += nf[ "-" ];
					}
					break;
				case "%":
					ret += nf.percent.symbol;
					break;
			}
		}

		return ret;
	};

}());

getTokenRegExp = function() {
	// regular expression for matching date and time tokens in format strings.
	return (/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g);
};

getEra = function( date, eras ) {
	if ( !eras ) return 0;
	var start, ticks = date.getTime();
	for ( var i = 0, l = eras.length; i < l; i++ ) {
		start = eras[ i ].start;
		if ( start === null || ticks >= start ) {
			return i;
		}
	}
	return 0;
};

getEraYear = function( date, cal, era, sortable ) {
	var year = date.getFullYear();
	if ( !sortable && cal.eras ) {
		// convert normal gregorian year to era-shifted gregorian
		// year by subtracting the era offset
		year -= cal.eras[ era ].offset;
	}
	return year;
};

// parseExact
(function() {
	var expandYear,
		getDayIndex,
		getMonthIndex,
		getParseRegExp,
		outOfRange,
		toUpper,
		toUpperArray;

	expandYear = function( cal, year ) {
		// expands 2-digit year into 4 digits.
		if ( year < 100 ) {
			var now = new Date(),
				era = getEra( now ),
				curr = getEraYear( now, cal, era ),
				twoDigitYearMax = cal.twoDigitYearMax;
			twoDigitYearMax = typeof twoDigitYearMax === "string" ? new Date().getFullYear() % 100 + parseInt( twoDigitYearMax, 10 ) : twoDigitYearMax;
			year += curr - ( curr % 100 );
			if ( year > twoDigitYearMax ) {
				year -= 100;
			}
		}
		return year;
	};

	getDayIndex = function	( cal, value, abbr ) {
		var ret,
			days = cal.days,
			upperDays = cal._upperDays;
		if ( !upperDays ) {
			cal._upperDays = upperDays = [
				toUpperArray( days.names ),
				toUpperArray( days.namesAbbr ),
				toUpperArray( days.namesShort )
			];
		}
		value = toUpper( value );
		if ( abbr ) {
			ret = arrayIndexOf( upperDays[1], value );
			if ( ret === -1 ) {
				ret = arrayIndexOf( upperDays[2], value );
			}
		}
		else {
			ret = arrayIndexOf( upperDays[0], value );
		}
		return ret;
	};

	getMonthIndex = function( cal, value, abbr ) {
		var months = cal.months,
			monthsGen = cal.monthsGenitive || cal.months,
			upperMonths = cal._upperMonths,
			upperMonthsGen = cal._upperMonthsGen;
		if ( !upperMonths ) {
			cal._upperMonths = upperMonths = [
				toUpperArray( months.names ),
				toUpperArray( months.namesAbbr )
			];
			cal._upperMonthsGen = upperMonthsGen = [
				toUpperArray( monthsGen.names ),
				toUpperArray( monthsGen.namesAbbr )
			];
		}
		value = toUpper( value );
		var i = arrayIndexOf( abbr ? upperMonths[1] : upperMonths[0], value );
		if ( i < 0 ) {
			i = arrayIndexOf( abbr ? upperMonthsGen[1] : upperMonthsGen[0], value );
		}
		return i;
	};

	getParseRegExp = function( cal, format ) {
		// converts a format string into a regular expression with groups that
		// can be used to extract date fields from a date string.
		// check for a cached parse regex.
		var re = cal._parseRegExp;
		if ( !re ) {
			cal._parseRegExp = re = {};
		}
		else {
			var reFormat = re[ format ];
			if ( reFormat ) {
				return reFormat;
			}
		}

		// expand single digit formats, then escape regular expression characters.
		var expFormat = expandFormat( cal, format ).replace( /([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g, "\\\\$1" ),
			regexp = [ "^" ],
			groups = [],
			index = 0,
			quoteCount = 0,
			tokenRegExp = getTokenRegExp(),
			match;

		// iterate through each date token found.
		while ( (match = tokenRegExp.exec(expFormat)) !== null ) {
			var preMatch = expFormat.slice( index, match.index );
			index = tokenRegExp.lastIndex;

			// don't replace any matches that occur inside a string literal.
			quoteCount += appendPreOrPostMatch( preMatch, regexp );
			if ( quoteCount % 2 ) {
				regexp.push( match[0] );
				continue;
			}

			// add a regex group for the token.
			var m = match[ 0 ],
				len = m.length,
				add;
			switch ( m ) {
				case "dddd": case "ddd":
				case "MMMM": case "MMM":
				case "gg": case "g":
					add = "(\\D+)";
					break;
				case "tt": case "t":
					add = "(\\D*)";
					break;
				case "yyyy":
				case "fff":
				case "ff":
				case "f":
					add = "(\\d{" + len + "})";
					break;
				case "dd": case "d":
				case "MM": case "M":
				case "yy": case "y":
				case "HH": case "H":
				case "hh": case "h":
				case "mm": case "m":
				case "ss": case "s":
					add = "(\\d\\d?)";
					break;
				case "zzz":
					add = "([+-]?\\d\\d?:\\d{2})";
					break;
				case "zz": case "z":
					add = "([+-]?\\d\\d?)";
					break;
				case "/":
					add = "(\\/)";
					break;
				default:
					throw "Invalid date format pattern \'" + m + "\'.";
			}
			if ( add ) {
				regexp.push( add );
			}
			groups.push( match[0] );
		}
		appendPreOrPostMatch( expFormat.slice(index), regexp );
		regexp.push( "$" );

		// allow whitespace to differ when matching formats.
		var regexpStr = regexp.join( "" ).replace( /\s+/g, "\\s+" ),
			parseRegExp = { "regExp": regexpStr, "groups": groups };

		// cache the regex for this format.
		return re[ format ] = parseRegExp;
	};

	outOfRange = function( value, low, high ) {
		return value < low || value > high;
	};

	toUpper = function( value ) {
		// "he-IL" has non-breaking space in weekday names.
		return value.split( "\u00A0" ).join( " " ).toUpperCase();
	};

	toUpperArray = function( arr ) {
		var results = [];
		for ( var i = 0, l = arr.length; i < l; i++ ) {
			results[ i ] = toUpper( arr[i] );
		}
		return results;
	};

	parseExact = function( value, format, culture ) {
		// try to parse the date string by matching against the format string
		// while using the specified culture for date field names.
		value = trim( value );
		var cal = culture.calendar,
			// convert date formats into regular expressions with groupings.
			// use the regexp to determine the input format and extract the date fields.
			parseInfo = getParseRegExp( cal, format ),
			match = new RegExp( parseInfo.regExp ).exec( value );
		if ( match === null ) {
			return null;
		}
		// found a date format that matches the input.
		var groups = parseInfo.groups,
			era = null, year = null, month = null, date = null, weekDay = null,
			hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null,
			pmHour = false;
		// iterate the format groups to extract and set the date fields.
		for ( var j = 0, jl = groups.length; j < jl; j++ ) {
			var matchGroup = match[ j + 1 ];
			if ( matchGroup ) {
				var current = groups[ j ],
					clength = current.length,
					matchInt = parseInt( matchGroup, 10 );
				switch ( current ) {
					case "dd": case "d":
						// Day of month.
						date = matchInt;
						// check that date is generally in valid range, also checking overflow below.
						if ( outOfRange(date, 1, 31) ) return null;
						break;
					case "MMM": case "MMMM":
						month = getMonthIndex( cal, matchGroup, clength === 3 );
						if ( outOfRange(month, 0, 11) ) return null;
						break;
					case "M": case "MM":
						// Month.
						month = matchInt - 1;
						if ( outOfRange(month, 0, 11) ) return null;
						break;
					case "y": case "yy":
					case "yyyy":
						year = clength < 4 ? expandYear( cal, matchInt ) : matchInt;
						if ( outOfRange(year, 0, 9999) ) return null;
						break;
					case "h": case "hh":
						// Hours (12-hour clock).
						hour = matchInt;
						if ( hour === 12 ) hour = 0;
						if ( outOfRange(hour, 0, 11) ) return null;
						break;
					case "H": case "HH":
						// Hours (24-hour clock).
						hour = matchInt;
						if ( outOfRange(hour, 0, 23) ) return null;
						break;
					case "m": case "mm":
						// Minutes.
						min = matchInt;
						if ( outOfRange(min, 0, 59) ) return null;
						break;
					case "s": case "ss":
						// Seconds.
						sec = matchInt;
						if ( outOfRange(sec, 0, 59) ) return null;
						break;
					case "tt": case "t":
						// AM/PM designator.
						// see if it is standard, upper, or lower case PM. If not, ensure it is at least one of
						// the AM tokens. If not, fail the parse for this format.
						pmHour = cal.PM && ( matchGroup === cal.PM[0] || matchGroup === cal.PM[1] || matchGroup === cal.PM[2] );
						if (
							!pmHour && (
								!cal.AM || ( matchGroup !== cal.AM[0] && matchGroup !== cal.AM[1] && matchGroup !== cal.AM[2] )
							)
						) return null;
						break;
					case "f":
						// Deciseconds.
					case "ff":
						// Centiseconds.
					case "fff":
						// Milliseconds.
						msec = matchInt * Math.pow( 10, 3 - clength );
						if ( outOfRange(msec, 0, 999) ) return null;
						break;
					case "ddd":
						// Day of week.
					case "dddd":
						// Day of week.
						weekDay = getDayIndex( cal, matchGroup, clength === 3 );
						if ( outOfRange(weekDay, 0, 6) ) return null;
						break;
					case "zzz":
						// Time zone offset in +/- hours:min.
						var offsets = matchGroup.split( /:/ );
						if ( offsets.length !== 2 ) return null;
						hourOffset = parseInt( offsets[0], 10 );
						if ( outOfRange(hourOffset, -12, 13) ) return null;
						var minOffset = parseInt( offsets[1], 10 );
						if ( outOfRange(minOffset, 0, 59) ) return null;
						tzMinOffset = ( hourOffset * 60 ) + ( startsWith(matchGroup, "-") ? -minOffset : minOffset );
						break;
					case "z": case "zz":
						// Time zone offset in +/- hours.
						hourOffset = matchInt;
						if ( outOfRange(hourOffset, -12, 13) ) return null;
						tzMinOffset = hourOffset * 60;
						break;
					case "g": case "gg":
						var eraName = matchGroup;
						if ( !eraName || !cal.eras ) return null;
						eraName = trim( eraName.toLowerCase() );
						for ( var i = 0, l = cal.eras.length; i < l; i++ ) {
							if ( eraName === cal.eras[i].name.toLowerCase() ) {
								era = i;
								break;
							}
						}
						// could not find an era with that name
						if ( era === null ) return null;
						break;
				}
			}
		}
		var result = new Date(), defaultYear, convert = cal.convert;
		defaultYear = convert ? convert.fromGregorian( result )[ 0 ] : result.getFullYear();
		if ( year === null ) {
			year = defaultYear;
		}
		else if ( cal.eras ) {
			// year must be shifted to normal gregorian year
			// but not if year was not specified, its already normal gregorian
			// per the main if clause above.
			year += cal.eras[( era || 0 )].offset;
		}
		// set default day and month to 1 and January, so if unspecified, these are the defaults
		// instead of the current day/month.
		if ( month === null ) {
			month = 0;
		}
		if ( date === null ) {
			date = 1;
		}
		// now have year, month, and date, but in the culture's calendar.
		// convert to gregorian if necessary
		if ( convert ) {
			result = convert.toGregorian( year, month, date );
			// conversion failed, must be an invalid match
			if ( result === null ) return null;
		}
		else {
			// have to set year, month and date together to avoid overflow based on current date.
			result.setFullYear( year, month, date );
			// check to see if date overflowed for specified month (only checked 1-31 above).
			if ( result.getDate() !== date ) return null;
			// invalid day of week.
			if ( weekDay !== null && result.getDay() !== weekDay ) {
				return null;
			}
		}
		// if pm designator token was found make sure the hours fit the 24-hour clock.
		if ( pmHour && hour < 12 ) {
			hour += 12;
		}
		result.setHours( hour, min, sec, msec );
		if ( tzMinOffset !== null ) {
			// adjust timezone to utc before applying local offset.
			var adjustedMin = result.getMinutes() - ( tzMinOffset + result.getTimezoneOffset() );
			// Safari limits hours and minutes to the range of -127 to 127.  We need to use setHours
			// to ensure both these fields will not exceed this range.	adjustedMin will range
			// somewhere between -1440 and 1500, so we only need to split this into hours.
			result.setHours( result.getHours() + parseInt(adjustedMin / 60, 10), adjustedMin % 60 );
		}
		return result;
	};
}());

parseNegativePattern = function( value, nf, negativePattern ) {
	var neg = nf[ "-" ],
		pos = nf[ "+" ],
		ret;
	switch ( negativePattern ) {
		case "n -":
			neg = " " + neg;
			pos = " " + pos;
			/* falls through */
		case "n-":
			if ( endsWith(value, neg) ) {
				ret = [ "-", value.substr(0, value.length - neg.length) ];
			}
			else if ( endsWith(value, pos) ) {
				ret = [ "+", value.substr(0, value.length - pos.length) ];
			}
			break;
		case "- n":
			neg += " ";
			pos += " ";
			/* falls through */
		case "-n":
			if ( startsWith(value, neg) ) {
				ret = [ "-", value.substr(neg.length) ];
			}
			else if ( startsWith(value, pos) ) {
				ret = [ "+", value.substr(pos.length) ];
			}
			break;
		case "(n)":
			if ( startsWith(value, "(") && endsWith(value, ")") ) {
				ret = [ "-", value.substr(1, value.length - 2) ];
			}
			break;
	}
	return ret || [ "", value ];
};

//
// public instance functions
//

Globalize.prototype.findClosestCulture = function( cultureSelector ) {
	return Globalize.findClosestCulture.call( this, cultureSelector );
};

Globalize.prototype.format = function( value, format, cultureSelector ) {
	return Globalize.format.call( this, value, format, cultureSelector );
};

Globalize.prototype.localize = function( key, cultureSelector ) {
	return Globalize.localize.call( this, key, cultureSelector );
};

Globalize.prototype.parseInt = function( value, radix, cultureSelector ) {
	return Globalize.parseInt.call( this, value, radix, cultureSelector );
};

Globalize.prototype.parseFloat = function( value, radix, cultureSelector ) {
	return Globalize.parseFloat.call( this, value, radix, cultureSelector );
};

Globalize.prototype.culture = function( cultureSelector ) {
	return Globalize.culture.call( this, cultureSelector );
};

//
// public singleton functions
//

Globalize.addCultureInfo = function( cultureName, baseCultureName, info ) {

	var base = {},
		isNew = false;

	if ( typeof cultureName !== "string" ) {
		// cultureName argument is optional string. If not specified, assume info is first
		// and only argument. Specified info deep-extends current culture.
		info = cultureName;
		cultureName = this.culture().name;
		base = this.cultures[ cultureName ];
	} else if ( typeof baseCultureName !== "string" ) {
		// baseCultureName argument is optional string. If not specified, assume info is second
		// argument. Specified info deep-extends specified culture.
		// If specified culture does not exist, create by deep-extending default
		info = baseCultureName;
		isNew = ( this.cultures[ cultureName ] == null );
		base = this.cultures[ cultureName ] || this.cultures[ "default" ];
	} else {
		// cultureName and baseCultureName specified. Assume a new culture is being created
		// by deep-extending an specified base culture
		isNew = true;
		base = this.cultures[ baseCultureName ];
	}

	this.cultures[ cultureName ] = extend(true, {},
		base,
		info
	);
	// Make the standard calendar the current culture if it's a new culture
	if ( isNew ) {
		this.cultures[ cultureName ].calendar = this.cultures[ cultureName ].calendars.standard;
	}
};

Globalize.findClosestCulture = function( name ) {
	var match;
	if ( !name ) {
		return this.findClosestCulture( this.cultureSelector ) || this.cultures[ "default" ];
	}
	if ( typeof name === "string" ) {
		name = name.split( "," );
	}
	if ( isArray(name) ) {
		var lang,
			cultures = this.cultures,
			list = name,
			i, l = list.length,
			prioritized = [];
		for ( i = 0; i < l; i++ ) {
			name = trim( list[i] );
			var pri, parts = name.split( ";" );
			lang = trim( parts[0] );
			if ( parts.length === 1 ) {
				pri = 1;
			}
			else {
				name = trim( parts[1] );
				if ( name.indexOf("q=") === 0 ) {
					name = name.substr( 2 );
					pri = parseFloat( name );
					pri = isNaN( pri ) ? 0 : pri;
				}
				else {
					pri = 1;
				}
			}
			prioritized.push({ lang: lang, pri: pri });
		}
		prioritized.sort(function( a, b ) {
			if ( a.pri < b.pri ) {
				return 1;
			} else if ( a.pri > b.pri ) {
				return -1;
			}
			return 0;
		});
		// exact match
		for ( i = 0; i < l; i++ ) {
			lang = prioritized[ i ].lang;
			match = cultures[ lang ];
			if ( match ) {
				return match;
			}
		}

		// neutral language match
		for ( i = 0; i < l; i++ ) {
			lang = prioritized[ i ].lang;
			do {
				var index = lang.lastIndexOf( "-" );
				if ( index === -1 ) {
					break;
				}
				// strip off the last part. e.g. en-US => en
				lang = lang.substr( 0, index );
				match = cultures[ lang ];
				if ( match ) {
					return match;
				}
			}
			while ( 1 );
		}

		// last resort: match first culture using that language
		for ( i = 0; i < l; i++ ) {
			lang = prioritized[ i ].lang;
			for ( var cultureKey in cultures ) {
				var culture = cultures[ cultureKey ];
				if ( culture.language == lang ) {
					return culture;
				}
			}
		}
	}
	else if ( typeof name === "object" ) {
		return name;
	}
	return match || null;
};

Globalize.format = function( value, format, cultureSelector ) {
	var culture = this.findClosestCulture( cultureSelector );
	if ( value instanceof Date ) {
		value = formatDate( value, format, culture );
	}
	else if ( typeof value === "number" ) {
		value = formatNumber( value, format, culture );
	}
	return value;
};

Globalize.localize = function( key, cultureSelector ) {
	return this.findClosestCulture( cultureSelector ).messages[ key ] ||
		this.cultures[ "default" ].messages[ key ];
};

Globalize.parseDate = function( value, formats, culture ) {
	culture = this.findClosestCulture( culture );

	var date, prop, patterns;
	if ( formats ) {
		if ( typeof formats === "string" ) {
			formats = [ formats ];
		}
		if ( formats.length ) {
			for ( var i = 0, l = formats.length; i < l; i++ ) {
				var format = formats[ i ];
				if ( format ) {
					date = parseExact( value, format, culture );
					if ( date ) {
						break;
					}
				}
			}
		}
	} else {
		patterns = culture.calendar.patterns;
		for ( prop in patterns ) {
			date = parseExact( value, patterns[prop], culture );
			if ( date ) {
				break;
			}
		}
	}

	return date || null;
};

Globalize.parseInt = function( value, radix, cultureSelector ) {
	return truncate( Globalize.parseFloat(value, radix, cultureSelector) );
};

Globalize.parseFloat = function( value, radix, cultureSelector ) {
	// radix argument is optional
	if ( typeof radix !== "number" ) {
		cultureSelector = radix;
		radix = 10;
	}

	var culture = this.findClosestCulture( cultureSelector );
	var ret = NaN,
		nf = culture.numberFormat;

	if ( value.indexOf(culture.numberFormat.currency.symbol) > -1 ) {
		// remove currency symbol
		value = value.replace( culture.numberFormat.currency.symbol, "" );
		// replace decimal seperator
		value = value.replace( culture.numberFormat.currency["."], culture.numberFormat["."] );
	}

	//Remove percentage character from number string before parsing
	if ( value.indexOf(culture.numberFormat.percent.symbol) > -1){
		value = value.replace( culture.numberFormat.percent.symbol, "" );
	}

	// remove spaces: leading, trailing and between - and number. Used for negative currency pt-BR
	value = value.replace( / /g, "" );

	// allow infinity or hexidecimal
	if ( regexInfinity.test(value) ) {
		ret = parseFloat( value );
	}
	else if ( !radix && regexHex.test(value) ) {
		ret = parseInt( value, 16 );
	}
	else {

		// determine sign and number
		var signInfo = parseNegativePattern( value, nf, nf.pattern[0] ),
			sign = signInfo[ 0 ],
			num = signInfo[ 1 ];

		// #44 - try parsing as "(n)"
		if ( sign === "" && nf.pattern[0] !== "(n)" ) {
			signInfo = parseNegativePattern( value, nf, "(n)" );
			sign = signInfo[ 0 ];
			num = signInfo[ 1 ];
		}

		// try parsing as "-n"
		if ( sign === "" && nf.pattern[0] !== "-n" ) {
			signInfo = parseNegativePattern( value, nf, "-n" );
			sign = signInfo[ 0 ];
			num = signInfo[ 1 ];
		}

		sign = sign || "+";

		// determine exponent and number
		var exponent,
			intAndFraction,
			exponentPos = num.indexOf( "e" );
		if ( exponentPos < 0 ) exponentPos = num.indexOf( "E" );
		if ( exponentPos < 0 ) {
			intAndFraction = num;
			exponent = null;
		}
		else {
			intAndFraction = num.substr( 0, exponentPos );
			exponent = num.substr( exponentPos + 1 );
		}
		// determine decimal position
		var integer,
			fraction,
			decSep = nf[ "." ],
			decimalPos = intAndFraction.indexOf( decSep );
		if ( decimalPos < 0 ) {
			integer = intAndFraction;
			fraction = null;
		}
		else {
			integer = intAndFraction.substr( 0, decimalPos );
			fraction = intAndFraction.substr( decimalPos + decSep.length );
		}
		// handle groups (e.g. 1,000,000)
		var groupSep = nf[ "," ];
		integer = integer.split( groupSep ).join( "" );
		var altGroupSep = groupSep.replace( /\u00A0/g, " " );
		if ( groupSep !== altGroupSep ) {
			integer = integer.split( altGroupSep ).join( "" );
		}
		// build a natively parsable number string
		var p = sign + integer;
		if ( fraction !== null ) {
			p += "." + fraction;
		}
		if ( exponent !== null ) {
			// exponent itself may have a number patternd
			var expSignInfo = parseNegativePattern( exponent, nf, "-n" );
			p += "e" + ( expSignInfo[0] || "+" ) + expSignInfo[ 1 ];
		}
		if ( regexParseFloat.test(p) ) {
			ret = parseFloat( p );
		}
	}
	return ret;
};

Globalize.culture = function( cultureSelector ) {
	// setter
	if ( typeof cultureSelector !== "undefined" ) {
		this.cultureSelector = cultureSelector;
	}
	// getter
	return this.findClosestCulture( cultureSelector ) || this.cultures[ "default" ];
};

}( this ));
;
/*
    json2.js
    2012-10-08

    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 (key) {

            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 (key) {
                return this.valueOf();
            };
    }

    var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
        escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
        gap,
        indent,
        meta = {    // table of character substitutions
            '\b': '\\b',
            '\t': '\\t',
            '\n': '\\n',
            '\f': '\\f',
            '\r': '\\r',
            '"' : '\\"',
            '\\': '\\\\'
        },
        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') {
        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') {
        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');
        };
    }
}());
;
/*globals glb_ResolveUrlJs_Base, GlobalStrings, linkImagePosition, MediaPlayer, ChangeSelectBoxVisibility, glb_StringCaseType*/
var functionOnCloseDiv = "";


/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name     :   createButtonPopup
// Desc     :   Builds and returns a modal jQuery dialog either underneath the link that triggered it or in 
//              the center of the page.
// Inputs   :   tsi_button - The button/link that raised the event
//              removeOnClick - if true any click on the page closes the dialog
//		        title - Modal dialog's title
//		        functionOnClose - function to try an on close function after div closes
//		        doNotClose - Hide or show the close(X) button on the modal dialog title bar
//
//              Changes made to accommodate JqueryUI
///////////////////////////////////////////////////////////////////////////////////////////////////////////*/

function createButtonPopup(tsi_button, removeOnClick, title, functionOnClose, doNotClose, AdditionalOptions) {


    if (arguments.length < 4) {
        doNotClose = false;
    }

    if (arguments.length > 3) {
        functionOnCloseDiv = functionOnClose;
    }
    else {
        functionOnCloseDiv = "";
    }

    var jqObj;

    var linkImage = document.getElementById(tsi_button);
    if (linkImage != null) {
        linkImagePosition = findPos(linkImage);
    }
    ChangeSelectBoxVisibility("hidden");

    var dialogID = "popUpDivFromButton";
    var msgDialog = "<div id=\"" + dialogID + "\" style=\"padding:5px;\" title=\"" + title + "\"></div>";

    if ($("#" + dialogID).length > 0) {
        $("#" + dialogID).dialog('destroy').remove();
    }

    var jqObj = $(msgDialog);

    jqObj.appendTo(document.body);

    var initialDialogOption = {

        width: 'auto',
        height: 'auto',
        autoResize: true,
        draggable: true,
        modal: true,
        resizable: false,
        fluid: true,
        open: function (event, ui) {
            if (removeOnClick) {
                $('.ui-widget-overlay').bind('click', function () {
                    removeButtonPopup();
                });
            }
        },
        close: function (event, ui) {
            removeButtonPopup();
        }
    };

    jqObj.dialog(initialDialogOption);

    //Dialog's Position
    var additionalDialogOption;
    if (Globals.Utilities.isUndefinedOrNull(AdditionalOptions)) {
        additionalDialogOption = {
            width: 480,
            maxHeight: 450
        };
    }
    else {
        additionalDialogOption = AdditionalOptions;
    }
    var jqButtonAnchorPoint = $("#" + tsi_button);

    try {
        if (jqButtonAnchorPoint.length > 0) {

            var positionOption = {
                my: "left top", //the possition of the div
                of: jqButtonAnchorPoint, //the object that the pop up needs to anchor to
                at: "left bottom" // the location where it should show in relation of the "of" object.
            };

            additionalDialogOption["position"] = positionOption;
            additionalDialogOption.width = 480;
        }
    }
    catch (e) { }

    jqObj.dialog(additionalDialogOption);

    $('div.ui-dialog-titlebar-close').hide();
    $('div.ui-dialog-titlebar').css('min-height', '25px');


    if (!doNotClose) {
        //Show the X button on the dialog
        $('.ui-dialog-titlebar-close').show();
    }

    return jqObj;

}



/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name     :   check4rightAlign
// Desc     :   positions the window 
//
// Status   :   MAY NOT BE NEEDED ANYMORE. IMPLEMENTED IN createButtonPopup(..)
///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
//function check4rightAlign(tsi_button) {


//    var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth;
//    var popup = document.getElementById("popUpDivFromButton");

//    if (width < parseInt(popup.style.left) + $(popup).outerWidth(false)) {
//        //if its not already on the left hand of the window
//        if (width / 2 < parseInt(popup.style.left)) {
//            buttonToGoUnder = document.getElementById(tsi_button);
//            if (buttonToGoUnder != null) {
//                linkUnderPos = findPos(buttonToGoUnder);
//                popup.style.left = (linkUnderPos[1] + $(buttonToGoUnder).outerWidth(false) - $(popup).outerWidth(false)) + 'px';

//            }
//        }
//    }

//}

/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name     :   fixTableWidth
// Desc     :   Fixes the width of the modal window
//
// Status   :   MAY NOT BE NEEDED ANYMORE. IMPLEMENTED IN createButtonPopup(..)
///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
//function fixTableWidth() {
//	if (document.getElementById("popupHeadingTable") == null) {
//		return;
//	}

//    if ($("#popupHeadingTable").width() > $("#popUpDivFromButton").width() - 20) {
//    	$("#popupHeadingTable").width($("#popUpDivFromButton").width() + 20);
//    }
//    else {
//    	$("#popupHeadingTable").width($("#popUpDivFromButton").width());
//    }
//}


/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name     :   removeButtonPopup
// Desc     :   Closes the modal window and removes it from the DOM.
//
//              Changes made to accommodate JqueryUI
///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
function removeButtonPopup() {

    if ($("#popUpDivFromButton").length > 0) {

        if ($("#popUpDivFromButton").html().indexOf('MediaPlayer') != -1) {
            MediaPlayer.stop();
        }

        $("#popUpDivFromButton").dialog('destroy').remove();

        ChangeSelectBoxVisibility("visible");
        tryFunctionOnClose();
    }
}


/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name     :   createCenteredPopupDiv
// Desc     :   Triggers the creation of a modal dialog then adds content to it. 
// Inputs   :   innerHTML - The content of the modal dialog
//              removeOnClick - if true any click on the page closes the dialog
//		        title - Modal dialog's title
//		        functionOnClose - function to try an on close function after div closes
//		        doNotClose - Hide or show the close(X) button on the modal dialog title bar
//
//              Changes made to accommodate JqueryUI
///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
function createCenteredPopupDiv(innerHTML, removeOnClick, title, functionOnClose, doNotClose, DialogOptions) {
    var jqDiv = null;

    if (arguments.length > 3) {
        jqDiv = createButtonPopup("", removeOnClick, title, functionOnClose, doNotClose, DialogOptions);
    }
    else {
        jqDiv = createButtonPopup("", removeOnClick, title);
    }

    try {
        if (jqDiv.length == 0) {
            return null;
        }
    }
    catch (e) {
        return null;
    }

    jqDiv.html(innerHTML);

    //this is needed since the position at this point is based on an empty div without any dimensions so things will look out of place.
    if (typeof (DialogOptions) === "undefined" || DialogOptions === null) {
        var positionOptions = {
            "my": "center",
            "at": "center",
            "of": window
        };

        jqDiv.dialog("option", "position", positionOptions);
    }

    return jqDiv;
}

//function to try an on close function after div closes
function tryFunctionOnClose() {
    if (functionOnCloseDiv != null && functionOnCloseDiv.length > 0) {
        try {
            eval(functionOnCloseDiv);
        }
        catch (Err) {
            //do nothing
        }
    }
}

//function to get any element postion
function findPos(obj) {
    if (obj == null) {
        return [0, 0];
    }

    var curleft = 0;
    var curtop = 0;
    if (obj.offsetParent) {
        do {
            curleft += obj.offsetLeft;
            curtop += obj.offsetTop;
        } while (obj = obj.offsetParent);
    }
    return [curtop, curleft];
}





function paddingFix4Element(sElemId) {
    //no longer need to run this since we are using a doctype
    try {

        var objElement = document.getElementById(sElemId);
        //no longer run this code, since we added the box model fix to the css
        if (false) {
            //check if it has already been applied
            if (document.getElementById("lstElementsFixed").value.indexOf(sElemId) == -1) {
                document.getElementById("lstElementsFixed").value += sElemId + ",";

                var iDifference = objElement.offsetWidth - $("#" + sElemId).width();
                $(objElement).width(objElement.offsetWidth - iDifference - iDifference);
            }

        }
    }
    catch (Error) {

    }

}



function paddingFix() {
    //no longer run this code, since we added the box model fix to the css
    if (false) {

        for (var i = 0; i < document.styleSheets.length; i++) {
            var mysheet = document.styleSheets[i];
            var myrules = mysheet.cssRules ? mysheet.cssRules : mysheet.rules;
            for (var j = 0; j < myrules.length; j++) {
                if (!isNaN(parseInt(myrules[j].style.height)) && myrules[j].style.height.indexOf('px') > 0) {
                    if (parseInt(myrules[j].style.paddingBottom) > 0 && !isNaN(parseInt(myrules[j].style.paddingBottom))) {
                        myrules[j].style.height = (parseInt(myrules[j].style.height) - parseInt(myrules[j].style.paddingBottom)) + 'px';
                    }
                    if (parseInt(myrules[j].style.paddingTop) > 0 && !isNaN(parseInt(myrules[j].style.paddingTop))) {
                        myrules[j].style.height = (parseInt(myrules[j].style.height) - parseInt(myrules[j].style.paddingTop)) + 'px';
                    }
                }
                if (!isNaN(parseInt(myrules[j].style.width)) && myrules[j].style.width.indexOf('px') > 0) {
                    if (parseInt(myrules[j].style.paddingLeft) > 0 && !isNaN(parseInt(myrules[j].style.paddingLeft))) {
                        myrules[j].style.width = (parseInt(myrules[j].style.width) - parseInt(myrules[j].style.paddingLeft)) + 'px';
                    }
                    if (parseInt(myrules[j].style.paddingRight) > 0 && !isNaN(parseInt(myrules[j].style.paddingRight))) {
                        myrules[j].style.width = (parseInt(myrules[j].style.width) - parseInt(myrules[j].style.paddingRight)) + 'px';
                    }
                }
            }
        }
    }
}

//fix safari and chrome padding problem
function documentBodyFix4Safari() {
    if (jQuery) {
        //@ CHANGE FOR JQUERY 3.6
        //$(document).ready(function () {
        if (
            document.readyState === "complete" ||
            (document.readyState !== "loading" && !document.documentElement.doScroll)
        ) {
            documentBodyFix();
        };
    }
    else {
        documentBodyFix();
    }
}

function documentBodyFix() {
    //check if its playbook/old ipad to run the padding fix
    if (navigator.userAgent.toLowerCase().indexOf('playbook') != -1 || (navigator.userAgent.toLowerCase().indexOf('ipad') != -1 && (navigator.userAgent.toLowerCase().indexOf('cpu os 4') != -1 || navigator.userAgent.toLowerCase().indexOf('cpu os 3') != -1))) {
        var divDocumentBodyContext = document.getElementById("divDocumentBodyContext");
        if (divDocumentBodyContext != null) // <- this only exists in briefcase.aspx and home.aspx
        {
            $(divDocumentBodyContext).width(parseInt($(divDocumentBodyContext).width()) - Math.max(10, parseInt($(divDocumentBodyContext).css("padding-left"))) - Math.max(10, parseInt($(divDocumentBodyContext).css("padding-right"))) - 10);
            // $(divDocumentBodyContext).height(parseInt($(divDocumentBodyContext).height())  - 4);
            var divDocumentBody = document.getElementById("divDocumentBody");
            $(divDocumentBody).width(parseInt($(divDocumentBody).width()) - Math.max(10, parseInt($(divDocumentBody).css("padding-left"))) - Math.max(10, parseInt($(divDocumentBody).css("padding-right"))) - 3);
        }
    }
}


/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name     :   GetString
// Desc     :   Get a JS string. This also uses the glb_StringCaseType variable to set weather or not it should
//				use the alternate string.
// Inputs   :   stringName - The variable name assigned to the string desired.
///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
function GetString(stringName) {
    var obj = GlobalStrings[stringName];
    var stringToReturn = "";
    if (stringName.length > 0 && typeof (obj) !== "undefined") {

        if (Globals.Utilities.isArray(obj) && obj.length > 1)// Mapped to another array, different case type is defined for this string
        {
            switch (glb_StringCaseType) {
                case Globals.StringCaseType.SentenceCase:
                    stringToReturn = GlobalStrings[stringName][1];
                    break;
                case Globals.StringCaseType.TitleCase:
                default:
                    stringToReturn = GlobalStrings[stringName][0];
                    break;
            }
        }
        else if (Globals.Utilities.isArray(obj) && obj.length === 1) {
            stringToReturn = GlobalStrings[stringName][0];
        }
        else {
            // Must be mapped to a regular string
            stringToReturn = GlobalStrings[stringName];
        }

    }
    else {
        // Could not find string
        stringToReturn = "N/A";
    }

    return stringToReturn;
}



function UnDecodeHTMLCharacters(strValueToDecode) {
    if (!strValueToDecode) {
        return "";
    }
    if (strValueToDecode.length == 0) {
        return "";
    }

    var objTA = document.createElement("textarea");

    strValueToDecode = strValueToDecode.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/&amp;#/gi, "&#");
    objTA.innerHTML = strValueToDecode;

    return objTA.value;
}

function parseAjaxResponse(sThisReqStatusCode, sThisReqResponseText) {
    var oResponse;
    try {
        oResponse = eval("(" + sThisReqResponseText + ")");
    }
    catch (exc) {
        var sTestText = sThisReqResponseText.toLowerCase();
        if (
			(sTestText.indexOf("form id=\"floginhidden\"") >= 0)
			||
			(sThisReqStatusCode == 0 && sTestText.length == 0)
			) {
            var reTwoSlash = new RegExp("//");
            var sLocation = window.location.toString();
            var i = sLocation.replace(reTwoSlash, "").indexOf("/") + 2;
            var sReturnUrl = sLocation.substr(i);
            window.location.replace("/Login/Login.aspx?ReturnUrl=" + encodeURIComponent(sReturnUrl));
            return (null);
        }
    }
    return (oResponse);
}

function toLowerCaseExceptFirstCharacter(strToFix) {
    if (typeof strToFix == 'string' && strToFix.length > 1) {
        if (strToFix.length == 1) {
            return strToFix.toUpperCase();
        }
        else {
            return strToFix.substring(0, 1).toUpperCase() + strToFix.substring(1, strToFix.length).toLowerCase();
        }
    }
    else {
        return strToFix;
    }
}


function imgTextMouseOver(strBaseID) {
    var imgName = '#img' + strBaseID;
    var src = $(imgName).attr("src").replace("_UP.gif", "_OVR.gif");
    $(imgName).attr("src", src);

    var txtName = '#txt' + strBaseID;
    $(txtName).css("text-decoration", "underline");

}

function imgTextMouseOut(strBaseID) {
    var sName = '#img' + strBaseID;
    var src = $(sName).attr("src").replace("_OVR.gif", "_UP.gif");
    $(sName).attr("src", src);

    var txtName = '#txt' + strBaseID;
    $(txtName).css("text-decoration", "none");
}

function replaceAll(txt, replace, with_this) {
    return txt.replace(new RegExp(replace, 'g'), with_this);
}

String.prototype.ReplaceAll = function (stringToFind, stringToReplace) {
    var temp = this;
    var index = temp.indexOf(stringToFind);
    while (index != -1 && stringToFind.length > 0) {
        temp = temp.substring(0, index) + temp.substring(index).replace(stringToFind, stringToReplace);
        index = temp.indexOf(stringToFind, index + stringToReplace.length);
    }
    return temp;
};


function js_resolveURL(path) {
    return path.replace("~/", glb_ResolveUrlJs_Base);
}

function getURLParameter(name) {
    var oneParam = new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)', 'gi');

    return decodeURIComponent((oneParam.exec(location.search) || [, ""])[1].replace(/\+/g, '%20')) || null;
}



//WAS ON GWTR -- 

function openDialog(title, innerHTML, isModal, width) {

    msgDialog = document.createElement("div");
    msgDialog.id = "messageDialog";
    msgDialog.setAttribute("title", title);
    msgDialog.innerHTML = innerHTML;
    document.body.appendChild(msgDialog);
    var jqObj = $(msgDialog)

    jqObj.css("width", "440px");
    var widthOfJqObj = jqObj.width();
    var heightOfJqObj = jqObj.height();

    // Check if dialog will scroll horizontally
    if (msgDialog.scrollWidth > widthOfJqObj) {
        // Try make the dialog scoll horizontally as little as possible while keeping it smaller than the outer window size
        var newWidth = Math.min($(window).width() - 100, msgDialog.scrollWidth + 10);
        jqObj.css("width", newWidth.toString() + "px");
        widthOfJqObj = newWidth;
    }

    var initialDialogOption = {
        width: widthOfJqObj + 20,
        resizable: true,
        modal: false
    };

    if (!Globals.Utilities.isUndefinedOrNull(isModal)) {
        initialDialogOption.modal = isModal;
    }

    if (!Globals.Utilities.isUndefinedOrNull(width)) {
        initialDialogOption.width = width;
    }

    jqObj.dialog(initialDialogOption);
    if (jqObj.parent().height() + 10 > $(window).height()) {
        jqObj.dialog("option", "height", $(window).height() - 10);
        jqObj.height($(window).height() - 80);
    }
    return jqObj
}

function closeDialog() {
    $("#messageDialog").dialog('close');
    $("#messageDialog").dialog('destroy').remove();
}





function openYesNo(title, innerHTML, onYes, onNo) {
    msgDialog = document.createElement("div");
    msgDialog.style.fontSize = "0.7em";
    msgDialog.style.paddingLeft = "0.5em";
    msgDialog.setAttribute("title", title);
    msgDialog.innerHTML = innerHTML;
    document.body.appendChild(msgDialog);
    $(msgDialog).width(440);
    while ($(window).height() < $(msgDialog).height() + 100 && $(msgDialog).width() * 1.5 < $(window).width()) {
        $(msgDialog).width($(msgDialog).width() * 1.5);
    }

    $(msgDialog).dialog({ width: $(msgDialog).width() + 20, height: $(msgDialog).height() + 160, resizable: true, buttons: { No: onNo, Yes: onYes } });

    if ($(msgDialog).parent().height() + 10 > $(window).height()) {
        $(msgDialog).dialog("option", "height", $(window).height() - 10);
        $(msgDialog).height($(window).height() - 80);
    }

}





/// This is a generic function that gets called at Logout
///

function LogoutBodyOnload() {
    StopSessionTrackerTimer();
    //put this deletion operation on a try catch (do nothing) in case jQuery cookie plugin changes its specs.
    try {
        Globals.Cookies.deleteCookie("lastViewedMenuTab");
    }
    catch (e1) {

    }
    loadPage('/Login/Logout.aspx');
}
;
/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// START OF GLOBAL UTILITIES FUNCTIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

// Register "Globals" in JS as a valid object.
if (typeof (Globals) === "undefined" || Globals === null) {
    Globals = {};
}

// From HJo:
// Adding this defintion declaration here.Most of our TLS enforcement is done such that old IE should not be getting through as such this flag
// is now pointless
//if (typeof $.browser.msie === "undefined" || $.browser.msie === null) {
//    $.browser.msie = false;
//}

Globals.Utilities = {

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.Utilities.consoleLog
	// Desc: Logs the specified object to the colsole. This function first ensures that the colsole object is not null/undefined before attempting to log.
	// Inputs: objectToLog - What to log to console. Can be any object.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    consoleLog: function (objectToLog) {
        if (typeof console == "object") {
            console.log(objectToLog);
        }
    },

    /////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name: Globals.Utilities.stripHTMLTags
    // Desc: This function is used to strip unecessary HTML tags. It can be a blunt instrument by actually stripping ALL HTML tags or
    //       it can be a precission tool if you specify a tag to remove. This checks if the htmlToStrip is a string or not. If it is not a string just return htmlToStrip as is.
    // Inputs:  htmlToStrip - string parameter which is a string to strip. 
    //          (optional) specificTagToStrip - specify which tag to nuke from the string.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    stripHTMLTags: function (htmlToStrip) {
        var specificTagToStrip = "";
        var strReturn;
        if (typeof htmlToStrip == "string") {
            if (arguments.length == 2 && typeof arguments[1] == "string") {
                specificTagToStrip = arguments[1];
            }
            if (specificTagToStrip.length === 0) {
                strReturn = htmlToStrip.replace(new RegExp("<[^>]+>", "gi"), "");
            }
            else {
                // remove tag without attributes and close tag (e.g., <span>, </span>)
                strReturn = htmlToStrip.replace(new RegExp("<[/]{0,1}" + specificTagToStrip + ">", "gi"), "");
                // remove tag with attributes (note the space after the tag name)
                strReturn = htmlToStrip.replace(new RegExp("<" + specificTagToStrip + " [^>]*>", "gi"), "");
            }
        }
        else {
            strReturn = htmlToStrip;
        }
        return strReturn;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.trimString
	// Desc:    Trims the string.
	// Inputs:  StringToTrim - string that needs trimming.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    trimString: function (StringToTrim) {
        //this is to capture all the false-y values.
        if (typeof (StringToTrim) === "undefined" || StringToTrim === null) {
            return StringToTrim;
        }
        else {
            return StringToTrim.replace(/^\s+|\s+$/g, "");
        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.getCurrentSiteLanguage
	// Desc:    Tries to figure out what language the current site is in.    
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getCurrentSiteLanguage: function () {
        var languageType;
        var abbr = GetString("CurrentLanguageAbbr");

        switch (abbr) {
            case "en":
                languageType = Globals.LanguageType.en;
                break;
            case "fr":
                languageType = Globals.LanguageType.fr;
                break;
            default:
                languageType = Globals.LanguageType.Unspecified;
                break;
        }

        return languageType;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.isUserAuthenticated
    // Desc:    This will test if the current user is authenticated or unauthenticated.
    // Returns: boolean true if the user is authenticated.
    //          boolean false if the user is authenticated.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    isUserAuthenticated: function () {
        const currentUser = document.kNextUser;
        return currentUser.userGUID.length > 0;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.isUndefinedOrNull
	// Desc:    This will test if a variable is null or undefined.
	//			Warning!  This works if the variable exists but was assigned an undefined value.
	//			It does not work if the variable doesn't exist. Consider using isVariableNameDefinedAndNonNull
	// Input:   testObj -- The variable that needs to test.
	// Returns: boolean true if the variable is null or undefined
	//          boolean false otherwise.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    isUndefinedOrNull: function (testObj) {
        var returnValue = false;
        if (typeof (testObj) === "undefined" || testObj === null) {
            returnValue = true;
        }
        return returnValue;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.isGlobalVariableNameDefinedAndNonNull
	// Desc:    This method will test to see if a global variable exists within JS and it is not null.
    //          This does not use EVAL function call.
	// Input:   variableName -- The global variable name that we need to test.
	// Returns: boolean true if the Global variable is null or undefined
	//          boolean false otherwise.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    isGlobalVariableNameDefinedAndNonNull: function (variableName) {
        var returnValue = false;
        try {
            var globalVariable = document[variableName];
            if (globalVariable !== null) {
                returnValue = true;
            }
        }
        catch (e1) {
            returnValue = false;
        }
        return returnValue;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.isFunctionDefined
	// Desc:    This will test if a function has already been defined.
	// Input:   functionName -- The function that needs to be verified
	// Returns: boolean true if the function has already been defined.
	//          boolean false otherwise.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    isFunctionDefined: function (functionName) {
        return typeof functionName == 'function' && functionName !== 'undefined';
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.isNullOrWhitespace
	// Desc:    This will test if a variable is null or undefined. 
	// Input:   testObj -- The variable that needs to test.
	// Returns: boolean true if the variable is null or undefined
	//          boolean false otherwise.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    isNullOrWhitespace: function (testObj) {
        var returnValue = false;

        returnValue = (Globals.Utilities.isUndefinedOrNull(testObj) || testObj.replace(/\s/g, '').length === 0);

        return returnValue;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.isArray
    // Desc:    This will test if a variable is null or undefined first and then it will figure out if it is an
    //          Array or not. This code is tested on FF, IE9 + and Chrome and it works.
    // Input:   testObj -- The variable that needs to test.
    // Returns: boolean true if the variable is a valid array.
    //          boolean false otherwise.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    isArray: function (testObj) {
        var returnValue = false;
        if (Globals.Utilities.isUndefinedOrNull(testObj)) {
            returnValue = false;
        }
        else if (Object.prototype.toString.call(testObj) === "[object Array]") {
            returnValue = true;
        }
        return returnValue;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.recordTime
	// Desc:    This method is used to start the time recording and returns the string.
	// Returns: Returns the time in hh:mm:ss.mmm
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    recordTime: function () {
        var time = new Date();
        var returnTime = time.getHours().toString() + ":" + time.getMinutes().toString() + ":" + time.getSeconds().toString() + "." + time.getMilliseconds().toString();
        return returnTime;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.populateDropdownFromJsonDictionary
	// Desc:    This method is used to populate a select box (dropdown list) with the contents of a dictionary in json format
	// Input:   dropdown = the DOM object
	//			dictionary = the JSON object of a .net dictionary as returned by Globals.Ajax.postRequest
	// Returns: Returns nothing
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    populateDropdownFromJsonDictionary: function (dropdown, dictionary, doIncludeBlankOption, selectedValue) {
        while (dropdown.options.length > 0) {
            dropdown.options[0] = null;
        }

        if (Globals.Utilities.isUndefinedOrNull(dictionary) || dictionary.length === 0) {
            return;
        }

        var incrementForBlank = 0;
        if (doIncludeBlankOption) {
            dropdown[0] = new Option();
            dropdown[0].value = 0;
            dropdown[0].text = "";
            incrementForBlank = 1;
        }

        if (typeof selectedValue == "undefined") {
            selectedValue = "";
        }
        else if (typeof selectedValue != "string") {
            selectedValue = selectedValue.toString();
        }
        for (var i = 0; i < dictionary.length; i++) {
            dropdown[i + incrementForBlank] = new Option();
            dropdown[i + incrementForBlank].value = dictionary[i].Key;
            dropdown[i + incrementForBlank].text = dictionary[i].Value;
            if (dictionary[i].Key == selectedValue) {
                dropdown[i + incrementForBlank].selected = true;
            }
        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.getObjectHeightWithPadding
	// Desc:    This method is used to find the height of an object including padding (unlike jquery's .height() which does not include padding)
	// Input:   obj = the jQuery object
	// Returns: the height of the object including padding
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getObjectHeightWithPadding: function (obj) {
        if (Globals.Utilities.isUndefinedOrNull(obj) || obj.length === 0) {
            return 0;
        }
        var h = obj.height();

        h += parseInt(obj.css("padding-top").replace(/px/g, ""));
        h += parseInt(obj.css("padding-bottom").replace(/px/g, ""));

        return h;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.getObjectWidthWithPadding
	// Desc:    This method is used to find the width of an object including padding (unlike jquery's .width() which does not include padding)
	// Input:   obj = the jQuery object
	// Returns: the width of the object including padding
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getObjectWidthWithPadding: function (obj) {
        if (Globals.Utilities.isUndefinedOrNull(obj) || obj.length === 0) {
            return 0;
        }
        var w = obj.width();

        w += parseInt(obj.css("padding-left").replace(/px/g, ""));
        w += parseInt(obj.css("padding-right").replace(/px/g, ""));

        return w;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.makeTextInputHavePlaceholderText
	// Desc:    This method makes an input type="text" have placeholder text that disappears on focus, and reappears on blur, if the field is still empty
	// Input:   inputTextQueryObject = the jQuery object of the text box
	//			placeholderText = the text to use when the text box is blank
	// Returns: nothing
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    makeTextInputHavePlaceholderText: function (inputTextQueryObject, placeholderText) {
        if (inputTextQueryObject.val().toString() === "") {
            inputTextQueryObject.val(placeholderText);
        }

        inputTextQueryObject.on("focus", function () {
            if ($(this).val() == placeholderText) {
                $(this).val("");
            }
        });

        inputTextQueryObject.on("blur", function () {
            if ($(this).val().toString() === "") {
                $(this).val(placeholderText);
            }
        });
    },

    // create a in-memory div, set it's inner text(which jQuery automatically encodes)
    // then grab the encoded contents back out.  The div never exists on the page.
    htmlEncode: function (value) {
        return $("<div/>").text(value).html();
    },

    htmlDecode: function (value) {
        return $("<div/>").html(value).text();
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.isObjectAJQueryObject
	// Desc:    This method is used to determine if the objToTest parameter is a jQuery object or not. 
	//          This test is done over a try catch such that if something goes wrong then it is not a jQuery object.
	// Input:   objToTest = the dom object that we would like to check if it is a valid jQuery object.
	// Returns: True if it is a jQuery object otherwise false.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    isObjectAJQueryObject: function (objToTest) {
        var isItAJQueryObj = false;
        try {
            isItAJQueryObj = (objToTest instanceof $);
        }
        catch (e2) {
            isItAJQueryObj = false;
        }
        return isItAJQueryObj;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.isHighContrastMode
    // Desc:    This method is used to determine if the Windows High Contrast mode is enabled.
    // Returns: True if high contrast mode is enabled.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    isHighContrastMode: function () {
        return matchMedia('(forced-colors: active)').matches;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.isDarkMode
    // Desc:    This method is used to determine if the interface has a dark theme.
    // Returns: True if the theme is dark.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    isDarkMode: function () {
        return matchMedia('(prefers-color-scheme: dark)').matches;
    },
   
    // Globals.Utilities.isIE9OrLess
    isIE9OrLess: function () {

        //return ($.browser.msie && parseInt($.browser.version, 10) <= 9);

        //@ CHANGE FOR JQUERY 3.6

        var browser = Globals.Utilities.getBrowser();

        var isIE = browser.browser == "ie" || browser.browser == "msie";
        var is9OrLess = parseInt(browser.version, 10) <= 9;

        return (Globals.Utilities.isIE() && is9OrLess);


    },
    browserVersion: function () {
        var browser = Globals.Utilities.getBrowser();
        var version = browser.version;

        return version;
    },
    isIE: function () {
        var browser = Globals.Utilities.getBrowser();
        var isIE = browser.browser == "ie" || browser.browser == "msie";

        return isIE; 
    },

    /*
	Name:		Globals.Utilities.getBaseObject
	Desc:		This method returns the base object for an inherited object. For example, if you want to extend a method, but still call the original, you could
	override the method as usual (i.e., simply redefine the method in the inherited class), and then call the original method in the base class with
	Globals.Utilities.getBaseObject(this).<method>(<params>);
	Input:		The inherited object.
	Returns:	The base object.
	*/
    getBaseObject: function (inheritedObject) {
        return Object.getPrototypeOf(inheritedObject);
        // deprecated -- return inheritedObject.__proto__;
    },

    /*
    //Name:		Globals.Utilities.getBrowser()
    //Desc:		This method will return an object denoting a browser version and type. This method is created to
    //          make sure we don't rely on jQuery so much since they tend to deprecate a lot of things.   
    //Returns:	An object with the browser, version and enumerable type.
    */
    getBrowser: function () {
        var returnObject = {
            "browser": "",
            "version": "",
            "enumerable": ""
        };
        var ua = navigator.userAgent;
        var tem;
        var M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];

        if (/trident/i.test(M[1])) {
            tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
            returnObject.browser = "ie";
            returnObject.version = parseInt(tem[1], 10);
            returnObject.enumerable = returnObject.browser.toLowerCase() + returnObject.version;
            return returnObject;
        }
        if (M[1] === 'Chrome') {
            tem = ua.match(/\bOPR\/(\d+)/);
            if (tem != null) {
                returnObject.browser = "opera";
                returnObject.version = parseInt(tem[1], 10);
                returnObject.enumerable = returnObject.browser.toLowerCase() + returnObject.version;
                return returnObject;
            }
        }
        M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];
        if ((tem = ua.match(/version\/(\d+)/i)) != null) {
            M.splice(1, 1, tem[1]);
        }
        returnObject.browser = M[0].toLowerCase();
        returnObject.version = parseInt(M[1], 10);
        returnObject.enumerable = returnObject.browser.toLowerCase() + returnObject.version;
        return returnObject;
    },

    /*
	Name:		Globals.Utilities.getCurrentWebSiteRoot
	Desc:		This will return the current website based on the protocol and hostname.
	Returns:	The URL as http(s)://blah.net
	*/
    getCurrentWebSiteRoot: function () {
        //return $(location).attr("protocol") + "//" + $(location).attr("hostname");
        var websiteRoot = "";
        if ("protocol" in window.location && "hostname" in window.location) {
            websiteRoot = window.location.protocol + "//" + window.location.hostname;
        }
        return websiteRoot;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.padWithACharacter
    // Desc:    This method will prepend and pad a string with a character requested.
    // Input:   StringToPad -- The string that needs padding.
    //          Size -- The full length of the padded string.
    //          CharacterToPad -- The character you have to pad it with.
    // Returns: A padded string
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    padWithACharacter: function (StringToPad, Size, CharacterToPad) {
        var s = StringToPad.toString();
        var pad = "", numberOfRepeats = Size - s.length;
        if (numberOfRepeats > 0) {
            for (var i = 0; i < numberOfRepeats; i++) {
                pad += CharacterToPad;
            }
            s = pad + s;
        }
        return s;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.padANumberWithZeros
    // Desc:    This method will prepend and pad 0 to a number given such that it looks like 0005
    // Input:   NumberToPad-- The number that needs padding
    //          Size -- The full length of the padded string.    
    // Returns: A padded number
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    padANumberWithZeros: function (NumberToPad, Size) {
        return Globals.Utilities.padWithACharacter(NumberToPad, Size, '0');
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.getSelectedText
    // Desc:    Cross-browser method for getting text the user has selected
    // Input:   none
    // Returns: the selected text
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getSelectedText: function () {
        var selectedText = "";
        if (window.getSelection) {
            selectedText += window.getSelection();
        }
        else if (document.getSelection) {
            selectedText += document.getSelection();
        }
        else if (document.selection && document.selection.type != "Control") {
            selectedText += document.selection.createRange().text;
        }
        return selectedText.toString();
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.getSelectedHtml
	// Desc:    Cross-browser method for getting html the user has selected
	// Input:   none
	// Returns: the selected html
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getSelectedHtml: function () {
        var text = "";
        if (window.getSelection) {
            var sel = window.getSelection();
            if (sel.rangeCount > 0) {
                var documentFragment = sel.getRangeAt(0).cloneContents();
                return $("<div>").append(documentFragment).html();
            }
        }
        else if (document.selection && document.selection.type == "Text") {
            return document.selection.createRange().htmlText;
        }

        return "";
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.createNewObject
    // Desc:    This method create a new object based on the object that it is being passed. This method essentially
    //          helps create an object based on a template object.
    // Input:   ObjectToCreate -- This is the object template that it needs to replicate.    
    // Returns: A new object
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    createNewObject: function (ObjectToCreate) {
        var newObject = {};
        for (var key in ObjectToCreate) {
            newObject[key] = ObjectToCreate[key];
        }
        return newObject;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.emptyElement
    // Desc:    This method will remove/destroy any children inside the DOM node. This is faster than the jQuery
    //          remove.
    // Input:   ElementObjectID -- The ID name of the element you are trying to nuke.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    emptyElement: function (ElementObjectID) {
        var element = document.getElementById(ElementObjectID);
        while (element.lastChild) {
            element.removeChild(element.lastChild);
        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.getMeContext
	// Desc:	This method will return the document.DocumentObject instance "anchor". This method is a convience
	//		  method so the code is normalized/simplified.
	// Input:   DocumentObject = The object name that was declared inside the Document object.
	// Returns: The object or null if the object does not exists.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getMeContext: function (DocumentObject) {
        var returnValue = document[DocumentObject];
        if (Globals.Utilities.isUndefinedOrNull(returnValue) || typeof returnValue !== "object") {
            returnValue = null;
        }

        return returnValue;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.reverseString
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    reverseString: function (s) {
        for (var i = s.length - 1, o = ''; i >= 0; o += s[i--]) { }
        return o;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.hasKey
	// Desc:	This method tests if a Key exists within the HashMap object. The method implemented is the best
	//		  between performance and readability.
	// Input:   HashMap -- The HashMap object that needs to be tested.
	//		  Key -- The key of the HashMap or object property that needs to be tested.
	// Returns: Returns true if the type of the key is not "undefined" otherwise false.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    hasKey: function (HashMap, Key) {
        var returnValue = false;
        if (typeof HashMap[Key] !== "undefined") {
            returnValue = true;
        }
        return returnValue;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.hashMapGetValueSafe
	// Desc:	This method tests if a Key exists within the HashMap object. Then gets the value of the HashMap
	// Input:   HashMap -- The HashMap object that needs to be tested.
	//		  Key -- The key of the HashMap or object property that needs to be tested.
	// Returns: Returns the value of the key if it is not "undefined" otherwise an empty string.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    hashMapGetValueSafe: function (HashMap, Key) {
        var returnValue;
        if (Globals.Utilities.hasKey(HashMap, Key)) {
            returnValue = HashMap[Key];
        }
        else {
            returnValue = "";
        }
        return returnValue;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.arrayToHashMap
	// Desc:	This method converts an array into a HashMap by iterating the array and making the values in 
	//			the Array as a key of the HashMap. As for the value pair of this relation only a single, Value
	//			can be assigned.
	// Input:   ArrayToConvert -- The array to convert as a HashMap
	//		  ValueOnKey -- The value assigned to each key.
	// Returns: A hashmap where the keys are all the values of the Array.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    arrayToHashMap: function (ArrayToConvert, ValueOnKey) {
        if (!Globals.Utilities.isArray(ArrayToConvert)) {
            return null;
        }

        var arrayLength = ArrayToConvert.length;
        var returnObject = {};
        for (var i = 0; i < arrayLength; i++) {
            returnObject[ArrayToConvert[i]] = ValueOnKey;
        }

        return returnObject;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.reverseArray
	// Desc:	This method reverse an array. At this point, this is the fastest way of doing it according to 
    //          JSPERF.com https://jsperf.com/js-array-reverse-vs-while-loop/5. This method effectively
    //          swaps the most right and left item in the array's possition and just works its way to the middle 
    //          of the array. Once the left index is greater than the right index then that means that the array
    //          was comletely reversed.
	// Input:   ArrayToReverse -- The array to reverse
	// Returns: the passed array in a reversed order.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    reverseArray: function (ArrayToReverse) {
        if (!Globals.Utilities.isArray(ArrayToReverse) || Globals.Utilities.isUndefinedOrNull(ArrayToReverse)) {
            return null;
        }

        var arrayLength = ArrayToReverse.length - 1;

        var left = null;
        var right = null;
        for (left = 0, right = arrayLength; left < right; left += 1, right -= 1) {
            var temporary = ArrayToReverse[left];
            ArrayToReverse[left] = ArrayToReverse[right];
            ArrayToReverse[right] = temporary;
        }

        return ArrayToReverse;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.cumulativeOffsetCalculatorForIE
	//
	// Desc:	This method does something special. It actually calculates where the record you are trying to 
	//			load up and then it scrolls to that location. This is done by traversing to the parent of the element
	//			given to check. It does this until it reaches to the top of the DOM hierarchy in IE.
	//			DO NOT use this in anything outside of IE since in Chrome DOM offsets are weird.
	//
	//Inputs:	ElementID -- The ID name of the element that we are trying to calculate the offset of.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    cumulativeOffsetCalculatorForIE: function (ElementID) {
        var element = document.getElementById(ElementID);
        var returnObject = {
            top: 0,
            left: 0
        };

        if (Globals.Utilities.isUndefinedOrNull(element)) {
            return returnObject;
        }

        do {
            if (Globals.Utilities.isUndefinedOrNull(element.offsetTop) || Globals.Utilities.isUndefinedOrNull(element.offsetLeft)) {
                break;
            }
            returnObject.top += element.offsetTop || 0;
            returnObject.left += element.offsetLeft || 0;
            element = element.offsetParent;
        } while (element);

        return returnObject;
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.inArray
	//
	// Desc:    This function will search for specified values within an array and return true if found or false
    //          if not found) 
	//
	// AKA:		arrayContains
	//
	//Inputs:	ArrayToTest -- The array to test.
    //          ValueToTest -- The sorted array.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    inArray: function (ArrayToTest, ValueToTest) {
        if (ArrayToTest == null) {
            return false;
        }

        if (!Array.prototype.indexOf) {
            var lengthOfArray = ArrayToTest.length;
            try {
                if (lengthOfArray <= 0) {
                    return false;
                }
                for (var i = 0; i < lengthOfArray; i++) {
                    if (ArrayToTest[i] == ValueToTest) {
                        return true;
                    }
                }
            }
            catch (e) {
                return false;
            }
            return false;
        }
        else {
            return (ArrayToTest.indexOf(ValueToTest) >= 0);
        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.safeArrayIndexOf
	//
	// Desc:    This function will search for specified values within an array and return the first index.
	//			Uses .indexOf if supported, does it manually if not
	//
	//Inputs:	ArrayToTest -- The array to test.
    //          ValueToTest -- The sorted array.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    safeArrayIndexOf: function (ArrayToTest, ValueToTest) {
        if (!Array.prototype.indexOf) {
            var lengthOfArray = ArrayToTest.length;
            try {
                if (lengthOfArray <= 0) {
                    return -1;
                }
                for (var i = 0; i < lengthOfArray; i++) {
                    if (ArrayToTest[i] == ValueToTest) {
                        return i;
                    }
                }
            }
            catch (e) {
                return -1;
            }
            return -1;
        }
        else {
            return (ArrayToTest.indexOf(ValueToTest));
        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.filterSortedArray
	//
	// Desc:	This method compares two arrays and return a  new array containing the values present in both while
    //          keeping the sort order of the first passed array.
	//
	//Inputs:	SortedArray -- The sorted array.
    //          FilterArrayValues -- The Array to compare to.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    filterSortedArray: function (SortedArray, FilterArrayValues) {
        var returnValue = [];
        if (FilterArrayValues.length === 0) {
            returnValue = SortedArray;
        }
        else {
            var lengthOfSortedArray = SortedArray.length;
            var lengthOfFilterArrayValues = FilterArrayValues.length;
            for (var i = 0; i < lengthOfSortedArray; i++) {
                var valueToEval = SortedArray[i];
                if (Globals.Utilities.inArray(FilterArrayValues, valueToEval)) {
                    returnValue[returnValue.length] = valueToEval;
                }
            }
        }
        return returnValue;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.escapeURLXSS
	//
	// Desc:	This method compares two arrays and return a  new array containing the values present in both while
    //          keeping the sort order of the first passed array.
	//
	//Inputs:	SortedArray -- The sorted array.
    //          FilterArrayValues -- The Array to compare to.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    escapeURLXSS: function (Link) {
        if (!Globals.Utilities.isNullOrWhitespace(Link)) {
            return Link.replace(/-/g, "&#45;");

        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.arrayPush
	//
	// Desc:	This method compares does an equivalent .push call but optmized for performance.
	//          So I can find it when I search: quickPush, fastPush ... Matt S.
	//
	//Inputs:	ArrayObj -- The array object to add the content to.
	//          ValueToPush -- The value to push to the array.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    arrayPush: function (ArrayObj, ValueToPush) {
        if (!Globals.Utilities.isUndefinedOrNull(ArrayObj) && !Globals.Utilities.isUndefinedOrNull(ValueToPush)) {
            if (ArrayObj.constructor === Array) {
                ArrayObj[ArrayObj.length] = ValueToPush;
            }
            else {
                try {
                    ArrayObj.push(ValueToPush);
                }
                catch (pushError) {
                }
            }
        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.arrayRemoveValue
	//
	// Desc:	Removes all instances of a given value from an array
	//
	//Inputs:	ArrayObj -- The array object to remove the value from
	//          ValueToRemove
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    arrayRemoveValue: function (ArrayObj, ValueToRemove) {
        if (!Globals.Utilities.isUndefinedOrNull(ArrayObj) && !Globals.Utilities.isUndefinedOrNull(ValueToRemove)) {
            var newArray = [];
            for (var i = 0; i < ArrayObj.length; i++) {
                if (ArrayObj[i] != ValueToRemove) {
                    Globals.Utilities.arrayPush(newArray, ArrayObj[i]);
                }
            }

            return newArray;
        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.splitArrayIntoSmallerArrays
	//
	// Desc:	This method will split a bigger array into smaller arrays
	//
	//Inputs:	ArrayToSplit -- The array to be split.
	//          ArraySplitSize -- The length of th smaller arrays.
    //Returns:  An array containing smaller arrays.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    splitArrayIntoSmallerArrays: function (ArrayToSplit, ArraySplitSize) {
        if (!Globals.Utilities.isUndefinedOrNull(ArrayToSplit) && !Globals.Utilities.isUndefinedOrNull(ArraySplitSize)) {
            if (Globals.Utilities.isUndefinedOrNull(ArraySplitSize)) {
                ArraySplitSize = 10;
            }

            var groups = [], i;
            for (i = 0; i < ArrayToSplit.length; i += ArraySplitSize) {
                groups[groups.length] = ArrayToSplit.slice(i, i + ArraySplitSize);
            }
            return groups;
        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.objectHasProperty
	//
	// Desc:	This method will safely test if an object has property. 
	//
	//Inputs:	ObjectToTest -- The array object to add the content to.
	//          PropertyName -- The value to push to the array.
	//Returns:  true - if it does have a property.
	//			false - if it does not have it or a bunch of try catches fails.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    objectHasProperty: function (ObjectToTest, PropertyName) {
        var returnValue = false;

        if (Globals.Utilities.isUndefinedOrNull(ObjectToTest) ||
            Globals.Utilities.isUndefinedOrNull(PropertyName) ||
            Globals.Utilities.isNullOrWhitespace(PropertyName)) {
            returnValue = false;
        }
        //this is an array so no such thing as properties
        else if (ObjectToTest.constructor == Array) {
            returnValue = false;
        }
        else {
            try {
                if (PropertyName in ObjectToTest) {
                    returnValue = true;
                }
            }
            catch (e1) {
                try {
                    if (ObjectToTest.hasOwnProperty(PropertyName)) {
                        returnValue = true;
                    }
                }
                catch (e2) {
                    returnValue = false;
                }
            }
        }
        return returnValue;
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Utilities.selectText
	//
	// Desc:	This method will select the text and uses and tests the newer methods of selecting test as well.
	//
	//Inputs:	ObjectIDToSelect -- The array object to add the content to.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    selectText: function (ObjectIDToSelect) {
        var docObjToSelect = document.getElementById(ObjectIDToSelect);
        var range, selection;
        if (!Globals.Utilities.isUndefinedOrNull(docObjToSelect)) {
            if (document.body.createTextRange) {
                range = document.body.createTextRange();
                range.moveToElementText(docObjToSelect);
                range.select();
            }
            else if (window.getSelection) {
                selection = window.getSelection();
                range = document.createRange();
                range.selectNodeContents(docObjToSelect);
                selection.removeAllRanges();
                selection.addRange(range);
            }
        }
    },


    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.getObjectKeysAsArray
	//
	// Desc:	This method method returns an array of the keys present in the passed object. 
	//
	//Inputs:	ObjectToTest -- The object that contains the key(s).
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getObjectKeysAsArray: function (ObjectToTest) {

        var keys = [];

        // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
        if (!Object.keys) {
            var hasOwnProperty = Object.prototype.hasOwnProperty,
                hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),
                dontEnums = [
                    'toString',
                    'toLocaleString',
                    'valueOf',
                    'hasOwnProperty',
                    'isPrototypeOf',
                    'propertyIsEnumerable',
                    'constructor'
                ],
                dontEnumsLength = dontEnums.length;


            if (typeof ObjectToTest !== 'object' && (typeof ObjectToTest !== 'function' || ObjectToTest === null)) {
                throw new TypeError('Object.keys called on non-object');
            }

            var result = [];
            var prop;
            var i;

            for (prop in ObjectToTest) {
                if (hasOwnProperty.call(ObjectToTest, prop)) {
                    Globals.Utilities.arrayPush(result, prop);
                }
            }

            if (hasDontEnumBug) {
                for (i = 0; i < dontEnumsLength; i++) {
                    if (hasOwnProperty.call(ObjectToTest, dontEnums[i])) {
                        Globals.Utilities.arrayPush(result, dontEnums[i]);
                    }
                }
            }
            keys = result;
        }
        //Works for all browsers without the else branch but not sure what the performance is so i am adding the else branch
        else {
            keys = Object.keys(ObjectToTest);
        }

        return keys;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.getURLProtocolAndHost
	//
	// Desc:	This method method returns the begining of the URL (e.g., https://www.knotia.ca)
	//
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getURLProtocolAndHost: function () {
        var rawLocationSearchString = window.location.toString().toLowerCase();
        var params = rawLocationSearchString.split("/");
        return params[0] + "//" + params[2];
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Utilities.getURLQueryParameter
	//
	// Desc:	This method method returns the value of the specified query parameter string of the current url. Returns false, if the parameter doesn't exists.
	//
	//Inputs:	TheParameter -- The parameter whose value needs to be extracted out.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getURLQueryParameter: function (TheParameter) {
        var rawLocationSearchString = window.location.search.substr(1);
        //this is to cover the ColdFusion Pages that for some reason it is encoding the &urlRetried to escaped version of the "&"
        if (rawLocationSearchString.indexOf("&") < 0 && rawLocationSearchString.toLowerCase().indexOf("%26urlretried") > 0) {
            rawLocationSearchString = unescape(rawLocationSearchString);
        }

        var params = rawLocationSearchString.split('&');
        var paramsLength = params.length;

        for (var i = 0; i < paramsLength; i++) {
            var p = params[i].split('=');
            if (p[0].toLowerCase() === TheParameter.toLowerCase()) {
                return decodeURIComponent(p[1]);
            }
        }

        return "";
    },

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.initializeTimeZoneHelper
	// Desc:			getLocalTimeForServerTime depends on this method to be run at page load
	// Dependencies:	glb_ServerTime must be defined and in the form H:m
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    initializeTimeZoneHelper: function () {
        if (window["glb_ServerTime"]) {
            var hour = parseInt(glb_ServerTime.split(':')[0]);
            var minute = parseInt(glb_ServerTime.split(':')[1]);
            var serverMinutes = hour * 60 + minute;

            var localTime = new Date();
            hour = localTime.getHours();
            minute = localTime.getMinutes();
            var localMinutes = hour * 60 + minute;

            this.differenceBetweenServerAndLocalTime = serverMinutes - localMinutes;
        }
        else {
            this.differenceBetweenServerAndLocalTime = null;
        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.getLocalTimeForServerTime
	// Desc:			returns the number of minutes difference between the local time and server time
	// Dependencies:	Globals.Utilities.initializeTimeZoneHelper must have been called at page load; glb_ServerTime must be defined
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getLocalTimeForServerTime: function (serverTime, doReturnAsString) {
        if (!this.differenceBetweenServerAndLocalTime == null) {
            serverTime.setMinutes(serverTime.getMinutes() + this.differenceBetweenServerAndLocalTime);
        }

        if (doReturnAsString) {
            var minute = "0" + serverTime.getMinutes().toString();
            minute = ":" + minute.substr(minute.length - 2);

            var hour = serverTime.getHours();
            if (hour == 0) {
                return "12" + minute + "am";
            }
            else if (hour < 12) {
                return hour.toString() + minute + "am";
            }
            else if (hour == 12) {
                return "12" + minute + "pm";
            }
            else {
                return (hour - 12).toString() + minute + "pm";
            }
        }
        else {
            return serverTime;
        }
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.disableCutCopyAndPaste
	// Desc:			This method will disable cut copy and paste as well as disabling the text selection
	//                  You can pass the ID of the dom element where you would like to disable the cut copy and paste
    //                   but if you don't this will assume that  you want to disable it for the whole page
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    disableCutCopyAndPaste: function (Selector) {
        //Disable whole page
        var selector;

        if (!Globals.Utilities.isUndefinedOrNull(Selector)) {
            //Disable part of page
            selector = $("#" + Selector);
        }
        else {
            selector = $("body");
        }

        selector.bind('cut copy paste', function (e) {
            e.preventDefault();
        });

        Globals.Utilities.disableTextSelection(Selector);
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.disableMouseRightClick
	// Desc:			This method will disable the mouse right click
	//                  You can pass the ID of the dom element where you would like to disable the mouse right click
    //                  but if you don't this will assume that  you want to disable it for the whole page
    // Input:           Selector: The ID of the element where you want this to be executed
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    disableMouseRightClick: function (Selector) {
        //Disable whole page
        var selector;

        if (!Globals.Utilities.isUndefinedOrNull(Selector)) {
            //Disable part of page
            selector = $("#" + Selector);
        }
        else {
            selector = $("body");
        }

        selector.on("contextmenu", function (e) {
            return false;
        });
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.disableTextSelection
	// Desc:			This method will disable the text selection
	//                  You can pass the ID of the dom element where you would like to disable the text selection
    //                   but if you don't this will assume that  you want to disable it for the whole page
    // Input:           Selector: The ID of the element where you want this to be executed
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    disableTextSelection: function (Selector) {
        //Disable whole page
        var selector = $("body");

        if (!Globals.Utilities.isUndefinedOrNull(Selector)) {
            //Disable part of page
            selector = $("#" + Selector);
        }

        selector.attr("unselectable", "on")
            .css({
                "-moz-user-select": "-moz-none",
                "-moz-user-select": "none",
                "-o-user-select": "none",
                "-khtml-user-select": "none", /* you could also put this in a class */
                "-webkit-user-select": "none",/* and add the CSS class here instead */
                "-ms-user-select": "none",
                "user-select": "none"
            }).bind("selectstart", function () {
                return false;
            });
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.disableDeveloperMode
	// Desc:			This method will disable the developer mode
    //                  Here 123 is keyCode of f12 key which prevent from open Inspect Element screen in browser. 
    //                  On keyDown return false that does not open Inspect Element screen.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    disableDeveloperMode: function () {
        $(document).keydown(function (event) {
            if (event.keyCode == 123) {
                return false;
            }
            else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) {
                return false;  //Prevent from ctrl+shift+i
            }
        });
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.disablePrintPage
	// Desc:			This method will disable control + P
    //                  Here 80 is keyCode of P.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    disablePrintPage: function () {
        $(document).keydown(function (event) {
            event = event || window.event;//Get event
            if (event.ctrlKey) {
                if (event.keyCode == 80) {
                    event.preventDefault();
                    event.stopPropagation();
                }
            }
        });
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.isTouchCapable
	// Desc:			This test if the device is touch capable by seeing if the document object has ontouchstart.
	//					If for some reason this gives an error it defaults to false. Otherwise it will return true
	//					ontouchstart is a property of the document object false otherwise.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    isTouchCapable: function () {
        var returnValue = false;
        try {
            returnValue = 'ontouchstart' in document.documentElement;
        }
        catch (touchCapableE) {
            returnValue = false;
        }
        return returnValue;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.supportsModernHistoryAPI
	// Desc:			This test if the browser supports modern HTML5 compliant History APY events for the back
    //                  button functionality.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    supportsModernHistoryAPI: function () {
        //return !!(window.history && window.history.pushState);        
        return false; // HJ/RDR: Uncomment above live when the href="#" has been removed from all sections of Knotia (i.e. Search templates, topical index)
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.preventAccessToExternalLinks
	// Desc:			If the link is to an external resource, do not take the user to that link else behave as
    //                  as usual.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    preventAccessToExternalLinks: function () {
        $("*").click(function (e) {

            if (e.target.tagName.toLowerCase() === 'a') {

                var link = e.target.href.toLowerCase();

                var regExpLocalLink = new RegExp('/' + window.location.host.toLowerCase().trim() + '/');
                var regExpJsLink = new RegExp(/javascript:/);

                var containsDomain = regExpLocalLink.test(link);
                var containsJavascript = regExpJsLink.test(link);

                var isLocalLink = containsDomain || containsJavascript;

                if (!isLocalLink) {
                    e.preventDefault();
                    $(e.target).removeAttr("href").removeAttr("target");
                }
            }
        });
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.safeObjectAssign
	// Desc:			calls Object.assign if defined; otherwise, reproduces the functionality manually (I'm looking at you, stupid chimpanzees of redmond)
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    safeObjectAssign: function (target, source) {
        if (Object.assign == null) {
            var from;
            var to = target;
            var symbols;
            var argumentsLength = arguments.length;

            for (var s = 1; s < argumentsLength; s++) {
                from = Object(arguments[s]);
                for (var key in from) {
                    to[key] = from[key];
                }
            }

            return to;
        }
        else {
            return (Object.assign(target, source));
        }
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:			Globals.Utilities.createNewObjectFrom
    // Desc:			A Wrapper for deep-copying a PLAIN json object. 
    //                  NOTE: test performance on various different ways to do deep copy on jsperf on different browsers to find best one and replace it below
    //               
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    createNewObjectFrom: function (JSONObj) {
        return JSON.parse(JSON.stringify(JSONObj));
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:			Globals.Utilities.getObjectValuesAsArray
    // Desc:			Iterates an object returns an array created with the values of it.
    //                  NOTE: NOT TRANSPILED SO TEST IT AND CHECK IT OUT
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getObjectValuesAsArray : function (InputObject) {

        let array = [];

        for (var key in InputObject) {
            Globals.Utilities.arrayPush(array, InputObject[key]);
        }
        return array;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:			Globals.Utilities.generateGUID
	// Desc:			Generates a unique identifier
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    generateGUID: function () {
        var dt = ((new Date().getTime() * 10000) + 621355968000000000);
        var uuid = 'xxxyxxxx-xxxx-yxxx-yxxx-xxxxxyxxxxxx'.replace(/[xy]/g, function (c) {
            var r = (dt + Math.random() * 16) % 16 | 0;
            dt = Math.floor(dt / 16);
            return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);
        });
        return uuid;
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.stringReplaceBetween
    // Desc:    Returns a new string that is the original string, with a new string in the middle (specified by the starting and ending indexes).
    // Input:   StringToPad -- The string that needs padding.
    //          Size -- The full length of the padded string.
    //          CharacterToPad -- The character you have to pad it with.
    // Returns: A padded string
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    stringReplaceBetween: function(OriginalString, StartIndex, EndIndex, MiddleString) {
        return OriginalString.substring(0, StartIndex) + MiddleString + OriginalString.substring(EndIndex);
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.generateInlineStylesFromDataStyles
    // Desc:    Uses the data-style attribute values to generate css properties 
    // Input:  
    // Returns: CSS properties
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    generateInlineStylesFromDataStyles: function () {

        $("[data-style]").each(function () {

            var dataStyle = $(this).attr("data-style");
            dataStyle = dataStyle.split(';');
            dataStyle = dataStyle.filter(function (value) {
                return value !== '' && value !== ' ';
            });
          
            var cssObj = {};
            var dataStyleLength = dataStyle.length;
            var css = [];
            for (var i = 0; i < dataStyleLength; i++) {
                css = dataStyle[i].split(':');
                cssObj[css[0].trim()] = css[1].trim();
            }

            $(this).css(cssObj);

        });
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.hasAtLeastOneUpperCaseCharacter
    // Desc:    Checks if the string contains at least one UPPER case
    // Input:   StringToCheck -- The string that needs to be checked
    // Returns: True - string contains at least one UPPER case
    //          False - string does NOT contain any UPPER case
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    hasAtLeastOneUpperCaseCharacter: function (StringToCheck) {
        let pattern = "[A-Z]+";
        return StringToCheck.match(pattern);
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.hasAtLeastOneLowerCaseCharacter
    // Desc:    Checks if the string contains at least one lower case
    // Input:   StringToCheck -- The string that needs to be checked
    // Returns: True - string contains at least one lower case
    //          False - string does NOT contain any lower case
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    hasAtLeastOneLowerCaseCharacter: function (StringToCheck) {
        let pattern = "[a-z]+";
        return StringToCheck.match(pattern);
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.hasAtLeastOneDigit
    // Desc:    Checks if the string contains at least one digit
    // Input:   StringToCheck -- The string that needs to be checked
    // Returns: True - string contains at least one digit
    //          False - string does NOT contain any digit
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    hasAtLeastOneDigit: function (StringToCheck) {
        let pattern = "[0-9]+";
        return StringToCheck.match(pattern);
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.hasAtLeastOneSymbol
    // Desc:    Checks if the string contains at least one symbol
    // Input:   StringToCheck -- The string that needs to be checked
    // Returns: True - string contains at least one symbol
    //          False - string does NOT contain any symbol
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    hasAtLeastOneSymbol: function (StringToCheck) {
        let pattern = "[#?!%^*_-]+";
        return StringToCheck.match(pattern);
    },

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.Utilities.hasNoInvalidSymbol
    // Desc:    Checks if the string does not contain invalid symbols
    // Input:   StringToCheck -- The string that needs to be checked
    // Returns: True - string does not contain invalid symbol
    //          False - string does contain invalid symbol
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    hasNoInvalidSymbol: function (StringToCheck) {
        let pattern = "[^0-9a-zA-Z#?!%^*_-]+";
        return !StringToCheck.match(pattern);
    },

    encodeStringToBase64(StrToEncode) {

        let encodeString = StrToEncode
        if (!Globals.Utilities.isUndefinedOrNull(StrToEncode)) {
            encodeString = btoa(StrToEncode)
        }

        return encodeString;
    },

    decodeBase64String(StrToDecode) {

        let encodedString = StrToDecode;
        if (!Globals.Utilities.isUndefinedOrNull(StrToDecode)) {
            encodedString = atob(StrToDecode);
        }

        return encodedString;
    }
};


/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// END OF GLOBAL UTILITIES FUNCTIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
;
if (typeof (Globals) === "undefined" || Globals === null) {
    Globals = {};
}

Globals.LanguageType = {
    Unspecified: -1,
    en: 1,
    fr: 2
};

///This is currently used for IGAA country type.
Globals.ExtendedCountryPropertyTypeID = {
    NOT_SET: 0,
    Country: 1,
    SpecialCountry: 2
};

Globals.PinboardItemType = {
    NOT_SET: 0,
    Document: 1,
    Search: 2,
    Notes: 3
};

Globals.PinboardSearchType = {
    NOT_SET: 0,
    SearchResultList: 1,
    SelectedSearchDocuments: 2
};

Globals.PinboardStates = {
    Collapsed: 0,
    Expanded: 1
};

Globals.Status = {
    NOT_SET: 0,
    Live: 0,
    Deleted: 2,
    Draft: -1
};

Globals.DoctypeID = {
    NOT_SET: 0,
    IGAANews: 6100
};

Globals.StringCaseType = {
    NOT_SET: 0,
    TitleCase: 1,
    SentenceCase: 2
};

Globals.InteractiveHelpType =
{
    NOT_SET: 0,
    SITEWIDE: 1,
    PRODUCTWIDE: 2
};

Globals.InteractiveHelpStatus =
{
    NOT_SET: 0,
    DRAFT: 1,
    LIVE: 2,
    ARCHIVED: 3,
    DELETED: 4
};

Globals.LearningMediaType = {
    NOT_SET: 0,
    VIEW_PRESENTATION: 1,
    DOWNLOAD_PRESENTATION: 2,
    DOWNLOAD_SLIDES: 3
};

Globals.MediaSizeOrDurationType =
{
    NOT_SET: 0,
    MEGABYTES: 1,
    MINUTES: 2
};

Globals.LearningNewsStatus =
{
    NOT_SET: 0,
    NEW: 1,
    SAVED: 2,
    RELEASED: 3
};

Globals.SiteType =
{
    NOT_SET: 0,
    EYTaxNavigator: 2,         // Internal EY Tax Navigator site
    EYOnlineUS: 3,             // Canadian Tax Library site (login via EY Client Portal)
    CCRA: 4,                   // Canada Revenue Agency site
    EYO_Inactive: 5,           // INACTIVE
    Knotia: 6,                 // Main Knotia.ca site
    EYTaxNavigatorMNP: 8,      // Meyers Norris Penny private Tax Navigator portal
    KnotiaCOM_Inactive: 9,     // INACTIVE
    KnotiaEDU: 10,             // Knotia site for universities
    KnotiaCAUBO_Inactive: 11,  // INACTIVE
    KnotiaIDA: 12,             // INACTIVE
    CdnTaxLib_Inactive: 13,    // INACTIVE
    GWTR: 14,                  // Global Withholding Tax Reporter (uses GWTR Platform, login via Client Portal)
    GrantThornton: 15,         // Grant Thornton private Knotia portal
    EYAccountingPortal: 16,    // EY Accounting Portal site (login via EY Client Portal)
    EYAviation: 17,            // EY Aviation (formerly Tax Aviation Leasing Knowledgebase (TALK)) (uses GWTR Platform, login via Client Portal)
    IGAA: 18,                  // Intergovermental Agreement Analyzer (IGA Analyzer) (uses GWTR Platform, login via Client Portal)
    USTaxNewsExternal: 19,		// login via emailed validation link (not super secure, but no private content)
    USTaxNewsInternal: 20,		// EY SSO
    GTNUExternal: 21,			// login via emailed validation link (not super secure, but no private content)
    GTNUInternal: 22,			// EY SSO
    CATaxAlerts: 23,			// login via emailed validation link (not super secure, but no private content)
    AUSTaxExchange: 27,
    EXAMREF: 29                // CPA Canada Secure Exam
};

Globals.HotTopicsViewMode =
{
    NOT_SET: 0,
    LIST_VIEW: 1,
    GRID_VIEW: 2
};

Globals.AlertExtraMetadata =
{
    Key_EditLinks: 0,
    Key_IsInternalOnlyContent: 1,
    Key_IsExternalAndInternalContent: 2,
    Key_ExternalVersionAlertID: 3,
    Key_IsMarkFIDOContent: 4,
    Key_TwitterLink: 5,
    Key_LinkedInLink: 6,
    Key_FacebookLink: 7,
    Key_PromotionalMaterial: 8,
    Key_alertID: 9,
    Key_IsDocumentSharable: 10,
    Key_IncludeDownloadableSlides: 11
};;
/*globals GlobalStrings*/
// Dependencies: jQuery v > 1.7.2 or v < 1.8
//			   GlobalStrings.<lang>.js
//			   Globals.Enums.js
//			   Globals.Utilities.js
// Register "Globals" in JS as a valid object.
if (typeof (Globals) === "undefined" || Globals === null) {
	Globals = {};
}


/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// START OF GLOBAL DATE UTILITIES FUNCTIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

Globals.Date = {

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.Date.trasnlateJSONDateToJSDate
	// Desc: Trasnlates the JSON formatted date of /Date(135234234-0009)/ (ticks) into a more human interpretation of the date.
	// Inputs: jsonDate - The date value that JSON returns.
	//		 UsrDateFormat - The date format that you want to see. The value defaults to yyyy-MM-dd
	// Returns: Returns a JavaScript Date object with the requested format.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	trasnlateJSONDateToJSDate: function (jsonDate, UsrDateFormat) {
		if (UsrDateFormat == null || arguments.length == 1) {
			UsrDateFormat = "yyyy-MM-dd";
		}
		var strDate = jsonDate.toString();
		strDate = strDate.replace(/[)][/]|[/]Date[(]/gi, "");
		return (new Date(parseInt(strDate, 10))).format(UsrDateFormat);
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Date.dateAdd
	// Desc:	Adds the date based on the part you want to increment. Mind you if you want to decrement just pass
	//		  negative values to the DateIncrement.
	//		  Makes lots of safe programming practices by testing all my inputs nullability.
	// Inputs:  dateToAdd -- This is the date value that needs to add.
	//		  dateIncrement -- Numeric value you want to increment by. If you pass a negative number it will 
	//						   decrement.
	//		  datePartToIncrement -- Uses Globals.DatePart enum to specify what part of the date you want
	//								 to increment. So Month, year, date etc...
	// Output:  A date object with the incremented value.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	dateAdd: function (dateToAdd, dateIncrement, datePartToIncrement) {
		var safeDatePartToIncrement = Globals.Date.DAY;
		var safeDateToAdd, safeDateIncrement;
		var monthValueIncrement = 0;
		var yearValueIncrement = 0;
		var dayValueIncrement = 0;
		var hourValueIncrement = 0;
		var minutesValueIncrement = 0;
		var secondsValueIncrement = 0;
		var milliSecondsValueIncrement = 0;

		if (typeof (dateToAdd) !== "undefined" && dateToAdd !== null) {
			switch (typeof (dateToAdd)) {
				case "string":
					//this is surrounded in a try catch in case jQuery is not included. If not best attempt of getting current date.
					try {
						safeDateToAdd = $.datepicker.parseDate("yy-m-d", dateToAdd);
					}
					catch (err) {
						safeDateToAdd = new Date();
					}
					break;
				case "object":
				default:
					safeDateToAdd = dateToAdd;
					break;
			}

		}
			// if DateToAdd is bad then just get current date.
		else {
			safeDateToAdd = new Date();
		}
		if (typeof (datePartToIncrement) !== "undefined" && datePartToIncrement !== null) {
			safeDatePartToIncrement = datePartToIncrement;
		}
		// this is not a swtich since we need to use the tripple equals for safety.
		if (typeof (dateIncrement) === "undefined" || dateIncrement === null) {
			safeDateIncrement = 1;
		}
		else {
			switch (typeof (dateIncrement)) {
				case "string":
					safeDateIncrement = parseInt(dateIncrement, 10);
					break;
				case "number":
					safeDateIncrement = dateIncrement;
					break;
					//if it is something stupid then just put the value 1.										   
				default:
					safeDateIncrement = 1;
			}
		}

		switch (datePartToIncrement) {
			case Globals.Date.DatePart.MONTH:
				monthValueIncrement = safeDateIncrement;
				break;
			case Globals.Date.DatePart.YEAR:
				yearValueIncrement = safeDateIncrement;
				break;
			case Globals.Date.DatePart.HOUR:
				hourValueIncrement = safeDateIncrement;
				break;
			case Globals.Date.DatePart.MINUTES:
				minutesValueIncrement = safeDateIncrement;
				break;
			case Globals.Date.DatePart.SECONDS:
				secondsValueIncrement = safeDateIncrement;
				break;
			case Globals.Date.DatePart.MILLISECONDS:
				milliSecondsValueIncrement = safeDateIncrement;
				break;
			case Globals.Date.DatePart.DAY:
			default:
				dayValueIncrement = safeDateIncrement;
		}
		var dateReturn = new Date(safeDateToAdd.getFullYear() + yearValueIncrement,
							safeDateToAdd.getMonth() + monthValueIncrement,
							safeDateToAdd.getDate() + dayValueIncrement,
							safeDateToAdd.getHours() + hourValueIncrement,
							safeDateToAdd.getMinutes() + minutesValueIncrement,
							safeDateToAdd.getSeconds() + secondsValueIncrement,
							safeDateToAdd.getMilliseconds() + milliSecondsValueIncrement
						);
		return dateReturn;

	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Date.buildSqlSafeDateString
	// Desc:	Creates a string that SQL can interpret as a Date and not some crazy number.
	//		  Makes lots of safe programming practices by testing all my inputs nullability.
	//		  Also if for some reason the date cannot be created then it just builds today's date as a fail safe.
	// Inputs:  dateToBuild -- This is the date value that needs to 
	// Ouput:   A safe date string that SQL can interpret as a Date.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	buildSqlSafeDateString: function (dateToBuild) {
		if (typeof (dateToBuild) === "undefined" || dateToBuild === null) {
			return "";
		}

		var y, m, d;

		try {
			y = dateToBuild.getFullYear();
			m = dateToBuild.getMonth() + 1;
			d = dateToBuild.getDate();
		}
		catch (err1) {
			var t = new Date();
			y = t.getFullYear();
			m = t.getMonth() + 1;
			d = t.getDate();
		}

		y = y.toString();
		m = "0" + m.toString();
		d = "0" + d.toString();

		return y + "-" + m.substr(m.length - 2) + "-" + d.substr(d.length - 2);
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Date.toFormattedString
	// Desc:	Formats the date to the appropriate Knotia approved long hand.
	// Inputs:  dateToFormat -- This is the date value that needs to format.
	//		  useShortFormat -- Boolean to determine if the short form is needed or not. (optional I safely
	//							deduce that if this is null or undefined it will be long hand).
	// Ouput:   String with the appropriate language.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	toFormattedString: function (dateToFormat, useShortFormat) {
		var safeDate, safeUseShortFormat;
		var returnDate = "";
		if (typeof (dateToFormat) === "string") {
			try {
                if (dateToFormat.match(/^([1-9])\d\d\d([- \/.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])$/gi)) {
					dateToFormat = dateToFormat + " 00:00:00.000";
					safeDate = new Date(dateToFormat);
				}
				else {
					throw "getdate"; //this way the catch can just parse today's date.
				}
			}
			catch (err) {
				safeDate = new Date();
			}
		}
		else {
			safeDate = dateToFormat;
		}
		if (Globals.Utilities.isUndefinedOrNull(useShortFormat)) {
			safeUseShortFormat = false;
		}
		else {
			safeUseShortFormat = useShortFormat;
		}

		var dayString = safeDate.getDate().toString();
		var yearString = safeDate.getFullYear().toString();
		var monthString = "";
		if (safeUseShortFormat) {
		    monthString = GlobalStrings["str_Short_Month_Name"][safeDate.getMonth()];
		}
		else {
			monthString = GlobalStrings["str_Long_Month_Name"][safeDate.getMonth()];
		}


		if (dayString === "1") {
			dayString += GetString("str_PostDayQualifier");
		}
		switch (Globals.Utilities.getCurrentSiteLanguage()) {
			case Globals.LanguageType.fr:
				returnDate = dayString + " " + monthString + " " + yearString;
				break;
			case Globals.LanguageType.en:
			case Globals.LanguageType.Unspecified:
				returnDate = monthString + " " + dayString + ", " + yearString;
		}
		return (returnDate);
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:	Globals.Date.toLocaleDateString
	// Desc:	Formats the date to the appropriate locale string.
	// Inputs:  dateObj -- This is the date value (a JS Date object) that needs to convert.
	//			dateOptions -- Object adjusting the output format.
	//			dateLanguage -- Optiontal, string (language code) representing the output date string language.
	// Ouput:   String with the appropriate language.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	toLocaleDateString: function (dateObj, dateOptions, dateLanguage) {
		let languageOption = dateLanguage;
		if (Globals.Utilities.isUndefinedOrNull(languageOption)) {
			const siteLanguage = Globals.Utilities.getCurrentSiteLanguage();
			switch (siteLanguage) {
				case Globals.LanguageType.fr:
					languageOption = "fr";
					break;
				case Globals.LanguageType.en:
				default:
					languageOption = "en";
					break;
			}
        }

		return dateObj.toLocaleDateString(languageOption, dateOptions);
	},

	// Globals.Date.toYYYYMMDDHHMMTT
	toYYYYMMDDHHMMTT: function (dateTime) {
		var year = dateTime.getFullYear().toString();

		var month = "0" + (dateTime.getMonth() + 1).toString();
		month = month.substr(month.length - 2);

		var day = "0" + dateTime.getDate().toString();
		day = day.substr(day.length - 2);

		var hour = dateTime.getHours();
		var ampm;
		if (hour === 0) {
			hour = "12";
			ampm = "am";
		}
		else if (hour == 12) {
			hour = "12";
			ampm = "pm";
		}
		else if (hour > 12) {
			hour = (hour - 12).toString();
			ampm = "pm";
		}
		else {
			hour = hour.toString();
			ampm = "am";
		}

		var minute = "0" + dateTime.getMinutes().toString();
		minute = minute.substr(minute.length - 2);

		var second = "0" + dateTime.getSeconds().toString();
		second = second.substr(second.length - 2);

		return year + "-" + month + "-" + day + " " + hour + ":" + minute + ampm;
	},

	// Globals.Date.fromYYYYMMDD
	fromYYYYMMDD: function (yyyymmdd, hasDashes) {
		var y, m, d;
		if (hasDashes) {
			y = yyyymmdd.substr(0, 4);
			m = yyyymmdd.substr(5, 2);
			d = yyyymmdd.substr(8, 2);
		}
		else {
			y = yyyymmdd.substr(0, 4);
			m = yyyymmdd.substr(4, 2);
			d = yyyymmdd.substr(6, 2);
		}

		y = parseInt(y);
		m = parseInt(m) - 1; // JS months start at 0
		d = parseInt(d);

		return new Date(y, m, d);
	},

	// Globals.Date.testYYYYMMDD
	testYYYYMMDD: function (yyyymmdd, hasDashes) {
		//test the date format
		const formatRegex = /^\d{4}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])$/;
		if (hasDashes) {
			if (!formatRegex.test(yyyymmdd.replaceAll("-", ""))) {
				return false;
			}
		} else {
			if (!formatRegex.test(yyyymmdd)) {
				return false;
            }
		}

		//test if the date is on the calendar
		let year, month, day;
		if (hasDashes) {
			year = yyyymmdd.substr(0, 4);
			month = yyyymmdd.substr(5, 2);
			day = yyyymmdd.substr(8, 2);
		}
		else {
			year = yyyymmdd.substr(0, 4);
			month = yyyymmdd.substr(4, 2);
			day = yyyymmdd.substr(6, 2);
		}

		year = parseInt(year);
		month = parseInt(month);
		day = parseInt(day);

		const date = new Date(year, month - 1, day);

		if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
			return false;
		}

		return true;
    },

	// Globals.Date.parseDate
	parseDate: function (input, format) {
		if (typeof input == "undefined" || input == null) {
			return new Date();
		}

		if (typeof input == "string") {
			format = format || 'yyyy-mm-dd'; // default format
			var parts = input.match(/(\d+)/g),
			i = 0, fmt = {};
			// extract date-part indexes from the format
			format.replace(/(yyyy|dd|mm)/g, function (part) { fmt[part] = i++; });
			return new Date(parts[fmt['yyyy']], parts[fmt['mm']] - 1, parts[fmt['dd']]);
		}
		else if (input.getFullYear) {
			return input;
		}
		else {
			return new Date();
		}
	},

	// Globals.Date.daysBetween
	daysBetween: function (date1, date2) {
		//Get 1 day in milliseconds
		var one_day=1000*60*60*24;

		// Convert both dates to milliseconds
		var date1_ms = date1.getTime();
		var date2_ms = date2.getTime();

		// Calculate the difference in milliseconds
		var difference_ms = date2_ms - date1_ms;
    
		// Convert back to days and return
		return Math.floor(difference_ms/one_day);
	},

	// Name:	Globals.Date.isLeapYear
	// Desc:	Check a year is leap year or not.
	// Inputs:  year -- an integer specifying the year
	// Ouput:   a boolean indicating if the year is leap year or not
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	isLeapYear: function (year) {

		return 0 == year % 4 && 0 != year % 100 || 0 == year % 400;
    },

	// Name:	Globals.Date.lastYearDate
	// Desc:	Get the same day n years ago.
	// Inputs:  date -- Date object
	//          n -- n years ago
	//          useNextDay - a boolean indicating if the date is 02/29 and the year is not a leap year, 
	//                           whether to ues previous day or next day
	// Ouput:   Date object
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	getLastNYearDate: function (date, n, useNextDay) {
		if (typeof (date) === "undefined" || date === null || typeof (date) !== "object") {
			return new Date();
		}

		let month = date.getMonth();
		let day = date.getDate();
		let year = date.getFullYear() - n;

		let isLeapYear = Globals.Date.isLeapYear(year);
		if (!isLeapYear && month + 1 == 2 && day == 29) {
			if (useNextDay) { // set to 03/01
				month = 2;
				day = 1;
			} else {  // set to 02/28
				day = 28;
            }
			
        }

		return new Date(year, month, day);
    }
};

/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// END OF GLOBAL DATE UTILITIES FUNCTIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// START DEFINITION of Date part enums
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
Globals.Date.DatePart = {
	DAY: 0,
	MONTH: 1,
	YEAR: 2,
	HOUR: 3,
	MINUTES: 4,
	SECONDS: 5,
	MILLISECONDS: 6
};
/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// END DEFINITION of Date part enums
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
;
/*globals Global_CreateMessageFrom_jqXHR*/
/// Dependencies: jQuery v > 1.7.2 or v < 1.8
/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// START OF GLOBAL Ajax FUNCTIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

// Register "Globals" in JS as a valid object.
if (typeof (Globals) === "undefined" || Globals === null) {
    Globals = {};
}

Globals.Ajax = {




    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Ajax.getRequest
	// Desc:    It makes a JQuery JSON get call to the webservice. This is a helper method to make our JS code less 
	//          ugly.
	// Inputs:  serviceToCall - This includes the appropriate path of the service file + its service method.
	//          serviceParameter - This is a fully qualified JSON object.
	//          onSuccessEvent - This is the function that this method must call when there is a success.
	//          onFailureEvent -  This is the function that this method must call if there is an error.
	//          sourceOfError - This is a string of which you should pass the method that the AJAX was called/died from.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    getRequest: function (serviceToCall, serviceParameter, onSuccessEvent, onFailureEvent, sourceOfError, context, timeout, ignore401erros) {
        this.makeRequest(serviceToCall, serviceParameter, "GET",false, onSuccessEvent, onFailureEvent, sourceOfError, context, timeout, ignore401erros) 
    },
    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Ajax.postRequest
	// Desc:    It makes a JQuery JSON post call to the webservice. This is a helper method to make our JS code less 
	//          ugly.
	// Inputs:  serviceToCall - This includes the appropriate path of the service file + its service method.
	//          serviceParameter - This is a fully qualified JSON object.
	//          onSuccessEvent - This is the function that this method must call when there is a success.
	//          onFailureEvent -  This is the function that this method must call if there is an error.
	//          sourceOfError - This is a string of which you should pass the method that the AJAX was called/died from.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
    postRequest: function (serviceToCall, serviceParameter, onSuccessEvent, onFailureEvent, sourceOfError, context, timeout, ignore401erros) {
        this.makeRequest(serviceToCall, serviceParameter, "POST", true, onSuccessEvent, onFailureEvent, sourceOfError, context, timeout, ignore401erros); 
    },

    makeRequest: function (serviceToCall, serviceParameter, verb, useSafeParam, onSuccessEvent, onFailureEvent, sourceOfError, context, timeout, ignore401erros) {
		var safeSourceOfError = "";
		var safeParameter = "";

		//assign a safe value so that we don't passed undefined nor null entries.
		if (typeof (sourceOfError) !== "undefined" && sourceOfError !== null) {
			safeSourceOfError = sourceOfError;
		}
		else {
			safeSourceOfError = serviceToCall;
		}

        if (useSafeParam) {
            switch (typeof (serviceParameter)) {
                //hashtable
                case "object":
                    safeParameter = this.convertJSHashTableToAjaxParameter(serviceParameter);
                    break;
                //regular string
                case "string":
                    safeParameter = this.escapeStringForJSON(serviceParameter);
                    break;
                //if it is null
                default:
                    safeParameter = serviceParameter;
            }
        }
        else {
            safeParameter = serviceParameter;
        }

		if (!context) {
			context = null;
		}

        if (!timeout) {
            //set the default timeout to 2 minutes otherwise grab whatever the StateManageTimeout should be.
            if (typeof glb_StateManager_RequestTimeout === "undefined" || glb_StateManager_RequestTimeout === null) {
                timeout = 120000;
            }
            else {
                timeout = glb_StateManager_RequestTimeout;
            }
		}

		$.ajax({
			"type": verb,
			"url": serviceToCall,
			"data": safeParameter,
			"contentType": "application/json; charset=utf-8",
			"dataType": "json",
			"processData": true,
			"cache": false,
			"context": context,
			"timeout": timeout,
			"success": function (results) {
				if (typeof (onSuccessEvent) !== "undefined" && onSuccessEvent !== null) {
					onSuccessEvent.call(context, results);
				}
					//if the the Success event is null or somewhat undefined then do nothing.
				else {
				}
				return false;
			},
			"error": function (jqXHR, textStatus, errorThrown) {
				if (ignore401erros) {
					if (typeof (onFailureEvent) !== "undefined" && onFailureEvent !== null) {
						onFailureEvent.call();
					}
					return;
				}

				if (jqXHR.status == 401) {
					window.history.go(0);
				}

				//if the the failure event is null or somewhat undefined then do nothing.
				if (typeof (onFailureEvent) !== "undefined" && onFailureEvent !== null) {
					onFailureEvent(Global_CreateMessageFrom_jqXHR(jqXHR, safeSourceOfError));
				}
				return false;
			}
		});
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Ajax.submitFormWithFileUpload
	// Desc:    Send an ajax request
	// Inputs:  targetUrl -- The destination
	//          jqueryFormObject -- The form as a jquery object
	// Returns: nothing
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	submitFormWithFileUpload: function (targetUrl, jqueryFormObject, onSuccessFunction) {
		var formData = new FormData();
		jqueryFormObject.find(".jss-textInput").each(function () {
			formData.append($(this).attr("id"), $(this).val());
		});
		jqueryFormObject.find(".jss-fileInput").each(function () {
            var files = $(this)[0].files;
            var filesLength = files.length;
            for (var i = 0; i < filesLength; i++) {
				formData.append($(this).attr("id"), files[i], files[i].name);
			}
		});

		$.ajax({
			url: targetUrl,
			type: "POST",
			data: formData,
			processData: false,
			contentType: false,
			"timeout": 120000,
			success: function (results) {
				onSuccessFunction.call(null, results);
			}
		});
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Ajax.createSingleAjaxParameter
	// Desc:    This creates a safe ajax parameter to pass.
	// Inputs:  parameterName -- The name of the parameter to pass to the service.
	//          parameterValue -- The value of the parameter. 
	// Returns: {"parameterName":"parameterValue"}    
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	createSingleAjaxParameter: function (parameterName, parameterValue) {
		var safeParameterName = "";
		var safeParameterValue = "";
		var returnValue = "";

		if (typeof (parameterName) === "undefined" || parameterName === null) {
			return null;
		}
		else {
			safeParameterName = $.trim(parameterName);
		}
		if (typeof (parameterValue) === "undefined" || parameterValue === null) {
			safeParameterValue = "";
		}
		else {
			//no trimming in case the space is necesary.
			safeParameterValue = parameterValue;
		}

		returnValue = "{\"" + safeParameterName.toString() + "\":\"" + safeParameterValue.toString() + "\"}";
		return returnValue;
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Ajax.convertJSHashTableToAjaxParameter
	// Desc:    Helper internal function that converts a HashTable into jqueryParameters.
	// Inputs:  parameterName -- The name of the parameter to pass to the service.
	//          parameterValue -- The value of the parameter. 
	// Returns: {"parameterName":"parameterValue"}    
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	convertJSHashTableToAjaxParameter: function (jsHashTable) {
		var returnValue = "{";
		if (typeof (jsHashTable) === "undefined" || jsHashTable === null) {
			return null;
		}
		var currentIndex = 0;
		for (var key in jsHashTable) {
			if (currentIndex != 0) {
				returnValue += ",";
			}

			if (jsHashTable[key] == null) {
				returnValue += "\"" + key.toString() + "\":\"\"";
			}
			else {
				var escapedValue = this.escapeStringForJSON(jsHashTable[key].toString());
				returnValue += "\"" + key.toString() + "\":\"" + escapedValue + "\"";
			}

			currentIndex++;
		}
		returnValue += "}";

		return returnValue;
	},

	escapeStringForJSON: function (s) {
		return $.trim(s.replace(/\\/g, "\\\\").replace(/["]/gi, "\\\"").replace(/\r/g, "\\r").replace(/\n/g, "\\n").replace(/\t/g, "\\t"));
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.Ajax.onSuccess_DoNothing
	// Desc:    Helper function to deal with sloppy coding in case someone passes null or an undefined function for the OnSuccessEvent.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	onSuccess_DoNothing: function () {
		return false;
	}

};
/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// END OF GLOBAL UTILITIES FUNCTIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
;
// Register "Globals" in JS as a valid object.
if (typeof (Globals) === "undefined" || Globals === null) {
    Globals = {};
}
/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// START OF GLOBAL JSON UTILITIES FUNCTIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

Globals.Json = {
	/*////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name: Globals.Json.translateWCFHTToJSHT
    // Desc: Translates WCF's JSON interpretation of a Hash Table to something that JavaScript understands. 
    // Inputs: wcfHashTable - The JSON object of the Hash Table.
    // Returns: Returns a valid JavaScript Hash Table.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	translateWCFHTToJSHT: function (wcfHashTable) {
		var jsHT = {};

		if (typeof wcfHashTable == "undefined" || wcfHashTable == null) {
			return jsHT;
		}

		if (String(wcfHashTable).length == 0) {
			return jsHT;
		}

		var LengthOfHash = wcfHashTable.length;
		for (var i = 0; i < LengthOfHash; i++) {
			jsHT[wcfHashTable[i].Key] = wcfHashTable[i].Value;
		}
		return jsHT;
	}

};

/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// END OF GLOBAL JSON UTILITIES FUNCTIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var WebSocketService = function () {
    function WebSocketService(url) {
        var protocols = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
        var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

        _classCallCheck(this, WebSocketService);

        this.url = url;
        this.protocols = protocols;
        this.ws = null;

        this.reconnectDelay = options.reconnectDelay || 3000;
        this.maxRetries = options.maxRetries || Infinity;
        this.retryCount = 0;
        this.isManuallyClosed = false;

        this.autoSend = options.autoSend === undefined || options.autoSend === null ? true : options.autoSend, this.messageQueue = [];

        this.onOpen = options.onOpen ? options.onOpen : function () {
            console.log("WebSocket connected");
        };
        this.onMessage = options.onMessage ? options.onMessage : function (event) {
            console.log("Received:", event.data);
        };
        this.onError = options.onError ? options.onError : function (error) {
            console.log("WebSocket error:", error);
        };
        this.onClose = options.onClose ? options.onClose : function (event) {
            console.log("WebSocket closed:", event.code);
        };

        this.connect();
    }

    _createClass(WebSocketService, [{
        key: "connect",
        value: function connect() {
            var _this = this;

            this.ws = this.protocols ? new WebSocket(this.url, this.protocols) : new WebSocket(this.url);

            this.ws.onopen = function (event) {
                if (_this.isManuallyClosed) {
                    _this.retryCount = 0;
                }

                _this.onOpen(event);

                if (_this.autoSend) {
                    _this.flushMessageQueue();
                }
            };

            this.ws.onmessage = function (event) {
                _this.onMessage(event);
            };

            this.ws.onerror = function (error) {
                _this.onError(error);
            };

            this.ws.onclose = function (event) {
                _this.onClose(event);

                if (!_this.isManuallyClosed && _this.retryCount < _this.maxRetries) {
                    _this.retryCount++;
                    setTimeout(function () {
                        _this.connect();
                    }, _this.reconnectDelay);
                }
            };
        }
    }, {
        key: "send",
        value: function send(Data) {
            if (this.ws && this.ws.readyState === WebSocket.OPEN) {
                this.ws.send(typeof Data === "string" ? Data : JSON.stringify(Data));
            } else {
                if (this.autoSend) {
                    this.messageQueue.push(Data);
                }
                console.log("WebSocket Send Error: WebSocket is not open.");
            }
        }
    }, {
        key: "flushMessageQueue",
        value: function flushMessageQueue() {
            while (this.messageQueue.length > 0) {
                this.send(this.messageQueue.shift());
            }
        }
    }, {
        key: "close",
        value: function close() {
            this.isManuallyClosed = true;
            if (this.ws) {
                this.ws.close();
            }
        }
    }, {
        key: "getStatus",
        value: function getStatus() {
            return this.ws && this.ws.readyState;
        }
    }]);

    return WebSocketService;
}();;
"use strict";

Globals.History = {
    saveToHistoryAndGoNext: function saveToHistoryAndGoNext(State, CurrentURL, GoToURL) {

        var isLoading = false;
        if (typeof currentPage.BLL.isContentBodyLoading == 'function') {
            isLoading = currentPage.BLL.isContentBodyLoading(State);
        }

        if (isLoading) {
            Globals.History.saveToHistory(null, GoToURL);
        } else {
            Globals.History.saveToHistory(State, CurrentURL);
            if (Globals.Utilities.isUndefinedOrNull(GoToURL)) {
                GoToURL = CurrentURL;
            }
            Globals.History.pushToHistory(null, GoToURL);
        }
    },
    pushToHistory: function pushToHistory(State, GoToURL) {
        history.pushState(State, "", GoToURL);
    },
    saveToHistory: function saveToHistory(State, CurrentURL) {
        history.replaceState(JSON.stringify(State), "", CurrentURL);
    }
};

window.onpopstate = function (event) {
    if (!Globals.Utilities.isUndefinedOrNull(event.state)) {
        var state = JSON.parse(event.state);
        currentPage.DAL.updateWholeStore(state);
    }
};;
"use strict";

Globals.EventTracker = {
    preRequestTime: 0,

    disableDoubleClickEvent: function disableDoubleClickEvent() {
        var delay = 500;
        document.addEventListener("click", function (Element) {
            if (Element.target.classList.contains("disable-double-click")) {
                var currentTime = Date.now();
                if (currentTime - Globals.EventTracker.preRequestTime < delay) {
                    Element.stopPropagation();
                } else {
                    Globals.EventTracker.preRequestTime = currentTime;
                }
            }
        }, true);
    }
};;
(function(self) {
  'use strict';

  if (self.fetch) {
    return
  }

  var support = {
    searchParams: 'URLSearchParams' in self,
    iterable: 'Symbol' in self && 'iterator' in Symbol,
    blob: 'FileReader' in self && 'Blob' in self && (function() {
      try {
        new Blob()
        return true
      } catch(e) {
        return false
      }
    })(),
    formData: 'FormData' in self,
    arrayBuffer: 'ArrayBuffer' in self
  }

  if (support.arrayBuffer) {
    var viewClasses = [
      '[object Int8Array]',
      '[object Uint8Array]',
      '[object Uint8ClampedArray]',
      '[object Int16Array]',
      '[object Uint16Array]',
      '[object Int32Array]',
      '[object Uint32Array]',
      '[object Float32Array]',
      '[object Float64Array]'
    ]

    var isDataView = function(obj) {
      return obj && DataView.prototype.isPrototypeOf(obj)
    }

    var isArrayBufferView = ArrayBuffer.isView || function(obj) {
      return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
    }
  }

  function normalizeName(name) {
    if (typeof name !== 'string') {
      name = String(name)
    }
    if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
      throw new TypeError('Invalid character in header field name')
    }
    return name.toLowerCase()
  }

  function normalizeValue(value) {
    if (typeof value !== 'string') {
      value = String(value)
    }
    return value
  }

  // Build a destructive iterator for the value list
  function iteratorFor(items) {
    var iterator = {
      next: function() {
        var value = items.shift()
        return {done: value === undefined, value: value}
      }
    }

    if (support.iterable) {
      iterator[Symbol.iterator] = function() {
        return iterator
      }
    }

    return iterator
  }

  function Headers(headers) {
    this.map = {}

    if (headers instanceof Headers) {
      headers.forEach(function(value, name) {
        this.append(name, value)
      }, this)
    } else if (Array.isArray(headers)) {
      headers.forEach(function(header) {
        this.append(header[0], header[1])
      }, this)
    } else if (headers) {
      Object.getOwnPropertyNames(headers).forEach(function(name) {
        this.append(name, headers[name])
      }, this)
    }
  }

  Headers.prototype.append = function(name, value) {
    name = normalizeName(name)
    value = normalizeValue(value)
    var oldValue = this.map[name]
    this.map[name] = oldValue ? oldValue+','+value : value
  }

  Headers.prototype['delete'] = function(name) {
    delete this.map[normalizeName(name)]
  }

  Headers.prototype.get = function(name) {
    name = normalizeName(name)
    return this.has(name) ? this.map[name] : null
  }

  Headers.prototype.has = function(name) {
    return this.map.hasOwnProperty(normalizeName(name))
  }

  Headers.prototype.set = function(name, value) {
    this.map[normalizeName(name)] = normalizeValue(value)
  }

  Headers.prototype.forEach = function(callback, thisArg) {
    for (var name in this.map) {
      if (this.map.hasOwnProperty(name)) {
        callback.call(thisArg, this.map[name], name, this)
      }
    }
  }

  Headers.prototype.keys = function() {
    var items = []
    this.forEach(function(value, name) { items.push(name) })
    return iteratorFor(items)
  }

  Headers.prototype.values = function() {
    var items = []
    this.forEach(function(value) { items.push(value) })
    return iteratorFor(items)
  }

  Headers.prototype.entries = function() {
    var items = []
    this.forEach(function(value, name) { items.push([name, value]) })
    return iteratorFor(items)
  }

  if (support.iterable) {
    Headers.prototype[Symbol.iterator] = Headers.prototype.entries
  }

  function consumed(body) {
    if (body.bodyUsed) {
      return Promise.reject(new TypeError('Already read'))
    }
    body.bodyUsed = true
  }

  function fileReaderReady(reader) {
    return new Promise(function(resolve, reject) {
      reader.onload = function() {
        resolve(reader.result)
      }
      reader.onerror = function() {
        reject(reader.error)
      }
    })
  }

  function readBlobAsArrayBuffer(blob) {
    var reader = new FileReader()
    var promise = fileReaderReady(reader)
    reader.readAsArrayBuffer(blob)
    return promise
  }

  function readBlobAsText(blob) {
    var reader = new FileReader()
    var promise = fileReaderReady(reader)
    reader.readAsText(blob)
    return promise
  }

  function readArrayBufferAsText(buf) {
    var view = new Uint8Array(buf)
    var chars = new Array(view.length)

    for (var i = 0; i < view.length; i++) {
      chars[i] = String.fromCharCode(view[i])
    }
    return chars.join('')
  }

  function bufferClone(buf) {
    if (buf.slice) {
      return buf.slice(0)
    } else {
      var view = new Uint8Array(buf.byteLength)
      view.set(new Uint8Array(buf))
      return view.buffer
    }
  }

  function Body() {
    this.bodyUsed = false

    this._initBody = function(body) {
      this._bodyInit = body
      if (!body) {
        this._bodyText = ''
      } else if (typeof body === 'string') {
        this._bodyText = body
      } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
        this._bodyBlob = body
      } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
        this._bodyFormData = body
      } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
        this._bodyText = body.toString()
      } else if (support.arrayBuffer && support.blob && isDataView(body)) {
        this._bodyArrayBuffer = bufferClone(body.buffer)
        // IE 10-11 can't handle a DataView body.
        this._bodyInit = new Blob([this._bodyArrayBuffer])
      } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
        this._bodyArrayBuffer = bufferClone(body)
      } else {
        throw new Error('unsupported BodyInit type')
      }

      if (!this.headers.get('content-type')) {
        if (typeof body === 'string') {
          this.headers.set('content-type', 'text/plain;charset=UTF-8')
        } else if (this._bodyBlob && this._bodyBlob.type) {
          this.headers.set('content-type', this._bodyBlob.type)
        } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
          this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
        }
      }
    }

    if (support.blob) {
      this.blob = function() {
        var rejected = consumed(this)
        if (rejected) {
          return rejected
        }

        if (this._bodyBlob) {
          return Promise.resolve(this._bodyBlob)
        } else if (this._bodyArrayBuffer) {
          return Promise.resolve(new Blob([this._bodyArrayBuffer]))
        } else if (this._bodyFormData) {
          throw new Error('could not read FormData body as blob')
        } else {
          return Promise.resolve(new Blob([this._bodyText]))
        }
      }

      this.arrayBuffer = function() {
        if (this._bodyArrayBuffer) {
          return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
        } else {
          return this.blob().then(readBlobAsArrayBuffer)
        }
      }
    }

    this.text = function() {
      var rejected = consumed(this)
      if (rejected) {
        return rejected
      }

      if (this._bodyBlob) {
        return readBlobAsText(this._bodyBlob)
      } else if (this._bodyArrayBuffer) {
        return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
      } else if (this._bodyFormData) {
        throw new Error('could not read FormData body as text')
      } else {
        return Promise.resolve(this._bodyText)
      }
    }

    if (support.formData) {
      this.formData = function() {
        return this.text().then(decode)
      }
    }

    this.json = function() {
      return this.text().then(JSON.parse)
    }

    return this
  }

  // HTTP methods whose capitalization should be normalized
  var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']

  function normalizeMethod(method) {
    var upcased = method.toUpperCase()
    return (methods.indexOf(upcased) > -1) ? upcased : method
  }

  function Request(input, options) {
    options = options || {}
    var body = options.body

    if (input instanceof Request) {
      if (input.bodyUsed) {
        throw new TypeError('Already read')
      }
      this.url = input.url
      this.credentials = input.credentials
      if (!options.headers) {
        this.headers = new Headers(input.headers)
      }
      this.method = input.method
      this.mode = input.mode
      if (!body && input._bodyInit != null) {
        body = input._bodyInit
        input.bodyUsed = true
      }
    } else {
      this.url = String(input)
    }

    this.credentials = options.credentials || this.credentials || 'omit'
    if (options.headers || !this.headers) {
      this.headers = new Headers(options.headers)
    }
    this.method = normalizeMethod(options.method || this.method || 'GET')
    this.mode = options.mode || this.mode || null
    this.referrer = null

    if ((this.method === 'GET' || this.method === 'HEAD') && body) {
      throw new TypeError('Body not allowed for GET or HEAD requests')
    }
    this._initBody(body)
  }

  Request.prototype.clone = function() {
    return new Request(this, { body: this._bodyInit })
  }

  function decode(body) {
    var form = new FormData()
    body.trim().split('&').forEach(function(bytes) {
      if (bytes) {
        var split = bytes.split('=')
        var name = split.shift().replace(/\+/g, ' ')
        var value = split.join('=').replace(/\+/g, ' ')
        form.append(decodeURIComponent(name), decodeURIComponent(value))
      }
    })
    return form
  }

  function parseHeaders(rawHeaders) {
    var headers = new Headers()
    // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
    // https://tools.ietf.org/html/rfc7230#section-3.2
    var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ')
    preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
      var parts = line.split(':')
      var key = parts.shift().trim()
      if (key) {
        var value = parts.join(':').trim()
        headers.append(key, value)
      }
    })
    return headers
  }

  Body.call(Request.prototype)

  function Response(bodyInit, options) {
    if (!options) {
      options = {}
    }

    this.type = 'default'
    this.status = options.status === undefined ? 200 : options.status
    this.ok = this.status >= 200 && this.status < 300
    this.statusText = 'statusText' in options ? options.statusText : 'OK'
    this.headers = new Headers(options.headers)
    this.url = options.url || ''
    this._initBody(bodyInit)
  }

  Body.call(Response.prototype)

  Response.prototype.clone = function() {
    return new Response(this._bodyInit, {
      status: this.status,
      statusText: this.statusText,
      headers: new Headers(this.headers),
      url: this.url
    })
  }

  Response.error = function() {
    var response = new Response(null, {status: 0, statusText: ''})
    response.type = 'error'
    return response
  }

  var redirectStatuses = [301, 302, 303, 307, 308]

  Response.redirect = function(url, status) {
    if (redirectStatuses.indexOf(status) === -1) {
      throw new RangeError('Invalid status code')
    }

    return new Response(null, {status: status, headers: {location: url}})
  }

  self.Headers = Headers
  self.Request = Request
  self.Response = Response

  self.fetch = function(input, init) {
    return new Promise(function(resolve, reject) {
      var request = new Request(input, init)
      var xhr = new XMLHttpRequest()

      xhr.onload = function() {
        var options = {
          status: xhr.status,
          statusText: xhr.statusText,
          headers: parseHeaders(xhr.getAllResponseHeaders() || '')
        }
        options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
        var body = 'response' in xhr ? xhr.response : xhr.responseText
        resolve(new Response(body, options))
      }

      xhr.onerror = function() {
        reject(new TypeError('Network request failed'))
      }

      xhr.ontimeout = function() {
        reject(new TypeError('Network request failed'))
      }

      xhr.open(request.method, request.url, true)

      if (request.credentials === 'include') {
        xhr.withCredentials = true
      } else if (request.credentials === 'omit') {
        xhr.withCredentials = false
      }

      if ('responseType' in xhr && support.blob) {
        xhr.responseType = 'blob'
      }

      request.headers.forEach(function(value, name) {
        xhr.setRequestHeader(name, value)
      })

      xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
    })
  }
  self.fetch.polyfill = true
})(typeof self !== 'undefined' ? self : this);
;
(function (global, factory) {
	typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
	typeof define === 'function' && define.amd ? define(factory) :
	(factory());
}(this, (function () { 'use strict';

var classCallCheck = function (instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
};

var createClass = 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);
    }
  }

  return function (Constructor, protoProps, staticProps) {
    if (protoProps) defineProperties(Constructor.prototype, protoProps);
    if (staticProps) defineProperties(Constructor, staticProps);
    return Constructor;
  };
}();

var get = function get(object, property, receiver) {
  if (object === null) object = Function.prototype;
  var desc = Object.getOwnPropertyDescriptor(object, property);

  if (desc === undefined) {
    var parent = Object.getPrototypeOf(object);

    if (parent === null) {
      return undefined;
    } else {
      return get(parent, property, receiver);
    }
  } else if ("value" in desc) {
    return desc.value;
  } else {
    var getter = desc.get;

    if (getter === undefined) {
      return undefined;
    }

    return getter.call(receiver);
  }
};

var inherits = function (subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  }

  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      enumerable: false,
      writable: true,
      configurable: true
    }
  });
  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};

var possibleConstructorReturn = function (self, call) {
  if (!self) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }

  return call && (typeof call === "object" || typeof call === "function") ? call : self;
};

var Emitter = function () {
  function Emitter() {
    classCallCheck(this, Emitter);

    this.listeners = {};
  }

  createClass(Emitter, [{
    key: 'addEventListener',
    value: function addEventListener(type, callback) {
      if (!(type in this.listeners)) {
        this.listeners[type] = [];
      }
      this.listeners[type].push(callback);
    }
  }, {
    key: 'removeEventListener',
    value: function removeEventListener(type, callback) {
      if (!(type in this.listeners)) {
        return;
      }
      var stack = this.listeners[type];
      for (var i = 0, l = stack.length; i < l; i++) {
        if (stack[i] === callback) {
          stack.splice(i, 1);
          return;
        }
      }
    }
  }, {
    key: 'dispatchEvent',
    value: function dispatchEvent(event) {
      var _this = this;

      if (!(event.type in this.listeners)) {
        return;
      }
      var debounce = function debounce(callback) {
        setTimeout(function () {
          return callback.call(_this, event);
        });
      };
      var stack = this.listeners[event.type];
      for (var i = 0, l = stack.length; i < l; i++) {
        debounce(stack[i]);
      }
      return !event.defaultPrevented;
    }
  }]);
  return Emitter;
}();

var AbortSignal = function (_Emitter) {
  inherits(AbortSignal, _Emitter);

  function AbortSignal() {
    classCallCheck(this, AbortSignal);

    var _this2 = possibleConstructorReturn(this, (AbortSignal.__proto__ || Object.getPrototypeOf(AbortSignal)).call(this));

    _this2.aborted = false;
    _this2.onabort = null;
    return _this2;
  }

  createClass(AbortSignal, [{
    key: 'toString',
    value: function toString() {
      return '[object AbortSignal]';
    }
  }, {
    key: 'dispatchEvent',
    value: function dispatchEvent(event) {
      if (event.type === 'abort') {
        this.aborted = true;
        if (typeof this.onabort === 'function') {
          this.onabort.call(this, event);
        }
      }

      get(AbortSignal.prototype.__proto__ || Object.getPrototypeOf(AbortSignal.prototype), 'dispatchEvent', this).call(this, event);
    }
  }]);
  return AbortSignal;
}(Emitter);

var AbortController = function () {
  function AbortController() {
    classCallCheck(this, AbortController);

    this.signal = new AbortSignal();
  }

  createClass(AbortController, [{
    key: 'abort',
    value: function abort() {
      var event = void 0;
      try {
        event = new Event('abort');
      } catch (e) {
        if (typeof document !== 'undefined') {
          // For Internet Explorer 11:
          event = document.createEvent('Event');
          event.initEvent('abort', false, false);
        } else {
          // Fallback where document isn't available:
          event = {
            type: 'abort',
            bubbles: false,
            cancelable: false
          };
        }
      }
      this.signal.dispatchEvent(event);
    }
  }, {
    key: 'toString',
    value: function toString() {
      return '[object AbortController]';
    }
  }]);
  return AbortController;
}();

if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  // These are necessary to make sure that we get correct output for:
  // Object.prototype.toString.call(new AbortController())
  AbortController.prototype[Symbol.toStringTag] = 'AbortController';
  AbortSignal.prototype[Symbol.toStringTag] = 'AbortSignal';
}

/**
 * Note: the "fetch.Request" default value is available for fetch imported from
 * the "node-fetch" package and not in browsers. This is OK since browsers
 * will be importing umd-polyfill.js from that path "self" is passed the
 * decorator so the default value will not be used (because browsers that define
 * fetch also has Request). One quirky setup where self.fetch exists but
 * self.Request does not is when the "unfetch" minimal fetch polyfill is used
 * on top of IE11; for this case the browser will try to use the fetch.Request
 * default value which in turn will be undefined but then then "if (Request)"
 * will ensure that you get a patched fetch but still no Request (as expected).
 * @param {fetch, Request = fetch.Request}
 * @returns {fetch: abortableFetch, Request: AbortableRequest}
 */
function abortableFetchDecorator(patchTargets) {
  if ('function' === typeof patchTargets) {
    patchTargets = { fetch: patchTargets };
  }
  var _patchTargets = patchTargets,
      fetch = _patchTargets.fetch,
      _patchTargets$Request = _patchTargets.Request,
      NativeRequest = _patchTargets$Request === undefined ? fetch.Request : _patchTargets$Request,
      _patchTargets$AbortCo = _patchTargets.AbortController,
      NativeAbortController = _patchTargets$AbortCo === undefined ? AbortController : _patchTargets$AbortCo;


  var Request = NativeRequest;
  // Note that the "unfetch" minimal fetch polyfill defines fetch() without
  // defining window.Request, and this polyfill need to work on top of unfetch
  // so the below feature detection is wrapped in if (Request)
  if (Request) {
    // Do feature detecting
    var controller = new NativeAbortController();
    var signal = controller.signal;
    var request = new Request('/', { signal: signal });

    // Browser already supports abortable fetch (like FF v57 and fetch-polyfill)
    if (request.signal) {
      return { fetch: fetch, Request: Request };
    }

    Request = function Request(input, init) {
      var request = new NativeRequest(input, init);
      if (init && init.signal) {
        request.signal = init.signal;
      }
      return request;
    };
    Request.prototype = NativeRequest.prototype;
  }

  var realFetch = fetch;
  var abortableFetch = function abortableFetch(input, init) {
    var signal = Request && Request.prototype.isPrototypeOf(input) ? input.signal : init ? init.signal : undefined;

    if (signal) {
      var abortError = void 0;
      try {
        abortError = new DOMException('Aborted', 'AbortError');
      } catch (err) {
        // IE 11 does not support calling the DOMException constructor, use a
        // regular error object on it instead.
        abortError = new Error('Aborted');
        abortError.name = 'AbortError';
      }

      // Return early if already aborted, thus avoiding making an HTTP request
      if (signal.aborted) {
        return Promise.reject(abortError);
      }

      // Turn an event into a promise, reject it once `abort` is dispatched
      var cancellation = new Promise(function (_, reject) {
        signal.addEventListener('abort', function () {
          return reject(abortError);
        }, { once: true });
      });

      // Return the fastest promise (don't need to wait for request to finish)
      return Promise.race([cancellation, realFetch(input, init)]);
    }

    return realFetch(input, init);
  };

  return { fetch: abortableFetch, Request: Request };
}

(function (self) {

  if (self.AbortController) {
    return;
  }

  self.AbortController = AbortController;
  self.AbortSignal = AbortSignal;

  if (!self.fetch) {
    console.warn('fetch() is not available, cannot install abortcontroller-polyfill');
    return;
  }

  var _abortableFetch = abortableFetchDecorator(self),
      fetch = _abortableFetch.fetch,
      Request = _abortableFetch.Request;

  self.fetch = fetch;
  self.Request = Request;
})(typeof self !== 'undefined' ? self : global);

})));
;
"use strict";

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

if (typeof Globals === "undefined" || Globals === null) {
    var Globals = {};
}

Globals["TokenSource"] = {
    Unspecified: -1,
    none: 0,
    cookie: 1,
    string: 2
};

var ApiToken = function () {
    function ApiToken() {
        _classCallCheck(this, ApiToken);

        this._apiTokenInformation = {
            "source": Globals.TokenSource.Unspecified,
            "value": "",
            "tokenString": "",
            "tokenType": "bearer"
        };
    }

    _createClass(ApiToken, [{
        key: "setApiTokenInformation",
        value: function setApiTokenInformation(ApiTokenSource, Value) {
            switch (ApiTokenSource) {
                case Globals.TokenSource.cookie:
                    this._apiTokenInformation.tokenString = ApiToken.readTokenFromCookie(Value);
                    break;
                case Globals.TokenSource.string:
                    this._apiTokenInformation.tokenString = Value;
                    break;
                case Globals.TokenSource.Unspecified:
                case Globals.TokenType.none:
                default:
                    this._apiTokenInformation.tokenString = "";
                    break;
            }
        }
    }, {
        key: "tokenType",
        set: function set(tokenType) {
            this._apiTokenInformation.tokenType = tokenType;
        }
    }, {
        key: "tokenString",
        get: function get() {
            return this._apiTokenInformation.tokenType + " " + this._apiTokenInformation.tokenString;
        }
    }], [{
        key: "readTokenFromCookie",
        value: function readTokenFromCookie(CookieVariableName) {
            var returnValue = document.cookie.match('(^|;)\\s*' + CookieVariableName + '\\s*=\\s*([^;]+)');
            return returnValue ? returnValue.pop() : '';
        }
    }]);

    return ApiToken;
}();

document["kapitoken"] = new ApiToken();
if (ApiToken.readTokenFromCookie("apiToken").length > 0) {
    document.kapitoken.setApiTokenInformation(Globals.TokenSource.cookie, "apiToken");
}

var WebAPICaller = function () {
    function WebAPICaller(apiToken, globalOptions) {
        _classCallCheck(this, WebAPICaller);

        this.defaultTimeOut = 5000;
        this._connectionTimeout = this.defaultTimeOut;
        this._contentType = "application / json; charset = UTF - 8";
        this._acceptType = "application/json";
        this._useObservables = false;
        this._useModernFetch = WebAPICaller.canSupportModernFunctions();

        if (typeof apiToken === "undefined" || apiToken === null) {
            this._apiTokenInformation = "";
        } else {
            this._apiTokenInformation = apiToken;
        }

        if (typeof globalOptions !== "undefined" && globalOptions !== null) {

            if (typeof globalOptions["connectionTimeout"] !== "undefined" && globalOptions["connectionTimeout"] !== null) {

                if (globalOptions["connectionTimeout"] > this.defaultTimeOut) {
                    this._connectionTimeout = globalOptions["connectionTimeout"];
                }
            }

            if (typeof globalOptions["contentType"] !== "undefined" && globalOptions["contentType"] !== null) {
                this._contentType = globalOptions["contentType"];
            }

            if (typeof globalOptions["acceptType"] !== "undefined" && globalOptions["acceptType"] !== null) {
                this._acceptType = globalOptions["acceptType"];
            }

            if (typeof globalOptions["fromReactPlatform"] === "boolean") {
                this._useObservables = globalOptions["fromReactPlatform"];
            }
        }
    }

    _createClass(WebAPICaller, [{
        key: "_checkAndAddDefaultFetchOptionsIfEmpty",
        value: function _checkAndAddDefaultFetchOptionsIfEmpty(RequestObject) {
            if (_typeof(RequestObject["fetchOptions"]) !== "object" || RequestObject["fetchOptions"] === null) {
                RequestObject["fetchOptions"] = {
                    "headers": {
                        "Content-Type": this._contentType,
                        "method": "GET",
                        "credentials": "same-origin" }
                };
            } else {
                if (typeof RequestObject.fetchOptions['credentials'] === "undefined" || RequestObject.fetchOptions['credentials'] === null) {
                    RequestObject.fetchOptions['credentials'] = 'same-origin';
                }
            }
        }
    }, {
        key: "_modernFetchInformation",
        value: function _modernFetchInformation(RequestObject) {
            if (WebAPICaller.canSupportModernFunctions()) {
                var returnHeader = {};
                var controller = new AbortController();

                this._checkAndAddDefaultFetchOptionsIfEmpty(RequestObject);

                RequestObject.fetchOptions["signal"] = controller.signal;

                var timeoutValue = this.getConnectionTimeoutValue(RequestObject);

                if (_typeof(RequestObject.fetchOptions.body) === "object") {
                    RequestObject.fetchOptions.body = $.param(RequestObject.fetchOptions.body);
                }

                this._appendTokenInformationToHeader(RequestObject, this._apiTokenInformation);

                var timeoutPtr = setTimeout(function () {
                    controller.abort();
                    if (console.log) {
                        console.log("Fetch request took too long");
                    }
                    WebAPICaller._executeExecutionObjectStatusCodeFunction("timeout", RequestObject.executionObj);
                }, timeoutValue);

                var executedExceptionBranch = false;
                fetch(RequestObject.url, RequestObject.fetchOptions).then(function (response) {
                    clearTimeout(timeoutPtr);
                    var responseCopy = response.clone();

                    returnHeader = {
                        "redirected": response.redirected,
                        "ok": response.ok,
                        "status": response.status,
                        "statusText": response.statusText,
                        "type": response.type,
                        "url": response.url
                    };

                    if (WebAPICaller.handleResponseHeader(returnHeader, RequestObject.executionObj)) {
                        return response.json().catch(function (notAJSONResponse) {
                            if (notAJSONResponse instanceof SyntaxError) {
                                return responseCopy.text();
                            } else {
                                throw returnHeader.statusText;
                            }
                        });
                    } else {
                        if (typeof returnHeader !== "undefined" || returnHeader !== null) {
                            WebAPICaller._executeExecutionObjectStatusCodeFunction(returnHeader.status, RequestObject.executionObj, returnHeader);
                            executedExceptionBranch = true;
                        }
                    }
                }).then(function (data) {

                    if (!executedExceptionBranch) {
                        WebAPICaller._executeExecutionObjectStatusCodeFunction(returnHeader.status, RequestObject.executionObj, data);
                    }
                }).catch(function (error) {
                    if (console.log) {
                        console.log("caught " + JSON.stringify(error));
                        console.log("caught " + JSON.stringify(returnHeader));
                    }
                });
            }
        }
    }, {
        key: "_observablesModernFetchInformation",
        value: function _observablesModernFetchInformation(RequestObject) {

            var returnHeader = {};

            this._checkAndAddDefaultFetchOptionsIfEmpty(RequestObject);

            this._appendTokenInformationToHeader(RequestObject, this._apiTokenInformation);

            var timeoutValue = this.getConnectionTimeoutValue(RequestObject);

            return rxjs.fetch.fromFetch(RequestObject.url, RequestObject.fetchOptions).pipe(rxjs.operators.timeout(timeoutValue), rxjs.operators.map(function (response) {

                var responseCopy = response.clone();

                returnHeader = {
                    "redirected": response.redirected,
                    "ok": response.ok,
                    "status": response.status,
                    "statusText": response.statusText,
                    "type": response.type,
                    "url": response.url
                };

                if (WebAPICaller.handleResponseHeader(returnHeader, RequestObject.executionObj)) {
                    response.json().then(function (returnData) {

                        var mappedData = WebAPICaller._executeObservablesExecutionObjectStatusCodeFunction(returnHeader.status, RequestObject.executionObj, returnData);

                        if (mappedData !== null && typeof mappedData !== "undefined") {
                            return mappedData;
                        }
                        return;
                    }).catch(function (notAJSONResponse) {
                        if (notAJSONResponse instanceof SyntaxError) {
                            responseCopy.text().then(function (returnData) {

                                var mappedData = WebAPICaller._executeObservablesExecutionObjectStatusCodeFunction(returnHeader.status, RequestObject.executionObj, returnData);

                                if (mappedData !== null && typeof mappedData !== "undefined") {
                                    return mappedData;
                                }
                                return;
                            });
                        } else {
                            throw returnHeader.statusText;
                        }
                    });
                } else {
                    if (typeof returnHeader !== "undefined" || returnHeader !== null) {
                        WebAPICaller._executeObservablesExecutionObjectStatusCodeFunction(returnHeader.status, RequestObject.executionObj, returnHeader);
                    }
                }
            }), rxjs.operators.catchError(function (error) {

                if (error === null && (typeof error === "undefined" ? "undefined" : _typeof(error)) === "object" && typeof error.name === "string" && typeof error.message === "string") {
                    return rxjs.of(null);
                }

                var status = error.status;

                if (error.name === "TimeoutError") {
                    status = "timeout";
                }

                var mappedData = WebAPICaller._executeObservablesExecutionObjectStatusCodeFunction(status, RequestObject.executionObj, error.message);

                if (mappedData !== null && typeof mappedData !== "undefined") {
                    return rxjs.of(mappedData);
                } else {
                    return rxjs.of(null);
                }
            }));
        }
    }, {
        key: "getConnectionTimeoutValue",
        value: function getConnectionTimeoutValue(RequestObject) {
            var timeoutValue = null;

            if (typeof RequestObject !== "undefined" && RequestObject !== null && typeof RequestObject.timeout !== "undefined" && RequestObject.timeout !== null) {
                try {
                    timeoutValue = parseInt(RequestObject.timeout, 10);
                    if (timeoutValue < this.defaultTimeOut) {
                        timeoutValue = this.defaultTimeOut;
                    }
                } catch (notNumber) {
                    timeoutValue = this.defaultTimeOut;
                }
            } else {
                    timeoutValue = parseInt(this._connectionTimeout, 10);
                }

            return timeoutValue;
        }
    }, {
        key: "_legacyFetchInformation",
        value: function _legacyFetchInformation(RequestObject) {
            this._checkAndAddDefaultFetchOptionsIfEmpty(RequestObject);

            this._appendTokenInformationToHeader(RequestObject, this._apiTokenInformation);

            var jQueryAjaxOptions = {
                url: RequestObject.url,
                headers: RequestObject.fetchOptions.headers,
                type: RequestObject.fetchOptions.method,
                timeout: this.getConnectionTimeoutValue(RequestObject)
            };

            if (typeof RequestObject.fetchOptions["body"] !== "undefined" && RequestObject.fetchOptions["body"] !== null) {
                if (_typeof(RequestObject.fetchOptions.body) === "object") {
                    jQueryAjaxOptions["data"] = $.param(RequestObject.fetchOptions.body);
                } else {
                        jQueryAjaxOptions["data"] = RequestObject.fetchOptions.body;
                    }
            }

            if (_typeof(RequestObject.fetchOptions["method"]) !== undefined && RequestObject.fetchOptions["method"] !== null) {
                jQueryAjaxOptions["type"] = RequestObject.fetchOptions.method;
            } else {
                    jQueryAjaxOptions["type"] = "GET";
                }

            $.ajax(jQueryAjaxOptions).fail(function (jqXHR, textStatus, errorThrown) {
                var statusCodeToUse;
                if (textStatus === "timeout") {
                    statusCodeToUse = textStatus;
                } else {
                    statusCodeToUse = parseInt(jqXHR.status, 10);

                    if (statusCodeToUse === 0) {
                        statusCodeToUse = 520;
                    }
                }

                RequestObject.executionObj[statusCodeToUse].method.apply(null, [errorThrown + " " + JSON.stringify(jqXHR)]);
            }).done(function (data, textStatus, jqXHR) {
                WebAPICaller._executeExecutionObjectStatusCodeFunction(jqXHR.status, RequestObject.executionObj, data);
            });
        }
    }, {
        key: "_observablesLegacyFetchInformation",
        value: function _observablesLegacyFetchInformation(RequestObject) {

            this._checkAndAddDefaultFetchOptionsIfEmpty(RequestObject);

            this._appendTokenInformationToHeader(RequestObject, this._apiTokenInformation);

            var timeoutValue = this.getConnectionTimeoutValue(RequestObject);

            return rxjs.ajax.ajax(_extends({
                url: RequestObject.url
            }, RequestObject.fetchOptions)).pipe(rxjs.operators.timeout(timeoutValue), rxjs.operators.map(function (response) {

                var mappedData = WebAPICaller._executeObservablesExecutionObjectStatusCodeFunction(response.status, RequestObject.executionObj, response.response);

                if (mappedData !== null && typeof mappedData !== "undefined") {
                    return mappedData;
                }
            }), rxjs.operators.catchError(function (error) {
                if (error === null && (typeof error === "undefined" ? "undefined" : _typeof(error)) === "object" && typeof error.name !== "string" && typeof error.message !== "string") {
                    return rxjs.of(null);
                }

                var status = error.status;

                if (error.name === "AjaxTimeoutError" || error.name === "TimeoutError") {
                    status = "timeout";
                }

                var mappedData = WebAPICaller._executeObservablesExecutionObjectStatusCodeFunction(status, RequestObject.executionObj, error.message);

                if (mappedData !== null && typeof mappedData !== "undefined") {
                    return rxjs.of(mappedData);
                } else {
                    return rxjs.of(null);
                }
            }));
        }
    }, {
        key: "_appendTokenInformationToHeader",
        value: function _appendTokenInformationToHeader(RequestObj, ApiToken) {
            if (typeof RequestObj === "undefined" || RequestObj === null || typeof ApiToken !== "string" || ApiToken === null || ApiToken.length === 0) {
                return;
            } else {
                if (RequestObj.fetchOptions.hasOwnProperty("headers")) {
                    if (!RequestObj.fetchOptions.headers.hasOwnProperty("authorization")) {
                        RequestObj.fetchOptions.headers["authorization"] = ApiToken;
                    }

                    if (!RequestObj.fetchOptions.headers.hasOwnProperty("content-type")) {
                        RequestObj.fetchOptions.headers["content-type"] = this._contentType;
                    }

                    if (!RequestObj.fetchOptions.headers.hasOwnProperty("accept")) {
                        RequestObj.fetchOptions.headers["accept"] = this._acceptType;
                    }
                } else {
                    RequestObj.fetchOptions["headers"] = {
                        "accept": this._acceptType,
                        "content-type": this._contentType,
                        "authorization": ApiToken
                    };
                }
            }
        }
    }, {
        key: "fetchInformation",
        value: function fetchInformation(RequestObj) {
            var force = false;
            var useObservables = false;

            try {
                useObservables = this._useObservables;
            } catch (e) {
                useObservables = false;
            }

            if (!useObservables) {
                if (this._useModernFetch && !force) {
                    if (console.log) {
                        console.log('modern');
                    }
                    this._modernFetchInformation(RequestObj);
                } else {
                    if (console.log) {
                        console.log('legacy');
                    }
                    this._legacyFetchInformation(RequestObj);
                }
            } else {

                if (this._useModernFetch && !force) {
                    return this._observablesModernFetchInformation(RequestObj);
                } else {
                    return this._observablesLegacyFetchInformation(RequestObj);
                }
            }
        }
    }], [{
        key: "canSupportModernFunctions",
        value: function canSupportModernFunctions() {
            try {
                if ('withCredentials' in new XMLHttpRequest()) {
                    return true;
                } else if (typeof XDomainRequest !== "undefined") {
                    return false;
                } else {
                    return false;
                }
            } catch (e) {
                return false;
            }
        }
    }, {
        key: "handleResponseHeader",
        value: function handleResponseHeader(ReturnHeader, ExecutionObj) {
            var doThrowError = true;
            var returnStatus = parseInt(ReturnHeader.status, 10);

            if (typeof ExecutionObj[returnStatus] !== "undefined" && typeof ExecutionObj[returnStatus].method === "function") {
                doThrowError = false;
            }

            if (doThrowError && !ReturnHeader.ok) {
                throw "Site " + ReturnHeader.url + " returned " + ReturnHeader.status + " - " + ReturnHeader.statusText;
            }

            return ReturnHeader.ok;
        }
    }, {
        key: "objectToFormPost",
        value: function objectToFormPost(ObjectToConvert) {
            var formBody = [];

            for (var property in ObjectToConvert) {
                formBody.push(encodeURIComponent(property) + "=" + encodeURIComponent(ObjectToConvert[property]));
            }
            return formBody.join("&");
        }
    }, {
        key: "_executeObservablesExecutionObjectStatusCodeFunction",
        value: function _executeObservablesExecutionObjectStatusCodeFunction(ResponseStatus, ExecutionObj, ResponseData) {

            if (ResponseStatus === null || typeof ResponseStatus === "undefined" || ExecutionObj === null || typeof ExecutionObj === "undefined" || ResponseData === null || typeof ResponseData === "undefined") {
                return;
            }

            if (ExecutionObj[ResponseStatus] !== null && _typeof(ExecutionObj[ResponseStatus]) === "object" && typeof ExecutionObj[ResponseStatus].method === "function") {
                try {
                    return ExecutionObj[ResponseStatus].method(ResponseData);
                } catch (e) {
                    return;
                }
            }
        }
    }, {
        key: "_executeExecutionObjectStatusCodeFunction",
        value: function _executeExecutionObjectStatusCodeFunction(HttpStatusCode, ExecutionObject, Data) {
            var safeData;
            if (typeof ExecutionObject === "undefined" || ExecutionObject === null) {
                return;
            }
            if (typeof Data === "undefined" || Data === null) {
                safeData = [];
            } else {
                safeData = Data;
            }
            try {
                var execObj = ExecutionObject[HttpStatusCode];
                var exec = execObj.method;
                var params = [safeData].concat(execObj.params);
                return exec.apply(null, params);
            } catch (err) {
                throw err.message;
            }
        }
    }]);

    return WebAPICaller;
}();

var WebAPIUtilities = function () {
    function WebAPIUtilities() {
        _classCallCheck(this, WebAPIUtilities);
    }

    _createClass(WebAPIUtilities, null, [{
        key: "checkIfFetchParamsValid",
        value: function checkIfFetchParamsValid(url, fetchOptions, executionObj) {

            if (typeof url === "string" && fetchOptions !== null && (typeof fetchOptions === "undefined" ? "undefined" : _typeof(fetchOptions)) === "object" && executionObj !== null && (typeof executionObj === "undefined" ? "undefined" : _typeof(executionObj)) === "object") {
                return true;
            } else {
                return false;
            }
        }
    }]);

    return WebAPIUtilities;
}();

if (document.kapitoken != null && document.kapitoken.tokenString != null) {
    document.knotiaAPICaller = new WebAPICaller(document.kapitoken.tokenString, null);
}

document.knotiaServerCaller = new WebAPICaller(null, null);;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var FetchExecution = function () {
    function FetchExecution() {
        _classCallCheck(this, FetchExecution);

        this._execObject = [];
    }

    _createClass(FetchExecution, [{
        key: "addExecution",
        value: function addExecution(StatusCode, MethodToExecute, Parameters) {
            var localSafeParams;
            if (typeof Parameters === "undefined" || Parameters === null) {
                localSafeParams = [];
            } else {
                localSafeParams = Parameters;
            }
            this._execObject[StatusCode] = {
                "method": MethodToExecute,
                "params": localSafeParams
            };
        }
    }, {
        key: "executionObject",
        get: function get() {
            return this._execObject;
        }
    }]);

    return FetchExecution;
}();;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

function defaultTimeout() {
    console.log("Sorry, an error has occurred. Please contact us if you continue to have issues.");
}

function default500() {
    console.log("Sorry, an error has occurred. Please contact us if you continue to have issues.");
}

function default400(ApiData) {
    var errorCode = ApiData.statusText;
    if (!isNaN(errorCode)) {
        default400WithErrorCode(errorCode);
    } else {
        alert("Sorry, an error has occurred. Please contact us if you continue to have issues.");
    }
}

function default401() {
    window.location.href = "/Login/Login.aspx?errorID=1";
}

function default404() {
    console.log("Sorry, an error has occurred. Please contact us if you continue to have issues.");
}

function default520(message) {
    console.log("Sorry, an error has occurred. Please contact us if you continue to have issues.");
}

function default400WithErrorCode(ErrorCode) {

    var errorMessage = null;
    switch (ErrorCode) {
        case "1001":
            errorMessage = GetString("str_Query_UnknownError");
            break;
        case "1002":
            errorMessage = GetString("str_Query_Malformed");
            break;
        case "1003":
            errorMessage = GetString("str_Query_Unsupported");
            break;
        case "1004":
            errorMessage = GetString("str_Query_SyntaxError");
            break;
        case "1005":
            errorMessage = GetString("str_Query_IncorrectDataType");
            break;
        case "1006":
            errorMessage = GetString("str_Query_SemanticError");
            break;
        case "1007":
            errorMessage = GetString("str_Query_ElasticSearchError");
            break;
        case "1008":
            errorMessage = GetString("str_Query_RangeError");
            break;
        case "1009":
            errorMessage = GetString("str_Query_NonParsingRrelatedError");
            break;
        case "2001":
            errorMessage = GetString("str_Ambiguous_Fetch");
            break;
    }

    if (!Globals.Utilities.isUndefinedOrNull(errorMessage) && currentPage && currentPage.ModalTypes && currentPage.ModalTypes.DEFAULT_400_ERROR_MESSAGE) {
        Document.default400ErrorMessage = errorMessage;
        currentPage.DAL.updateExpandedModalState(currentPage.ModalTypes.DEFAULT_400_ERROR_MESSAGE);
    } else {
        alert("Sorry, an error has occurred. Please contact us if you continue to have issues.");
    }
}

var KnotiaFetchExecution = function (_FetchExecution) {
    _inherits(KnotiaFetchExecution, _FetchExecution);

    function KnotiaFetchExecution() {
        _classCallCheck(this, KnotiaFetchExecution);

        var _this = _possibleConstructorReturn(this, (KnotiaFetchExecution.__proto__ || Object.getPrototypeOf(KnotiaFetchExecution)).call(this));

        _this.buildKnotiaDefaults();
        return _this;
    }

    _createClass(KnotiaFetchExecution, [{
        key: "buildKnotiaDefaults",
        value: function buildKnotiaDefaults() {
            _get(KnotiaFetchExecution.prototype.__proto__ || Object.getPrototypeOf(KnotiaFetchExecution.prototype), "addExecution", this).call(this, 400, default400, []);
            _get(KnotiaFetchExecution.prototype.__proto__ || Object.getPrototypeOf(KnotiaFetchExecution.prototype), "addExecution", this).call(this, 401, default401, []);
            _get(KnotiaFetchExecution.prototype.__proto__ || Object.getPrototypeOf(KnotiaFetchExecution.prototype), "addExecution", this).call(this, 404, default404, []);
            _get(KnotiaFetchExecution.prototype.__proto__ || Object.getPrototypeOf(KnotiaFetchExecution.prototype), "addExecution", this).call(this, 500, default500, []);
            _get(KnotiaFetchExecution.prototype.__proto__ || Object.getPrototypeOf(KnotiaFetchExecution.prototype), "addExecution", this).call(this, 520, default520, []);
            _get(KnotiaFetchExecution.prototype.__proto__ || Object.getPrototypeOf(KnotiaFetchExecution.prototype), "addExecution", this).call(this, "timeout", defaultTimeout, []);
        }
    }]);

    return KnotiaFetchExecution;
}(FetchExecution);;
/** @license React v16.14.0
 * 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.
 */
'use strict'; (function (d, r) { "object" === typeof exports && "undefined" !== typeof module ? r(exports) : "function" === typeof define && define.amd ? define(["exports"], r) : (d = d || self, r(d.React = {})) })(this, function (d) {
    function r(a) { for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++)b += "&args[]=" + encodeURIComponent(arguments[c]); return "Minified React error #" + a + "; visit " + b + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." }
    function w(a, b, c) { this.props = a; this.context = b; this.refs = ba; this.updater = c || ca } function da() { } function L(a, b, c) { this.props = a; this.context = b; this.refs = ba; this.updater = c || ca } function ea(a, b, c) {
        var g, e = {}, fa = null, d = null; if (null != b) for (g in void 0 !== b.ref && (d = b.ref), void 0 !== b.key && (fa = "" + b.key), b) ha.call(b, g) && !ia.hasOwnProperty(g) && (e[g] = b[g]); var h = arguments.length - 2; if (1 === h) e.children = c; else if (1 < h) { for (var k = Array(h), f = 0; f < h; f++)k[f] = arguments[f + 2]; e.children = k } if (a && a.defaultProps) for (g in h = a.defaultProps,
            h) void 0 === e[g] && (e[g] = h[g]); return { $$typeof: x, type: a, key: fa, ref: d, props: e, _owner: M.current }
    } function va(a, b) { return { $$typeof: x, type: a.type, key: b, ref: a.ref, props: a.props, _owner: a._owner } } function N(a) { return "object" === typeof a && null !== a && a.$$typeof === x } function wa(a) { var b = { "=": "=0", ":": "=2" }; return "$" + ("" + a).replace(/[=:]/g, function (a) { return b[a] }) } function ja(a, b, c, g) {
        if (C.length) { var e = C.pop(); e.result = a; e.keyPrefix = b; e.func = c; e.context = g; e.count = 0; return e } return {
            result: a, keyPrefix: b, func: c,
            context: g, count: 0
        }
    } function ka(a) { a.result = null; a.keyPrefix = null; a.func = null; a.context = null; a.count = 0; 10 > C.length && C.push(a) } function O(a, b, c, g) {
        var e = typeof a; if ("undefined" === e || "boolean" === e) a = null; var d = !1; if (null === a) d = !0; else switch (e) { case "string": case "number": d = !0; break; case "object": switch (a.$$typeof) { case x: case xa: d = !0 } }if (d) return c(g, a, "" === b ? "." + P(a, 0) : b), 1; d = 0; b = "" === b ? "." : b + ":"; if (Array.isArray(a)) for (var f = 0; f < a.length; f++) { e = a[f]; var h = b + P(e, f); d += O(e, h, c, g) } else if (null === a ||
            "object" !== typeof a ? h = null : (h = la && a[la] || a["@@iterator"], h = "function" === typeof h ? h : null), "function" === typeof h) for (a = h.call(a), f = 0; !(e = a.next()).done;)e = e.value, h = b + P(e, f++), d += O(e, h, c, g); else if ("object" === e) throw c = "" + a, Error(r(31, "[object Object]" === c ? "object with keys {" + Object.keys(a).join(", ") + "}" : c, "")); return d
    } function Q(a, b, c) { return null == a ? 0 : O(a, "", b, c) } function P(a, b) { return "object" === typeof a && null !== a && null != a.key ? wa(a.key) : b.toString(36) } function ya(a, b, c) {
        a.func.call(a.context, b,
            a.count++)
    } function za(a, b, c) { var g = a.result, e = a.keyPrefix; a = a.func.call(a.context, b, a.count++); Array.isArray(a) ? R(a, g, c, function (a) { return a }) : null != a && (N(a) && (a = va(a, e + (!a.key || b && b.key === a.key ? "" : ("" + a.key).replace(ma, "$&/") + "/") + c)), g.push(a)) } function R(a, b, c, g, e) { var d = ""; null != c && (d = ("" + c).replace(ma, "$&/") + "/"); b = ja(b, d, g, e); Q(a, za, b); ka(b) } function t() { var a = na.current; if (null === a) throw Error(r(321)); return a } function S(a, b) {
        var c = a.length; a.push(b); a: for (; ;) {
            var g = c - 1 >>> 1, e = a[g]; if (void 0 !==
                e && 0 < D(e, b)) a[g] = b, a[c] = e, c = g; else break a
        }
    } function n(a) { a = a[0]; return void 0 === a ? null : a } function E(a) { var b = a[0]; if (void 0 !== b) { var c = a.pop(); if (c !== b) { a[0] = c; a: for (var g = 0, e = a.length; g < e;) { var d = 2 * (g + 1) - 1, f = a[d], h = d + 1, k = a[h]; if (void 0 !== f && 0 > D(f, c)) void 0 !== k && 0 > D(k, f) ? (a[g] = k, a[h] = c, g = h) : (a[g] = f, a[d] = c, g = d); else if (void 0 !== k && 0 > D(k, c)) a[g] = k, a[h] = c, g = h; else break a } } return b } return null } function D(a, b) { var c = a.sortIndex - b.sortIndex; return 0 !== c ? c : a.id - b.id } function F(a) {
        for (var b = n(u); null !==
            b;) { if (null === b.callback) E(u); else if (b.startTime <= a) E(u), b.sortIndex = b.expirationTime, S(p, b); else break; b = n(u) }
    } function T(a) { y = !1; F(a); if (!v) if (null !== n(p)) v = !0, z(U); else { var b = n(u); null !== b && G(T, b.startTime - a) } } function U(a, b) {
        v = !1; y && (y = !1, V()); H = !0; var c = m; try {
            F(b); for (l = n(p); null !== l && (!(l.expirationTime > b) || a && !W());) { var g = l.callback; if (null !== g) { l.callback = null; m = l.priorityLevel; var e = g(l.expirationTime <= b); b = q(); "function" === typeof e ? l.callback = e : l === n(p) && E(p); F(b) } else E(p); l = n(p) } if (null !==
                l) var d = !0; else { var f = n(u); null !== f && G(T, f.startTime - b); d = !1 } return d
        } finally { l = null, m = c, H = !1 }
    } function oa(a) { switch (a) { case 1: return -1; case 2: return 250; case 5: return 1073741823; case 4: return 1E4; default: return 5E3 } } var f = "function" === typeof Symbol && Symbol.for, x = f ? Symbol.for("react.element") : 60103, xa = f ? Symbol.for("react.portal") : 60106, Aa = f ? Symbol.for("react.fragment") : 60107, Ba = f ? Symbol.for("react.strict_mode") : 60108, Ca = f ? Symbol.for("react.profiler") : 60114, Da = f ? Symbol.for("react.provider") : 60109,
        Ea = f ? Symbol.for("react.context") : 60110, Fa = f ? Symbol.for("react.forward_ref") : 60112, Ga = f ? Symbol.for("react.suspense") : 60113, Ha = f ? Symbol.for("react.memo") : 60115, Ia = f ? Symbol.for("react.lazy") : 60116, la = "function" === typeof Symbol && Symbol.iterator, pa = Object.getOwnPropertySymbols, Ja = Object.prototype.hasOwnProperty, Ka = Object.prototype.propertyIsEnumerable, I = function () {
            try {
                if (!Object.assign) return !1; var a = new String("abc"); a[5] = "de"; if ("5" === Object.getOwnPropertyNames(a)[0]) return !1; var b = {}; for (a = 0; 10 > a; a++)b["_" +
                    String.fromCharCode(a)] = a; if ("0123456789" !== Object.getOwnPropertyNames(b).map(function (a) { return b[a] }).join("")) return !1; var c = {}; "abcdefghijklmnopqrst".split("").forEach(function (a) { c[a] = a }); return "abcdefghijklmnopqrst" !== Object.keys(Object.assign({}, c)).join("") ? !1 : !0
            } catch (g) { return !1 }
        }() ? Object.assign : function (a, b) {
            if (null === a || void 0 === a) throw new TypeError("Object.assign cannot be called with null or undefined"); var c = Object(a); for (var g, e = 1; e < arguments.length; e++) {
                var d = Object(arguments[e]);
                for (var f in d) Ja.call(d, f) && (c[f] = d[f]); if (pa) { g = pa(d); for (var h = 0; h < g.length; h++)Ka.call(d, g[h]) && (c[g[h]] = d[g[h]]) }
            } return c
        }, ca = { isMounted: function (a) { return !1 }, enqueueForceUpdate: function (a, b, c) { }, enqueueReplaceState: function (a, b, c, d) { }, enqueueSetState: function (a, b, c, d) { } }, ba = {}; w.prototype.isReactComponent = {}; w.prototype.setState = function (a, b) { if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error(r(85)); this.updater.enqueueSetState(this, a, b, "setState") }; w.prototype.forceUpdate =
            function (a) { this.updater.enqueueForceUpdate(this, a, "forceUpdate") }; da.prototype = w.prototype; f = L.prototype = new da; f.constructor = L; I(f, w.prototype); f.isPureReactComponent = !0; var M = { current: null }, ha = Object.prototype.hasOwnProperty, ia = { key: !0, ref: !0, __self: !0, __source: !0 }, ma = /\/+/g, C = [], na = { current: null }, X; if ("undefined" === typeof window || "function" !== typeof MessageChannel) {
                var A = null, qa = null, ra = function () { if (null !== A) try { var a = q(); A(!0, a); A = null } catch (b) { throw setTimeout(ra, 0), b; } }, La = Date.now(); var q =
                    function () { return Date.now() - La }; var z = function (a) { null !== A ? setTimeout(z, 0, a) : (A = a, setTimeout(ra, 0)) }; var G = function (a, b) { qa = setTimeout(a, b) }; var V = function () { clearTimeout(qa) }; var W = function () { return !1 }; f = X = function () { }
            } else {
                var Y = window.performance, sa = window.Date, Ma = window.setTimeout, Na = window.clearTimeout; "undefined" !== typeof console && (f = window.cancelAnimationFrame, "function" !== typeof window.requestAnimationFrame && 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 f && console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")); if ("object" === typeof Y && "function" === typeof Y.now) q = function () { return Y.now() }; else { var Oa = sa.now(); q = function () { return sa.now() - Oa } } var J = !1, K = null, Z = -1, ta = 5, ua = 0; W = function () { return q() >= ua }; f = function () { }; X = function (a) {
                    0 > a || 125 < a ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported") :
                        ta = 0 < a ? Math.floor(1E3 / a) : 5
                    }; var B = new MessageChannel, aa = B.port2; B.port1.onmessage = function () { if (null !== K) { var a = q(); ua = a + ta; try { K(!0, a) ? aa.postMessage(null) : (J = !1, K = null) } catch (b) { throw aa.postMessage(null), b; } } else J = !1 }; z = function (a) { K = a; J || (J = !0, aa.postMessage(null)) }; G = function (a, b) { Z = Ma(function () { a(q()) }, b) }; V = function () { Na(Z); Z = -1 }
    } var p = [], u = [], Pa = 1, l = null, m = 3, H = !1, v = !1, y = !1, Qa = 0; B = { ReactCurrentDispatcher: na, ReactCurrentOwner: M, IsSomeRendererActing: { current: !1 }, assign: I }; I(B, {
        Scheduler: {
            __proto__: null,
            unstable_ImmediatePriority: 1, unstable_UserBlockingPriority: 2, unstable_NormalPriority: 3, unstable_IdlePriority: 5, unstable_LowPriority: 4, unstable_runWithPriority: function (a, b) { switch (a) { case 1: case 2: case 3: case 4: case 5: break; default: a = 3 }var c = m; m = a; try { return b() } finally { m = c } }, unstable_next: function (a) { switch (m) { case 1: case 2: case 3: var b = 3; break; default: b = m }var c = m; m = b; try { return a() } finally { m = c } }, unstable_scheduleCallback: function (a, b, c) {
                var d = q(); if ("object" === typeof c && null !== c) {
                    var e = c.delay;
                    e = "number" === typeof e && 0 < e ? d + e : d; c = "number" === typeof c.timeout ? c.timeout : oa(a)
                } else c = oa(a), e = d; c = e + c; a = { id: Pa++, callback: b, priorityLevel: a, startTime: e, expirationTime: c, sortIndex: -1 }; e > d ? (a.sortIndex = e, S(u, a), null === n(p) && a === n(u) && (y ? V() : y = !0, G(T, e - d))) : (a.sortIndex = c, S(p, a), v || H || (v = !0, z(U))); return a
            }, unstable_cancelCallback: function (a) { a.callback = null }, unstable_wrapCallback: function (a) { var b = m; return function () { var c = m; m = b; try { return a.apply(this, arguments) } finally { m = c } } }, unstable_getCurrentPriorityLevel: function () { return m },
            unstable_shouldYield: function () { var a = q(); F(a); var b = n(p); return b !== l && null !== l && null !== b && null !== b.callback && b.startTime <= a && b.expirationTime < l.expirationTime || W() }, unstable_requestPaint: f, unstable_continueExecution: function () { v || H || (v = !0, z(U)) }, unstable_pauseExecution: function () { }, unstable_getFirstCallbackNode: function () { return n(p) }, get unstable_now() { return q }, get unstable_forceFrameRate() { return X }, unstable_Profiling: null
        }, SchedulerTracing: {
            __proto__: null, __interactionsRef: null, __subscriberRef: null,
            unstable_clear: function (a) { return a() }, unstable_getCurrent: function () { return null }, unstable_getThreadID: function () { return ++Qa }, unstable_trace: function (a, b, c) { return c() }, unstable_wrap: function (a) { return a }, unstable_subscribe: function (a) { }, unstable_unsubscribe: function (a) { }
        }
    }); d.Children = {
        map: function (a, b, c) { if (null == a) return a; var d = []; R(a, d, null, b, c); return d }, forEach: function (a, b, c) { if (null == a) return a; b = ja(null, null, b, c); Q(a, ya, b); ka(b) }, count: function (a) { return Q(a, function () { return null }, null) },
        toArray: function (a) { var b = []; R(a, b, null, function (a) { return a }); return b }, only: function (a) { if (!N(a)) throw Error(r(143)); return a }
    }; d.Component = w; d.Fragment = Aa; d.Profiler = Ca; d.PureComponent = L; d.StrictMode = Ba; d.Suspense = Ga; d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = B; d.cloneElement = function (a, b, c) {
        if (null === a || void 0 === a) throw Error(r(267, a)); var d = I({}, a.props), e = a.key, f = a.ref, m = a._owner; if (null != b) {
        void 0 !== b.ref && (f = b.ref, m = M.current); void 0 !== b.key && (e = "" + b.key); if (a.type && a.type.defaultProps) var h =
            a.type.defaultProps; for (k in b) ha.call(b, k) && !ia.hasOwnProperty(k) && (d[k] = void 0 === b[k] && void 0 !== h ? h[k] : b[k])
        } var k = arguments.length - 2; if (1 === k) d.children = c; else if (1 < k) { h = Array(k); for (var l = 0; l < k; l++)h[l] = arguments[l + 2]; d.children = h } return { $$typeof: x, type: a.type, key: e, ref: f, props: d, _owner: m }
    }; d.createContext = function (a, b) {
    void 0 === b && (b = null); a = { $$typeof: Ea, _calculateChangedBits: b, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null }; a.Provider = { $$typeof: Da, _context: a }; return a.Consumer =
        a
    }; d.createElement = ea; d.createFactory = function (a) { var b = ea.bind(null, a); b.type = a; return b }; d.createRef = function () { return { current: null } }; d.forwardRef = function (a) { return { $$typeof: Fa, render: a } }; d.isValidElement = N; d.lazy = function (a) { return { $$typeof: Ia, _ctor: a, _status: -1, _result: null } }; d.memo = function (a, b) { return { $$typeof: Ha, type: a, compare: void 0 === b ? null : b } }; d.useCallback = function (a, b) { return t().useCallback(a, b) }; d.useContext = function (a, b) { return t().useContext(a, b) }; d.useDebugValue = function (a, b) { };
    d.useEffect = function (a, b) { return t().useEffect(a, b) }; d.useImperativeHandle = function (a, b, c) { return t().useImperativeHandle(a, b, c) }; d.useLayoutEffect = function (a, b) { return t().useLayoutEffect(a, b) }; d.useMemo = function (a, b) { return t().useMemo(a, b) }; d.useReducer = function (a, b, c) { return t().useReducer(a, b, c) }; d.useRef = function (a) { return t().useRef(a) }; d.useState = function (a) { return t().useState(a) }; d.version = "16.14.0"
});;
/** @license React v16.14.0
 * 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.
 */
/*
 Modernizr 3.0.0pre (Custom Build) | MIT
*/
'use strict'; (function (I, ea) { "object" === typeof exports && "undefined" !== typeof module ? ea(exports, require("react")) : "function" === typeof define && define.amd ? define(["exports", "react"], ea) : (I = I || self, ea(I.ReactDOM = {}, I.React)) })(this, function (I, ea) {
    function k(a) { for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++)b += "&args[]=" + encodeURIComponent(arguments[c]); return "Minified React error #" + a + "; visit " + b + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." }
    function ji(a, b, c, d, e, f, g, h, m) { yb = !1; gc = null; ki.apply(li, arguments) } function mi(a, b, c, d, e, f, g, h, m) { ji.apply(this, arguments); if (yb) { if (yb) { var n = gc; yb = !1; gc = null } else throw Error(k(198)); hc || (hc = !0, pd = n) } } function lf(a, b, c) { var d = a.type || "unknown-event"; a.currentTarget = mf(c); mi(d, b, void 0, a); a.currentTarget = null } function nf() {
        if (ic) for (var a in cb) {
            var b = cb[a], c = ic.indexOf(a); if (!(-1 < c)) throw Error(k(96, a)); if (!jc[c]) {
                if (!b.extractEvents) throw Error(k(97, a)); jc[c] = b; c = b.eventTypes; for (var d in c) {
                    var e =
                        void 0; var f = c[d], g = b, h = d; if (qd.hasOwnProperty(h)) throw Error(k(99, h)); qd[h] = f; var m = f.phasedRegistrationNames; if (m) { for (e in m) m.hasOwnProperty(e) && of(m[e], g, h); e = !0 } else f.registrationName ? (of(f.registrationName, g, h), e = !0) : e = !1; if (!e) throw Error(k(98, d, a));
                }
            }
        }
    } function of(a, b, c) { if (db[a]) throw Error(k(100, a)); db[a] = b; rd[a] = b.eventTypes[c].dependencies } function pf(a) {
        var b = !1, c; for (c in a) if (a.hasOwnProperty(c)) {
            var d = a[c]; if (!cb.hasOwnProperty(c) || cb[c] !== d) {
                if (cb[c]) throw Error(k(102, c)); cb[c] =
                    d; b = !0
            }
        } b && nf()
    } function qf(a) { if (a = rf(a)) { if ("function" !== typeof sd) throw Error(k(280)); var b = a.stateNode; b && (b = td(b), sd(a.stateNode, a.type, b)) } } function sf(a) { eb ? fb ? fb.push(a) : fb = [a] : eb = a } function tf() { if (eb) { var a = eb, b = fb; fb = eb = null; qf(a); if (b) for (a = 0; a < b.length; a++)qf(b[a]) } } function ud() { if (null !== eb || null !== fb) vd(), tf() } function uf(a, b, c) { if (wd) return a(b, c); wd = !0; try { return vf(a, b, c) } finally { wd = !1, ud() } } function ni(a) {
        if (wf.call(xf, a)) return !0; if (wf.call(yf, a)) return !1; if (oi.test(a)) return xf[a] =
            !0; yf[a] = !0; return !1
    } function pi(a, b, c, d) { if (null !== c && 0 === c.type) return !1; switch (typeof b) { case "function": case "symbol": return !0; case "boolean": if (d) return !1; if (null !== c) return !c.acceptsBooleans; a = a.toLowerCase().slice(0, 5); return "data-" !== a && "aria-" !== a; default: return !1 } } function qi(a, b, c, d) { if (null === b || "undefined" === typeof b || pi(a, b, c, d)) return !0; if (d) return !1; if (null !== c) switch (c.type) { case 3: return !b; case 4: return !1 === b; case 5: return isNaN(b); case 6: return isNaN(b) || 1 > b }return !1 } function L(a,
        b, c, d, e, f) { this.acceptsBooleans = 2 === b || 3 === b || 4 === b; this.attributeName = d; this.attributeNamespace = e; this.mustUseProperty = c; this.propertyName = a; this.type = b; this.sanitizeURL = f } function xd(a, b, c, d) {
            var e = E.hasOwnProperty(b) ? E[b] : null; var f = null !== e ? 0 === e.type : d ? !1 : !(2 < b.length) || "o" !== b[0] && "O" !== b[0] || "n" !== b[1] && "N" !== b[1] ? !1 : !0; f || (qi(b, c, e, d) && (c = null), d || null === e ? ni(b) && (null === c ? a.removeAttribute(b) : a.setAttribute(b, "" + c)) : e.mustUseProperty ? a[e.propertyName] = null === c ? 3 === e.type ? !1 : "" : c : (b = e.attributeName,
                d = e.attributeNamespace, null === c ? a.removeAttribute(b) : (e = e.type, c = 3 === e || 4 === e && !0 === c ? "" : "" + c, d ? a.setAttributeNS(d, b, c) : a.setAttribute(b, c))))
        } function zb(a) { if (null === a || "object" !== typeof a) return null; a = zf && a[zf] || a["@@iterator"]; return "function" === typeof a ? a : null } function ri(a) { if (-1 === a._status) { a._status = 0; var b = a._ctor; b = b(); a._result = b; b.then(function (b) { 0 === a._status && (b = b.default, a._status = 1, a._result = b) }, function (b) { 0 === a._status && (a._status = 2, a._result = b) }) } } function na(a) {
            if (null == a) return null;
            if ("function" === typeof a) return a.displayName || a.name || null; if ("string" === typeof a) return a; switch (a) { case Ma: return "Fragment"; case gb: return "Portal"; case kc: return "Profiler"; case Af: return "StrictMode"; case lc: return "Suspense"; case yd: return "SuspenseList" }if ("object" === typeof a) switch (a.$$typeof) {
                case Bf: return "Context.Consumer"; case Cf: return "Context.Provider"; case zd: var b = a.render; b = b.displayName || b.name || ""; return a.displayName || ("" !== b ? "ForwardRef(" + b + ")" : "ForwardRef"); case Ad: return na(a.type);
                case Df: return na(a.render); case Ef: if (a = 1 === a._status ? a._result : null) return na(a)
            }return null
        } function Bd(a) { var b = ""; do { a: switch (a.tag) { case 3: case 4: case 6: case 7: case 10: case 9: var c = ""; break a; default: var d = a._debugOwner, e = a._debugSource, f = na(a.type); c = null; d && (c = na(d.type)); d = f; f = ""; e ? f = " (at " + e.fileName.replace(si, "") + ":" + e.lineNumber + ")" : c && (f = " (created by " + c + ")"); c = "\n    in " + (d || "Unknown") + f }b += c; a = a.return } while (a); return b } function va(a) {
            switch (typeof a) {
                case "boolean": case "number": case "object": case "string": case "undefined": return a;
                default: return ""
            }
        } function Ff(a) { var b = a.type; return (a = a.nodeName) && "input" === a.toLowerCase() && ("checkbox" === b || "radio" === b) } function ti(a) {
            var b = Ff(a) ? "checked" : "value", c = Object.getOwnPropertyDescriptor(a.constructor.prototype, b), d = "" + a[b]; if (!a.hasOwnProperty(b) && "undefined" !== typeof c && "function" === typeof c.get && "function" === typeof c.set) {
                var e = c.get, f = c.set; Object.defineProperty(a, b, { configurable: !0, get: function () { return e.call(this) }, set: function (a) { d = "" + a; f.call(this, a) } }); Object.defineProperty(a,
                    b, { enumerable: c.enumerable }); return { getValue: function () { return d }, setValue: function (a) { d = "" + a }, stopTracking: function () { a._valueTracker = null; delete a[b] } }
            }
        } function mc(a) { a._valueTracker || (a._valueTracker = ti(a)) } function Gf(a) { if (!a) return !1; var b = a._valueTracker; if (!b) return !0; var c = b.getValue(); var d = ""; a && (d = Ff(a) ? a.checked ? "true" : "false" : a.value); a = d; return a !== c ? (b.setValue(a), !0) : !1 } function Cd(a, b) {
            var c = b.checked; return M({}, b, {
                defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: null !=
                    c ? c : a._wrapperState.initialChecked
            })
        } function Hf(a, b) { var c = null == b.defaultValue ? "" : b.defaultValue, d = null != b.checked ? b.checked : b.defaultChecked; c = va(null != b.value ? b.value : c); a._wrapperState = { initialChecked: d, initialValue: c, controlled: "checkbox" === b.type || "radio" === b.type ? null != b.checked : null != b.value } } function If(a, b) { b = b.checked; null != b && xd(a, "checked", b, !1) } function Dd(a, b) {
            If(a, b); var c = va(b.value), d = b.type; if (null != c) if ("number" === d) { if (0 === c && "" === a.value || a.value != c) a.value = "" + c } else a.value !==
                "" + c && (a.value = "" + c); else if ("submit" === d || "reset" === d) { a.removeAttribute("value"); return } b.hasOwnProperty("value") ? Ed(a, b.type, c) : b.hasOwnProperty("defaultValue") && Ed(a, b.type, va(b.defaultValue)); null == b.checked && null != b.defaultChecked && (a.defaultChecked = !!b.defaultChecked)
        } function Jf(a, b, c) {
            if (b.hasOwnProperty("value") || b.hasOwnProperty("defaultValue")) {
                var d = b.type; if (!("submit" !== d && "reset" !== d || void 0 !== b.value && null !== b.value)) return; b = "" + a._wrapperState.initialValue; c || b === a.value || (a.value =
                    b); a.defaultValue = b
            } c = a.name; "" !== c && (a.name = ""); a.defaultChecked = !!a._wrapperState.initialChecked; "" !== c && (a.name = c)
        } function Ed(a, b, c) { if ("number" !== b || a.ownerDocument.activeElement !== a) null == c ? a.defaultValue = "" + a._wrapperState.initialValue : a.defaultValue !== "" + c && (a.defaultValue = "" + c) } function ui(a) { var b = ""; ea.Children.forEach(a, function (a) { null != a && (b += a) }); return b } function Fd(a, b) { a = M({ children: void 0 }, b); if (b = ui(b.children)) a.children = b; return a } function hb(a, b, c, d) {
            a = a.options; if (b) {
                b = {};
                for (var e = 0; e < c.length; e++)b["$" + c[e]] = !0; for (c = 0; c < a.length; c++)e = b.hasOwnProperty("$" + a[c].value), a[c].selected !== e && (a[c].selected = e), e && d && (a[c].defaultSelected = !0)
            } else { c = "" + va(c); b = null; for (e = 0; e < a.length; e++) { if (a[e].value === c) { a[e].selected = !0; d && (a[e].defaultSelected = !0); return } null !== b || a[e].disabled || (b = a[e]) } null !== b && (b.selected = !0) }
        } function Gd(a, b) { if (null != b.dangerouslySetInnerHTML) throw Error(k(91)); return M({}, b, { value: void 0, defaultValue: void 0, children: "" + a._wrapperState.initialValue }) }
    function Kf(a, b) { var c = b.value; if (null == c) { c = b.children; b = b.defaultValue; if (null != c) { if (null != b) throw Error(k(92)); if (Array.isArray(c)) { if (!(1 >= c.length)) throw Error(k(93)); c = c[0] } b = c } null == b && (b = ""); c = b } a._wrapperState = { initialValue: va(c) } } function Lf(a, b) { var c = va(b.value), d = va(b.defaultValue); null != c && (c = "" + c, c !== a.value && (a.value = c), null == b.defaultValue && a.defaultValue !== c && (a.defaultValue = c)); null != d && (a.defaultValue = "" + d) } function Mf(a, b) {
        b = a.textContent; b === a._wrapperState.initialValue && "" !==
            b && null !== b && (a.value = b)
    } function Nf(a) { switch (a) { 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 Hd(a, b) { return null == a || "http://www.w3.org/1999/xhtml" === a ? Nf(b) : "http://www.w3.org/2000/svg" === a && "foreignObject" === b ? "http://www.w3.org/1999/xhtml" : a } function nc(a, b) { var c = {}; c[a.toLowerCase()] = b.toLowerCase(); c["Webkit" + a] = "webkit" + b; c["Moz" + a] = "moz" + b; return c } function oc(a) {
        if (Id[a]) return Id[a];
        if (!ib[a]) return a; var b = ib[a], c; for (c in b) if (b.hasOwnProperty(c) && c in Of) return Id[a] = b[c]; return a
    } function Jd(a) { var b = Pf.get(a); void 0 === b && (b = new Map, Pf.set(a, b)); return b } function Na(a) { var b = a, c = a; if (a.alternate) for (; b.return;)b = b.return; else { a = b; do b = a, 0 !== (b.effectTag & 1026) && (c = b.return), a = b.return; while (a) } return 3 === b.tag ? c : null } function Qf(a) { if (13 === a.tag) { var b = a.memoizedState; null === b && (a = a.alternate, null !== a && (b = a.memoizedState)); if (null !== b) return b.dehydrated } return null } function Rf(a) {
        if (Na(a) !==
            a) throw Error(k(188));
    } function vi(a) {
        var b = a.alternate; if (!b) { b = Na(a); if (null === b) throw Error(k(188)); return b !== a ? null : a } for (var c = a, d = b; ;) {
            var e = c.return; if (null === e) break; var f = e.alternate; if (null === f) { d = e.return; if (null !== d) { c = d; continue } break } if (e.child === f.child) { for (f = e.child; f;) { if (f === c) return Rf(e), a; if (f === d) return Rf(e), b; f = f.sibling } throw Error(k(188)); } if (c.return !== d.return) c = e, d = f; else {
                for (var g = !1, h = e.child; h;) { if (h === c) { g = !0; c = e; d = f; break } if (h === d) { g = !0; d = e; c = f; break } h = h.sibling } if (!g) {
                    for (h =
                        f.child; h;) { if (h === c) { g = !0; c = f; d = e; break } if (h === d) { g = !0; d = f; c = e; break } h = h.sibling } if (!g) throw Error(k(189));
                }
            } if (c.alternate !== d) throw Error(k(190));
        } if (3 !== c.tag) throw Error(k(188)); return c.stateNode.current === c ? a : b
    } function Sf(a) { a = vi(a); if (!a) return null; for (var b = a; ;) { if (5 === b.tag || 6 === b.tag) return b; if (b.child) b.child.return = b, b = b.child; else { if (b === a) break; for (; !b.sibling;) { if (!b.return || b.return === a) return null; b = b.return } b.sibling.return = b.return; b = b.sibling } } return null } function jb(a, b) {
        if (null ==
            b) throw Error(k(30)); if (null == a) return b; if (Array.isArray(a)) { if (Array.isArray(b)) return a.push.apply(a, b), a; a.push(b); return a } return Array.isArray(b) ? [a].concat(b) : [a, b]
    } function Kd(a, b, c) { Array.isArray(a) ? a.forEach(b, c) : a && b.call(c, a) } function pc(a) { null !== a && (Ab = jb(Ab, a)); a = Ab; Ab = null; if (a) { Kd(a, wi); if (Ab) throw Error(k(95)); if (hc) throw a = pd, hc = !1, pd = null, a; } } function Ld(a) {
        a = a.target || a.srcElement || window; a.correspondingUseElement && (a = a.correspondingUseElement); return 3 === a.nodeType ? a.parentNode :
            a
    } function Tf(a) { if (!wa) return !1; a = "on" + a; var b = a in document; b || (b = document.createElement("div"), b.setAttribute(a, "return;"), b = "function" === typeof b[a]); return b } function Uf(a) { a.topLevelType = null; a.nativeEvent = null; a.targetInst = null; a.ancestors.length = 0; 10 > qc.length && qc.push(a) } function Vf(a, b, c, d) { if (qc.length) { var e = qc.pop(); e.topLevelType = a; e.eventSystemFlags = d; e.nativeEvent = b; e.targetInst = c; return e } return { topLevelType: a, eventSystemFlags: d, nativeEvent: b, targetInst: c, ancestors: [] } } function Wf(a) {
        var b =
            a.targetInst, c = b; do { if (!c) { a.ancestors.push(c); break } var d = c; if (3 === d.tag) d = d.stateNode.containerInfo; else { for (; d.return;)d = d.return; d = 3 !== d.tag ? null : d.stateNode.containerInfo } if (!d) break; b = c.tag; 5 !== b && 6 !== b || a.ancestors.push(c); c = Bb(d) } while (c); for (c = 0; c < a.ancestors.length; c++) { b = a.ancestors[c]; var e = Ld(a.nativeEvent); d = a.topLevelType; var f = a.nativeEvent, g = a.eventSystemFlags; 0 === c && (g |= 64); for (var h = null, m = 0; m < jc.length; m++) { var n = jc[m]; n && (n = n.extractEvents(d, b, f, e, g)) && (h = jb(h, n)) } pc(h) }
    } function Md(a,
        b, c) { if (!c.has(a)) { switch (a) { case "scroll": Cb(b, "scroll", !0); break; case "focus": case "blur": Cb(b, "focus", !0); Cb(b, "blur", !0); c.set("blur", null); c.set("focus", null); break; case "cancel": case "close": Tf(a) && Cb(b, a, !0); break; case "invalid": case "submit": case "reset": break; default: -1 === Db.indexOf(a) && w(a, b) }c.set(a, null) } } function xi(a, b) { var c = Jd(b); Nd.forEach(function (a) { Md(a, b, c) }); yi.forEach(function (a) { Md(a, b, c) }) } function Od(a, b, c, d, e) {
            return {
                blockedOn: a, topLevelType: b, eventSystemFlags: c | 32, nativeEvent: e,
                container: d
            }
        } function Xf(a, b) { switch (a) { case "focus": case "blur": xa = null; break; case "dragenter": case "dragleave": ya = null; break; case "mouseover": case "mouseout": za = null; break; case "pointerover": case "pointerout": Eb.delete(b.pointerId); break; case "gotpointercapture": case "lostpointercapture": Fb.delete(b.pointerId) } } function Gb(a, b, c, d, e, f) { if (null === a || a.nativeEvent !== f) return a = Od(b, c, d, e, f), null !== b && (b = Hb(b), null !== b && Yf(b)), a; a.eventSystemFlags |= d; return a } function zi(a, b, c, d, e) {
            switch (b) {
                case "focus": return xa =
                    Gb(xa, a, b, c, d, e), !0; case "dragenter": return ya = Gb(ya, a, b, c, d, e), !0; case "mouseover": return za = Gb(za, a, b, c, d, e), !0; case "pointerover": var f = e.pointerId; Eb.set(f, Gb(Eb.get(f) || null, a, b, c, d, e)); return !0; case "gotpointercapture": return f = e.pointerId, Fb.set(f, Gb(Fb.get(f) || null, a, b, c, d, e)), !0
            }return !1
        } function Ai(a) {
            var b = Bb(a.target); if (null !== b) {
                var c = Na(b); if (null !== c) if (b = c.tag, 13 === b) { if (b = Qf(c), null !== b) { a.blockedOn = b; Pd(a.priority, function () { Bi(c) }); return } } else if (3 === b && c.stateNode.hydrate) {
                a.blockedOn =
                    3 === c.tag ? c.stateNode.containerInfo : null; return
                }
            } a.blockedOn = null
        } function rc(a) { if (null !== a.blockedOn) return !1; var b = Qd(a.topLevelType, a.eventSystemFlags, a.container, a.nativeEvent); if (null !== b) { var c = Hb(b); null !== c && Yf(c); a.blockedOn = b; return !1 } return !0 } function Zf(a, b, c) { rc(a) && c.delete(b) } function Ci() {
            for (Rd = !1; 0 < fa.length;) { var a = fa[0]; if (null !== a.blockedOn) { a = Hb(a.blockedOn); null !== a && Di(a); break } var b = Qd(a.topLevelType, a.eventSystemFlags, a.container, a.nativeEvent); null !== b ? a.blockedOn = b : fa.shift() } null !==
                xa && rc(xa) && (xa = null); null !== ya && rc(ya) && (ya = null); null !== za && rc(za) && (za = null); Eb.forEach(Zf); Fb.forEach(Zf)
        } function Ib(a, b) { a.blockedOn === b && (a.blockedOn = null, Rd || (Rd = !0, $f(ag, Ci))) } function bg(a) {
            if (0 < fa.length) { Ib(fa[0], a); for (var b = 1; b < fa.length; b++) { var c = fa[b]; c.blockedOn === a && (c.blockedOn = null) } } null !== xa && Ib(xa, a); null !== ya && Ib(ya, a); null !== za && Ib(za, a); b = function (b) { return Ib(b, a) }; Eb.forEach(b); Fb.forEach(b); for (b = 0; b < Jb.length; b++)c = Jb[b], c.blockedOn === a && (c.blockedOn = null); for (; 0 < Jb.length &&
                (b = Jb[0], null === b.blockedOn);)Ai(b), null === b.blockedOn && Jb.shift()
        } function Sd(a, b) { for (var c = 0; c < a.length; c += 2) { var d = a[c], e = a[c + 1], f = "on" + (e[0].toUpperCase() + e.slice(1)); f = { phasedRegistrationNames: { bubbled: f, captured: f + "Capture" }, dependencies: [d], eventPriority: b }; Td.set(d, b); cg.set(d, f); dg[e] = f } } function w(a, b) { Cb(b, a, !1) } function Cb(a, b, c) {
            var d = Td.get(b); switch (void 0 === d ? 2 : d) { case 0: d = Ei.bind(null, b, 1, a); break; case 1: d = Fi.bind(null, b, 1, a); break; default: d = sc.bind(null, b, 1, a) }c ? a.addEventListener(b,
                d, !0) : a.addEventListener(b, d, !1)
        } function Ei(a, b, c, d) { Oa || vd(); var e = sc, f = Oa; Oa = !0; try { eg(e, a, b, c, d) } finally { (Oa = f) || ud() } } function Fi(a, b, c, d) { Gi(Hi, sc.bind(null, a, b, c, d)) } function sc(a, b, c, d) { if (tc) if (0 < fa.length && -1 < Nd.indexOf(a)) a = Od(null, a, b, c, d), fa.push(a); else { var e = Qd(a, b, c, d); if (null === e) Xf(a, d); else if (-1 < Nd.indexOf(a)) a = Od(e, a, b, c, d), fa.push(a); else if (!zi(e, a, b, c, d)) { Xf(a, d); a = Vf(a, d, null, b); try { uf(Wf, a) } finally { Uf(a) } } } } function Qd(a, b, c, d) {
            c = Ld(d); c = Bb(c); if (null !== c) {
                var e = Na(c); if (null ===
                    e) c = null; else { var f = e.tag; if (13 === f) { c = Qf(e); if (null !== c) return c; c = null } else if (3 === f) { if (e.stateNode.hydrate) return 3 === e.tag ? e.stateNode.containerInfo : null; c = null } else e !== c && (c = null) }
            } a = Vf(a, d, c, b); try { uf(Wf, a) } finally { Uf(a) } return null
        } function fg(a, b, c) { return null == b || "boolean" === typeof b || "" === b ? "" : c || "number" !== typeof b || 0 === b || Kb.hasOwnProperty(a) && Kb[a] ? ("" + b).trim() : b + "px" } function gg(a, b) {
            a = a.style; for (var c in b) if (b.hasOwnProperty(c)) {
                var d = 0 === c.indexOf("--"), e = fg(c, b[c], d); "float" ===
                    c && (c = "cssFloat"); d ? a.setProperty(c, e) : a[c] = e
            }
        } function Ud(a, b) { if (b) { if (Ii[a] && (null != b.children || null != b.dangerouslySetInnerHTML)) throw Error(k(137, a, "")); if (null != b.dangerouslySetInnerHTML) { if (null != b.children) throw Error(k(60)); if (!("object" === typeof b.dangerouslySetInnerHTML && "__html" in b.dangerouslySetInnerHTML)) throw Error(k(61)); } if (null != b.style && "object" !== typeof b.style) throw Error(k(62, "")); } } function Vd(a, b) {
            if (-1 === a.indexOf("-")) return "string" === typeof b.is; switch (a) {
                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 oa(a, b) { a = 9 === a.nodeType || 11 === a.nodeType ? a : a.ownerDocument; var c = Jd(a); b = rd[b]; for (var d = 0; d < b.length; d++)Md(b[d], a, c) } function uc() { } function Wd(a) { a = a || ("undefined" !== typeof document ? document : void 0); if ("undefined" === typeof a) return null; try { return a.activeElement || a.body } catch (b) { return a.body } } function hg(a) { for (; a && a.firstChild;)a = a.firstChild; return a } function ig(a, b) {
            var c = hg(a); a = 0; for (var d; c;) {
                if (3 === c.nodeType) {
                    d = a + c.textContent.length; if (a <= b && d >= b) return {
                        node: c,
                        offset: b - a
                    }; a = d
                } a: { for (; c;) { if (c.nextSibling) { c = c.nextSibling; break a } c = c.parentNode } c = void 0 } c = hg(c)
            }
        } function jg(a, b) { return a && b ? a === b ? !0 : a && 3 === a.nodeType ? !1 : b && 3 === b.nodeType ? jg(a, b.parentNode) : "contains" in a ? a.contains(b) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b) & 16) : !1 : !1 } function kg() { for (var a = window, b = Wd(); b instanceof a.HTMLIFrameElement;) { try { var c = "string" === typeof b.contentWindow.location.href } catch (d) { c = !1 } if (c) a = b.contentWindow; else break; b = Wd(a.document) } return b }
    function Xd(a) { var b = a && a.nodeName && a.nodeName.toLowerCase(); return b && ("input" === b && ("text" === a.type || "search" === a.type || "tel" === a.type || "url" === a.type || "password" === a.type) || "textarea" === b || "true" === a.contentEditable) } function lg(a, b) { switch (a) { case "button": case "input": case "select": case "textarea": return !!b.autoFocus }return !1 } function Yd(a, b) {
        return "textarea" === a || "option" === a || "noscript" === a || "string" === typeof b.children || "number" === typeof b.children || "object" === typeof b.dangerouslySetInnerHTML &&
            null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html
    } function kb(a) { for (; null != a; a = a.nextSibling) { var b = a.nodeType; if (1 === b || 3 === b) break } return a } function mg(a) { a = a.previousSibling; for (var b = 0; a;) { if (8 === a.nodeType) { var c = a.data; if (c === ng || c === Zd || c === $d) { if (0 === b) return a; b-- } else c === og && b++ } a = a.previousSibling } return null } function Bb(a) {
        var b = a[Aa]; if (b) return b; for (var c = a.parentNode; c;) {
            if (b = c[Lb] || c[Aa]) {
                c = b.alternate; if (null !== b.child || null !== c && null !== c.child) for (a = mg(a); null !==
                    a;) { if (c = a[Aa]) return c; a = mg(a) } return b
            } a = c; c = a.parentNode
        } return null
    } function Hb(a) { a = a[Aa] || a[Lb]; return !a || 5 !== a.tag && 6 !== a.tag && 13 !== a.tag && 3 !== a.tag ? null : a } function Pa(a) { if (5 === a.tag || 6 === a.tag) return a.stateNode; throw Error(k(33)); } function ae(a) { return a[vc] || null } function pa(a) { do a = a.return; while (a && 5 !== a.tag); return a ? a : null } function pg(a, b) {
        var c = a.stateNode; if (!c) return null; var d = td(c); if (!d) return null; c = d[b]; a: switch (b) {
            case "onClick": case "onClickCapture": case "onDoubleClick": case "onDoubleClickCapture": case "onMouseDown": case "onMouseDownCapture": case "onMouseMove": case "onMouseMoveCapture": case "onMouseUp": case "onMouseUpCapture": case "onMouseEnter": (d =
                !d.disabled) || (a = a.type, d = !("button" === a || "input" === a || "select" === a || "textarea" === a)); a = !d; break a; default: a = !1
        }if (a) return null; if (c && "function" !== typeof c) throw Error(k(231, b, typeof c)); return c
    } function qg(a, b, c) { if (b = pg(a, c.dispatchConfig.phasedRegistrationNames[b])) c._dispatchListeners = jb(c._dispatchListeners, b), c._dispatchInstances = jb(c._dispatchInstances, a) } function Ji(a) {
        if (a && a.dispatchConfig.phasedRegistrationNames) {
            for (var b = a._targetInst, c = []; b;)c.push(b), b = pa(b); for (b = c.length; 0 < b--;)qg(c[b],
                "captured", a); for (b = 0; b < c.length; b++)qg(c[b], "bubbled", a)
        }
    } function be(a, b, c) { a && c && c.dispatchConfig.registrationName && (b = pg(a, c.dispatchConfig.registrationName)) && (c._dispatchListeners = jb(c._dispatchListeners, b), c._dispatchInstances = jb(c._dispatchInstances, a)) } function Ki(a) { a && a.dispatchConfig.registrationName && be(a._targetInst, null, a) } function lb(a) { Kd(a, Ji) } function rg() {
        if (wc) return wc; var a, b = ce, c = b.length, d, e = "value" in Ba ? Ba.value : Ba.textContent, f = e.length; for (a = 0; a < c && b[a] === e[a]; a++); var g =
            c - a; for (d = 1; d <= g && b[c - d] === e[f - d]; d++); return wc = e.slice(a, 1 < d ? 1 - d : void 0)
    } function xc() { return !0 } function yc() { return !1 } function R(a, b, c, d) { this.dispatchConfig = a; this._targetInst = b; this.nativeEvent = c; a = this.constructor.Interface; for (var e in a) a.hasOwnProperty(e) && ((b = a[e]) ? this[e] = b(c) : "target" === e ? this.target = d : this[e] = c[e]); this.isDefaultPrevented = (null != c.defaultPrevented ? c.defaultPrevented : !1 === c.returnValue) ? xc : yc; this.isPropagationStopped = yc; return this } function Li(a, b, c, d) {
        if (this.eventPool.length) {
            var e =
                this.eventPool.pop(); this.call(e, a, b, c, d); return e
        } return new this(a, b, c, d)
    } function Mi(a) { if (!(a instanceof this)) throw Error(k(279)); a.destructor(); 10 > this.eventPool.length && this.eventPool.push(a) } function sg(a) { a.eventPool = []; a.getPooled = Li; a.release = Mi } function tg(a, b) { switch (a) { case "keyup": return -1 !== Ni.indexOf(b.keyCode); case "keydown": return 229 !== b.keyCode; case "keypress": case "mousedown": case "blur": return !0; default: return !1 } } function ug(a) {
        a = a.detail; return "object" === typeof a && "data" in
            a ? a.data : null
    } function Oi(a, b) { switch (a) { case "compositionend": return ug(b); case "keypress": if (32 !== b.which) return null; vg = !0; return wg; case "textInput": return a = b.data, a === wg && vg ? null : a; default: return null } } function Pi(a, b) {
        if (mb) return "compositionend" === a || !de && tg(a, b) ? (a = rg(), wc = ce = Ba = null, mb = !1, a) : null; switch (a) {
            case "paste": return null; case "keypress": if (!(b.ctrlKey || b.altKey || b.metaKey) || b.ctrlKey && b.altKey) { if (b.char && 1 < b.char.length) return b.char; if (b.which) return String.fromCharCode(b.which) } return null;
            case "compositionend": return xg && "ko" !== b.locale ? null : b.data; default: return null
        }
    } function yg(a) { var b = a && a.nodeName && a.nodeName.toLowerCase(); return "input" === b ? !!Qi[a.type] : "textarea" === b ? !0 : !1 } function zg(a, b, c) { a = R.getPooled(Ag.change, a, b, c); a.type = "change"; sf(c); lb(a); return a } function Ri(a) { pc(a) } function zc(a) { var b = Pa(a); if (Gf(b)) return a } function Si(a, b) { if ("change" === a) return b } function Bg() { Mb && (Mb.detachEvent("onpropertychange", Cg), Nb = Mb = null) } function Cg(a) {
        if ("value" === a.propertyName &&
            zc(Nb)) if (a = zg(Nb, a, Ld(a)), Oa) pc(a); else { Oa = !0; try { ee(Ri, a) } finally { Oa = !1, ud() } }
    } function Ti(a, b, c) { "focus" === a ? (Bg(), Mb = b, Nb = c, Mb.attachEvent("onpropertychange", Cg)) : "blur" === a && Bg() } function Ui(a, b) { if ("selectionchange" === a || "keyup" === a || "keydown" === a) return zc(Nb) } function Vi(a, b) { if ("click" === a) return zc(b) } function Wi(a, b) { if ("input" === a || "change" === a) return zc(b) } function Xi(a) { var b = this.nativeEvent; return b.getModifierState ? b.getModifierState(a) : (a = Yi[a]) ? !!b[a] : !1 } function fe(a) { return Xi }
    function Zi(a, b) { return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b } function Ob(a, b) { if (Qa(a, b)) return !0; if ("object" !== typeof a || null === a || "object" !== typeof b || null === b) return !1; var c = Object.keys(a), d = Object.keys(b); if (c.length !== d.length) return !1; for (d = 0; d < c.length; d++)if (!$i.call(b, c[d]) || !Qa(a[c[d]], b[c[d]])) return !1; return !0 } function Dg(a, b) {
        var c = b.window === b ? b.document : 9 === b.nodeType ? b : b.ownerDocument; if (ge || null == nb || nb !== Wd(c)) return null; c = nb; "selectionStart" in c && Xd(c) ? c = {
            start: c.selectionStart,
            end: c.selectionEnd
        } : (c = (c.ownerDocument && c.ownerDocument.defaultView || window).getSelection(), c = { anchorNode: c.anchorNode, anchorOffset: c.anchorOffset, focusNode: c.focusNode, focusOffset: c.focusOffset }); return Pb && Ob(Pb, c) ? null : (Pb = c, a = R.getPooled(Eg.select, he, a, b), a.type = "select", a.target = nb, lb(a), a)
    } function Ac(a) { var b = a.keyCode; "charCode" in a ? (a = a.charCode, 0 === a && 13 === b && (a = 13)) : a = b; 10 === a && (a = 13); return 32 <= a || 13 === a ? a : 0 } function q(a, b) { 0 > ob || (a.current = ie[ob], ie[ob] = null, ob--) } function y(a, b, c) {
        ob++;
        ie[ob] = a.current; a.current = b
    } function pb(a, b) { var c = a.type.contextTypes; if (!c) return Ca; var d = a.stateNode; if (d && d.__reactInternalMemoizedUnmaskedChildContext === b) return d.__reactInternalMemoizedMaskedChildContext; var e = {}, f; for (f in c) e[f] = b[f]; d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = b, a.__reactInternalMemoizedMaskedChildContext = e); return e } function N(a) { a = a.childContextTypes; return null !== a && void 0 !== a } function Fg(a, b, c) { if (B.current !== Ca) throw Error(k(168)); y(B, b); y(G, c) }
    function Gg(a, b, c) { var d = a.stateNode; a = b.childContextTypes; if ("function" !== typeof d.getChildContext) return c; d = d.getChildContext(); for (var e in d) if (!(e in a)) throw Error(k(108, na(b) || "Unknown", e)); return M({}, c, {}, d) } function Bc(a) { a = (a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext || Ca; Ra = B.current; y(B, a); y(G, G.current); return !0 } function Hg(a, b, c) { var d = a.stateNode; if (!d) throw Error(k(169)); c ? (a = Gg(a, b, Ra), d.__reactInternalMemoizedMergedChildContext = a, q(G), q(B), y(B, a)) : q(G); y(G, c) } function Cc() {
        switch (aj()) {
            case Dc: return 99;
            case Ig: return 98; case Jg: return 97; case Kg: return 96; case Lg: return 95; default: throw Error(k(332));
        }
    } function Mg(a) { switch (a) { case 99: return Dc; case 98: return Ig; case 97: return Jg; case 96: return Kg; case 95: return Lg; default: throw Error(k(332)); } } function Da(a, b) { a = Mg(a); return bj(a, b) } function Ng(a, b, c) { a = Mg(a); return je(a, b, c) } function Og(a) { null === qa ? (qa = [a], Ec = je(Dc, Pg)) : qa.push(a); return Qg } function ha() { if (null !== Ec) { var a = Ec; Ec = null; Rg(a) } Pg() } function Pg() {
        if (!ke && null !== qa) {
            ke = !0; var a = 0;
            try { var b = qa; Da(99, function () { for (; a < b.length; a++) { var c = b[a]; do c = c(!0); while (null !== c) } }); qa = null } catch (c) { throw null !== qa && (qa = qa.slice(a + 1)), je(Dc, ha), c; } finally { ke = !1 }
        }
    } function Fc(a, b, c) { c /= 10; return 1073741821 - (((1073741821 - a + b / 10) / c | 0) + 1) * c } function aa(a, b) { if (a && a.defaultProps) { b = M({}, b); a = a.defaultProps; for (var c in a) void 0 === b[c] && (b[c] = a[c]) } return b } function le() { Gc = qb = Hc = null } function me(a) { var b = Ic.current; q(Ic); a.type._context._currentValue = b } function Sg(a, b) {
        for (; null !== a;) {
            var c =
                a.alternate; if (a.childExpirationTime < b) a.childExpirationTime = b, null !== c && c.childExpirationTime < b && (c.childExpirationTime = b); else if (null !== c && c.childExpirationTime < b) c.childExpirationTime = b; else break; a = a.return
        }
    } function rb(a, b) { Hc = a; Gc = qb = null; a = a.dependencies; null !== a && null !== a.firstContext && (a.expirationTime >= b && (ia = !0), a.firstContext = null) } function W(a, b) {
        if (Gc !== a && !1 !== b && 0 !== b) {
            if ("number" !== typeof b || 1073741823 === b) Gc = a, b = 1073741823; b = { context: a, observedBits: b, next: null }; if (null === qb) {
                if (null ===
                    Hc) throw Error(k(308)); qb = b; Hc.dependencies = { expirationTime: 0, firstContext: b, responders: null }
            } else qb = qb.next = b
        } return a._currentValue
    } function ne(a) { a.updateQueue = { baseState: a.memoizedState, baseQueue: null, shared: { pending: null }, effects: null } } function oe(a, b) { a = a.updateQueue; b.updateQueue === a && (b.updateQueue = { baseState: a.baseState, baseQueue: a.baseQueue, shared: a.shared, effects: a.effects }) } function Ea(a, b) {
        a = { expirationTime: a, suspenseConfig: b, tag: Tg, payload: null, callback: null, next: null }; return a.next =
            a
    } function Fa(a, b) { a = a.updateQueue; if (null !== a) { a = a.shared; var c = a.pending; null === c ? b.next = b : (b.next = c.next, c.next = b); a.pending = b } } function Ug(a, b) { var c = a.alternate; null !== c && oe(c, a); a = a.updateQueue; c = a.baseQueue; null === c ? (a.baseQueue = b.next = b, b.next = b) : (b.next = c.next, c.next = b) } function Qb(a, b, c, d) {
        var e = a.updateQueue; Ga = !1; var f = e.baseQueue, g = e.shared.pending; if (null !== g) {
            if (null !== f) { var h = f.next; f.next = g.next; g.next = h } f = g; e.shared.pending = null; h = a.alternate; null !== h && (h = h.updateQueue, null !== h &&
                (h.baseQueue = g))
        } if (null !== f) {
            h = f.next; var m = e.baseState, n = 0, k = null, ba = null, l = null; if (null !== h) {
                var p = h; do {
                    g = p.expirationTime; if (g < d) { var t = { expirationTime: p.expirationTime, suspenseConfig: p.suspenseConfig, tag: p.tag, payload: p.payload, callback: p.callback, next: null }; null === l ? (ba = l = t, k = m) : l = l.next = t; g > n && (n = g) } else {
                    null !== l && (l = l.next = { expirationTime: 1073741823, suspenseConfig: p.suspenseConfig, tag: p.tag, payload: p.payload, callback: p.callback, next: null }); Vg(g, p.suspenseConfig); a: {
                        var q = a, r = p; g = b; t = c; switch (r.tag) {
                            case 1: q =
                                r.payload; if ("function" === typeof q) { m = q.call(t, m, g); break a } m = q; break a; case 3: q.effectTag = q.effectTag & -4097 | 64; case Tg: q = r.payload; g = "function" === typeof q ? q.call(t, m, g) : q; if (null === g || void 0 === g) break a; m = M({}, m, g); break a; case Jc: Ga = !0
                        }
                    } null !== p.callback && (a.effectTag |= 32, g = e.effects, null === g ? e.effects = [p] : g.push(p))
                    } p = p.next; if (null === p || p === h) if (g = e.shared.pending, null === g) break; else p = f.next = g.next, g.next = h, e.baseQueue = f = g, e.shared.pending = null
                } while (1)
            } null === l ? k = m : l.next = ba; e.baseState = k; e.baseQueue =
                l; Kc(n); a.expirationTime = n; a.memoizedState = m
        }
    } function Wg(a, b, c) { a = b.effects; b.effects = null; if (null !== a) for (b = 0; b < a.length; b++) { var d = a[b], e = d.callback; if (null !== e) { d.callback = null; d = e; e = c; if ("function" !== typeof d) throw Error(k(191, d)); d.call(e) } } } function Lc(a, b, c, d) { b = a.memoizedState; c = c(d, b); c = null === c || void 0 === c ? b : M({}, b, c); a.memoizedState = c; 0 === a.expirationTime && (a.updateQueue.baseState = c) } function Xg(a, b, c, d, e, f, g) {
        a = a.stateNode; return "function" === typeof a.shouldComponentUpdate ? a.shouldComponentUpdate(d,
            f, g) : b.prototype && b.prototype.isPureReactComponent ? !Ob(c, d) || !Ob(e, f) : !0
    } function Yg(a, b, c) { var d = !1, e = Ca; var f = b.contextType; "object" === typeof f && null !== f ? f = W(f) : (e = N(b) ? Ra : B.current, d = b.contextTypes, f = (d = null !== d && void 0 !== d) ? pb(a, e) : Ca); b = new b(c, f); a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null; b.updater = Mc; a.stateNode = b; b._reactInternalFiber = a; d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = e, a.__reactInternalMemoizedMaskedChildContext = f); return b } function Zg(a,
        b, c, d) { a = b.state; "function" === typeof b.componentWillReceiveProps && b.componentWillReceiveProps(c, d); "function" === typeof b.UNSAFE_componentWillReceiveProps && b.UNSAFE_componentWillReceiveProps(c, d); b.state !== a && Mc.enqueueReplaceState(b, b.state, null) } function pe(a, b, c, d) {
            var e = a.stateNode; e.props = c; e.state = a.memoizedState; e.refs = $g; ne(a); var f = b.contextType; "object" === typeof f && null !== f ? e.context = W(f) : (f = N(b) ? Ra : B.current, e.context = pb(a, f)); Qb(a, c, e, d); e.state = a.memoizedState; f = b.getDerivedStateFromProps;
            "function" === typeof f && (Lc(a, b, f, c), e.state = a.memoizedState); "function" === typeof b.getDerivedStateFromProps || "function" === typeof e.getSnapshotBeforeUpdate || "function" !== typeof e.UNSAFE_componentWillMount && "function" !== typeof e.componentWillMount || (b = e.state, "function" === typeof e.componentWillMount && e.componentWillMount(), "function" === typeof e.UNSAFE_componentWillMount && e.UNSAFE_componentWillMount(), b !== e.state && Mc.enqueueReplaceState(e, e.state, null), Qb(a, c, e, d), e.state = a.memoizedState); "function" ===
                typeof e.componentDidMount && (a.effectTag |= 4)
        } function Rb(a, b, c) {
            a = c.ref; if (null !== a && "function" !== typeof a && "object" !== typeof a) {
                if (c._owner) { c = c._owner; if (c) { if (1 !== c.tag) throw Error(k(309)); var d = c.stateNode } if (!d) throw Error(k(147, a)); var e = "" + a; if (null !== b && null !== b.ref && "function" === typeof b.ref && b.ref._stringRef === e) return b.ref; b = function (a) { var b = d.refs; b === $g && (b = d.refs = {}); null === a ? delete b[e] : b[e] = a }; b._stringRef = e; return b } if ("string" !== typeof a) throw Error(k(284)); if (!c._owner) throw Error(k(290,
                    a));
            } return a
        } function Nc(a, b) { if ("textarea" !== a.type) throw Error(k(31, "[object Object]" === Object.prototype.toString.call(b) ? "object with keys {" + Object.keys(b).join(", ") + "}" : b, "")); } function ah(a) {
            function b(b, c) { if (a) { var d = b.lastEffect; null !== d ? (d.nextEffect = c, b.lastEffect = c) : b.firstEffect = b.lastEffect = c; c.nextEffect = null; c.effectTag = 8 } } function c(c, d) { if (!a) return null; for (; null !== d;)b(c, d), d = d.sibling; return null } function d(a, b) {
                for (a = new Map; null !== b;)null !== b.key ? a.set(b.key, b) : a.set(b.index,
                    b), b = b.sibling; return a
            } function e(a, b) { a = Sa(a, b); a.index = 0; a.sibling = null; return a } function f(b, c, d) { b.index = d; if (!a) return c; d = b.alternate; if (null !== d) return d = d.index, d < c ? (b.effectTag = 2, c) : d; b.effectTag = 2; return c } function g(b) { a && null === b.alternate && (b.effectTag = 2); return b } function h(a, b, c, d) { if (null === b || 6 !== b.tag) return b = qe(c, a.mode, d), b.return = a, b; b = e(b, c); b.return = a; return b } function m(a, b, c, d) {
                if (null !== b && b.elementType === c.type) return d = e(b, c.props), d.ref = Rb(a, b, c), d.return = a, d; d = Oc(c.type,
                    c.key, c.props, null, a.mode, d); d.ref = Rb(a, b, c); d.return = a; return d
            } function n(a, b, c, d) { if (null === b || 4 !== b.tag || b.stateNode.containerInfo !== c.containerInfo || b.stateNode.implementation !== c.implementation) return b = re(c, a.mode, d), b.return = a, b; b = e(b, c.children || []); b.return = a; return b } function l(a, b, c, d, f) { if (null === b || 7 !== b.tag) return b = Ha(c, a.mode, d, f), b.return = a, b; b = e(b, c); b.return = a; return b } function ba(a, b, c) {
                if ("string" === typeof b || "number" === typeof b) return b = qe("" + b, a.mode, c), b.return = a, b; if ("object" ===
                    typeof b && null !== b) { switch (b.$$typeof) { case Pc: return c = Oc(b.type, b.key, b.props, null, a.mode, c), c.ref = Rb(a, null, b), c.return = a, c; case gb: return b = re(b, a.mode, c), b.return = a, b }if (Qc(b) || zb(b)) return b = Ha(b, a.mode, c, null), b.return = a, b; Nc(a, b) } return null
            } function p(a, b, c, d) {
                var e = null !== b ? b.key : null; if ("string" === typeof c || "number" === typeof c) return null !== e ? null : h(a, b, "" + c, d); if ("object" === typeof c && null !== c) {
                    switch (c.$$typeof) {
                        case Pc: return c.key === e ? c.type === Ma ? l(a, b, c.props.children, d, e) : m(a, b, c,
                            d) : null; case gb: return c.key === e ? n(a, b, c, d) : null
                    }if (Qc(c) || zb(c)) return null !== e ? null : l(a, b, c, d, null); Nc(a, c)
                } return null
            } function t(a, b, c, d, e) {
                if ("string" === typeof d || "number" === typeof d) return a = a.get(c) || null, h(b, a, "" + d, e); if ("object" === typeof d && null !== d) {
                    switch (d.$$typeof) { case Pc: return a = a.get(null === d.key ? c : d.key) || null, d.type === Ma ? l(b, a, d.props.children, e, d.key) : m(b, a, d, e); case gb: return a = a.get(null === d.key ? c : d.key) || null, n(b, a, d, e) }if (Qc(d) || zb(d)) return a = a.get(c) || null, l(b, a, d, e, null);
                    Nc(b, d)
                } return null
            } function q(e, g, h, m) {
                for (var n = null, k = null, l = g, r = g = 0, C = null; null !== l && r < h.length; r++) { l.index > r ? (C = l, l = null) : C = l.sibling; var O = p(e, l, h[r], m); if (null === O) { null === l && (l = C); break } a && l && null === O.alternate && b(e, l); g = f(O, g, r); null === k ? n = O : k.sibling = O; k = O; l = C } if (r === h.length) return c(e, l), n; if (null === l) { for (; r < h.length; r++)l = ba(e, h[r], m), null !== l && (g = f(l, g, r), null === k ? n = l : k.sibling = l, k = l); return n } for (l = d(e, l); r < h.length; r++)C = t(l, e, r, h[r], m), null !== C && (a && null !== C.alternate && l.delete(null ===
                    C.key ? r : C.key), g = f(C, g, r), null === k ? n = C : k.sibling = C, k = C); a && l.forEach(function (a) { return b(e, a) }); return n
            } function w(e, g, h, n) {
                var m = zb(h); if ("function" !== typeof m) throw Error(k(150)); h = m.call(h); if (null == h) throw Error(k(151)); for (var l = m = null, r = g, C = g = 0, O = null, v = h.next(); null !== r && !v.done; C++ , v = h.next()) { r.index > C ? (O = r, r = null) : O = r.sibling; var q = p(e, r, v.value, n); if (null === q) { null === r && (r = O); break } a && r && null === q.alternate && b(e, r); g = f(q, g, C); null === l ? m = q : l.sibling = q; l = q; r = O } if (v.done) return c(e, r), m;
                if (null === r) { for (; !v.done; C++ , v = h.next())v = ba(e, v.value, n), null !== v && (g = f(v, g, C), null === l ? m = v : l.sibling = v, l = v); return m } for (r = d(e, r); !v.done; C++ , v = h.next())v = t(r, e, C, v.value, n), null !== v && (a && null !== v.alternate && r.delete(null === v.key ? C : v.key), g = f(v, g, C), null === l ? m = v : l.sibling = v, l = v); a && r.forEach(function (a) { return b(e, a) }); return m
            } return function (a, d, f, h) {
                var m = "object" === typeof f && null !== f && f.type === Ma && null === f.key; m && (f = f.props.children); var n = "object" === typeof f && null !== f; if (n) switch (f.$$typeof) {
                    case Pc: a: {
                        n =
                        f.key; for (m = d; null !== m;) { if (m.key === n) { switch (m.tag) { case 7: if (f.type === Ma) { c(a, m.sibling); d = e(m, f.props.children); d.return = a; a = d; break a } break; default: if (m.elementType === f.type) { c(a, m.sibling); d = e(m, f.props); d.ref = Rb(a, m, f); d.return = a; a = d; break a } }c(a, m); break } else b(a, m); m = m.sibling } f.type === Ma ? (d = Ha(f.props.children, a.mode, h, f.key), d.return = a, a = d) : (h = Oc(f.type, f.key, f.props, null, a.mode, h), h.ref = Rb(a, d, f), h.return = a, a = h)
                    } return g(a); case gb: a: {
                        for (m = f.key; null !== d;) {
                            if (d.key === m) if (4 === d.tag && d.stateNode.containerInfo ===
                                f.containerInfo && d.stateNode.implementation === f.implementation) { c(a, d.sibling); d = e(d, f.children || []); d.return = a; a = d; break a } else { c(a, d); break } else b(a, d); d = d.sibling
                        } d = re(f, a.mode, h); d.return = a; a = d
                    } return g(a)
                }if ("string" === typeof f || "number" === typeof f) return f = "" + f, null !== d && 6 === d.tag ? (c(a, d.sibling), d = e(d, f), d.return = a, a = d) : (c(a, d), d = qe(f, a.mode, h), d.return = a, a = d), g(a); if (Qc(f)) return q(a, d, f, h); if (zb(f)) return w(a, d, f, h); n && Nc(a, f); if ("undefined" === typeof f && !m) switch (a.tag) {
                    case 1: case 0: throw a =
                        a.type, Error(k(152, a.displayName || a.name || "Component"));
                }return c(a, d)
            }
        } function Ta(a) { if (a === Sb) throw Error(k(174)); return a } function se(a, b) { y(Tb, b); y(Ub, a); y(ja, Sb); a = b.nodeType; switch (a) { case 9: case 11: b = (b = b.documentElement) ? b.namespaceURI : Hd(null, ""); break; default: a = 8 === a ? b.parentNode : b, b = a.namespaceURI || null, a = a.tagName, b = Hd(b, a) }q(ja); y(ja, b) } function tb(a) { q(ja); q(Ub); q(Tb) } function bh(a) { Ta(Tb.current); var b = Ta(ja.current); var c = Hd(b, a.type); b !== c && (y(Ub, a), y(ja, c)) } function te(a) {
        Ub.current ===
            a && (q(ja), q(Ub))
        } function Rc(a) { for (var b = a; null !== b;) { if (13 === b.tag) { var c = b.memoizedState; if (null !== c && (c = c.dehydrated, null === c || c.data === $d || c.data === Zd)) return b } else if (19 === b.tag && void 0 !== b.memoizedProps.revealOrder) { if (0 !== (b.effectTag & 64)) return b } else if (null !== b.child) { b.child.return = b; b = b.child; continue } if (b === a) break; for (; null === b.sibling;) { if (null === b.return || b.return === a) return null; b = b.return } b.sibling.return = b.return; b = b.sibling } return null } function ue(a, b) { return { responder: a, props: b } }
    function S() { throw Error(k(321)); } function ve(a, b) { if (null === b) return !1; for (var c = 0; c < b.length && c < a.length; c++)if (!Qa(a[c], b[c])) return !1; return !0 } function we(a, b, c, d, e, f) {
        Ia = f; z = b; b.memoizedState = null; b.updateQueue = null; b.expirationTime = 0; Sc.current = null === a || null === a.memoizedState ? dj : ej; a = c(d, e); if (b.expirationTime === Ia) { f = 0; do { b.expirationTime = 0; if (!(25 > f)) throw Error(k(301)); f += 1; J = K = null; b.updateQueue = null; Sc.current = fj; a = c(d, e) } while (b.expirationTime === Ia) } Sc.current = Tc; b = null !== K && null !== K.next;
        Ia = 0; J = K = z = null; Uc = !1; if (b) throw Error(k(300)); return a
    } function ub() { var a = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null }; null === J ? z.memoizedState = J = a : J = J.next = a; return J } function vb() {
        if (null === K) { var a = z.alternate; a = null !== a ? a.memoizedState : null } else a = K.next; var b = null === J ? z.memoizedState : J.next; if (null !== b) J = b, K = a; else {
            if (null === a) throw Error(k(310)); K = a; a = { memoizedState: K.memoizedState, baseState: K.baseState, baseQueue: K.baseQueue, queue: K.queue, next: null }; null === J ? z.memoizedState =
                J = a : J = J.next = a
        } return J
    } function Ua(a, b) { return "function" === typeof b ? b(a) : b } function Vc(a, b, c) {
        b = vb(); c = b.queue; if (null === c) throw Error(k(311)); c.lastRenderedReducer = a; var d = K, e = d.baseQueue, f = c.pending; if (null !== f) { if (null !== e) { var g = e.next; e.next = f.next; f.next = g } d.baseQueue = e = f; c.pending = null } if (null !== e) {
            e = e.next; d = d.baseState; var h = g = f = null, m = e; do {
                var n = m.expirationTime; if (n < Ia) {
                    var l = {
                        expirationTime: m.expirationTime, suspenseConfig: m.suspenseConfig, action: m.action, eagerReducer: m.eagerReducer, eagerState: m.eagerState,
                        next: null
                    }; null === h ? (g = h = l, f = d) : h = h.next = l; n > z.expirationTime && (z.expirationTime = n, Kc(n))
                } else null !== h && (h = h.next = { expirationTime: 1073741823, suspenseConfig: m.suspenseConfig, action: m.action, eagerReducer: m.eagerReducer, eagerState: m.eagerState, next: null }), Vg(n, m.suspenseConfig), d = m.eagerReducer === a ? m.eagerState : a(d, m.action); m = m.next
            } while (null !== m && m !== e); null === h ? f = d : h.next = g; Qa(d, b.memoizedState) || (ia = !0); b.memoizedState = d; b.baseState = f; b.baseQueue = h; c.lastRenderedState = d
        } return [b.memoizedState,
        c.dispatch]
    } function Wc(a, b, c) { b = vb(); c = b.queue; if (null === c) throw Error(k(311)); c.lastRenderedReducer = a; var d = c.dispatch, e = c.pending, f = b.memoizedState; if (null !== e) { c.pending = null; var g = e = e.next; do f = a(f, g.action), g = g.next; while (g !== e); Qa(f, b.memoizedState) || (ia = !0); b.memoizedState = f; null === b.baseQueue && (b.baseState = f); c.lastRenderedState = f } return [f, d] } function xe(a) {
        var b = ub(); "function" === typeof a && (a = a()); b.memoizedState = b.baseState = a; a = b.queue = {
            pending: null, dispatch: null, lastRenderedReducer: Ua,
            lastRenderedState: a
        }; a = a.dispatch = ch.bind(null, z, a); return [b.memoizedState, a]
    } function ye(a, b, c, d) { a = { tag: a, create: b, destroy: c, deps: d, next: null }; b = z.updateQueue; null === b ? (b = { lastEffect: null }, z.updateQueue = b, b.lastEffect = a.next = a) : (c = b.lastEffect, null === c ? b.lastEffect = a.next = a : (d = c.next, c.next = a, a.next = d, b.lastEffect = a)); return a } function dh(a) { return vb().memoizedState } function ze(a, b, c, d) { var e = ub(); z.effectTag |= a; e.memoizedState = ye(1 | b, c, void 0, void 0 === d ? null : d) } function Ae(a, b, c, d) {
        var e = vb();
        d = void 0 === d ? null : d; var f = void 0; if (null !== K) { var g = K.memoizedState; f = g.destroy; if (null !== d && ve(d, g.deps)) { ye(b, c, f, d); return } } z.effectTag |= a; e.memoizedState = ye(1 | b, c, f, d)
    } function eh(a, b) { return ze(516, 4, a, b) } function Xc(a, b) { return Ae(516, 4, a, b) } function fh(a, b) { return Ae(4, 2, a, b) } function gh(a, b) { if ("function" === typeof b) return a = a(), b(a), function () { b(null) }; if (null !== b && void 0 !== b) return a = a(), b.current = a, function () { b.current = null } } function hh(a, b, c) {
        c = null !== c && void 0 !== c ? c.concat([a]) : null;
        return Ae(4, 2, gh.bind(null, b, a), c)
    } function Be(a, b) { } function ih(a, b) { ub().memoizedState = [a, void 0 === b ? null : b]; return a } function Yc(a, b) { var c = vb(); b = void 0 === b ? null : b; var d = c.memoizedState; if (null !== d && null !== b && ve(b, d[1])) return d[0]; c.memoizedState = [a, b]; return a } function jh(a, b) { var c = vb(); b = void 0 === b ? null : b; var d = c.memoizedState; if (null !== d && null !== b && ve(b, d[1])) return d[0]; a = a(); c.memoizedState = [a, b]; return a } function Ce(a, b, c) {
        var d = Cc(); Da(98 > d ? 98 : d, function () { a(!0) }); Da(97 < d ? 97 : d, function () {
            var d =
                X.suspense; X.suspense = void 0 === b ? null : b; try { a(!1), c() } finally { X.suspense = d }
        })
    } function ch(a, b, c) {
        var d = ka(), e = Vb.suspense; d = Va(d, a, e); e = { expirationTime: d, suspenseConfig: e, action: c, eagerReducer: null, eagerState: null, next: null }; var f = b.pending; null === f ? e.next = e : (e.next = f.next, f.next = e); b.pending = e; f = a.alternate; if (a === z || null !== f && f === z) Uc = !0, e.expirationTime = Ia, z.expirationTime = Ia; else {
            if (0 === a.expirationTime && (null === f || 0 === f.expirationTime) && (f = b.lastRenderedReducer, null !== f)) try {
                var g = b.lastRenderedState,
                h = f(g, c); e.eagerReducer = f; e.eagerState = h; if (Qa(h, g)) return
            } catch (m) { } finally { } Ja(a, d)
        }
    } function kh(a, b) { var c = la(5, null, null, 0); c.elementType = "DELETED"; c.type = "DELETED"; c.stateNode = b; c.return = a; c.effectTag = 8; null !== a.lastEffect ? (a.lastEffect.nextEffect = c, a.lastEffect = c) : a.firstEffect = a.lastEffect = c } function lh(a, b) {
        switch (a.tag) {
            case 5: var c = a.type; b = 1 !== b.nodeType || c.toLowerCase() !== b.nodeName.toLowerCase() ? null : b; return null !== b ? (a.stateNode = b, !0) : !1; case 6: return b = "" === a.pendingProps || 3 !== b.nodeType ?
                null : b, null !== b ? (a.stateNode = b, !0) : !1; case 13: return !1; default: return !1
        }
    } function De(a) { if (Wa) { var b = Ka; if (b) { var c = b; if (!lh(a, b)) { b = kb(c.nextSibling); if (!b || !lh(a, b)) { a.effectTag = a.effectTag & -1025 | 2; Wa = !1; ra = a; return } kh(ra, c) } ra = a; Ka = kb(b.firstChild) } else a.effectTag = a.effectTag & -1025 | 2, Wa = !1, ra = a } } function mh(a) { for (a = a.return; null !== a && 5 !== a.tag && 3 !== a.tag && 13 !== a.tag;)a = a.return; ra = a } function Zc(a) {
        if (a !== ra) return !1; if (!Wa) return mh(a), Wa = !0, !1; var b = a.type; if (5 !== a.tag || "head" !== b && "body" !==
            b && !Yd(b, a.memoizedProps)) for (b = Ka; b;)kh(a, b), b = kb(b.nextSibling); mh(a); if (13 === a.tag) { a = a.memoizedState; a = null !== a ? a.dehydrated : null; if (!a) throw Error(k(317)); a: { a = a.nextSibling; for (b = 0; a;) { if (8 === a.nodeType) { var c = a.data; if (c === og) { if (0 === b) { Ka = kb(a.nextSibling); break a } b-- } else c !== ng && c !== Zd && c !== $d || b++ } a = a.nextSibling } Ka = null } } else Ka = ra ? kb(a.stateNode.nextSibling) : null; return !0
    } function Ee() { Ka = ra = null; Wa = !1 } function T(a, b, c, d) { b.child = null === a ? Fe(b, null, c, d) : wb(b, a.child, c, d) } function nh(a,
        b, c, d, e) { c = c.render; var f = b.ref; rb(b, e); d = we(a, b, c, d, f, e); if (null !== a && !ia) return b.updateQueue = a.updateQueue, b.effectTag &= -517, a.expirationTime <= e && (a.expirationTime = 0), sa(a, b, e); b.effectTag |= 1; T(a, b, d, e); return b.child } function oh(a, b, c, d, e, f) {
            if (null === a) { var g = c.type; if ("function" === typeof g && !Ge(g) && void 0 === g.defaultProps && null === c.compare && void 0 === c.defaultProps) return b.tag = 15, b.type = g, ph(a, b, g, d, e, f); a = Oc(c.type, null, d, null, b.mode, f); a.ref = b.ref; a.return = b; return b.child = a } g = a.child; if (e <
                f && (e = g.memoizedProps, c = c.compare, c = null !== c ? c : Ob, c(e, d) && a.ref === b.ref)) return sa(a, b, f); b.effectTag |= 1; a = Sa(g, d); a.ref = b.ref; a.return = b; return b.child = a
        } function ph(a, b, c, d, e, f) { return null !== a && Ob(a.memoizedProps, d) && a.ref === b.ref && (ia = !1, e < f) ? (b.expirationTime = a.expirationTime, sa(a, b, f)) : He(a, b, c, d, f) } function qh(a, b) { var c = b.ref; if (null === a && null !== c || null !== a && a.ref !== c) b.effectTag |= 128 } function He(a, b, c, d, e) {
            var f = N(c) ? Ra : B.current; f = pb(b, f); rb(b, e); c = we(a, b, c, d, f, e); if (null !== a && !ia) return b.updateQueue =
                a.updateQueue, b.effectTag &= -517, a.expirationTime <= e && (a.expirationTime = 0), sa(a, b, e); b.effectTag |= 1; T(a, b, c, e); return b.child
        } function rh(a, b, c, d, e) {
            if (N(c)) { var f = !0; Bc(b) } else f = !1; rb(b, e); if (null === b.stateNode) null !== a && (a.alternate = null, b.alternate = null, b.effectTag |= 2), Yg(b, c, d), pe(b, c, d, e), d = !0; else if (null === a) {
                var g = b.stateNode, h = b.memoizedProps; g.props = h; var m = g.context, n = c.contextType; "object" === typeof n && null !== n ? n = W(n) : (n = N(c) ? Ra : B.current, n = pb(b, n)); var l = c.getDerivedStateFromProps, k = "function" ===
                    typeof l || "function" === typeof g.getSnapshotBeforeUpdate; k || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== d || m !== n) && Zg(b, g, d, n); Ga = !1; var p = b.memoizedState; g.state = p; Qb(b, d, g, e); m = b.memoizedState; h !== d || p !== m || G.current || Ga ? ("function" === typeof l && (Lc(b, c, l, d), m = b.memoizedState), (h = Ga || Xg(b, c, h, d, p, m, n)) ? (k || "function" !== typeof g.UNSAFE_componentWillMount && "function" !== typeof g.componentWillMount || ("function" === typeof g.componentWillMount &&
                        g.componentWillMount(), "function" === typeof g.UNSAFE_componentWillMount && g.UNSAFE_componentWillMount()), "function" === typeof g.componentDidMount && (b.effectTag |= 4)) : ("function" === typeof g.componentDidMount && (b.effectTag |= 4), b.memoizedProps = d, b.memoizedState = m), g.props = d, g.state = m, g.context = n, d = h) : ("function" === typeof g.componentDidMount && (b.effectTag |= 4), d = !1)
            } else g = b.stateNode, oe(a, b), h = b.memoizedProps, g.props = b.type === b.elementType ? h : aa(b.type, h), m = g.context, n = c.contextType, "object" === typeof n && null !==
                n ? n = W(n) : (n = N(c) ? Ra : B.current, n = pb(b, n)), l = c.getDerivedStateFromProps, (k = "function" === typeof l || "function" === typeof g.getSnapshotBeforeUpdate) || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== d || m !== n) && Zg(b, g, d, n), Ga = !1, m = b.memoizedState, g.state = m, Qb(b, d, g, e), p = b.memoizedState, h !== d || m !== p || G.current || Ga ? ("function" === typeof l && (Lc(b, c, l, d), p = b.memoizedState), (l = Ga || Xg(b, c, h, d, m, p, n)) ? (k || "function" !== typeof g.UNSAFE_componentWillUpdate &&
                    "function" !== typeof g.componentWillUpdate || ("function" === typeof g.componentWillUpdate && g.componentWillUpdate(d, p, n), "function" === typeof g.UNSAFE_componentWillUpdate && g.UNSAFE_componentWillUpdate(d, p, n)), "function" === typeof g.componentDidUpdate && (b.effectTag |= 4), "function" === typeof g.getSnapshotBeforeUpdate && (b.effectTag |= 256)) : ("function" !== typeof g.componentDidUpdate || h === a.memoizedProps && m === a.memoizedState || (b.effectTag |= 4), "function" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && m ===
                        a.memoizedState || (b.effectTag |= 256), b.memoizedProps = d, b.memoizedState = p), g.props = d, g.state = p, g.context = n, d = l) : ("function" !== typeof g.componentDidUpdate || h === a.memoizedProps && m === a.memoizedState || (b.effectTag |= 4), "function" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && m === a.memoizedState || (b.effectTag |= 256), d = !1); return Ie(a, b, c, d, f, e)
        } function Ie(a, b, c, d, e, f) {
            qh(a, b); var g = 0 !== (b.effectTag & 64); if (!d && !g) return e && Hg(b, c, !1), sa(a, b, f); d = b.stateNode; gj.current = b; var h = g && "function" !== typeof c.getDerivedStateFromError ?
                null : d.render(); b.effectTag |= 1; null !== a && g ? (b.child = wb(b, a.child, null, f), b.child = wb(b, null, h, f)) : T(a, b, h, f); b.memoizedState = d.state; e && Hg(b, c, !0); return b.child
        } function sh(a) { var b = a.stateNode; b.pendingContext ? Fg(a, b.pendingContext, b.pendingContext !== b.context) : b.context && Fg(a, b.context, !1); se(a, b.containerInfo) } function th(a, b, c) {
            var d = b.mode, e = b.pendingProps, f = D.current, g = !1, h; (h = 0 !== (b.effectTag & 64)) || (h = 0 !== (f & 2) && (null === a || null !== a.memoizedState)); h ? (g = !0, b.effectTag &= -65) : null !== a && null ===
                a.memoizedState || void 0 === e.fallback || !0 === e.unstable_avoidThisFallback || (f |= 1); y(D, f & 1); if (null === a) { void 0 !== e.fallback && De(b); if (g) { g = e.fallback; e = Ha(null, d, 0, null); e.return = b; if (0 === (b.mode & 2)) for (a = null !== b.memoizedState ? b.child.child : b.child, e.child = a; null !== a;)a.return = e, a = a.sibling; c = Ha(g, d, c, null); c.return = b; e.sibling = c; b.memoizedState = Je; b.child = e; return c } d = e.children; b.memoizedState = null; return b.child = Fe(b, null, d, c) } if (null !== a.memoizedState) {
                    a = a.child; d = a.sibling; if (g) {
                        e = e.fallback;
                        c = Sa(a, a.pendingProps); c.return = b; if (0 === (b.mode & 2) && (g = null !== b.memoizedState ? b.child.child : b.child, g !== a.child)) for (c.child = g; null !== g;)g.return = c, g = g.sibling; d = Sa(d, e); d.return = b; c.sibling = d; c.childExpirationTime = 0; b.memoizedState = Je; b.child = c; return d
                    } c = wb(b, a.child, e.children, c); b.memoizedState = null; return b.child = c
                } a = a.child; if (g) {
                    g = e.fallback; e = Ha(null, d, 0, null); e.return = b; e.child = a; null !== a && (a.return = e); if (0 === (b.mode & 2)) for (a = null !== b.memoizedState ? b.child.child : b.child, e.child = a; null !==
                        a;)a.return = e, a = a.sibling; c = Ha(g, d, c, null); c.return = b; e.sibling = c; c.effectTag |= 2; e.childExpirationTime = 0; b.memoizedState = Je; b.child = e; return c
                } b.memoizedState = null; return b.child = wb(b, a, e.children, c)
        } function uh(a, b) { a.expirationTime < b && (a.expirationTime = b); var c = a.alternate; null !== c && c.expirationTime < b && (c.expirationTime = b); Sg(a.return, b) } function Ke(a, b, c, d, e, f) {
            var g = a.memoizedState; null === g ? a.memoizedState = {
                isBackwards: b, rendering: null, renderingStartTime: 0, last: d, tail: c, tailExpiration: 0, tailMode: e,
                lastEffect: f
            } : (g.isBackwards = b, g.rendering = null, g.renderingStartTime = 0, g.last = d, g.tail = c, g.tailExpiration = 0, g.tailMode = e, g.lastEffect = f)
        } function vh(a, b, c) {
            var d = b.pendingProps, e = d.revealOrder, f = d.tail; T(a, b, d.children, c); d = D.current; if (0 !== (d & 2)) d = d & 1 | 2, b.effectTag |= 64; else {
                if (null !== a && 0 !== (a.effectTag & 64)) a: for (a = b.child; null !== a;) {
                    if (13 === a.tag) null !== a.memoizedState && uh(a, c); else if (19 === a.tag) uh(a, c); else if (null !== a.child) { a.child.return = a; a = a.child; continue } if (a === b) break a; for (; null === a.sibling;) {
                        if (null ===
                            a.return || a.return === b) break a; a = a.return
                    } a.sibling.return = a.return; a = a.sibling
                } d &= 1
            } y(D, d); if (0 === (b.mode & 2)) b.memoizedState = null; else switch (e) {
                case "forwards": c = b.child; for (e = null; null !== c;)a = c.alternate, null !== a && null === Rc(a) && (e = c), c = c.sibling; c = e; null === c ? (e = b.child, b.child = null) : (e = c.sibling, c.sibling = null); Ke(b, !1, e, c, f, b.lastEffect); break; case "backwards": c = null; e = b.child; for (b.child = null; null !== e;) { a = e.alternate; if (null !== a && null === Rc(a)) { b.child = e; break } a = e.sibling; e.sibling = c; c = e; e = a } Ke(b,
                    !0, c, null, f, b.lastEffect); break; case "together": Ke(b, !1, null, null, void 0, b.lastEffect); break; default: b.memoizedState = null
            }return b.child
        } function sa(a, b, c) { null !== a && (b.dependencies = a.dependencies); var d = b.expirationTime; 0 !== d && Kc(d); if (b.childExpirationTime < c) return null; if (null !== a && b.child !== a.child) throw Error(k(153)); if (null !== b.child) { a = b.child; c = Sa(a, a.pendingProps); b.child = c; for (c.return = b; null !== a.sibling;)a = a.sibling, c = c.sibling = Sa(a, a.pendingProps), c.return = b; c.sibling = null } return b.child }
    function $c(a, b) { switch (a.tailMode) { case "hidden": b = a.tail; for (var c = null; null !== b;)null !== b.alternate && (c = b), b = b.sibling; null === c ? a.tail = null : c.sibling = null; break; case "collapsed": c = a.tail; for (var d = null; null !== c;)null !== c.alternate && (d = c), c = c.sibling; null === d ? b || null === a.tail ? a.tail = null : a.tail.sibling = null : d.sibling = null } } function hj(a, b, c) {
        var d = b.pendingProps; switch (b.tag) {
            case 2: case 16: case 15: case 0: case 11: case 7: case 8: case 12: case 9: case 14: return null; case 1: return N(b.type) && (q(G), q(B)),
                null; case 3: return tb(), q(G), q(B), c = b.stateNode, c.pendingContext && (c.context = c.pendingContext, c.pendingContext = null), null !== a && null !== a.child || !Zc(b) || (b.effectTag |= 4), wh(b), null; case 5: te(b); c = Ta(Tb.current); var e = b.type; if (null !== a && null != b.stateNode) ij(a, b, e, d, c), a.ref !== b.ref && (b.effectTag |= 128); else {
                    if (!d) { if (null === b.stateNode) throw Error(k(166)); return null } a = Ta(ja.current); if (Zc(b)) {
                        d = b.stateNode; e = b.type; var f = b.memoizedProps; d[Aa] = b; d[vc] = f; switch (e) {
                            case "iframe": case "object": case "embed": w("load",
                                d); break; case "video": case "audio": for (a = 0; a < Db.length; a++)w(Db[a], d); break; case "source": w("error", d); break; case "img": case "image": case "link": w("error", d); w("load", d); break; case "form": w("reset", d); w("submit", d); break; case "details": w("toggle", d); break; case "input": Hf(d, f); w("invalid", d); oa(c, "onChange"); break; case "select": d._wrapperState = { wasMultiple: !!f.multiple }; w("invalid", d); oa(c, "onChange"); break; case "textarea": Kf(d, f), w("invalid", d), oa(c, "onChange")
                        }Ud(e, f); a = null; for (var g in f) if (f.hasOwnProperty(g)) {
                            var h =
                                f[g]; "children" === g ? "string" === typeof h ? d.textContent !== h && (a = ["children", h]) : "number" === typeof h && d.textContent !== "" + h && (a = ["children", "" + h]) : db.hasOwnProperty(g) && null != h && oa(c, g)
                        } switch (e) { case "input": mc(d); Jf(d, f, !0); break; case "textarea": mc(d); Mf(d); break; case "select": case "option": break; default: "function" === typeof f.onClick && (d.onclick = uc) }c = a; b.updateQueue = c; null !== c && (b.effectTag |= 4)
                    } else {
                        g = 9 === c.nodeType ? c : c.ownerDocument; "http://www.w3.org/1999/xhtml" === a && (a = Nf(e)); "http://www.w3.org/1999/xhtml" ===
                            a ? "script" === e ? (a = g.createElement("div"), a.innerHTML = "<script>\x3c/script>", a = a.removeChild(a.firstChild)) : "string" === typeof d.is ? a = g.createElement(e, { is: d.is }) : (a = g.createElement(e), "select" === e && (g = a, d.multiple ? g.multiple = !0 : d.size && (g.size = d.size))) : a = g.createElementNS(a, e); a[Aa] = b; a[vc] = d; jj(a, b, !1, !1); b.stateNode = a; g = Vd(e, d); switch (e) {
                                case "iframe": case "object": case "embed": w("load", a); h = d; break; case "video": case "audio": for (h = 0; h < Db.length; h++)w(Db[h], a); h = d; break; case "source": w("error", a);
                                    h = d; break; case "img": case "image": case "link": w("error", a); w("load", a); h = d; break; case "form": w("reset", a); w("submit", a); h = d; break; case "details": w("toggle", a); h = d; break; case "input": Hf(a, d); h = Cd(a, d); w("invalid", a); oa(c, "onChange"); break; case "option": h = Fd(a, d); break; case "select": a._wrapperState = { wasMultiple: !!d.multiple }; h = M({}, d, { value: void 0 }); w("invalid", a); oa(c, "onChange"); break; case "textarea": Kf(a, d); h = Gd(a, d); w("invalid", a); oa(c, "onChange"); break; default: h = d
                            }Ud(e, h); var m = h; for (f in m) if (m.hasOwnProperty(f)) {
                                var n =
                                    m[f]; "style" === f ? gg(a, n) : "dangerouslySetInnerHTML" === f ? (n = n ? n.__html : void 0, null != n && xh(a, n)) : "children" === f ? "string" === typeof n ? ("textarea" !== e || "" !== n) && Wb(a, n) : "number" === typeof n && Wb(a, "" + n) : "suppressContentEditableWarning" !== f && "suppressHydrationWarning" !== f && "autoFocus" !== f && (db.hasOwnProperty(f) ? null != n && oa(c, f) : null != n && xd(a, f, n, g))
                            } switch (e) {
                                case "input": mc(a); Jf(a, d, !1); break; case "textarea": mc(a); Mf(a); break; case "option": null != d.value && a.setAttribute("value", "" + va(d.value)); break; case "select": a.multiple =
                                    !!d.multiple; c = d.value; null != c ? hb(a, !!d.multiple, c, !1) : null != d.defaultValue && hb(a, !!d.multiple, d.defaultValue, !0); break; default: "function" === typeof h.onClick && (a.onclick = uc)
                            }lg(e, d) && (b.effectTag |= 4)
                    } null !== b.ref && (b.effectTag |= 128)
                } return null; case 6: if (a && null != b.stateNode) kj(a, b, a.memoizedProps, d); else {
                    if ("string" !== typeof d && null === b.stateNode) throw Error(k(166)); c = Ta(Tb.current); Ta(ja.current); Zc(b) ? (c = b.stateNode, d = b.memoizedProps, c[Aa] = b, c.nodeValue !== d && (b.effectTag |= 4)) : (c = (9 === c.nodeType ?
                        c : c.ownerDocument).createTextNode(d), c[Aa] = b, b.stateNode = c)
                } return null; case 13: q(D); d = b.memoizedState; if (0 !== (b.effectTag & 64)) return b.expirationTime = c, b; c = null !== d; d = !1; null === a ? void 0 !== b.memoizedProps.fallback && Zc(b) : (e = a.memoizedState, d = null !== e, c || null === e || (e = a.child.sibling, null !== e && (f = b.firstEffect, null !== f ? (b.firstEffect = e, e.nextEffect = f) : (b.firstEffect = b.lastEffect = e, e.nextEffect = null), e.effectTag = 8))); if (c && !d && 0 !== (b.mode & 2)) if (null === a && !0 !== b.memoizedProps.unstable_avoidThisFallback ||
                    0 !== (D.current & 1)) F === Xa && (F = ad); else { if (F === Xa || F === ad) F = bd; 0 !== Xb && null !== U && (Ya(U, P), yh(U, Xb)) } if (c || d) b.effectTag |= 4; return null; case 4: return tb(), wh(b), null; case 10: return me(b), null; case 17: return N(b.type) && (q(G), q(B)), null; case 19: q(D); d = b.memoizedState; if (null === d) return null; e = 0 !== (b.effectTag & 64); f = d.rendering; if (null === f) if (e) $c(d, !1); else {
                        if (F !== Xa || null !== a && 0 !== (a.effectTag & 64)) for (f = b.child; null !== f;) {
                            a = Rc(f); if (null !== a) {
                            b.effectTag |= 64; $c(d, !1); e = a.updateQueue; null !== e && (b.updateQueue =
                                e, b.effectTag |= 4); null === d.lastEffect && (b.firstEffect = null); b.lastEffect = d.lastEffect; for (d = b.child; null !== d;)e = d, f = c, e.effectTag &= 2, e.nextEffect = null, e.firstEffect = null, e.lastEffect = null, a = e.alternate, null === a ? (e.childExpirationTime = 0, e.expirationTime = f, e.child = null, e.memoizedProps = null, e.memoizedState = null, e.updateQueue = null, e.dependencies = null) : (e.childExpirationTime = a.childExpirationTime, e.expirationTime = a.expirationTime, e.child = a.child, e.memoizedProps = a.memoizedProps, e.memoizedState = a.memoizedState,
                                    e.updateQueue = a.updateQueue, f = a.dependencies, e.dependencies = null === f ? null : { expirationTime: f.expirationTime, firstContext: f.firstContext, responders: f.responders }), d = d.sibling; y(D, D.current & 1 | 2); return b.child
                            } f = f.sibling
                        }
                    } else {
                        if (!e) if (a = Rc(f), null !== a) { if (b.effectTag |= 64, e = !0, c = a.updateQueue, null !== c && (b.updateQueue = c, b.effectTag |= 4), $c(d, !0), null === d.tail && "hidden" === d.tailMode && !f.alternate) return b = b.lastEffect = d.lastEffect, null !== b && (b.nextEffect = null), null } else 2 * Y() - d.renderingStartTime > d.tailExpiration &&
                            1 < c && (b.effectTag |= 64, e = !0, $c(d, !1), b.expirationTime = b.childExpirationTime = c - 1); d.isBackwards ? (f.sibling = b.child, b.child = f) : (c = d.last, null !== c ? c.sibling = f : b.child = f, d.last = f)
                    } return null !== d.tail ? (0 === d.tailExpiration && (d.tailExpiration = Y() + 500), c = d.tail, d.rendering = c, d.tail = c.sibling, d.lastEffect = b.lastEffect, d.renderingStartTime = Y(), c.sibling = null, b = D.current, y(D, e ? b & 1 | 2 : b & 1), c) : null
        }throw Error(k(156, b.tag));
    } function lj(a, b) {
        switch (a.tag) {
            case 1: return N(a.type) && (q(G), q(B)), b = a.effectTag, b & 4096 ?
                (a.effectTag = b & -4097 | 64, a) : null; case 3: tb(); q(G); q(B); b = a.effectTag; if (0 !== (b & 64)) throw Error(k(285)); a.effectTag = b & -4097 | 64; return a; case 5: return te(a), null; case 13: return q(D), b = a.effectTag, b & 4096 ? (a.effectTag = b & -4097 | 64, a) : null; case 19: return q(D), null; case 4: return tb(), null; case 10: return me(a), null; default: return null
        }
    } function Le(a, b) { return { value: a, source: b, stack: Bd(b) } } function Me(a, b) {
        var c = b.source, d = b.stack; null === d && null !== c && (d = Bd(c)); null !== c && na(c.type); b = b.value; null !== a && 1 === a.tag &&
            na(a.type); try { console.error(b) } catch (e) { setTimeout(function () { throw e; }) }
    } function mj(a, b) { try { b.props = a.memoizedProps, b.state = a.memoizedState, b.componentWillUnmount() } catch (c) { Za(a, c) } } function zh(a) { var b = a.ref; if (null !== b) if ("function" === typeof b) try { b(null) } catch (c) { Za(a, c) } else b.current = null } function nj(a, b) {
        switch (b.tag) {
            case 0: case 11: case 15: case 22: return; case 1: if (b.effectTag & 256 && null !== a) {
                var c = a.memoizedProps, d = a.memoizedState; a = b.stateNode; b = a.getSnapshotBeforeUpdate(b.elementType ===
                    b.type ? c : aa(b.type, c), d); a.__reactInternalSnapshotBeforeUpdate = b
            } return; case 3: case 5: case 6: case 4: case 17: return
        }throw Error(k(163));
    } function Ah(a, b) { b = b.updateQueue; b = null !== b ? b.lastEffect : null; if (null !== b) { var c = b = b.next; do { if ((c.tag & a) === a) { var d = c.destroy; c.destroy = void 0; void 0 !== d && d() } c = c.next } while (c !== b) } } function Bh(a, b) { b = b.updateQueue; b = null !== b ? b.lastEffect : null; if (null !== b) { var c = b = b.next; do { if ((c.tag & a) === a) { var d = c.create; c.destroy = d() } c = c.next } while (c !== b) } } function oj(a, b, c, d) {
        switch (c.tag) {
            case 0: case 11: case 15: case 22: Bh(3,
                c); return; case 1: a = c.stateNode; c.effectTag & 4 && (null === b ? a.componentDidMount() : (d = c.elementType === c.type ? b.memoizedProps : aa(c.type, b.memoizedProps), a.componentDidUpdate(d, b.memoizedState, a.__reactInternalSnapshotBeforeUpdate))); b = c.updateQueue; null !== b && Wg(c, b, a); return; case 3: b = c.updateQueue; if (null !== b) { a = null; if (null !== c.child) switch (c.child.tag) { case 5: a = c.child.stateNode; break; case 1: a = c.child.stateNode }Wg(c, b, a) } return; case 5: a = c.stateNode; null === b && c.effectTag & 4 && lg(c.type, c.memoizedProps) &&
                    a.focus(); return; case 6: return; case 4: return; case 12: return; case 13: null === c.memoizedState && (c = c.alternate, null !== c && (c = c.memoizedState, null !== c && (c = c.dehydrated, null !== c && bg(c)))); return; case 19: case 17: case 20: case 21: return
        }throw Error(k(163));
    } function Ch(a, b, c) {
    "function" === typeof Ne && Ne(b); switch (b.tag) {
        case 0: case 11: case 14: case 15: case 22: a = b.updateQueue; if (null !== a && (a = a.lastEffect, null !== a)) {
            var d = a.next; Da(97 < c ? 97 : c, function () {
                var a = d; do {
                    var c = a.destroy; if (void 0 !== c) {
                        var g = b; try { c() } catch (h) {
                            Za(g,
                                h)
                        }
                    } a = a.next
                } while (a !== d)
            })
        } break; case 1: zh(b); c = b.stateNode; "function" === typeof c.componentWillUnmount && mj(b, c); break; case 5: zh(b); break; case 4: Dh(a, b, c)
    }
    } function Eh(a) { var b = a.alternate; a.return = null; a.child = null; a.memoizedState = null; a.updateQueue = null; a.dependencies = null; a.alternate = null; a.firstEffect = null; a.lastEffect = null; a.pendingProps = null; a.memoizedProps = null; a.stateNode = null; null !== b && Eh(b) } function Fh(a) { return 5 === a.tag || 3 === a.tag || 4 === a.tag } function Gh(a) {
        a: {
            for (var b = a.return; null !==
                b;) { if (Fh(b)) { var c = b; break a } b = b.return } throw Error(k(160));
        } b = c.stateNode; switch (c.tag) { case 5: var d = !1; break; case 3: b = b.containerInfo; d = !0; break; case 4: b = b.containerInfo; d = !0; break; default: throw Error(k(161)); }c.effectTag & 16 && (Wb(b, ""), c.effectTag &= -17); a: b: for (c = a; ;) {
            for (; null === c.sibling;) { if (null === c.return || Fh(c.return)) { c = null; break a } c = c.return } c.sibling.return = c.return; for (c = c.sibling; 5 !== c.tag && 6 !== c.tag && 18 !== c.tag;) {
                if (c.effectTag & 2) continue b; if (null === c.child || 4 === c.tag) continue b;
                else c.child.return = c, c = c.child
            } if (!(c.effectTag & 2)) { c = c.stateNode; break a }
        } d ? Oe(a, c, b) : Pe(a, c, b)
    } function Oe(a, b, c) { var d = a.tag, e = 5 === d || 6 === d; if (e) a = e ? a.stateNode : a.stateNode.instance, b ? 8 === c.nodeType ? c.parentNode.insertBefore(a, b) : c.insertBefore(a, b) : (8 === c.nodeType ? (b = c.parentNode, b.insertBefore(a, c)) : (b = c, b.appendChild(a)), c = c._reactRootContainer, null !== c && void 0 !== c || null !== b.onclick || (b.onclick = uc)); else if (4 !== d && (a = a.child, null !== a)) for (Oe(a, b, c), a = a.sibling; null !== a;)Oe(a, b, c), a = a.sibling }
    function Pe(a, b, c) { var d = a.tag, e = 5 === d || 6 === d; if (e) a = e ? a.stateNode : a.stateNode.instance, b ? c.insertBefore(a, b) : c.appendChild(a); else if (4 !== d && (a = a.child, null !== a)) for (Pe(a, b, c), a = a.sibling; null !== a;)Pe(a, b, c), a = a.sibling } function Dh(a, b, c) {
        for (var d = b, e = !1, f, g; ;) {
            if (!e) { e = d.return; a: for (; ;) { if (null === e) throw Error(k(160)); f = e.stateNode; switch (e.tag) { case 5: g = !1; break a; case 3: f = f.containerInfo; g = !0; break a; case 4: f = f.containerInfo; g = !0; break a }e = e.return } e = !0 } if (5 === d.tag || 6 === d.tag) {
                a: for (var h =
                    a, m = d, n = c, l = m; ;)if (Ch(h, l, n), null !== l.child && 4 !== l.tag) l.child.return = l, l = l.child; else { if (l === m) break a; for (; null === l.sibling;) { if (null === l.return || l.return === m) break a; l = l.return } l.sibling.return = l.return; l = l.sibling } g ? (h = f, m = d.stateNode, 8 === h.nodeType ? h.parentNode.removeChild(m) : h.removeChild(m)) : f.removeChild(d.stateNode)
            } else if (4 === d.tag) { if (null !== d.child) { f = d.stateNode.containerInfo; g = !0; d.child.return = d; d = d.child; continue } } else if (Ch(a, d, c), null !== d.child) { d.child.return = d; d = d.child; continue } if (d ===
                b) break; for (; null === d.sibling;) { if (null === d.return || d.return === b) return; d = d.return; 4 === d.tag && (e = !1) } d.sibling.return = d.return; d = d.sibling
        }
    } function Qe(a, b) {
        switch (b.tag) {
            case 0: case 11: case 14: case 15: case 22: Ah(3, b); return; case 1: return; case 5: var c = b.stateNode; if (null != c) {
                var d = b.memoizedProps, e = null !== a ? a.memoizedProps : d; a = b.type; var f = b.updateQueue; b.updateQueue = null; if (null !== f) {
                c[vc] = d; "input" === a && "radio" === d.type && null != d.name && If(c, d); Vd(a, e); b = Vd(a, d); for (e = 0; e < f.length; e += 2) {
                    var g = f[e],
                    h = f[e + 1]; "style" === g ? gg(c, h) : "dangerouslySetInnerHTML" === g ? xh(c, h) : "children" === g ? Wb(c, h) : xd(c, g, h, b)
                } switch (a) { case "input": Dd(c, d); break; case "textarea": Lf(c, d); break; case "select": b = c._wrapperState.wasMultiple, c._wrapperState.wasMultiple = !!d.multiple, a = d.value, null != a ? hb(c, !!d.multiple, a, !1) : b !== !!d.multiple && (null != d.defaultValue ? hb(c, !!d.multiple, d.defaultValue, !0) : hb(c, !!d.multiple, d.multiple ? [] : "", !1)) }
                }
            } return; case 6: if (null === b.stateNode) throw Error(k(162)); b.stateNode.nodeValue = b.memoizedProps;
                return; case 3: b = b.stateNode; b.hydrate && (b.hydrate = !1, bg(b.containerInfo)); return; case 12: return; case 13: c = b; null === b.memoizedState ? d = !1 : (d = !0, c = b.child, Re = Y()); if (null !== c) a: for (a = c; ;) {
                    if (5 === a.tag) f = a.stateNode, d ? (f = f.style, "function" === typeof f.setProperty ? f.setProperty("display", "none", "important") : f.display = "none") : (f = a.stateNode, e = a.memoizedProps.style, e = void 0 !== e && null !== e && e.hasOwnProperty("display") ? e.display : null, f.style.display = fg("display", e)); else if (6 === a.tag) a.stateNode.nodeValue = d ?
                        "" : a.memoizedProps; else if (13 === a.tag && null !== a.memoizedState && null === a.memoizedState.dehydrated) { f = a.child.sibling; f.return = a; a = f; continue } else if (null !== a.child) { a.child.return = a; a = a.child; continue } if (a === c) break; for (; null === a.sibling;) { if (null === a.return || a.return === c) break a; a = a.return } a.sibling.return = a.return; a = a.sibling
                } Hh(b); return; case 19: Hh(b); return; case 17: return
        }throw Error(k(163));
    } function Hh(a) {
        var b = a.updateQueue; if (null !== b) {
        a.updateQueue = null; var c = a.stateNode; null === c && (c = a.stateNode =
            new pj); b.forEach(function (b) { var d = qj.bind(null, a, b); c.has(b) || (c.add(b), b.then(d, d)) })
        }
    } function Ih(a, b, c) { c = Ea(c, null); c.tag = 3; c.payload = { element: null }; var d = b.value; c.callback = function () { cd || (cd = !0, Se = d); Me(a, b) }; return c } function Jh(a, b, c) {
        c = Ea(c, null); c.tag = 3; var d = a.type.getDerivedStateFromError; if ("function" === typeof d) { var e = b.value; c.payload = function () { Me(a, b); return d(e) } } var f = a.stateNode; null !== f && "function" === typeof f.componentDidCatch && (c.callback = function () {
        "function" !== typeof d &&
            (null === La ? La = new Set([this]) : La.add(this), Me(a, b)); var c = b.stack; this.componentDidCatch(b.value, { componentStack: null !== c ? c : "" })
        }); return c
    } function ka() { return (p & (ca | ma)) !== H ? 1073741821 - (Y() / 10 | 0) : 0 !== dd ? dd : dd = 1073741821 - (Y() / 10 | 0) } function Va(a, b, c) {
        b = b.mode; if (0 === (b & 2)) return 1073741823; var d = Cc(); if (0 === (b & 4)) return 99 === d ? 1073741823 : 1073741822; if ((p & ca) !== H) return P; if (null !== c) a = Fc(a, c.timeoutMs | 0 || 5E3, 250); else switch (d) {
            case 99: a = 1073741823; break; case 98: a = Fc(a, 150, 100); break; case 97: case 96: a =
                Fc(a, 5E3, 250); break; case 95: a = 2; break; default: throw Error(k(326));
        }null !== U && a === P && --a; return a
    } function ed(a, b) {
    a.expirationTime < b && (a.expirationTime = b); var c = a.alternate; null !== c && c.expirationTime < b && (c.expirationTime = b); var d = a.return, e = null; if (null === d && 3 === a.tag) e = a.stateNode; else for (; null !== d;) { c = d.alternate; d.childExpirationTime < b && (d.childExpirationTime = b); null !== c && c.childExpirationTime < b && (c.childExpirationTime = b); if (null === d.return && 3 === d.tag) { e = d.stateNode; break } d = d.return } null !== e &&
        (U === e && (Kc(b), F === bd && Ya(e, P)), yh(e, b)); return e
    } function fd(a) { var b = a.lastExpiredTime; if (0 !== b) return b; b = a.firstPendingTime; if (!Kh(a, b)) return b; var c = a.lastPingedTime; a = a.nextKnownPendingLevel; a = c > a ? c : a; return 2 >= a && b !== a ? 0 : a } function V(a) {
        if (0 !== a.lastExpiredTime) a.callbackExpirationTime = 1073741823, a.callbackPriority = 99, a.callbackNode = Og(Te.bind(null, a)); else {
            var b = fd(a), c = a.callbackNode; if (0 === b) null !== c && (a.callbackNode = null, a.callbackExpirationTime = 0, a.callbackPriority = 90); else {
                var d = ka();
                1073741823 === b ? d = 99 : 1 === b || 2 === b ? d = 95 : (d = 10 * (1073741821 - b) - 10 * (1073741821 - d), d = 0 >= d ? 99 : 250 >= d ? 98 : 5250 >= d ? 97 : 95); if (null !== c) { var e = a.callbackPriority; if (a.callbackExpirationTime === b && e >= d) return; c !== Qg && Rg(c) } a.callbackExpirationTime = b; a.callbackPriority = d; b = 1073741823 === b ? Og(Te.bind(null, a)) : Ng(d, Lh.bind(null, a), { timeout: 10 * (1073741821 - b) - Y() }); a.callbackNode = b
            }
        }
    } function Lh(a, b) {
        dd = 0; if (b) return b = ka(), Ue(a, b), V(a), null; var c = fd(a); if (0 !== c) {
            b = a.callbackNode; if ((p & (ca | ma)) !== H) throw Error(k(327));
            xb(); a === U && c === P || $a(a, c); if (null !== t) {
                var d = p; p |= ca; var e = Mh(); do try { rj(); break } catch (h) { Nh(a, h) } while (1); le(); p = d; gd.current = e; if (F === hd) throw b = id, $a(a, c), Ya(a, c), V(a), b; if (null === t) switch (e = a.finishedWork = a.current.alternate, a.finishedExpirationTime = c, d = F, U = null, d) {
                    case Xa: case hd: throw Error(k(345)); case Oh: Ue(a, 2 < c ? 2 : c); break; case ad: Ya(a, c); d = a.lastSuspendedTime; c === d && (a.nextKnownPendingLevel = Ve(e)); if (1073741823 === ta && (e = Re + Ph - Y(), 10 < e)) {
                        if (jd) {
                            var f = a.lastPingedTime; if (0 === f || f >= c) {
                            a.lastPingedTime =
                                c; $a(a, c); break
                            }
                        } f = fd(a); if (0 !== f && f !== c) break; if (0 !== d && d !== c) { a.lastPingedTime = d; break } a.timeoutHandle = We(ab.bind(null, a), e); break
                    } ab(a); break; case bd: Ya(a, c); d = a.lastSuspendedTime; c === d && (a.nextKnownPendingLevel = Ve(e)); if (jd && (e = a.lastPingedTime, 0 === e || e >= c)) { a.lastPingedTime = c; $a(a, c); break } e = fd(a); if (0 !== e && e !== c) break; if (0 !== d && d !== c) { a.lastPingedTime = d; break } 1073741823 !== Yb ? d = 10 * (1073741821 - Yb) - Y() : 1073741823 === ta ? d = 0 : (d = 10 * (1073741821 - ta) - 5E3, e = Y(), c = 10 * (1073741821 - c) - e, d = e - d, 0 > d && (d = 0), d =
                        (120 > d ? 120 : 480 > d ? 480 : 1080 > d ? 1080 : 1920 > d ? 1920 : 3E3 > d ? 3E3 : 4320 > d ? 4320 : 1960 * sj(d / 1960)) - d, c < d && (d = c)); if (10 < d) { a.timeoutHandle = We(ab.bind(null, a), d); break } ab(a); break; case Xe: if (1073741823 !== ta && null !== kd) { f = ta; var g = kd; d = g.busyMinDurationMs | 0; 0 >= d ? d = 0 : (e = g.busyDelayMs | 0, f = Y() - (10 * (1073741821 - f) - (g.timeoutMs | 0 || 5E3)), d = f <= e ? 0 : e + d - f); if (10 < d) { Ya(a, c); a.timeoutHandle = We(ab.bind(null, a), d); break } } ab(a); break; default: throw Error(k(329));
                }V(a); if (a.callbackNode === b) return Lh.bind(null, a)
            }
        } return null
    } function Te(a) {
        var b =
            a.lastExpiredTime; b = 0 !== b ? b : 1073741823; if ((p & (ca | ma)) !== H) throw Error(k(327)); xb(); a === U && b === P || $a(a, b); if (null !== t) { var c = p; p |= ca; var d = Mh(); do try { tj(); break } catch (e) { Nh(a, e) } while (1); le(); p = c; gd.current = d; if (F === hd) throw c = id, $a(a, b), Ya(a, b), V(a), c; if (null !== t) throw Error(k(261)); a.finishedWork = a.current.alternate; a.finishedExpirationTime = b; U = null; ab(a); V(a) } return null
    } function uj() { if (null !== bb) { var a = bb; bb = null; a.forEach(function (a, c) { Ue(c, a); V(c) }); ha() } } function Qh(a, b) {
        var c = p; p |= 1; try { return a(b) } finally {
        p =
            c, p === H && ha()
        }
    } function Rh(a, b) { var c = p; p &= -2; p |= Ye; try { return a(b) } finally { p = c, p === H && ha() } } function $a(a, b) {
    a.finishedWork = null; a.finishedExpirationTime = 0; var c = a.timeoutHandle; -1 !== c && (a.timeoutHandle = -1, vj(c)); if (null !== t) for (c = t.return; null !== c;) { var d = c; switch (d.tag) { case 1: d = d.type.childContextTypes; null !== d && void 0 !== d && (q(G), q(B)); break; case 3: tb(); q(G); q(B); break; case 5: te(d); break; case 4: tb(); break; case 13: q(D); break; case 19: q(D); break; case 10: me(d) }c = c.return } U = a; t = Sa(a.current, null);
        P = b; F = Xa; id = null; Yb = ta = 1073741823; kd = null; Xb = 0; jd = !1
    } function Nh(a, b) {
        do {
            try {
                le(); Sc.current = Tc; if (Uc) for (var c = z.memoizedState; null !== c;) { var d = c.queue; null !== d && (d.pending = null); c = c.next } Ia = 0; J = K = z = null; Uc = !1; if (null === t || null === t.return) return F = hd, id = b, t = null; a: {
                    var e = a, f = t.return, g = t, h = b; b = P; g.effectTag |= 2048; g.firstEffect = g.lastEffect = null; if (null !== h && "object" === typeof h && "function" === typeof h.then) {
                        var m = h; if (0 === (g.mode & 2)) {
                            var n = g.alternate; n ? (g.updateQueue = n.updateQueue, g.memoizedState =
                                n.memoizedState, g.expirationTime = n.expirationTime) : (g.updateQueue = null, g.memoizedState = null)
                        } var l = 0 !== (D.current & 1), k = f; do {
                            var p; if (p = 13 === k.tag) { var q = k.memoizedState; if (null !== q) p = null !== q.dehydrated ? !0 : !1; else { var w = k.memoizedProps; p = void 0 === w.fallback ? !1 : !0 !== w.unstable_avoidThisFallback ? !0 : l ? !1 : !0 } } if (p) {
                                var y = k.updateQueue; if (null === y) { var r = new Set; r.add(m); k.updateQueue = r } else y.add(m); if (0 === (k.mode & 2)) {
                                k.effectTag |= 64; g.effectTag &= -2981; if (1 === g.tag) if (null === g.alternate) g.tag = 17; else {
                                    var O =
                                        Ea(1073741823, null); O.tag = Jc; Fa(g, O)
                                } g.expirationTime = 1073741823; break a
                                } h = void 0; g = b; var v = e.pingCache; null === v ? (v = e.pingCache = new wj, h = new Set, v.set(m, h)) : (h = v.get(m), void 0 === h && (h = new Set, v.set(m, h))); if (!h.has(g)) { h.add(g); var x = xj.bind(null, e, m, g); m.then(x, x) } k.effectTag |= 4096; k.expirationTime = b; break a
                            } k = k.return
                        } while (null !== k); h = Error((na(g.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." +
                            Bd(g))
                    } F !== Xe && (F = Oh); h = Le(h, g); k = f; do { switch (k.tag) { case 3: m = h; k.effectTag |= 4096; k.expirationTime = b; var A = Ih(k, m, b); Ug(k, A); break a; case 1: m = h; var u = k.type, B = k.stateNode; if (0 === (k.effectTag & 64) && ("function" === typeof u.getDerivedStateFromError || null !== B && "function" === typeof B.componentDidCatch && (null === La || !La.has(B)))) { k.effectTag |= 4096; k.expirationTime = b; var H = Jh(k, m, b); Ug(k, H); break a } }k = k.return } while (null !== k)
                } t = Sh(t)
            } catch (cj) { b = cj; continue } break
        } while (1)
    } function Mh(a) {
        a = gd.current; gd.current =
            Tc; return null === a ? Tc : a
    } function Vg(a, b) { a < ta && 2 < a && (ta = a); null !== b && a < Yb && 2 < a && (Yb = a, kd = b) } function Kc(a) { a > Xb && (Xb = a) } function tj() { for (; null !== t;)t = Th(t) } function rj() { for (; null !== t && !yj();)t = Th(t) } function Th(a) { var b = zj(a.alternate, a, P); a.memoizedProps = a.pendingProps; null === b && (b = Sh(a)); Uh.current = null; return b } function Sh(a) {
        t = a; do {
            var b = t.alternate; a = t.return; if (0 === (t.effectTag & 2048)) {
                b = hj(b, t, P); if (1 === P || 1 !== t.childExpirationTime) {
                    for (var c = 0, d = t.child; null !== d;) {
                        var e = d.expirationTime,
                        f = d.childExpirationTime; e > c && (c = e); f > c && (c = f); d = d.sibling
                    } t.childExpirationTime = c
                } if (null !== b) return b; null !== a && 0 === (a.effectTag & 2048) && (null === a.firstEffect && (a.firstEffect = t.firstEffect), null !== t.lastEffect && (null !== a.lastEffect && (a.lastEffect.nextEffect = t.firstEffect), a.lastEffect = t.lastEffect), 1 < t.effectTag && (null !== a.lastEffect ? a.lastEffect.nextEffect = t : a.firstEffect = t, a.lastEffect = t))
            } else {
                b = lj(t); if (null !== b) return b.effectTag &= 2047, b; null !== a && (a.firstEffect = a.lastEffect = null, a.effectTag |=
                    2048)
            } b = t.sibling; if (null !== b) return b; t = a
        } while (null !== t); F === Xa && (F = Xe); return null
    } function Ve(a) { var b = a.expirationTime; a = a.childExpirationTime; return b > a ? b : a } function ab(a) { var b = Cc(); Da(99, Aj.bind(null, a, b)); return null } function Aj(a, b) {
        do xb(); while (null !== Zb); if ((p & (ca | ma)) !== H) throw Error(k(327)); var c = a.finishedWork, d = a.finishedExpirationTime; if (null === c) return null; a.finishedWork = null; a.finishedExpirationTime = 0; if (c === a.current) throw Error(k(177)); a.callbackNode = null; a.callbackExpirationTime =
            0; a.callbackPriority = 90; a.nextKnownPendingLevel = 0; var e = Ve(c); a.firstPendingTime = e; d <= a.lastSuspendedTime ? a.firstSuspendedTime = a.lastSuspendedTime = a.nextKnownPendingLevel = 0 : d <= a.firstSuspendedTime && (a.firstSuspendedTime = d - 1); d <= a.lastPingedTime && (a.lastPingedTime = 0); d <= a.lastExpiredTime && (a.lastExpiredTime = 0); a === U && (t = U = null, P = 0); 1 < c.effectTag ? null !== c.lastEffect ? (c.lastEffect.nextEffect = c, e = c.firstEffect) : e = c : e = c.firstEffect; if (null !== e) {
                var f = p; p |= ma; Uh.current = null; Ze = tc; var g = kg(); if (Xd(g)) {
                    if ("selectionStart" in
                        g) var h = { start: g.selectionStart, end: g.selectionEnd }; else a: {
                            h = (h = g.ownerDocument) && h.defaultView || window; var m = h.getSelection && h.getSelection(); if (m && 0 !== m.rangeCount) {
                                h = m.anchorNode; var n = m.anchorOffset, q = m.focusNode; m = m.focusOffset; try { h.nodeType, q.nodeType } catch (sb) { h = null; break a } var ba = 0, w = -1, y = -1, B = 0, D = 0, r = g, z = null; b: for (; ;) {
                                    for (var v; ;) {
                                    r !== h || 0 !== n && 3 !== r.nodeType || (w = ba + n); r !== q || 0 !== m && 3 !== r.nodeType || (y = ba + m); 3 === r.nodeType && (ba += r.nodeValue.length); if (null === (v = r.firstChild)) break; z = r;
                                        r = v
                                    } for (; ;) { if (r === g) break b; z === h && ++B === n && (w = ba); z === q && ++D === m && (y = ba); if (null !== (v = r.nextSibling)) break; r = z; z = r.parentNode } r = v
                                } h = -1 === w || -1 === y ? null : { start: w, end: y }
                            } else h = null
                        } h = h || { start: 0, end: 0 }
                } else h = null; $e = { activeElementDetached: null, focusedElem: g, selectionRange: h }; tc = !1; l = e; do try { Bj() } catch (sb) { if (null === l) throw Error(k(330)); Za(l, sb); l = l.nextEffect } while (null !== l); l = e; do try {
                    for (g = a, h = b; null !== l;) {
                        var x = l.effectTag; x & 16 && Wb(l.stateNode, ""); if (x & 128) {
                            var A = l.alternate; if (null !== A) {
                                var u =
                                    A.ref; null !== u && ("function" === typeof u ? u(null) : u.current = null)
                            }
                        } switch (x & 1038) { case 2: Gh(l); l.effectTag &= -3; break; case 6: Gh(l); l.effectTag &= -3; Qe(l.alternate, l); break; case 1024: l.effectTag &= -1025; break; case 1028: l.effectTag &= -1025; Qe(l.alternate, l); break; case 4: Qe(l.alternate, l); break; case 8: n = l, Dh(g, n, h), Eh(n) }l = l.nextEffect
                    }
                } catch (sb) { if (null === l) throw Error(k(330)); Za(l, sb); l = l.nextEffect } while (null !== l); u = $e; A = kg(); x = u.focusedElem; h = u.selectionRange; if (A !== x && x && x.ownerDocument && jg(x.ownerDocument.documentElement,
                    x)) {
                    null !== h && Xd(x) && (A = h.start, u = h.end, void 0 === u && (u = A), "selectionStart" in x ? (x.selectionStart = A, x.selectionEnd = Math.min(u, x.value.length)) : (u = (A = x.ownerDocument || document) && A.defaultView || window, u.getSelection && (u = u.getSelection(), n = x.textContent.length, g = Math.min(h.start, n), h = void 0 === h.end ? g : Math.min(h.end, n), !u.extend && g > h && (n = h, h = g, g = n), n = ig(x, g), q = ig(x, h), n && q && (1 !== u.rangeCount || u.anchorNode !== n.node || u.anchorOffset !== n.offset || u.focusNode !== q.node || u.focusOffset !== q.offset) && (A = A.createRange(),
                        A.setStart(n.node, n.offset), u.removeAllRanges(), g > h ? (u.addRange(A), u.extend(q.node, q.offset)) : (A.setEnd(q.node, q.offset), u.addRange(A)))))); A = []; for (u = x; u = u.parentNode;)1 === u.nodeType && A.push({ element: u, left: u.scrollLeft, top: u.scrollTop }); "function" === typeof x.focus && x.focus(); for (x = 0; x < A.length; x++)u = A[x], u.element.scrollLeft = u.left, u.element.scrollTop = u.top
                } tc = !!Ze; $e = Ze = null; a.current = c; l = e; do try {
                    for (x = a; null !== l;) {
                        var F = l.effectTag; F & 36 && oj(x, l.alternate, l); if (F & 128) {
                            A = void 0; var E = l.ref; if (null !==
                                E) { var G = l.stateNode; switch (l.tag) { case 5: A = G; break; default: A = G }"function" === typeof E ? E(A) : E.current = A }
                        } l = l.nextEffect
                    }
                } catch (sb) { if (null === l) throw Error(k(330)); Za(l, sb); l = l.nextEffect } while (null !== l); l = null; Cj(); p = f
            } else a.current = c; if (ld) ld = !1, Zb = a, $b = b; else for (l = e; null !== l;)b = l.nextEffect, l.nextEffect = null, l = b; b = a.firstPendingTime; 0 === b && (La = null); 1073741823 === b ? a === af ? ac++ : (ac = 0, af = a) : ac = 0; "function" === typeof bf && bf(c.stateNode, d); V(a); if (cd) throw cd = !1, a = Se, Se = null, a; if ((p & Ye) !== H) return null;
        ha(); return null
    } function Bj() { for (; null !== l;) { var a = l.effectTag; 0 !== (a & 256) && nj(l.alternate, l); 0 === (a & 512) || ld || (ld = !0, Ng(97, function () { xb(); return null })); l = l.nextEffect } } function xb() { if (90 !== $b) { var a = 97 < $b ? 97 : $b; $b = 90; return Da(a, Dj) } } function Dj() {
        if (null === Zb) return !1; var a = Zb; Zb = null; if ((p & (ca | ma)) !== H) throw Error(k(331)); var b = p; p |= ma; for (a = a.current.firstEffect; null !== a;) {
            try { var c = a; if (0 !== (c.effectTag & 512)) switch (c.tag) { case 0: case 11: case 15: case 22: Ah(5, c), Bh(5, c) } } catch (d) {
                if (null ===
                    a) throw Error(k(330)); Za(a, d)
            } c = a.nextEffect; a.nextEffect = null; a = c
        } p = b; ha(); return !0
    } function Vh(a, b, c) { b = Le(c, b); b = Ih(a, b, 1073741823); Fa(a, b); a = ed(a, 1073741823); null !== a && V(a) } function Za(a, b) {
        if (3 === a.tag) Vh(a, a, b); else for (var c = a.return; null !== c;) {
            if (3 === c.tag) { Vh(c, a, b); break } else if (1 === c.tag) {
                var d = c.stateNode; if ("function" === typeof c.type.getDerivedStateFromError || "function" === typeof d.componentDidCatch && (null === La || !La.has(d))) {
                    a = Le(b, a); a = Jh(c, a, 1073741823); Fa(c, a); c = ed(c, 1073741823); null !==
                        c && V(c); break
                }
            } c = c.return
        }
    } function xj(a, b, c) { var d = a.pingCache; null !== d && d.delete(b); U === a && P === c ? F === bd || F === ad && 1073741823 === ta && Y() - Re < Ph ? $a(a, P) : jd = !0 : Kh(a, c) && (b = a.lastPingedTime, 0 !== b && b < c || (a.lastPingedTime = c, V(a))) } function qj(a, b) { var c = a.stateNode; null !== c && c.delete(b); b = 0; 0 === b && (b = ka(), b = Va(b, a, null)); a = ed(a, b); null !== a && V(a) } function Ej(a) {
        if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; var b = __REACT_DEVTOOLS_GLOBAL_HOOK__; if (b.isDisabled || !b.supportsFiber) return !0; try {
            var c =
                b.inject(a); bf = function (a, e) { try { b.onCommitFiberRoot(c, a, void 0, 64 === (a.current.effectTag & 64)) } catch (f) { } }; Ne = function (a) { try { b.onCommitFiberUnmount(c, a) } catch (e) { } }
        } catch (d) { } return !0
    } function Fj(a, b, c, d) {
    this.tag = a; this.key = c; this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null; this.index = 0; this.ref = null; this.pendingProps = b; this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null; this.mode = d; this.effectTag = 0; this.lastEffect = this.firstEffect = this.nextEffect =
        null; this.childExpirationTime = this.expirationTime = 0; this.alternate = null
    } function Ge(a) { a = a.prototype; return !(!a || !a.isReactComponent) } function Gj(a) { if ("function" === typeof a) return Ge(a) ? 1 : 0; if (void 0 !== a && null !== a) { a = a.$$typeof; if (a === zd) return 11; if (a === Ad) return 14 } return 2 } function Sa(a, b) {
        var c = a.alternate; null === c ? (c = la(a.tag, b, a.key, a.mode), c.elementType = a.elementType, c.type = a.type, c.stateNode = a.stateNode, c.alternate = a, a.alternate = c) : (c.pendingProps = b, c.effectTag = 0, c.nextEffect = null, c.firstEffect =
            null, c.lastEffect = null); c.childExpirationTime = a.childExpirationTime; c.expirationTime = a.expirationTime; c.child = a.child; c.memoizedProps = a.memoizedProps; c.memoizedState = a.memoizedState; c.updateQueue = a.updateQueue; b = a.dependencies; c.dependencies = null === b ? null : { expirationTime: b.expirationTime, firstContext: b.firstContext, responders: b.responders }; c.sibling = a.sibling; c.index = a.index; c.ref = a.ref; return c
    } function Oc(a, b, c, d, e, f) {
        var g = 2; d = a; if ("function" === typeof a) Ge(a) && (g = 1); else if ("string" === typeof a) g =
            5; else a: switch (a) {
                case Ma: return Ha(c.children, e, f, b); case Hj: g = 8; e |= 7; break; case Af: g = 8; e |= 1; break; case kc: return a = la(12, c, b, e | 8), a.elementType = kc, a.type = kc, a.expirationTime = f, a; case lc: return a = la(13, c, b, e), a.type = lc, a.elementType = lc, a.expirationTime = f, a; case yd: return a = la(19, c, b, e), a.elementType = yd, a.expirationTime = f, a; default: if ("object" === typeof a && null !== a) switch (a.$$typeof) {
                    case Cf: g = 10; break a; case Bf: g = 9; break a; case zd: g = 11; break a; case Ad: g = 14; break a; case Ef: g = 16; d = null; break a; case Df: g =
                        22; break a
                }throw Error(k(130, null == a ? a : typeof a, ""));
            }b = la(g, c, b, e); b.elementType = a; b.type = d; b.expirationTime = f; return b
    } function Ha(a, b, c, d) { a = la(7, a, d, b); a.expirationTime = c; return a } function qe(a, b, c) { a = la(6, a, null, b); a.expirationTime = c; return a } function re(a, b, c) { b = la(4, null !== a.children ? a.children : [], a.key, b); b.expirationTime = c; b.stateNode = { containerInfo: a.containerInfo, pendingChildren: null, implementation: a.implementation }; return b } function Ij(a, b, c) {
    this.tag = b; this.current = null; this.containerInfo =
        a; this.pingCache = this.pendingChildren = null; this.finishedExpirationTime = 0; this.finishedWork = null; this.timeoutHandle = -1; this.pendingContext = this.context = null; this.hydrate = c; this.callbackNode = null; this.callbackPriority = 90; this.lastExpiredTime = this.lastPingedTime = this.nextKnownPendingLevel = this.lastSuspendedTime = this.firstSuspendedTime = this.firstPendingTime = 0
    } function Kh(a, b) { var c = a.firstSuspendedTime; a = a.lastSuspendedTime; return 0 !== c && c >= b && a <= b } function Ya(a, b) {
        var c = a.firstSuspendedTime, d = a.lastSuspendedTime;
        c < b && (a.firstSuspendedTime = b); if (d > b || 0 === c) a.lastSuspendedTime = b; b <= a.lastPingedTime && (a.lastPingedTime = 0); b <= a.lastExpiredTime && (a.lastExpiredTime = 0)
    } function yh(a, b) { b > a.firstPendingTime && (a.firstPendingTime = b); var c = a.firstSuspendedTime; 0 !== c && (b >= c ? a.firstSuspendedTime = a.lastSuspendedTime = a.nextKnownPendingLevel = 0 : b >= a.lastSuspendedTime && (a.lastSuspendedTime = b + 1), b > a.nextKnownPendingLevel && (a.nextKnownPendingLevel = b)) } function Ue(a, b) { var c = a.lastExpiredTime; if (0 === c || c > b) a.lastExpiredTime = b }
    function md(a, b, c, d) {
        var e = b.current, f = ka(), g = Vb.suspense; f = Va(f, e, g); a: if (c) { c = c._reactInternalFiber; b: { if (Na(c) !== c || 1 !== c.tag) throw Error(k(170)); var h = c; do { switch (h.tag) { case 3: h = h.stateNode.context; break b; case 1: if (N(h.type)) { h = h.stateNode.__reactInternalMemoizedMergedChildContext; break b } }h = h.return } while (null !== h); throw Error(k(171)); } if (1 === c.tag) { var m = c.type; if (N(m)) { c = Gg(c, m, h); break a } } c = h } else c = Ca; null === b.context ? b.context = c : b.pendingContext = c; b = Ea(f, g); b.payload = { element: a }; d = void 0 ===
            d ? null : d; null !== d && (b.callback = d); Fa(e, b); Ja(e, f); return f
    } function cf(a) { a = a.current; if (!a.child) return null; switch (a.child.tag) { case 5: return a.child.stateNode; default: return a.child.stateNode } } function Wh(a, b) { a = a.memoizedState; null !== a && null !== a.dehydrated && a.retryTime < b && (a.retryTime = b) } function df(a, b) { Wh(a, b); (a = a.alternate) && Wh(a, b) } function ef(a, b, c) {
        c = null != c && !0 === c.hydrate; var d = new Ij(a, b, c), e = la(3, null, null, 2 === b ? 7 : 1 === b ? 3 : 0); d.current = e; e.stateNode = d; ne(e); a[Lb] = d.current; c && 0 !== b &&
            xi(a, 9 === a.nodeType ? a : a.ownerDocument); this._internalRoot = d
    } function bc(a) { return !(!a || 1 !== a.nodeType && 9 !== a.nodeType && 11 !== a.nodeType && (8 !== a.nodeType || " react-mount-point-unstable " !== a.nodeValue)) } function Jj(a, b) { b || (b = a ? 9 === a.nodeType ? a.documentElement : a.firstChild : null, b = !(!b || 1 !== b.nodeType || !b.hasAttribute("data-reactroot"))); if (!b) for (var c; c = a.lastChild;)a.removeChild(c); return new ef(a, 0, b ? { hydrate: !0 } : void 0) } function nd(a, b, c, d, e) {
        var f = c._reactRootContainer; if (f) {
            var g = f._internalRoot;
            if ("function" === typeof e) { var h = e; e = function () { var a = cf(g); h.call(a) } } md(b, g, a, e)
        } else { f = c._reactRootContainer = Jj(c, d); g = f._internalRoot; if ("function" === typeof e) { var m = e; e = function () { var a = cf(g); m.call(a) } } Rh(function () { md(b, g, a, e) }) } return cf(g)
    } function Kj(a, b, c) { var d = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null; return { $$typeof: gb, key: null == d ? null : "" + d, children: a, containerInfo: b, implementation: c } } function Xh(a, b) {
        var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
        if (!bc(b)) throw Error(k(200)); return Kj(a, b, null, c)
    } if (!ea) throw Error(k(227)); var ki = function (a, b, c, d, e, f, g, h, m) { var n = Array.prototype.slice.call(arguments, 3); try { b.apply(c, n) } catch (C) { this.onError(C) } }, yb = !1, gc = null, hc = !1, pd = null, li = { onError: function (a) { yb = !0; gc = a } }, td = null, rf = null, mf = null, ic = null, cb = {}, jc = [], qd = {}, db = {}, rd = {}, wa = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), M = ea.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,
        sd = null, eb = null, fb = null, ee = function (a, b) { return a(b) }, eg = function (a, b, c, d, e) { return a(b, c, d, e) }, vd = function () { }, vf = ee, Oa = !1, wd = !1, Z = ea.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler, Lj = Z.unstable_cancelCallback, ff = Z.unstable_now, $f = Z.unstable_scheduleCallback, Mj = Z.unstable_shouldYield, Yh = Z.unstable_requestPaint, Pd = Z.unstable_runWithPriority, Nj = Z.unstable_getCurrentPriorityLevel, Oj = Z.unstable_ImmediatePriority, Zh = Z.unstable_UserBlockingPriority, ag = Z.unstable_NormalPriority, Pj = Z.unstable_LowPriority,
        Qj = Z.unstable_IdlePriority, oi = /^[: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]*$/, wf = Object.prototype.hasOwnProperty, yf = {}, xf = {}, E = {}; "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function (a) {
        E[a] =
            new L(a, 0, !1, a, null, !1)
        });[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function (a) { var b = a[0]; E[b] = new L(b, 1, !1, a[1], null, !1) });["contentEditable", "draggable", "spellCheck", "value"].forEach(function (a) { E[a] = new L(a, 2, !1, a.toLowerCase(), null, !1) });["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function (a) { E[a] = new L(a, 2, !1, a, null, !1) }); "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function (a) {
        E[a] =
            new L(a, 3, !1, a.toLowerCase(), null, !1)
        });["checked", "multiple", "muted", "selected"].forEach(function (a) { E[a] = new L(a, 3, !0, a, null, !1) });["capture", "download"].forEach(function (a) { E[a] = new L(a, 4, !1, a, null, !1) });["cols", "rows", "size", "span"].forEach(function (a) { E[a] = new L(a, 6, !1, a, null, !1) });["rowSpan", "start"].forEach(function (a) { E[a] = new L(a, 5, !1, a.toLowerCase(), null, !1) }); var gf = /[\-:]([a-z])/g, hf = function (a) { return a[1].toUpperCase() }; "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 (a) {
            var b =
                a.replace(gf, hf); E[b] = new L(b, 1, !1, a, null, !1)
        }); "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function (a) { var b = a.replace(gf, hf); E[b] = new L(b, 1, !1, a, "http://www.w3.org/1999/xlink", !1) });["xml:base", "xml:lang", "xml:space"].forEach(function (a) { var b = a.replace(gf, hf); E[b] = new L(b, 1, !1, a, "http://www.w3.org/XML/1998/namespace", !1) });["tabIndex", "crossOrigin"].forEach(function (a) { E[a] = new L(a, 1, !1, a.toLowerCase(), null, !1) }); E.xlinkHref = new L("xlinkHref", 1,
            !1, "xlink:href", "http://www.w3.org/1999/xlink", !0);["src", "href", "action", "formAction"].forEach(function (a) { E[a] = new L(a, 1, !1, a.toLowerCase(), null, !0) }); var da = ea.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; da.hasOwnProperty("ReactCurrentDispatcher") || (da.ReactCurrentDispatcher = { current: null }); da.hasOwnProperty("ReactCurrentBatchConfig") || (da.ReactCurrentBatchConfig = { suspense: null }); var si = /^(.*)[\\\/]/, Q = "function" === typeof Symbol && Symbol.for, Pc = Q ? Symbol.for("react.element") : 60103, gb = Q ? Symbol.for("react.portal") :
                60106, Ma = Q ? Symbol.for("react.fragment") : 60107, Af = Q ? Symbol.for("react.strict_mode") : 60108, kc = Q ? Symbol.for("react.profiler") : 60114, Cf = Q ? Symbol.for("react.provider") : 60109, Bf = Q ? Symbol.for("react.context") : 60110, Hj = Q ? Symbol.for("react.concurrent_mode") : 60111, zd = Q ? Symbol.for("react.forward_ref") : 60112, lc = Q ? Symbol.for("react.suspense") : 60113, yd = Q ? Symbol.for("react.suspense_list") : 60120, Ad = Q ? Symbol.for("react.memo") : 60115, Ef = Q ? Symbol.for("react.lazy") : 60116, Df = Q ? Symbol.for("react.block") : 60121, zf = "function" ===
                    typeof Symbol && Symbol.iterator, od, xh = function (a) { return "undefined" !== typeof MSApp && MSApp.execUnsafeLocalFunction ? function (b, c, d, e) { MSApp.execUnsafeLocalFunction(function () { return a(b, c, d, e) }) } : a }(function (a, b) { if ("http://www.w3.org/2000/svg" !== a.namespaceURI || "innerHTML" in a) a.innerHTML = b; else { od = od || document.createElement("div"); od.innerHTML = "<svg>" + b.valueOf().toString() + "</svg>"; for (b = od.firstChild; a.firstChild;)a.removeChild(a.firstChild); for (; b.firstChild;)a.appendChild(b.firstChild) } }), Wb = function (a,
                        b) { if (b) { var c = a.firstChild; if (c && c === a.lastChild && 3 === c.nodeType) { c.nodeValue = b; return } } a.textContent = b }, ib = { animationend: nc("Animation", "AnimationEnd"), animationiteration: nc("Animation", "AnimationIteration"), animationstart: nc("Animation", "AnimationStart"), transitionend: nc("Transition", "TransitionEnd") }, Id = {}, Of = {}; wa && (Of = document.createElement("div").style, "AnimationEvent" in window || (delete ib.animationend.animation, delete ib.animationiteration.animation, delete ib.animationstart.animation), "TransitionEvent" in
                            window || delete ib.transitionend.transition); var $h = oc("animationend"), ai = oc("animationiteration"), bi = oc("animationstart"), ci = oc("transitionend"), Db = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), Pf = new ("function" === typeof WeakMap ? WeakMap : Map), Ab = null, wi = function (a) {
                                if (a) {
                                    var b = a._dispatchListeners, c = a._dispatchInstances;
                                    if (Array.isArray(b)) for (var d = 0; d < b.length && !a.isPropagationStopped(); d++)lf(a, b[d], c[d]); else b && lf(a, b, c); a._dispatchListeners = null; a._dispatchInstances = null; a.isPersistent() || a.constructor.release(a)
                                }
                            }, qc = [], Rd = !1, fa = [], xa = null, ya = null, za = null, Eb = new Map, Fb = new Map, Jb = [], Nd = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),
                                yi = "focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" "), dg = {}, cg = new Map, Td = new Map, Rj = ["abort", "abort", $h, "animationEnd", ai, "animationIteration", bi, "animationStart", "canplay", "canPlay", "canplaythrough", "canPlayThrough", "durationchange", "durationChange", "emptied", "emptied", "encrypted", "encrypted", "ended", "ended", "error", "error", "gotpointercapture", "gotPointerCapture", "load", "load", "loadeddata", "loadedData", "loadedmetadata", "loadedMetadata",
                                    "loadstart", "loadStart", "lostpointercapture", "lostPointerCapture", "playing", "playing", "progress", "progress", "seeking", "seeking", "stalled", "stalled", "suspend", "suspend", "timeupdate", "timeUpdate", ci, "transitionEnd", "waiting", "waiting"]; Sd("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".split(" "),
                                        0); Sd("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "), 1); Sd(Rj, 2); (function (a, b) { for (var c = 0; c < a.length; c++)Td.set(a[c], b) })("change selectionchange textInput compositionstart compositionend compositionupdate".split(" "), 0); var Hi = Zh, Gi = Pd, tc = !0, Kb = {
                                            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
                                        }, Sj = ["Webkit", "ms", "Moz", "O"]; Object.keys(Kb).forEach(function (a) { Sj.forEach(function (b) { b = b + a.charAt(0).toUpperCase() + a.substring(1); Kb[b] = Kb[a] }) }); var Ii = M({ 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 }), ng = "$", og = "/$", $d = "$?", Zd = "$!", Ze = null, $e = null, We = "function" === typeof setTimeout ? setTimeout : void 0, vj = "function" ===
                                            typeof clearTimeout ? clearTimeout : void 0, jf = Math.random().toString(36).slice(2), Aa = "__reactInternalInstance$" + jf, vc = "__reactEventHandlers$" + jf, Lb = "__reactContainere$" + jf, Ba = null, ce = null, wc = null; M(R.prototype, {
                                                preventDefault: function () { this.defaultPrevented = !0; var a = this.nativeEvent; a && (a.preventDefault ? a.preventDefault() : "unknown" !== typeof a.returnValue && (a.returnValue = !1), this.isDefaultPrevented = xc) }, stopPropagation: function () {
                                                    var a = this.nativeEvent; a && (a.stopPropagation ? a.stopPropagation() : "unknown" !==
                                                        typeof a.cancelBubble && (a.cancelBubble = !0), this.isPropagationStopped = xc)
                                                }, persist: function () { this.isPersistent = xc }, isPersistent: yc, destructor: function () { var a = this.constructor.Interface, b; for (b in a) this[b] = null; this.nativeEvent = this._targetInst = this.dispatchConfig = null; this.isPropagationStopped = this.isDefaultPrevented = yc; this._dispatchInstances = this._dispatchListeners = null }
                                            }); R.Interface = {
                                                type: null, target: null, currentTarget: function () { return null }, eventPhase: null, bubbles: null, cancelable: null, timeStamp: function (a) {
                                                    return a.timeStamp ||
                                                        Date.now()
                                                }, defaultPrevented: null, isTrusted: null
                                            }; R.extend = function (a) { function b() { return c.apply(this, arguments) } var c = this, d = function () { }; d.prototype = c.prototype; d = new d; M(d, b.prototype); b.prototype = d; b.prototype.constructor = b; b.Interface = M({}, c.Interface, a); b.extend = c.extend; sg(b); return b }; sg(R); var Tj = R.extend({ data: null }), Uj = R.extend({ data: null }), Ni = [9, 13, 27, 32], de = wa && "CompositionEvent" in window, cc = null; wa && "documentMode" in document && (cc = document.documentMode); var Vj = wa && "TextEvent" in window &&
                                                !cc, xg = wa && (!de || cc && 8 < cc && 11 >= cc), wg = String.fromCharCode(32), ua = {
                                                    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(" ") }
                                                }, vg = !1, mb = !1, Wj = {
                                                    eventTypes: ua, extractEvents: function (a, b, c, d, e) {
                                                        var f; if (de) b: {
                                                            switch (a) {
                                                                case "compositionstart": var g = ua.compositionStart; break b; case "compositionend": g = ua.compositionEnd; break b; case "compositionupdate": g =
                                                                    ua.compositionUpdate; break b
                                                            }g = void 0
                                                        } else mb ? tg(a, c) && (g = ua.compositionEnd) : "keydown" === a && 229 === c.keyCode && (g = ua.compositionStart); g ? (xg && "ko" !== c.locale && (mb || g !== ua.compositionStart ? g === ua.compositionEnd && mb && (f = rg()) : (Ba = d, ce = "value" in Ba ? Ba.value : Ba.textContent, mb = !0)), e = Tj.getPooled(g, b, c, d), f ? e.data = f : (f = ug(c), null !== f && (e.data = f)), lb(e), f = e) : f = null; (a = Vj ? Oi(a, c) : Pi(a, c)) ? (b = Uj.getPooled(ua.beforeInput, b, c, d), b.data = a, lb(b)) : b = null; return null === f ? b : null === b ? f : [f, b]
                                                    }
                                                }, Qi = {
                                                    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
                                                }, Ag = { change: { phasedRegistrationNames: { bubbled: "onChange", captured: "onChangeCapture" }, dependencies: "blur change click focus input keydown keyup selectionchange".split(" ") } }, Mb = null, Nb = null, kf = !1; wa && (kf = Tf("input") && (!document.documentMode || 9 < document.documentMode)); var Xj = {
                                                    eventTypes: Ag, _isInputEventSupported: kf, extractEvents: function (a, b, c, d, e) {
                                                        e = b ? Pa(b) : window; var f =
                                                            e.nodeName && e.nodeName.toLowerCase(); if ("select" === f || "input" === f && "file" === e.type) var g = Si; else if (yg(e)) if (kf) g = Wi; else { g = Ui; var h = Ti } else (f = e.nodeName) && "input" === f.toLowerCase() && ("checkbox" === e.type || "radio" === e.type) && (g = Vi); if (g && (g = g(a, b))) return zg(g, c, d); h && h(a, e, b); "blur" === a && (a = e._wrapperState) && a.controlled && "number" === e.type && Ed(e, "number", e.value)
                                                    }
                                                }, dc = R.extend({ view: null, detail: null }), Yi = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" }, di = 0, ei = 0, fi = !1, gi = !1, ec = dc.extend({
                                                    screenX: null,
                                                    screenY: null, clientX: null, clientY: null, pageX: null, pageY: null, ctrlKey: null, shiftKey: null, altKey: null, metaKey: null, getModifierState: fe, button: null, buttons: null, relatedTarget: function (a) { return a.relatedTarget || (a.fromElement === a.srcElement ? a.toElement : a.fromElement) }, movementX: function (a) { if ("movementX" in a) return a.movementX; var b = di; di = a.screenX; return fi ? "mousemove" === a.type ? a.screenX - b : 0 : (fi = !0, 0) }, movementY: function (a) {
                                                        if ("movementY" in a) return a.movementY; var b = ei; ei = a.screenY; return gi ? "mousemove" ===
                                                            a.type ? a.screenY - b : 0 : (gi = !0, 0)
                                                    }
                                                }), hi = ec.extend({ pointerId: null, width: null, height: null, pressure: null, tangentialPressure: null, tiltX: null, tiltY: null, twist: null, pointerType: null, isPrimary: null }), fc = {
                                                    mouseEnter: { registrationName: "onMouseEnter", dependencies: ["mouseout", "mouseover"] }, mouseLeave: { registrationName: "onMouseLeave", dependencies: ["mouseout", "mouseover"] }, pointerEnter: { registrationName: "onPointerEnter", dependencies: ["pointerout", "pointerover"] }, pointerLeave: {
                                                        registrationName: "onPointerLeave", dependencies: ["pointerout",
                                                            "pointerover"]
                                                    }
                                                }, Yj = {
                                                    eventTypes: fc, extractEvents: function (a, b, c, d, e) {
                                                        var f = "mouseover" === a || "pointerover" === a, g = "mouseout" === a || "pointerout" === a; if (f && 0 === (e & 32) && (c.relatedTarget || c.fromElement) || !g && !f) return null; f = d.window === d ? d : (f = d.ownerDocument) ? f.defaultView || f.parentWindow : window; if (g) { if (g = b, b = (b = c.relatedTarget || c.toElement) ? Bb(b) : null, null !== b) { var h = Na(b); if (b !== h || 5 !== b.tag && 6 !== b.tag) b = null } } else g = null; if (g === b) return null; if ("mouseout" === a || "mouseover" === a) {
                                                            var m = ec; var n = fc.mouseLeave;
                                                            var l = fc.mouseEnter; var k = "mouse"
                                                        } else if ("pointerout" === a || "pointerover" === a) m = hi, n = fc.pointerLeave, l = fc.pointerEnter, k = "pointer"; a = null == g ? f : Pa(g); f = null == b ? f : Pa(b); n = m.getPooled(n, g, c, d); n.type = k + "leave"; n.target = a; n.relatedTarget = f; c = m.getPooled(l, b, c, d); c.type = k + "enter"; c.target = f; c.relatedTarget = a; d = g; k = b; if (d && k) a: { m = d; l = k; g = 0; for (a = m; a; a = pa(a))g++; a = 0; for (b = l; b; b = pa(b))a++; for (; 0 < g - a;)m = pa(m), g--; for (; 0 < a - g;)l = pa(l), a--; for (; g--;) { if (m === l || m === l.alternate) break a; m = pa(m); l = pa(l) } m = null } else m =
                                                            null; l = m; for (m = []; d && d !== l;) { g = d.alternate; if (null !== g && g === l) break; m.push(d); d = pa(d) } for (d = []; k && k !== l;) { g = k.alternate; if (null !== g && g === l) break; d.push(k); k = pa(k) } for (k = 0; k < m.length; k++)be(m[k], "bubbled", n); for (k = d.length; 0 < k--;)be(d[k], "captured", c); return 0 === (e & 64) ? [n] : [n, c]
                                                    }
                                                }, Qa = "function" === typeof Object.is ? Object.is : Zi, $i = Object.prototype.hasOwnProperty, Zj = wa && "documentMode" in document && 11 >= document.documentMode, Eg = {
                                                    select: {
                                                        phasedRegistrationNames: { bubbled: "onSelect", captured: "onSelectCapture" },
                                                        dependencies: "blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")
                                                    }
                                                }, nb = null, he = null, Pb = null, ge = !1, ak = {
                                                    eventTypes: Eg, extractEvents: function (a, b, c, d, e, f) {
                                                        e = f || (d.window === d ? d.document : 9 === d.nodeType ? d : d.ownerDocument); if (!(f = !e)) { a: { e = Jd(e); f = rd.onSelect; for (var g = 0; g < f.length; g++)if (!e.has(f[g])) { e = !1; break a } e = !0 } f = !e } if (f) return null; e = b ? Pa(b) : window; switch (a) {
                                                            case "focus": if (yg(e) || "true" === e.contentEditable) nb = e, he = b, Pb = null; break; case "blur": Pb = he = nb = null;
                                                                break; case "mousedown": ge = !0; break; case "contextmenu": case "mouseup": case "dragend": return ge = !1, Dg(c, d); case "selectionchange": if (Zj) break; case "keydown": case "keyup": return Dg(c, d)
                                                        }return null
                                                    }
                                                }, bk = R.extend({ animationName: null, elapsedTime: null, pseudoElement: null }), ck = R.extend({ clipboardData: function (a) { return "clipboardData" in a ? a.clipboardData : window.clipboardData } }), dk = dc.extend({ relatedTarget: null }), ek = {
                                                    Esc: "Escape", Spacebar: " ", Left: "ArrowLeft", Up: "ArrowUp", Right: "ArrowRight", Down: "ArrowDown",
                                                    Del: "Delete", Win: "OS", Menu: "ContextMenu", Apps: "ContextMenu", Scroll: "ScrollLock", MozPrintableKey: "Unidentified"
                                                }, fk = {
                                                    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"
                                                }, gk = dc.extend({
                                                    key: function (a) { if (a.key) { var b = ek[a.key] || a.key; if ("Unidentified" !== b) return b } return "keypress" === a.type ? (a = Ac(a), 13 === a ? "Enter" : String.fromCharCode(a)) : "keydown" === a.type || "keyup" === a.type ? fk[a.keyCode] || "Unidentified" : "" }, location: null, ctrlKey: null, shiftKey: null, altKey: null, metaKey: null, repeat: null, locale: null, getModifierState: fe, charCode: function (a) { return "keypress" === a.type ? Ac(a) : 0 }, keyCode: function (a) { return "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0 }, which: function (a) {
                                                        return "keypress" ===
                                                            a.type ? Ac(a) : "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0
                                                    }
                                                }), hk = ec.extend({ dataTransfer: null }), ik = dc.extend({ touches: null, targetTouches: null, changedTouches: null, altKey: null, metaKey: null, ctrlKey: null, shiftKey: null, getModifierState: fe }), jk = R.extend({ propertyName: null, elapsedTime: null, pseudoElement: null }), kk = ec.extend({
                                                    deltaX: function (a) { return "deltaX" in a ? a.deltaX : "wheelDeltaX" in a ? -a.wheelDeltaX : 0 }, deltaY: function (a) {
                                                        return "deltaY" in a ? a.deltaY : "wheelDeltaY" in a ? -a.wheelDeltaY : "wheelDelta" in a ?
                                                            -a.wheelDelta : 0
                                                    }, deltaZ: null, deltaMode: null
                                                }), lk = {
                                                    eventTypes: dg, extractEvents: function (a, b, c, d, e) {
                                                        e = cg.get(a); if (!e) return null; switch (a) {
                                                            case "keypress": if (0 === Ac(c)) return null; case "keydown": case "keyup": a = gk; break; case "blur": case "focus": a = dk; break; case "click": if (2 === c.button) return null; case "auxclick": case "dblclick": case "mousedown": case "mousemove": case "mouseup": case "mouseout": case "mouseover": case "contextmenu": a = ec; break; case "drag": case "dragend": case "dragenter": case "dragexit": case "dragleave": case "dragover": case "dragstart": case "drop": a =
                                                                hk; break; case "touchcancel": case "touchend": case "touchmove": case "touchstart": a = ik; break; case $h: case ai: case bi: a = bk; break; case ci: a = jk; break; case "scroll": a = dc; break; case "wheel": a = kk; break; case "copy": case "cut": case "paste": a = ck; break; case "gotpointercapture": case "lostpointercapture": case "pointercancel": case "pointerdown": case "pointermove": case "pointerout": case "pointerover": case "pointerup": a = hi; break; default: a = R
                                                        }b = a.getPooled(e, b, c, d); lb(b); return b
                                                    }
                                                }; (function (a) {
                                                    if (ic) throw Error(k(101));
                                                    ic = Array.prototype.slice.call(a); nf()
                                                })("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")); (function (a, b, c) { td = a; rf = b; mf = c })(ae, Hb, Pa); pf({ SimpleEventPlugin: lk, EnterLeaveEventPlugin: Yj, ChangeEventPlugin: Xj, SelectEventPlugin: ak, BeforeInputEventPlugin: Wj }); var ie = [], ob = -1, Ca = {}, B = { current: Ca }, G = { current: !1 }, Ra = Ca, bj = Pd, je = $f, Rg = Lj, aj = Nj, Dc = Oj, Ig = Zh, Jg = ag, Kg = Pj, Lg = Qj, Qg = {}, yj = Mj, Cj = void 0 !== Yh ? Yh : function () { }, qa = null,
                                                    Ec = null, ke = !1, ii = ff(), Y = 1E4 > ii ? ff : function () { return ff() - ii }, Ic = { current: null }, Hc = null, qb = null, Gc = null, Tg = 0, Jc = 2, Ga = !1, Vb = da.ReactCurrentBatchConfig, $g = (new ea.Component).refs, Mc = {
                                                        isMounted: function (a) { return (a = a._reactInternalFiber) ? Na(a) === a : !1 }, enqueueSetState: function (a, b, c) { a = a._reactInternalFiber; var d = ka(), e = Vb.suspense; d = Va(d, a, e); e = Ea(d, e); e.payload = b; void 0 !== c && null !== c && (e.callback = c); Fa(a, e); Ja(a, d) }, enqueueReplaceState: function (a, b, c) {
                                                            a = a._reactInternalFiber; var d = ka(), e = Vb.suspense;
                                                            d = Va(d, a, e); e = Ea(d, e); e.tag = 1; e.payload = b; void 0 !== c && null !== c && (e.callback = c); Fa(a, e); Ja(a, d)
                                                        }, enqueueForceUpdate: function (a, b) { a = a._reactInternalFiber; var c = ka(), d = Vb.suspense; c = Va(c, a, d); d = Ea(c, d); d.tag = Jc; void 0 !== b && null !== b && (d.callback = b); Fa(a, d); Ja(a, c) }
                                                    }, Qc = Array.isArray, wb = ah(!0), Fe = ah(!1), Sb = {}, ja = { current: Sb }, Ub = { current: Sb }, Tb = { current: Sb }, D = { current: 0 }, Sc = da.ReactCurrentDispatcher, X = da.ReactCurrentBatchConfig, Ia = 0, z = null, K = null, J = null, Uc = !1, Tc = {
                                                        readContext: W, useCallback: S, useContext: S,
                                                        useEffect: S, useImperativeHandle: S, useLayoutEffect: S, useMemo: S, useReducer: S, useRef: S, useState: S, useDebugValue: S, useResponder: S, useDeferredValue: S, useTransition: S
                                                    }, dj = {
                                                        readContext: W, useCallback: ih, useContext: W, useEffect: eh, useImperativeHandle: function (a, b, c) { c = null !== c && void 0 !== c ? c.concat([a]) : null; return ze(4, 2, gh.bind(null, b, a), c) }, useLayoutEffect: function (a, b) { return ze(4, 2, a, b) }, useMemo: function (a, b) { var c = ub(); b = void 0 === b ? null : b; a = a(); c.memoizedState = [a, b]; return a }, useReducer: function (a, b, c) {
                                                            var d =
                                                                ub(); b = void 0 !== c ? c(b) : b; d.memoizedState = d.baseState = b; a = d.queue = { pending: null, dispatch: null, lastRenderedReducer: a, lastRenderedState: b }; a = a.dispatch = ch.bind(null, z, a); return [d.memoizedState, a]
                                                        }, useRef: function (a) { var b = ub(); a = { current: a }; return b.memoizedState = a }, useState: xe, useDebugValue: Be, useResponder: ue, useDeferredValue: function (a, b) { var c = xe(a), d = c[0], e = c[1]; eh(function () { var c = X.suspense; X.suspense = void 0 === b ? null : b; try { e(a) } finally { X.suspense = c } }, [a, b]); return d }, useTransition: function (a) {
                                                            var b =
                                                                xe(!1), c = b[0]; b = b[1]; return [ih(Ce.bind(null, b, a), [b, a]), c]
                                                        }
                                                    }, ej = {
                                                        readContext: W, useCallback: Yc, useContext: W, useEffect: Xc, useImperativeHandle: hh, useLayoutEffect: fh, useMemo: jh, useReducer: Vc, useRef: dh, useState: function (a) { return Vc(Ua) }, useDebugValue: Be, useResponder: ue, useDeferredValue: function (a, b) { var c = Vc(Ua), d = c[0], e = c[1]; Xc(function () { var c = X.suspense; X.suspense = void 0 === b ? null : b; try { e(a) } finally { X.suspense = c } }, [a, b]); return d }, useTransition: function (a) {
                                                            var b = Vc(Ua), c = b[0]; b = b[1]; return [Yc(Ce.bind(null,
                                                                b, a), [b, a]), c]
                                                        }
                                                    }, fj = { readContext: W, useCallback: Yc, useContext: W, useEffect: Xc, useImperativeHandle: hh, useLayoutEffect: fh, useMemo: jh, useReducer: Wc, useRef: dh, useState: function (a) { return Wc(Ua) }, useDebugValue: Be, useResponder: ue, useDeferredValue: function (a, b) { var c = Wc(Ua), d = c[0], e = c[1]; Xc(function () { var c = X.suspense; X.suspense = void 0 === b ? null : b; try { e(a) } finally { X.suspense = c } }, [a, b]); return d }, useTransition: function (a) { var b = Wc(Ua), c = b[0]; b = b[1]; return [Yc(Ce.bind(null, b, a), [b, a]), c] } }, ra = null, Ka = null, Wa =
                                                        !1, gj = da.ReactCurrentOwner, ia = !1, Je = { dehydrated: null, retryTime: 0 }; var jj = function (a, b, c, d) { for (c = b.child; null !== c;) { if (5 === c.tag || 6 === c.tag) a.appendChild(c.stateNode); else if (4 !== c.tag && null !== c.child) { c.child.return = c; c = c.child; continue } if (c === b) break; for (; null === c.sibling;) { if (null === c.return || c.return === b) return; c = c.return } c.sibling.return = c.return; c = c.sibling } }; var wh = function (a) { }; var ij = function (a, b, c, d, e) {
                                                            var f = a.memoizedProps; if (f !== d) {
                                                                var g = b.stateNode; Ta(ja.current); a = null; switch (c) {
                                                                    case "input": f =
                                                                        Cd(g, f); d = Cd(g, d); a = []; break; case "option": f = Fd(g, f); d = Fd(g, d); a = []; break; case "select": f = M({}, f, { value: void 0 }); d = M({}, d, { value: void 0 }); a = []; break; case "textarea": f = Gd(g, f); d = Gd(g, d); a = []; break; default: "function" !== typeof f.onClick && "function" === typeof d.onClick && (g.onclick = uc)
                                                                }Ud(c, d); var h, m; c = null; for (h in f) if (!d.hasOwnProperty(h) && f.hasOwnProperty(h) && null != f[h]) if ("style" === h) for (m in g = f[h], g) g.hasOwnProperty(m) && (c || (c = {}), c[m] = ""); else "dangerouslySetInnerHTML" !== h && "children" !== h && "suppressContentEditableWarning" !==
                                                                    h && "suppressHydrationWarning" !== h && "autoFocus" !== h && (db.hasOwnProperty(h) ? a || (a = []) : (a = a || []).push(h, null)); for (h in d) {
                                                                        var k = d[h]; g = null != f ? f[h] : void 0; if (d.hasOwnProperty(h) && k !== g && (null != k || null != g)) if ("style" === h) if (g) { for (m in g) !g.hasOwnProperty(m) || k && k.hasOwnProperty(m) || (c || (c = {}), c[m] = ""); for (m in k) k.hasOwnProperty(m) && g[m] !== k[m] && (c || (c = {}), c[m] = k[m]) } else c || (a || (a = []), a.push(h, c)), c = k; else "dangerouslySetInnerHTML" === h ? (k = k ? k.__html : void 0, g = g ? g.__html : void 0, null != k && g !== k && (a = a ||
                                                                            []).push(h, k)) : "children" === h ? g === k || "string" !== typeof k && "number" !== typeof k || (a = a || []).push(h, "" + k) : "suppressContentEditableWarning" !== h && "suppressHydrationWarning" !== h && (db.hasOwnProperty(h) ? (null != k && oa(e, h), a || g === k || (a = [])) : (a = a || []).push(h, k))
                                                                    } c && (a = a || []).push("style", c); e = a; if (b.updateQueue = e) b.effectTag |= 4
                                                            }
                                                        }; var kj = function (a, b, c, d) { c !== d && (b.effectTag |= 4) }; var pj = "function" === typeof WeakSet ? WeakSet : Set, wj = "function" === typeof WeakMap ? WeakMap : Map, sj = Math.ceil, gd = da.ReactCurrentDispatcher,
                                                            Uh = da.ReactCurrentOwner, H = 0, Ye = 8, ca = 16, ma = 32, Xa = 0, hd = 1, Oh = 2, ad = 3, bd = 4, Xe = 5, p = H, U = null, t = null, P = 0, F = Xa, id = null, ta = 1073741823, Yb = 1073741823, kd = null, Xb = 0, jd = !1, Re = 0, Ph = 500, l = null, cd = !1, Se = null, La = null, ld = !1, Zb = null, $b = 90, bb = null, ac = 0, af = null, dd = 0, Ja = function (a, b) {
                                                                if (50 < ac) throw ac = 0, af = null, Error(k(185)); a = ed(a, b); if (null !== a) {
                                                                    var c = Cc(); 1073741823 === b ? (p & Ye) !== H && (p & (ca | ma)) === H ? Te(a) : (V(a), p === H && ha()) : V(a); (p & 4) === H || 98 !== c && 99 !== c || (null === bb ? bb = new Map([[a, b]]) : (c = bb.get(a), (void 0 === c || c > b) && bb.set(a,
                                                                        b)))
                                                                }
                                                            }; var zj = function (a, b, c) {
                                                                var d = b.expirationTime; if (null !== a) {
                                                                    var e = b.pendingProps; if (a.memoizedProps !== e || G.current) ia = !0; else {
                                                                        if (d < c) {
                                                                            ia = !1; switch (b.tag) {
                                                                                case 3: sh(b); Ee(); break; case 5: bh(b); if (b.mode & 4 && 1 !== c && e.hidden) return b.expirationTime = b.childExpirationTime = 1, null; break; case 1: N(b.type) && Bc(b); break; case 4: se(b, b.stateNode.containerInfo); break; case 10: d = b.memoizedProps.value; e = b.type._context; y(Ic, e._currentValue); e._currentValue = d; break; case 13: if (null !== b.memoizedState) {
                                                                                    d = b.child.childExpirationTime;
                                                                                    if (0 !== d && d >= c) return th(a, b, c); y(D, D.current & 1); b = sa(a, b, c); return null !== b ? b.sibling : null
                                                                                } y(D, D.current & 1); break; case 19: d = b.childExpirationTime >= c; if (0 !== (a.effectTag & 64)) { if (d) return vh(a, b, c); b.effectTag |= 64 } e = b.memoizedState; null !== e && (e.rendering = null, e.tail = null); y(D, D.current); if (!d) return null
                                                                            }return sa(a, b, c)
                                                                        } ia = !1
                                                                    }
                                                                } else ia = !1; b.expirationTime = 0; switch (b.tag) {
                                                                    case 2: d = b.type; null !== a && (a.alternate = null, b.alternate = null, b.effectTag |= 2); a = b.pendingProps; e = pb(b, B.current); rb(b, c); e = we(null,
                                                                        b, d, a, e, c); b.effectTag |= 1; if ("object" === typeof e && null !== e && "function" === typeof e.render && void 0 === e.$$typeof) { b.tag = 1; b.memoizedState = null; b.updateQueue = null; if (N(d)) { var f = !0; Bc(b) } else f = !1; b.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null; ne(b); var g = d.getDerivedStateFromProps; "function" === typeof g && Lc(b, d, g, a); e.updater = Mc; b.stateNode = e; e._reactInternalFiber = b; pe(b, d, a, c); b = Ie(null, b, d, !0, f, c) } else b.tag = 0, T(null, b, e, c), b = b.child; return b; case 16: a: {
                                                                            e = b.elementType; null !== a && (a.alternate =
                                                                                null, b.alternate = null, b.effectTag |= 2); a = b.pendingProps; ri(e); if (1 !== e._status) throw e._result; e = e._result; b.type = e; f = b.tag = Gj(e); a = aa(e, a); switch (f) { case 0: b = He(null, b, e, a, c); break a; case 1: b = rh(null, b, e, a, c); break a; case 11: b = nh(null, b, e, a, c); break a; case 14: b = oh(null, b, e, aa(e.type, a), d, c); break a }throw Error(k(306, e, ""));
                                                                        } return b; case 0: return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : aa(d, e), He(a, b, d, e, c); case 1: return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : aa(d, e), rh(a, b, d, e, c);
                                                                    case 3: sh(b); d = b.updateQueue; if (null === a || null === d) throw Error(k(282)); d = b.pendingProps; e = b.memoizedState; e = null !== e ? e.element : null; oe(a, b); Qb(b, d, null, c); d = b.memoizedState.element; if (d === e) Ee(), b = sa(a, b, c); else { if (e = b.stateNode.hydrate) Ka = kb(b.stateNode.containerInfo.firstChild), ra = b, e = Wa = !0; if (e) for (c = Fe(b, null, d, c), b.child = c; c;)c.effectTag = c.effectTag & -3 | 1024, c = c.sibling; else T(a, b, d, c), Ee(); b = b.child } return b; case 5: return bh(b), null === a && De(b), d = b.type, e = b.pendingProps, f = null !== a ? a.memoizedProps :
                                                                        null, g = e.children, Yd(d, e) ? g = null : null !== f && Yd(d, f) && (b.effectTag |= 16), qh(a, b), b.mode & 4 && 1 !== c && e.hidden ? (b.expirationTime = b.childExpirationTime = 1, b = null) : (T(a, b, g, c), b = b.child), b; case 6: return null === a && De(b), null; case 13: return th(a, b, c); case 4: return se(b, b.stateNode.containerInfo), d = b.pendingProps, null === a ? b.child = wb(b, null, d, c) : T(a, b, d, c), b.child; case 11: return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : aa(d, e), nh(a, b, d, e, c); case 7: return T(a, b, b.pendingProps, c), b.child; case 8: return T(a,
                                                                            b, b.pendingProps.children, c), b.child; case 12: return T(a, b, b.pendingProps.children, c), b.child; case 10: a: {
                                                                                d = b.type._context; e = b.pendingProps; g = b.memoizedProps; f = e.value; var h = b.type._context; y(Ic, h._currentValue); h._currentValue = f; if (null !== g) if (h = g.value, f = Qa(h, f) ? 0 : ("function" === typeof d._calculateChangedBits ? d._calculateChangedBits(h, f) : 1073741823) | 0, 0 === f) { if (g.children === e.children && !G.current) { b = sa(a, b, c); break a } } else for (h = b.child, null !== h && (h.return = b); null !== h;) {
                                                                                    var m = h.dependencies; if (null !==
                                                                                        m) { g = h.child; for (var l = m.firstContext; null !== l;) { if (l.context === d && 0 !== (l.observedBits & f)) { 1 === h.tag && (l = Ea(c, null), l.tag = Jc, Fa(h, l)); h.expirationTime < c && (h.expirationTime = c); l = h.alternate; null !== l && l.expirationTime < c && (l.expirationTime = c); Sg(h.return, c); m.expirationTime < c && (m.expirationTime = c); break } l = l.next } } else g = 10 === h.tag ? h.type === b.type ? null : h.child : h.child; if (null !== g) g.return = h; else for (g = h; null !== g;) { if (g === b) { g = null; break } h = g.sibling; if (null !== h) { h.return = g.return; g = h; break } g = g.return } h =
                                                                                            g
                                                                                } T(a, b, e.children, c); b = b.child
                                                                            } return b; case 9: return e = b.type, f = b.pendingProps, d = f.children, rb(b, c), e = W(e, f.unstable_observedBits), d = d(e), b.effectTag |= 1, T(a, b, d, c), b.child; case 14: return e = b.type, f = aa(e, b.pendingProps), f = aa(e.type, f), oh(a, b, e, f, d, c); case 15: return ph(a, b, b.type, b.pendingProps, d, c); case 17: return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : aa(d, e), null !== a && (a.alternate = null, b.alternate = null, b.effectTag |= 2), b.tag = 1, N(d) ? (a = !0, Bc(b)) : a = !1, rb(b, c), Yg(b, d, e), pe(b, d, e, c), Ie(null,
                                                                                b, d, !0, a, c); case 19: return vh(a, b, c)
                                                                }throw Error(k(156, b.tag));
                                                            }; var bf = null, Ne = null, la = function (a, b, c, d) { return new Fj(a, b, c, d) }; ef.prototype.render = function (a) { md(a, this._internalRoot, null, null) }; ef.prototype.unmount = function () { var a = this._internalRoot, b = a.containerInfo; md(null, a, null, function () { b[Lb] = null }) }; var Di = function (a) { if (13 === a.tag) { var b = Fc(ka(), 150, 100); Ja(a, b); df(a, b) } }; var Yf = function (a) { 13 === a.tag && (Ja(a, 3), df(a, 3)) }; var Bi = function (a) {
                                                                if (13 === a.tag) {
                                                                    var b = ka(); b = Va(b, a, null); Ja(a,
                                                                        b); df(a, b)
                                                                }
                                                            }; sd = function (a, b, c) { switch (b) { case "input": Dd(a, c); b = c.name; if ("radio" === c.type && null != b) { for (c = a; c.parentNode;)c = c.parentNode; c = c.querySelectorAll("input[name=" + JSON.stringify("" + b) + '][type="radio"]'); for (b = 0; b < c.length; b++) { var d = c[b]; if (d !== a && d.form === a.form) { var e = ae(d); if (!e) throw Error(k(90)); Gf(d); Dd(d, e) } } } break; case "textarea": Lf(a, c); break; case "select": b = c.value, null != b && hb(a, !!c.multiple, b, !1) } }; (function (a, b, c, d) { ee = a; eg = b; vd = c; vf = d })(Qh, function (a, b, c, d, e) {
                                                                var f = p; p |= 4;
                                                                try { return Da(98, a.bind(null, b, c, d, e)) } finally { p = f, p === H && ha() }
                                                            }, function () { (p & (1 | ca | ma)) === H && (uj(), xb()) }, function (a, b) { var c = p; p |= 2; try { return a(b) } finally { p = c, p === H && ha() } }); var mk = { Events: [Hb, Pa, ae, pf, qd, lb, function (a) { Kd(a, Ki) }, sf, tf, sc, pc, xb, { current: !1 }] }; (function (a) {
                                                                var b = a.findFiberByHostInstance; return Ej(M({}, a, {
                                                                    overrideHookState: null, overrideProps: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: da.ReactCurrentDispatcher, findHostInstanceByFiber: function (a) {
                                                                        a = Sf(a);
                                                                        return null === a ? null : a.stateNode
                                                                    }, findFiberByHostInstance: function (a) { return b ? b(a) : null }, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null
                                                                }))
                                                            })({ findFiberByHostInstance: Bb, bundleType: 0, version: "16.14.0", rendererPackageName: "react-dom" }); I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = mk; I.createPortal = Xh; I.findDOMNode = function (a) {
                                                                if (null == a) return null; if (1 === a.nodeType) return a; var b = a._reactInternalFiber; if (void 0 ===
                                                                    b) { if ("function" === typeof a.render) throw Error(k(188)); throw Error(k(268, Object.keys(a))); } a = Sf(b); a = null === a ? null : a.stateNode; return a
                                                            }; I.flushSync = function (a, b) { if ((p & (ca | ma)) !== H) throw Error(k(187)); var c = p; p |= 1; try { return Da(99, a.bind(null, b)) } finally { p = c, ha() } }; I.hydrate = function (a, b, c) { if (!bc(b)) throw Error(k(200)); return nd(null, a, b, !0, c) }; I.render = function (a, b, c) { if (!bc(b)) throw Error(k(200)); return nd(null, a, b, !1, c) }; I.unmountComponentAtNode = function (a) {
                                                                if (!bc(a)) throw Error(k(40)); return a._reactRootContainer ?
                                                                    (Rh(function () { nd(null, null, a, !1, function () { a._reactRootContainer = null; a[Lb] = null }) }), !0) : !1
                                                            }; I.unstable_batchedUpdates = Qh; I.unstable_createPortal = function (a, b) { return Xh(a, b, 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null) }; I.unstable_renderSubtreeIntoContainer = function (a, b, c, d) { if (!bc(c)) throw Error(k(200)); if (null == a || void 0 === a._reactInternalFiber) throw Error(k(38)); return nd(a, b, c, !1, d) }; I.version = "16.14.0"
});;
(function (f) { if (typeof exports === "object" && typeof module !== "undefined") { module.exports = f() } else if (typeof define === "function" && define.amd) { define([], f) } else { var g; if (typeof window !== "undefined") { g = window } else if (typeof global !== "undefined") { g = global } else if (typeof self !== "undefined") { g = self } else { g = this } g.PropTypes = f() } })(function () {
    var define, module, exports; return (function e(t, n, r) { function s(o, u) { if (!n[o]) { if (!t[o]) { var a = typeof require == "function" && require; if (!u && a) return a(o, !0); if (i) return i(o, !0); var f = new Error("Cannot find module '" + o + "'"); throw f.code = "MODULE_NOT_FOUND", f } var l = n[o] = { exports: {} }; t[o][0].call(l.exports, function (e) { var n = t[o][1][e]; return s(n ? n : e) }, l, l.exports, e, t, n, r) } return n[o].exports } var i = typeof require == "function" && require; for (var o = 0; o < r.length; o++)s(r[o]); return s })({
        1: [function (require, module, exports) {
            /**
             * Copyright (c) 2013-present, Facebook, Inc.
             *
             * This source code is licensed under the MIT license found in the
             * LICENSE file in the root directory of this source tree.
             */

            'use strict';

            if ("development" !== 'production') {
                var invariant = require('fbjs/lib/invariant');
                var warning = require('fbjs/lib/warning');
                var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
                var loggedTypeFailures = {};
            }

            /**
             * Assert that the values match with the type specs.
             * Error messages are memorized and will only be shown once.
             *
             * @param {object} typeSpecs Map of name to a ReactPropType
             * @param {object} values Runtime values that need to be type-checked
             * @param {string} location e.g. "prop", "context", "child context"
             * @param {string} componentName Name of the component for error messages.
             * @param {?Function} getStack Returns the component stack.
             * @private
             */
            function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
                if ("development" !== 'production') {
                    for (var typeSpecName in typeSpecs) {
                        if (typeSpecs.hasOwnProperty(typeSpecName)) {
                            var error;
                            // Prop type validation may throw. In case they do, we don't want to
                            // fail the render phase where it didn't fail before. So we log it.
                            // After these have been cleaned up, we'll let them throw.
                            try {
                                // This is intentionally an invariant that gets caught. It's the same
                                // behavior as without this statement except with a better message.
                                invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
                                error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
                            } catch (ex) {
                                error = ex;
                            }
                            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', location, typeSpecName, typeof error);
                            if (error instanceof Error && !(error.message in loggedTypeFailures)) {
                                // Only monitor this failure once because there tends to be a lot of the
                                // same error.
                                loggedTypeFailures[error.message] = true;

                                var stack = getStack ? getStack() : '';

                                warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
                            }
                        }
                    }
                }
            }

            module.exports = checkPropTypes;

        }, { "./lib/ReactPropTypesSecret": 5, "fbjs/lib/invariant": 7, "fbjs/lib/warning": 8 }], 2: [function (require, module, exports) {
            /**
             * Copyright (c) 2013-present, Facebook, Inc.
             *
             * This source code is licensed under the MIT license found in the
             * LICENSE file in the root directory of this source tree.
             */

            'use strict';

            var emptyFunction = require('fbjs/lib/emptyFunction');
            var invariant = require('fbjs/lib/invariant');
            var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');

            module.exports = function () {
                function shim(props, propName, componentName, location, propFullName, secret) {
                    if (secret === ReactPropTypesSecret) {
                        // It is still safe when called from React.
                        return;
                    }
                    invariant(
                        false,
                        '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'
                    );
                };
                shim.isRequired = shim;
                function getShim() {
                    return shim;
                };
                // Important!
                // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
                var ReactPropTypes = {
                    array: shim,
                    bool: shim,
                    func: shim,
                    number: shim,
                    object: shim,
                    string: shim,
                    symbol: shim,

                    any: shim,
                    arrayOf: getShim,
                    element: shim,
                    instanceOf: getShim,
                    node: shim,
                    objectOf: getShim,
                    oneOf: getShim,
                    oneOfType: getShim,
                    shape: getShim,
                    exact: getShim
                };

                ReactPropTypes.checkPropTypes = emptyFunction;
                ReactPropTypes.PropTypes = ReactPropTypes;

                return ReactPropTypes;
            };

        }, { "./lib/ReactPropTypesSecret": 5, "fbjs/lib/emptyFunction": 6, "fbjs/lib/invariant": 7 }], 3: [function (require, module, exports) {
            /**
             * Copyright (c) 2013-present, Facebook, Inc.
             *
             * This source code is licensed under the MIT license found in the
             * LICENSE file in the root directory of this source tree.
             */

            'use strict';

            var emptyFunction = require('fbjs/lib/emptyFunction');
            var invariant = require('fbjs/lib/invariant');
            var warning = require('fbjs/lib/warning');
            var assign = require('object-assign');

            var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
            var checkPropTypes = require('./checkPropTypes');

            module.exports = function (isValidElement, throwOnDirectAccess) {
                /* global Symbol */
                var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
                var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.

                /**
                 * Returns the iterator method function contained on the iterable object.
                 *
                 * Be sure to invoke the function with the iterable as context:
                 *
                 *     var iteratorFn = getIteratorFn(myIterable);
                 *     if (iteratorFn) {
                 *       var iterator = iteratorFn.call(myIterable);
                 *       ...
                 *     }
                 *
                 * @param {?object} maybeIterable
                 * @return {?function}
                 */
                function getIteratorFn(maybeIterable) {
                    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
                    if (typeof iteratorFn === 'function') {
                        return iteratorFn;
                    }
                }

                /**
                 * Collection of methods that allow declaration and validation of props that are
                 * supplied to React components. Example usage:
                 *
                 *   var Props = require('ReactPropTypes');
                 *   var MyArticle = React.createClass({
                 *     propTypes: {
                 *       // An optional string prop named "description".
                 *       description: Props.string,
                 *
                 *       // A required enum prop named "category".
                 *       category: Props.oneOf(['News','Photos']).isRequired,
                 *
                 *       // A prop named "dialog" that requires an instance of Dialog.
                 *       dialog: Props.instanceOf(Dialog).isRequired
                 *     },
                 *     render: function() { ... }
                 *   });
                 *
                 * A more formal specification of how these methods are used:
                 *
                 *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
                 *   decl := ReactPropTypes.{type}(.isRequired)?
                 *
                 * Each and every declaration produces a function with the same signature. This
                 * allows the creation of custom validation functions. For example:
                 *
                 *  var MyLink = React.createClass({
                 *    propTypes: {
                 *      // An optional string or URI prop named "href".
                 *      href: function(props, propName, componentName) {
                 *        var propValue = props[propName];
                 *        if (propValue != null && typeof propValue !== 'string' &&
                 *            !(propValue instanceof URI)) {
                 *          return new Error(
                 *            'Expected a string or an URI for ' + propName + ' in ' +
                 *            componentName
                 *          );
                 *        }
                 *      }
                 *    },
                 *    render: function() {...}
                 *  });
                 *
                 * @internal
                 */

                var ANONYMOUS = '<<anonymous>>';

                // Important!
                // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
                var ReactPropTypes = {
                    array: createPrimitiveTypeChecker('array'),
                    bool: createPrimitiveTypeChecker('boolean'),
                    func: createPrimitiveTypeChecker('function'),
                    number: createPrimitiveTypeChecker('number'),
                    object: createPrimitiveTypeChecker('object'),
                    string: createPrimitiveTypeChecker('string'),
                    symbol: createPrimitiveTypeChecker('symbol'),

                    any: createAnyTypeChecker(),
                    arrayOf: createArrayOfTypeChecker,
                    element: createElementTypeChecker(),
                    instanceOf: createInstanceTypeChecker,
                    node: createNodeChecker(),
                    objectOf: createObjectOfTypeChecker,
                    oneOf: createEnumTypeChecker,
                    oneOfType: createUnionTypeChecker,
                    shape: createShapeTypeChecker,
                    exact: createStrictShapeTypeChecker,
                };

                /**
                 * inlined Object.is polyfill to avoid requiring consumers ship their own
                 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
                 */
                /*eslint-disable no-self-compare*/
                function is(x, y) {
                    // SameValue algorithm
                    if (x === y) {
                        // Steps 1-5, 7-10
                        // Steps 6.b-6.e: +0 != -0
                        return x !== 0 || 1 / x === 1 / y;
                    } else {
                        // Step 6.a: NaN == NaN
                        return x !== x && y !== y;
                    }
                }
                /*eslint-enable no-self-compare*/

                /**
                 * We use an Error-like object for backward compatibility as people may call
                 * PropTypes directly and inspect their output. However, we don't use real
                 * Errors anymore. We don't inspect their stack anyway, and creating them
                 * is prohibitively expensive if they are created too often, such as what
                 * happens in oneOfType() for any type before the one that matched.
                 */
                function PropTypeError(message) {
                    this.message = message;
                    this.stack = '';
                }
                // Make `instanceof Error` still work for returned errors.
                PropTypeError.prototype = Error.prototype;

                function createChainableTypeChecker(validate) {
                    if ("development" !== 'production') {
                        var manualPropTypeCallCache = {};
                        var manualPropTypeWarningCount = 0;
                    }
                    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
                        componentName = componentName || ANONYMOUS;
                        propFullName = propFullName || propName;

                        if (secret !== ReactPropTypesSecret) {
                            if (throwOnDirectAccess) {
                                // New behavior only for users of `prop-types` package
                                invariant(
                                    false,
                                    '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'
                                );
                            } else if ("development" !== 'production' && typeof console !== 'undefined') {
                                // Old behavior for people using React.PropTypes
                                var cacheKey = componentName + ':' + propName;
                                if (
                                    !manualPropTypeCallCache[cacheKey] &&
                                    // Avoid spamming the console because they are often not actionable except for lib authors
                                    manualPropTypeWarningCount < 3
                                ) {
                                    warning(
                                        false,
                                        'You are manually calling a React.PropTypes validation ' +
                                        'function for the `%s` prop on `%s`. This is deprecated ' +
                                        'and will throw in the standalone `prop-types` package. ' +
                                        'You may be seeing this warning due to a third-party PropTypes ' +
                                        'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
                                        propFullName,
                                        componentName
                                    );
                                    manualPropTypeCallCache[cacheKey] = true;
                                    manualPropTypeWarningCount++;
                                }
                            }
                        }
                        if (props[propName] == null) {
                            if (isRequired) {
                                if (props[propName] === null) {
                                    return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
                                }
                                return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
                            }
                            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, secret) {
                        var propValue = props[propName];
                        var propType = getPropType(propValue);
                        if (propType !== expectedType) {
                            // `propValue` being instance of, say, date/regexp, pass the 'object'
                            // check, but we can offer a more precise error message here rather than
                            // 'of type `object`'.
                            var preciseType = getPreciseType(propValue);

                            return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
                        }
                        return null;
                    }
                    return createChainableTypeChecker(validate);
                }

                function createAnyTypeChecker() {
                    return createChainableTypeChecker(emptyFunction.thatReturnsNull);
                }

                function createArrayOfTypeChecker(typeChecker) {
                    function validate(props, propName, componentName, location, propFullName) {
                        if (typeof typeChecker !== 'function') {
                            return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
                        }
                        var propValue = props[propName];
                        if (!Array.isArray(propValue)) {
                            var propType = getPropType(propValue);
                            return new PropTypeError('Invalid ' + location + ' `' + 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 + ']', ReactPropTypesSecret);
                            if (error instanceof Error) {
                                return error;
                            }
                        }
                        return null;
                    }
                    return createChainableTypeChecker(validate);
                }

                function createElementTypeChecker() {
                    function validate(props, propName, componentName, location, propFullName) {
                        var propValue = props[propName];
                        if (!isValidElement(propValue)) {
                            var propType = getPropType(propValue);
                            return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` 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 expectedClassName = expectedClass.name || ANONYMOUS;
                            var actualClassName = getClassName(props[propName]);
                            return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
                        }
                        return null;
                    }
                    return createChainableTypeChecker(validate);
                }

                function createEnumTypeChecker(expectedValues) {
                    if (!Array.isArray(expectedValues)) {
                        "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
                        return emptyFunction.thatReturnsNull;
                    }

                    function validate(props, propName, componentName, location, propFullName) {
                        var propValue = props[propName];
                        for (var i = 0; i < expectedValues.length; i++) {
                            if (is(propValue, expectedValues[i])) {
                                return null;
                            }
                        }

                        var valuesString = JSON.stringify(expectedValues);
                        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
                    }
                    return createChainableTypeChecker(validate);
                }

                function createObjectOfTypeChecker(typeChecker) {
                    function validate(props, propName, componentName, location, propFullName) {
                        if (typeof typeChecker !== 'function') {
                            return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
                        }
                        var propValue = props[propName];
                        var propType = getPropType(propValue);
                        if (propType !== 'object') {
                            return new PropTypeError('Invalid ' + location + ' `' + 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, ReactPropTypesSecret);
                                if (error instanceof Error) {
                                    return error;
                                }
                            }
                        }
                        return null;
                    }
                    return createChainableTypeChecker(validate);
                }

                function createUnionTypeChecker(arrayOfTypeCheckers) {
                    if (!Array.isArray(arrayOfTypeCheckers)) {
                        "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
                        return emptyFunction.thatReturnsNull;
                    }

                    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
                        var checker = arrayOfTypeCheckers[i];
                        if (typeof checker !== 'function') {
                            warning(
                                false,
                                'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
                                'received %s at index %s.',
                                getPostfixForTypeWarning(checker),
                                i
                            );
                            return emptyFunction.thatReturnsNull;
                        }
                    }

                    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, ReactPropTypesSecret) == null) {
                                return null;
                            }
                        }

                        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
                    }
                    return createChainableTypeChecker(validate);
                }

                function createNodeChecker() {
                    function validate(props, propName, componentName, location, propFullName) {
                        if (!isNode(props[propName])) {
                            return new PropTypeError('Invalid ' + location + ' `' + 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') {
                            return new PropTypeError('Invalid ' + location + ' `' + 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, ReactPropTypesSecret);
                            if (error) {
                                return error;
                            }
                        }
                        return null;
                    }
                    return createChainableTypeChecker(validate);
                }

                function createStrictShapeTypeChecker(shapeTypes) {
                    function validate(props, propName, componentName, location, propFullName) {
                        var propValue = props[propName];
                        var propType = getPropType(propValue);
                        if (propType !== 'object') {
                            return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
                        }
                        // We need to check all keys in case some are required but missing from
                        // props.
                        var allKeys = assign({}, props[propName], shapeTypes);
                        for (var key in allKeys) {
                            var checker = shapeTypes[key];
                            if (!checker) {
                                return new PropTypeError(
                                    'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
                                    '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
                                    '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, '  ')
                                );
                            }
                            var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
                            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 || 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 {
                                    // Iterator will provide entry [k,v] tuples rather than values.
                                    while (!(step = iterator.next()).done) {
                                        var entry = step.value;
                                        if (entry) {
                                            if (!isNode(entry[1])) {
                                                return false;
                                            }
                                        }
                                    }
                                }
                            } else {
                                return false;
                            }

                            return true;
                        default:
                            return false;
                    }
                }

                function isSymbol(propType, propValue) {
                    // Native Symbol.
                    if (propType === 'symbol') {
                        return true;
                    }

                    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
                    if (propValue['@@toStringTag'] === 'Symbol') {
                        return true;
                    }

                    // Fallback for non-spec compliant Symbols which are polyfilled.
                    if (typeof Symbol === 'function' && propValue instanceof Symbol) {
                        return true;
                    }

                    return false;
                }

                // Equivalent of `typeof` but with special handling for array and regexp.
                function getPropType(propValue) {
                    var propType = typeof propValue;
                    if (Array.isArray(propValue)) {
                        return 'array';
                    }
                    if (propValue instanceof RegExp) {
                        // Old webkits (at least until Android 4.0) return 'function' rather than
                        // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
                        // passes PropTypes.object.
                        return 'object';
                    }
                    if (isSymbol(propType, propValue)) {
                        return 'symbol';
                    }
                    return propType;
                }

                // This handles more types than `getPropType`. Only used for error messages.
                // See `createPrimitiveTypeChecker`.
                function getPreciseType(propValue) {
                    if (typeof propValue === 'undefined' || propValue === null) {
                        return '' + propValue;
                    }
                    var propType = getPropType(propValue);
                    if (propType === 'object') {
                        if (propValue instanceof Date) {
                            return 'date';
                        } else if (propValue instanceof RegExp) {
                            return 'regexp';
                        }
                    }
                    return propType;
                }

                // Returns a string that is postfixed to a warning about an invalid type.
                // For example, "undefined" or "of type array"
                function getPostfixForTypeWarning(value) {
                    var type = getPreciseType(value);
                    switch (type) {
                        case 'array':
                        case 'object':
                            return 'an ' + type;
                        case 'boolean':
                        case 'date':
                        case 'regexp':
                            return 'a ' + type;
                        default:
                            return type;
                    }
                }

                // Returns class name of the object, if any.
                function getClassName(propValue) {
                    if (!propValue.constructor || !propValue.constructor.name) {
                        return ANONYMOUS;
                    }
                    return propValue.constructor.name;
                }

                ReactPropTypes.checkPropTypes = checkPropTypes;
                ReactPropTypes.PropTypes = ReactPropTypes;

                return ReactPropTypes;
            };

        }, { "./checkPropTypes": 1, "./lib/ReactPropTypesSecret": 5, "fbjs/lib/emptyFunction": 6, "fbjs/lib/invariant": 7, "fbjs/lib/warning": 8, "object-assign": 9 }], 4: [function (require, module, exports) {
            /**
             * Copyright (c) 2013-present, Facebook, Inc.
             *
             * This source code is licensed under the MIT license found in the
             * LICENSE file in the root directory of this source tree.
             */

            if ("development" !== 'production') {
                var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
                    Symbol.for &&
                    Symbol.for('react.element')) ||
                    0xeac7;

                var isValidElement = function (object) {
                    return typeof object === 'object' &&
                        object !== null &&
                        object.$$typeof === REACT_ELEMENT_TYPE;
                };

                // By explicitly using `prop-types` you are opting into new development behavior.
                // http://fb.me/prop-types-in-prod
                var throwOnDirectAccess = true;
                module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);
            } else {
                // By explicitly using `prop-types` you are opting into new production behavior.
                // http://fb.me/prop-types-in-prod
                module.exports = require('./factoryWithThrowingShims')();
            }

        }, { "./factoryWithThrowingShims": 2, "./factoryWithTypeCheckers": 3 }], 5: [function (require, module, exports) {
            /**
             * Copyright (c) 2013-present, Facebook, Inc.
             *
             * This source code is licensed under the MIT license found in the
             * LICENSE file in the root directory of this source tree.
             */

            'use strict';

            var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';

            module.exports = ReactPropTypesSecret;

        }, {}], 6: [function (require, module, exports) {
            "use strict";

            /**
             * Copyright (c) 2013-present, Facebook, Inc.
             *
             * This source code is licensed under the MIT license found in the
             * LICENSE file in the root directory of this source tree.
             *
             * 
             */

            function makeEmptyFunction(arg) {
                return function () {
                    return arg;
                };
            }

            /**
             * This function accepts and discards inputs; it has no side effects. This is
             * primarily useful idiomatically for overridable function endpoints which
             * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
             */
            var emptyFunction = 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;
        }, {}], 7: [function (require, module, exports) {
            /**
             * Copyright (c) 2013-present, Facebook, Inc.
             *
             * This source code is licensed under the MIT license found in the
             * LICENSE file in the root directory of this source tree.
             *
             */

            'use strict';

            /**
             * Use invariant() to assert state which your program assumes to be true.
             *
             * Provide sprintf-style format (only %s is supported) and arguments
             * to provide information about what broke and what you were
             * expecting.
             *
             * The invariant message will be stripped in production, but the invariant
             * will remain to ensure logic does not differ in production.
             */

            var validateFormat = function validateFormat(format) { };

            if ("development" !== 'production') {
                validateFormat = function validateFormat(format) {
                    if (format === undefined) {
                        throw new Error('invariant requires an error message argument');
                    }
                };
            }

            function invariant(condition, format, a, b, c, d, e, f) {
                validateFormat(format);

                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; // we don't care about invariant's own frame
                    throw error;
                }
            }

            module.exports = invariant;
        }, {}], 8: [function (require, module, exports) {
            /**
             * Copyright (c) 2014-present, Facebook, Inc.
             *
             * This source code is licensed under the MIT license found in the
             * LICENSE file in the root directory of this source tree.
             *
             */

            'use strict';

            var emptyFunction = require('./emptyFunction');

            /**
             * Similar to invariant but only logs a warning if the condition is not met.
             * This can be used to log issues in development environments in critical
             * paths. Removing the logging code for production environments will keep the
             * same logic and follow the same code paths.
             */

            var warning = emptyFunction;

            if ("development" !== 'production') {
                var printWarning = function printWarning(format) {
                    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                        args[_key - 1] = arguments[_key];
                    }

                    var argIndex = 0;
                    var message = 'Warning: ' + format.replace(/%s/g, function () {
                        return args[argIndex++];
                    });
                    if (typeof console !== 'undefined') {
                        console.error(message);
                    }
                    try {
                        // --- Welcome to debugging React ---
                        // This error was thrown as a convenience so that you can use this stack
                        // to find the callsite that caused this warning to fire.
                        throw new Error(message);
                    } catch (x) { }
                };

                warning = function warning(condition, format) {
                    if (format === undefined) {
                        throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
                    }

                    if (format.indexOf('Failed Composite propType: ') === 0) {
                        return; // Ignore CompositeComponent proptype check.
                    }

                    if (!condition) {
                        for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
                            args[_key2 - 2] = arguments[_key2];
                        }

                        printWarning.apply(undefined, [format].concat(args));
                    }
                };
            }

            module.exports = warning;
        }, { "./emptyFunction": 6 }], 9: [function (require, module, exports) {
            /*
            object-assign
            (c) Sindre Sorhus
            @license MIT
            */

            'use strict';
            /* eslint-disable no-unused-vars */
            var getOwnPropertySymbols = Object.getOwnPropertySymbols;
            var hasOwnProperty = Object.prototype.hasOwnProperty;
            var propIsEnumerable = Object.prototype.propertyIsEnumerable;

            function toObject(val) {
                if (val === null || val === undefined) {
                    throw new TypeError('Object.assign cannot be called with null or undefined');
                }

                return Object(val);
            }

            function shouldUseNative() {
                try {
                    if (!Object.assign) {
                        return false;
                    }

                    // Detect buggy property enumeration order in older V8 versions.

                    // https://bugs.chromium.org/p/v8/issues/detail?id=4118
                    var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
                    test1[5] = 'de';
                    if (Object.getOwnPropertyNames(test1)[0] === '5') {
                        return false;
                    }

                    // https://bugs.chromium.org/p/v8/issues/detail?id=3056
                    var test2 = {};
                    for (var i = 0; i < 10; i++) {
                        test2['_' + String.fromCharCode(i)] = i;
                    }
                    var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
                        return test2[n];
                    });
                    if (order2.join('') !== '0123456789') {
                        return false;
                    }

                    // https://bugs.chromium.org/p/v8/issues/detail?id=3056
                    var test3 = {};
                    'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
                        test3[letter] = letter;
                    });
                    if (Object.keys(Object.assign({}, test3)).join('') !==
                        'abcdefghijklmnopqrst') {
                        return false;
                    }

                    return true;
                } catch (err) {
                    // We don't expect any of the above to throw, but better to be safe.
                    return false;
                }
            }

            module.exports = shouldUseNative() ? Object.assign : function (target, source) {
                var from;
                var to = toObject(target);
                var symbols;

                for (var s = 1; s < arguments.length; s++) {
                    from = Object(arguments[s]);

                    for (var key in from) {
                        if (hasOwnProperty.call(from, key)) {
                            to[key] = from[key];
                        }
                    }

                    if (getOwnPropertySymbols) {
                        symbols = getOwnPropertySymbols(from);
                        for (var i = 0; i < symbols.length; i++) {
                            if (propIsEnumerable.call(from, symbols[i])) {
                                to[symbols[i]] = from[symbols[i]];
                            }
                        }
                    }
                }

                return to;
            };

        }, {}]
    }, {}, [4])(4)
});;
/* @flow */

// The following React methods should not be automatically bound.
var REACT_EXCLUDE_METHODS = {
    getChildContext: true,
    render: true,
    componentWillMount: true,
    componentDidMount: true,
    componentWillReceiveProps: true,
    shouldComponentUpdate: true,
    componentWillUpdate: true,
    componentDidUpdate: true,
    componentWillUnmount: true
};

function autobind_isExcluded(methodName) {
    return (REACT_EXCLUDE_METHODS[methodName] === true);
}

function autobind_isFunction(item) {
    return (typeof item === 'function');
}

function autobind(instance) {

    var proto = Object.getPrototypeOf(instance);

    var propertyNames = Object.getOwnPropertyNames(proto);

    for (var i = 0; i < propertyNames.length; i++) {
        var name = propertyNames[i];
        var value = proto[name];
        if (autobind_isFunction(value) && !autobind_isExcluded(name)) {
            instance[name] = proto[name].bind(instance);
        }
    }
}
;
"use strict";

if (document.kNextReactComponents == null || typeof document.kNextReactComponents === "undefined") {
    document.kNextReactComponents = {};
}

if (Globals.Utilities.isUndefinedOrNull(document.platformComponents)) {
    document.platformComponents = {};
}

if (Globals.Utilities.isUndefinedOrNull(document.taxNewsPlatformComponents)) {
    document.taxNewsPlatformComponents = {};
}

var BulletStyle = {
    NOT_SET: 0,
    Arrow: 1,
    Square: 2,
    Circle: 3,
    None: 4
};

var ButtonStyle = {
    Primary: 0,
    Secondary: 1,
    Utility: 2,
    Disabled: 3,
    Delete: 4,
    Add: 5,
    Search: 6,
    Ellipses: 7,
    Gear: 8,
    Text: 9,
    Tabs: 10,
    Toggle: 11,
    Transparent: 12,
    Info: 13 };

var AlertType = {
    Default: 0,
    Success: 1,
    Error: 2,
    Warning: 3
};

var TableHeaderStyle = {
    Default: 0,
    Light: 1,
    Transparent: 2,
    Dark: 3
};

var ExpandPanelStyle = {
    Arrow: 0,
    PlusMinus: 1
};

var CheckBoxStyle = {
    Primary: 0,
    Secondary: 1,
    Dark: 2
};

var RadioBoxStyle = {
    Primary: 0,
    Secondary: 1,
    Dark: 2
};

var TextInputErrorMessagePosition = {
    Bottom: "bottom",
    Above: "above",
    Left: "left",
    Right: "right"
};

var TablePaginationPosition = {
    Top: "top",
    Bottom: "bottom"
};

var TableCellComponentSpecType = {
    Icon: "Icon",
    Link: "Link",
    StatusBall: "StatusBall"
};

var IconType = {
    Delete: 1,
    Add: 2,
    Minus: 3,
    Sort: 4,
    SortUp: 5,
    SortDown: 6,
    Circle: 7,
    ArrowUp: 8,
    ArrowDown: 9,
    Thumbtack: 10,
    Search: 11,
    Ellipses: 12,
    Footnotes: 13,
    Bullhorn: 14,
    Document: 15,
    Link: 16,
    Books: 17,
    Newspaper: 18,
    Tools: 19,
    Teacher: 20,
    History: 21,
    Toolbox: 22,
    Store: 23,
    PhotoVideo: 24,
    Video: 25,
    Passport: 26,
    Folder: 27,
    Info: 28,
    FileDownload: 29,
    LayerGroup: 30,
    LightbulbOn: 31,
    StarExclamation: 32,
    Swatchbook: 33,
    Building: 34,
    Telescope: 35,
    BuildingMemo: 36,
    MoneyBillTrendUp: 37,
    GlobePointer: 38,
    EarthAmericas: 39,
    HandshakeAngle: 40,
    Globe: 41,
    ListTimeline: 42
};

var TabWidth = {
    SourceTab: 200,
    MoreTab: 200
};

var CharacterLimit = {
    WordsAroundHits: 250,
    TNUOtherSourcesDocTitle: 200,
    BreadcrumbInfo: 80
};

var NumberOfHitsLimit = {
    TNUOtherSourcesHitsLimit: 100,
    KnotiaTabHitsLimit: 1000
};

var SortOrder = {
    None: 0,
    Ascending: 1,
    Descending: 2
};

var DescriptionPosition = {
    BelowLabel: 0,
    BesideLabel: 1
};

var ErrorPosition = {
    BelowElement: 0,
    AboveElement: 1,
    BesideElement: 2
};

var AriaAutoComplete = {
    Inline: "inline",
    List: "list",
    Both: "both",
    None: "none"
};

var PasswordType = {
    UpperAndLowerCaseLetters: 0,
    AlphaNumericCharacters: 1,
    AlphaNumericAndSpecialCharacters: 2
};

var AIAssistantType = {
    ResearchAssistant: 1,
    DocumentAssistant: 2
};

var AriaAutoCompleteList = Globals.Utilities.getObjectValuesAsArray(AriaAutoComplete);;
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("react"), require("react-dom"));
	else if(typeof define === 'function' && define.amd)
		define(["react", "react-dom"], factory);
	else if(typeof exports === 'object')
		exports["ReactBootstrap"] = factory(require("react"), require("react-dom"));
	else
		root["ReactBootstrap"] = factory(root["React"], root["ReactDOM"]);
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_9__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__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;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 91);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_0__;

/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

exports.default = function (instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
};

/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _typeof2 = __webpack_require__(52);

var _typeof3 = _interopRequireDefault(_typeof2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function (self, call) {
  if (!self) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }

  return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
};

/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _setPrototypeOf = __webpack_require__(119);

var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);

var _create = __webpack_require__(123);

var _create2 = _interopRequireDefault(_create);

var _typeof2 = __webpack_require__(52);

var _typeof3 = _interopRequireDefault(_typeof2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function (subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
  }

  subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      enumerable: false,
      writable: true,
      configurable: true
    }
  });
  if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
};

/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _assign = __webpack_require__(66);

var _assign2 = _interopRequireDefault(_assign);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = _assign2.default || 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;
};

/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

exports.default = function (obj, keys) {
  var target = {};

  for (var i in obj) {
    if (keys.indexOf(i) >= 0) continue;
    if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
    target[i] = obj[i];
  }

  return target;
};

/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
/* global define */

(function () {
	'use strict';

	var hasOwn = {}.hasOwnProperty;

	function classNames () {
		var classes = [];

		for (var i = 0; i < arguments.length; i++) {
			var arg = arguments[i];
			if (!arg) continue;

			var argType = typeof arg;

			if (argType === 'string' || argType === 'number') {
				classes.push(arg);
			} else if (Array.isArray(arg)) {
				classes.push(classNames.apply(null, arg));
			} else if (argType === 'object') {
				for (var key in arg) {
					if (hasOwn.call(arg, key) && arg[key]) {
						classes.push(key);
					}
				}
			}
		}

		return classes.join(' ');
	}

	if (typeof module !== 'undefined' && module.exports) {
		module.exports = classNames;
	} else if (true) {
		// register as 'classnames', consistent with npm package name
		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
			return classNames;
		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
	} else {
		window.classNames = classNames;
	}
}());


/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {

/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

if (undefined !== 'production') {
  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
    Symbol.for &&
    Symbol.for('react.element')) ||
    0xeac7;

  var isValidElement = function(object) {
    return typeof object === 'object' &&
      object !== null &&
      object.$$typeof === REACT_ELEMENT_TYPE;
  };

  // By explicitly using `prop-types` you are opting into new development behavior.
  // http://fb.me/prop-types-in-prod
  var throwOnDirectAccess = true;
  module.exports = __webpack_require__(126)(isValidElement, throwOnDirectAccess);
} else {
  // By explicitly using `prop-types` you are opting into new production behavior.
  // http://fb.me/prop-types-in-prod
  module.exports = __webpack_require__(129)();
}


/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _createChainableTypeChecker = __webpack_require__(36);

var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function elementType(props, propName, componentName, location, propFullName) {
  var propValue = props[propName];
  var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);

  if (_react2.default.isValidElement(propValue)) {
    return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');
  }

  if (propType !== 'function' && propType !== 'string') {
    return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');
  }

  return null;
}

exports.default = (0, _createChainableTypeChecker2.default)(elementType);
module.exports = exports['default'];

/***/ }),
/* 9 */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_9__;

/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright 2014-2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */



/**
 * Similar to invariant but only logs a warning if the condition is not met.
 * This can be used to log issues in development environments in critical
 * paths. Removing the logging code for production environments will keep the
 * same logic and follow the same code paths.
 */

var warning = function() {};

if (undefined !== 'production') {
  warning = function(condition, format, args) {
    var len = arguments.length;
    args = new Array(len > 2 ? len - 2 : 0);
    for (var key = 2; key < len; key++) {
      args[key - 2] = arguments[key];
    }
    if (format === undefined) {
      throw new Error(
        '`warning(condition, format, ...args)` requires a warning ' +
        'message argument'
      );
    }

    if (format.length < 10 || (/^[s\W]*$/).test(format)) {
      throw new Error(
        'The warning format should be able to uniquely identify this ' +
        'warning. Please, use a more descriptive format than: ' + format
      );
    }

    if (!condition) {
      var argIndex = 0;
      var message = 'Warning: ' +
        format.replace(/%s/g, function() {
          return args[argIndex++];
        });
      if (typeof console !== 'undefined') {
        console.error(message);
      }
      try {
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        throw new Error(message);
      } catch(x) {}
    }
  };
}

module.exports = warning;


/***/ }),
/* 11 */
/***/ (function(module, exports) {

var core = module.exports = { version: '2.5.3' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef


/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {

var store = __webpack_require__(48)('wks');
var uid = __webpack_require__(34);
var Symbol = __webpack_require__(14).Symbol;
var USE_SYMBOL = typeof Symbol == 'function';

var $exports = module.exports = function (name) {
  return store[name] || (store[name] =
    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};

$exports.store = store;


/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(14);
var core = __webpack_require__(11);
var ctx = __webpack_require__(42);
var hide = __webpack_require__(20);
var PROTOTYPE = 'prototype';

var $export = function (type, name, source) {
  var IS_FORCED = type & $export.F;
  var IS_GLOBAL = type & $export.G;
  var IS_STATIC = type & $export.S;
  var IS_PROTO = type & $export.P;
  var IS_BIND = type & $export.B;
  var IS_WRAP = type & $export.W;
  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  var expProto = exports[PROTOTYPE];
  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
  var key, own, out;
  if (IS_GLOBAL) source = name;
  for (key in source) {
    // contains in native
    own = !IS_FORCED && target && target[key] !== undefined;
    if (own && key in exports) continue;
    // export native or passed
    out = own ? target[key] : source[key];
    // prevent global pollution for namespaces
    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
    // bind timers to global for call from export context
    : IS_BIND && own ? ctx(out, global)
    // wrap global constructors for prevent change them in library
    : IS_WRAP && target[key] == out ? (function (C) {
      var F = function (a, b, c) {
        if (this instanceof C) {
          switch (arguments.length) {
            case 0: return new C();
            case 1: return new C(a);
            case 2: return new C(a, b);
          } return new C(a, b, c);
        } return C.apply(this, arguments);
      };
      F[PROTOTYPE] = C[PROTOTYPE];
      return F;
    // make static versions for prototype methods
    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
    if (IS_PROTO) {
      (exports.virtual || (exports.virtual = {}))[key] = out;
      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
      if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
    }
  }
};
// type bitmap
$export.F = 1;   // forced
$export.G = 2;   // global
$export.S = 4;   // static
$export.P = 8;   // proto
$export.B = 16;  // bind
$export.W = 32;  // wrap
$export.U = 64;  // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;


/***/ }),
/* 14 */
/***/ (function(module, exports) {

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
  ? window : typeof self != 'undefined' && self.Math == Math ? self
  // eslint-disable-next-line no-new-func
  : Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef


/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
module.exports = exports['default'];

/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(21);
var IE8_DOM_DEFINE = __webpack_require__(67);
var toPrimitive = __webpack_require__(43);
var dP = Object.defineProperty;

exports.f = __webpack_require__(23) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return dP(O, P, Attributes);
  } catch (e) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),
/* 17 */
/***/ (function(module, exports) {

var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};


/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {

// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(70);
var defined = __webpack_require__(45);
module.exports = function (it) {
  return IObject(defined(it));
};


/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _createUncontrollable = __webpack_require__(130);

var _createUncontrollable2 = _interopRequireDefault(_createUncontrollable);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var mixin = {
  shouldComponentUpdate: function shouldComponentUpdate() {
    //let the forceUpdate trigger the update
    return !this._notifying;
  }
};

function set(component, propName, handler, value, args) {
  if (handler) {
    component._notifying = true;
    handler.call.apply(handler, [component, value].concat(args));
    component._notifying = false;
  }

  component._values[propName] = value;

  if (!component.unmounted) component.forceUpdate();
}

exports.default = (0, _createUncontrollable2.default)(mixin, set);
module.exports = exports['default'];

/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {

var dP = __webpack_require__(16);
var createDesc = __webpack_require__(29);
module.exports = __webpack_require__(23) ? function (object, key, value) {
  return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(22);
module.exports = function (it) {
  if (!isObject(it)) throw TypeError(it + ' is not an object!');
  return it;
};


/***/ }),
/* 22 */
/***/ (function(module, exports) {

module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};


/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {

// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(28)(function () {
  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(134), __esModule: true };

/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = ownerDocument;
function ownerDocument(node) {
  return node && node.ownerDocument || document;
}
module.exports = exports["default"];

/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _inDOM = __webpack_require__(15);

var _inDOM2 = _interopRequireDefault(_inDOM);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function () {
  // HTML DOM and SVG DOM may have different support levels,
  // so we need to check on context instead of a document root element.
  return _inDOM2.default ? function (context, node) {
    if (context.contains) {
      return context.contains(node);
    } else if (context.compareDocumentPosition) {
      return context === node || !!(context.compareDocumentPosition(node) & 16);
    } else {
      return fallback(context, node);
    }
  } : fallback;
}();

function fallback(context, node) {
  if (node) do {
    if (node === context) return true;
  } while (node = node.parentNode);

  return false;
}
module.exports = exports['default'];

/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

exports.default = function (componentOrElement) {
  return (0, _ownerDocument2.default)(_reactDom2.default.findDOMNode(componentOrElement));
};

var _reactDom = __webpack_require__(9);

var _reactDom2 = _interopRequireDefault(_reactDom);

var _ownerDocument = __webpack_require__(25);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

module.exports = exports['default'];

/***/ }),
/* 28 */
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (e) {
    return true;
  }
};


/***/ }),
/* 29 */
/***/ (function(module, exports) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(69);
var enumBugKeys = __webpack_require__(49);

module.exports = Object.keys || function keys(O) {
  return $keys(O, enumBugKeys);
};


/***/ }),
/* 31 */
/***/ (function(module, exports) {

exports.f = {}.propertyIsEnumerable;


/***/ }),
/* 32 */
/***/ (function(module, exports) {

module.exports = {};


/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = style;

var _camelizeStyle = __webpack_require__(80);

var _camelizeStyle2 = _interopRequireDefault(_camelizeStyle);

var _hyphenateStyle = __webpack_require__(139);

var _hyphenateStyle2 = _interopRequireDefault(_hyphenateStyle);

var _getComputedStyle2 = __webpack_require__(141);

var _getComputedStyle3 = _interopRequireDefault(_getComputedStyle2);

var _removeStyle = __webpack_require__(142);

var _removeStyle2 = _interopRequireDefault(_removeStyle);

var _properties = __webpack_require__(61);

var _isTransform = __webpack_require__(143);

var _isTransform2 = _interopRequireDefault(_isTransform);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function style(node, property, value) {
  var css = '';
  var transforms = '';
  var props = property;

  if (typeof property === 'string') {
    if (value === undefined) {
      return node.style[(0, _camelizeStyle2.default)(property)] || (0, _getComputedStyle3.default)(node).getPropertyValue((0, _hyphenateStyle2.default)(property));
    } else {
      (props = {})[property] = value;
    }
  }

  Object.keys(props).forEach(function (key) {
    var value = props[key];
    if (!value && value !== 0) {
      (0, _removeStyle2.default)(node, (0, _hyphenateStyle2.default)(key));
    } else if ((0, _isTransform2.default)(key)) {
      transforms += key + '(' + value + ') ';
    } else {
      css += (0, _hyphenateStyle2.default)(key) + ': ' + value + ';';
    }
  });

  if (transforms) {
    css += _properties.transform + ': ' + transforms + ';';
  }

  node.style.cssText += ';' + css;
}
module.exports = exports['default'];

/***/ }),
/* 34 */
/***/ (function(module, exports) {

var id = 0;
var px = Math.random();
module.exports = function (key) {
  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};


/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * 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.
 */



/**
 * Use invariant() to assert state which your program assumes to be true.
 *
 * Provide sprintf-style format (only %s is supported) and arguments
 * to provide information about what broke and what you were
 * expecting.
 *
 * The invariant message will be stripped in production, but the invariant
 * will remain to ensure logic does not differ in production.
 */

var invariant = function(condition, format, a, b, c, d, e, f) {
  if (undefined !== '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; // we don't care about invariant's own frame
    throw error;
  }
};

module.exports = invariant;


/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = createChainableTypeChecker;
/**
 * Copyright 2013-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.
 */

// Mostly taken from ReactPropTypes.

function createChainableTypeChecker(validate) {
  function checkType(isRequired, props, propName, componentName, location, propFullName) {
    var componentNameSafe = componentName || '<<anonymous>>';
    var propFullNameSafe = propFullName || propName;

    if (props[propName] == null) {
      if (isRequired) {
        return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));
      }

      return null;
    }

    for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
      args[_key - 6] = arguments[_key];
    }

    return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));
  }

  var chainedCheckType = checkType.bind(null, false);
  chainedCheckType.isRequired = checkType.bind(null, true);

  return chainedCheckType;
}
module.exports = exports['default'];

/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = all;

var _createChainableTypeChecker = __webpack_require__(36);

var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function all() {
  for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {
    validators[_key] = arguments[_key];
  }

  function allPropTypes() {
    for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
      args[_key2] = arguments[_key2];
    }

    var error = null;

    validators.forEach(function (validator) {
      if (error != null) {
        return;
      }

      var result = validator.apply(undefined, args);
      if (result != null) {
        error = result;
      }
    });

    return error;
  }

  return (0, _createChainableTypeChecker2.default)(allPropTypes);
}
module.exports = exports['default'];

/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isRequiredForA11y;
function isRequiredForA11y(validator) {
  return function validate(props, propName, componentName, location, propFullName) {
    var componentNameSafe = componentName || '<<anonymous>>';
    var propFullNameSafe = propFullName || propName;

    if (props[propName] == null) {
      return new Error('The ' + location + ' `' + propFullNameSafe + '` is required to make ' + ('`' + componentNameSafe + '` accessible for users of assistive ') + 'technologies such as screen readers.');
    }

    for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
      args[_key - 5] = arguments[_key];
    }

    return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
  };
}
module.exports = exports['default'];

/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _createChainableTypeChecker = __webpack_require__(36);

var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function validate(props, propName, componentName, location, propFullName) {
  var propValue = props[propName];
  var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);

  if (_react2.default.isValidElement(propValue)) {
    return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.');
  }

  if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) {
    return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.');
  }

  return null;
}

exports.default = (0, _createChainableTypeChecker2.default)(validate);
module.exports = exports['default'];

/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = getWindow;
function getWindow(node) {
  return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false;
}
module.exports = exports["default"];

/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.default = getContainer;

var _reactDom = __webpack_require__(9);

var _reactDom2 = _interopRequireDefault(_reactDom);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function getContainer(container, defaultContainer) {
  container = typeof container === 'function' ? container() : container;
  return _reactDom2.default.findDOMNode(container) || defaultContainer;
}
module.exports = exports['default'];

/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {

// optional / simple context binding
var aFunction = __webpack_require__(94);
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(22);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
  if (!isObject(it)) return it;
  var fn, val;
  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  throw TypeError("Can't convert object to primitive value");
};


/***/ }),
/* 44 */
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};


/***/ }),
/* 45 */
/***/ (function(module, exports) {

// 7.2.1 RequireObjectCoercible(argument)
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on  " + it);
  return it;
};


/***/ }),
/* 46 */
/***/ (function(module, exports) {

// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
module.exports = function (it) {
  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};


/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__(48)('keys');
var uid = __webpack_require__(34);
module.exports = function (key) {
  return shared[key] || (shared[key] = uid(key));
};


/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(14);
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
module.exports = function (key) {
  return store[key] || (store[key] = {});
};


/***/ }),
/* 49 */
/***/ (function(module, exports) {

// IE 8- don't enum bug keys
module.exports = (
  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');


/***/ }),
/* 50 */
/***/ (function(module, exports) {

exports.f = Object.getOwnPropertySymbols;


/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.13 ToObject(argument)
var defined = __webpack_require__(45);
module.exports = function (it) {
  return Object(defined(it));
};


/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _iterator = __webpack_require__(98);

var _iterator2 = _interopRequireDefault(_iterator);

var _symbol = __webpack_require__(109);

var _symbol2 = _interopRequireDefault(_symbol);

var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
  return typeof obj === "undefined" ? "undefined" : _typeof(obj);
} : function (obj) {
  return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
};

/***/ }),
/* 53 */
/***/ (function(module, exports) {

module.exports = true;


/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(21);
var dPs = __webpack_require__(102);
var enumBugKeys = __webpack_require__(49);
var IE_PROTO = __webpack_require__(47)('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE = 'prototype';

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = __webpack_require__(68)('iframe');
  var i = enumBugKeys.length;
  var lt = '<';
  var gt = '>';
  var iframeDocument;
  iframe.style.display = 'none';
  __webpack_require__(103).appendChild(iframe);
  iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  // createDict = iframe.contentWindow.Object;
  // html.removeChild(iframe);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  iframeDocument.close();
  createDict = iframeDocument.F;
  while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  return createDict();
};

module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    Empty[PROTOTYPE] = anObject(O);
    result = new Empty();
    Empty[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = createDict();
  return Properties === undefined ? result : dPs(result, Properties);
};


/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {

var def = __webpack_require__(16).f;
var has = __webpack_require__(17);
var TAG = __webpack_require__(12)('toStringTag');

module.exports = function (it, tag, stat) {
  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};


/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {

exports.f = __webpack_require__(12);


/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(14);
var core = __webpack_require__(11);
var LIBRARY = __webpack_require__(53);
var wksExt = __webpack_require__(56);
var defineProperty = __webpack_require__(16).f;
module.exports = function (name) {
  var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
};


/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * 
 */

function makeEmptyFunction(arg) {
  return function () {
    return arg;
  };
}

/**
 * This function accepts and discards inputs; it has no side effects. This is
 * primarily useful idiomatically for overridable function endpoints which
 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
 */
var emptyFunction = 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;

/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */



/**
 * Use invariant() to assert state which your program assumes to be true.
 *
 * Provide sprintf-style format (only %s is supported) and arguments
 * to provide information about what broke and what you were
 * expecting.
 *
 * The invariant message will be stripped in production, but the invariant
 * will remain to ensure logic does not differ in production.
 */

var validateFormat = function validateFormat(format) {};

if (undefined !== 'production') {
  validateFormat = function validateFormat(format) {
    if (format === undefined) {
      throw new Error('invariant requires an error message argument');
    }
  };
}

function invariant(condition, format, a, b, c, d, e, f) {
  validateFormat(format);

  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; // we don't care about invariant's own frame
    throw error;
  }
}

module.exports = invariant;

/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';

module.exports = ReactPropTypesSecret;


/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.animationEnd = exports.animationDelay = exports.animationTiming = exports.animationDuration = exports.animationName = exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = undefined;

var _inDOM = __webpack_require__(15);

var _inDOM2 = _interopRequireDefault(_inDOM);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var transform = 'transform';
var prefix = void 0,
    transitionEnd = void 0,
    animationEnd = void 0;
var transitionProperty = void 0,
    transitionDuration = void 0,
    transitionTiming = void 0,
    transitionDelay = void 0;
var animationName = void 0,
    animationDuration = void 0,
    animationTiming = void 0,
    animationDelay = void 0;

if (_inDOM2.default) {
  var _getTransitionPropert = getTransitionProperties();

  prefix = _getTransitionPropert.prefix;
  exports.transitionEnd = transitionEnd = _getTransitionPropert.transitionEnd;
  exports.animationEnd = animationEnd = _getTransitionPropert.animationEnd;


  exports.transform = transform = prefix + '-' + transform;
  exports.transitionProperty = transitionProperty = prefix + '-transition-property';
  exports.transitionDuration = transitionDuration = prefix + '-transition-duration';
  exports.transitionDelay = transitionDelay = prefix + '-transition-delay';
  exports.transitionTiming = transitionTiming = prefix + '-transition-timing-function';

  exports.animationName = animationName = prefix + '-animation-name';
  exports.animationDuration = animationDuration = prefix + '-animation-duration';
  exports.animationTiming = animationTiming = prefix + '-animation-delay';
  exports.animationDelay = animationDelay = prefix + '-animation-timing-function';
}

exports.transform = transform;
exports.transitionProperty = transitionProperty;
exports.transitionTiming = transitionTiming;
exports.transitionDelay = transitionDelay;
exports.transitionDuration = transitionDuration;
exports.transitionEnd = transitionEnd;
exports.animationName = animationName;
exports.animationDuration = animationDuration;
exports.animationTiming = animationTiming;
exports.animationDelay = animationDelay;
exports.animationEnd = animationEnd;
exports.default = {
  transform: transform,
  end: transitionEnd,
  property: transitionProperty,
  timing: transitionTiming,
  delay: transitionDelay,
  duration: transitionDuration
};


function getTransitionProperties() {
  var style = document.createElement('div').style;

  var vendorMap = {
    O: function O(e) {
      return 'o' + e.toLowerCase();
    },
    Moz: function Moz(e) {
      return e.toLowerCase();
    },
    Webkit: function Webkit(e) {
      return 'webkit' + e;
    },
    ms: function ms(e) {
      return 'MS' + e;
    }
  };

  var vendors = Object.keys(vendorMap);

  var transitionEnd = void 0,
      animationEnd = void 0;
  var prefix = '';

  for (var i = 0; i < vendors.length; i++) {
    var vendor = vendors[i];

    if (vendor + 'TransitionProperty' in style) {
      prefix = '-' + vendor.toLowerCase();
      transitionEnd = vendorMap[vendor]('TransitionEnd');
      animationEnd = vendorMap[vendor]('AnimationEnd');
      break;
    }
  }

  if (!transitionEnd && 'transitionProperty' in style) transitionEnd = 'transitionend';

  if (!animationEnd && 'animationName' in style) animationEnd = 'animationend';

  style = null;

  return { animationEnd: animationEnd, transitionEnd: transitionEnd, prefix: prefix };
}

/***/ }),
/* 62 */
/***/ (function(module, exports) {

// Source: http://jsfiddle.net/vWx8V/
// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes

/**
 * Conenience method returns corresponding value for given keyName or keyCode.
 *
 * @param {Mixed} keyCode {Number} or keyName {String}
 * @return {Mixed}
 * @api public
 */

exports = module.exports = function(searchInput) {
  // Keyboard Events
  if (searchInput && 'object' === typeof searchInput) {
    var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode
    if (hasKeyCode) searchInput = hasKeyCode
  }

  // Numbers
  if ('number' === typeof searchInput) return names[searchInput]

  // Everything else (cast to string)
  var search = String(searchInput)

  // check codes
  var foundNamedKey = codes[search.toLowerCase()]
  if (foundNamedKey) return foundNamedKey

  // check aliases
  var foundNamedKey = aliases[search.toLowerCase()]
  if (foundNamedKey) return foundNamedKey

  // weird character?
  if (search.length === 1) return search.charCodeAt(0)

  return undefined
}

/**
 * Get by name
 *
 *   exports.code['enter'] // => 13
 */

var codes = exports.code = exports.codes = {
  'backspace': 8,
  'tab': 9,
  'enter': 13,
  'shift': 16,
  'ctrl': 17,
  'alt': 18,
  'pause/break': 19,
  'caps lock': 20,
  'esc': 27,
  'space': 32,
  'page up': 33,
  'page down': 34,
  'end': 35,
  'home': 36,
  'left': 37,
  'up': 38,
  'right': 39,
  'down': 40,
  'insert': 45,
  'delete': 46,
  'command': 91,
  'left command': 91,
  'right command': 93,
  'numpad *': 106,
  'numpad +': 107,
  'numpad -': 109,
  'numpad .': 110,
  'numpad /': 111,
  'num lock': 144,
  'scroll lock': 145,
  'my computer': 182,
  'my calculator': 183,
  ';': 186,
  '=': 187,
  ',': 188,
  '-': 189,
  '.': 190,
  '/': 191,
  '`': 192,
  '[': 219,
  '\\': 220,
  ']': 221,
  "'": 222
}

// Helper aliases

var aliases = exports.aliases = {
  'windows': 91,
  '?': 16,
  '?': 18,
  '?': 17,
  '?': 91,
  'ctl': 17,
  'control': 17,
  'option': 18,
  'pause': 19,
  'break': 19,
  'caps': 20,
  'return': 13,
  'escape': 27,
  'spc': 32,
  'pgup': 33,
  'pgdn': 34,
  'ins': 45,
  'del': 46,
  'cmd': 91
}


/*!
 * Programatically add the following
 */

// lower case chars
for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32

// numbers
for (var i = 48; i < 58; i++) codes[i - 48] = i

// function keys
for (i = 1; i < 13; i++) codes['f'+i] = i + 111

// numpad keys
for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96

/**
 * Get by code
 *
 *   exports.name[13] // => 'Enter'
 */

var names = exports.names = exports.title = {} // title for backward compat

// Create reverse mapping
for (i in codes) names[codes[i]] = i

// Add aliases
for (var alias in aliases) {
  codes[alias] = aliases[alias]
}


/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _inDOM = __webpack_require__(15);

var _inDOM2 = _interopRequireDefault(_inDOM);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var on = function on() {};
if (_inDOM2.default) {
  on = function () {

    if (document.addEventListener) return function (node, eventName, handler, capture) {
      return node.addEventListener(eventName, handler, capture || false);
    };else if (document.attachEvent) return function (node, eventName, handler) {
      return node.attachEvent('on' + eventName, function (e) {
        e = e || window.event;
        e.target = e.target || e.srcElement;
        e.currentTarget = node;
        handler.call(node, e);
      });
    };
  }();
}

exports.default = on;
module.exports = exports['default'];

/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _inDOM = __webpack_require__(15);

var _inDOM2 = _interopRequireDefault(_inDOM);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var off = function off() {};
if (_inDOM2.default) {
  off = function () {
    if (document.addEventListener) return function (node, eventName, handler, capture) {
      return node.removeEventListener(eventName, handler, capture || false);
    };else if (document.attachEvent) return function (node, eventName, handler) {
      return node.detachEvent('on' + eventName, handler);
    };
  }();
}

exports.default = off;
module.exports = exports['default'];

/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _createChainableTypeChecker = __webpack_require__(174);

var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function elementType(props, propName, componentName, location, propFullName) {
  var propValue = props[propName];
  var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);

  if (_react2.default.isValidElement(propValue)) {
    return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');
  }

  if (propType !== 'function' && propType !== 'string') {
    return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');
  }

  return null;
}

exports.default = (0, _createChainableTypeChecker2.default)(elementType);

/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(92), __esModule: true };

/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = !__webpack_require__(23) && !__webpack_require__(28)(function () {
  return Object.defineProperty(__webpack_require__(68)('div'), 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(22);
var document = __webpack_require__(14).document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
  return is ? document.createElement(it) : {};
};


/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(17);
var toIObject = __webpack_require__(18);
var arrayIndexOf = __webpack_require__(96)(false);
var IE_PROTO = __webpack_require__(47)('IE_PROTO');

module.exports = function (object, names) {
  var O = toIObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~arrayIndexOf(result, key) || result.push(key);
  }
  return result;
};


/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {

// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(44);
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  return cof(it) == 'String' ? it.split('') : Object(it);
};


/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.15 ToLength
var toInteger = __webpack_require__(46);
var min = Math.min;
module.exports = function (it) {
  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};


/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $at = __webpack_require__(100)(true);

// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(73)(String, 'String', function (iterated) {
  this._t = String(iterated); // target
  this._i = 0;                // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var index = this._i;
  var point;
  if (index >= O.length) return { value: undefined, done: true };
  point = $at(O, index);
  this._i += point.length;
  return { value: point, done: false };
});


/***/ }),
/* 73 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var LIBRARY = __webpack_require__(53);
var $export = __webpack_require__(13);
var redefine = __webpack_require__(74);
var hide = __webpack_require__(20);
var has = __webpack_require__(17);
var Iterators = __webpack_require__(32);
var $iterCreate = __webpack_require__(101);
var setToStringTag = __webpack_require__(55);
var getPrototypeOf = __webpack_require__(104);
var ITERATOR = __webpack_require__(12)('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
var VALUES = 'values';

var returnThis = function () { return this; };

module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  $iterCreate(Constructor, NAME, next);
  var getMethod = function (kind) {
    if (!BUGGY && kind in proto) return proto[kind];
    switch (kind) {
      case KEYS: return function keys() { return new Constructor(this, kind); };
      case VALUES: return function values() { return new Constructor(this, kind); };
    } return function entries() { return new Constructor(this, kind); };
  };
  var TAG = NAME + ' Iterator';
  var DEF_VALUES = DEFAULT == VALUES;
  var VALUES_BUG = false;
  var proto = Base.prototype;
  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  var $default = (!BUGGY && $native) || getMethod(DEFAULT);
  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  var methods, key, IteratorPrototype;
  // Fix native
  if ($anyNative) {
    IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
    if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
      // Set @@toStringTag to native iterators
      setToStringTag(IteratorPrototype, TAG, true);
      // fix for some old engines
      if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
    }
  }
  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEF_VALUES && $native && $native.name !== VALUES) {
    VALUES_BUG = true;
    $default = function values() { return $native.call(this); };
  }
  // Define iterator
  if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
    hide(proto, ITERATOR, $default);
  }
  // Plug for library
  Iterators[NAME] = $default;
  Iterators[TAG] = returnThis;
  if (DEFAULT) {
    methods = {
      values: DEF_VALUES ? $default : getMethod(VALUES),
      keys: IS_SET ? $default : getMethod(KEYS),
      entries: $entries
    };
    if (FORCED) for (key in methods) {
      if (!(key in proto)) redefine(proto, key, methods[key]);
    } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  }
  return methods;
};


/***/ }),
/* 74 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(20);


/***/ }),
/* 75 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(69);
var hiddenKeys = __webpack_require__(49).concat('length', 'prototype');

exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return $keys(O, hiddenKeys);
};


/***/ }),
/* 76 */
/***/ (function(module, exports, __webpack_require__) {

var pIE = __webpack_require__(31);
var createDesc = __webpack_require__(29);
var toIObject = __webpack_require__(18);
var toPrimitive = __webpack_require__(43);
var has = __webpack_require__(17);
var IE8_DOM_DEFINE = __webpack_require__(67);
var gOPD = Object.getOwnPropertyDescriptor;

exports.f = __webpack_require__(23) ? gOPD : function getOwnPropertyDescriptor(O, P) {
  O = toIObject(O);
  P = toPrimitive(P, true);
  if (IE8_DOM_DEFINE) try {
    return gOPD(O, P);
  } catch (e) { /* empty */ }
  if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};


/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2014-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */



var emptyFunction = __webpack_require__(58);

/**
 * Similar to invariant but only logs a warning if the condition is not met.
 * This can be used to log issues in development environments in critical
 * paths. Removing the logging code for production environments will keep the
 * same logic and follow the same code paths.
 */

var warning = emptyFunction;

if (undefined !== 'production') {
  var printWarning = function printWarning(format) {
    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }

    var argIndex = 0;
    var message = 'Warning: ' + format.replace(/%s/g, function () {
      return args[argIndex++];
    });
    if (typeof console !== 'undefined') {
      console.error(message);
    }
    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      throw new Error(message);
    } catch (x) {}
  };

  warning = function warning(condition, format) {
    if (format === undefined) {
      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
    }

    if (format.indexOf('Failed Composite propType: ') === 0) {
      return; // Ignore CompositeComponent proptype check.
    }

    if (!condition) {
      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
        args[_key2 - 2] = arguments[_key2];
      }

      printWarning.apply(undefined, [format].concat(args));
    }
  };
}

module.exports = warning;

/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(132), __esModule: true };

/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {

var getKeys = __webpack_require__(30);
var toIObject = __webpack_require__(18);
var isEnum = __webpack_require__(31).f;
module.exports = function (isEntries) {
  return function (it) {
    var O = toIObject(it);
    var keys = getKeys(O);
    var length = keys.length;
    var i = 0;
    var result = [];
    var key;
    while (length > i) if (isEnum.call(O, key = keys[i++])) {
      result.push(isEntries ? [key, O[key]] : O[key]);
    } return result;
  };
};


/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = camelizeStyleName;

var _camelize = __webpack_require__(138);

var _camelize2 = _interopRequireDefault(_camelize);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var msPattern = /^-ms-/; /**
                          * Copyright 2014-2015, Facebook, Inc.
                          * All rights reserved.
                          * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js
                          */
function camelizeStyleName(string) {
  return (0, _camelize2.default)(string.replace(msPattern, 'ms-'));
}
module.exports = exports['default'];

/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;

var _propTypes = __webpack_require__(7);

var PropTypes = _interopRequireWildcard(_propTypes);

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _reactDom = __webpack_require__(9);

var _reactDom2 = _interopRequireDefault(_reactDom);

var _PropTypes = __webpack_require__(144);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var UNMOUNTED = exports.UNMOUNTED = 'unmounted';
var EXITED = exports.EXITED = 'exited';
var ENTERING = exports.ENTERING = 'entering';
var ENTERED = exports.ENTERED = 'entered';
var EXITING = exports.EXITING = 'exiting';

/**
 * The Transition component lets you describe a transition from one component
 * state to another _over time_ with a simple declarative API. Most commonly
 * it's used to animate the mounting and unmounting of a component, but can also
 * be used to describe in-place transition states as well.
 *
 * By default the `Transition` component does not alter the behavior of the
 * component it renders, it only tracks "enter" and "exit" states for the components.
 * It's up to you to give meaning and effect to those states. For example we can
 * add styles to a component when it enters or exits:
 *
 * ```jsx
 * import Transition from 'react-transition-group/Transition';
 *
 * const duration = 300;
 *
 * const defaultStyle = {
 *   transition: `opacity ${duration}ms ease-in-out`,
 *   opacity: 0,
 * }
 *
 * const transitionStyles = {
 *   entering: { opacity: 0 },
 *   entered:  { opacity: 1 },
 * };
 *
 * const Fade = ({ in: inProp }) => (
 *   <Transition in={inProp} timeout={duration}>
 *     {(state) => (
 *       <div style={{
 *         ...defaultStyle,
 *         ...transitionStyles[state]
 *       }}>
 *         I'm A fade Transition!
 *       </div>
 *     )}
 *   </Transition>
 * );
 * ```
 *
 * As noted the `Transition` component doesn't _do_ anything by itself to its child component.
 * What it does do is track transition states over time so you can update the
 * component (such as by adding styles or classes) when it changes states.
 *
 * There are 4 main states a Transition can be in:
 *  - `ENTERING`
 *  - `ENTERED`
 *  - `EXITING`
 *  - `EXITED`
 *
 * Transition state is toggled via the `in` prop. When `true` the component begins the
 * "Enter" stage. During this stage, the component will shift from its current transition state,
 * to `'entering'` for the duration of the transition and then to the `'entered'` stage once
 * it's complete. Let's take the following example:
 *
 * ```jsx
 * state= { in: false };
 *
 * toggleEnterState = () => {
 *   this.setState({ in: true });
 * }
 *
 * render() {
 *   return (
 *     <div>
 *       <Transition in={this.state.in} timeout={500} />
 *       <button onClick={this.toggleEnterState}>Click to Enter</button>
 *     </div>
 *   );
 * }
 * ```
 *
 * When the button is clicked the component will shift to the `'entering'` state and
 * stay there for 500ms (the value of `timeout`) when finally switches to `'entered'`.
 *
 * When `in` is `false` the same thing happens except the state moves from `'exiting'` to `'exited'`.
 */

var Transition = function (_React$Component) {
  _inherits(Transition, _React$Component);

  function Transition(props, context) {
    _classCallCheck(this, Transition);

    var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));

    var parentGroup = context.transitionGroup;
    // In the context of a TransitionGroup all enters are really appears
    var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;

    var initialStatus = void 0;
    _this.nextStatus = null;

    if (props.in) {
      if (appear) {
        initialStatus = EXITED;
        _this.nextStatus = ENTERING;
      } else {
        initialStatus = ENTERED;
      }
    } else {
      if (props.unmountOnExit || props.mountOnEnter) {
        initialStatus = UNMOUNTED;
      } else {
        initialStatus = EXITED;
      }
    }

    _this.state = { status: initialStatus };

    _this.nextCallback = null;
    return _this;
  }

  Transition.prototype.getChildContext = function getChildContext() {
    return { transitionGroup: null }; // allows for nested Transitions
  };

  Transition.prototype.componentDidMount = function componentDidMount() {
    this.updateStatus(true);
  };

  Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
    var _ref = this.pendingState || this.state,
        status = _ref.status;

    if (nextProps.in) {
      if (status === UNMOUNTED) {
        this.setState({ status: EXITED });
      }
      if (status !== ENTERING && status !== ENTERED) {
        this.nextStatus = ENTERING;
      }
    } else {
      if (status === ENTERING || status === ENTERED) {
        this.nextStatus = EXITING;
      }
    }
  };

  Transition.prototype.componentDidUpdate = function componentDidUpdate() {
    this.updateStatus();
  };

  Transition.prototype.componentWillUnmount = function componentWillUnmount() {
    this.cancelNextCallback();
  };

  Transition.prototype.getTimeouts = function getTimeouts() {
    var timeout = this.props.timeout;

    var exit = void 0,
        enter = void 0,
        appear = void 0;

    exit = enter = appear = timeout;

    if (timeout != null && typeof timeout !== 'number') {
      exit = timeout.exit;
      enter = timeout.enter;
      appear = timeout.appear;
    }
    return { exit: exit, enter: enter, appear: appear };
  };

  Transition.prototype.updateStatus = function updateStatus() {
    var mounting = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

    var nextStatus = this.nextStatus;

    if (nextStatus !== null) {
      this.nextStatus = null;
      // nextStatus will always be ENTERING or EXITING.
      this.cancelNextCallback();
      var node = _reactDom2.default.findDOMNode(this);

      if (nextStatus === ENTERING) {
        this.performEnter(node, mounting);
      } else {
        this.performExit(node);
      }
    } else if (this.props.unmountOnExit && this.state.status === EXITED) {
      this.setState({ status: UNMOUNTED });
    }
  };

  Transition.prototype.performEnter = function performEnter(node, mounting) {
    var _this2 = this;

    var enter = this.props.enter;

    var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;

    var timeouts = this.getTimeouts();

    // no enter animation skip right to ENTERED
    // if we are mounting and running this it means appear _must_ be set
    if (!mounting && !enter) {
      this.safeSetState({ status: ENTERED }, function () {
        _this2.props.onEntered(node);
      });
      return;
    }

    this.props.onEnter(node, appearing);

    this.safeSetState({ status: ENTERING }, function () {
      _this2.props.onEntering(node, appearing);

      // FIXME: appear timeout?
      _this2.onTransitionEnd(node, timeouts.enter, function () {
        _this2.safeSetState({ status: ENTERED }, function () {
          _this2.props.onEntered(node, appearing);
        });
      });
    });
  };

  Transition.prototype.performExit = function performExit(node) {
    var _this3 = this;

    var exit = this.props.exit;

    var timeouts = this.getTimeouts();

    // no exit animation skip right to EXITED
    if (!exit) {
      this.safeSetState({ status: EXITED }, function () {
        _this3.props.onExited(node);
      });
      return;
    }
    this.props.onExit(node);

    this.safeSetState({ status: EXITING }, function () {
      _this3.props.onExiting(node);

      _this3.onTransitionEnd(node, timeouts.exit, function () {
        _this3.safeSetState({ status: EXITED }, function () {
          _this3.props.onExited(node);
        });
      });
    });
  };

  Transition.prototype.cancelNextCallback = function cancelNextCallback() {
    if (this.nextCallback !== null) {
      this.nextCallback.cancel();
      this.nextCallback = null;
    }
  };

  Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
    var _this4 = this;

    // We need to track pending updates for instances where a cWRP fires quickly
    // after cDM and before the state flushes, which would double trigger a
    // transition
    this.pendingState = nextState;

    // This shouldn't be necessary, but there are weird race conditions with
    // setState callbacks and unmounting in testing, so always make sure that
    // we can cancel any pending setState callbacks after we unmount.
    callback = this.setNextCallback(callback);
    this.setState(nextState, function () {
      _this4.pendingState = null;
      callback();
    });
  };

  Transition.prototype.setNextCallback = function setNextCallback(callback) {
    var _this5 = this;

    var active = true;

    this.nextCallback = function (event) {
      if (active) {
        active = false;
        _this5.nextCallback = null;

        callback(event);
      }
    };

    this.nextCallback.cancel = function () {
      active = false;
    };

    return this.nextCallback;
  };

  Transition.prototype.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {
    this.setNextCallback(handler);

    if (node) {
      if (this.props.addEndListener) {
        this.props.addEndListener(node, this.nextCallback);
      }
      if (timeout != null) {
        setTimeout(this.nextCallback, timeout);
      }
    } else {
      setTimeout(this.nextCallback, 0);
    }
  };

  Transition.prototype.render = function render() {
    var status = this.state.status;
    if (status === UNMOUNTED) {
      return null;
    }

    var _props = this.props,
        children = _props.children,
        childProps = _objectWithoutProperties(_props, ['children']);
    // filter props for Transtition


    delete childProps.in;
    delete childProps.mountOnEnter;
    delete childProps.unmountOnExit;
    delete childProps.appear;
    delete childProps.enter;
    delete childProps.exit;
    delete childProps.timeout;
    delete childProps.addEndListener;
    delete childProps.onEnter;
    delete childProps.onEntering;
    delete childProps.onEntered;
    delete childProps.onExit;
    delete childProps.onExiting;
    delete childProps.onExited;

    if (typeof children === 'function') {
      return children(status, childProps);
    }

    var child = _react2.default.Children.only(children);
    return _react2.default.cloneElement(child, childProps);
  };

  return Transition;
}(_react2.default.Component);

Transition.contextTypes = {
  transitionGroup: PropTypes.object
};
Transition.childContextTypes = {
  transitionGroup: function transitionGroup() {}
};


Transition.propTypes = undefined !== "production" ? {
  /**
   * A `function` child can be used instead of a React element.
   * This function is called with the current transition status
   * ('entering', 'entered', 'exiting', 'exited', 'unmounted'), which can used
   * to apply context specific props to a component.
   *
   * ```jsx
   * <Transition timeout={150}>
   *   {(status) => (
   *     <MyComponent className={`fade fade-${status}`} />
   *   )}
   * </Transition>
   * ```
   */
  children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,

  /**
   * Show the component; triggers the enter or exit states
   */
  in: PropTypes.bool,

  /**
   * By default the child component is mounted immediately along with
   * the parent `Transition` component. If you want to "lazy mount" the component on the
   * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
   * mounted, even on "exited", unless you also specify `unmountOnExit`.
   */
  mountOnEnter: PropTypes.bool,

  /**
   * By default the child component stays mounted after it reaches the `'exited'` state.
   * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
   */
  unmountOnExit: PropTypes.bool,

  /**
   * Normally a component is not transitioned if it is shown when the `<Transition>` component mounts.
   * If you want to transition on the first mount set `appear` to `true`, and the
   * component will transition in as soon as the `<Transition>` mounts.
   *
   * > Note: there are no specific "appear" states. `appear` only adds an additional `enter` transition.
   */
  appear: PropTypes.bool,

  /**
   * Enable or disable enter transitions.
   */
  enter: PropTypes.bool,

  /**
   * Enable or disable exit transitions.
   */
  exit: PropTypes.bool,

  /**
   * The duration of the transition, in milliseconds.
   * Required unless `addEventListener` is provided
   *
   * You may specify a single timeout for all transitions like: `timeout={500}`,
   * or individually like:
   *
   * ```jsx
   * timeout={{
   *  enter: 300,
   *  exit: 500,
   * }}
   * ```
   *
   * @type {number | { enter?: number, exit?: number }}
   */
  timeout: function timeout(props) {
    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }

    var pt = _PropTypes.timeoutsShape;
    if (!props.addEndListener) pt = pt.isRequired;
    return pt.apply(undefined, [props].concat(args));
  },

  /**
   * Add a custom transition end trigger. Called with the transitioning
   * DOM node and a `done` callback. Allows for more fine grained transition end
   * logic. **Note:** Timeouts are still used as a fallback if provided.
   *
   * ```jsx
   * addEndListener={(node, done) => {
   *   // use the css transitionend event to mark the finish of a transition
   *   node.addEventListener('transitionend', done, false);
   * }}
   * ```
   */
  addEndListener: PropTypes.func,

  /**
   * Callback fired before the "entering" status is applied. An extra parameter
   * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
   *
   * @type Function(node: HtmlElement, isAppearing: bool) -> void
   */
  onEnter: PropTypes.func,

  /**
   * Callback fired after the "entering" status is applied. An extra parameter
   * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
   *
   * @type Function(node: HtmlElement, isAppearing: bool)
   */
  onEntering: PropTypes.func,

  /**
   * Callback fired after the "entered" status is applied. An extra parameter
   * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
   *
   * @type Function(node: HtmlElement, isAppearing: bool) -> void
   */
  onEntered: PropTypes.func,

  /**
   * Callback fired before the "exiting" status is applied.
   *
   * @type Function(node: HtmlElement) -> void
   */
  onExit: PropTypes.func,

  /**
   * Callback fired after the "exiting" status is applied.
   *
   * @type Function(node: HtmlElement) -> void
   */
  onExiting: PropTypes.func,

  /**
   * Callback fired after the "exited" status is applied.
   *
   * @type Function(node: HtmlElement) -> void
   */
  onExited: PropTypes.func
} : {};

// Name the function so it is clearer in the documentation
function noop() {}

Transition.defaultProps = {
  in: false,
  mountOnEnter: false,
  unmountOnExit: false,
  appear: false,
  enter: true,
  exit: true,

  onEnter: noop,
  onEntering: noop,
  onEntered: noop,

  onExit: noop,
  onExiting: noop,
  onExited: noop
};

Transition.UNMOUNTED = 0;
Transition.EXITED = 1;
Transition.ENTERING = 2;
Transition.ENTERED = 3;
Transition.EXITING = 4;

exports.default = Transition;

/***/ }),
/* 82 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = activeElement;

var _ownerDocument = __webpack_require__(25);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function activeElement() {
  var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _ownerDocument2.default)();

  try {
    return doc.activeElement;
  } catch (e) {/* ie throws if no active element */}
}
module.exports = exports['default'];

/***/ }),
/* 83 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _contains = __webpack_require__(26);

var _contains2 = _interopRequireDefault(_contains);

var _propTypes = __webpack_require__(7);

var _propTypes2 = _interopRequireDefault(_propTypes);

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _reactDom = __webpack_require__(9);

var _reactDom2 = _interopRequireDefault(_reactDom);

var _addEventListener = __webpack_require__(84);

var _addEventListener2 = _interopRequireDefault(_addEventListener);

var _ownerDocument = __webpack_require__(27);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var escapeKeyCode = 27;

function isLeftClickEvent(event) {
  return event.button === 0;
}

function isModifiedEvent(event) {
  return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}

/**
 * The `<RootCloseWrapper/>` component registers your callback on the document
 * when rendered. Powers the `<Overlay/>` component. This is used achieve modal
 * style behavior where your callback is triggered when the user tries to
 * interact with the rest of the document or hits the `esc` key.
 */

var RootCloseWrapper = function (_React$Component) {
  _inherits(RootCloseWrapper, _React$Component);

  function RootCloseWrapper(props, context) {
    _classCallCheck(this, RootCloseWrapper);

    var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));

    _this.addEventListeners = function () {
      var event = _this.props.event;

      var doc = (0, _ownerDocument2.default)(_this);

      // Use capture for this listener so it fires before React's listener, to
      // avoid false positives in the contains() check below if the target DOM
      // element is removed in the React mouse callback.
      _this.documentMouseCaptureListener = (0, _addEventListener2.default)(doc, event, _this.handleMouseCapture, true);

      _this.documentMouseListener = (0, _addEventListener2.default)(doc, event, _this.handleMouse);

      _this.documentKeyupListener = (0, _addEventListener2.default)(doc, 'keyup', _this.handleKeyUp);
    };

    _this.removeEventListeners = function () {
      if (_this.documentMouseCaptureListener) {
        _this.documentMouseCaptureListener.remove();
      }

      if (_this.documentMouseListener) {
        _this.documentMouseListener.remove();
      }

      if (_this.documentKeyupListener) {
        _this.documentKeyupListener.remove();
      }
    };

    _this.handleMouseCapture = function (e) {
      _this.preventMouseRootClose = isModifiedEvent(e) || !isLeftClickEvent(e) || (0, _contains2.default)(_reactDom2.default.findDOMNode(_this), e.target);
    };

    _this.handleMouse = function (e) {
      if (!_this.preventMouseRootClose && _this.props.onRootClose) {
        _this.props.onRootClose(e);
      }
    };

    _this.handleKeyUp = function (e) {
      if (e.keyCode === escapeKeyCode && _this.props.onRootClose) {
        _this.props.onRootClose(e);
      }
    };

    _this.preventMouseRootClose = false;
    return _this;
  }

  RootCloseWrapper.prototype.componentDidMount = function componentDidMount() {
    if (!this.props.disabled) {
      this.addEventListeners();
    }
  };

  RootCloseWrapper.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
    if (!this.props.disabled && prevProps.disabled) {
      this.addEventListeners();
    } else if (this.props.disabled && !prevProps.disabled) {
      this.removeEventListeners();
    }
  };

  RootCloseWrapper.prototype.componentWillUnmount = function componentWillUnmount() {
    if (!this.props.disabled) {
      this.removeEventListeners();
    }
  };

  RootCloseWrapper.prototype.render = function render() {
    return this.props.children;
  };

  return RootCloseWrapper;
}(_react2.default.Component);

RootCloseWrapper.displayName = 'RootCloseWrapper';

RootCloseWrapper.propTypes = {
  /**
   * Callback fired after click or mousedown. Also triggers when user hits `esc`.
   */
  onRootClose: _propTypes2.default.func,
  /**
   * Children to render.
   */
  children: _propTypes2.default.element,
  /**
   * Disable the the RootCloseWrapper, preventing it from triggering `onRootClose`.
   */
  disabled: _propTypes2.default.bool,
  /**
   * Choose which document mouse event to bind to.
   */
  event: _propTypes2.default.oneOf(['click', 'mousedown'])
};

RootCloseWrapper.defaultProps = {
  event: 'click'
};

exports.default = RootCloseWrapper;
module.exports = exports['default'];

/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

exports.default = function (node, event, handler, capture) {
  (0, _on2.default)(node, event, handler, capture);

  return {
    remove: function remove() {
      (0, _off2.default)(node, event, handler, capture);
    }
  };
};

var _on = __webpack_require__(63);

var _on2 = _interopRequireDefault(_on);

var _off = __webpack_require__(64);

var _off2 = _interopRequireDefault(_off);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

module.exports = exports['default'];

/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

exports.default = function (recalc) {
  if (!size && size !== 0 || recalc) {
    if (_inDOM2.default) {
      var scrollDiv = document.createElement('div');

      scrollDiv.style.position = 'absolute';
      scrollDiv.style.top = '-9999px';
      scrollDiv.style.width = '50px';
      scrollDiv.style.height = '50px';
      scrollDiv.style.overflow = 'scroll';

      document.body.appendChild(scrollDiv);
      size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
      document.body.removeChild(scrollDiv);
    }
  }

  return size;
};

var _inDOM = __webpack_require__(15);

var _inDOM2 = _interopRequireDefault(_inDOM);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var size = void 0;

module.exports = exports['default'];

/***/ }),
/* 86 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = hasClass;
function hasClass(element, className) {
  if (element.classList) return !!className && element.classList.contains(className);else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
}
module.exports = exports["default"];

/***/ }),
/* 87 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.default = isOverflowing;

var _isWindow = __webpack_require__(40);

var _isWindow2 = _interopRequireDefault(_isWindow);

var _ownerDocument = __webpack_require__(25);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function isBody(node) {
  return node && node.tagName.toLowerCase() === 'body';
}

function bodyIsOverflowing(node) {
  var doc = (0, _ownerDocument2.default)(node);
  var win = (0, _isWindow2.default)(doc);
  var fullWidth = win.innerWidth;

  // Support: ie8, no innerWidth
  if (!fullWidth) {
    var documentElementRect = doc.documentElement.getBoundingClientRect();
    fullWidth = documentElementRect.right - Math.abs(documentElementRect.left);
  }

  return doc.body.clientWidth < fullWidth;
}

function isOverflowing(container) {
  var win = (0, _isWindow2.default)(container);

  return win || isBody(container) ? bodyIsOverflowing(container) : container.scrollHeight > container.clientHeight;
}
module.exports = exports['default'];

/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _propTypes = __webpack_require__(7);

var _propTypes2 = _interopRequireDefault(_propTypes);

var _componentOrElement = __webpack_require__(39);

var _componentOrElement2 = _interopRequireDefault(_componentOrElement);

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _reactDom = __webpack_require__(9);

var _reactDom2 = _interopRequireDefault(_reactDom);

var _getContainer = __webpack_require__(41);

var _getContainer2 = _interopRequireDefault(_getContainer);

var _ownerDocument = __webpack_require__(27);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

var _LegacyPortal = __webpack_require__(165);

var _LegacyPortal2 = _interopRequireDefault(_LegacyPortal);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

/**
 * The `<Portal/>` component renders its children into a new "subtree" outside of current component hierarchy.
 * You can think of it as a declarative `appendChild()`, or jQuery's `$.fn.appendTo()`.
 * The children of `<Portal/>` component will be appended to the `container` specified.
 */
var Portal = function (_React$Component) {
  _inherits(Portal, _React$Component);

  function Portal() {
    var _temp, _this, _ret;

    _classCallCheck(this, Portal);

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.setContainer = function () {
      var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props;

      _this._portalContainerNode = (0, _getContainer2.default)(props.container, (0, _ownerDocument2.default)(_this).body);
    }, _this.getMountNode = function () {
      return _this._portalContainerNode;
    }, _temp), _possibleConstructorReturn(_this, _ret);
  }

  Portal.prototype.componentDidMount = function componentDidMount() {
    this.setContainer();
    this.forceUpdate(this.props.onRendered);
  };

  Portal.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
    if (nextProps.container !== this.props.container) {
      this.setContainer(nextProps);
    }
  };

  Portal.prototype.componentWillUnmount = function componentWillUnmount() {
    this._portalContainerNode = null;
  };

  Portal.prototype.render = function render() {
    return this.props.children && this._portalContainerNode ? _reactDom2.default.createPortal(this.props.children, this._portalContainerNode) : null;
  };

  return Portal;
}(_react2.default.Component);

Portal.displayName = 'Portal';
Portal.propTypes = {
  /**
   * A Node, Component instance, or function that returns either. The `container` will have the Portal children
   * appended to it.
   */
  container: _propTypes2.default.oneOfType([_componentOrElement2.default, _propTypes2.default.func]),

  onRendered: _propTypes2.default.func
};
exports.default = _reactDom2.default.createPortal ? Portal : _LegacyPortal2.default;
module.exports = exports['default'];

/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = offset;

var _contains = __webpack_require__(26);

var _contains2 = _interopRequireDefault(_contains);

var _isWindow = __webpack_require__(40);

var _isWindow2 = _interopRequireDefault(_isWindow);

var _ownerDocument = __webpack_require__(25);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function offset(node) {
  var doc = (0, _ownerDocument2.default)(node),
      win = (0, _isWindow2.default)(doc),
      docElem = doc && doc.documentElement,
      box = { top: 0, left: 0, height: 0, width: 0 };

  if (!doc) return;

  // Make sure it's not a disconnected DOM node
  if (!(0, _contains2.default)(docElem, node)) return box;

  if (node.getBoundingClientRect !== undefined) box = node.getBoundingClientRect();

  // IE8 getBoundingClientRect doesn't support width & height
  box = {
    top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),
    left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0),
    width: (box.width == null ? node.offsetWidth : box.width) || 0,
    height: (box.height == null ? node.offsetHeight : box.height) || 0
  };

  return box;
}
module.exports = exports['default'];

/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = scrollTop;

var _isWindow = __webpack_require__(40);

var _isWindow2 = _interopRequireDefault(_isWindow);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function scrollTop(node, val) {
  var win = (0, _isWindow2.default)(node);

  if (val === undefined) return win ? 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop : node.scrollTop;

  if (win) win.scrollTo('pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft, val);else node.scrollTop = val;
}
module.exports = exports['default'];

/***/ }),
/* 91 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
var bootstrapUtils_namespaceObject = {};
__webpack_require__.d(bootstrapUtils_namespaceObject, "prefix", function() { return prefix; });
__webpack_require__.d(bootstrapUtils_namespaceObject, "bsClass", function() { return bootstrapUtils_bsClass; });
__webpack_require__.d(bootstrapUtils_namespaceObject, "bsStyles", function() { return bsStyles; });
__webpack_require__.d(bootstrapUtils_namespaceObject, "bsSizes", function() { return bsSizes; });
__webpack_require__.d(bootstrapUtils_namespaceObject, "getClassSet", function() { return getClassSet; });
__webpack_require__.d(bootstrapUtils_namespaceObject, "splitBsProps", function() { return splitBsProps; });
__webpack_require__.d(bootstrapUtils_namespaceObject, "splitBsPropsAndOmit", function() { return splitBsPropsAndOmit; });
__webpack_require__.d(bootstrapUtils_namespaceObject, "addStyle", function() { return addStyle; });
__webpack_require__.d(bootstrapUtils_namespaceObject, "_curry", function() { return _curry; });
var utils_namespaceObject = {};
__webpack_require__.d(utils_namespaceObject, "bootstrapUtils", function() { return bootstrapUtils_namespaceObject; });
__webpack_require__.d(utils_namespaceObject, "createChainedFunction", function() { return utils_createChainedFunction; });
__webpack_require__.d(utils_namespaceObject, "ValidComponentChildren", function() { return ValidComponentChildren; });

// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js
var helpers_extends = __webpack_require__(4);
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);

// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js
var classCallCheck = __webpack_require__(1);
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);

// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js
var possibleConstructorReturn = __webpack_require__(2);
var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn);

// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/inherits.js
var inherits = __webpack_require__(3);
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);

// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
var external___root___React___commonjs2___react___commonjs___react___amd___react__ = __webpack_require__(0);
var external___root___React___commonjs2___react___commonjs___react___amd___react___default = /*#__PURE__*/__webpack_require__.n(external___root___React___commonjs2___react___commonjs___react___amd___react__);

// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(5);
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);

// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(6);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);

// EXTERNAL MODULE: ./node_modules/prop-types/index.js
var prop_types = __webpack_require__(7);
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);

// EXTERNAL MODULE: ./node_modules/uncontrollable/index.js
var uncontrollable = __webpack_require__(19);
var uncontrollable_default = /*#__PURE__*/__webpack_require__.n(uncontrollable);

// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/entries.js
var entries = __webpack_require__(78);
var entries_default = /*#__PURE__*/__webpack_require__.n(entries);

// EXTERNAL MODULE: ./node_modules/invariant/browser.js
var browser = __webpack_require__(35);
var browser_default = /*#__PURE__*/__webpack_require__.n(browser);

// CONCATENATED MODULE: ./src/utils/StyleConfig.js
var Size = {
  LARGE: 'large',
  SMALL: 'small',
  XSMALL: 'xsmall'
};

var SIZE_MAP = {
  large: 'lg',
  medium: 'md',
  small: 'sm',
  xsmall: 'xs',
  lg: 'lg',
  md: 'md',
  sm: 'sm',
  xs: 'xs'
};

var DEVICE_SIZES = ['lg', 'md', 'sm', 'xs'];

var State = {
  SUCCESS: 'success',
  WARNING: 'warning',
  DANGER: 'danger',
  INFO: 'info'
};

var Style = {
  DEFAULT: 'default',
  PRIMARY: 'primary',
  LINK: 'link',
  INVERSE: 'inverse'
};
// CONCATENATED MODULE: ./src/utils/bootstrapUtils.js


// TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.






function curry(fn) {
  return function () {
    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    var last = args[args.length - 1];
    if (typeof last === 'function') {
      return fn.apply(undefined, args);
    }
    return function (Component) {
      return fn.apply(undefined, args.concat([Component]));
    };
  };
}

function prefix(props, variant) {
  var bsClass = (props.bsClass || '').trim();
  !(bsClass != null) ? undefined !== 'production' ? browser_default()(false, 'A `bsClass` prop is required for this component') : browser_default()(false) : void 0;
  return bsClass + (variant ? '-' + variant : '');
}

var bootstrapUtils_bsClass = curry(function (defaultClass, Component) {
  var propTypes = Component.propTypes || (Component.propTypes = {});
  var defaultProps = Component.defaultProps || (Component.defaultProps = {});

  propTypes.bsClass = prop_types_default.a.string;
  defaultProps.bsClass = defaultClass;

  return Component;
});

var bsStyles = curry(function (styles, defaultStyle, Component) {
  if (typeof defaultStyle !== 'string') {
    Component = defaultStyle;
    defaultStyle = undefined;
  }

  var existing = Component.STYLES || [];
  var propTypes = Component.propTypes || {};

  styles.forEach(function (style) {
    if (existing.indexOf(style) === -1) {
      existing.push(style);
    }
  });

  var propType = prop_types_default.a.oneOf(existing);

  // expose the values on the propType function for documentation
  Component.STYLES = existing;
  propType._values = existing;

  Component.propTypes = extends_default()({}, propTypes, {
    bsStyle: propType
  });

  if (defaultStyle !== undefined) {
    var defaultProps = Component.defaultProps || (Component.defaultProps = {});
    defaultProps.bsStyle = defaultStyle;
  }

  return Component;
});

var bsSizes = curry(function (sizes, defaultSize, Component) {
  if (typeof defaultSize !== 'string') {
    Component = defaultSize;
    defaultSize = undefined;
  }

  var existing = Component.SIZES || [];
  var propTypes = Component.propTypes || {};

  sizes.forEach(function (size) {
    if (existing.indexOf(size) === -1) {
      existing.push(size);
    }
  });

  var values = [];
  existing.forEach(function (size) {
    var mappedSize = SIZE_MAP[size];
    if (mappedSize && mappedSize !== size) {
      values.push(mappedSize);
    }

    values.push(size);
  });

  var propType = prop_types_default.a.oneOf(values);
  propType._values = values;

  // expose the values on the propType function for documentation
  Component.SIZES = existing;

  Component.propTypes = extends_default()({}, propTypes, {
    bsSize: propType
  });

  if (defaultSize !== undefined) {
    if (!Component.defaultProps) {
      Component.defaultProps = {};
    }
    Component.defaultProps.bsSize = defaultSize;
  }

  return Component;
});

function getClassSet(props) {
  var _classes;

  var classes = (_classes = {}, _classes[prefix(props)] = true, _classes);

  if (props.bsSize) {
    var bsSize = SIZE_MAP[props.bsSize] || props.bsSize;
    classes[prefix(props, bsSize)] = true;
  }

  if (props.bsStyle) {
    classes[prefix(props, props.bsStyle)] = true;
  }

  return classes;
}

function getBsProps(props) {
  return {
    bsClass: props.bsClass,
    bsSize: props.bsSize,
    bsStyle: props.bsStyle,
    bsRole: props.bsRole
  };
}

function isBsProp(propName) {
  return propName === 'bsClass' || propName === 'bsSize' || propName === 'bsStyle' || propName === 'bsRole';
}

function splitBsProps(props) {
  var elementProps = {};
  entries_default()(props).forEach(function (_ref) {
    var propName = _ref[0],
        propValue = _ref[1];

    if (!isBsProp(propName)) {
      elementProps[propName] = propValue;
    }
  });

  return [getBsProps(props), elementProps];
}

function splitBsPropsAndOmit(props, omittedPropNames) {
  var isOmittedProp = {};
  omittedPropNames.forEach(function (propName) {
    isOmittedProp[propName] = true;
  });

  var elementProps = {};
  entries_default()(props).forEach(function (_ref2) {
    var propName = _ref2[0],
        propValue = _ref2[1];

    if (!isBsProp(propName) && !isOmittedProp[propName]) {
      elementProps[propName] = propValue;
    }
  });

  return [getBsProps(props), elementProps];
}

/**
 * Add a style variant to a Component. Mutates the propTypes of the component
 * in order to validate the new variant.
 */
function addStyle(Component) {
  for (var _len2 = arguments.length, styleVariant = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
    styleVariant[_key2 - 1] = arguments[_key2];
  }

  bsStyles(styleVariant, Component);
}

var _curry = curry;
// CONCATENATED MODULE: ./src/utils/ValidComponentChildren.js
// TODO: This module should be ElementChildren, and should use named exports.



/**
 * Iterates through children that are typically specified as `props.children`,
 * but only maps over children that are "valid components".
 *
 * The mapFunction provided index will be normalised to the components mapped,
 * so an invalid component would not increase the index.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} func.
 * @param {*} context Context for func.
 * @return {object} Object containing the ordered map of results.
 */
function map(children, func, context) {
  var index = 0;

  return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.map(children, function (child) {
    if (!external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(child)) {
      return child;
    }

    return func.call(context, child, index++);
  });
}

/**
 * Iterates through children that are "valid components".
 *
 * The provided forEachFunc(child, index) will be called for each
 * leaf child with the index reflecting the position relative to "valid components".
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} func.
 * @param {*} context Context for context.
 */
function forEach(children, func, context) {
  var index = 0;

  external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.forEach(children, function (child) {
    if (!external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(child)) {
      return;
    }

    func.call(context, child, index++);
  });
}

/**
 * Count the number of "valid components" in the Children container.
 *
 * @param {?*} children Children tree container.
 * @returns {number}
 */
function ValidComponentChildren_count(children) {
  var result = 0;

  external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.forEach(children, function (child) {
    if (!external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(child)) {
      return;
    }

    ++result;
  });

  return result;
}

/**
 * Finds children that are typically specified as `props.children`,
 * but only iterates over children that are "valid components".
 *
 * The provided forEachFunc(child, index) will be called for each
 * leaf child with the index reflecting the position relative to "valid components".
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} func.
 * @param {*} context Context for func.
 * @returns {array} of children that meet the func return statement
 */
function filter(children, func, context) {
  var index = 0;
  var result = [];

  external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.forEach(children, function (child) {
    if (!external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(child)) {
      return;
    }

    if (func.call(context, child, index++)) {
      result.push(child);
    }
  });

  return result;
}

function find(children, func, context) {
  var index = 0;
  var result = void 0;

  external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.forEach(children, function (child) {
    if (result) {
      return;
    }
    if (!external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(child)) {
      return;
    }

    if (func.call(context, child, index++)) {
      result = child;
    }
  });

  return result;
}

function every(children, func, context) {
  var index = 0;
  var result = true;

  external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.forEach(children, function (child) {
    if (!result) {
      return;
    }
    if (!external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(child)) {
      return;
    }

    if (!func.call(context, child, index++)) {
      result = false;
    }
  });

  return result;
}

function some(children, func, context) {
  var index = 0;
  var result = false;

  external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.forEach(children, function (child) {
    if (result) {
      return;
    }
    if (!external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(child)) {
      return;
    }

    if (func.call(context, child, index++)) {
      result = true;
    }
  });

  return result;
}

function toArray(children) {
  var result = [];

  external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.forEach(children, function (child) {
    if (!external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(child)) {
      return;
    }

    result.push(child);
  });

  return result;
}

/* harmony default export */ var ValidComponentChildren = ({
  map: map,
  forEach: forEach,
  count: ValidComponentChildren_count,
  find: find,
  filter: filter,
  every: every,
  some: some,
  toArray: toArray
});
// EXTERNAL MODULE: ./node_modules/prop-types-extra/lib/utils/createChainableTypeChecker.js
var createChainableTypeChecker = __webpack_require__(36);
var createChainableTypeChecker_default = /*#__PURE__*/__webpack_require__.n(createChainableTypeChecker);

// CONCATENATED MODULE: ./src/utils/PropTypes.js





var idPropType = prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]);

function generatedId(name) {
  return function (props) {
    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }

    var error = null;

    if (!props.generateChildId) {
      error = idPropType.apply(undefined, [props].concat(args));

      if (!error && !props.id) {
        error = new Error('In order to properly initialize the ' + name + ' in a way that is accessible to assistive technologies ' + ('(such as screen readers) an `id` or a `generateChildId` prop to ' + name + ' is required'));
      }
    }
    return error;
  };
}

function requiredRoles() {
  for (var _len2 = arguments.length, roles = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
    roles[_key2] = arguments[_key2];
  }

  return createChainableTypeChecker_default()(function (props, propName, component) {
    var missing = void 0;

    roles.every(function (role) {
      if (!ValidComponentChildren.some(props.children, function (child) {
        return child.props.bsRole === role;
      })) {
        missing = role;
        return false;
      }

      return true;
    });

    if (missing) {
      return new Error('(children) ' + component + ' - Missing a required child with bsRole: ' + (missing + '. ' + component + ' must have at least one child of each of ') + ('the following bsRoles: ' + roles.join(', ')));
    }

    return null;
  });
}

function exclusiveRoles() {
  for (var _len3 = arguments.length, roles = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
    roles[_key3] = arguments[_key3];
  }

  return createChainableTypeChecker_default()(function (props, propName, component) {
    var duplicate = void 0;

    roles.every(function (role) {
      var childrenWithRole = ValidComponentChildren.filter(props.children, function (child) {
        return child.props.bsRole === role;
      });

      if (childrenWithRole.length > 1) {
        duplicate = role;
        return false;
      }

      return true;
    });

    if (duplicate) {
      return new Error('(children) ' + component + ' - Duplicate children detected of bsRole: ' + (duplicate + '. Only one child each allowed with the following ') + ('bsRoles: ' + roles.join(', ')));
    }

    return null;
  });
}
// CONCATENATED MODULE: ./src/PanelGroup.js














var PanelGroup_propTypes = {
  accordion: prop_types_default.a.bool,
  /**
   * When `accordion` is enabled, `activeKey` controls the which child `Panel` is expanded. `activeKey` should
   * match a child Panel `eventKey` prop exactly.
   *
   * @controllable onSelect
   */
  activeKey: prop_types_default.a.any,

  /**
   * A callback fired when a child Panel collapse state changes. It's called with the next expanded `activeKey`
   *
   * @controllable activeKey
   */
  onSelect: prop_types_default.a.func,

  /**
   * An HTML role attribute
   */
  role: prop_types_default.a.string,

  /**
   * A function that takes an eventKey and type and returns a
   * unique id for each Panel heading and Panel Collapse. The function _must_ be a pure function,
   * meaning it should always return the _same_ id for the same set of inputs. The default
   * value requires that an `id` to be set for the PanelGroup.
   *
   * The `type` argument will either be `"body"` or `"heading"`.
   *
   * @defaultValue (eventKey, type) => `${this.props.id}-${type}-${key}`
   */
  generateChildId: prop_types_default.a.func,

  /**
   * HTML id attribute, required if no `generateChildId` prop
   * is specified.
   */
  id: generatedId('PanelGroup')
};

var PanelGroup_defaultProps = {
  accordion: false
};

var childContextTypes = {
  $bs_panelGroup: prop_types_default.a.shape({
    getId: prop_types_default.a.func,
    headerRole: prop_types_default.a.string,
    panelRole: prop_types_default.a.string,
    activeKey: prop_types_default.a.any,
    onToggle: prop_types_default.a.func
  })
};

var PanelGroup_PanelGroup = function (_React$Component) {
  inherits_default()(PanelGroup, _React$Component);

  function PanelGroup() {
    var _temp, _this, _ret;

    classCallCheck_default()(this, PanelGroup);

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleSelect = function (key, expanded, e) {
      if (expanded) {
        _this.props.onSelect(key, e);
      } else if (_this.props.activeKey === key) {
        _this.props.onSelect(null, e);
      }
    }, _temp), possibleConstructorReturn_default()(_this, _ret);
  }

  PanelGroup.prototype.getChildContext = function getChildContext() {
    var _props = this.props,
        activeKey = _props.activeKey,
        accordion = _props.accordion,
        generateChildId = _props.generateChildId,
        id = _props.id;

    var getId = null;

    if (accordion) {
      getId = generateChildId || function (key, type) {
        return id ? id + '-' + type + '-' + key : null;
      };
    }

    return {
      $bs_panelGroup: extends_default()({
        getId: getId,
        headerRole: 'tab',
        panelRole: 'tabpanel'
      }, accordion && {
        activeKey: activeKey,
        onToggle: this.handleSelect
      })
    };
  };

  PanelGroup.prototype.render = function render() {
    var _props2 = this.props,
        accordion = _props2.accordion,
        className = _props2.className,
        children = _props2.children,
        props = objectWithoutProperties_default()(_props2, ['accordion', 'className', 'children']);

    var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['onSelect', 'activeKey']),
        bsProps = _splitBsPropsAndOmit[0],
        elementProps = _splitBsPropsAndOmit[1];

    if (accordion) {
      elementProps.role = elementProps.role || 'tablist';
    }

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      ValidComponentChildren.map(children, function (child) {
        return Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(child, {
          bsStyle: child.props.bsStyle || bsProps.bsStyle
        });
      })
    );
  };

  return PanelGroup;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

PanelGroup_PanelGroup.propTypes = PanelGroup_propTypes;
PanelGroup_PanelGroup.defaultProps = PanelGroup_defaultProps;
PanelGroup_PanelGroup.childContextTypes = childContextTypes;

/* harmony default export */ var src_PanelGroup = (uncontrollable_default()(bootstrapUtils_bsClass('panel-group', PanelGroup_PanelGroup), {
  activeKey: 'onSelect'
}));
// CONCATENATED MODULE: ./src/Accordion.js








var Accordion_Accordion = function (_React$Component) {
  inherits_default()(Accordion, _React$Component);

  function Accordion() {
    classCallCheck_default()(this, Accordion);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Accordion.prototype.render = function render() {
    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_PanelGroup,
      extends_default()({}, this.props, { accordion: true }),
      this.props.children
    );
  };

  return Accordion;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

/* harmony default export */ var src_Accordion = (Accordion_Accordion);
// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/values.js
var object_values = __webpack_require__(24);
var values_default = /*#__PURE__*/__webpack_require__.n(object_values);

// CONCATENATED MODULE: ./src/CloseButton.js






var CloseButton_propTypes = {
  label: prop_types_default.a.string.isRequired,
  onClick: prop_types_default.a.func
};

var CloseButton_defaultProps = {
  label: 'Close'
};

var CloseButton_CloseButton = function (_React$Component) {
  inherits_default()(CloseButton, _React$Component);

  function CloseButton() {
    classCallCheck_default()(this, CloseButton);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  CloseButton.prototype.render = function render() {
    var _props = this.props,
        label = _props.label,
        onClick = _props.onClick;

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'button',
      { type: 'button', className: 'close', onClick: onClick },
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'span',
        { 'aria-hidden': 'true' },
        '\xD7'
      ),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'span',
        { className: 'sr-only' },
        label
      )
    );
  };

  return CloseButton;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

CloseButton_CloseButton.propTypes = CloseButton_propTypes;
CloseButton_CloseButton.defaultProps = CloseButton_defaultProps;

/* harmony default export */ var src_CloseButton = (CloseButton_CloseButton);
// CONCATENATED MODULE: ./src/Alert.js














var Alert_propTypes = {
  onDismiss: prop_types_default.a.func,
  closeLabel: prop_types_default.a.string
};

var Alert_defaultProps = {
  closeLabel: 'Close alert'
};

var Alert_Alert = function (_React$Component) {
  inherits_default()(Alert, _React$Component);

  function Alert() {
    classCallCheck_default()(this, Alert);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Alert.prototype.render = function render() {
    var _extends2;

    var _props = this.props,
        onDismiss = _props.onDismiss,
        closeLabel = _props.closeLabel,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['onDismiss', 'closeLabel', 'className', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var dismissable = !!onDismiss;
    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, 'dismissable')] = dismissable, _extends2));

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, {
        role: 'alert',
        className: classnames_default()(className, classes)
      }),
      dismissable && external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_CloseButton, { onClick: onDismiss, label: closeLabel }),
      children
    );
  };

  return Alert;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Alert_Alert.propTypes = Alert_propTypes;
Alert_Alert.defaultProps = Alert_defaultProps;

/* harmony default export */ var src_Alert = (bsStyles(values_default()(State), State.INFO, bootstrapUtils_bsClass('alert', Alert_Alert)));
// CONCATENATED MODULE: ./src/Badge.js











// TODO: `pullRight` doesn't belong here. There's no special handling here.

var Badge_propTypes = {
  pullRight: prop_types_default.a.bool
};

var Badge_defaultProps = {
  pullRight: false
};

var Badge_Badge = function (_React$Component) {
  inherits_default()(Badge, _React$Component);

  function Badge() {
    classCallCheck_default()(this, Badge);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Badge.prototype.hasContent = function hasContent(children) {
    var result = false;

    external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.forEach(children, function (child) {
      if (result) {
        return;
      }

      if (child || child === 0) {
        result = true;
      }
    });

    return result;
  };

  Badge.prototype.render = function render() {
    var _props = this.props,
        pullRight = _props.pullRight,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['pullRight', 'className', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), {
      'pull-right': pullRight,

      // Hack for collapsing on IE8.
      hidden: !this.hasContent(children)
    });

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'span',
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      children
    );
  };

  return Badge;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Badge_Badge.propTypes = Badge_propTypes;
Badge_Badge.defaultProps = Badge_defaultProps;

/* harmony default export */ var src_Badge = (bootstrapUtils_bsClass('badge', Badge_Badge));
// EXTERNAL MODULE: ./node_modules/prop-types-extra/lib/elementType.js
var elementType = __webpack_require__(8);
var elementType_default = /*#__PURE__*/__webpack_require__.n(elementType);

// CONCATENATED MODULE: ./src/utils/createChainedFunction.js
/**
 * Safe chained function
 *
 * Will only create a new function if needed,
 * otherwise will pass back existing functions or null.
 *
 * @param {function} functions to chain
 * @returns {function|null}
 */
function createChainedFunction() {
  for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
    funcs[_key] = arguments[_key];
  }

  return funcs.filter(function (f) {
    return f != null;
  }).reduce(function (acc, f) {
    if (typeof f !== 'function') {
      throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');
    }

    if (acc === null) {
      return f;
    }

    return function chainedFunction() {
      for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }

      acc.apply(this, args);
      f.apply(this, args);
    };
  }, null);
}

/* harmony default export */ var utils_createChainedFunction = (createChainedFunction);
// CONCATENATED MODULE: ./src/SafeAnchor.js











var SafeAnchor_propTypes = {
  href: prop_types_default.a.string,
  onClick: prop_types_default.a.func,
  onKeyDown: prop_types_default.a.func,
  disabled: prop_types_default.a.bool,
  role: prop_types_default.a.string,
  tabIndex: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]),
  /**
   * this is sort of silly but needed for Button
   */
  componentClass: elementType_default.a
};

var SafeAnchor_defaultProps = {
  componentClass: 'a'
};

function isTrivialHref(href) {
  return !href || href.trim() === '#';
}

/**
 * There are situations due to browser quirks or Bootstrap CSS where
 * an anchor tag is needed, when semantically a button tag is the
 * better choice. SafeAnchor ensures that when an anchor is used like a
 * button its accessible. It also emulates input `disabled` behavior for
 * links, which is usually desirable for Buttons, NavItems, MenuItems, etc.
 */

var SafeAnchor_SafeAnchor = function (_React$Component) {
  inherits_default()(SafeAnchor, _React$Component);

  function SafeAnchor(props, context) {
    classCallCheck_default()(this, SafeAnchor);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleClick = _this.handleClick.bind(_this);
    _this.handleKeyDown = _this.handleKeyDown.bind(_this);
    return _this;
  }

  SafeAnchor.prototype.handleClick = function handleClick(event) {
    var _props = this.props,
        disabled = _props.disabled,
        href = _props.href,
        onClick = _props.onClick;


    if (disabled || isTrivialHref(href)) {
      event.preventDefault();
    }

    if (disabled) {
      event.stopPropagation();
      return;
    }

    if (onClick) {
      onClick(event);
    }
  };

  SafeAnchor.prototype.handleKeyDown = function handleKeyDown(event) {
    if (event.key === ' ') {
      event.preventDefault();
      this.handleClick(event);
    }
  };

  SafeAnchor.prototype.render = function render() {
    var _props2 = this.props,
        Component = _props2.componentClass,
        disabled = _props2.disabled,
        onKeyDown = _props2.onKeyDown,
        props = objectWithoutProperties_default()(_props2, ['componentClass', 'disabled', 'onKeyDown']);

    if (isTrivialHref(props.href)) {
      props.role = props.role || 'button';
      // we want to make sure there is a href attribute on the node
      // otherwise, the cursor incorrectly styled (except with role='button')
      props.href = props.href || '#';
    }

    if (disabled) {
      props.tabIndex = -1;
      props.style = extends_default()({ pointerEvents: 'none' }, props.style);
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, props, {
      onClick: this.handleClick,
      onKeyDown: utils_createChainedFunction(this.handleKeyDown, onKeyDown)
    }));
  };

  return SafeAnchor;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

SafeAnchor_SafeAnchor.propTypes = SafeAnchor_propTypes;
SafeAnchor_SafeAnchor.defaultProps = SafeAnchor_defaultProps;

/* harmony default export */ var src_SafeAnchor = (SafeAnchor_SafeAnchor);
// CONCATENATED MODULE: ./src/BreadcrumbItem.js











var BreadcrumbItem_propTypes = {
  /**
   * If set to true, renders `span` instead of `a`
   */
  active: prop_types_default.a.bool,
  /**
   * `href` attribute for the inner `a` element
   */
  href: prop_types_default.a.string,
  /**
   * `title` attribute for the inner `a` element
   */
  title: prop_types_default.a.node,
  /**
   * `target` attribute for the inner `a` element
   */
  target: prop_types_default.a.string
};

var BreadcrumbItem_defaultProps = {
  active: false
};

var BreadcrumbItem_BreadcrumbItem = function (_React$Component) {
  inherits_default()(BreadcrumbItem, _React$Component);

  function BreadcrumbItem() {
    classCallCheck_default()(this, BreadcrumbItem);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  BreadcrumbItem.prototype.render = function render() {
    var _props = this.props,
        active = _props.active,
        href = _props.href,
        title = _props.title,
        target = _props.target,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['active', 'href', 'title', 'target', 'className']);

    // Don't try to render these props on non-active <span>.


    var linkProps = { href: href, title: title, target: target };

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'li',
      { className: classnames_default()(className, { active: active }) },
      active ? external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('span', props) : external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_SafeAnchor, extends_default()({}, props, linkProps))
    );
  };

  return BreadcrumbItem;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

BreadcrumbItem_BreadcrumbItem.propTypes = BreadcrumbItem_propTypes;
BreadcrumbItem_BreadcrumbItem.defaultProps = BreadcrumbItem_defaultProps;

/* harmony default export */ var src_BreadcrumbItem = (BreadcrumbItem_BreadcrumbItem);
// CONCATENATED MODULE: ./src/Breadcrumb.js











var Breadcrumb_Breadcrumb = function (_React$Component) {
  inherits_default()(Breadcrumb, _React$Component);

  function Breadcrumb() {
    classCallCheck_default()(this, Breadcrumb);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Breadcrumb.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('ol', extends_default()({}, elementProps, {
      role: 'navigation',
      'aria-label': 'breadcrumbs',
      className: classnames_default()(className, classes)
    }));
  };

  return Breadcrumb;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Breadcrumb_Breadcrumb.Item = src_BreadcrumbItem;

/* harmony default export */ var src_Breadcrumb = (bootstrapUtils_bsClass('breadcrumb', Breadcrumb_Breadcrumb));
// CONCATENATED MODULE: ./src/Button.js
















var Button_propTypes = {
  active: prop_types_default.a.bool,
  disabled: prop_types_default.a.bool,
  block: prop_types_default.a.bool,
  onClick: prop_types_default.a.func,
  componentClass: elementType_default.a,
  href: prop_types_default.a.string,
  /**
   * Defines HTML button type attribute
   * @defaultValue 'button'
   */
  type: prop_types_default.a.oneOf(['button', 'reset', 'submit'])
};

var Button_defaultProps = {
  active: false,
  block: false,
  disabled: false
};

var Button_Button = function (_React$Component) {
  inherits_default()(Button, _React$Component);

  function Button() {
    classCallCheck_default()(this, Button);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Button.prototype.renderAnchor = function renderAnchor(elementProps, className) {
    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_SafeAnchor, extends_default()({}, elementProps, {
      className: classnames_default()(className, elementProps.disabled && 'disabled')
    }));
  };

  Button.prototype.renderButton = function renderButton(_ref, className) {
    var componentClass = _ref.componentClass,
        elementProps = objectWithoutProperties_default()(_ref, ['componentClass']);

    var Component = componentClass || 'button';

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, {
      type: elementProps.type || 'button',
      className: className
    }));
  };

  Button.prototype.render = function render() {
    var _extends2;

    var _props = this.props,
        active = _props.active,
        block = _props.block,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['active', 'block', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {
      active: active
    }, _extends2[prefix(bsProps, 'block')] = block, _extends2));
    var fullClassName = classnames_default()(className, classes);

    if (elementProps.href) {
      return this.renderAnchor(elementProps, fullClassName);
    }

    return this.renderButton(elementProps, fullClassName);
  };

  return Button;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Button_Button.propTypes = Button_propTypes;
Button_Button.defaultProps = Button_defaultProps;

/* harmony default export */ var src_Button = (bootstrapUtils_bsClass('btn', bsSizes([Size.LARGE, Size.SMALL, Size.XSMALL], bsStyles([].concat(values_default()(State), [Style.DEFAULT, Style.PRIMARY, Style.LINK]), Style.DEFAULT, Button_Button))));
// EXTERNAL MODULE: ./node_modules/prop-types-extra/lib/all.js
var lib_all = __webpack_require__(37);
var all_default = /*#__PURE__*/__webpack_require__.n(lib_all);

// CONCATENATED MODULE: ./src/ButtonGroup.js













var ButtonGroup_propTypes = {
  vertical: prop_types_default.a.bool,
  justified: prop_types_default.a.bool,

  /**
   * Display block buttons; only useful when used with the "vertical" prop.
   * @type {bool}
   */
  block: all_default()(prop_types_default.a.bool, function (_ref) {
    var block = _ref.block,
        vertical = _ref.vertical;
    return block && !vertical ? new Error('`block` requires `vertical` to be set to have any effect') : null;
  })
};

var ButtonGroup_defaultProps = {
  block: false,
  justified: false,
  vertical: false
};

var ButtonGroup_ButtonGroup = function (_React$Component) {
  inherits_default()(ButtonGroup, _React$Component);

  function ButtonGroup() {
    classCallCheck_default()(this, ButtonGroup);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ButtonGroup.prototype.render = function render() {
    var _extends2;

    var _props = this.props,
        block = _props.block,
        justified = _props.justified,
        vertical = _props.vertical,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['block', 'justified', 'vertical', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps)] = !vertical, _extends2[prefix(bsProps, 'vertical')] = vertical, _extends2[prefix(bsProps, 'justified')] = justified, _extends2[prefix(src_Button.defaultProps, 'block')] = block, _extends2));

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('div', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return ButtonGroup;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ButtonGroup_ButtonGroup.propTypes = ButtonGroup_propTypes;
ButtonGroup_ButtonGroup.defaultProps = ButtonGroup_defaultProps;

/* harmony default export */ var src_ButtonGroup = (bootstrapUtils_bsClass('btn-group', ButtonGroup_ButtonGroup));
// CONCATENATED MODULE: ./src/ButtonToolbar.js










var ButtonToolbar_ButtonToolbar = function (_React$Component) {
  inherits_default()(ButtonToolbar, _React$Component);

  function ButtonToolbar() {
    classCallCheck_default()(this, ButtonToolbar);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ButtonToolbar.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('div', extends_default()({}, elementProps, {
      role: 'toolbar',
      className: classnames_default()(className, classes)
    }));
  };

  return ButtonToolbar;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

/* harmony default export */ var src_ButtonToolbar = (bootstrapUtils_bsClass('btn-toolbar', ButtonToolbar_ButtonToolbar));
// CONCATENATED MODULE: ./src/CarouselCaption.js











var CarouselCaption_propTypes = {
  componentClass: elementType_default.a
};

var CarouselCaption_defaultProps = {
  componentClass: 'div'
};

var CarouselCaption_CarouselCaption = function (_React$Component) {
  inherits_default()(CarouselCaption, _React$Component);

  function CarouselCaption() {
    classCallCheck_default()(this, CarouselCaption);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  CarouselCaption.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return CarouselCaption;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

CarouselCaption_CarouselCaption.propTypes = CarouselCaption_propTypes;
CarouselCaption_CarouselCaption.defaultProps = CarouselCaption_defaultProps;

/* harmony default export */ var src_CarouselCaption = (bootstrapUtils_bsClass('carousel-caption', CarouselCaption_CarouselCaption));
// EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"}
var external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom__ = __webpack_require__(9);
var external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom___default = /*#__PURE__*/__webpack_require__.n(external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom__);

// EXTERNAL MODULE: ./node_modules/dom-helpers/transition/index.js
var dom_helpers_transition = __webpack_require__(136);
var transition_default = /*#__PURE__*/__webpack_require__.n(dom_helpers_transition);

// CONCATENATED MODULE: ./src/CarouselItem.js











var CarouselItem_propTypes = {
  direction: prop_types_default.a.oneOf(['prev', 'next']),
  onAnimateOutEnd: prop_types_default.a.func,
  active: prop_types_default.a.bool,
  animateIn: prop_types_default.a.bool,
  animateOut: prop_types_default.a.bool,
  index: prop_types_default.a.number
};

var CarouselItem_defaultProps = {
  active: false,
  animateIn: false,
  animateOut: false
};

var CarouselItem_CarouselItem = function (_React$Component) {
  inherits_default()(CarouselItem, _React$Component);

  function CarouselItem(props, context) {
    classCallCheck_default()(this, CarouselItem);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleAnimateOutEnd = _this.handleAnimateOutEnd.bind(_this);

    _this.state = {
      direction: null
    };

    _this.isUnmounted = false;
    return _this;
  }

  CarouselItem.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
    if (this.props.active !== nextProps.active) {
      this.setState({ direction: null });
    }
  };

  CarouselItem.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
    var _this2 = this;

    var active = this.props.active;

    var prevActive = prevProps.active;

    if (!active && prevActive) {
      transition_default.a.end(external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom___default.a.findDOMNode(this), this.handleAnimateOutEnd);
    }

    if (active !== prevActive) {
      setTimeout(function () {
        return _this2.startAnimation();
      }, 20);
    }
  };

  CarouselItem.prototype.componentWillUnmount = function componentWillUnmount() {
    this.isUnmounted = true;
  };

  CarouselItem.prototype.handleAnimateOutEnd = function handleAnimateOutEnd() {
    if (this.isUnmounted) {
      return;
    }

    if (this.props.onAnimateOutEnd) {
      this.props.onAnimateOutEnd(this.props.index);
    }
  };

  CarouselItem.prototype.startAnimation = function startAnimation() {
    if (this.isUnmounted) {
      return;
    }

    this.setState({
      direction: this.props.direction === 'prev' ? 'right' : 'left'
    });
  };

  CarouselItem.prototype.render = function render() {
    var _props = this.props,
        direction = _props.direction,
        active = _props.active,
        animateIn = _props.animateIn,
        animateOut = _props.animateOut,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['direction', 'active', 'animateIn', 'animateOut', 'className']);

    delete props.onAnimateOutEnd;
    delete props.index;

    var classes = {
      item: true,
      active: active && !animateIn || animateOut
    };
    if (direction && active && animateIn) {
      classes[direction] = true;
    }
    if (this.state.direction && (animateIn || animateOut)) {
      classes[this.state.direction] = true;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('div', extends_default()({}, props, { className: classnames_default()(className, classes) }));
  };

  return CarouselItem;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

CarouselItem_CarouselItem.propTypes = CarouselItem_propTypes;
CarouselItem_CarouselItem.defaultProps = CarouselItem_defaultProps;

/* harmony default export */ var src_CarouselItem = (CarouselItem_CarouselItem);
// CONCATENATED MODULE: ./src/Glyphicon.js











var Glyphicon_propTypes = {
  /**
   * An icon name without "glyphicon-" prefix. See e.g. http://getbootstrap.com/components/#glyphicons
   */
  glyph: prop_types_default.a.string.isRequired
};

var Glyphicon_Glyphicon = function (_React$Component) {
  inherits_default()(Glyphicon, _React$Component);

  function Glyphicon() {
    classCallCheck_default()(this, Glyphicon);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Glyphicon.prototype.render = function render() {
    var _extends2;

    var _props = this.props,
        glyph = _props.glyph,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['glyph', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, glyph)] = true, _extends2));

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('span', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return Glyphicon;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Glyphicon_Glyphicon.propTypes = Glyphicon_propTypes;

/* harmony default export */ var src_Glyphicon = (bootstrapUtils_bsClass('glyphicon', Glyphicon_Glyphicon));
// CONCATENATED MODULE: ./src/Carousel.js
















// TODO: `slide` should be `animate`.

// TODO: Use uncontrollable.

var Carousel_propTypes = {
  slide: prop_types_default.a.bool,
  indicators: prop_types_default.a.bool,
  /**
   * The amount of time to delay between automatically cycling an item.
   * If `null`, carousel will not automatically cycle.
   */
  interval: prop_types_default.a.number,
  controls: prop_types_default.a.bool,
  pauseOnHover: prop_types_default.a.bool,
  wrap: prop_types_default.a.bool,
  /**
   * Callback fired when the active item changes.
   *
   * ```js
   * (eventKey: any, ?event: Object) => any
   * ```
   *
   * If this callback takes two or more arguments, the second argument will
   * be a persisted event object with `direction` set to the direction of the
   * transition.
   */
  onSelect: prop_types_default.a.func,
  onSlideEnd: prop_types_default.a.func,
  activeIndex: prop_types_default.a.number,
  defaultActiveIndex: prop_types_default.a.number,
  direction: prop_types_default.a.oneOf(['prev', 'next']),
  prevIcon: prop_types_default.a.node,
  /**
   * Label shown to screen readers only, can be used to show the previous element
   * in the carousel.
   * Set to null to deactivate.
   */
  prevLabel: prop_types_default.a.string,
  nextIcon: prop_types_default.a.node,
  /**
   * Label shown to screen readers only, can be used to show the next element
   * in the carousel.
   * Set to null to deactivate.
   */
  nextLabel: prop_types_default.a.string
};

var Carousel_defaultProps = {
  slide: true,
  interval: 5000,
  pauseOnHover: true,
  wrap: true,
  indicators: true,
  controls: true,
  prevIcon: external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_Glyphicon, { glyph: 'chevron-left' }),
  prevLabel: 'Previous',
  nextIcon: external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_Glyphicon, { glyph: 'chevron-right' }),
  nextLabel: 'Next'
};

var Carousel_Carousel = function (_React$Component) {
  inherits_default()(Carousel, _React$Component);

  function Carousel(props, context) {
    classCallCheck_default()(this, Carousel);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleMouseOver = _this.handleMouseOver.bind(_this);
    _this.handleMouseOut = _this.handleMouseOut.bind(_this);
    _this.handlePrev = _this.handlePrev.bind(_this);
    _this.handleNext = _this.handleNext.bind(_this);
    _this.handleItemAnimateOutEnd = _this.handleItemAnimateOutEnd.bind(_this);

    var defaultActiveIndex = props.defaultActiveIndex;


    _this.state = {
      activeIndex: defaultActiveIndex != null ? defaultActiveIndex : 0,
      previousActiveIndex: null,
      direction: null
    };

    _this.isUnmounted = false;
    return _this;
  }

  Carousel.prototype.componentDidMount = function componentDidMount() {
    this.waitForNext();
  };

  Carousel.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
    var activeIndex = this.getActiveIndex();

    if (nextProps.activeIndex != null && nextProps.activeIndex !== activeIndex) {
      clearTimeout(this.timeout);

      this.setState({
        previousActiveIndex: activeIndex,
        direction: nextProps.direction != null ? nextProps.direction : this.getDirection(activeIndex, nextProps.activeIndex)
      });
    }

    if (nextProps.activeIndex == null && this.state.activeIndex >= nextProps.children.length) {
      this.setState({
        activeIndex: 0,
        previousActiveIndex: null,
        direction: null
      });
    }
  };

  Carousel.prototype.componentWillUnmount = function componentWillUnmount() {
    clearTimeout(this.timeout);
    this.isUnmounted = true;
  };

  Carousel.prototype.getActiveIndex = function getActiveIndex() {
    var activeIndexProp = this.props.activeIndex;
    return activeIndexProp != null ? activeIndexProp : this.state.activeIndex;
  };

  Carousel.prototype.getDirection = function getDirection(prevIndex, index) {
    if (prevIndex === index) {
      return null;
    }

    return prevIndex > index ? 'prev' : 'next';
  };

  Carousel.prototype.handleItemAnimateOutEnd = function handleItemAnimateOutEnd() {
    var _this2 = this;

    this.setState({
      previousActiveIndex: null,
      direction: null
    }, function () {
      _this2.waitForNext();

      if (_this2.props.onSlideEnd) {
        _this2.props.onSlideEnd();
      }
    });
  };

  Carousel.prototype.handleMouseOut = function handleMouseOut() {
    if (this.isPaused) {
      this.play();
    }
  };

  Carousel.prototype.handleMouseOver = function handleMouseOver() {
    if (this.props.pauseOnHover) {
      this.pause();
    }
  };

  Carousel.prototype.handleNext = function handleNext(e) {
    var index = this.getActiveIndex() + 1;
    var count = ValidComponentChildren.count(this.props.children);

    if (index > count - 1) {
      if (!this.props.wrap) {
        return;
      }
      index = 0;
    }

    this.select(index, e, 'next');
  };

  Carousel.prototype.handlePrev = function handlePrev(e) {
    var index = this.getActiveIndex() - 1;

    if (index < 0) {
      if (!this.props.wrap) {
        return;
      }
      index = ValidComponentChildren.count(this.props.children) - 1;
    }

    this.select(index, e, 'prev');
  };

  // This might be a public API.


  Carousel.prototype.pause = function pause() {
    this.isPaused = true;
    clearTimeout(this.timeout);
  };

  // This might be a public API.


  Carousel.prototype.play = function play() {
    this.isPaused = false;
    this.waitForNext();
  };

  Carousel.prototype.select = function select(index, e, direction) {
    clearTimeout(this.timeout);

    // TODO: Is this necessary? Seems like the only risk is if the component
    // unmounts while handleItemAnimateOutEnd fires.
    if (this.isUnmounted) {
      return;
    }

    var previousActiveIndex = this.props.slide ? this.getActiveIndex() : null;
    direction = direction || this.getDirection(previousActiveIndex, index);

    var onSelect = this.props.onSelect;


    if (onSelect) {
      if (onSelect.length > 1) {
        // React SyntheticEvents are pooled, so we need to remove this event
        // from the pool to add a custom property. To avoid unnecessarily
        // removing objects from the pool, only do this when the listener
        // actually wants the event.
        if (e) {
          e.persist();
          e.direction = direction;
        } else {
          e = { direction: direction };
        }

        onSelect(index, e);
      } else {
        onSelect(index);
      }
    }

    if (this.props.activeIndex == null && index !== previousActiveIndex) {
      if (this.state.previousActiveIndex != null) {
        // If currently animating don't activate the new index.
        // TODO: look into queueing this canceled call and
        // animating after the current animation has ended.
        return;
      }

      this.setState({
        activeIndex: index,
        previousActiveIndex: previousActiveIndex,
        direction: direction
      });
    }
  };

  Carousel.prototype.waitForNext = function waitForNext() {
    var _props = this.props,
        slide = _props.slide,
        interval = _props.interval,
        activeIndexProp = _props.activeIndex;


    if (!this.isPaused && slide && interval && activeIndexProp == null) {
      this.timeout = setTimeout(this.handleNext, interval);
    }
  };

  Carousel.prototype.renderControls = function renderControls(properties) {
    var wrap = properties.wrap,
        children = properties.children,
        activeIndex = properties.activeIndex,
        prevIcon = properties.prevIcon,
        nextIcon = properties.nextIcon,
        bsProps = properties.bsProps,
        prevLabel = properties.prevLabel,
        nextLabel = properties.nextLabel;

    var controlClassName = prefix(bsProps, 'control');
    var count = ValidComponentChildren.count(children);

    return [(wrap || activeIndex !== 0) && external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_SafeAnchor,
      {
        key: 'prev',
        className: classnames_default()(controlClassName, 'left'),
        onClick: this.handlePrev
      },
      prevIcon,
      prevLabel && external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'span',
        { className: 'sr-only' },
        prevLabel
      )
    ), (wrap || activeIndex !== count - 1) && external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_SafeAnchor,
      {
        key: 'next',
        className: classnames_default()(controlClassName, 'right'),
        onClick: this.handleNext
      },
      nextIcon,
      nextLabel && external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'span',
        { className: 'sr-only' },
        nextLabel
      )
    )];
  };

  Carousel.prototype.renderIndicators = function renderIndicators(children, activeIndex, bsProps) {
    var _this3 = this;

    var indicators = [];

    ValidComponentChildren.forEach(children, function (child, index) {
      indicators.push(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('li', {
        key: index,
        className: index === activeIndex ? 'active' : null,
        onClick: function onClick(e) {
          return _this3.select(index, e);
        }
      }),

      // Force whitespace between indicator elements. Bootstrap requires
      // this for correct spacing of elements.
      ' ');
    });

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'ol',
      { className: prefix(bsProps, 'indicators') },
      indicators
    );
  };

  Carousel.prototype.render = function render() {
    var _this4 = this;

    var _props2 = this.props,
        slide = _props2.slide,
        indicators = _props2.indicators,
        controls = _props2.controls,
        wrap = _props2.wrap,
        prevIcon = _props2.prevIcon,
        prevLabel = _props2.prevLabel,
        nextIcon = _props2.nextIcon,
        nextLabel = _props2.nextLabel,
        className = _props2.className,
        children = _props2.children,
        props = objectWithoutProperties_default()(_props2, ['slide', 'indicators', 'controls', 'wrap', 'prevIcon', 'prevLabel', 'nextIcon', 'nextLabel', 'className', 'children']);

    var _state = this.state,
        previousActiveIndex = _state.previousActiveIndex,
        direction = _state.direction;

    var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['interval', 'pauseOnHover', 'onSelect', 'onSlideEnd', 'activeIndex', // Accessed via this.getActiveIndex().
    'defaultActiveIndex', 'direction']),
        bsProps = _splitBsPropsAndOmit[0],
        elementProps = _splitBsPropsAndOmit[1];

    var activeIndex = this.getActiveIndex();

    var classes = extends_default()({}, getClassSet(bsProps), {
      slide: slide
    });

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, {
        className: classnames_default()(className, classes),
        onMouseOver: this.handleMouseOver,
        onMouseOut: this.handleMouseOut
      }),
      indicators && this.renderIndicators(children, activeIndex, bsProps),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'div',
        { className: prefix(bsProps, 'inner') },
        ValidComponentChildren.map(children, function (child, index) {
          var active = index === activeIndex;
          var previousActive = slide && index === previousActiveIndex;

          return Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(child, {
            active: active,
            index: index,
            animateOut: previousActive,
            animateIn: active && previousActiveIndex != null && slide,
            direction: direction,
            onAnimateOutEnd: previousActive ? _this4.handleItemAnimateOutEnd : null
          });
        })
      ),
      controls && this.renderControls({
        wrap: wrap,
        children: children,
        activeIndex: activeIndex,
        prevIcon: prevIcon,
        prevLabel: prevLabel,
        nextIcon: nextIcon,
        nextLabel: nextLabel,
        bsProps: bsProps
      })
    );
  };

  return Carousel;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Carousel_Carousel.propTypes = Carousel_propTypes;
Carousel_Carousel.defaultProps = Carousel_defaultProps;

Carousel_Carousel.Caption = src_CarouselCaption;
Carousel_Carousel.Item = src_CarouselItem;

/* harmony default export */ var src_Carousel = (bootstrapUtils_bsClass('carousel', Carousel_Carousel));
// EXTERNAL MODULE: ./node_modules/warning/browser.js
var warning_browser = __webpack_require__(10);
var warning_browser_default = /*#__PURE__*/__webpack_require__.n(warning_browser);

// CONCATENATED MODULE: ./src/Checkbox.js





/* eslint-disable jsx-a11y/label-has-for */








var Checkbox_propTypes = {
  inline: prop_types_default.a.bool,
  disabled: prop_types_default.a.bool,
  title: prop_types_default.a.string,
  /**
   * Only valid if `inline` is not set.
   */
  validationState: prop_types_default.a.oneOf(['success', 'warning', 'error', null]),
  /**
   * Attaches a ref to the `<input>` element. Only functions can be used here.
   *
   * ```js
   * <Checkbox inputRef={ref => { this.input = ref; }} />
   * ```
   */
  inputRef: prop_types_default.a.func
};

var Checkbox_defaultProps = {
  inline: false,
  disabled: false,
  title: ''
};

var Checkbox_Checkbox = function (_React$Component) {
  inherits_default()(Checkbox, _React$Component);

  function Checkbox() {
    classCallCheck_default()(this, Checkbox);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Checkbox.prototype.render = function render() {
    var _props = this.props,
        inline = _props.inline,
        disabled = _props.disabled,
        validationState = _props.validationState,
        inputRef = _props.inputRef,
        className = _props.className,
        style = _props.style,
        title = _props.title,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['inline', 'disabled', 'validationState', 'inputRef', 'className', 'style', 'title', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var input = external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('input', extends_default()({}, elementProps, {
      ref: inputRef,
      type: 'checkbox',
      disabled: disabled
    }));

    if (inline) {
      var _classes2;

      var _classes = (_classes2 = {}, _classes2[prefix(bsProps, 'inline')] = true, _classes2.disabled = disabled, _classes2);

      // Use a warning here instead of in propTypes to get better-looking
      // generated documentation.
      undefined !== 'production' ? warning_browser_default()(!validationState, '`validationState` is ignored on `<Checkbox inline>`. To display ' + 'validation state on an inline checkbox, set `validationState` on a ' + 'parent `<FormGroup>` or other element instead.') : void 0;

      return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'label',
        {
          className: classnames_default()(className, _classes),
          style: style,
          title: title
        },
        input,
        children
      );
    }

    var classes = extends_default()({}, getClassSet(bsProps), {
      disabled: disabled
    });
    if (validationState) {
      classes['has-' + validationState] = true;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      { className: classnames_default()(className, classes), style: style },
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'label',
        { title: title },
        input,
        children
      )
    );
  };

  return Checkbox;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Checkbox_Checkbox.propTypes = Checkbox_propTypes;
Checkbox_Checkbox.defaultProps = Checkbox_defaultProps;

/* harmony default export */ var src_Checkbox = (bootstrapUtils_bsClass('checkbox', Checkbox_Checkbox));
// CONCATENATED MODULE: ./src/utils/capitalize.js
function capitalize(string) {
  return "" + string.charAt(0).toUpperCase() + string.slice(1);
}
// CONCATENATED MODULE: ./src/Clearfix.js














var Clearfix_propTypes = {
  componentClass: elementType_default.a,

  /**
   * Apply clearfix
   *
   * on Extra small devices Phones
   *
   * adds class `visible-xs-block`
   */
  visibleXsBlock: prop_types_default.a.bool,
  /**
   * Apply clearfix
   *
   * on Small devices Tablets
   *
   * adds class `visible-sm-block`
   */
  visibleSmBlock: prop_types_default.a.bool,
  /**
   * Apply clearfix
   *
   * on Medium devices Desktops
   *
   * adds class `visible-md-block`
   */
  visibleMdBlock: prop_types_default.a.bool,
  /**
   * Apply clearfix
   *
   * on Large devices Desktops
   *
   * adds class `visible-lg-block`
   */
  visibleLgBlock: prop_types_default.a.bool
};

var Clearfix_defaultProps = {
  componentClass: 'div'
};

var Clearfix_Clearfix = function (_React$Component) {
  inherits_default()(Clearfix, _React$Component);

  function Clearfix() {
    classCallCheck_default()(this, Clearfix);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Clearfix.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    DEVICE_SIZES.forEach(function (size) {
      var propName = 'visible' + capitalize(size) + 'Block';
      if (elementProps[propName]) {
        classes['visible-' + size + '-block'] = true;
      }

      delete elementProps[propName];
    });

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return Clearfix;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Clearfix_Clearfix.propTypes = Clearfix_propTypes;
Clearfix_Clearfix.defaultProps = Clearfix_defaultProps;

/* harmony default export */ var src_Clearfix = (bootstrapUtils_bsClass('clearfix', Clearfix_Clearfix));
// CONCATENATED MODULE: ./src/ControlLabel.js












var ControlLabel_propTypes = {
  /**
   * Uses `controlId` from `<FormGroup>` if not explicitly specified.
   */
  htmlFor: prop_types_default.a.string,
  srOnly: prop_types_default.a.bool
};

var ControlLabel_defaultProps = {
  srOnly: false
};

var contextTypes = {
  $bs_formGroup: prop_types_default.a.object
};

var ControlLabel_ControlLabel = function (_React$Component) {
  inherits_default()(ControlLabel, _React$Component);

  function ControlLabel() {
    classCallCheck_default()(this, ControlLabel);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ControlLabel.prototype.render = function render() {
    var formGroup = this.context.$bs_formGroup;
    var controlId = formGroup && formGroup.controlId;

    var _props = this.props,
        _props$htmlFor = _props.htmlFor,
        htmlFor = _props$htmlFor === undefined ? controlId : _props$htmlFor,
        srOnly = _props.srOnly,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['htmlFor', 'srOnly', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    undefined !== 'production' ? warning_browser_default()(controlId == null || htmlFor === controlId, '`controlId` is ignored on `<ControlLabel>` when `htmlFor` is specified.') : void 0;

    var classes = extends_default()({}, getClassSet(bsProps), {
      'sr-only': srOnly
    });

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('label', extends_default()({}, elementProps, {
      htmlFor: htmlFor,
      className: classnames_default()(className, classes)
    }));
  };

  return ControlLabel;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ControlLabel_ControlLabel.propTypes = ControlLabel_propTypes;
ControlLabel_ControlLabel.defaultProps = ControlLabel_defaultProps;
ControlLabel_ControlLabel.contextTypes = contextTypes;

/* harmony default export */ var src_ControlLabel = (bootstrapUtils_bsClass('control-label', ControlLabel_ControlLabel));
// CONCATENATED MODULE: ./src/Col.js













var Col_propTypes = {
  componentClass: elementType_default.a,

  /**
   * The number of columns you wish to span
   *
   * for Extra small devices Phones (<768px)
   *
   * class-prefix `col-xs-`
   */
  xs: prop_types_default.a.number,
  /**
   * The number of columns you wish to span
   *
   * for Small devices Tablets (?768px)
   *
   * class-prefix `col-sm-`
   */
  sm: prop_types_default.a.number,
  /**
   * The number of columns you wish to span
   *
   * for Medium devices Desktops (?992px)
   *
   * class-prefix `col-md-`
   */
  md: prop_types_default.a.number,
  /**
   * The number of columns you wish to span
   *
   * for Large devices Desktops (?1200px)
   *
   * class-prefix `col-lg-`
   */
  lg: prop_types_default.a.number,
  /**
   * Hide column
   *
   * on Extra small devices Phones
   *
   * adds class `hidden-xs`
   */
  xsHidden: prop_types_default.a.bool,
  /**
   * Hide column
   *
   * on Small devices Tablets
   *
   * adds class `hidden-sm`
   */
  smHidden: prop_types_default.a.bool,
  /**
   * Hide column
   *
   * on Medium devices Desktops
   *
   * adds class `hidden-md`
   */
  mdHidden: prop_types_default.a.bool,
  /**
   * Hide column
   *
   * on Large devices Desktops
   *
   * adds class `hidden-lg`
   */
  lgHidden: prop_types_default.a.bool,
  /**
   * Move columns to the right
   *
   * for Extra small devices Phones
   *
   * class-prefix `col-xs-offset-`
   */
  xsOffset: prop_types_default.a.number,
  /**
   * Move columns to the right
   *
   * for Small devices Tablets
   *
   * class-prefix `col-sm-offset-`
   */
  smOffset: prop_types_default.a.number,
  /**
   * Move columns to the right
   *
   * for Medium devices Desktops
   *
   * class-prefix `col-md-offset-`
   */
  mdOffset: prop_types_default.a.number,
  /**
   * Move columns to the right
   *
   * for Large devices Desktops
   *
   * class-prefix `col-lg-offset-`
   */
  lgOffset: prop_types_default.a.number,
  /**
   * Change the order of grid columns to the right
   *
   * for Extra small devices Phones
   *
   * class-prefix `col-xs-push-`
   */
  xsPush: prop_types_default.a.number,
  /**
   * Change the order of grid columns to the right
   *
   * for Small devices Tablets
   *
   * class-prefix `col-sm-push-`
   */
  smPush: prop_types_default.a.number,
  /**
   * Change the order of grid columns to the right
   *
   * for Medium devices Desktops
   *
   * class-prefix `col-md-push-`
   */
  mdPush: prop_types_default.a.number,
  /**
   * Change the order of grid columns to the right
   *
   * for Large devices Desktops
   *
   * class-prefix `col-lg-push-`
   */
  lgPush: prop_types_default.a.number,
  /**
   * Change the order of grid columns to the left
   *
   * for Extra small devices Phones
   *
   * class-prefix `col-xs-pull-`
   */
  xsPull: prop_types_default.a.number,
  /**
   * Change the order of grid columns to the left
   *
   * for Small devices Tablets
   *
   * class-prefix `col-sm-pull-`
   */
  smPull: prop_types_default.a.number,
  /**
   * Change the order of grid columns to the left
   *
   * for Medium devices Desktops
   *
   * class-prefix `col-md-pull-`
   */
  mdPull: prop_types_default.a.number,
  /**
   * Change the order of grid columns to the left
   *
   * for Large devices Desktops
   *
   * class-prefix `col-lg-pull-`
   */
  lgPull: prop_types_default.a.number
};

var Col_defaultProps = {
  componentClass: 'div'
};

var Col_Col = function (_React$Component) {
  inherits_default()(Col, _React$Component);

  function Col() {
    classCallCheck_default()(this, Col);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Col.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = [];

    DEVICE_SIZES.forEach(function (size) {
      function popProp(propSuffix, modifier) {
        var propName = '' + size + propSuffix;
        var propValue = elementProps[propName];

        if (propValue != null) {
          classes.push(prefix(bsProps, '' + size + modifier + '-' + propValue));
        }

        delete elementProps[propName];
      }

      popProp('', '');
      popProp('Offset', '-offset');
      popProp('Push', '-push');
      popProp('Pull', '-pull');

      var hiddenPropName = size + 'Hidden';
      if (elementProps[hiddenPropName]) {
        classes.push('hidden-' + size);
      }
      delete elementProps[hiddenPropName];
    });

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return Col;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Col_Col.propTypes = Col_propTypes;
Col_Col.defaultProps = Col_defaultProps;

/* harmony default export */ var src_Col = (bootstrapUtils_bsClass('col', Col_Col));
// EXTERNAL MODULE: ./node_modules/dom-helpers/style/index.js
var dom_helpers_style = __webpack_require__(33);
var style_default = /*#__PURE__*/__webpack_require__.n(dom_helpers_style);

// EXTERNAL MODULE: ./node_modules/react-transition-group/Transition.js
var react_transition_group_Transition = __webpack_require__(81);
var Transition_default = /*#__PURE__*/__webpack_require__.n(react_transition_group_Transition);

// CONCATENATED MODULE: ./src/Collapse.js






var _collapseStyles;










var MARGINS = {
  height: ['marginTop', 'marginBottom'],
  width: ['marginLeft', 'marginRight']
};

// reading a dimension prop will cause the browser to recalculate,
// which will let our animations work
function triggerBrowserReflow(node) {
  node.offsetHeight; // eslint-disable-line no-unused-expressions
}

function getDimensionValue(dimension, elem) {
  var value = elem['offset' + capitalize(dimension)];
  var margins = MARGINS[dimension];

  return value + parseInt(style_default()(elem, margins[0]), 10) + parseInt(style_default()(elem, margins[1]), 10);
}

var collapseStyles = (_collapseStyles = {}, _collapseStyles[react_transition_group_Transition["EXITED"]] = 'collapse', _collapseStyles[react_transition_group_Transition["EXITING"]] = 'collapsing', _collapseStyles[react_transition_group_Transition["ENTERING"]] = 'collapsing', _collapseStyles[react_transition_group_Transition["ENTERED"]] = 'collapse in', _collapseStyles);

var Collapse_propTypes = {
  /**
   * Show the component; triggers the expand or collapse animation
   */
  in: prop_types_default.a.bool,

  /**
   * Wait until the first "enter" transition to mount the component (add it to the DOM)
   */
  mountOnEnter: prop_types_default.a.bool,

  /**
   * Unmount the component (remove it from the DOM) when it is collapsed
   */
  unmountOnExit: prop_types_default.a.bool,

  /**
   * Run the expand animation when the component mounts, if it is initially
   * shown
   */
  appear: prop_types_default.a.bool,

  /**
   * Duration of the collapse animation in milliseconds, to ensure that
   * finishing callbacks are fired even if the original browser transition end
   * events are canceled
   */
  timeout: prop_types_default.a.number,

  /**
   * Callback fired before the component expands
   */
  onEnter: prop_types_default.a.func,
  /**
   * Callback fired after the component starts to expand
   */
  onEntering: prop_types_default.a.func,
  /**
   * Callback fired after the component has expanded
   */
  onEntered: prop_types_default.a.func,
  /**
   * Callback fired before the component collapses
   */
  onExit: prop_types_default.a.func,
  /**
   * Callback fired after the component starts to collapse
   */
  onExiting: prop_types_default.a.func,
  /**
   * Callback fired after the component has collapsed
   */
  onExited: prop_types_default.a.func,

  /**
   * The dimension used when collapsing, or a function that returns the
   * dimension
   *
   * _Note: Bootstrap only partially supports 'width'!
   * You will need to supply your own CSS animation for the `.width` CSS class._
   */
  dimension: prop_types_default.a.oneOfType([prop_types_default.a.oneOf(['height', 'width']), prop_types_default.a.func]),

  /**
   * Function that returns the height or width of the animating DOM node
   *
   * Allows for providing some custom logic for how much the Collapse component
   * should animate in its specified dimension. Called with the current
   * dimension prop value and the DOM node.
   */
  getDimensionValue: prop_types_default.a.func,

  /**
   * ARIA role of collapsible element
   */
  role: prop_types_default.a.string
};

var Collapse_defaultProps = {
  in: false,
  timeout: 300,
  mountOnEnter: false,
  unmountOnExit: false,
  appear: false,

  dimension: 'height',
  getDimensionValue: getDimensionValue
};

var Collapse_Collapse = function (_React$Component) {
  inherits_default()(Collapse, _React$Component);

  function Collapse() {
    var _temp, _this, _ret;

    classCallCheck_default()(this, Collapse);

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleEnter = function (elem) {
      elem.style[_this.getDimension()] = '0';
    }, _this.handleEntering = function (elem) {
      var dimension = _this.getDimension();
      elem.style[dimension] = _this._getScrollDimensionValue(elem, dimension);
    }, _this.handleEntered = function (elem) {
      elem.style[_this.getDimension()] = null;
    }, _this.handleExit = function (elem) {
      var dimension = _this.getDimension();
      elem.style[dimension] = _this.props.getDimensionValue(dimension, elem) + 'px';
      triggerBrowserReflow(elem);
    }, _this.handleExiting = function (elem) {
      elem.style[_this.getDimension()] = '0';
    }, _temp), possibleConstructorReturn_default()(_this, _ret);
  }

  Collapse.prototype.getDimension = function getDimension() {
    return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension;
  };

  // for testing


  Collapse.prototype._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) {
    return elem['scroll' + capitalize(dimension)] + 'px';
  };

  /* -- Expanding -- */


  /* -- Collapsing -- */


  Collapse.prototype.render = function render() {
    var _this2 = this;

    var _props = this.props,
        onEnter = _props.onEnter,
        onEntering = _props.onEntering,
        onEntered = _props.onEntered,
        onExit = _props.onExit,
        onExiting = _props.onExiting,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'className', 'children']);

    delete props.dimension;
    delete props.getDimensionValue;

    var handleEnter = utils_createChainedFunction(this.handleEnter, onEnter);
    var handleEntering = utils_createChainedFunction(this.handleEntering, onEntering);
    var handleEntered = utils_createChainedFunction(this.handleEntered, onEntered);
    var handleExit = utils_createChainedFunction(this.handleExit, onExit);
    var handleExiting = utils_createChainedFunction(this.handleExiting, onExiting);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Transition_default.a,
      extends_default()({}, props, {
        'aria-expanded': props.role ? props.in : null,
        onEnter: handleEnter,
        onEntering: handleEntering,
        onEntered: handleEntered,
        onExit: handleExit,
        onExiting: handleExiting
      }),
      function (state, innerProps) {
        return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.cloneElement(children, extends_default()({}, innerProps, {
          className: classnames_default()(className, children.props.className, collapseStyles[state], _this2.getDimension() === 'width' && 'width')
        }));
      }
    );
  };

  return Collapse;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Collapse_Collapse.propTypes = Collapse_propTypes;
Collapse_Collapse.defaultProps = Collapse_defaultProps;

/* harmony default export */ var src_Collapse = (Collapse_Collapse);
// EXTERNAL MODULE: ./node_modules/dom-helpers/activeElement.js
var activeElement = __webpack_require__(82);
var activeElement_default = /*#__PURE__*/__webpack_require__.n(activeElement);

// EXTERNAL MODULE: ./node_modules/dom-helpers/query/contains.js
var contains = __webpack_require__(26);
var contains_default = /*#__PURE__*/__webpack_require__.n(contains);

// EXTERNAL MODULE: ./node_modules/keycode/index.js
var keycode = __webpack_require__(62);
var keycode_default = /*#__PURE__*/__webpack_require__.n(keycode);

// EXTERNAL MODULE: ./node_modules/prop-types-extra/lib/isRequiredForA11y.js
var isRequiredForA11y = __webpack_require__(38);
var isRequiredForA11y_default = /*#__PURE__*/__webpack_require__.n(isRequiredForA11y);

// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/array/from.js
var from = __webpack_require__(145);
var from_default = /*#__PURE__*/__webpack_require__.n(from);

// EXTERNAL MODULE: ./node_modules/react-overlays/lib/RootCloseWrapper.js
var RootCloseWrapper = __webpack_require__(83);
var RootCloseWrapper_default = /*#__PURE__*/__webpack_require__.n(RootCloseWrapper);

// CONCATENATED MODULE: ./src/DropdownMenu.js

















var DropdownMenu_propTypes = {
  open: prop_types_default.a.bool,
  pullRight: prop_types_default.a.bool,
  onClose: prop_types_default.a.func,
  labelledBy: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]),
  onSelect: prop_types_default.a.func,
  rootCloseEvent: prop_types_default.a.oneOf(['click', 'mousedown'])
};

var DropdownMenu_defaultProps = {
  bsRole: 'menu',
  pullRight: false
};

var DropdownMenu_DropdownMenu = function (_React$Component) {
  inherits_default()(DropdownMenu, _React$Component);

  function DropdownMenu(props) {
    classCallCheck_default()(this, DropdownMenu);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props));

    _this.handleRootClose = _this.handleRootClose.bind(_this);
    _this.handleKeyDown = _this.handleKeyDown.bind(_this);
    return _this;
  }

  DropdownMenu.prototype.getFocusableMenuItems = function getFocusableMenuItems() {
    var node = external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom___default.a.findDOMNode(this);
    if (!node) {
      return [];
    }

    return from_default()(node.querySelectorAll('[tabIndex="-1"]'));
  };

  DropdownMenu.prototype.getItemsAndActiveIndex = function getItemsAndActiveIndex() {
    var items = this.getFocusableMenuItems();
    var activeIndex = items.indexOf(document.activeElement);

    return { items: items, activeIndex: activeIndex };
  };

  DropdownMenu.prototype.focusNext = function focusNext() {
    var _getItemsAndActiveInd = this.getItemsAndActiveIndex(),
        items = _getItemsAndActiveInd.items,
        activeIndex = _getItemsAndActiveInd.activeIndex;

    if (items.length === 0) {
      return;
    }

    var nextIndex = activeIndex === items.length - 1 ? 0 : activeIndex + 1;
    items[nextIndex].focus();
  };

  DropdownMenu.prototype.focusPrevious = function focusPrevious() {
    var _getItemsAndActiveInd2 = this.getItemsAndActiveIndex(),
        items = _getItemsAndActiveInd2.items,
        activeIndex = _getItemsAndActiveInd2.activeIndex;

    if (items.length === 0) {
      return;
    }

    var prevIndex = activeIndex === 0 ? items.length - 1 : activeIndex - 1;
    items[prevIndex].focus();
  };

  DropdownMenu.prototype.handleKeyDown = function handleKeyDown(event) {
    switch (event.keyCode) {
      case keycode_default.a.codes.down:
        this.focusNext();
        event.preventDefault();
        break;
      case keycode_default.a.codes.up:
        this.focusPrevious();
        event.preventDefault();
        break;
      case keycode_default.a.codes.esc:
      case keycode_default.a.codes.tab:
        this.props.onClose(event, { source: 'keydown' });
        break;
      default:
    }
  };

  DropdownMenu.prototype.handleRootClose = function handleRootClose(event) {
    this.props.onClose(event, { source: 'rootClose' });
  };

  DropdownMenu.prototype.render = function render() {
    var _extends2,
        _this2 = this;

    var _props = this.props,
        open = _props.open,
        pullRight = _props.pullRight,
        labelledBy = _props.labelledBy,
        onSelect = _props.onSelect,
        className = _props.className,
        rootCloseEvent = _props.rootCloseEvent,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['open', 'pullRight', 'labelledBy', 'onSelect', 'className', 'rootCloseEvent', 'children']);

    var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['onClose']),
        bsProps = _splitBsPropsAndOmit[0],
        elementProps = _splitBsPropsAndOmit[1];

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, 'right')] = pullRight, _extends2));

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      RootCloseWrapper_default.a,
      {
        disabled: !open,
        onRootClose: this.handleRootClose,
        event: rootCloseEvent
      },
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'ul',
        extends_default()({}, elementProps, {
          role: 'menu',
          className: classnames_default()(className, classes),
          'aria-labelledby': labelledBy
        }),
        ValidComponentChildren.map(children, function (child) {
          return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.cloneElement(child, {
            onKeyDown: utils_createChainedFunction(child.props.onKeyDown, _this2.handleKeyDown),
            onSelect: utils_createChainedFunction(child.props.onSelect, onSelect)
          });
        })
      )
    );
  };

  return DropdownMenu;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

DropdownMenu_DropdownMenu.propTypes = DropdownMenu_propTypes;
DropdownMenu_DropdownMenu.defaultProps = DropdownMenu_defaultProps;

/* harmony default export */ var src_DropdownMenu = (bootstrapUtils_bsClass('dropdown-menu', DropdownMenu_DropdownMenu));
// CONCATENATED MODULE: ./src/DropdownToggle.js













var DropdownToggle_propTypes = {
  noCaret: prop_types_default.a.bool,
  open: prop_types_default.a.bool,
  title: prop_types_default.a.string,
  useAnchor: prop_types_default.a.bool
};

var DropdownToggle_defaultProps = {
  open: false,
  useAnchor: false,
  bsRole: 'toggle'
};

var DropdownToggle_DropdownToggle = function (_React$Component) {
  inherits_default()(DropdownToggle, _React$Component);

  function DropdownToggle() {
    classCallCheck_default()(this, DropdownToggle);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  DropdownToggle.prototype.render = function render() {
    var _props = this.props,
        noCaret = _props.noCaret,
        open = _props.open,
        useAnchor = _props.useAnchor,
        bsClass = _props.bsClass,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['noCaret', 'open', 'useAnchor', 'bsClass', 'className', 'children']);

    delete props.bsRole;

    var Component = useAnchor ? src_SafeAnchor : src_Button;
    var useCaret = !noCaret;

    // This intentionally forwards bsSize and bsStyle (if set) to the
    // underlying component, to allow it to render size and style variants.

    // FIXME: Should this really fall back to `title` as children?

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Component,
      extends_default()({}, props, {
        role: 'button',
        className: classnames_default()(className, bsClass),
        'aria-haspopup': true,
        'aria-expanded': open
      }),
      children || props.title,
      useCaret && ' ',
      useCaret && external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('span', { className: 'caret' })
    );
  };

  return DropdownToggle;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

DropdownToggle_DropdownToggle.propTypes = DropdownToggle_propTypes;
DropdownToggle_DropdownToggle.defaultProps = DropdownToggle_defaultProps;

/* harmony default export */ var src_DropdownToggle = (bootstrapUtils_bsClass('dropdown-toggle', DropdownToggle_DropdownToggle));
// CONCATENATED MODULE: ./src/Dropdown.js


























var TOGGLE_ROLE = src_DropdownToggle.defaultProps.bsRole;
var MENU_ROLE = src_DropdownMenu.defaultProps.bsRole;

var Dropdown_propTypes = {
  /**
   * The menu will open above the dropdown button, instead of below it.
   */
  dropup: prop_types_default.a.bool,

  /**
   * An html id attribute, necessary for assistive technologies, such as screen readers.
   * @type {string|number}
   * @required
   */
  id: isRequiredForA11y_default()(prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number])),

  componentClass: elementType_default.a,

  /**
   * The children of a Dropdown may be a `<Dropdown.Toggle>` or a `<Dropdown.Menu>`.
   * @type {node}
   */
  children: all_default()(requiredRoles(TOGGLE_ROLE, MENU_ROLE), exclusiveRoles(MENU_ROLE)),

  /**
   * Whether or not component is disabled.
   */
  disabled: prop_types_default.a.bool,

  /**
   * Align the menu to the right side of the Dropdown toggle
   */
  pullRight: prop_types_default.a.bool,

  /**
   * Whether or not the Dropdown is visible.
   *
   * @controllable onToggle
   */
  open: prop_types_default.a.bool,

  defaultOpen: prop_types_default.a.bool,

  /**
   * A callback fired when the Dropdown wishes to change visibility. Called with the requested
   * `open` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`.
   *
   * ```js
   * function(Boolean isOpen, Object event, { String source }) {}
   * ```
   * @controllable open
   */
  onToggle: prop_types_default.a.func,

  /**
   * A callback fired when a menu item is selected.
   *
   * ```js
   * (eventKey: any, event: Object) => any
   * ```
   */
  onSelect: prop_types_default.a.func,

  /**
   * If `'menuitem'`, causes the dropdown to behave like a menu item rather than
   * a menu button.
   */
  role: prop_types_default.a.string,

  /**
   * Which event when fired outside the component will cause it to be closed
   *
   * *Note: For custom dropdown components, you will have to pass the
   * `rootCloseEvent` to `<RootCloseWrapper>` in your custom dropdown menu
   * component ([similarly to how it is implemented in `<Dropdown.Menu>`](https://github.com/react-bootstrap/react-bootstrap/blob/v0.31.5/src/DropdownMenu.js#L115-L119)).*
   */
  rootCloseEvent: prop_types_default.a.oneOf(['click', 'mousedown']),

  /**
   * @private
   */
  onMouseEnter: prop_types_default.a.func,
  /**
   * @private
   */
  onMouseLeave: prop_types_default.a.func
};

var Dropdown_defaultProps = {
  componentClass: src_ButtonGroup
};

var Dropdown_Dropdown = function (_React$Component) {
  inherits_default()(Dropdown, _React$Component);

  function Dropdown(props, context) {
    classCallCheck_default()(this, Dropdown);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleClick = _this.handleClick.bind(_this);
    _this.handleKeyDown = _this.handleKeyDown.bind(_this);
    _this.handleClose = _this.handleClose.bind(_this);

    _this._focusInDropdown = false;
    _this.lastOpenEventType = null;
    return _this;
  }

  Dropdown.prototype.componentDidMount = function componentDidMount() {
    this.focusNextOnOpen();
  };

  Dropdown.prototype.componentWillUpdate = function componentWillUpdate(nextProps) {
    if (!nextProps.open && this.props.open) {
      this._focusInDropdown = contains_default()(external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom___default.a.findDOMNode(this.menu), activeElement_default()(document));
    }
  };

  Dropdown.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
    var open = this.props.open;

    var prevOpen = prevProps.open;

    if (open && !prevOpen) {
      this.focusNextOnOpen();
    }

    if (!open && prevOpen) {
      // if focus hasn't already moved from the menu let's return it
      // to the toggle
      if (this._focusInDropdown) {
        this._focusInDropdown = false;
        this.focus();
      }
    }
  };

  Dropdown.prototype.focus = function focus() {
    var toggle = external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom___default.a.findDOMNode(this.toggle);

    if (toggle && toggle.focus) {
      toggle.focus();
    }
  };

  Dropdown.prototype.focusNextOnOpen = function focusNextOnOpen() {
    var menu = this.menu;

    if (!menu.focusNext) {
      return;
    }

    if (this.lastOpenEventType === 'keydown' || this.props.role === 'menuitem') {
      menu.focusNext();
    }
  };

  Dropdown.prototype.handleClick = function handleClick(event) {
    if (this.props.disabled) {
      return;
    }

    this.toggleOpen(event, { source: 'click' });
  };

  Dropdown.prototype.handleClose = function handleClose(event, eventDetails) {
    if (!this.props.open) {
      return;
    }

    this.toggleOpen(event, eventDetails);
  };

  Dropdown.prototype.handleKeyDown = function handleKeyDown(event) {
    if (this.props.disabled) {
      return;
    }

    switch (event.keyCode) {
      case keycode_default.a.codes.down:
        if (!this.props.open) {
          this.toggleOpen(event, { source: 'keydown' });
        } else if (this.menu.focusNext) {
          this.menu.focusNext();
        }
        event.preventDefault();
        break;
      case keycode_default.a.codes.esc:
      case keycode_default.a.codes.tab:
        this.handleClose(event, { source: 'keydown' });
        break;
      default:
    }
  };

  Dropdown.prototype.toggleOpen = function toggleOpen(event, eventDetails) {
    var open = !this.props.open;

    if (open) {
      this.lastOpenEventType = eventDetails.source;
    }

    if (this.props.onToggle) {
      this.props.onToggle(open, event, eventDetails);
    }
  };

  Dropdown.prototype.renderMenu = function renderMenu(child, _ref) {
    var _this2 = this;

    var id = _ref.id,
        onSelect = _ref.onSelect,
        rootCloseEvent = _ref.rootCloseEvent,
        props = objectWithoutProperties_default()(_ref, ['id', 'onSelect', 'rootCloseEvent']);

    var ref = function ref(c) {
      _this2.menu = c;
    };

    if (typeof child.ref === 'string') {
      undefined !== 'production' ? warning_browser_default()(false, 'String refs are not supported on `<Dropdown.Menu>` components. ' + 'To apply a ref to the component use the callback signature:\n\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : void 0;
    } else {
      ref = utils_createChainedFunction(child.ref, ref);
    }

    return Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(child, extends_default()({}, props, {
      ref: ref,
      labelledBy: id,
      bsClass: prefix(props, 'menu'),
      onClose: utils_createChainedFunction(child.props.onClose, this.handleClose),
      onSelect: utils_createChainedFunction(child.props.onSelect, onSelect, function (key, event) {
        return _this2.handleClose(event, { source: 'select' });
      }),
      rootCloseEvent: rootCloseEvent
    }));
  };

  Dropdown.prototype.renderToggle = function renderToggle(child, props) {
    var _this3 = this;

    var ref = function ref(c) {
      _this3.toggle = c;
    };

    if (typeof child.ref === 'string') {
      undefined !== 'production' ? warning_browser_default()(false, 'String refs are not supported on `<Dropdown.Toggle>` components. ' + 'To apply a ref to the component use the callback signature:\n\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : void 0;
    } else {
      ref = utils_createChainedFunction(child.ref, ref);
    }

    return Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(child, extends_default()({}, props, {
      ref: ref,
      bsClass: prefix(props, 'toggle'),
      onClick: utils_createChainedFunction(child.props.onClick, this.handleClick),
      onKeyDown: utils_createChainedFunction(child.props.onKeyDown, this.handleKeyDown)
    }));
  };

  Dropdown.prototype.render = function render() {
    var _classes,
        _this4 = this;

    var _props = this.props,
        Component = _props.componentClass,
        id = _props.id,
        dropup = _props.dropup,
        disabled = _props.disabled,
        pullRight = _props.pullRight,
        open = _props.open,
        onSelect = _props.onSelect,
        role = _props.role,
        bsClass = _props.bsClass,
        className = _props.className,
        rootCloseEvent = _props.rootCloseEvent,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'id', 'dropup', 'disabled', 'pullRight', 'open', 'onSelect', 'role', 'bsClass', 'className', 'rootCloseEvent', 'children']);

    delete props.onToggle;

    var classes = (_classes = {}, _classes[bsClass] = true, _classes.open = open, _classes.disabled = disabled, _classes);

    if (dropup) {
      classes[bsClass] = false;
      classes.dropup = true;
    }

    // This intentionally forwards bsSize and bsStyle (if set) to the
    // underlying component, to allow it to render size and style variants.

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Component,
      extends_default()({}, props, { className: classnames_default()(className, classes) }),
      ValidComponentChildren.map(children, function (child) {
        switch (child.props.bsRole) {
          case TOGGLE_ROLE:
            return _this4.renderToggle(child, {
              id: id,
              disabled: disabled,
              open: open,
              role: role,
              bsClass: bsClass
            });
          case MENU_ROLE:
            return _this4.renderMenu(child, {
              id: id,
              open: open,
              pullRight: pullRight,
              bsClass: bsClass,
              onSelect: onSelect,
              rootCloseEvent: rootCloseEvent
            });
          default:
            return child;
        }
      })
    );
  };

  return Dropdown;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Dropdown_Dropdown.propTypes = Dropdown_propTypes;
Dropdown_Dropdown.defaultProps = Dropdown_defaultProps;

bootstrapUtils_bsClass('dropdown', Dropdown_Dropdown);

var UncontrolledDropdown = uncontrollable_default()(Dropdown_Dropdown, { open: 'onToggle' });

UncontrolledDropdown.Toggle = src_DropdownToggle;
UncontrolledDropdown.Menu = src_DropdownMenu;

/* harmony default export */ var src_Dropdown = (UncontrolledDropdown);
// CONCATENATED MODULE: ./src/utils/splitComponentProps.js

function splitComponentProps(props, Component) {
  var componentPropTypes = Component.propTypes;

  var parentProps = {};
  var childProps = {};

  entries_default()(props).forEach(function (_ref) {
    var propName = _ref[0],
        propValue = _ref[1];

    if (componentPropTypes[propName]) {
      parentProps[propName] = propValue;
    } else {
      childProps[propName] = propValue;
    }
  });

  return [parentProps, childProps];
}
// CONCATENATED MODULE: ./src/DropdownButton.js











var DropdownButton_propTypes = extends_default()({}, src_Dropdown.propTypes, {

  // Toggle props.
  bsStyle: prop_types_default.a.string,
  bsSize: prop_types_default.a.string,
  title: prop_types_default.a.node.isRequired,
  noCaret: prop_types_default.a.bool,

  // Override generated docs from <Dropdown>.
  /**
   * @private
   */
  children: prop_types_default.a.node
});

var DropdownButton_DropdownButton = function (_React$Component) {
  inherits_default()(DropdownButton, _React$Component);

  function DropdownButton() {
    classCallCheck_default()(this, DropdownButton);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  DropdownButton.prototype.render = function render() {
    var _props = this.props,
        bsSize = _props.bsSize,
        bsStyle = _props.bsStyle,
        title = _props.title,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['bsSize', 'bsStyle', 'title', 'children']);

    var _splitComponentProps = splitComponentProps(props, src_Dropdown.ControlledComponent),
        dropdownProps = _splitComponentProps[0],
        toggleProps = _splitComponentProps[1];

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_Dropdown,
      extends_default()({}, dropdownProps, { bsSize: bsSize, bsStyle: bsStyle }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        src_Dropdown.Toggle,
        extends_default()({}, toggleProps, { bsSize: bsSize, bsStyle: bsStyle }),
        title
      ),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        src_Dropdown.Menu,
        null,
        children
      )
    );
  };

  return DropdownButton;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

DropdownButton_DropdownButton.propTypes = DropdownButton_propTypes;

/* harmony default export */ var src_DropdownButton = (DropdownButton_DropdownButton);
// CONCATENATED MODULE: ./src/Fade.js






var _fadeStyles;






var Fade_propTypes = {
  /**
   * Show the component; triggers the fade in or fade out animation
   */
  in: prop_types_default.a.bool,

  /**
   * Wait until the first "enter" transition to mount the component (add it to the DOM)
   */
  mountOnEnter: prop_types_default.a.bool,

  /**
   * Unmount the component (remove it from the DOM) when it is faded out
   */
  unmountOnExit: prop_types_default.a.bool,

  /**
   * Run the fade in animation when the component mounts, if it is initially
   * shown
   */
  appear: prop_types_default.a.bool,

  /**
   * Duration of the fade animation in milliseconds, to ensure that finishing
   * callbacks are fired even if the original browser transition end events are
   * canceled
   */
  timeout: prop_types_default.a.number,

  /**
   * Callback fired before the component fades in
   */
  onEnter: prop_types_default.a.func,
  /**
   * Callback fired after the component starts to fade in
   */
  onEntering: prop_types_default.a.func,
  /**
   * Callback fired after the has component faded in
   */
  onEntered: prop_types_default.a.func,
  /**
   * Callback fired before the component fades out
   */
  onExit: prop_types_default.a.func,
  /**
   * Callback fired after the component starts to fade out
   */
  onExiting: prop_types_default.a.func,
  /**
   * Callback fired after the component has faded out
   */
  onExited: prop_types_default.a.func
};

var Fade_defaultProps = {
  in: false,
  timeout: 300,
  mountOnEnter: false,
  unmountOnExit: false,
  appear: false
};

var fadeStyles = (_fadeStyles = {}, _fadeStyles[react_transition_group_Transition["ENTERING"]] = 'in', _fadeStyles[react_transition_group_Transition["ENTERED"]] = 'in', _fadeStyles);

var Fade_Fade = function (_React$Component) {
  inherits_default()(Fade, _React$Component);

  function Fade() {
    classCallCheck_default()(this, Fade);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Fade.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['className', 'children']);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Transition_default.a,
      props,
      function (status, innerProps) {
        return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.cloneElement(children, extends_default()({}, innerProps, {
          className: classnames_default()('fade', className, children.props.className, fadeStyles[status])
        }));
      }
    );
  };

  return Fade;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Fade_Fade.propTypes = Fade_propTypes;
Fade_Fade.defaultProps = Fade_defaultProps;

/* harmony default export */ var src_Fade = (Fade_Fade);
// CONCATENATED MODULE: ./src/Form.js












var Form_propTypes = {
  horizontal: prop_types_default.a.bool,
  inline: prop_types_default.a.bool,
  componentClass: elementType_default.a
};

var Form_defaultProps = {
  horizontal: false,
  inline: false,
  componentClass: 'form'
};

var Form_Form = function (_React$Component) {
  inherits_default()(Form, _React$Component);

  function Form() {
    classCallCheck_default()(this, Form);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Form.prototype.render = function render() {
    var _props = this.props,
        horizontal = _props.horizontal,
        inline = _props.inline,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['horizontal', 'inline', 'componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = [];
    if (horizontal) {
      classes.push(prefix(bsProps, 'horizontal'));
    }
    if (inline) {
      classes.push(prefix(bsProps, 'inline'));
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return Form;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Form_Form.propTypes = Form_propTypes;
Form_Form.defaultProps = Form_defaultProps;

/* harmony default export */ var src_Form = (bootstrapUtils_bsClass('form', Form_Form));
// CONCATENATED MODULE: ./src/FormControlFeedback.js












var FormControlFeedback_defaultProps = {
  bsRole: 'feedback'
};

var FormControlFeedback_contextTypes = {
  $bs_formGroup: prop_types_default.a.object
};

var FormControlFeedback_FormControlFeedback = function (_React$Component) {
  inherits_default()(FormControlFeedback, _React$Component);

  function FormControlFeedback() {
    classCallCheck_default()(this, FormControlFeedback);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  FormControlFeedback.prototype.getGlyph = function getGlyph(validationState) {
    switch (validationState) {
      case 'success':
        return 'ok';
      case 'warning':
        return 'warning-sign';
      case 'error':
        return 'remove';
      default:
        return null;
    }
  };

  FormControlFeedback.prototype.renderDefaultFeedback = function renderDefaultFeedback(formGroup, className, classes, elementProps) {
    var glyph = this.getGlyph(formGroup && formGroup.validationState);
    if (!glyph) {
      return null;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_Glyphicon, extends_default()({}, elementProps, {
      glyph: glyph,
      className: classnames_default()(className, classes)
    }));
  };

  FormControlFeedback.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['className', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    if (!children) {
      return this.renderDefaultFeedback(this.context.$bs_formGroup, className, classes, elementProps);
    }

    var child = external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.only(children);
    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.cloneElement(child, extends_default()({}, elementProps, {
      className: classnames_default()(child.props.className, className, classes)
    }));
  };

  return FormControlFeedback;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

FormControlFeedback_FormControlFeedback.defaultProps = FormControlFeedback_defaultProps;
FormControlFeedback_FormControlFeedback.contextTypes = FormControlFeedback_contextTypes;

/* harmony default export */ var src_FormControlFeedback = (bootstrapUtils_bsClass('form-control-feedback', FormControlFeedback_FormControlFeedback));
// CONCATENATED MODULE: ./src/FormControlStatic.js











var FormControlStatic_propTypes = {
  componentClass: elementType_default.a
};

var FormControlStatic_defaultProps = {
  componentClass: 'p'
};

var FormControlStatic_FormControlStatic = function (_React$Component) {
  inherits_default()(FormControlStatic, _React$Component);

  function FormControlStatic() {
    classCallCheck_default()(this, FormControlStatic);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  FormControlStatic.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return FormControlStatic;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

FormControlStatic_FormControlStatic.propTypes = FormControlStatic_propTypes;
FormControlStatic_FormControlStatic.defaultProps = FormControlStatic_defaultProps;

/* harmony default export */ var src_FormControlStatic = (bootstrapUtils_bsClass('form-control-static', FormControlStatic_FormControlStatic));
// CONCATENATED MODULE: ./src/FormControl.js
















var FormControl_propTypes = {
  componentClass: elementType_default.a,
  /**
   * Only relevant if `componentClass` is `'input'`.
   */
  type: prop_types_default.a.string,
  /**
   * Uses `controlId` from `<FormGroup>` if not explicitly specified.
   */
  id: prop_types_default.a.string,
  /**
   * Attaches a ref to the `<input>` element. Only functions can be used here.
   *
   * ```js
   * <FormControl inputRef={ref => { this.input = ref; }} />
   * ```
   */
  inputRef: prop_types_default.a.func
};

var FormControl_defaultProps = {
  componentClass: 'input'
};

var FormControl_contextTypes = {
  $bs_formGroup: prop_types_default.a.object
};

var FormControl_FormControl = function (_React$Component) {
  inherits_default()(FormControl, _React$Component);

  function FormControl() {
    classCallCheck_default()(this, FormControl);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  FormControl.prototype.render = function render() {
    var formGroup = this.context.$bs_formGroup;
    var controlId = formGroup && formGroup.controlId;

    var _props = this.props,
        Component = _props.componentClass,
        type = _props.type,
        _props$id = _props.id,
        id = _props$id === undefined ? controlId : _props$id,
        inputRef = _props.inputRef,
        className = _props.className,
        bsSize = _props.bsSize,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'type', 'id', 'inputRef', 'className', 'bsSize']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    undefined !== 'production' ? warning_browser_default()(controlId == null || id === controlId, '`controlId` is ignored on `<FormControl>` when `id` is specified.') : void 0;

    // input[type="file"] should not have .form-control.
    var classes = void 0;
    if (type !== 'file') {
      classes = getClassSet(bsProps);
    }

    // If user provides a size, make sure to append it to classes as input-
    // e.g. if bsSize is small, it will append input-sm
    if (bsSize) {
      var size = SIZE_MAP[bsSize] || bsSize;
      classes[prefix({ bsClass: 'input' }, size)] = true;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, {
      type: type,
      id: id,
      ref: inputRef,
      className: classnames_default()(className, classes)
    }));
  };

  return FormControl;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

FormControl_FormControl.propTypes = FormControl_propTypes;
FormControl_FormControl.defaultProps = FormControl_defaultProps;
FormControl_FormControl.contextTypes = FormControl_contextTypes;

FormControl_FormControl.Feedback = src_FormControlFeedback;
FormControl_FormControl.Static = src_FormControlStatic;

/* harmony default export */ var src_FormControl = (bootstrapUtils_bsClass('form-control', bsSizes([Size.SMALL, Size.LARGE], FormControl_FormControl)));
// CONCATENATED MODULE: ./src/FormGroup.js













var FormGroup_propTypes = {
  /**
   * Sets `id` on `<FormControl>` and `htmlFor` on `<FormGroup.Label>`.
   */
  controlId: prop_types_default.a.string,
  validationState: prop_types_default.a.oneOf(['success', 'warning', 'error', null])
};

var FormGroup_childContextTypes = {
  $bs_formGroup: prop_types_default.a.object.isRequired
};

var FormGroup_FormGroup = function (_React$Component) {
  inherits_default()(FormGroup, _React$Component);

  function FormGroup() {
    classCallCheck_default()(this, FormGroup);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  FormGroup.prototype.getChildContext = function getChildContext() {
    var _props = this.props,
        controlId = _props.controlId,
        validationState = _props.validationState;


    return {
      $bs_formGroup: {
        controlId: controlId,
        validationState: validationState
      }
    };
  };

  FormGroup.prototype.hasFeedback = function hasFeedback(children) {
    var _this2 = this;

    return ValidComponentChildren.some(children, function (child) {
      return child.props.bsRole === 'feedback' || child.props.children && _this2.hasFeedback(child.props.children);
    });
  };

  FormGroup.prototype.render = function render() {
    var _props2 = this.props,
        validationState = _props2.validationState,
        className = _props2.className,
        children = _props2.children,
        props = objectWithoutProperties_default()(_props2, ['validationState', 'className', 'children']);

    var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['controlId']),
        bsProps = _splitBsPropsAndOmit[0],
        elementProps = _splitBsPropsAndOmit[1];

    var classes = extends_default()({}, getClassSet(bsProps), {
      'has-feedback': this.hasFeedback(children)
    });
    if (validationState) {
      classes['has-' + validationState] = true;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      children
    );
  };

  return FormGroup;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

FormGroup_FormGroup.propTypes = FormGroup_propTypes;
FormGroup_FormGroup.childContextTypes = FormGroup_childContextTypes;

/* harmony default export */ var src_FormGroup = (bootstrapUtils_bsClass('form-group', bsSizes([Size.LARGE, Size.SMALL], FormGroup_FormGroup)));
// CONCATENATED MODULE: ./src/Grid.js












var Grid_propTypes = {
  /**
   * Turn any fixed-width grid layout into a full-width layout by this property.
   *
   * Adds `container-fluid` class.
   */
  fluid: prop_types_default.a.bool,
  /**
   * You can use a custom element for this component
   */
  componentClass: elementType_default.a
};

var Grid_defaultProps = {
  componentClass: 'div',
  fluid: false
};

var Grid_Grid = function (_React$Component) {
  inherits_default()(Grid, _React$Component);

  function Grid() {
    classCallCheck_default()(this, Grid);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Grid.prototype.render = function render() {
    var _props = this.props,
        fluid = _props.fluid,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['fluid', 'componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = prefix(bsProps, fluid && 'fluid');

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return Grid;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Grid_Grid.propTypes = Grid_propTypes;
Grid_Grid.defaultProps = Grid_defaultProps;

/* harmony default export */ var src_Grid = (bootstrapUtils_bsClass('container', Grid_Grid));
// CONCATENATED MODULE: ./src/HelpBlock.js










var HelpBlock_HelpBlock = function (_React$Component) {
  inherits_default()(HelpBlock, _React$Component);

  function HelpBlock() {
    classCallCheck_default()(this, HelpBlock);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  HelpBlock.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('span', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return HelpBlock;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

/* harmony default export */ var src_HelpBlock = (bootstrapUtils_bsClass('help-block', HelpBlock_HelpBlock));
// CONCATENATED MODULE: ./src/Image.js











var Image_propTypes = {
  /**
   * Sets image as responsive image
   */
  responsive: prop_types_default.a.bool,

  /**
   * Sets image shape as rounded
   */
  rounded: prop_types_default.a.bool,

  /**
   * Sets image shape as circle
   */
  circle: prop_types_default.a.bool,

  /**
   * Sets image shape as thumbnail
   */
  thumbnail: prop_types_default.a.bool
};

var Image_defaultProps = {
  responsive: false,
  rounded: false,
  circle: false,
  thumbnail: false
};

var Image_Image = function (_React$Component) {
  inherits_default()(Image, _React$Component);

  function Image() {
    classCallCheck_default()(this, Image);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Image.prototype.render = function render() {
    var _classes;

    var _props = this.props,
        responsive = _props.responsive,
        rounded = _props.rounded,
        circle = _props.circle,
        thumbnail = _props.thumbnail,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['responsive', 'rounded', 'circle', 'thumbnail', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = (_classes = {}, _classes[prefix(bsProps, 'responsive')] = responsive, _classes[prefix(bsProps, 'rounded')] = rounded, _classes[prefix(bsProps, 'circle')] = circle, _classes[prefix(bsProps, 'thumbnail')] = thumbnail, _classes);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('img', extends_default()({}, elementProps, {
      className: classnames_default()(className, classes)
    }));
  };

  return Image;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Image_Image.propTypes = Image_propTypes;
Image_Image.defaultProps = Image_defaultProps;

/* harmony default export */ var src_Image = (bootstrapUtils_bsClass('img', Image_Image));
// CONCATENATED MODULE: ./src/InputGroupAddon.js










var InputGroupAddon_InputGroupAddon = function (_React$Component) {
  inherits_default()(InputGroupAddon, _React$Component);

  function InputGroupAddon() {
    classCallCheck_default()(this, InputGroupAddon);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  InputGroupAddon.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('span', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return InputGroupAddon;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

/* harmony default export */ var src_InputGroupAddon = (bootstrapUtils_bsClass('input-group-addon', InputGroupAddon_InputGroupAddon));
// CONCATENATED MODULE: ./src/InputGroupButton.js










var InputGroupButton_InputGroupButton = function (_React$Component) {
  inherits_default()(InputGroupButton, _React$Component);

  function InputGroupButton() {
    classCallCheck_default()(this, InputGroupButton);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  InputGroupButton.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('span', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return InputGroupButton;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

/* harmony default export */ var src_InputGroupButton = (bootstrapUtils_bsClass('input-group-btn', InputGroupButton_InputGroupButton));
// CONCATENATED MODULE: ./src/InputGroup.js













var InputGroup_InputGroup = function (_React$Component) {
  inherits_default()(InputGroup, _React$Component);

  function InputGroup() {
    classCallCheck_default()(this, InputGroup);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  InputGroup.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('span', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return InputGroup;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

InputGroup_InputGroup.Addon = src_InputGroupAddon;
InputGroup_InputGroup.Button = src_InputGroupButton;

/* harmony default export */ var src_InputGroup = (bootstrapUtils_bsClass('input-group', bsSizes([Size.LARGE, Size.SMALL], InputGroup_InputGroup)));
// CONCATENATED MODULE: ./src/Jumbotron.js











var Jumbotron_propTypes = {
  componentClass: elementType_default.a
};

var Jumbotron_defaultProps = {
  componentClass: 'div'
};

var Jumbotron_Jumbotron = function (_React$Component) {
  inherits_default()(Jumbotron, _React$Component);

  function Jumbotron() {
    classCallCheck_default()(this, Jumbotron);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Jumbotron.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return Jumbotron;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Jumbotron_Jumbotron.propTypes = Jumbotron_propTypes;
Jumbotron_Jumbotron.defaultProps = Jumbotron_defaultProps;

/* harmony default export */ var src_Jumbotron = (bootstrapUtils_bsClass('jumbotron', Jumbotron_Jumbotron));
// CONCATENATED MODULE: ./src/Label.js












var Label_Label = function (_React$Component) {
  inherits_default()(Label, _React$Component);

  function Label() {
    classCallCheck_default()(this, Label);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Label.prototype.hasContent = function hasContent(children) {
    var result = false;

    external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.forEach(children, function (child) {
      if (result) {
        return;
      }

      if (child || child === 0) {
        result = true;
      }
    });

    return result;
  };

  Label.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['className', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), {

      // Hack for collapsing on IE8.
      hidden: !this.hasContent(children)
    });

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'span',
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      children
    );
  };

  return Label;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

/* harmony default export */ var src_Label = (bootstrapUtils_bsClass('label', bsStyles([].concat(values_default()(State), [Style.DEFAULT, Style.PRIMARY]), Style.DEFAULT, Label_Label)));
// CONCATENATED MODULE: ./src/ListGroupItem.js













var ListGroupItem_propTypes = {
  active: prop_types_default.a.any,
  disabled: prop_types_default.a.any,
  header: prop_types_default.a.node,
  listItem: prop_types_default.a.bool,
  onClick: prop_types_default.a.func,
  href: prop_types_default.a.string,
  type: prop_types_default.a.string
};

var ListGroupItem_defaultProps = {
  listItem: false
};

var ListGroupItem_ListGroupItem = function (_React$Component) {
  inherits_default()(ListGroupItem, _React$Component);

  function ListGroupItem() {
    classCallCheck_default()(this, ListGroupItem);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ListGroupItem.prototype.renderHeader = function renderHeader(header, headingClassName) {
    if (external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(header)) {
      return Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(header, {
        className: classnames_default()(header.props.className, headingClassName)
      });
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'h4',
      { className: headingClassName },
      header
    );
  };

  ListGroupItem.prototype.render = function render() {
    var _props = this.props,
        active = _props.active,
        disabled = _props.disabled,
        className = _props.className,
        header = _props.header,
        listItem = _props.listItem,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['active', 'disabled', 'className', 'header', 'listItem', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), {
      active: active,
      disabled: disabled
    });

    var Component = void 0;

    if (elementProps.href) {
      Component = 'a';
    } else if (elementProps.onClick) {
      Component = 'button';
      elementProps.type = elementProps.type || 'button';
    } else if (listItem) {
      Component = 'li';
    } else {
      Component = 'span';
    }

    elementProps.className = classnames_default()(className, classes);

    // TODO: Deprecate `header` prop.
    if (header) {
      return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        Component,
        elementProps,
        this.renderHeader(header, prefix(bsProps, 'heading')),
        external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
          'p',
          { className: prefix(bsProps, 'text') },
          children
        )
      );
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Component,
      elementProps,
      children
    );
  };

  return ListGroupItem;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ListGroupItem_ListGroupItem.propTypes = ListGroupItem_propTypes;
ListGroupItem_ListGroupItem.defaultProps = ListGroupItem_defaultProps;

/* harmony default export */ var src_ListGroupItem = (bootstrapUtils_bsClass('list-group-item', bsStyles(values_default()(State), ListGroupItem_ListGroupItem)));
// CONCATENATED MODULE: ./src/ListGroup.js













var ListGroup_propTypes = {
  /**
   * You can use a custom element type for this component.
   *
   * If not specified, it will be treated as `'li'` if every child is a
   * non-actionable `<ListGroupItem>`, and `'div'` otherwise.
   */
  componentClass: elementType_default.a
};

function getDefaultComponent(children) {
  if (!children) {
    // FIXME: This is the old behavior. Is this right?
    return 'div';
  }

  if (ValidComponentChildren.some(children, function (child) {
    return child.type !== src_ListGroupItem || child.props.href || child.props.onClick;
  })) {
    return 'div';
  }

  return 'ul';
}

var ListGroup_ListGroup = function (_React$Component) {
  inherits_default()(ListGroup, _React$Component);

  function ListGroup() {
    classCallCheck_default()(this, ListGroup);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ListGroup.prototype.render = function render() {
    var _props = this.props,
        children = _props.children,
        _props$componentClass = _props.componentClass,
        Component = _props$componentClass === undefined ? getDefaultComponent(children) : _props$componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['children', 'componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    var useListItem = Component === 'ul' && ValidComponentChildren.every(children, function (child) {
      return child.type === src_ListGroupItem;
    });

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Component,
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      useListItem ? ValidComponentChildren.map(children, function (child) {
        return Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(child, { listItem: true });
      }) : children
    );
  };

  return ListGroup;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ListGroup_ListGroup.propTypes = ListGroup_propTypes;

/* harmony default export */ var src_ListGroup = (bootstrapUtils_bsClass('list-group', ListGroup_ListGroup));
// CONCATENATED MODULE: ./src/MediaBody.js













var MediaBody_propTypes = {
  /**
   * Align the media to the top, middle, or bottom of the media object.
   */
  align: prop_types_default.a.oneOf(['top', 'middle', 'bottom']),

  componentClass: elementType_default.a
};

var MediaBody_defaultProps = {
  componentClass: 'div'
};

var MediaBody_MediaBody = function (_React$Component) {
  inherits_default()(MediaBody, _React$Component);

  function MediaBody() {
    classCallCheck_default()(this, MediaBody);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  MediaBody.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        align = _props.align,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'align', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    if (align) {
      // The class is e.g. `media-top`, not `media-left-top`.
      classes[prefix(src_Media.defaultProps, align)] = true;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return MediaBody;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

MediaBody_MediaBody.propTypes = MediaBody_propTypes;
MediaBody_MediaBody.defaultProps = MediaBody_defaultProps;

/* harmony default export */ var src_MediaBody = (bootstrapUtils_bsClass('media-body', MediaBody_MediaBody));
// CONCATENATED MODULE: ./src/MediaHeading.js











var MediaHeading_propTypes = {
  componentClass: elementType_default.a
};

var MediaHeading_defaultProps = {
  componentClass: 'h4'
};

var MediaHeading_MediaHeading = function (_React$Component) {
  inherits_default()(MediaHeading, _React$Component);

  function MediaHeading() {
    classCallCheck_default()(this, MediaHeading);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  MediaHeading.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return MediaHeading;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

MediaHeading_MediaHeading.propTypes = MediaHeading_propTypes;
MediaHeading_MediaHeading.defaultProps = MediaHeading_defaultProps;

/* harmony default export */ var src_MediaHeading = (bootstrapUtils_bsClass('media-heading', MediaHeading_MediaHeading));
// CONCATENATED MODULE: ./src/MediaLeft.js












var MediaLeft_propTypes = {
  /**
   * Align the media to the top, middle, or bottom of the media object.
   */
  align: prop_types_default.a.oneOf(['top', 'middle', 'bottom'])
};

var MediaLeft_MediaLeft = function (_React$Component) {
  inherits_default()(MediaLeft, _React$Component);

  function MediaLeft() {
    classCallCheck_default()(this, MediaLeft);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  MediaLeft.prototype.render = function render() {
    var _props = this.props,
        align = _props.align,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['align', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    if (align) {
      // The class is e.g. `media-top`, not `media-left-top`.
      classes[prefix(src_Media.defaultProps, align)] = true;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('div', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return MediaLeft;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

MediaLeft_MediaLeft.propTypes = MediaLeft_propTypes;

/* harmony default export */ var src_MediaLeft = (bootstrapUtils_bsClass('media-left', MediaLeft_MediaLeft));
// CONCATENATED MODULE: ./src/MediaList.js










var MediaList_MediaList = function (_React$Component) {
  inherits_default()(MediaList, _React$Component);

  function MediaList() {
    classCallCheck_default()(this, MediaList);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  MediaList.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('ul', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return MediaList;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

/* harmony default export */ var src_MediaList = (bootstrapUtils_bsClass('media-list', MediaList_MediaList));
// CONCATENATED MODULE: ./src/MediaListItem.js










var MediaListItem_MediaListItem = function (_React$Component) {
  inherits_default()(MediaListItem, _React$Component);

  function MediaListItem() {
    classCallCheck_default()(this, MediaListItem);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  MediaListItem.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('li', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return MediaListItem;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

/* harmony default export */ var src_MediaListItem = (bootstrapUtils_bsClass('media', MediaListItem_MediaListItem));
// CONCATENATED MODULE: ./src/MediaRight.js












var MediaRight_propTypes = {
  /**
   * Align the media to the top, middle, or bottom of the media object.
   */
  align: prop_types_default.a.oneOf(['top', 'middle', 'bottom'])
};

var MediaRight_MediaRight = function (_React$Component) {
  inherits_default()(MediaRight, _React$Component);

  function MediaRight() {
    classCallCheck_default()(this, MediaRight);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  MediaRight.prototype.render = function render() {
    var _props = this.props,
        align = _props.align,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['align', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    if (align) {
      // The class is e.g. `media-top`, not `media-right-top`.
      classes[prefix(src_Media.defaultProps, align)] = true;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('div', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return MediaRight;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

MediaRight_MediaRight.propTypes = MediaRight_propTypes;

/* harmony default export */ var src_MediaRight = (bootstrapUtils_bsClass('media-right', MediaRight_MediaRight));
// CONCATENATED MODULE: ./src/Media.js

















var Media_propTypes = {
  componentClass: elementType_default.a
};

var Media_defaultProps = {
  componentClass: 'div'
};

var Media_Media = function (_React$Component) {
  inherits_default()(Media, _React$Component);

  function Media() {
    classCallCheck_default()(this, Media);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Media.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return Media;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Media_Media.propTypes = Media_propTypes;
Media_Media.defaultProps = Media_defaultProps;

Media_Media.Heading = src_MediaHeading;
Media_Media.Body = src_MediaBody;
Media_Media.Left = src_MediaLeft;
Media_Media.Right = src_MediaRight;
Media_Media.List = src_MediaList;
Media_Media.ListItem = src_MediaListItem;

/* harmony default export */ var src_Media = (bootstrapUtils_bsClass('media', Media_Media));
// CONCATENATED MODULE: ./src/MenuItem.js














var MenuItem_propTypes = {
  /**
   * Highlight the menu item as active.
   */
  active: prop_types_default.a.bool,

  /**
   * Disable the menu item, making it unselectable.
   */
  disabled: prop_types_default.a.bool,

  /**
   * Styles the menu item as a horizontal rule, providing visual separation between
   * groups of menu items.
   */
  divider: all_default()(prop_types_default.a.bool, function (_ref) {
    var divider = _ref.divider,
        children = _ref.children;
    return divider && children ? new Error('Children will not be rendered for dividers') : null;
  }),

  /**
   * Value passed to the `onSelect` handler, useful for identifying the selected menu item.
   */
  eventKey: prop_types_default.a.any,

  /**
   * Styles the menu item as a header label, useful for describing a group of menu items.
   */
  header: prop_types_default.a.bool,

  /**
   * HTML `href` attribute corresponding to `a.href`.
   */
  href: prop_types_default.a.string,

  /**
   * Callback fired when the menu item is clicked.
   */
  onClick: prop_types_default.a.func,

  /**
   * Callback fired when the menu item is selected.
   *
   * ```js
   * (eventKey: any, event: Object) => any
   * ```
   */
  onSelect: prop_types_default.a.func
};

var MenuItem_defaultProps = {
  divider: false,
  disabled: false,
  header: false
};

var MenuItem_MenuItem = function (_React$Component) {
  inherits_default()(MenuItem, _React$Component);

  function MenuItem(props, context) {
    classCallCheck_default()(this, MenuItem);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleClick = _this.handleClick.bind(_this);
    return _this;
  }

  MenuItem.prototype.handleClick = function handleClick(event) {
    var _props = this.props,
        href = _props.href,
        disabled = _props.disabled,
        onSelect = _props.onSelect,
        eventKey = _props.eventKey;


    if (!href || disabled) {
      event.preventDefault();
    }

    if (disabled) {
      return;
    }

    if (onSelect) {
      onSelect(eventKey, event);
    }
  };

  MenuItem.prototype.render = function render() {
    var _props2 = this.props,
        active = _props2.active,
        disabled = _props2.disabled,
        divider = _props2.divider,
        header = _props2.header,
        onClick = _props2.onClick,
        className = _props2.className,
        style = _props2.style,
        props = objectWithoutProperties_default()(_props2, ['active', 'disabled', 'divider', 'header', 'onClick', 'className', 'style']);

    var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['eventKey', 'onSelect']),
        bsProps = _splitBsPropsAndOmit[0],
        elementProps = _splitBsPropsAndOmit[1];

    if (divider) {
      // Forcibly blank out the children; separators shouldn't render any.
      elementProps.children = undefined;

      return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('li', extends_default()({}, elementProps, {
        role: 'separator',
        className: classnames_default()(className, 'divider'),
        style: style
      }));
    }

    if (header) {
      return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('li', extends_default()({}, elementProps, {
        role: 'heading',
        className: classnames_default()(className, prefix(bsProps, 'header')),
        style: style
      }));
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'li',
      {
        role: 'presentation',
        className: classnames_default()(className, { active: active, disabled: disabled }),
        style: style
      },
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_SafeAnchor, extends_default()({}, elementProps, {
        role: 'menuitem',
        tabIndex: '-1',
        onClick: utils_createChainedFunction(onClick, this.handleClick)
      }))
    );
  };

  return MenuItem;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

MenuItem_MenuItem.propTypes = MenuItem_propTypes;
MenuItem_MenuItem.defaultProps = MenuItem_defaultProps;

/* harmony default export */ var src_MenuItem = (bootstrapUtils_bsClass('dropdown', MenuItem_MenuItem));
// EXTERNAL MODULE: ./node_modules/dom-helpers/events/index.js
var events = __webpack_require__(154);
var events_default = /*#__PURE__*/__webpack_require__.n(events);

// EXTERNAL MODULE: ./node_modules/dom-helpers/ownerDocument.js
var ownerDocument = __webpack_require__(25);
var ownerDocument_default = /*#__PURE__*/__webpack_require__.n(ownerDocument);

// EXTERNAL MODULE: ./node_modules/dom-helpers/util/inDOM.js
var inDOM = __webpack_require__(15);
var inDOM_default = /*#__PURE__*/__webpack_require__.n(inDOM);

// EXTERNAL MODULE: ./node_modules/dom-helpers/util/scrollbarSize.js
var scrollbarSize = __webpack_require__(85);
var scrollbarSize_default = /*#__PURE__*/__webpack_require__.n(scrollbarSize);

// EXTERNAL MODULE: ./node_modules/react-overlays/lib/Modal.js
var lib_Modal = __webpack_require__(158);
var Modal_default = /*#__PURE__*/__webpack_require__.n(lib_Modal);

// EXTERNAL MODULE: ./node_modules/react-overlays/lib/utils/isOverflowing.js
var isOverflowing = __webpack_require__(87);
var isOverflowing_default = /*#__PURE__*/__webpack_require__.n(isOverflowing);

// CONCATENATED MODULE: ./src/ModalBody.js











var ModalBody_propTypes = {
  componentClass: elementType_default.a
};

var ModalBody_defaultProps = {
  componentClass: 'div'
};

var ModalBody_ModalBody = function (_React$Component) {
  inherits_default()(ModalBody, _React$Component);

  function ModalBody() {
    classCallCheck_default()(this, ModalBody);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ModalBody.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return ModalBody;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ModalBody_ModalBody.propTypes = ModalBody_propTypes;
ModalBody_ModalBody.defaultProps = ModalBody_defaultProps;

/* harmony default export */ var src_ModalBody = (bootstrapUtils_bsClass('modal-body', ModalBody_ModalBody));
// CONCATENATED MODULE: ./src/ModalDialog.js












var ModalDialog_propTypes = {
  /**
   * A css class to apply to the Modal dialog DOM node.
   */
  dialogClassName: prop_types_default.a.string
};

var ModalDialog_ModalDialog = function (_React$Component) {
  inherits_default()(ModalDialog, _React$Component);

  function ModalDialog() {
    classCallCheck_default()(this, ModalDialog);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ModalDialog.prototype.render = function render() {
    var _extends2;

    var _props = this.props,
        dialogClassName = _props.dialogClassName,
        className = _props.className,
        style = _props.style,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['dialogClassName', 'className', 'style', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var bsClassName = prefix(bsProps);

    var modalStyle = extends_default()({ display: 'block' }, style);

    var dialogClasses = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[bsClassName] = false, _extends2[prefix(bsProps, 'dialog')] = true, _extends2));

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, {
        tabIndex: '-1',
        role: 'dialog',
        style: modalStyle,
        className: classnames_default()(className, bsClassName)
      }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'div',
        { className: classnames_default()(dialogClassName, dialogClasses) },
        external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
          'div',
          { className: prefix(bsProps, 'content'), role: 'document' },
          children
        )
      )
    );
  };

  return ModalDialog;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ModalDialog_ModalDialog.propTypes = ModalDialog_propTypes;

/* harmony default export */ var src_ModalDialog = (bootstrapUtils_bsClass('modal', bsSizes([Size.LARGE, Size.SMALL], ModalDialog_ModalDialog)));
// CONCATENATED MODULE: ./src/ModalFooter.js











var ModalFooter_propTypes = {
  componentClass: elementType_default.a
};

var ModalFooter_defaultProps = {
  componentClass: 'div'
};

var ModalFooter_ModalFooter = function (_React$Component) {
  inherits_default()(ModalFooter, _React$Component);

  function ModalFooter() {
    classCallCheck_default()(this, ModalFooter);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ModalFooter.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return ModalFooter;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ModalFooter_ModalFooter.propTypes = ModalFooter_propTypes;
ModalFooter_ModalFooter.defaultProps = ModalFooter_defaultProps;

/* harmony default export */ var src_ModalFooter = (bootstrapUtils_bsClass('modal-footer', ModalFooter_ModalFooter));
// CONCATENATED MODULE: ./src/ModalHeader.js













// TODO: `aria-label` should be `closeLabel`.

var ModalHeader_propTypes = {
  /**
   * Provides an accessible label for the close
   * button. It is used for Assistive Technology when the label text is not
   * readable.
   */
  closeLabel: prop_types_default.a.string,

  /**
   * Specify whether the Component should contain a close button
   */
  closeButton: prop_types_default.a.bool,

  /**
   * A Callback fired when the close button is clicked. If used directly inside
   * a Modal component, the onHide will automatically be propagated up to the
   * parent Modal `onHide`.
   */
  onHide: prop_types_default.a.func
};

var ModalHeader_defaultProps = {
  closeLabel: 'Close',
  closeButton: false
};

var ModalHeader_contextTypes = {
  $bs_modal: prop_types_default.a.shape({
    onHide: prop_types_default.a.func
  })
};

var ModalHeader_ModalHeader = function (_React$Component) {
  inherits_default()(ModalHeader, _React$Component);

  function ModalHeader() {
    classCallCheck_default()(this, ModalHeader);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ModalHeader.prototype.render = function render() {
    var _props = this.props,
        closeLabel = _props.closeLabel,
        closeButton = _props.closeButton,
        onHide = _props.onHide,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['closeLabel', 'closeButton', 'onHide', 'className', 'children']);

    var modal = this.context.$bs_modal;

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      closeButton && external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_CloseButton, {
        label: closeLabel,
        onClick: utils_createChainedFunction(modal && modal.onHide, onHide)
      }),
      children
    );
  };

  return ModalHeader;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ModalHeader_ModalHeader.propTypes = ModalHeader_propTypes;
ModalHeader_ModalHeader.defaultProps = ModalHeader_defaultProps;
ModalHeader_ModalHeader.contextTypes = ModalHeader_contextTypes;

/* harmony default export */ var src_ModalHeader = (bootstrapUtils_bsClass('modal-header', ModalHeader_ModalHeader));
// CONCATENATED MODULE: ./src/ModalTitle.js











var ModalTitle_propTypes = {
  componentClass: elementType_default.a
};

var ModalTitle_defaultProps = {
  componentClass: 'h4'
};

var ModalTitle_ModalTitle = function (_React$Component) {
  inherits_default()(ModalTitle, _React$Component);

  function ModalTitle() {
    classCallCheck_default()(this, ModalTitle);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ModalTitle.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return ModalTitle;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ModalTitle_ModalTitle.propTypes = ModalTitle_propTypes;
ModalTitle_ModalTitle.defaultProps = ModalTitle_defaultProps;

/* harmony default export */ var src_ModalTitle = (bootstrapUtils_bsClass('modal-title', ModalTitle_ModalTitle));
// CONCATENATED MODULE: ./src/Modal.js




























var Modal_propTypes = extends_default()({}, Modal_default.a.propTypes, src_ModalDialog.propTypes, {

  /**
   * Include a backdrop component. Specify 'static' for a backdrop that doesn't
   * trigger an "onHide" when clicked.
   */
  backdrop: prop_types_default.a.oneOf(['static', true, false]),

  /**
   * Add an optional extra class name to .modal-backdrop
   * It could end up looking like class="modal-backdrop foo-modal-backdrop in".
   */
  backdropClassName: prop_types_default.a.string,

  /**
   * Close the modal when escape key is pressed
   */
  keyboard: prop_types_default.a.bool,

  /**
   * Open and close the Modal with a slide and fade animation.
   */
  animation: prop_types_default.a.bool,

  /**
   * A Component type that provides the modal content Markup. This is a useful
   * prop when you want to use your own styles and markup to create a custom
   * modal component.
   */
  dialogComponentClass: elementType_default.a,

  /**
   * When `true` The modal will automatically shift focus to itself when it
   * opens, and replace it to the last focused element when it closes.
   * Generally this should never be set to false as it makes the Modal less
   * accessible to assistive technologies, like screen-readers.
   */
  autoFocus: prop_types_default.a.bool,

  /**
   * When `true` The modal will prevent focus from leaving the Modal while
   * open. Consider leaving the default value here, as it is necessary to make
   * the Modal work well with assistive technologies, such as screen readers.
   */
  enforceFocus: prop_types_default.a.bool,

  /**
   * When `true` The modal will restore focus to previously focused element once
   * modal is hidden
   */
  restoreFocus: prop_types_default.a.bool,

  /**
   * When `true` The modal will show itself.
   */
  show: prop_types_default.a.bool,

  /**
   * A callback fired when the header closeButton or non-static backdrop is
   * clicked. Required if either are specified.
   */
  onHide: prop_types_default.a.func,

  /**
   * Callback fired before the Modal transitions in
   */
  onEnter: prop_types_default.a.func,

  /**
   * Callback fired as the Modal begins to transition in
   */
  onEntering: prop_types_default.a.func,

  /**
   * Callback fired after the Modal finishes transitioning in
   */
  onEntered: prop_types_default.a.func,

  /**
   * Callback fired right before the Modal transitions out
   */
  onExit: prop_types_default.a.func,

  /**
   * Callback fired as the Modal begins to transition out
   */
  onExiting: prop_types_default.a.func,

  /**
   * Callback fired after the Modal finishes transitioning out
   */
  onExited: prop_types_default.a.func,

  /**
   * @private
   */
  container: Modal_default.a.propTypes.container
});

var Modal_defaultProps = extends_default()({}, Modal_default.a.defaultProps, {
  animation: true,
  dialogComponentClass: src_ModalDialog
});

var Modal_childContextTypes = {
  $bs_modal: prop_types_default.a.shape({
    onHide: prop_types_default.a.func
  })
};

/* eslint-disable no-use-before-define, react/no-multi-comp */
function DialogTransition(props) {
  return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_Fade, extends_default()({}, props, { timeout: Modal_Modal.TRANSITION_DURATION }));
}

function BackdropTransition(props) {
  return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_Fade, extends_default()({}, props, { timeout: Modal_Modal.BACKDROP_TRANSITION_DURATION }));
}

/* eslint-enable no-use-before-define */

var Modal_Modal = function (_React$Component) {
  inherits_default()(Modal, _React$Component);

  function Modal(props, context) {
    classCallCheck_default()(this, Modal);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleEntering = _this.handleEntering.bind(_this);
    _this.handleExited = _this.handleExited.bind(_this);
    _this.handleWindowResize = _this.handleWindowResize.bind(_this);
    _this.handleDialogClick = _this.handleDialogClick.bind(_this);
    _this.setModalRef = _this.setModalRef.bind(_this);

    _this.state = {
      style: {}
    };
    return _this;
  }

  Modal.prototype.getChildContext = function getChildContext() {
    return {
      $bs_modal: {
        onHide: this.props.onHide
      }
    };
  };

  Modal.prototype.componentWillUnmount = function componentWillUnmount() {
    // Clean up the listener if we need to.
    this.handleExited();
  };

  Modal.prototype.setModalRef = function setModalRef(ref) {
    this._modal = ref;
  };

  Modal.prototype.handleDialogClick = function handleDialogClick(e) {
    if (e.target !== e.currentTarget) {
      return;
    }

    this.props.onHide();
  };

  Modal.prototype.handleEntering = function handleEntering() {
    // FIXME: This should work even when animation is disabled.
    events_default.a.on(window, 'resize', this.handleWindowResize);
    this.updateStyle();
  };

  Modal.prototype.handleExited = function handleExited() {
    // FIXME: This should work even when animation is disabled.
    events_default.a.off(window, 'resize', this.handleWindowResize);
  };

  Modal.prototype.handleWindowResize = function handleWindowResize() {
    this.updateStyle();
  };

  Modal.prototype.updateStyle = function updateStyle() {
    if (!inDOM_default.a) {
      return;
    }

    var dialogNode = this._modal.getDialogElement();
    var dialogHeight = dialogNode.scrollHeight;

    var document = ownerDocument_default()(dialogNode);
    var bodyIsOverflowing = isOverflowing_default()(external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom___default.a.findDOMNode(this.props.container || document.body));
    var modalIsOverflowing = dialogHeight > document.documentElement.clientHeight;

    this.setState({
      style: {
        paddingRight: bodyIsOverflowing && !modalIsOverflowing ? scrollbarSize_default()() : undefined,
        paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? scrollbarSize_default()() : undefined
      }
    });
  };

  Modal.prototype.render = function render() {
    var _props = this.props,
        backdrop = _props.backdrop,
        backdropClassName = _props.backdropClassName,
        animation = _props.animation,
        show = _props.show,
        Dialog = _props.dialogComponentClass,
        className = _props.className,
        style = _props.style,
        children = _props.children,
        onEntering = _props.onEntering,
        onExited = _props.onExited,
        props = objectWithoutProperties_default()(_props, ['backdrop', 'backdropClassName', 'animation', 'show', 'dialogComponentClass', 'className', 'style', 'children', 'onEntering', 'onExited']);

    var _splitComponentProps = splitComponentProps(props, Modal_default.a),
        baseModalProps = _splitComponentProps[0],
        dialogProps = _splitComponentProps[1];

    var inClassName = show && !animation && 'in';

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Modal_default.a,
      extends_default()({}, baseModalProps, {
        ref: this.setModalRef,
        show: show,
        containerClassName: prefix(props, 'open'),
        transition: animation ? DialogTransition : undefined,
        backdrop: backdrop,
        backdropTransition: animation ? BackdropTransition : undefined,
        backdropClassName: classnames_default()(prefix(props, 'backdrop'), backdropClassName, inClassName),
        onEntering: utils_createChainedFunction(onEntering, this.handleEntering),
        onExited: utils_createChainedFunction(onExited, this.handleExited)
      }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        Dialog,
        extends_default()({}, dialogProps, {
          style: extends_default()({}, this.state.style, style),
          className: classnames_default()(className, inClassName),
          onClick: backdrop === true ? this.handleDialogClick : null
        }),
        children
      )
    );
  };

  return Modal;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Modal_Modal.propTypes = Modal_propTypes;
Modal_Modal.defaultProps = Modal_defaultProps;
Modal_Modal.childContextTypes = Modal_childContextTypes;

Modal_Modal.Body = src_ModalBody;
Modal_Modal.Header = src_ModalHeader;
Modal_Modal.Title = src_ModalTitle;
Modal_Modal.Footer = src_ModalFooter;

Modal_Modal.Dialog = src_ModalDialog;

Modal_Modal.TRANSITION_DURATION = 300;
Modal_Modal.BACKDROP_TRANSITION_DURATION = 150;

/* harmony default export */ var src_Modal = (bootstrapUtils_bsClass('modal', bsSizes([Size.LARGE, Size.SMALL], Modal_Modal)));
// CONCATENATED MODULE: ./src/Nav.js

















// TODO: Should we expose `<NavItem>` as `<Nav.Item>`?

// TODO: This `bsStyle` is very unlike the others. Should we rename it?

// TODO: `pullRight` and `pullLeft` don't render right outside of `navbar`.
// Consider renaming or replacing them.

var Nav_propTypes = {
  /**
   * Marks the NavItem with a matching `eventKey` as active. Has a
   * higher precedence over `activeHref`.
   */
  activeKey: prop_types_default.a.any,

  /**
   * Marks the child NavItem with a matching `href` prop as active.
   */
  activeHref: prop_types_default.a.string,

  /**
   * NavItems are be positioned vertically.
   */
  stacked: prop_types_default.a.bool,

  justified: all_default()(prop_types_default.a.bool, function (_ref) {
    var justified = _ref.justified,
        navbar = _ref.navbar;
    return justified && navbar ? Error('justified navbar `Nav`s are not supported') : null;
  }),

  /**
   * A callback fired when a NavItem is selected.
   *
   * ```js
   * function (
   *  Any eventKey,
   *  SyntheticEvent event?
   * )
   * ```
   */
  onSelect: prop_types_default.a.func,

  /**
   * ARIA role for the Nav, in the context of a TabContainer, the default will
   * be set to "tablist", but can be overridden by the Nav when set explicitly.
   *
   * When the role is set to "tablist" NavItem focus is managed according to
   * the ARIA authoring practices for tabs:
   * https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel
   */
  role: prop_types_default.a.string,

  /**
   * Apply styling an alignment for use in a Navbar. This prop will be set
   * automatically when the Nav is used inside a Navbar.
   */
  navbar: prop_types_default.a.bool,

  /**
   * Float the Nav to the right. When `navbar` is `true` the appropriate
   * contextual classes are added as well.
   */
  pullRight: prop_types_default.a.bool,

  /**
   * Float the Nav to the left. When `navbar` is `true` the appropriate
   * contextual classes are added as well.
   */
  pullLeft: prop_types_default.a.bool
};

var Nav_defaultProps = {
  justified: false,
  pullRight: false,
  pullLeft: false,
  stacked: false
};

var Nav_contextTypes = {
  $bs_navbar: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string,
    onSelect: prop_types_default.a.func
  }),

  $bs_tabContainer: prop_types_default.a.shape({
    activeKey: prop_types_default.a.any,
    onSelect: prop_types_default.a.func.isRequired,
    getTabId: prop_types_default.a.func.isRequired,
    getPaneId: prop_types_default.a.func.isRequired
  })
};

var Nav_Nav = function (_React$Component) {
  inherits_default()(Nav, _React$Component);

  function Nav() {
    classCallCheck_default()(this, Nav);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Nav.prototype.componentDidUpdate = function componentDidUpdate() {
    var _this2 = this;

    if (!this._needsRefocus) {
      return;
    }

    this._needsRefocus = false;

    var children = this.props.children;

    var _getActiveProps = this.getActiveProps(),
        activeKey = _getActiveProps.activeKey,
        activeHref = _getActiveProps.activeHref;

    var activeChild = ValidComponentChildren.find(children, function (child) {
      return _this2.isActive(child, activeKey, activeHref);
    });

    var childrenArray = ValidComponentChildren.toArray(children);
    var activeChildIndex = childrenArray.indexOf(activeChild);

    var childNodes = external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom___default.a.findDOMNode(this).children;
    var activeNode = childNodes && childNodes[activeChildIndex];

    if (!activeNode || !activeNode.firstChild) {
      return;
    }

    activeNode.firstChild.focus();
  };

  Nav.prototype.getActiveProps = function getActiveProps() {
    var tabContainer = this.context.$bs_tabContainer;

    if (tabContainer) {
      undefined !== 'production' ? warning_browser_default()(this.props.activeKey == null && !this.props.activeHref, 'Specifying a `<Nav>` `activeKey` or `activeHref` in the context of ' + 'a `<TabContainer>` is not supported. Instead use `<TabContainer ' + ('activeKey={' + this.props.activeKey + '} />`.')) : void 0;

      return tabContainer;
    }

    return this.props;
  };

  Nav.prototype.getNextActiveChild = function getNextActiveChild(offset) {
    var _this3 = this;

    var children = this.props.children;

    var validChildren = children.filter(function (child) {
      return child.props.eventKey != null && !child.props.disabled;
    });

    var _getActiveProps2 = this.getActiveProps(),
        activeKey = _getActiveProps2.activeKey,
        activeHref = _getActiveProps2.activeHref;

    var activeChild = ValidComponentChildren.find(children, function (child) {
      return _this3.isActive(child, activeKey, activeHref);
    });

    // This assumes the active child is not disabled.
    var activeChildIndex = validChildren.indexOf(activeChild);
    if (activeChildIndex === -1) {
      // Something has gone wrong. Select the first valid child we can find.
      return validChildren[0];
    }

    var nextIndex = activeChildIndex + offset;
    var numValidChildren = validChildren.length;

    if (nextIndex >= numValidChildren) {
      nextIndex = 0;
    } else if (nextIndex < 0) {
      nextIndex = numValidChildren - 1;
    }

    return validChildren[nextIndex];
  };

  Nav.prototype.getTabProps = function getTabProps(child, tabContainer, navRole, active, onSelect) {
    var _this4 = this;

    if (!tabContainer && navRole !== 'tablist') {
      // No tab props here.
      return null;
    }

    var _child$props = child.props,
        id = _child$props.id,
        controls = _child$props['aria-controls'],
        eventKey = _child$props.eventKey,
        role = _child$props.role,
        onKeyDown = _child$props.onKeyDown,
        tabIndex = _child$props.tabIndex;


    if (tabContainer) {
      undefined !== 'production' ? warning_browser_default()(!id && !controls, 'In the context of a `<TabContainer>`, `<NavItem>`s are given ' + 'generated `id` and `aria-controls` attributes for the sake of ' + 'proper component accessibility. Any provided ones will be ignored. ' + 'To control these attributes directly, provide a `generateChildId` ' + 'prop to the parent `<TabContainer>`.') : void 0;

      id = tabContainer.getTabId(eventKey);
      controls = tabContainer.getPaneId(eventKey);
    }

    if (navRole === 'tablist') {
      role = role || 'tab';
      onKeyDown = utils_createChainedFunction(function (event) {
        return _this4.handleTabKeyDown(onSelect, event);
      }, onKeyDown);
      tabIndex = active ? tabIndex : -1;
    }

    return {
      id: id,
      role: role,
      onKeyDown: onKeyDown,
      'aria-controls': controls,
      tabIndex: tabIndex
    };
  };

  Nav.prototype.handleTabKeyDown = function handleTabKeyDown(onSelect, event) {
    var nextActiveChild = void 0;

    switch (event.keyCode) {
      case keycode_default.a.codes.left:
      case keycode_default.a.codes.up:
        nextActiveChild = this.getNextActiveChild(-1);
        break;
      case keycode_default.a.codes.right:
      case keycode_default.a.codes.down:
        nextActiveChild = this.getNextActiveChild(1);
        break;
      default:
        // It was a different key; don't handle this keypress.
        return;
    }

    event.preventDefault();

    if (onSelect && nextActiveChild && nextActiveChild.props.eventKey != null) {
      onSelect(nextActiveChild.props.eventKey);
    }

    this._needsRefocus = true;
  };

  Nav.prototype.isActive = function isActive(_ref2, activeKey, activeHref) {
    var props = _ref2.props;

    if (props.active || activeKey != null && props.eventKey === activeKey || activeHref && props.href === activeHref) {
      return true;
    }

    return props.active;
  };

  Nav.prototype.render = function render() {
    var _extends2,
        _this5 = this;

    var _props = this.props,
        stacked = _props.stacked,
        justified = _props.justified,
        onSelect = _props.onSelect,
        propsRole = _props.role,
        propsNavbar = _props.navbar,
        pullRight = _props.pullRight,
        pullLeft = _props.pullLeft,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['stacked', 'justified', 'onSelect', 'role', 'navbar', 'pullRight', 'pullLeft', 'className', 'children']);

    var tabContainer = this.context.$bs_tabContainer;
    var role = propsRole || (tabContainer ? 'tablist' : null);

    var _getActiveProps3 = this.getActiveProps(),
        activeKey = _getActiveProps3.activeKey,
        activeHref = _getActiveProps3.activeHref;

    delete props.activeKey; // Accessed via this.getActiveProps().
    delete props.activeHref; // Accessed via this.getActiveProps().

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, 'stacked')] = stacked, _extends2[prefix(bsProps, 'justified')] = justified, _extends2));

    var navbar = propsNavbar != null ? propsNavbar : this.context.$bs_navbar;
    var pullLeftClassName = void 0;
    var pullRightClassName = void 0;

    if (navbar) {
      var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };

      classes[prefix(navbarProps, 'nav')] = true;

      pullRightClassName = prefix(navbarProps, 'right');
      pullLeftClassName = prefix(navbarProps, 'left');
    } else {
      pullRightClassName = 'pull-right';
      pullLeftClassName = 'pull-left';
    }

    classes[pullRightClassName] = pullRight;
    classes[pullLeftClassName] = pullLeft;

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'ul',
      extends_default()({}, elementProps, {
        role: role,
        className: classnames_default()(className, classes)
      }),
      ValidComponentChildren.map(children, function (child) {
        var active = _this5.isActive(child, activeKey, activeHref);
        var childOnSelect = utils_createChainedFunction(child.props.onSelect, onSelect, navbar && navbar.onSelect, tabContainer && tabContainer.onSelect);

        return Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(child, extends_default()({}, _this5.getTabProps(child, tabContainer, role, active, childOnSelect), {
          active: active,
          activeKey: activeKey,
          activeHref: activeHref,
          onSelect: childOnSelect
        }));
      })
    );
  };

  return Nav;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Nav_Nav.propTypes = Nav_propTypes;
Nav_Nav.defaultProps = Nav_defaultProps;
Nav_Nav.contextTypes = Nav_contextTypes;

/* harmony default export */ var src_Nav = (bootstrapUtils_bsClass('nav', bsStyles(['tabs', 'pills'], Nav_Nav)));
// CONCATENATED MODULE: ./src/NavbarBrand.js











var NavbarBrand_contextTypes = {
  $bs_navbar: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string
  })
};

var NavbarBrand_NavbarBrand = function (_React$Component) {
  inherits_default()(NavbarBrand, _React$Component);

  function NavbarBrand() {
    classCallCheck_default()(this, NavbarBrand);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  NavbarBrand.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['className', 'children']);

    var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };

    var bsClassName = prefix(navbarProps, 'brand');

    if (external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(children)) {
      return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.cloneElement(children, {
        className: classnames_default()(children.props.className, className, bsClassName)
      });
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'span',
      extends_default()({}, props, { className: classnames_default()(className, bsClassName) }),
      children
    );
  };

  return NavbarBrand;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

NavbarBrand_NavbarBrand.contextTypes = NavbarBrand_contextTypes;

/* harmony default export */ var src_NavbarBrand = (NavbarBrand_NavbarBrand);
// CONCATENATED MODULE: ./src/NavbarCollapse.js











var NavbarCollapse_contextTypes = {
  $bs_navbar: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string,
    expanded: prop_types_default.a.bool
  })
};

var NavbarCollapse_NavbarCollapse = function (_React$Component) {
  inherits_default()(NavbarCollapse, _React$Component);

  function NavbarCollapse() {
    classCallCheck_default()(this, NavbarCollapse);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  NavbarCollapse.prototype.render = function render() {
    var _props = this.props,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['children']);

    var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };

    var bsClassName = prefix(navbarProps, 'collapse');

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_Collapse,
      extends_default()({ 'in': navbarProps.expanded }, props),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'div',
        { className: bsClassName },
        children
      )
    );
  };

  return NavbarCollapse;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

NavbarCollapse_NavbarCollapse.contextTypes = NavbarCollapse_contextTypes;

/* harmony default export */ var src_NavbarCollapse = (NavbarCollapse_NavbarCollapse);
// CONCATENATED MODULE: ./src/NavbarHeader.js











var NavbarHeader_contextTypes = {
  $bs_navbar: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string
  })
};

var NavbarHeader_NavbarHeader = function (_React$Component) {
  inherits_default()(NavbarHeader, _React$Component);

  function NavbarHeader() {
    classCallCheck_default()(this, NavbarHeader);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  NavbarHeader.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['className']);

    var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };

    var bsClassName = prefix(navbarProps, 'header');

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('div', extends_default()({}, props, { className: classnames_default()(className, bsClassName) }));
  };

  return NavbarHeader;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

NavbarHeader_NavbarHeader.contextTypes = NavbarHeader_contextTypes;

/* harmony default export */ var src_NavbarHeader = (NavbarHeader_NavbarHeader);
// CONCATENATED MODULE: ./src/NavbarToggle.js












var NavbarToggle_propTypes = {
  onClick: prop_types_default.a.func,
  /**
   * The toggle content, if left empty it will render the default toggle (seen above).
   */
  children: prop_types_default.a.node
};

var NavbarToggle_contextTypes = {
  $bs_navbar: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string,
    expanded: prop_types_default.a.bool,
    onToggle: prop_types_default.a.func.isRequired
  })
};

var NavbarToggle_NavbarToggle = function (_React$Component) {
  inherits_default()(NavbarToggle, _React$Component);

  function NavbarToggle() {
    classCallCheck_default()(this, NavbarToggle);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  NavbarToggle.prototype.render = function render() {
    var _props = this.props,
        onClick = _props.onClick,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['onClick', 'className', 'children']);

    var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };

    var buttonProps = extends_default()({
      type: 'button'
    }, props, {
      onClick: utils_createChainedFunction(onClick, navbarProps.onToggle),
      className: classnames_default()(className, prefix(navbarProps, 'toggle'), !navbarProps.expanded && 'collapsed')
    });

    if (children) {
      return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'button',
        buttonProps,
        children
      );
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'button',
      buttonProps,
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'span',
        { className: 'sr-only' },
        'Toggle navigation'
      ),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('span', { className: 'icon-bar' }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('span', { className: 'icon-bar' }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('span', { className: 'icon-bar' })
    );
  };

  return NavbarToggle;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

NavbarToggle_NavbarToggle.propTypes = NavbarToggle_propTypes;
NavbarToggle_NavbarToggle.contextTypes = NavbarToggle_contextTypes;

/* harmony default export */ var src_NavbarToggle = (NavbarToggle_NavbarToggle);
// CONCATENATED MODULE: ./src/Navbar.js





// TODO: Remove this pragma once we upgrade eslint-config-airbnb.
/* eslint-disable react/no-multi-comp */
















var Navbar_propTypes = {
  /**
   * Create a fixed navbar along the top of the screen, that scrolls with the
   * page
   */
  fixedTop: prop_types_default.a.bool,
  /**
   * Create a fixed navbar along the bottom of the screen, that scrolls with
   * the page
   */
  fixedBottom: prop_types_default.a.bool,
  /**
   * Create a full-width navbar that scrolls away with the page
   */
  staticTop: prop_types_default.a.bool,
  /**
   * An alternative dark visual style for the Navbar
   */
  inverse: prop_types_default.a.bool,
  /**
   * Allow the Navbar to fluidly adjust to the page or container width, instead
   * of at the predefined screen breakpoints
   */
  fluid: prop_types_default.a.bool,

  /**
   * Set a custom element for this component.
   */
  componentClass: elementType_default.a,
  /**
   * A callback fired when the `<Navbar>` body collapses or expands. Fired when
   * a `<Navbar.Toggle>` is clicked and called with the new `expanded`
   * boolean value.
   *
   * @controllable expanded
   */
  onToggle: prop_types_default.a.func,
  /**
   * A callback fired when a descendant of a child `<Nav>` is selected. Should
   * be used to execute complex closing or other miscellaneous actions desired
   * after selecting a descendant of `<Nav>`. Does nothing if no `<Nav>` or `<Nav>`
   * descendants exist. The callback is called with an eventKey, which is a
   * prop from the selected `<Nav>` descendant, and an event.
   *
   * ```js
   * function (
   *  Any eventKey,
   *  SyntheticEvent event?
   * )
   * ```
   *
   * For basic closing behavior after all `<Nav>` descendant onSelect events in
   * mobile viewports, try using collapseOnSelect.
   *
   * Note: If you are manually closing the navbar using this `OnSelect` prop,
   * ensure that you are setting `expanded` to false and not *toggling* between
   * true and false.
   */
  onSelect: prop_types_default.a.func,
  /**
   * Sets `expanded` to `false` after the onSelect event of a descendant of a
   * child `<Nav>`. Does nothing if no `<Nav>` or `<Nav>` descendants exist.
   *
   * The onSelect callback should be used instead for more complex operations
   * that need to be executed after the `select` event of `<Nav>` descendants.
   */
  collapseOnSelect: prop_types_default.a.bool,
  /**
   * Explicitly set the visiblity of the navbar body
   *
   * @controllable onToggle
   */
  expanded: prop_types_default.a.bool,

  role: prop_types_default.a.string
};

var Navbar_defaultProps = {
  componentClass: 'nav',
  fixedTop: false,
  fixedBottom: false,
  staticTop: false,
  inverse: false,
  fluid: false,
  collapseOnSelect: false
};

var Navbar_childContextTypes = {
  $bs_navbar: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string,
    expanded: prop_types_default.a.bool,
    onToggle: prop_types_default.a.func.isRequired,
    onSelect: prop_types_default.a.func
  })
};

var Navbar_Navbar = function (_React$Component) {
  inherits_default()(Navbar, _React$Component);

  function Navbar(props, context) {
    classCallCheck_default()(this, Navbar);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleToggle = _this.handleToggle.bind(_this);
    _this.handleCollapse = _this.handleCollapse.bind(_this);
    return _this;
  }

  Navbar.prototype.getChildContext = function getChildContext() {
    var _props = this.props,
        bsClass = _props.bsClass,
        expanded = _props.expanded,
        onSelect = _props.onSelect,
        collapseOnSelect = _props.collapseOnSelect;


    return {
      $bs_navbar: {
        bsClass: bsClass,
        expanded: expanded,
        onToggle: this.handleToggle,
        onSelect: utils_createChainedFunction(onSelect, collapseOnSelect ? this.handleCollapse : null)
      }
    };
  };

  Navbar.prototype.handleCollapse = function handleCollapse() {
    var _props2 = this.props,
        onToggle = _props2.onToggle,
        expanded = _props2.expanded;


    if (expanded) {
      onToggle(false);
    }
  };

  Navbar.prototype.handleToggle = function handleToggle() {
    var _props3 = this.props,
        onToggle = _props3.onToggle,
        expanded = _props3.expanded;


    onToggle(!expanded);
  };

  Navbar.prototype.render = function render() {
    var _extends2;

    var _props4 = this.props,
        Component = _props4.componentClass,
        fixedTop = _props4.fixedTop,
        fixedBottom = _props4.fixedBottom,
        staticTop = _props4.staticTop,
        inverse = _props4.inverse,
        fluid = _props4.fluid,
        className = _props4.className,
        children = _props4.children,
        props = objectWithoutProperties_default()(_props4, ['componentClass', 'fixedTop', 'fixedBottom', 'staticTop', 'inverse', 'fluid', 'className', 'children']);

    var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['expanded', 'onToggle', 'onSelect', 'collapseOnSelect']),
        bsProps = _splitBsPropsAndOmit[0],
        elementProps = _splitBsPropsAndOmit[1];

    // will result in some false positives but that seems better
    // than false negatives. strict `undefined` check allows explicit
    // "nulling" of the role if the user really doesn't want one


    if (elementProps.role === undefined && Component !== 'nav') {
      elementProps.role = 'navigation';
    }

    if (inverse) {
      bsProps.bsStyle = Style.INVERSE;
    }

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, 'fixed-top')] = fixedTop, _extends2[prefix(bsProps, 'fixed-bottom')] = fixedBottom, _extends2[prefix(bsProps, 'static-top')] = staticTop, _extends2));

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Component,
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        src_Grid,
        { fluid: fluid },
        children
      )
    );
  };

  return Navbar;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Navbar_Navbar.propTypes = Navbar_propTypes;
Navbar_Navbar.defaultProps = Navbar_defaultProps;
Navbar_Navbar.childContextTypes = Navbar_childContextTypes;

bootstrapUtils_bsClass('navbar', Navbar_Navbar);

var UncontrollableNavbar = uncontrollable_default()(Navbar_Navbar, { expanded: 'onToggle' });

function createSimpleWrapper(tag, suffix, displayName) {
  var Wrapper = function Wrapper(_ref, _ref2) {
    var _ref2$$bs_navbar = _ref2.$bs_navbar,
        navbarProps = _ref2$$bs_navbar === undefined ? { bsClass: 'navbar' } : _ref2$$bs_navbar;

    var Component = _ref.componentClass,
        className = _ref.className,
        pullRight = _ref.pullRight,
        pullLeft = _ref.pullLeft,
        props = objectWithoutProperties_default()(_ref, ['componentClass', 'className', 'pullRight', 'pullLeft']);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, props, {
      className: classnames_default()(className, prefix(navbarProps, suffix), pullRight && prefix(navbarProps, 'right'), pullLeft && prefix(navbarProps, 'left'))
    }));
  };

  Wrapper.displayName = displayName;

  Wrapper.propTypes = {
    componentClass: elementType_default.a,
    pullRight: prop_types_default.a.bool,
    pullLeft: prop_types_default.a.bool
  };

  Wrapper.defaultProps = {
    componentClass: tag,
    pullRight: false,
    pullLeft: false
  };

  Wrapper.contextTypes = {
    $bs_navbar: prop_types_default.a.shape({
      bsClass: prop_types_default.a.string
    })
  };

  return Wrapper;
}

UncontrollableNavbar.Brand = src_NavbarBrand;
UncontrollableNavbar.Header = src_NavbarHeader;
UncontrollableNavbar.Toggle = src_NavbarToggle;
UncontrollableNavbar.Collapse = src_NavbarCollapse;

UncontrollableNavbar.Form = createSimpleWrapper('div', 'form', 'NavbarForm');
UncontrollableNavbar.Text = createSimpleWrapper('p', 'text', 'NavbarText');
UncontrollableNavbar.Link = createSimpleWrapper('a', 'link', 'NavbarLink');

// Set bsStyles here so they can be overridden.
/* harmony default export */ var src_Navbar = (bsStyles([Style.DEFAULT, Style.INVERSE], Style.DEFAULT, UncontrollableNavbar));
// CONCATENATED MODULE: ./src/NavDropdown.js













var NavDropdown_propTypes = extends_default()({}, src_Dropdown.propTypes, {

  // Toggle props.
  title: prop_types_default.a.node.isRequired,
  noCaret: prop_types_default.a.bool,
  active: prop_types_default.a.bool,
  activeKey: prop_types_default.a.any,
  activeHref: prop_types_default.a.string,

  // Override generated docs from <Dropdown>.
  /**
   * @private
   */
  children: prop_types_default.a.node
});

var NavDropdown_NavDropdown = function (_React$Component) {
  inherits_default()(NavDropdown, _React$Component);

  function NavDropdown() {
    classCallCheck_default()(this, NavDropdown);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  NavDropdown.prototype.isActive = function isActive(_ref, activeKey, activeHref) {
    var props = _ref.props;

    var _this2 = this;

    if (props.active || activeKey != null && props.eventKey === activeKey || activeHref && props.href === activeHref) {
      return true;
    }

    if (ValidComponentChildren.some(props.children, function (child) {
      return _this2.isActive(child, activeKey, activeHref);
    })) {
      return true;
    }

    return props.active;
  };

  NavDropdown.prototype.render = function render() {
    var _this3 = this;

    var _props = this.props,
        title = _props.title,
        activeKey = _props.activeKey,
        activeHref = _props.activeHref,
        className = _props.className,
        style = _props.style,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['title', 'activeKey', 'activeHref', 'className', 'style', 'children']);

    var active = this.isActive(this, activeKey, activeHref);
    delete props.active; // Accessed via this.isActive().
    delete props.eventKey; // Accessed via this.isActive().

    var _splitComponentProps = splitComponentProps(props, src_Dropdown.ControlledComponent),
        dropdownProps = _splitComponentProps[0],
        toggleProps = _splitComponentProps[1];

    // Unlike for the other dropdowns, styling needs to go to the `<Dropdown>`
    // rather than the `<Dropdown.Toggle>`.

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_Dropdown,
      extends_default()({}, dropdownProps, {
        componentClass: 'li',
        className: classnames_default()(className, { active: active }),
        style: style
      }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        src_Dropdown.Toggle,
        extends_default()({}, toggleProps, { useAnchor: true }),
        title
      ),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        src_Dropdown.Menu,
        null,
        ValidComponentChildren.map(children, function (child) {
          return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.cloneElement(child, {
            active: _this3.isActive(child, activeKey, activeHref)
          });
        })
      )
    );
  };

  return NavDropdown;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

NavDropdown_NavDropdown.propTypes = NavDropdown_propTypes;

/* harmony default export */ var src_NavDropdown = (NavDropdown_NavDropdown);
// CONCATENATED MODULE: ./src/NavItem.js












var NavItem_propTypes = {
  active: prop_types_default.a.bool,
  disabled: prop_types_default.a.bool,
  role: prop_types_default.a.string,
  href: prop_types_default.a.string,
  onClick: prop_types_default.a.func,
  onSelect: prop_types_default.a.func,
  eventKey: prop_types_default.a.any
};

var NavItem_defaultProps = {
  active: false,
  disabled: false
};

var NavItem_NavItem = function (_React$Component) {
  inherits_default()(NavItem, _React$Component);

  function NavItem(props, context) {
    classCallCheck_default()(this, NavItem);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleClick = _this.handleClick.bind(_this);
    return _this;
  }

  NavItem.prototype.handleClick = function handleClick(e) {
    if (this.props.disabled) {
      e.preventDefault();
      return;
    }

    if (this.props.onSelect) {
      this.props.onSelect(this.props.eventKey, e);
    }
  };

  NavItem.prototype.render = function render() {
    var _props = this.props,
        active = _props.active,
        disabled = _props.disabled,
        onClick = _props.onClick,
        className = _props.className,
        style = _props.style,
        props = objectWithoutProperties_default()(_props, ['active', 'disabled', 'onClick', 'className', 'style']);

    delete props.onSelect;
    delete props.eventKey;

    // These are injected down by `<Nav>` for building `<SubNav>`s.
    delete props.activeKey;
    delete props.activeHref;

    if (!props.role) {
      if (props.href === '#') {
        props.role = 'button';
      }
    } else if (props.role === 'tab') {
      props['aria-selected'] = active;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'li',
      {
        role: 'presentation',
        className: classnames_default()(className, { active: active, disabled: disabled }),
        style: style
      },
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_SafeAnchor, extends_default()({}, props, {
        disabled: disabled,
        onClick: utils_createChainedFunction(onClick, this.handleClick)
      }))
    );
  };

  return NavItem;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

NavItem_NavItem.propTypes = NavItem_propTypes;
NavItem_NavItem.defaultProps = NavItem_defaultProps;

/* harmony default export */ var src_NavItem = (NavItem_NavItem);
// EXTERNAL MODULE: ./node_modules/react-overlays/lib/Overlay.js
var lib_Overlay = __webpack_require__(168);
var Overlay_default = /*#__PURE__*/__webpack_require__.n(lib_Overlay);

// CONCATENATED MODULE: ./src/Overlay.js













var Overlay_propTypes = extends_default()({}, Overlay_default.a.propTypes, {

  /**
   * Set the visibility of the Overlay
   */
  show: prop_types_default.a.bool,
  /**
   * Specify whether the overlay should trigger onHide when the user clicks outside the overlay
   */
  rootClose: prop_types_default.a.bool,
  /**
   * A callback invoked by the overlay when it wishes to be hidden. Required if
   * `rootClose` is specified.
   */
  onHide: prop_types_default.a.func,

  /**
   * Use animation
   */
  animation: prop_types_default.a.oneOfType([prop_types_default.a.bool, elementType_default.a]),

  /**
   * Callback fired before the Overlay transitions in
   */
  onEnter: prop_types_default.a.func,

  /**
   * Callback fired as the Overlay begins to transition in
   */
  onEntering: prop_types_default.a.func,

  /**
   * Callback fired after the Overlay finishes transitioning in
   */
  onEntered: prop_types_default.a.func,

  /**
   * Callback fired right before the Overlay transitions out
   */
  onExit: prop_types_default.a.func,

  /**
   * Callback fired as the Overlay begins to transition out
   */
  onExiting: prop_types_default.a.func,

  /**
   * Callback fired after the Overlay finishes transitioning out
   */
  onExited: prop_types_default.a.func,

  /**
   * Sets the direction of the Overlay.
   */
  placement: prop_types_default.a.oneOf(['top', 'right', 'bottom', 'left'])
});

var Overlay_defaultProps = {
  animation: src_Fade,
  rootClose: false,
  show: false,
  placement: 'right'
};

var Overlay_Overlay = function (_React$Component) {
  inherits_default()(Overlay, _React$Component);

  function Overlay() {
    classCallCheck_default()(this, Overlay);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Overlay.prototype.render = function render() {
    var _props = this.props,
        animation = _props.animation,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['animation', 'children']);

    var transition = animation === true ? src_Fade : animation || null;

    var child = void 0;

    if (!transition) {
      child = Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(children, {
        className: classnames_default()(children.props.className, 'in')
      });
    } else {
      child = children;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Overlay_default.a,
      extends_default()({}, props, { transition: transition }),
      child
    );
  };

  return Overlay;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Overlay_Overlay.propTypes = Overlay_propTypes;
Overlay_Overlay.defaultProps = Overlay_defaultProps;

/* harmony default export */ var src_Overlay = (Overlay_Overlay);
// CONCATENATED MODULE: ./src/OverlayTrigger.js















/**
 * Check if value one is inside or equal to the of value
 *
 * @param {string} one
 * @param {string|array} of
 * @returns {boolean}
 */
function isOneOf(one, of) {
  if (Array.isArray(of)) {
    return of.indexOf(one) >= 0;
  }
  return one === of;
}

var triggerType = prop_types_default.a.oneOf(['click', 'hover', 'focus']);

var OverlayTrigger_propTypes = extends_default()({}, src_Overlay.propTypes, {

  /**
   * Specify which action or actions trigger Overlay visibility
   */
  trigger: prop_types_default.a.oneOfType([triggerType, prop_types_default.a.arrayOf(triggerType)]),

  /**
   * A millisecond delay amount to show and hide the Overlay once triggered
   */
  delay: prop_types_default.a.number,
  /**
   * A millisecond delay amount before showing the Overlay once triggered.
   */
  delayShow: prop_types_default.a.number,
  /**
   * A millisecond delay amount before hiding the Overlay once triggered.
   */
  delayHide: prop_types_default.a.number,

  // FIXME: This should be `defaultShow`.
  /**
   * The initial visibility state of the Overlay. For more nuanced visibility
   * control, consider using the Overlay component directly.
   */
  defaultOverlayShown: prop_types_default.a.bool,

  /**
   * An element or text to overlay next to the target.
   */
  overlay: prop_types_default.a.node.isRequired,

  /**
   * @private
   */
  onBlur: prop_types_default.a.func,
  /**
   * @private
   */
  onClick: prop_types_default.a.func,
  /**
   * @private
   */
  onFocus: prop_types_default.a.func,
  /**
   * @private
   */
  onMouseOut: prop_types_default.a.func,
  /**
   * @private
   */
  onMouseOver: prop_types_default.a.func,

  // Overridden props from `<Overlay>`.
  /**
   * @private
   */
  target: prop_types_default.a.oneOf([null]),
  /**
   * @private
   */
  onHide: prop_types_default.a.oneOf([null]),
  /**
   * @private
   */
  show: prop_types_default.a.oneOf([null])
});

var OverlayTrigger_defaultProps = {
  defaultOverlayShown: false,
  trigger: ['hover', 'focus']
};

var OverlayTrigger_OverlayTrigger = function (_React$Component) {
  inherits_default()(OverlayTrigger, _React$Component);

  function OverlayTrigger(props, context) {
    classCallCheck_default()(this, OverlayTrigger);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleToggle = _this.handleToggle.bind(_this);
    _this.handleDelayedShow = _this.handleDelayedShow.bind(_this);
    _this.handleDelayedHide = _this.handleDelayedHide.bind(_this);
    _this.handleHide = _this.handleHide.bind(_this);

    _this.handleMouseOver = function (e) {
      return _this.handleMouseOverOut(_this.handleDelayedShow, e, 'fromElement');
    };
    _this.handleMouseOut = function (e) {
      return _this.handleMouseOverOut(_this.handleDelayedHide, e, 'toElement');
    };

    _this._mountNode = null;

    _this.state = {
      show: props.defaultOverlayShown
    };
    return _this;
  }

  OverlayTrigger.prototype.componentDidMount = function componentDidMount() {
    this._mountNode = document.createElement('div');
    this.renderOverlay();
  };

  OverlayTrigger.prototype.componentDidUpdate = function componentDidUpdate() {
    this.renderOverlay();
  };

  OverlayTrigger.prototype.componentWillUnmount = function componentWillUnmount() {
    external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom___default.a.unmountComponentAtNode(this._mountNode);
    this._mountNode = null;

    clearTimeout(this._hoverShowDelay);
    clearTimeout(this._hoverHideDelay);
  };

  OverlayTrigger.prototype.handleDelayedHide = function handleDelayedHide() {
    var _this2 = this;

    if (this._hoverShowDelay != null) {
      clearTimeout(this._hoverShowDelay);
      this._hoverShowDelay = null;
      return;
    }

    if (!this.state.show || this._hoverHideDelay != null) {
      return;
    }

    var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay;

    if (!delay) {
      this.hide();
      return;
    }

    this._hoverHideDelay = setTimeout(function () {
      _this2._hoverHideDelay = null;
      _this2.hide();
    }, delay);
  };

  OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {
    var _this3 = this;

    if (this._hoverHideDelay != null) {
      clearTimeout(this._hoverHideDelay);
      this._hoverHideDelay = null;
      return;
    }

    if (this.state.show || this._hoverShowDelay != null) {
      return;
    }

    var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay;

    if (!delay) {
      this.show();
      return;
    }

    this._hoverShowDelay = setTimeout(function () {
      _this3._hoverShowDelay = null;
      _this3.show();
    }, delay);
  };

  OverlayTrigger.prototype.handleHide = function handleHide() {
    this.hide();
  };

  // Simple implementation of mouseEnter and mouseLeave.
  // React's built version is broken: https://github.com/facebook/react/issues/4251
  // for cases when the trigger is disabled and mouseOut/Over can cause flicker
  // moving from one child element to another.


  OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e, relatedNative) {
    var target = e.currentTarget;
    var related = e.relatedTarget || e.nativeEvent[relatedNative];

    if ((!related || related !== target) && !contains_default()(target, related)) {
      handler(e);
    }
  };

  OverlayTrigger.prototype.handleToggle = function handleToggle() {
    if (this.state.show) {
      this.hide();
    } else {
      this.show();
    }
  };

  OverlayTrigger.prototype.hide = function hide() {
    this.setState({ show: false });
  };

  OverlayTrigger.prototype.makeOverlay = function makeOverlay(overlay, props) {
    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_Overlay,
      extends_default()({}, props, {
        show: this.state.show,
        onHide: this.handleHide,
        target: this
      }),
      overlay
    );
  };

  OverlayTrigger.prototype.show = function show() {
    this.setState({ show: true });
  };

  OverlayTrigger.prototype.renderOverlay = function renderOverlay() {
    external___root___ReactDOM___commonjs2___react_dom___commonjs___react_dom___amd___react_dom___default.a.unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode);
  };

  OverlayTrigger.prototype.render = function render() {
    var _props = this.props,
        trigger = _props.trigger,
        overlay = _props.overlay,
        children = _props.children,
        onBlur = _props.onBlur,
        onClick = _props.onClick,
        onFocus = _props.onFocus,
        onMouseOut = _props.onMouseOut,
        onMouseOver = _props.onMouseOver,
        props = objectWithoutProperties_default()(_props, ['trigger', 'overlay', 'children', 'onBlur', 'onClick', 'onFocus', 'onMouseOut', 'onMouseOver']);

    delete props.delay;
    delete props.delayShow;
    delete props.delayHide;
    delete props.defaultOverlayShown;

    var child = external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.only(children);
    var childProps = child.props;
    var triggerProps = {};

    if (this.state.show) {
      triggerProps['aria-describedby'] = overlay.props.id;
    }

    // FIXME: The logic here for passing through handlers on this component is
    // inconsistent. We shouldn't be passing any of these props through.

    triggerProps.onClick = utils_createChainedFunction(childProps.onClick, onClick);

    if (isOneOf('click', trigger)) {
      triggerProps.onClick = utils_createChainedFunction(triggerProps.onClick, this.handleToggle);
    }

    if (isOneOf('hover', trigger)) {
      undefined !== 'production' ? warning_browser_default()(!(trigger === 'hover'), '[react-bootstrap] Specifying only the `"hover"` trigger limits the ' + 'visibility of the overlay to just mouse users. Consider also ' + 'including the `"focus"` trigger so that touch and keyboard only ' + 'users can see the overlay as well.') : void 0;

      triggerProps.onMouseOver = utils_createChainedFunction(childProps.onMouseOver, onMouseOver, this.handleMouseOver);
      triggerProps.onMouseOut = utils_createChainedFunction(childProps.onMouseOut, onMouseOut, this.handleMouseOut);
    }

    if (isOneOf('focus', trigger)) {
      triggerProps.onFocus = utils_createChainedFunction(childProps.onFocus, onFocus, this.handleDelayedShow);
      triggerProps.onBlur = utils_createChainedFunction(childProps.onBlur, onBlur, this.handleDelayedHide);
    }

    this._overlay = this.makeOverlay(overlay, props);

    return Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(child, triggerProps);
  };

  return OverlayTrigger;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

OverlayTrigger_OverlayTrigger.propTypes = OverlayTrigger_propTypes;
OverlayTrigger_OverlayTrigger.defaultProps = OverlayTrigger_defaultProps;

/* harmony default export */ var src_OverlayTrigger = (OverlayTrigger_OverlayTrigger);
// CONCATENATED MODULE: ./src/PageHeader.js










var PageHeader_PageHeader = function (_React$Component) {
  inherits_default()(PageHeader, _React$Component);

  function PageHeader() {
    classCallCheck_default()(this, PageHeader);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  PageHeader.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['className', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'h1',
        null,
        children
      )
    );
  };

  return PageHeader;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

/* harmony default export */ var src_PageHeader = (bootstrapUtils_bsClass('page-header', PageHeader_PageHeader));
// CONCATENATED MODULE: ./src/PagerItem.js












var PagerItem_propTypes = {
  disabled: prop_types_default.a.bool,
  previous: prop_types_default.a.bool,
  next: prop_types_default.a.bool,
  onClick: prop_types_default.a.func,
  onSelect: prop_types_default.a.func,
  eventKey: prop_types_default.a.any
};

var PagerItem_defaultProps = {
  disabled: false,
  previous: false,
  next: false
};

var PagerItem_PagerItem = function (_React$Component) {
  inherits_default()(PagerItem, _React$Component);

  function PagerItem(props, context) {
    classCallCheck_default()(this, PagerItem);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleSelect = _this.handleSelect.bind(_this);
    return _this;
  }

  PagerItem.prototype.handleSelect = function handleSelect(e) {
    var _props = this.props,
        disabled = _props.disabled,
        onSelect = _props.onSelect,
        eventKey = _props.eventKey;


    if (disabled) {
      e.preventDefault();
      return;
    }

    if (onSelect) {
      onSelect(eventKey, e);
    }
  };

  PagerItem.prototype.render = function render() {
    var _props2 = this.props,
        disabled = _props2.disabled,
        previous = _props2.previous,
        next = _props2.next,
        onClick = _props2.onClick,
        className = _props2.className,
        style = _props2.style,
        props = objectWithoutProperties_default()(_props2, ['disabled', 'previous', 'next', 'onClick', 'className', 'style']);

    delete props.onSelect;
    delete props.eventKey;

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'li',
      {
        className: classnames_default()(className, { disabled: disabled, previous: previous, next: next }),
        style: style
      },
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_SafeAnchor, extends_default()({}, props, {
        disabled: disabled,
        onClick: utils_createChainedFunction(onClick, this.handleSelect)
      }))
    );
  };

  return PagerItem;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

PagerItem_PagerItem.propTypes = PagerItem_propTypes;
PagerItem_PagerItem.defaultProps = PagerItem_defaultProps;

/* harmony default export */ var src_PagerItem = (PagerItem_PagerItem);
// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/typeof.js
var helpers_typeof = __webpack_require__(52);
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);

// CONCATENATED MODULE: ./src/utils/deprecationWarning.js






var warned = {};

function deprecationWarning(oldname, newname, link) {
  var message = void 0;

  if ((typeof oldname === 'undefined' ? 'undefined' : typeof_default()(oldname)) === 'object') {
    message = oldname.message;
  } else {
    message = oldname + ' is deprecated. Use ' + newname + ' instead.';

    if (link) {
      message += '\nYou can read more about it at ' + link;
    }
  }

  if (warned[message]) {
    return;
  }

  undefined !== 'production' ? warning_browser_default()(false, message) : void 0;
  warned[message] = true;
}

deprecationWarning.wrapper = function (Component) {
  for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }

  return function (_Component) {
    inherits_default()(DeprecatedComponent, _Component);

    function DeprecatedComponent() {
      classCallCheck_default()(this, DeprecatedComponent);

      return possibleConstructorReturn_default()(this, _Component.apply(this, arguments));
    }

    DeprecatedComponent.prototype.componentWillMount = function componentWillMount() {
      deprecationWarning.apply(undefined, args);

      if (_Component.prototype.componentWillMount) {
        var _Component$prototype$;

        for (var _len2 = arguments.length, methodArgs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
          methodArgs[_key2] = arguments[_key2];
        }

        (_Component$prototype$ = _Component.prototype.componentWillMount).call.apply(_Component$prototype$, [this].concat(methodArgs));
      }
    };

    return DeprecatedComponent;
  }(Component);
};

/* harmony default export */ var utils_deprecationWarning = (deprecationWarning);

function _resetWarned() {
  warned = {};
}
// CONCATENATED MODULE: ./src/PageItem.js



/* harmony default export */ var PageItem = (utils_deprecationWarning.wrapper(src_PagerItem, '`<PageItem>`', '`<Pager.Item>`'));
// CONCATENATED MODULE: ./src/Pager.js














var Pager_propTypes = {
  onSelect: prop_types_default.a.func
};

var Pager_Pager = function (_React$Component) {
  inherits_default()(Pager, _React$Component);

  function Pager() {
    classCallCheck_default()(this, Pager);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Pager.prototype.render = function render() {
    var _props = this.props,
        onSelect = _props.onSelect,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['onSelect', 'className', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'ul',
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      ValidComponentChildren.map(children, function (child) {
        return Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(child, {
          onSelect: utils_createChainedFunction(child.props.onSelect, onSelect)
        });
      })
    );
  };

  return Pager;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Pager_Pager.propTypes = Pager_propTypes;

Pager_Pager.Item = src_PagerItem;

/* harmony default export */ var src_Pager = (bootstrapUtils_bsClass('pager', Pager_Pager));
// CONCATENATED MODULE: ./src/PaginationItem.js





/* eslint-disable react/no-multi-comp */






var PaginationItem_propTypes = {
  eventKey: prop_types_default.a.any,
  className: prop_types_default.a.string,
  onSelect: prop_types_default.a.func,
  disabled: prop_types_default.a.bool,
  active: prop_types_default.a.bool,
  activeLabel: prop_types_default.a.string.isRequired
};

var PaginationItem_defaultProps = {
  active: false,
  disabled: false,
  activeLabel: '(current)'
};

function PaginationItem(_ref) {
  var active = _ref.active,
      disabled = _ref.disabled,
      className = _ref.className,
      style = _ref.style,
      activeLabel = _ref.activeLabel,
      children = _ref.children,
      props = objectWithoutProperties_default()(_ref, ['active', 'disabled', 'className', 'style', 'activeLabel', 'children']);

  var Component = active || disabled ? 'span' : src_SafeAnchor;
  return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
    'li',
    { style: style, className: classnames_default()(className, { active: active, disabled: disabled }) },
    external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Component,
      extends_default()({ disabled: disabled }, props),
      children,
      active && external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'span',
        { className: 'sr-only' },
        activeLabel
      )
    )
  );
}

PaginationItem.propTypes = PaginationItem_propTypes;
PaginationItem.defaultProps = PaginationItem_defaultProps;

function createButton(name, defaultValue) {
  var _class, _temp;

  var label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : name;

  return _temp = _class = function (_React$Component) {
    inherits_default()(_class, _React$Component);

    function _class() {
      classCallCheck_default()(this, _class);

      return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
    }

    _class.prototype.render = function render() {
      var _props = this.props,
          disabled = _props.disabled,
          children = _props.children,
          className = _props.className,
          props = objectWithoutProperties_default()(_props, ['disabled', 'children', 'className']);

      var Component = disabled ? 'span' : src_SafeAnchor;

      return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'li',
        extends_default()({
          'aria-label': label,
          className: classnames_default()(className, { disabled: disabled })
        }, props),
        external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
          Component,
          null,
          children || defaultValue
        )
      );
    };

    return _class;
  }(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component), _class.displayName = name, _class.propTypes = { disabled: prop_types_default.a.bool }, _temp;
}

var First = createButton('First', '\xAB');
var Prev = createButton('Prev', '\u2039');
var Ellipsis = createButton('Ellipsis', '\u2026', 'More');
var Next = createButton('Next', '\u203A');
var Last = createButton('Last', '\xBB');
// CONCATENATED MODULE: ./src/Pagination.js











var Pagination_Pagination = function (_React$Component) {
  inherits_default()(Pagination, _React$Component);

  function Pagination() {
    classCallCheck_default()(this, Pagination);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Pagination.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['className', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'ul',
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      children
    );
  };

  return Pagination;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

bootstrapUtils_bsClass('pagination', Pagination_Pagination);

Pagination_Pagination.First = First;
Pagination_Pagination.Prev = Prev;
Pagination_Pagination.Ellipsis = Ellipsis;
Pagination_Pagination.Item = PaginationItem;
Pagination_Pagination.Next = Next;
Pagination_Pagination.Last = Last;

/* harmony default export */ var src_Pagination = (Pagination_Pagination);
// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/assign.js
var object_assign = __webpack_require__(66);
var assign_default = /*#__PURE__*/__webpack_require__.n(object_assign);

// CONCATENATED MODULE: ./src/PanelCollapse.js










var PanelCollapse_propTypes = {
  /**
   * Callback fired before the component expands
   */
  onEnter: prop_types_default.a.func,
  /**
   * Callback fired after the component starts to expand
   */
  onEntering: prop_types_default.a.func,
  /**
   * Callback fired after the component has expanded
   */
  onEntered: prop_types_default.a.func,
  /**
   * Callback fired before the component collapses
   */
  onExit: prop_types_default.a.func,
  /**
   * Callback fired after the component starts to collapse
   */
  onExiting: prop_types_default.a.func,
  /**
   * Callback fired after the component has collapsed
   */
  onExited: prop_types_default.a.func
};

var PanelCollapse_contextTypes = {
  $bs_panel: prop_types_default.a.shape({
    headingId: prop_types_default.a.string,
    bodyId: prop_types_default.a.string,
    bsClass: prop_types_default.a.string,
    expanded: prop_types_default.a.bool
  })
};

var PanelCollapse_PanelCollapse = function (_React$Component) {
  inherits_default()(PanelCollapse, _React$Component);

  function PanelCollapse() {
    classCallCheck_default()(this, PanelCollapse);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  PanelCollapse.prototype.render = function render() {
    var children = this.props.children;

    var _ref = this.context.$bs_panel || {},
        headingId = _ref.headingId,
        bodyId = _ref.bodyId,
        _bsClass = _ref.bsClass,
        expanded = _ref.expanded;

    var _splitBsProps = splitBsProps(this.props),
        bsProps = _splitBsProps[0],
        props = _splitBsProps[1];

    bsProps.bsClass = _bsClass || bsProps.bsClass;

    if (headingId && bodyId) {
      props.id = bodyId;
      props.role = props.role || 'tabpanel';
      props['aria-labelledby'] = headingId;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_Collapse,
      extends_default()({ 'in': expanded }, props),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'div',
        { className: prefix(bsProps, 'collapse') },
        children
      )
    );
  };

  return PanelCollapse;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

PanelCollapse_PanelCollapse.propTypes = PanelCollapse_propTypes;
PanelCollapse_PanelCollapse.contextTypes = PanelCollapse_contextTypes;

/* harmony default export */ var src_PanelCollapse = (bootstrapUtils_bsClass('panel', PanelCollapse_PanelCollapse));
// CONCATENATED MODULE: ./src/PanelBody.js










var PanelBody_propTypes = {
  /**
   * A convenience prop that renders a Collapse component around the Body for
   * situations when the parent Panel only contains a single Panel.Body child.
   *
   * renders:
   * ```jsx
   * <Panel.Collapse>
   *  <Panel.Body />
   * </Panel.Collapse>
   * ```
   */
  collapsible: prop_types_default.a.bool.isRequired
};

var PanelBody_defaultProps = {
  collapsible: false
};

var PanelBody_contextTypes = {
  $bs_panel: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string
  })
};

var PanelBody_PanelBody = function (_React$Component) {
  inherits_default()(PanelBody, _React$Component);

  function PanelBody() {
    classCallCheck_default()(this, PanelBody);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  PanelBody.prototype.render = function render() {
    var _props = this.props,
        children = _props.children,
        className = _props.className,
        collapsible = _props.collapsible;

    var _ref = this.context.$bs_panel || {},
        _bsClass = _ref.bsClass;

    var _splitBsPropsAndOmit = splitBsPropsAndOmit(this.props, ['collapsible']),
        bsProps = _splitBsPropsAndOmit[0],
        elementProps = _splitBsPropsAndOmit[1];

    bsProps.bsClass = _bsClass || bsProps.bsClass;

    var body = external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, { className: classnames_default()(className, prefix(bsProps, 'body')) }),
      children
    );

    if (collapsible) {
      body = external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        src_PanelCollapse,
        null,
        body
      );
    }

    return body;
  };

  return PanelBody;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

PanelBody_PanelBody.propTypes = PanelBody_propTypes;
PanelBody_PanelBody.defaultProps = PanelBody_defaultProps;
PanelBody_PanelBody.contextTypes = PanelBody_contextTypes;

/* harmony default export */ var src_PanelBody = (bootstrapUtils_bsClass('panel', PanelBody_PanelBody));
// EXTERNAL MODULE: ./node_modules/react-prop-types/lib/elementType.js
var lib_elementType = __webpack_require__(65);
var lib_elementType_default = /*#__PURE__*/__webpack_require__.n(lib_elementType);

// CONCATENATED MODULE: ./src/PanelHeading.js












var PanelHeading_propTypes = {
  componentClass: lib_elementType_default.a
};

var PanelHeading_defaultProps = {
  componentClass: 'div'
};

var PanelHeading_contextTypes = {
  $bs_panel: prop_types_default.a.shape({
    headingId: prop_types_default.a.string,
    bsClass: prop_types_default.a.string
  })
};

var PanelHeading_PanelHeading = function (_React$Component) {
  inherits_default()(PanelHeading, _React$Component);

  function PanelHeading() {
    classCallCheck_default()(this, PanelHeading);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  PanelHeading.prototype.render = function render() {
    var _props = this.props,
        children = _props.children,
        className = _props.className,
        Component = _props.componentClass,
        props = objectWithoutProperties_default()(_props, ['children', 'className', 'componentClass']);

    var _ref = this.context.$bs_panel || {},
        headingId = _ref.headingId,
        _bsClass = _ref.bsClass;

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    bsProps.bsClass = _bsClass || bsProps.bsClass;

    if (headingId) {
      elementProps.role = elementProps.role || 'tab';
      elementProps.id = headingId;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Component,
      extends_default()({}, elementProps, {
        className: classnames_default()(className, prefix(bsProps, 'heading'))
      }),
      children
    );
  };

  return PanelHeading;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

PanelHeading_PanelHeading.propTypes = PanelHeading_propTypes;
PanelHeading_PanelHeading.defaultProps = PanelHeading_defaultProps;
PanelHeading_PanelHeading.contextTypes = PanelHeading_contextTypes;

/* harmony default export */ var src_PanelHeading = (bootstrapUtils_bsClass('panel', PanelHeading_PanelHeading));
// CONCATENATED MODULE: ./src/PanelToggle.js











var PanelToggle_propTypes = {
  /**
   * only here to satisfy linting, just the html onClick handler.
   *
   * @private
   */
  onClick: prop_types_default.a.func,
  /**
   * You can use a custom element for this component
   */
  componentClass: lib_elementType_default.a
};

var PanelToggle_defaultProps = {
  componentClass: src_SafeAnchor
};

var PanelToggle_contextTypes = {
  $bs_panel: prop_types_default.a.shape({
    bodyId: prop_types_default.a.string,
    onToggle: prop_types_default.a.func,
    expanded: prop_types_default.a.bool
  })
};

var PanelToggle_PanelToggle = function (_React$Component) {
  inherits_default()(PanelToggle, _React$Component);

  function PanelToggle() {
    classCallCheck_default()(this, PanelToggle);

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    var _this = possibleConstructorReturn_default()(this, _React$Component.call.apply(_React$Component, [this].concat(args)));

    _this.handleToggle = _this.handleToggle.bind(_this);
    return _this;
  }

  PanelToggle.prototype.handleToggle = function handleToggle(event) {
    var _ref = this.context.$bs_panel || {},
        onToggle = _ref.onToggle;

    if (onToggle) {
      onToggle(event);
    }
  };

  PanelToggle.prototype.render = function render() {
    var _props = this.props,
        onClick = _props.onClick,
        className = _props.className,
        componentClass = _props.componentClass,
        props = objectWithoutProperties_default()(_props, ['onClick', 'className', 'componentClass']);

    var _ref2 = this.context.$bs_panel || {},
        expanded = _ref2.expanded,
        bodyId = _ref2.bodyId;

    var Component = componentClass;

    props.onClick = utils_createChainedFunction(onClick, this.handleToggle);

    props['aria-expanded'] = expanded;
    props.className = classnames_default()(className, !expanded && 'collapsed');

    if (bodyId) {
      props['aria-controls'] = bodyId;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, props);
  };

  return PanelToggle;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

PanelToggle_PanelToggle.propTypes = PanelToggle_propTypes;
PanelToggle_PanelToggle.defaultProps = PanelToggle_defaultProps;
PanelToggle_PanelToggle.contextTypes = PanelToggle_contextTypes;

/* harmony default export */ var src_PanelToggle = (PanelToggle_PanelToggle);
// CONCATENATED MODULE: ./src/PanelTitle.js













var PanelTitle_propTypes = {
  componentClass: lib_elementType_default.a,
  /**
   * A convenience prop that renders the Panel.Title as a panel collapse toggle component
   * for the common use-case.
   */
  toggle: prop_types_default.a.bool
};

var PanelTitle_contextTypes = {
  $bs_panel: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string
  })
};

var PanelTitle_defaultProps = {
  componentClass: 'div'
};

var PanelTitle_PanelTitle = function (_React$Component) {
  inherits_default()(PanelTitle, _React$Component);

  function PanelTitle() {
    classCallCheck_default()(this, PanelTitle);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  PanelTitle.prototype.render = function render() {
    var _props = this.props,
        children = _props.children,
        className = _props.className,
        toggle = _props.toggle,
        Component = _props.componentClass,
        props = objectWithoutProperties_default()(_props, ['children', 'className', 'toggle', 'componentClass']);

    var _ref = this.context.$bs_panel || {},
        _bsClass = _ref.bsClass;

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    bsProps.bsClass = _bsClass || bsProps.bsClass;

    if (toggle) {
      children = external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        src_PanelToggle,
        null,
        children
      );
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Component,
      extends_default()({}, elementProps, {
        className: classnames_default()(className, prefix(bsProps, 'title'))
      }),
      children
    );
  };

  return PanelTitle;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

PanelTitle_PanelTitle.propTypes = PanelTitle_propTypes;
PanelTitle_PanelTitle.defaultProps = PanelTitle_defaultProps;
PanelTitle_PanelTitle.contextTypes = PanelTitle_contextTypes;

/* harmony default export */ var src_PanelTitle = (bootstrapUtils_bsClass('panel', PanelTitle_PanelTitle));
// CONCATENATED MODULE: ./src/PanelFooter.js









var PanelFooter_contextTypes = {
  $bs_panel: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string
  })
};

var PanelFooter_PanelFooter = function (_React$Component) {
  inherits_default()(PanelFooter, _React$Component);

  function PanelFooter() {
    classCallCheck_default()(this, PanelFooter);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  PanelFooter.prototype.render = function render() {
    var _props = this.props,
        children = _props.children,
        className = _props.className;

    var _ref = this.context.$bs_panel || {},
        _bsClass = _ref.bsClass;

    var _splitBsProps = splitBsProps(this.props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    bsProps.bsClass = _bsClass || bsProps.bsClass;

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, {
        className: classnames_default()(className, prefix(bsProps, 'footer'))
      }),
      children
    );
  };

  return PanelFooter;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

PanelFooter_PanelFooter.contextTypes = PanelFooter_contextTypes;

/* harmony default export */ var src_PanelFooter = (bootstrapUtils_bsClass('panel', PanelFooter_PanelFooter));
// CONCATENATED MODULE: ./src/Panel.js





















var has = Object.prototype.hasOwnProperty;

var defaultGetId = function defaultGetId(id, type) {
  return id ? id + '--' + type : null;
};

var Panel_propTypes = {
  /**
   * Controls the collapsed/expanded state ofthe Panel. Requires
   * a `Panel.Collapse` or `<Panel.Body collapsible>` child component
   * in order to actually animate out or in.
   *
   * @controllable onToggle
   */
  expanded: prop_types_default.a.bool,
  /**
   * A callback fired when the collapse state changes.
   *
   * @controllable expanded
   */
  onToggle: prop_types_default.a.func,
  eventKey: prop_types_default.a.any,

  /**
   * An HTML `id` attribute uniquely identifying the Panel component.
   */
  id: prop_types_default.a.string
};

var Panel_contextTypes = {
  $bs_panelGroup: prop_types_default.a.shape({
    getId: prop_types_default.a.func,
    activeKey: prop_types_default.a.any,
    onToggle: prop_types_default.a.func
  })
};

var Panel_childContextTypes = {
  $bs_panel: prop_types_default.a.shape({
    headingId: prop_types_default.a.string,
    bodyId: prop_types_default.a.string,
    bsClass: prop_types_default.a.string,
    onToggle: prop_types_default.a.func,
    expanded: prop_types_default.a.bool
  })
};

var Panel_Panel = function (_React$Component) {
  inherits_default()(Panel, _React$Component);

  function Panel() {
    var _temp, _this, _ret;

    classCallCheck_default()(this, Panel);

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return _ret = (_temp = (_this = possibleConstructorReturn_default()(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleToggle = function (e) {
      var panelGroup = _this.context.$bs_panelGroup;
      var expanded = !_this.getExpanded();

      if (panelGroup && panelGroup.onToggle) {
        panelGroup.onToggle(_this.props.eventKey, expanded, e);
      } else {
        _this.props.onToggle(expanded, e);
      }
    }, _temp), possibleConstructorReturn_default()(_this, _ret);
  }

  Panel.prototype.getChildContext = function getChildContext() {
    var _props = this.props,
        eventKey = _props.eventKey,
        id = _props.id;

    var idKey = eventKey == null ? id : eventKey;

    var ids = void 0;

    if (idKey !== null) {
      var panelGroup = this.context.$bs_panelGroup;
      var getId = panelGroup && panelGroup.getId || defaultGetId;

      ids = {
        headingId: getId(idKey, 'heading'),
        bodyId: getId(idKey, 'body')
      };
    }

    return {
      $bs_panel: extends_default()({}, ids, {
        bsClass: this.props.bsClass,
        expanded: this.getExpanded(),
        onToggle: this.handleToggle
      })
    };
  };

  Panel.prototype.getExpanded = function getExpanded() {
    var panelGroup = this.context.$bs_panelGroup;

    if (panelGroup && has.call(panelGroup, 'activeKey')) {
      undefined !== 'production' ? warning_browser_default()(this.props.expanded == null, 'Specifying `<Panel>` `expanded` in the context of an accordion ' + '`<PanelGroup>` is not supported. Set `activeKey` on the ' + '`<PanelGroup>` instead.') : void 0;

      return panelGroup.activeKey === this.props.eventKey;
    }

    return !!this.props.expanded;
  };

  Panel.prototype.render = function render() {
    var _props2 = this.props,
        className = _props2.className,
        children = _props2.children;

    var _splitBsPropsAndOmit = splitBsPropsAndOmit(this.props, ['onToggle', 'eventKey', 'expanded']),
        bsProps = _splitBsPropsAndOmit[0],
        props = _splitBsPropsAndOmit[1];

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, props, { className: classnames_default()(className, getClassSet(bsProps)) }),
      children
    );
  };

  return Panel;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Panel_Panel.propTypes = Panel_propTypes;

Panel_Panel.contextTypes = Panel_contextTypes;
Panel_Panel.childContextTypes = Panel_childContextTypes;

var UncontrolledPanel = uncontrollable_default()(bootstrapUtils_bsClass('panel', bsStyles([].concat(values_default()(State), [Style.DEFAULT, Style.PRIMARY]), Style.DEFAULT, Panel_Panel)), { expanded: 'onToggle' });

assign_default()(UncontrolledPanel, {
  Heading: src_PanelHeading,
  Title: src_PanelTitle,
  Body: src_PanelBody,
  Footer: src_PanelFooter,
  Toggle: src_PanelToggle,
  Collapse: src_PanelCollapse
});

/* harmony default export */ var src_Panel = (UncontrolledPanel);
// CONCATENATED MODULE: ./src/Popover.js












var Popover_propTypes = {
  /**
   * An html id attribute, necessary for accessibility
   * @type {string}
   * @required
   */
  id: isRequiredForA11y_default()(prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number])),

  /**
   * Sets the direction the Popover is positioned towards.
   */
  placement: prop_types_default.a.oneOf(['top', 'right', 'bottom', 'left']),

  /**
   * The "top" position value for the Popover.
   */
  positionTop: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]),
  /**
   * The "left" position value for the Popover.
   */
  positionLeft: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]),

  /**
   * The "top" position value for the Popover arrow.
   */
  arrowOffsetTop: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]),
  /**
   * The "left" position value for the Popover arrow.
   */
  arrowOffsetLeft: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]),

  /**
   * Title content
   */
  title: prop_types_default.a.node
};

var Popover_defaultProps = {
  placement: 'right'
};

var Popover_Popover = function (_React$Component) {
  inherits_default()(Popover, _React$Component);

  function Popover() {
    classCallCheck_default()(this, Popover);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Popover.prototype.render = function render() {
    var _extends2;

    var _props = this.props,
        placement = _props.placement,
        positionTop = _props.positionTop,
        positionLeft = _props.positionLeft,
        arrowOffsetTop = _props.arrowOffsetTop,
        arrowOffsetLeft = _props.arrowOffsetLeft,
        title = _props.title,
        className = _props.className,
        style = _props.style,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['placement', 'positionTop', 'positionLeft', 'arrowOffsetTop', 'arrowOffsetLeft', 'title', 'className', 'style', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[placement] = true, _extends2));

    var outerStyle = extends_default()({
      display: 'block',
      top: positionTop,
      left: positionLeft
    }, style);

    var arrowStyle = {
      top: arrowOffsetTop,
      left: arrowOffsetLeft
    };

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, {
        role: 'tooltip',
        className: classnames_default()(className, classes),
        style: outerStyle
      }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('div', { className: 'arrow', style: arrowStyle }),
      title && external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'h3',
        { className: prefix(bsProps, 'title') },
        title
      ),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'div',
        { className: prefix(bsProps, 'content') },
        children
      )
    );
  };

  return Popover;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Popover_Popover.propTypes = Popover_propTypes;
Popover_Popover.defaultProps = Popover_defaultProps;

/* harmony default export */ var src_Popover = (bootstrapUtils_bsClass('popover', Popover_Popover));
// CONCATENATED MODULE: ./src/ProgressBar.js














var ROUND_PRECISION = 1000;

/**
 * Validate that children, if any, are instances of `<ProgressBar>`.
 */
function onlyProgressBar(props, propName, componentName) {
  var children = props[propName];
  if (!children) {
    return null;
  }

  var error = null;

  external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.forEach(children, function (child) {
    if (error) {
      return;
    }

    // eslint-disable-next-line no-use-before-define
    if (child.type === ProgressBar_ProgressBar) return;

    var childIdentifier = external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.isValidElement(child) ? child.type.displayName || child.type.name || child.type : child;
    error = new Error('Children of ' + componentName + ' can contain only ProgressBar ' + ('components. Found ' + childIdentifier + '.'));
  });

  return error;
}

var ProgressBar_propTypes = {
  min: prop_types_default.a.number,
  now: prop_types_default.a.number,
  max: prop_types_default.a.number,
  label: prop_types_default.a.node,
  srOnly: prop_types_default.a.bool,
  striped: prop_types_default.a.bool,
  active: prop_types_default.a.bool,
  children: onlyProgressBar,

  /**
   * @private
   */
  isChild: prop_types_default.a.bool
};

var ProgressBar_defaultProps = {
  min: 0,
  max: 100,
  active: false,
  isChild: false,
  srOnly: false,
  striped: false
};

function getPercentage(now, min, max) {
  var percentage = (now - min) / (max - min) * 100;
  return Math.round(percentage * ROUND_PRECISION) / ROUND_PRECISION;
}

var ProgressBar_ProgressBar = function (_React$Component) {
  inherits_default()(ProgressBar, _React$Component);

  function ProgressBar() {
    classCallCheck_default()(this, ProgressBar);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ProgressBar.prototype.renderProgressBar = function renderProgressBar(_ref) {
    var _extends2;

    var min = _ref.min,
        now = _ref.now,
        max = _ref.max,
        label = _ref.label,
        srOnly = _ref.srOnly,
        striped = _ref.striped,
        active = _ref.active,
        className = _ref.className,
        style = _ref.style,
        props = objectWithoutProperties_default()(_ref, ['min', 'now', 'max', 'label', 'srOnly', 'striped', 'active', 'className', 'style']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {
      active: active
    }, _extends2[prefix(bsProps, 'striped')] = active || striped, _extends2));

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, {
        role: 'progressbar',
        className: classnames_default()(className, classes),
        style: extends_default()({ width: getPercentage(now, min, max) + '%' }, style),
        'aria-valuenow': now,
        'aria-valuemin': min,
        'aria-valuemax': max
      }),
      srOnly ? external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'span',
        { className: 'sr-only' },
        label
      ) : label
    );
  };

  ProgressBar.prototype.render = function render() {
    var _props = this.props,
        isChild = _props.isChild,
        props = objectWithoutProperties_default()(_props, ['isChild']);

    if (isChild) {
      return this.renderProgressBar(props);
    }

    var min = props.min,
        now = props.now,
        max = props.max,
        label = props.label,
        srOnly = props.srOnly,
        striped = props.striped,
        active = props.active,
        bsClass = props.bsClass,
        bsStyle = props.bsStyle,
        className = props.className,
        children = props.children,
        wrapperProps = objectWithoutProperties_default()(props, ['min', 'now', 'max', 'label', 'srOnly', 'striped', 'active', 'bsClass', 'bsStyle', 'className', 'children']);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, wrapperProps, { className: classnames_default()(className, 'progress') }),
      children ? ValidComponentChildren.map(children, function (child) {
        return Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(child, { isChild: true });
      }) : this.renderProgressBar({
        min: min,
        now: now,
        max: max,
        label: label,
        srOnly: srOnly,
        striped: striped,
        active: active,
        bsClass: bsClass,
        bsStyle: bsStyle
      })
    );
  };

  return ProgressBar;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ProgressBar_ProgressBar.propTypes = ProgressBar_propTypes;
ProgressBar_ProgressBar.defaultProps = ProgressBar_defaultProps;

/* harmony default export */ var src_ProgressBar = (bootstrapUtils_bsClass('progress-bar', bsStyles(values_default()(State), ProgressBar_ProgressBar)));
// CONCATENATED MODULE: ./src/Radio.js





/* eslint-disable jsx-a11y/label-has-for */








var Radio_propTypes = {
  inline: prop_types_default.a.bool,
  disabled: prop_types_default.a.bool,
  title: prop_types_default.a.string,
  /**
   * Only valid if `inline` is not set.
   */
  validationState: prop_types_default.a.oneOf(['success', 'warning', 'error', null]),
  /**
   * Attaches a ref to the `<input>` element. Only functions can be used here.
   *
   * ```js
   * <Radio inputRef={ref => { this.input = ref; }} />
   * ```
   */
  inputRef: prop_types_default.a.func
};

var Radio_defaultProps = {
  inline: false,
  disabled: false,
  title: ''
};

var Radio_Radio = function (_React$Component) {
  inherits_default()(Radio, _React$Component);

  function Radio() {
    classCallCheck_default()(this, Radio);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Radio.prototype.render = function render() {
    var _props = this.props,
        inline = _props.inline,
        disabled = _props.disabled,
        validationState = _props.validationState,
        inputRef = _props.inputRef,
        className = _props.className,
        style = _props.style,
        title = _props.title,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['inline', 'disabled', 'validationState', 'inputRef', 'className', 'style', 'title', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var input = external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('input', extends_default()({}, elementProps, {
      ref: inputRef,
      type: 'radio',
      disabled: disabled
    }));

    if (inline) {
      var _classes2;

      var _classes = (_classes2 = {}, _classes2[prefix(bsProps, 'inline')] = true, _classes2.disabled = disabled, _classes2);

      // Use a warning here instead of in propTypes to get better-looking
      // generated documentation.
      undefined !== 'production' ? warning_browser_default()(!validationState, '`validationState` is ignored on `<Radio inline>`. To display ' + 'validation state on an inline radio, set `validationState` on a ' + 'parent `<FormGroup>` or other element instead.') : void 0;

      return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'label',
        {
          className: classnames_default()(className, _classes),
          style: style,
          title: title
        },
        input,
        children
      );
    }

    var classes = extends_default()({}, getClassSet(bsProps), {
      disabled: disabled
    });
    if (validationState) {
      classes['has-' + validationState] = true;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      { className: classnames_default()(className, classes), style: style },
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'label',
        { title: title },
        input,
        children
      )
    );
  };

  return Radio;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Radio_Radio.propTypes = Radio_propTypes;
Radio_Radio.defaultProps = Radio_defaultProps;

/* harmony default export */ var src_Radio = (bootstrapUtils_bsClass('radio', Radio_Radio));
// CONCATENATED MODULE: ./src/ResponsiveEmbed.js












// TODO: This should probably take a single `aspectRatio` prop.

var ResponsiveEmbed_propTypes = {
  /**
   * This component requires a single child element
   */
  children: prop_types_default.a.element.isRequired,
  /**
   * 16by9 aspect ratio
   */
  a16by9: prop_types_default.a.bool,
  /**
   * 4by3 aspect ratio
   */
  a4by3: prop_types_default.a.bool
};

var ResponsiveEmbed_defaultProps = {
  a16by9: false,
  a4by3: false
};

var ResponsiveEmbed_ResponsiveEmbed = function (_React$Component) {
  inherits_default()(ResponsiveEmbed, _React$Component);

  function ResponsiveEmbed() {
    classCallCheck_default()(this, ResponsiveEmbed);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ResponsiveEmbed.prototype.render = function render() {
    var _extends2;

    var _props = this.props,
        a16by9 = _props.a16by9,
        a4by3 = _props.a4by3,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['a16by9', 'a4by3', 'className', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    undefined !== 'production' ? warning_browser_default()(a16by9 || a4by3, 'Either `a16by9` or `a4by3` must be set.') : void 0;
    undefined !== 'production' ? warning_browser_default()(!(a16by9 && a4by3), 'Only one of `a16by9` or `a4by3` can be set.') : void 0;

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, '16by9')] = a16by9, _extends2[prefix(bsProps, '4by3')] = a4by3, _extends2));

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      { className: classnames_default()(classes) },
      Object(external___root___React___commonjs2___react___commonjs___react___amd___react__["cloneElement"])(children, extends_default()({}, elementProps, {
        className: classnames_default()(className, prefix(bsProps, 'item'))
      }))
    );
  };

  return ResponsiveEmbed;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ResponsiveEmbed_ResponsiveEmbed.propTypes = ResponsiveEmbed_propTypes;
ResponsiveEmbed_ResponsiveEmbed.defaultProps = ResponsiveEmbed_defaultProps;

/* harmony default export */ var src_ResponsiveEmbed = (bootstrapUtils_bsClass('embed-responsive', ResponsiveEmbed_ResponsiveEmbed));
// CONCATENATED MODULE: ./src/Row.js











var Row_propTypes = {
  componentClass: elementType_default.a
};

var Row_defaultProps = {
  componentClass: 'div'
};

var Row_Row = function (_React$Component) {
  inherits_default()(Row, _React$Component);

  function Row() {
    classCallCheck_default()(this, Row);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Row.prototype.render = function render() {
    var _props = this.props,
        Component = _props.componentClass,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['componentClass', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return Row;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Row_Row.propTypes = Row_propTypes;
Row_Row.defaultProps = Row_defaultProps;

/* harmony default export */ var src_Row = (bootstrapUtils_bsClass('row', Row_Row));
// CONCATENATED MODULE: ./src/SplitToggle.js








var SplitToggle_SplitToggle = function (_React$Component) {
  inherits_default()(SplitToggle, _React$Component);

  function SplitToggle() {
    classCallCheck_default()(this, SplitToggle);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  SplitToggle.prototype.render = function render() {
    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_DropdownToggle, extends_default()({}, this.props, { useAnchor: false, noCaret: false }));
  };

  return SplitToggle;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

SplitToggle_SplitToggle.defaultProps = src_DropdownToggle.defaultProps;

/* harmony default export */ var src_SplitToggle = (SplitToggle_SplitToggle);
// CONCATENATED MODULE: ./src/SplitButton.js













var SplitButton_propTypes = extends_default()({}, src_Dropdown.propTypes, {

  // Toggle props.
  bsStyle: prop_types_default.a.string,
  bsSize: prop_types_default.a.string,
  href: prop_types_default.a.string,
  onClick: prop_types_default.a.func,
  /**
   * The content of the split button.
   */
  title: prop_types_default.a.node.isRequired,
  /**
   * Accessible label for the toggle; the value of `title` if not specified.
   */
  toggleLabel: prop_types_default.a.string,

  // Override generated docs from <Dropdown>.
  /**
   * @private
   */
  children: prop_types_default.a.node
});

var SplitButton_SplitButton = function (_React$Component) {
  inherits_default()(SplitButton, _React$Component);

  function SplitButton() {
    classCallCheck_default()(this, SplitButton);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  SplitButton.prototype.render = function render() {
    var _props = this.props,
        bsSize = _props.bsSize,
        bsStyle = _props.bsStyle,
        title = _props.title,
        toggleLabel = _props.toggleLabel,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['bsSize', 'bsStyle', 'title', 'toggleLabel', 'children']);

    var _splitComponentProps = splitComponentProps(props, src_Dropdown.ControlledComponent),
        dropdownProps = _splitComponentProps[0],
        buttonProps = _splitComponentProps[1];

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_Dropdown,
      extends_default()({}, dropdownProps, { bsSize: bsSize, bsStyle: bsStyle }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        src_Button,
        extends_default()({}, buttonProps, {
          disabled: props.disabled,
          bsSize: bsSize,
          bsStyle: bsStyle
        }),
        title
      ),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_SplitToggle, {
        'aria-label': toggleLabel || title,
        bsSize: bsSize,
        bsStyle: bsStyle
      }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        src_Dropdown.Menu,
        null,
        children
      )
    );
  };

  return SplitButton;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

SplitButton_SplitButton.propTypes = SplitButton_propTypes;

SplitButton_SplitButton.Toggle = src_SplitToggle;

/* harmony default export */ var src_SplitButton = (SplitButton_SplitButton);
// CONCATENATED MODULE: ./src/TabContainer.js








var TAB = 'tab';
var PANE = 'pane';

var TabContainer_idPropType = prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]);

var TabContainer_propTypes = {
  /**
   * HTML id attribute, required if no `generateChildId` prop
   * is specified.
   */
  id: function id(props) {
    var error = null;

    if (!props.generateChildId) {
      for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        args[_key - 1] = arguments[_key];
      }

      error = TabContainer_idPropType.apply(undefined, [props].concat(args));

      if (!error && !props.id) {
        error = new Error('In order to properly initialize Tabs in a way that is accessible ' + 'to assistive technologies (such as screen readers) an `id` or a ' + '`generateChildId` prop to TabContainer is required');
      }
    }

    return error;
  },


  /**
   * A function that takes an `eventKey` and `type` and returns a unique id for
   * child tab `<NavItem>`s and `<TabPane>`s. The function _must_ be a pure
   * function, meaning it should always return the _same_ id for the same set
   * of inputs. The default value requires that an `id` to be set for the
   * `<TabContainer>`.
   *
   * The `type` argument will either be `"tab"` or `"pane"`.
   *
   * @defaultValue (eventKey, type) => `${this.props.id}-${type}-${key}`
   */
  generateChildId: prop_types_default.a.func,

  /**
   * A callback fired when a tab is selected.
   *
   * @controllable activeKey
   */
  onSelect: prop_types_default.a.func,

  /**
   * The `eventKey` of the currently active tab.
   *
   * @controllable onSelect
   */
  activeKey: prop_types_default.a.any
};

var TabContainer_childContextTypes = {
  $bs_tabContainer: prop_types_default.a.shape({
    activeKey: prop_types_default.a.any,
    onSelect: prop_types_default.a.func.isRequired,
    getTabId: prop_types_default.a.func.isRequired,
    getPaneId: prop_types_default.a.func.isRequired
  })
};

var TabContainer_TabContainer = function (_React$Component) {
  inherits_default()(TabContainer, _React$Component);

  function TabContainer() {
    classCallCheck_default()(this, TabContainer);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  TabContainer.prototype.getChildContext = function getChildContext() {
    var _props = this.props,
        activeKey = _props.activeKey,
        onSelect = _props.onSelect,
        generateChildId = _props.generateChildId,
        id = _props.id;


    var getId = generateChildId || function (key, type) {
      return id ? id + '-' + type + '-' + key : null;
    };

    return {
      $bs_tabContainer: {
        activeKey: activeKey,
        onSelect: onSelect,
        getTabId: function getTabId(key) {
          return getId(key, TAB);
        },
        getPaneId: function getPaneId(key) {
          return getId(key, PANE);
        }
      }
    };
  };

  TabContainer.prototype.render = function render() {
    var _props2 = this.props,
        children = _props2.children,
        props = objectWithoutProperties_default()(_props2, ['children']);

    delete props.generateChildId;
    delete props.onSelect;
    delete props.activeKey;

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.cloneElement(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Children.only(children), props);
  };

  return TabContainer;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

TabContainer_TabContainer.propTypes = TabContainer_propTypes;
TabContainer_TabContainer.childContextTypes = TabContainer_childContextTypes;

/* harmony default export */ var src_TabContainer = (uncontrollable_default()(TabContainer_TabContainer, { activeKey: 'onSelect' }));
// CONCATENATED MODULE: ./src/TabContent.js












var TabContent_propTypes = {
  componentClass: elementType_default.a,

  /**
   * Sets a default animation strategy for all children `<TabPane>`s. Use
   * `false` to disable, `true` to enable the default `<Fade>` animation or
   * a react-transition-group v2 `<Transition/>` component.
   */
  animation: prop_types_default.a.oneOfType([prop_types_default.a.bool, elementType_default.a]),

  /**
   * Wait until the first "enter" transition to mount tabs (add them to the DOM)
   */
  mountOnEnter: prop_types_default.a.bool,

  /**
   * Unmount tabs (remove it from the DOM) when they are no longer visible
   */
  unmountOnExit: prop_types_default.a.bool
};

var TabContent_defaultProps = {
  componentClass: 'div',
  animation: true,
  mountOnEnter: false,
  unmountOnExit: false
};

var TabContent_contextTypes = {
  $bs_tabContainer: prop_types_default.a.shape({
    activeKey: prop_types_default.a.any
  })
};

var TabContent_childContextTypes = {
  $bs_tabContent: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string,
    animation: prop_types_default.a.oneOfType([prop_types_default.a.bool, elementType_default.a]),
    activeKey: prop_types_default.a.any,
    mountOnEnter: prop_types_default.a.bool,
    unmountOnExit: prop_types_default.a.bool,
    onPaneEnter: prop_types_default.a.func.isRequired,
    onPaneExited: prop_types_default.a.func.isRequired,
    exiting: prop_types_default.a.bool.isRequired
  })
};

var TabContent_TabContent = function (_React$Component) {
  inherits_default()(TabContent, _React$Component);

  function TabContent(props, context) {
    classCallCheck_default()(this, TabContent);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handlePaneEnter = _this.handlePaneEnter.bind(_this);
    _this.handlePaneExited = _this.handlePaneExited.bind(_this);

    // Active entries in state will be `null` unless `animation` is set. Need
    // to track active child in case keys swap and the active child changes
    // but the active key does not.
    _this.state = {
      activeKey: null,
      activeChild: null
    };
    return _this;
  }

  TabContent.prototype.getChildContext = function getChildContext() {
    var _props = this.props,
        bsClass = _props.bsClass,
        animation = _props.animation,
        mountOnEnter = _props.mountOnEnter,
        unmountOnExit = _props.unmountOnExit;


    var stateActiveKey = this.state.activeKey;
    var containerActiveKey = this.getContainerActiveKey();

    var activeKey = stateActiveKey != null ? stateActiveKey : containerActiveKey;
    var exiting = stateActiveKey != null && stateActiveKey !== containerActiveKey;

    return {
      $bs_tabContent: {
        bsClass: bsClass,
        animation: animation,
        activeKey: activeKey,
        mountOnEnter: mountOnEnter,
        unmountOnExit: unmountOnExit,
        onPaneEnter: this.handlePaneEnter,
        onPaneExited: this.handlePaneExited,
        exiting: exiting
      }
    };
  };

  TabContent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
    if (!nextProps.animation && this.state.activeChild) {
      this.setState({ activeKey: null, activeChild: null });
    }
  };

  TabContent.prototype.componentWillUnmount = function componentWillUnmount() {
    this.isUnmounted = true;
  };

  TabContent.prototype.getContainerActiveKey = function getContainerActiveKey() {
    var tabContainer = this.context.$bs_tabContainer;
    return tabContainer && tabContainer.activeKey;
  };

  TabContent.prototype.handlePaneEnter = function handlePaneEnter(child, childKey) {
    if (!this.props.animation) {
      return false;
    }

    // It's possible that this child should be transitioning out.
    if (childKey !== this.getContainerActiveKey()) {
      return false;
    }

    this.setState({
      activeKey: childKey,
      activeChild: child
    });

    return true;
  };

  TabContent.prototype.handlePaneExited = function handlePaneExited(child) {
    // This might happen as everything is unmounting.
    if (this.isUnmounted) {
      return;
    }

    this.setState(function (_ref) {
      var activeChild = _ref.activeChild;

      if (activeChild !== child) {
        return null;
      }

      return {
        activeKey: null,
        activeChild: null
      };
    });
  };

  TabContent.prototype.render = function render() {
    var _props2 = this.props,
        Component = _props2.componentClass,
        className = _props2.className,
        props = objectWithoutProperties_default()(_props2, ['componentClass', 'className']);

    var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['animation', 'mountOnEnter', 'unmountOnExit']),
        bsProps = _splitBsPropsAndOmit[0],
        elementProps = _splitBsPropsAndOmit[1];

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(Component, extends_default()({}, elementProps, {
      className: classnames_default()(className, prefix(bsProps, 'content'))
    }));
  };

  return TabContent;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

TabContent_TabContent.propTypes = TabContent_propTypes;
TabContent_TabContent.defaultProps = TabContent_defaultProps;
TabContent_TabContent.contextTypes = TabContent_contextTypes;
TabContent_TabContent.childContextTypes = TabContent_childContextTypes;

/* harmony default export */ var src_TabContent = (bootstrapUtils_bsClass('tab', TabContent_TabContent));
// CONCATENATED MODULE: ./src/TabPane.js
















var TabPane_propTypes = {
  /**
   * Uniquely identify the `<TabPane>` among its siblings.
   */
  eventKey: prop_types_default.a.any,

  /**
   * Use animation when showing or hiding `<TabPane>`s. Use `false` to disable,
   * `true` to enable the default `<Fade>` animation or
   * a react-transition-group v2 `<Transition/>` component.
   */
  animation: prop_types_default.a.oneOfType([prop_types_default.a.bool, elementType_default.a]),

  /** @private * */
  id: prop_types_default.a.string,

  /** @private * */
  'aria-labelledby': prop_types_default.a.string,

  /**
   * If not explicitly specified and rendered in the context of a
   * `<TabContent>`, the `bsClass` of the `<TabContent>` suffixed by `-pane`.
   * If otherwise not explicitly specified, `tab-pane`.
   */
  bsClass: prop_types_default.a.string,

  /**
   * Transition onEnter callback when animation is not `false`
   */
  onEnter: prop_types_default.a.func,

  /**
   * Transition onEntering callback when animation is not `false`
   */
  onEntering: prop_types_default.a.func,

  /**
   * Transition onEntered callback when animation is not `false`
   */
  onEntered: prop_types_default.a.func,

  /**
   * Transition onExit callback when animation is not `false`
   */
  onExit: prop_types_default.a.func,

  /**
   * Transition onExiting callback when animation is not `false`
   */
  onExiting: prop_types_default.a.func,

  /**
   * Transition onExited callback when animation is not `false`
   */
  onExited: prop_types_default.a.func,

  /**
   * Wait until the first "enter" transition to mount the tab (add it to the DOM)
   */
  mountOnEnter: prop_types_default.a.bool,

  /**
   * Unmount the tab (remove it from the DOM) when it is no longer visible
   */
  unmountOnExit: prop_types_default.a.bool
};

var TabPane_contextTypes = {
  $bs_tabContainer: prop_types_default.a.shape({
    getTabId: prop_types_default.a.func,
    getPaneId: prop_types_default.a.func
  }),
  $bs_tabContent: prop_types_default.a.shape({
    bsClass: prop_types_default.a.string,
    animation: prop_types_default.a.oneOfType([prop_types_default.a.bool, elementType_default.a]),
    activeKey: prop_types_default.a.any,
    mountOnEnter: prop_types_default.a.bool,
    unmountOnExit: prop_types_default.a.bool,
    onPaneEnter: prop_types_default.a.func.isRequired,
    onPaneExited: prop_types_default.a.func.isRequired,
    exiting: prop_types_default.a.bool.isRequired
  })
};

/**
 * We override the `<TabContainer>` context so `<Nav>`s in `<TabPane>`s don't
 * conflict with the top level one.
 */
var TabPane_childContextTypes = {
  $bs_tabContainer: prop_types_default.a.oneOf([null])
};

var TabPane_TabPane = function (_React$Component) {
  inherits_default()(TabPane, _React$Component);

  function TabPane(props, context) {
    classCallCheck_default()(this, TabPane);

    var _this = possibleConstructorReturn_default()(this, _React$Component.call(this, props, context));

    _this.handleEnter = _this.handleEnter.bind(_this);
    _this.handleExited = _this.handleExited.bind(_this);

    _this.in = false;
    return _this;
  }

  TabPane.prototype.getChildContext = function getChildContext() {
    return {
      $bs_tabContainer: null
    };
  };

  TabPane.prototype.componentDidMount = function componentDidMount() {
    if (this.shouldBeIn()) {
      // In lieu of the action event firing.
      this.handleEnter();
    }
  };

  TabPane.prototype.componentDidUpdate = function componentDidUpdate() {
    if (this.in) {
      if (!this.shouldBeIn()) {
        // We shouldn't be active any more. Notify the parent.
        this.handleExited();
      }
    } else if (this.shouldBeIn()) {
      // We are the active child. Notify the parent.
      this.handleEnter();
    }
  };

  TabPane.prototype.componentWillUnmount = function componentWillUnmount() {
    if (this.in) {
      // In lieu of the action event firing.
      this.handleExited();
    }
  };

  TabPane.prototype.getAnimation = function getAnimation() {
    if (this.props.animation != null) {
      return this.props.animation;
    }

    var tabContent = this.context.$bs_tabContent;
    return tabContent && tabContent.animation;
  };

  TabPane.prototype.handleEnter = function handleEnter() {
    var tabContent = this.context.$bs_tabContent;
    if (!tabContent) {
      return;
    }

    this.in = tabContent.onPaneEnter(this, this.props.eventKey);
  };

  TabPane.prototype.handleExited = function handleExited() {
    var tabContent = this.context.$bs_tabContent;
    if (!tabContent) {
      return;
    }

    tabContent.onPaneExited(this);
    this.in = false;
  };

  TabPane.prototype.isActive = function isActive() {
    var tabContent = this.context.$bs_tabContent;
    var activeKey = tabContent && tabContent.activeKey;

    return this.props.eventKey === activeKey;
  };

  TabPane.prototype.shouldBeIn = function shouldBeIn() {
    return this.getAnimation() && this.isActive();
  };

  TabPane.prototype.render = function render() {
    var _props = this.props,
        eventKey = _props.eventKey,
        className = _props.className,
        onEnter = _props.onEnter,
        onEntering = _props.onEntering,
        onEntered = _props.onEntered,
        onExit = _props.onExit,
        onExiting = _props.onExiting,
        onExited = _props.onExited,
        propsMountOnEnter = _props.mountOnEnter,
        propsUnmountOnExit = _props.unmountOnExit,
        props = objectWithoutProperties_default()(_props, ['eventKey', 'className', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited', 'mountOnEnter', 'unmountOnExit']);

    var _context = this.context,
        tabContent = _context.$bs_tabContent,
        tabContainer = _context.$bs_tabContainer;

    var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['animation']),
        bsProps = _splitBsPropsAndOmit[0],
        elementProps = _splitBsPropsAndOmit[1];

    var active = this.isActive();
    var animation = this.getAnimation();

    var mountOnEnter = propsMountOnEnter != null ? propsMountOnEnter : tabContent && tabContent.mountOnEnter;
    var unmountOnExit = propsUnmountOnExit != null ? propsUnmountOnExit : tabContent && tabContent.unmountOnExit;

    if (!active && !animation && unmountOnExit) {
      return null;
    }

    var Transition = animation === true ? src_Fade : animation || null;

    if (tabContent) {
      bsProps.bsClass = prefix(tabContent, 'pane');
    }

    var classes = extends_default()({}, getClassSet(bsProps), {
      active: active
    });

    if (tabContainer) {
      undefined !== 'production' ? warning_browser_default()(!elementProps.id && !elementProps['aria-labelledby'], 'In the context of a `<TabContainer>`, `<TabPanes>` are given ' + 'generated `id` and `aria-labelledby` attributes for the sake of ' + 'proper component accessibility. Any provided ones will be ignored. ' + 'To control these attributes directly provide a `generateChildId` ' + 'prop to the parent `<TabContainer>`.') : void 0;

      elementProps.id = tabContainer.getPaneId(eventKey);
      elementProps['aria-labelledby'] = tabContainer.getTabId(eventKey);
    }

    var pane = external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('div', extends_default()({}, elementProps, {
      role: 'tabpanel',
      'aria-hidden': !active,
      className: classnames_default()(className, classes)
    }));

    if (Transition) {
      var exiting = tabContent && tabContent.exiting;

      return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        Transition,
        {
          'in': active && !exiting,
          onEnter: utils_createChainedFunction(this.handleEnter, onEnter),
          onEntering: onEntering,
          onEntered: onEntered,
          onExit: onExit,
          onExiting: onExiting,
          onExited: utils_createChainedFunction(this.handleExited, onExited),
          mountOnEnter: mountOnEnter,
          unmountOnExit: unmountOnExit
        },
        pane
      );
    }

    return pane;
  };

  return TabPane;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

TabPane_TabPane.propTypes = TabPane_propTypes;
TabPane_TabPane.contextTypes = TabPane_contextTypes;
TabPane_TabPane.childContextTypes = TabPane_childContextTypes;

/* harmony default export */ var src_TabPane = (bootstrapUtils_bsClass('tab-pane', TabPane_TabPane));
// CONCATENATED MODULE: ./src/Tab.js











var Tab_propTypes = extends_default()({}, src_TabPane.propTypes, {

  disabled: prop_types_default.a.bool,

  title: prop_types_default.a.node,

  /**
   * tabClassName is used as className for the associated NavItem
   */
  tabClassName: prop_types_default.a.string
});

var Tab_Tab = function (_React$Component) {
  inherits_default()(Tab, _React$Component);

  function Tab() {
    classCallCheck_default()(this, Tab);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Tab.prototype.render = function render() {
    var props = extends_default()({}, this.props);

    // These props are for the parent `<Tabs>` rather than the `<TabPane>`.
    delete props.title;
    delete props.disabled;
    delete props.tabClassName;

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(src_TabPane, props);
  };

  return Tab;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Tab_Tab.propTypes = Tab_propTypes;

Tab_Tab.Container = src_TabContainer;
Tab_Tab.Content = src_TabContent;
Tab_Tab.Pane = src_TabPane;

/* harmony default export */ var src_Tab = (Tab_Tab);
// CONCATENATED MODULE: ./src/Table.js











var Table_propTypes = {
  striped: prop_types_default.a.bool,
  bordered: prop_types_default.a.bool,
  condensed: prop_types_default.a.bool,
  hover: prop_types_default.a.bool,
  responsive: prop_types_default.a.bool
};

var Table_defaultProps = {
  bordered: false,
  condensed: false,
  hover: false,
  responsive: false,
  striped: false
};

var Table_Table = function (_React$Component) {
  inherits_default()(Table, _React$Component);

  function Table() {
    classCallCheck_default()(this, Table);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Table.prototype.render = function render() {
    var _extends2;

    var _props = this.props,
        striped = _props.striped,
        bordered = _props.bordered,
        condensed = _props.condensed,
        hover = _props.hover,
        responsive = _props.responsive,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['striped', 'bordered', 'condensed', 'hover', 'responsive', 'className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, 'striped')] = striped, _extends2[prefix(bsProps, 'bordered')] = bordered, _extends2[prefix(bsProps, 'condensed')] = condensed, _extends2[prefix(bsProps, 'hover')] = hover, _extends2));

    var table = external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('table', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));

    if (responsive) {
      return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'div',
        { className: prefix(bsProps, 'responsive') },
        table
      );
    }

    return table;
  };

  return Table;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Table_Table.propTypes = Table_propTypes;
Table_Table.defaultProps = Table_defaultProps;

/* harmony default export */ var src_Table = (bootstrapUtils_bsClass('table', Table_Table));
// CONCATENATED MODULE: ./src/Tabs.js

















var Tabs_TabContainer = src_TabContainer.ControlledComponent;

var Tabs_propTypes = {
  /**
   * Mark the Tab with a matching `eventKey` as active.
   *
   * @controllable onSelect
   */
  activeKey: prop_types_default.a.any,

  /**
   * Navigation style
   */
  bsStyle: prop_types_default.a.oneOf(['tabs', 'pills']),

  animation: prop_types_default.a.bool,

  id: isRequiredForA11y_default()(prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number])),

  /**
   * Callback fired when a Tab is selected.
   *
   * ```js
   * function (
   *   Any eventKey,
   *   SyntheticEvent event?
   * )
   * ```
   *
   * @controllable activeKey
   */
  onSelect: prop_types_default.a.func,

  /**
   * Wait until the first "enter" transition to mount tabs (add them to the DOM)
   */
  mountOnEnter: prop_types_default.a.bool,

  /**
   * Unmount tabs (remove it from the DOM) when it is no longer visible
   */
  unmountOnExit: prop_types_default.a.bool
};

var Tabs_defaultProps = {
  bsStyle: 'tabs',
  animation: true,
  mountOnEnter: false,
  unmountOnExit: false
};

function getDefaultActiveKey(children) {
  var defaultActiveKey = void 0;
  ValidComponentChildren.forEach(children, function (child) {
    if (defaultActiveKey == null) {
      defaultActiveKey = child.props.eventKey;
    }
  });

  return defaultActiveKey;
}

var Tabs_Tabs = function (_React$Component) {
  inherits_default()(Tabs, _React$Component);

  function Tabs() {
    classCallCheck_default()(this, Tabs);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Tabs.prototype.renderTab = function renderTab(child) {
    var _child$props = child.props,
        title = _child$props.title,
        eventKey = _child$props.eventKey,
        disabled = _child$props.disabled,
        tabClassName = _child$props.tabClassName;

    if (title == null) {
      return null;
    }

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_NavItem,
      { eventKey: eventKey, disabled: disabled, className: tabClassName },
      title
    );
  };

  Tabs.prototype.render = function render() {
    var _props = this.props,
        id = _props.id,
        onSelect = _props.onSelect,
        animation = _props.animation,
        mountOnEnter = _props.mountOnEnter,
        unmountOnExit = _props.unmountOnExit,
        bsClass = _props.bsClass,
        className = _props.className,
        style = _props.style,
        children = _props.children,
        _props$activeKey = _props.activeKey,
        activeKey = _props$activeKey === undefined ? getDefaultActiveKey(children) : _props$activeKey,
        props = objectWithoutProperties_default()(_props, ['id', 'onSelect', 'animation', 'mountOnEnter', 'unmountOnExit', 'bsClass', 'className', 'style', 'children', 'activeKey']);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Tabs_TabContainer,
      {
        id: id,
        activeKey: activeKey,
        onSelect: onSelect,
        className: className,
        style: style
      },
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'div',
        null,
        external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
          src_Nav,
          extends_default()({}, props, { role: 'tablist' }),
          ValidComponentChildren.map(children, this.renderTab)
        ),
        external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
          src_TabContent,
          {
            bsClass: bsClass,
            animation: animation,
            mountOnEnter: mountOnEnter,
            unmountOnExit: unmountOnExit
          },
          children
        )
      )
    );
  };

  return Tabs;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Tabs_Tabs.propTypes = Tabs_propTypes;
Tabs_Tabs.defaultProps = Tabs_defaultProps;

bootstrapUtils_bsClass('tab', Tabs_Tabs);

/* harmony default export */ var src_Tabs = (uncontrollable_default()(Tabs_Tabs, { activeKey: 'onSelect' }));
// CONCATENATED MODULE: ./src/Thumbnail.js





/* eslint-disable jsx-a11y/alt-text */








var Thumbnail_propTypes = {
  /**
   * src property that is passed down to the image inside this component
   */
  src: prop_types_default.a.string,
  /**
   * alt property that is passed down to the image inside this component
   */
  alt: prop_types_default.a.string,
  /**
   * href property that is passed down to the image inside this component
   */
  href: prop_types_default.a.string,
  /**
   * onError callback that is passed down to the image inside this component
   */
  onError: prop_types_default.a.func,
  /**
   * onLoad callback that is passed down to the image inside this component
   */
  onLoad: prop_types_default.a.func
};

var Thumbnail_Thumbnail = function (_React$Component) {
  inherits_default()(Thumbnail, _React$Component);

  function Thumbnail() {
    classCallCheck_default()(this, Thumbnail);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Thumbnail.prototype.render = function render() {
    var _props = this.props,
        src = _props.src,
        alt = _props.alt,
        onError = _props.onError,
        onLoad = _props.onLoad,
        className = _props.className,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['src', 'alt', 'onError', 'onLoad', 'className', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var Component = elementProps.href ? src_SafeAnchor : 'div';
    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      Component,
      extends_default()({}, elementProps, { className: classnames_default()(className, classes) }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('img', { src: src, alt: alt, onError: onError, onLoad: onLoad }),
      children && external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'div',
        { className: 'caption' },
        children
      )
    );
  };

  return Thumbnail;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Thumbnail_Thumbnail.propTypes = Thumbnail_propTypes;

/* harmony default export */ var src_Thumbnail = (bootstrapUtils_bsClass('thumbnail', Thumbnail_Thumbnail));
// CONCATENATED MODULE: ./src/ToggleButton.js










var ToggleButton_propTypes = {
  /**
   * The `<input>` `type`
   * @type {[type]}
   */
  type: prop_types_default.a.oneOf(['checkbox', 'radio']),

  /**
   * The HTML input name, used to group like checkboxes or radio buttons together
   * semantically
   */
  name: prop_types_default.a.string,

  /**
   * The checked state of the input, managed by `<ToggleButtonGroup>`` automatically
   */
  checked: prop_types_default.a.bool,

  /**
   * The disabled state of both the label and input
   */
  disabled: prop_types_default.a.bool,

  /**
   * [onChange description]
   */
  onChange: prop_types_default.a.func,
  /**
   * The value of the input, and unique identifier in the ToggleButtonGroup
   */
  value: prop_types_default.a.any.isRequired
};

var ToggleButton_ToggleButton = function (_React$Component) {
  inherits_default()(ToggleButton, _React$Component);

  function ToggleButton() {
    classCallCheck_default()(this, ToggleButton);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ToggleButton.prototype.render = function render() {
    var _props = this.props,
        children = _props.children,
        name = _props.name,
        checked = _props.checked,
        type = _props.type,
        onChange = _props.onChange,
        value = _props.value,
        props = objectWithoutProperties_default()(_props, ['children', 'name', 'checked', 'type', 'onChange', 'value']);

    var disabled = props.disabled;

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_Button,
      extends_default()({}, props, { active: !!checked, componentClass: 'label' }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('input', {
        name: name,
        type: type,
        autoComplete: 'off',
        value: value,
        checked: !!checked,
        disabled: !!disabled,
        onChange: onChange
      }),
      children
    );
  };

  return ToggleButton;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ToggleButton_ToggleButton.propTypes = ToggleButton_propTypes;

/* harmony default export */ var src_ToggleButton = (ToggleButton_ToggleButton);
// CONCATENATED MODULE: ./src/ToggleButtonGroup.js















var ToggleButtonGroup_propTypes = {
  /**
   * An HTML `<input>` name for each child button.
   *
   * __Required if `type` is set to `'radio'`__
   */
  name: prop_types_default.a.string,

  /**
   * The value, or array of values, of the active (pressed) buttons
   *
   * @controllable onChange
   */
  value: prop_types_default.a.any,

  /**
   * Callback fired when a button is pressed, depending on whether the `type`
   * is `'radio'` or `'checkbox'`, `onChange` will be called with the value or
   * array of active values
   *
   * @controllable values
   */
  onChange: prop_types_default.a.func,

  /**
   * The input `type` of the rendered buttons, determines the toggle behavior
   * of the buttons
   */
  type: prop_types_default.a.oneOf(['checkbox', 'radio']).isRequired
};

var ToggleButtonGroup_defaultProps = {
  type: 'radio'
};

var ToggleButtonGroup_ToggleButtonGroup = function (_React$Component) {
  inherits_default()(ToggleButtonGroup, _React$Component);

  function ToggleButtonGroup() {
    classCallCheck_default()(this, ToggleButtonGroup);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  ToggleButtonGroup.prototype.getValues = function getValues() {
    var value = this.props.value;

    return value == null ? [] : [].concat(value);
  };

  ToggleButtonGroup.prototype.handleToggle = function handleToggle(value) {
    var _props = this.props,
        type = _props.type,
        onChange = _props.onChange;

    var values = this.getValues();
    var isActive = values.indexOf(value) !== -1;

    if (type === 'radio') {
      if (!isActive) {
        onChange(value);
      }
      return;
    }

    if (isActive) {
      onChange(values.filter(function (n) {
        return n !== value;
      }));
    } else {
      onChange([].concat(values, [value]));
    }
  };

  ToggleButtonGroup.prototype.render = function render() {
    var _this2 = this;

    var _props2 = this.props,
        children = _props2.children,
        type = _props2.type,
        name = _props2.name,
        props = objectWithoutProperties_default()(_props2, ['children', 'type', 'name']);

    var values = this.getValues();

    !(type !== 'radio' || !!name) ? undefined !== 'production' ? browser_default()(false, 'A `name` is required to group the toggle buttons when the `type` ' + 'is set to "radio"') : browser_default()(false) : void 0;

    delete props.onChange;
    delete props.value;

    // the data attribute is required b/c twbs css uses it in the selector
    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      src_ButtonGroup,
      extends_default()({}, props, { 'data-toggle': 'buttons' }),
      ValidComponentChildren.map(children, function (child) {
        var _child$props = child.props,
            value = _child$props.value,
            onChange = _child$props.onChange;

        var handler = function handler() {
          return _this2.handleToggle(value);
        };

        return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.cloneElement(child, {
          type: type,
          name: child.name || name,
          checked: values.indexOf(value) !== -1,
          onChange: utils_createChainedFunction(onChange, handler)
        });
      })
    );
  };

  return ToggleButtonGroup;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

ToggleButtonGroup_ToggleButtonGroup.propTypes = ToggleButtonGroup_propTypes;
ToggleButtonGroup_ToggleButtonGroup.defaultProps = ToggleButtonGroup_defaultProps;

var UncontrolledToggleButtonGroup = uncontrollable_default()(ToggleButtonGroup_ToggleButtonGroup, {
  value: 'onChange'
});

UncontrolledToggleButtonGroup.Button = src_ToggleButton;

/* harmony default export */ var src_ToggleButtonGroup = (UncontrolledToggleButtonGroup);
// CONCATENATED MODULE: ./src/Tooltip.js












var Tooltip_propTypes = {
  /**
   * An html id attribute, necessary for accessibility
   * @type {string|number}
   * @required
   */
  id: isRequiredForA11y_default()(prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number])),

  /**
   * Sets the direction the Tooltip is positioned towards.
   */
  placement: prop_types_default.a.oneOf(['top', 'right', 'bottom', 'left']),

  /**
   * The "top" position value for the Tooltip.
   */
  positionTop: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]),
  /**
   * The "left" position value for the Tooltip.
   */
  positionLeft: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]),

  /**
   * The "top" position value for the Tooltip arrow.
   */
  arrowOffsetTop: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]),
  /**
   * The "left" position value for the Tooltip arrow.
   */
  arrowOffsetLeft: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string])
};

var Tooltip_defaultProps = {
  placement: 'right'
};

var Tooltip_Tooltip = function (_React$Component) {
  inherits_default()(Tooltip, _React$Component);

  function Tooltip() {
    classCallCheck_default()(this, Tooltip);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Tooltip.prototype.render = function render() {
    var _extends2;

    var _props = this.props,
        placement = _props.placement,
        positionTop = _props.positionTop,
        positionLeft = _props.positionLeft,
        arrowOffsetTop = _props.arrowOffsetTop,
        arrowOffsetLeft = _props.arrowOffsetLeft,
        className = _props.className,
        style = _props.style,
        children = _props.children,
        props = objectWithoutProperties_default()(_props, ['placement', 'positionTop', 'positionLeft', 'arrowOffsetTop', 'arrowOffsetLeft', 'className', 'style', 'children']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = extends_default()({}, getClassSet(bsProps), (_extends2 = {}, _extends2[placement] = true, _extends2));

    var outerStyle = extends_default()({
      top: positionTop,
      left: positionLeft
    }, style);

    var arrowStyle = {
      top: arrowOffsetTop,
      left: arrowOffsetLeft
    };

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
      'div',
      extends_default()({}, elementProps, {
        role: 'tooltip',
        className: classnames_default()(className, classes),
        style: outerStyle
      }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('div', { className: prefix(bsProps, 'arrow'), style: arrowStyle }),
      external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement(
        'div',
        { className: prefix(bsProps, 'inner') },
        children
      )
    );
  };

  return Tooltip;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

Tooltip_Tooltip.propTypes = Tooltip_propTypes;
Tooltip_Tooltip.defaultProps = Tooltip_defaultProps;

/* harmony default export */ var src_Tooltip = (bootstrapUtils_bsClass('tooltip', Tooltip_Tooltip));
// CONCATENATED MODULE: ./src/Well.js











var Well_Well = function (_React$Component) {
  inherits_default()(Well, _React$Component);

  function Well() {
    classCallCheck_default()(this, Well);

    return possibleConstructorReturn_default()(this, _React$Component.apply(this, arguments));
  }

  Well.prototype.render = function render() {
    var _props = this.props,
        className = _props.className,
        props = objectWithoutProperties_default()(_props, ['className']);

    var _splitBsProps = splitBsProps(props),
        bsProps = _splitBsProps[0],
        elementProps = _splitBsProps[1];

    var classes = getClassSet(bsProps);

    return external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.createElement('div', extends_default()({}, elementProps, { className: classnames_default()(className, classes) }));
  };

  return Well;
}(external___root___React___commonjs2___react___commonjs___react___amd___react___default.a.Component);

/* harmony default export */ var src_Well = (bootstrapUtils_bsClass('well', bsSizes([Size.LARGE, Size.SMALL], Well_Well)));
// CONCATENATED MODULE: ./src/utils/index.js






// CONCATENATED MODULE: ./src/index.js
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Accordion", function() { return src_Accordion; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Alert", function() { return src_Alert; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Badge", function() { return src_Badge; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Breadcrumb", function() { return src_Breadcrumb; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "BreadcrumbItem", function() { return src_BreadcrumbItem; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Button", function() { return src_Button; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ButtonGroup", function() { return src_ButtonGroup; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ButtonToolbar", function() { return src_ButtonToolbar; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Carousel", function() { return src_Carousel; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "CarouselItem", function() { return src_CarouselItem; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Checkbox", function() { return src_Checkbox; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Clearfix", function() { return src_Clearfix; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "CloseButton", function() { return src_CloseButton; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ControlLabel", function() { return src_ControlLabel; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Col", function() { return src_Col; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Collapse", function() { return src_Collapse; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Dropdown", function() { return src_Dropdown; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "DropdownButton", function() { return src_DropdownButton; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Fade", function() { return src_Fade; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Form", function() { return src_Form; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "FormControl", function() { return src_FormControl; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "FormGroup", function() { return src_FormGroup; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Glyphicon", function() { return src_Glyphicon; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Grid", function() { return src_Grid; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "HelpBlock", function() { return src_HelpBlock; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Image", function() { return src_Image; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "InputGroup", function() { return src_InputGroup; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Jumbotron", function() { return src_Jumbotron; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Label", function() { return src_Label; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ListGroup", function() { return src_ListGroup; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ListGroupItem", function() { return src_ListGroupItem; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Media", function() { return src_Media; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "MenuItem", function() { return src_MenuItem; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Modal", function() { return src_Modal; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ModalBody", function() { return src_ModalBody; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ModalFooter", function() { return src_ModalFooter; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ModalHeader", function() { return src_ModalHeader; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ModalTitle", function() { return src_ModalTitle; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Nav", function() { return src_Nav; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Navbar", function() { return src_Navbar; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "NavbarBrand", function() { return src_NavbarBrand; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "NavDropdown", function() { return src_NavDropdown; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "NavItem", function() { return src_NavItem; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Overlay", function() { return src_Overlay; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "OverlayTrigger", function() { return src_OverlayTrigger; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "PageHeader", function() { return src_PageHeader; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "PageItem", function() { return PageItem; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Pager", function() { return src_Pager; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Pagination", function() { return src_Pagination; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Panel", function() { return src_Panel; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "PanelGroup", function() { return src_PanelGroup; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Popover", function() { return src_Popover; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ProgressBar", function() { return src_ProgressBar; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Radio", function() { return src_Radio; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ResponsiveEmbed", function() { return src_ResponsiveEmbed; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Row", function() { return src_Row; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "SafeAnchor", function() { return src_SafeAnchor; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "SplitButton", function() { return src_SplitButton; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Tab", function() { return src_Tab; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "TabContainer", function() { return src_TabContainer; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "TabContent", function() { return src_TabContent; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Table", function() { return src_Table; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "TabPane", function() { return src_TabPane; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Tabs", function() { return src_Tabs; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Thumbnail", function() { return src_Thumbnail; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ToggleButton", function() { return src_ToggleButton; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ToggleButtonGroup", function() { return src_ToggleButtonGroup; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Tooltip", function() { return src_Tooltip; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Well", function() { return src_Well; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utils", function() { return utils_namespaceObject; });













































































































































/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(93);
module.exports = __webpack_require__(11).Object.assign;


/***/ }),
/* 93 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__(13);

$export($export.S + $export.F, 'Object', { assign: __webpack_require__(95) });


/***/ }),
/* 94 */
/***/ (function(module, exports) {

module.exports = function (it) {
  if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  return it;
};


/***/ }),
/* 95 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 19.1.2.1 Object.assign(target, source, ...)
var getKeys = __webpack_require__(30);
var gOPS = __webpack_require__(50);
var pIE = __webpack_require__(31);
var toObject = __webpack_require__(51);
var IObject = __webpack_require__(70);
var $assign = Object.assign;

// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__(28)(function () {
  var A = {};
  var B = {};
  // eslint-disable-next-line no-undef
  var S = Symbol();
  var K = 'abcdefghijklmnopqrst';
  A[S] = 7;
  K.split('').forEach(function (k) { B[k] = k; });
  return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  var T = toObject(target);
  var aLen = arguments.length;
  var index = 1;
  var getSymbols = gOPS.f;
  var isEnum = pIE.f;
  while (aLen > index) {
    var S = IObject(arguments[index++]);
    var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
    var length = keys.length;
    var j = 0;
    var key;
    while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
  } return T;
} : $assign;


/***/ }),
/* 96 */
/***/ (function(module, exports, __webpack_require__) {

// false -> Array#indexOf
// true  -> Array#includes
var toIObject = __webpack_require__(18);
var toLength = __webpack_require__(71);
var toAbsoluteIndex = __webpack_require__(97);
module.exports = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
      if (O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};


/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(46);
var max = Math.max;
var min = Math.min;
module.exports = function (index, length) {
  index = toInteger(index);
  return index < 0 ? max(index + length, 0) : min(index, length);
};


/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(99), __esModule: true };

/***/ }),
/* 99 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(72);
__webpack_require__(105);
module.exports = __webpack_require__(56).f('iterator');


/***/ }),
/* 100 */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(46);
var defined = __webpack_require__(45);
// true  -> String#at
// false -> String#codePointAt
module.exports = function (TO_STRING) {
  return function (that, pos) {
    var s = String(defined(that));
    var i = toInteger(pos);
    var l = s.length;
    var a, b;
    if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
    a = s.charCodeAt(i);
    return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
      ? TO_STRING ? s.charAt(i) : a
      : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  };
};


/***/ }),
/* 101 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var create = __webpack_require__(54);
var descriptor = __webpack_require__(29);
var setToStringTag = __webpack_require__(55);
var IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(20)(IteratorPrototype, __webpack_require__(12)('iterator'), function () { return this; });

module.exports = function (Constructor, NAME, next) {
  Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  setToStringTag(Constructor, NAME + ' Iterator');
};


/***/ }),
/* 102 */
/***/ (function(module, exports, __webpack_require__) {

var dP = __webpack_require__(16);
var anObject = __webpack_require__(21);
var getKeys = __webpack_require__(30);

module.exports = __webpack_require__(23) ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = getKeys(Properties);
  var length = keys.length;
  var i = 0;
  var P;
  while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  return O;
};


/***/ }),
/* 103 */
/***/ (function(module, exports, __webpack_require__) {

var document = __webpack_require__(14).document;
module.exports = document && document.documentElement;


/***/ }),
/* 104 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(17);
var toObject = __webpack_require__(51);
var IE_PROTO = __webpack_require__(47)('IE_PROTO');
var ObjectProto = Object.prototype;

module.exports = Object.getPrototypeOf || function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectProto : null;
};


/***/ }),
/* 105 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(106);
var global = __webpack_require__(14);
var hide = __webpack_require__(20);
var Iterators = __webpack_require__(32);
var TO_STRING_TAG = __webpack_require__(12)('toStringTag');

var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
  'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
  'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
  'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
  'TextTrackList,TouchList').split(',');

for (var i = 0; i < DOMIterables.length; i++) {
  var NAME = DOMIterables[i];
  var Collection = global[NAME];
  var proto = Collection && Collection.prototype;
  if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  Iterators[NAME] = Iterators.Array;
}


/***/ }),
/* 106 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var addToUnscopables = __webpack_require__(107);
var step = __webpack_require__(108);
var Iterators = __webpack_require__(32);
var toIObject = __webpack_require__(18);

// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(73)(Array, 'Array', function (iterated, kind) {
  this._t = toIObject(iterated); // target
  this._i = 0;                   // next index
  this._k = kind;                // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var kind = this._k;
  var index = this._i++;
  if (!O || index >= O.length) {
    this._t = undefined;
    return step(1);
  }
  if (kind == 'keys') return step(0, index);
  if (kind == 'values') return step(0, O[index]);
  return step(0, [index, O[index]]);
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;

addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');


/***/ }),
/* 107 */
/***/ (function(module, exports) {

module.exports = function () { /* empty */ };


/***/ }),
/* 108 */
/***/ (function(module, exports) {

module.exports = function (done, value) {
  return { value: value, done: !!done };
};


/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(110), __esModule: true };

/***/ }),
/* 110 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(111);
__webpack_require__(116);
__webpack_require__(117);
__webpack_require__(118);
module.exports = __webpack_require__(11).Symbol;


/***/ }),
/* 111 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// ECMAScript 6 symbols shim
var global = __webpack_require__(14);
var has = __webpack_require__(17);
var DESCRIPTORS = __webpack_require__(23);
var $export = __webpack_require__(13);
var redefine = __webpack_require__(74);
var META = __webpack_require__(112).KEY;
var $fails = __webpack_require__(28);
var shared = __webpack_require__(48);
var setToStringTag = __webpack_require__(55);
var uid = __webpack_require__(34);
var wks = __webpack_require__(12);
var wksExt = __webpack_require__(56);
var wksDefine = __webpack_require__(57);
var enumKeys = __webpack_require__(113);
var isArray = __webpack_require__(114);
var anObject = __webpack_require__(21);
var isObject = __webpack_require__(22);
var toIObject = __webpack_require__(18);
var toPrimitive = __webpack_require__(43);
var createDesc = __webpack_require__(29);
var _create = __webpack_require__(54);
var gOPNExt = __webpack_require__(115);
var $GOPD = __webpack_require__(76);
var $DP = __webpack_require__(16);
var $keys = __webpack_require__(30);
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
var $Symbol = global.Symbol;
var $JSON = global.JSON;
var _stringify = $JSON && $JSON.stringify;
var PROTOTYPE = 'prototype';
var HIDDEN = wks('_hidden');
var TO_PRIMITIVE = wks('toPrimitive');
var isEnum = {}.propertyIsEnumerable;
var SymbolRegistry = shared('symbol-registry');
var AllSymbols = shared('symbols');
var OPSymbols = shared('op-symbols');
var ObjectProto = Object[PROTOTYPE];
var USE_NATIVE = typeof $Symbol == 'function';
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;

// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function () {
  return _create(dP({}, 'a', {
    get: function () { return dP(this, 'a', { value: 7 }).a; }
  })).a != 7;
}) ? function (it, key, D) {
  var protoDesc = gOPD(ObjectProto, key);
  if (protoDesc) delete ObjectProto[key];
  dP(it, key, D);
  if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
} : dP;

var wrap = function (tag) {
  var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  sym._k = tag;
  return sym;
};

var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  return it instanceof $Symbol;
};

var $defineProperty = function defineProperty(it, key, D) {
  if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  anObject(it);
  key = toPrimitive(key, true);
  anObject(D);
  if (has(AllSymbols, key)) {
    if (!D.enumerable) {
      if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
      it[HIDDEN][key] = true;
    } else {
      if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
      D = _create(D, { enumerable: createDesc(0, false) });
    } return setSymbolDesc(it, key, D);
  } return dP(it, key, D);
};
var $defineProperties = function defineProperties(it, P) {
  anObject(it);
  var keys = enumKeys(P = toIObject(P));
  var i = 0;
  var l = keys.length;
  var key;
  while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  return it;
};
var $create = function create(it, P) {
  return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  var E = isEnum.call(this, key = toPrimitive(key, true));
  if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  it = toIObject(it);
  key = toPrimitive(key, true);
  if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  var D = gOPD(it, key);
  if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  var names = gOPN(toIObject(it));
  var result = [];
  var i = 0;
  var key;
  while (names.length > i) {
    if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  } return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  var IS_OP = it === ObjectProto;
  var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
  var result = [];
  var i = 0;
  var key;
  while (names.length > i) {
    if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  } return result;
};

// 19.4.1.1 Symbol([description])
if (!USE_NATIVE) {
  $Symbol = function Symbol() {
    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
    var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
    var $set = function (value) {
      if (this === ObjectProto) $set.call(OPSymbols, value);
      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
      setSymbolDesc(this, tag, createDesc(1, value));
    };
    if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
    return wrap(tag);
  };
  redefine($Symbol[PROTOTYPE], 'toString', function toString() {
    return this._k;
  });

  $GOPD.f = $getOwnPropertyDescriptor;
  $DP.f = $defineProperty;
  __webpack_require__(75).f = gOPNExt.f = $getOwnPropertyNames;
  __webpack_require__(31).f = $propertyIsEnumerable;
  __webpack_require__(50).f = $getOwnPropertySymbols;

  if (DESCRIPTORS && !__webpack_require__(53)) {
    redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  }

  wksExt.f = function (name) {
    return wrap(wks(name));
  };
}

$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });

for (var es6Symbols = (
  // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);

for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);

$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  // 19.4.2.1 Symbol.for(key)
  'for': function (key) {
    return has(SymbolRegistry, key += '')
      ? SymbolRegistry[key]
      : SymbolRegistry[key] = $Symbol(key);
  },
  // 19.4.2.5 Symbol.keyFor(sym)
  keyFor: function keyFor(sym) {
    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
    for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  },
  useSetter: function () { setter = true; },
  useSimple: function () { setter = false; }
});

$export($export.S + $export.F * !USE_NATIVE, 'Object', {
  // 19.1.2.2 Object.create(O [, Properties])
  create: $create,
  // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  defineProperty: $defineProperty,
  // 19.1.2.3 Object.defineProperties(O, Properties)
  defineProperties: $defineProperties,
  // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  // 19.1.2.7 Object.getOwnPropertyNames(O)
  getOwnPropertyNames: $getOwnPropertyNames,
  // 19.1.2.8 Object.getOwnPropertySymbols(O)
  getOwnPropertySymbols: $getOwnPropertySymbols
});

// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  var S = $Symbol();
  // MS Edge converts symbol values to JSON as {}
  // WebKit converts symbol values to JSON as null
  // V8 throws on boxed symbols
  return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
  stringify: function stringify(it) {
    var args = [it];
    var i = 1;
    var replacer, $replacer;
    while (arguments.length > i) args.push(arguments[i++]);
    $replacer = replacer = args[1];
    if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
    if (!isArray(replacer)) replacer = function (key, value) {
      if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
      if (!isSymbol(value)) return value;
    };
    args[1] = replacer;
    return _stringify.apply($JSON, args);
  }
});

// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(20)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);


/***/ }),
/* 112 */
/***/ (function(module, exports, __webpack_require__) {

var META = __webpack_require__(34)('meta');
var isObject = __webpack_require__(22);
var has = __webpack_require__(17);
var setDesc = __webpack_require__(16).f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
  return true;
};
var FREEZE = !__webpack_require__(28)(function () {
  return isExtensible(Object.preventExtensions({}));
});
var setMeta = function (it) {
  setDesc(it, META, { value: {
    i: 'O' + ++id, // object ID
    w: {}          // weak collections IDs
  } });
};
var fastKey = function (it, create) {
  // return primitive with prefix
  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  if (!has(it, META)) {
    // can't set metadata to uncaught frozen object
    if (!isExtensible(it)) return 'F';
    // not necessary to add metadata
    if (!create) return 'E';
    // add missing metadata
    setMeta(it);
  // return object ID
  } return it[META].i;
};
var getWeak = function (it, create) {
  if (!has(it, META)) {
    // can't set metadata to uncaught frozen object
    if (!isExtensible(it)) return true;
    // not necessary to add metadata
    if (!create) return false;
    // add missing metadata
    setMeta(it);
  // return hash weak collections IDs
  } return it[META].w;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
  if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  return it;
};
var meta = module.exports = {
  KEY: META,
  NEED: false,
  fastKey: fastKey,
  getWeak: getWeak,
  onFreeze: onFreeze
};


/***/ }),
/* 113 */
/***/ (function(module, exports, __webpack_require__) {

// all enumerable object keys, includes symbols
var getKeys = __webpack_require__(30);
var gOPS = __webpack_require__(50);
var pIE = __webpack_require__(31);
module.exports = function (it) {
  var result = getKeys(it);
  var getSymbols = gOPS.f;
  if (getSymbols) {
    var symbols = getSymbols(it);
    var isEnum = pIE.f;
    var i = 0;
    var key;
    while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  } return result;
};


/***/ }),
/* 114 */
/***/ (function(module, exports, __webpack_require__) {

// 7.2.2 IsArray(argument)
var cof = __webpack_require__(44);
module.exports = Array.isArray || function isArray(arg) {
  return cof(arg) == 'Array';
};


/***/ }),
/* 115 */
/***/ (function(module, exports, __webpack_require__) {

// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__(18);
var gOPN = __webpack_require__(75).f;
var toString = {}.toString;

var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  ? Object.getOwnPropertyNames(window) : [];

var getWindowNames = function (it) {
  try {
    return gOPN(it);
  } catch (e) {
    return windowNames.slice();
  }
};

module.exports.f = function getOwnPropertyNames(it) {
  return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
};


/***/ }),
/* 116 */
/***/ (function(module, exports) {



/***/ }),
/* 117 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(57)('asyncIterator');


/***/ }),
/* 118 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(57)('observable');


/***/ }),
/* 119 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(120), __esModule: true };

/***/ }),
/* 120 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(121);
module.exports = __webpack_require__(11).Object.setPrototypeOf;


/***/ }),
/* 121 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = __webpack_require__(13);
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(122).set });


/***/ }),
/* 122 */
/***/ (function(module, exports, __webpack_require__) {

// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var isObject = __webpack_require__(22);
var anObject = __webpack_require__(21);
var check = function (O, proto) {
  anObject(O);
  if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
};
module.exports = {
  set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
    function (test, buggy, set) {
      try {
        set = __webpack_require__(42)(Function.call, __webpack_require__(76).f(Object.prototype, '__proto__').set, 2);
        set(test, []);
        buggy = !(test instanceof Array);
      } catch (e) { buggy = true; }
      return function setPrototypeOf(O, proto) {
        check(O, proto);
        if (buggy) O.__proto__ = proto;
        else set(O, proto);
        return O;
      };
    }({}, false) : undefined),
  check: check
};


/***/ }),
/* 123 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(124), __esModule: true };

/***/ }),
/* 124 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(125);
var $Object = __webpack_require__(11).Object;
module.exports = function create(P, D) {
  return $Object.create(P, D);
};


/***/ }),
/* 125 */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(13);
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', { create: __webpack_require__(54) });


/***/ }),
/* 126 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



var emptyFunction = __webpack_require__(58);
var invariant = __webpack_require__(59);
var warning = __webpack_require__(77);
var assign = __webpack_require__(127);

var ReactPropTypesSecret = __webpack_require__(60);
var checkPropTypes = __webpack_require__(128);

module.exports = function(isValidElement, throwOnDirectAccess) {
  /* global Symbol */
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.

  /**
   * Returns the iterator method function contained on the iterable object.
   *
   * Be sure to invoke the function with the iterable as context:
   *
   *     var iteratorFn = getIteratorFn(myIterable);
   *     if (iteratorFn) {
   *       var iterator = iteratorFn.call(myIterable);
   *       ...
   *     }
   *
   * @param {?object} maybeIterable
   * @return {?function}
   */
  function getIteratorFn(maybeIterable) {
    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
    if (typeof iteratorFn === 'function') {
      return iteratorFn;
    }
  }

  /**
   * Collection of methods that allow declaration and validation of props that are
   * supplied to React components. Example usage:
   *
   *   var Props = require('ReactPropTypes');
   *   var MyArticle = React.createClass({
   *     propTypes: {
   *       // An optional string prop named "description".
   *       description: Props.string,
   *
   *       // A required enum prop named "category".
   *       category: Props.oneOf(['News','Photos']).isRequired,
   *
   *       // A prop named "dialog" that requires an instance of Dialog.
   *       dialog: Props.instanceOf(Dialog).isRequired
   *     },
   *     render: function() { ... }
   *   });
   *
   * A more formal specification of how these methods are used:
   *
   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
   *   decl := ReactPropTypes.{type}(.isRequired)?
   *
   * Each and every declaration produces a function with the same signature. This
   * allows the creation of custom validation functions. For example:
   *
   *  var MyLink = React.createClass({
   *    propTypes: {
   *      // An optional string or URI prop named "href".
   *      href: function(props, propName, componentName) {
   *        var propValue = props[propName];
   *        if (propValue != null && typeof propValue !== 'string' &&
   *            !(propValue instanceof URI)) {
   *          return new Error(
   *            'Expected a string or an URI for ' + propName + ' in ' +
   *            componentName
   *          );
   *        }
   *      }
   *    },
   *    render: function() {...}
   *  });
   *
   * @internal
   */

  var ANONYMOUS = '<<anonymous>>';

  // Important!
  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
  var ReactPropTypes = {
    array: createPrimitiveTypeChecker('array'),
    bool: createPrimitiveTypeChecker('boolean'),
    func: createPrimitiveTypeChecker('function'),
    number: createPrimitiveTypeChecker('number'),
    object: createPrimitiveTypeChecker('object'),
    string: createPrimitiveTypeChecker('string'),
    symbol: createPrimitiveTypeChecker('symbol'),

    any: createAnyTypeChecker(),
    arrayOf: createArrayOfTypeChecker,
    element: createElementTypeChecker(),
    instanceOf: createInstanceTypeChecker,
    node: createNodeChecker(),
    objectOf: createObjectOfTypeChecker,
    oneOf: createEnumTypeChecker,
    oneOfType: createUnionTypeChecker,
    shape: createShapeTypeChecker,
    exact: createStrictShapeTypeChecker,
  };

  /**
   * inlined Object.is polyfill to avoid requiring consumers ship their own
   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
   */
  /*eslint-disable no-self-compare*/
  function is(x, y) {
    // SameValue algorithm
    if (x === y) {
      // Steps 1-5, 7-10
      // Steps 6.b-6.e: +0 != -0
      return x !== 0 || 1 / x === 1 / y;
    } else {
      // Step 6.a: NaN == NaN
      return x !== x && y !== y;
    }
  }
  /*eslint-enable no-self-compare*/

  /**
   * We use an Error-like object for backward compatibility as people may call
   * PropTypes directly and inspect their output. However, we don't use real
   * Errors anymore. We don't inspect their stack anyway, and creating them
   * is prohibitively expensive if they are created too often, such as what
   * happens in oneOfType() for any type before the one that matched.
   */
  function PropTypeError(message) {
    this.message = message;
    this.stack = '';
  }
  // Make `instanceof Error` still work for returned errors.
  PropTypeError.prototype = Error.prototype;

  function createChainableTypeChecker(validate) {
    if (undefined !== 'production') {
      var manualPropTypeCallCache = {};
      var manualPropTypeWarningCount = 0;
    }
    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
      componentName = componentName || ANONYMOUS;
      propFullName = propFullName || propName;

      if (secret !== ReactPropTypesSecret) {
        if (throwOnDirectAccess) {
          // New behavior only for users of `prop-types` package
          invariant(
            false,
            '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'
          );
        } else if (undefined !== 'production' && typeof console !== 'undefined') {
          // Old behavior for people using React.PropTypes
          var cacheKey = componentName + ':' + propName;
          if (
            !manualPropTypeCallCache[cacheKey] &&
            // Avoid spamming the console because they are often not actionable except for lib authors
            manualPropTypeWarningCount < 3
          ) {
            warning(
              false,
              'You are manually calling a React.PropTypes validation ' +
              'function for the `%s` prop on `%s`. This is deprecated ' +
              'and will throw in the standalone `prop-types` package. ' +
              'You may be seeing this warning due to a third-party PropTypes ' +
              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
              propFullName,
              componentName
            );
            manualPropTypeCallCache[cacheKey] = true;
            manualPropTypeWarningCount++;
          }
        }
      }
      if (props[propName] == null) {
        if (isRequired) {
          if (props[propName] === null) {
            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
          }
          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
        }
        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, secret) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== expectedType) {
        // `propValue` being instance of, say, date/regexp, pass the 'object'
        // check, but we can offer a more precise error message here rather than
        // 'of type `object`'.
        var preciseType = getPreciseType(propValue);

        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createAnyTypeChecker() {
    return createChainableTypeChecker(emptyFunction.thatReturnsNull);
  }

  function createArrayOfTypeChecker(typeChecker) {
    function validate(props, propName, componentName, location, propFullName) {
      if (typeof typeChecker !== 'function') {
        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
      }
      var propValue = props[propName];
      if (!Array.isArray(propValue)) {
        var propType = getPropType(propValue);
        return new PropTypeError('Invalid ' + location + ' `' + 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 + ']', ReactPropTypesSecret);
        if (error instanceof Error) {
          return error;
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createElementTypeChecker() {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      if (!isValidElement(propValue)) {
        var propType = getPropType(propValue);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` 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 expectedClassName = expectedClass.name || ANONYMOUS;
        var actualClassName = getClassName(props[propName]);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createEnumTypeChecker(expectedValues) {
    if (!Array.isArray(expectedValues)) {
      undefined !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
      return emptyFunction.thatReturnsNull;
    }

    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      for (var i = 0; i < expectedValues.length; i++) {
        if (is(propValue, expectedValues[i])) {
          return null;
        }
      }

      var valuesString = JSON.stringify(expectedValues);
      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
    }
    return createChainableTypeChecker(validate);
  }

  function createObjectOfTypeChecker(typeChecker) {
    function validate(props, propName, componentName, location, propFullName) {
      if (typeof typeChecker !== 'function') {
        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
      }
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + 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, ReactPropTypesSecret);
          if (error instanceof Error) {
            return error;
          }
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createUnionTypeChecker(arrayOfTypeCheckers) {
    if (!Array.isArray(arrayOfTypeCheckers)) {
      undefined !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
      return emptyFunction.thatReturnsNull;
    }

    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
      var checker = arrayOfTypeCheckers[i];
      if (typeof checker !== 'function') {
        warning(
          false,
          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
          'received %s at index %s.',
          getPostfixForTypeWarning(checker),
          i
        );
        return emptyFunction.thatReturnsNull;
      }
    }

    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, ReactPropTypesSecret) == null) {
          return null;
        }
      }

      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
    }
    return createChainableTypeChecker(validate);
  }

  function createNodeChecker() {
    function validate(props, propName, componentName, location, propFullName) {
      if (!isNode(props[propName])) {
        return new PropTypeError('Invalid ' + location + ' `' + 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') {
        return new PropTypeError('Invalid ' + location + ' `' + 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, ReactPropTypesSecret);
        if (error) {
          return error;
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createStrictShapeTypeChecker(shapeTypes) {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
      }
      // We need to check all keys in case some are required but missing from
      // props.
      var allKeys = assign({}, props[propName], shapeTypes);
      for (var key in allKeys) {
        var checker = shapeTypes[key];
        if (!checker) {
          return new PropTypeError(
            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
            '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
            '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
          );
        }
        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
        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 || 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 {
            // Iterator will provide entry [k,v] tuples rather than values.
            while (!(step = iterator.next()).done) {
              var entry = step.value;
              if (entry) {
                if (!isNode(entry[1])) {
                  return false;
                }
              }
            }
          }
        } else {
          return false;
        }

        return true;
      default:
        return false;
    }
  }

  function isSymbol(propType, propValue) {
    // Native Symbol.
    if (propType === 'symbol') {
      return true;
    }

    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
    if (propValue['@@toStringTag'] === 'Symbol') {
      return true;
    }

    // Fallback for non-spec compliant Symbols which are polyfilled.
    if (typeof Symbol === 'function' && propValue instanceof Symbol) {
      return true;
    }

    return false;
  }

  // Equivalent of `typeof` but with special handling for array and regexp.
  function getPropType(propValue) {
    var propType = typeof propValue;
    if (Array.isArray(propValue)) {
      return 'array';
    }
    if (propValue instanceof RegExp) {
      // Old webkits (at least until Android 4.0) return 'function' rather than
      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
      // passes PropTypes.object.
      return 'object';
    }
    if (isSymbol(propType, propValue)) {
      return 'symbol';
    }
    return propType;
  }

  // This handles more types than `getPropType`. Only used for error messages.
  // See `createPrimitiveTypeChecker`.
  function getPreciseType(propValue) {
    if (typeof propValue === 'undefined' || propValue === null) {
      return '' + propValue;
    }
    var propType = getPropType(propValue);
    if (propType === 'object') {
      if (propValue instanceof Date) {
        return 'date';
      } else if (propValue instanceof RegExp) {
        return 'regexp';
      }
    }
    return propType;
  }

  // Returns a string that is postfixed to a warning about an invalid type.
  // For example, "undefined" or "of type array"
  function getPostfixForTypeWarning(value) {
    var type = getPreciseType(value);
    switch (type) {
      case 'array':
      case 'object':
        return 'an ' + type;
      case 'boolean':
      case 'date':
      case 'regexp':
        return 'a ' + type;
      default:
        return type;
    }
  }

  // Returns class name of the object, if any.
  function getClassName(propValue) {
    if (!propValue.constructor || !propValue.constructor.name) {
      return ANONYMOUS;
    }
    return propValue.constructor.name;
  }

  ReactPropTypes.checkPropTypes = checkPropTypes;
  ReactPropTypes.PropTypes = ReactPropTypes;

  return ReactPropTypes;
};


/***/ }),
/* 127 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/


/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;

function toObject(val) {
	if (val === null || val === undefined) {
		throw new TypeError('Object.assign cannot be called with null or undefined');
	}

	return Object(val);
}

function shouldUseNative() {
	try {
		if (!Object.assign) {
			return false;
		}

		// Detect buggy property enumeration order in older V8 versions.

		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
		test1[5] = 'de';
		if (Object.getOwnPropertyNames(test1)[0] === '5') {
			return false;
		}

		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
		var test2 = {};
		for (var i = 0; i < 10; i++) {
			test2['_' + String.fromCharCode(i)] = i;
		}
		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
			return test2[n];
		});
		if (order2.join('') !== '0123456789') {
			return false;
		}

		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
		var test3 = {};
		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
			test3[letter] = letter;
		});
		if (Object.keys(Object.assign({}, test3)).join('') !==
				'abcdefghijklmnopqrst') {
			return false;
		}

		return true;
	} catch (err) {
		// We don't expect any of the above to throw, but better to be safe.
		return false;
	}
}

module.exports = shouldUseNative() ? Object.assign : function (target, source) {
	var from;
	var to = toObject(target);
	var symbols;

	for (var s = 1; s < arguments.length; s++) {
		from = Object(arguments[s]);

		for (var key in from) {
			if (hasOwnProperty.call(from, key)) {
				to[key] = from[key];
			}
		}

		if (getOwnPropertySymbols) {
			symbols = getOwnPropertySymbols(from);
			for (var i = 0; i < symbols.length; i++) {
				if (propIsEnumerable.call(from, symbols[i])) {
					to[symbols[i]] = from[symbols[i]];
				}
			}
		}
	}

	return to;
};


/***/ }),
/* 128 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



if (undefined !== 'production') {
  var invariant = __webpack_require__(59);
  var warning = __webpack_require__(77);
  var ReactPropTypesSecret = __webpack_require__(60);
  var loggedTypeFailures = {};
}

/**
 * Assert that the values match with the type specs.
 * Error messages are memorized and will only be shown once.
 *
 * @param {object} typeSpecs Map of name to a ReactPropType
 * @param {object} values Runtime values that need to be type-checked
 * @param {string} location e.g. "prop", "context", "child context"
 * @param {string} componentName Name of the component for error messages.
 * @param {?Function} getStack Returns the component stack.
 * @private
 */
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
  if (undefined !== 'production') {
    for (var typeSpecName in typeSpecs) {
      if (typeSpecs.hasOwnProperty(typeSpecName)) {
        var error;
        // Prop type validation may throw. In case they do, we don't want to
        // fail the render phase where it didn't fail before. So we log it.
        // After these have been cleaned up, we'll let them throw.
        try {
          // This is intentionally an invariant that gets caught. It's the same
          // behavior as without this statement except with a better message.
          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
        } catch (ex) {
          error = ex;
        }
        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', location, typeSpecName, typeof error);
        if (error instanceof Error && !(error.message in loggedTypeFailures)) {
          // Only monitor this failure once because there tends to be a lot of the
          // same error.
          loggedTypeFailures[error.message] = true;

          var stack = getStack ? getStack() : '';

          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
        }
      }
    }
  }
}

module.exports = checkPropTypes;


/***/ }),
/* 129 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



var emptyFunction = __webpack_require__(58);
var invariant = __webpack_require__(59);
var ReactPropTypesSecret = __webpack_require__(60);

module.exports = function() {
  function shim(props, propName, componentName, location, propFullName, secret) {
    if (secret === ReactPropTypesSecret) {
      // It is still safe when called from React.
      return;
    }
    invariant(
      false,
      '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'
    );
  };
  shim.isRequired = shim;
  function getShim() {
    return shim;
  };
  // Important!
  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
  var ReactPropTypes = {
    array: shim,
    bool: shim,
    func: shim,
    number: shim,
    object: shim,
    string: shim,
    symbol: shim,

    any: shim,
    arrayOf: getShim,
    element: shim,
    instanceOf: getShim,
    node: shim,
    objectOf: getShim,
    oneOf: getShim,
    oneOfType: getShim,
    shape: getShim,
    exact: getShim
  };

  ReactPropTypes.checkPropTypes = emptyFunction;
  ReactPropTypes.PropTypes = ReactPropTypes;

  return ReactPropTypes;
};


/***/ }),
/* 130 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

exports.default = createUncontrollable;

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _invariant = __webpack_require__(35);

var _invariant2 = _interopRequireDefault(_invariant);

var _utils = __webpack_require__(131);

var utils = _interopRequireWildcard(_utils);

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

function createUncontrollable(mixin, set) {

  return uncontrollable;

  function uncontrollable(Component, controlledValues) {
    var _class, _temp;

    var methods = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];

    var displayName = Component.displayName || Component.name || 'Component',
        basePropTypes = utils.getType(Component).propTypes,
        isCompositeComponent = utils.isReactComponent(Component),
        controlledProps = Object.keys(controlledValues),
        propTypes;

    var OMIT_PROPS = ['valueLink', 'checkedLink'].concat(controlledProps.map(utils.defaultKey));

    propTypes = utils.uncontrolledPropTypes(controlledValues, basePropTypes, displayName);

    (0, _invariant2.default)(isCompositeComponent || !methods.length, '[uncontrollable] stateless function components cannot pass through methods ' + 'because they have no associated instances. Check component: ' + displayName + ', ' + 'attempting to pass through methods: ' + methods.join(', '));

    methods = utils.transform(methods, function (obj, method) {
      obj[method] = function () {
        var _refs$inner;

        return (_refs$inner = this.refs.inner)[method].apply(_refs$inner, arguments);
      };
    }, {});

    var component = (_temp = _class = function (_React$Component) {
      _inherits(component, _React$Component);

      function component() {
        _classCallCheck(this, component);

        return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
      }

      component.prototype.shouldComponentUpdate = function shouldComponentUpdate() {
        for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }

        return !mixin.shouldComponentUpdate || mixin.shouldComponentUpdate.apply(this, args);
      };

      component.prototype.componentWillMount = function componentWillMount() {
        var _this2 = this;

        var props = this.props;

        this._values = {};

        controlledProps.forEach(function (key) {
          _this2._values[key] = props[utils.defaultKey(key)];
        });
      };

      /**
       * If a prop switches from controlled to Uncontrolled
       * reset its value to the defaultValue
       */


      component.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
        var _this3 = this;

        var props = this.props;

        if (mixin.componentWillReceiveProps) {
          mixin.componentWillReceiveProps.call(this, nextProps);
        }

        controlledProps.forEach(function (key) {
          if (utils.getValue(nextProps, key) === undefined && utils.getValue(props, key) !== undefined) {
            _this3._values[key] = nextProps[utils.defaultKey(key)];
          }
        });
      };

      component.prototype.componentWillUnmount = function componentWillUnmount() {
        this.unmounted = true;
      };

      component.prototype.getControlledInstance = function getControlledInstance() {
        return this.refs.inner;
      };

      component.prototype.render = function render() {
        var _this4 = this;

        var newProps = {},
            props = omitProps(this.props);

        utils.each(controlledValues, function (handle, propName) {
          var linkPropName = utils.getLinkName(propName),
              prop = _this4.props[propName];

          if (linkPropName && !isProp(_this4.props, propName) && isProp(_this4.props, linkPropName)) {
            prop = _this4.props[linkPropName].value;
          }

          newProps[propName] = prop !== undefined ? prop : _this4._values[propName];

          newProps[handle] = setAndNotify.bind(_this4, propName);
        });

        newProps = _extends({}, props, newProps, {
          ref: isCompositeComponent ? 'inner' : null
        });

        return _react2.default.createElement(Component, newProps);
      };

      return component;
    }(_react2.default.Component), _class.displayName = 'Uncontrolled(' + displayName + ')', _class.propTypes = propTypes, _temp);

    _extends(component.prototype, methods);

    component.ControlledComponent = Component;

    /**
     * useful when wrapping a Component and you want to control
     * everything
     */
    component.deferControlTo = function (newComponent) {
      var additions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var nextMethods = arguments[2];

      return uncontrollable(newComponent, _extends({}, controlledValues, additions), nextMethods);
    };

    return component;

    function setAndNotify(propName, value) {
      var linkName = utils.getLinkName(propName),
          handler = this.props[controlledValues[propName]];

      if (linkName && isProp(this.props, linkName) && !handler) {
        handler = this.props[linkName].requestChange;
      }

      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
        args[_key2 - 2] = arguments[_key2];
      }

      set(this, propName, handler, value, args);
    }

    function isProp(props, prop) {
      return props[prop] !== undefined;
    }

    function omitProps(props) {
      var result = {};

      utils.each(props, function (value, key) {
        if (OMIT_PROPS.indexOf(key) === -1) result[key] = value;
      });

      return result;
    }
  }
}
module.exports = exports['default'];

/***/ }),
/* 131 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.version = undefined;
exports.uncontrolledPropTypes = uncontrolledPropTypes;
exports.getType = getType;
exports.getValue = getValue;
exports.getLinkName = getLinkName;
exports.defaultKey = defaultKey;
exports.chain = chain;
exports.transform = transform;
exports.each = each;
exports.has = has;
exports.isReactComponent = isReactComponent;

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _invariant = __webpack_require__(35);

var _invariant2 = _interopRequireDefault(_invariant);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function readOnlyPropType(handler, name) {
  return function (props, propName) {
    if (props[propName] !== undefined) {
      if (!props[handler]) {
        return new Error('You have provided a `' + propName + '` prop to ' + '`' + name + '` without an `' + handler + '` handler. This will render a read-only field. ' + 'If the field should be mutable use `' + defaultKey(propName) + '`. Otherwise, set `' + handler + '`');
      }
    }
  };
}

function uncontrolledPropTypes(controlledValues, basePropTypes, displayName) {
  var propTypes = {};

  if (undefined !== 'production' && basePropTypes) {
    transform(controlledValues, function (obj, handler, prop) {
      (0, _invariant2.default)(typeof handler === 'string' && handler.trim().length, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop);

      obj[prop] = readOnlyPropType(handler, displayName);
    }, propTypes);
  }

  return propTypes;
}

var version = exports.version = _react2.default.version.split('.').map(parseFloat);

function getType(component) {
  if (version[0] >= 15 || version[0] === 0 && version[1] >= 13) return component;

  return component.type;
}

function getValue(props, name) {
  var linkPropName = getLinkName(name);

  if (linkPropName && !isProp(props, name) && isProp(props, linkPropName)) return props[linkPropName].value;

  return props[name];
}

function isProp(props, prop) {
  return props[prop] !== undefined;
}

function getLinkName(name) {
  return name === 'value' ? 'valueLink' : name === 'checked' ? 'checkedLink' : null;
}

function defaultKey(key) {
  return 'default' + key.charAt(0).toUpperCase() + key.substr(1);
}

function chain(thisArg, a, b) {
  return function chainedFunction() {
    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    a && a.call.apply(a, [thisArg].concat(args));
    b && b.call.apply(b, [thisArg].concat(args));
  };
}

function transform(obj, cb, seed) {
  each(obj, cb.bind(null, seed = seed || (Array.isArray(obj) ? [] : {})));
  return seed;
}

function each(obj, cb, thisArg) {
  if (Array.isArray(obj)) return obj.forEach(cb, thisArg);

  for (var key in obj) {
    if (has(obj, key)) cb.call(thisArg, obj[key], key, obj);
  }
}

function has(o, k) {
  return o ? Object.prototype.hasOwnProperty.call(o, k) : false;
}

/**
 * Copyright (c) 2013-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.
 */
function isReactComponent(component) {
  return !!(component && component.prototype && component.prototype.isReactComponent);
}

/***/ }),
/* 132 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(133);
module.exports = __webpack_require__(11).Object.entries;


/***/ }),
/* 133 */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(13);
var $entries = __webpack_require__(79)(true);

$export($export.S, 'Object', {
  entries: function entries(it) {
    return $entries(it);
  }
});


/***/ }),
/* 134 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(135);
module.exports = __webpack_require__(11).Object.values;


/***/ }),
/* 135 */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(13);
var $values = __webpack_require__(79)(false);

$export($export.S, 'Object', {
  values: function values(it) {
    return $values(it);
  }
});


/***/ }),
/* 136 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.properties = exports.end = undefined;

var _end = __webpack_require__(137);

var _end2 = _interopRequireDefault(_end);

var _properties = __webpack_require__(61);

var _properties2 = _interopRequireDefault(_properties);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.end = _end2.default;
exports.properties = _properties2.default;
exports.default = { end: _end2.default, properties: _properties2.default };

/***/ }),
/* 137 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _properties = __webpack_require__(61);

var _properties2 = _interopRequireDefault(_properties);

var _style = __webpack_require__(33);

var _style2 = _interopRequireDefault(_style);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function onEnd(node, handler, duration) {
  var fakeEvent = {
    target: node,
    currentTarget: node
  },
      backup;

  if (!_properties2.default.end) duration = 0;else if (duration == null) duration = parseDuration(node) || 0;

  if (_properties2.default.end) {
    node.addEventListener(_properties2.default.end, done, false);

    backup = setTimeout(function () {
      return done(fakeEvent);
    }, (duration || 100) * 1.5);
  } else setTimeout(done.bind(null, fakeEvent), 0);

  function done(event) {
    if (event.target !== event.currentTarget) return;
    clearTimeout(backup);
    event.target.removeEventListener(_properties2.default.end, done);
    handler.call(this);
  }
}

onEnd._parseDuration = parseDuration;

exports.default = onEnd;


function parseDuration(node) {
  var str = (0, _style2.default)(node, _properties2.default.duration),
      mult = str.indexOf('ms') === -1 ? 1000 : 1;

  return parseFloat(str) * mult;
}
module.exports = exports['default'];

/***/ }),
/* 138 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = camelize;
var rHyphen = /-(.)/g;

function camelize(string) {
  return string.replace(rHyphen, function (_, chr) {
    return chr.toUpperCase();
  });
}
module.exports = exports["default"];

/***/ }),
/* 139 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = hyphenateStyleName;

var _hyphenate = __webpack_require__(140);

var _hyphenate2 = _interopRequireDefault(_hyphenate);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var msPattern = /^ms-/; /**
                         * Copyright 2013-2014, Facebook, Inc.
                         * All rights reserved.
                         * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js
                         */

function hyphenateStyleName(string) {
  return (0, _hyphenate2.default)(string).replace(msPattern, '-ms-');
}
module.exports = exports['default'];

/***/ }),
/* 140 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = hyphenate;

var rUpper = /([A-Z])/g;

function hyphenate(string) {
  return string.replace(rUpper, '-$1').toLowerCase();
}
module.exports = exports['default'];

/***/ }),
/* 141 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = _getComputedStyle;

var _camelizeStyle = __webpack_require__(80);

var _camelizeStyle2 = _interopRequireDefault(_camelizeStyle);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var rposition = /^(top|right|bottom|left)$/;
var rnumnonpx = /^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i;

function _getComputedStyle(node) {
  if (!node) throw new TypeError('No Element passed to `getComputedStyle()`');
  var doc = node.ownerDocument;

  return 'defaultView' in doc ? doc.defaultView.opener ? node.ownerDocument.defaultView.getComputedStyle(node, null) : window.getComputedStyle(node, null) : {
    //ie 8 "magic" from: https://github.com/jquery/jquery/blob/1.11-stable/src/css/curCSS.js#L72
    getPropertyValue: function getPropertyValue(prop) {
      var style = node.style;

      prop = (0, _camelizeStyle2.default)(prop);

      if (prop == 'float') prop = 'styleFloat';

      var current = node.currentStyle[prop] || null;

      if (current == null && style && style[prop]) current = style[prop];

      if (rnumnonpx.test(current) && !rposition.test(prop)) {
        // Remember the original values
        var left = style.left;
        var runStyle = node.runtimeStyle;
        var rsLeft = runStyle && runStyle.left;

        // Put in the new values to get a computed value out
        if (rsLeft) runStyle.left = node.currentStyle.left;

        style.left = prop === 'fontSize' ? '1em' : current;
        current = style.pixelLeft + 'px';

        // Revert the changed values
        style.left = left;
        if (rsLeft) runStyle.left = rsLeft;
      }

      return current;
    }
  };
}
module.exports = exports['default'];

/***/ }),
/* 142 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = removeStyle;
function removeStyle(node, key) {
  return 'removeProperty' in node.style ? node.style.removeProperty(key) : node.style.removeAttribute(key);
}
module.exports = exports['default'];

/***/ }),
/* 143 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isTransform;
var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;

function isTransform(property) {
  return !!(property && supportedTransforms.test(property));
}
module.exports = exports["default"];

/***/ }),
/* 144 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.classNamesShape = exports.timeoutsShape = undefined;
exports.transitionTimeout = transitionTimeout;

var _propTypes = __webpack_require__(7);

var _propTypes2 = _interopRequireDefault(_propTypes);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function transitionTimeout(transitionType) {
  var timeoutPropName = 'transition' + transitionType + 'Timeout';
  var enabledPropName = 'transition' + transitionType;

  return function (props) {
    // If the transition is enabled
    if (props[enabledPropName]) {
      // If no timeout duration is provided
      if (props[timeoutPropName] == null) {
        return new Error(timeoutPropName + ' wasn\'t supplied to CSSTransitionGroup: ' + 'this can cause unreliable animations and won\'t be supported in ' + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.');

        // If the duration isn't a number
      } else if (typeof props[timeoutPropName] !== 'number') {
        return new Error(timeoutPropName + ' must be a number (in milliseconds)');
      }
    }

    return null;
  };
}

var timeoutsShape = exports.timeoutsShape = _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.shape({
  enter: _propTypes2.default.number,
  exit: _propTypes2.default.number
}).isRequired]);

var classNamesShape = exports.classNamesShape = _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({
  enter: _propTypes2.default.string,
  exit: _propTypes2.default.string,
  active: _propTypes2.default.string
}), _propTypes2.default.shape({
  enter: _propTypes2.default.string,
  enterActive: _propTypes2.default.string,
  exit: _propTypes2.default.string,
  exitActive: _propTypes2.default.string
})]);

/***/ }),
/* 145 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(146), __esModule: true };

/***/ }),
/* 146 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(72);
__webpack_require__(147);
module.exports = __webpack_require__(11).Array.from;


/***/ }),
/* 147 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ctx = __webpack_require__(42);
var $export = __webpack_require__(13);
var toObject = __webpack_require__(51);
var call = __webpack_require__(148);
var isArrayIter = __webpack_require__(149);
var toLength = __webpack_require__(71);
var createProperty = __webpack_require__(150);
var getIterFn = __webpack_require__(151);

$export($export.S + $export.F * !__webpack_require__(153)(function (iter) { Array.from(iter); }), 'Array', {
  // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
    var O = toObject(arrayLike);
    var C = typeof this == 'function' ? this : Array;
    var aLen = arguments.length;
    var mapfn = aLen > 1 ? arguments[1] : undefined;
    var mapping = mapfn !== undefined;
    var index = 0;
    var iterFn = getIterFn(O);
    var length, result, step, iterator;
    if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
    // if object isn't iterable or it's array with default iterator - use simple case
    if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
      for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
        createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
      }
    } else {
      length = toLength(O.length);
      for (result = new C(length); length > index; index++) {
        createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
      }
    }
    result.length = index;
    return result;
  }
});


/***/ }),
/* 148 */
/***/ (function(module, exports, __webpack_require__) {

// call something on iterator step with safe closing on error
var anObject = __webpack_require__(21);
module.exports = function (iterator, fn, value, entries) {
  try {
    return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  // 7.4.6 IteratorClose(iterator, completion)
  } catch (e) {
    var ret = iterator['return'];
    if (ret !== undefined) anObject(ret.call(iterator));
    throw e;
  }
};


/***/ }),
/* 149 */
/***/ (function(module, exports, __webpack_require__) {

// check on default Array iterator
var Iterators = __webpack_require__(32);
var ITERATOR = __webpack_require__(12)('iterator');
var ArrayProto = Array.prototype;

module.exports = function (it) {
  return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};


/***/ }),
/* 150 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $defineProperty = __webpack_require__(16);
var createDesc = __webpack_require__(29);

module.exports = function (object, index, value) {
  if (index in object) $defineProperty.f(object, index, createDesc(0, value));
  else object[index] = value;
};


/***/ }),
/* 151 */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(152);
var ITERATOR = __webpack_require__(12)('iterator');
var Iterators = __webpack_require__(32);
module.exports = __webpack_require__(11).getIteratorMethod = function (it) {
  if (it != undefined) return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};


/***/ }),
/* 152 */
/***/ (function(module, exports, __webpack_require__) {

// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(44);
var TAG = __webpack_require__(12)('toStringTag');
// ES3 wrong here
var ARG = cof(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (e) { /* empty */ }
};

module.exports = function (it) {
  var O, T, B;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
    // builtinTag case
    : ARG ? cof(O)
    // ES3 arguments fallback
    : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};


/***/ }),
/* 153 */
/***/ (function(module, exports, __webpack_require__) {

var ITERATOR = __webpack_require__(12)('iterator');
var SAFE_CLOSING = false;

try {
  var riter = [7][ITERATOR]();
  riter['return'] = function () { SAFE_CLOSING = true; };
  // eslint-disable-next-line no-throw-literal
  Array.from(riter, function () { throw 2; });
} catch (e) { /* empty */ }

module.exports = function (exec, skipClosing) {
  if (!skipClosing && !SAFE_CLOSING) return false;
  var safe = false;
  try {
    var arr = [7];
    var iter = arr[ITERATOR]();
    iter.next = function () { return { done: safe = true }; };
    arr[ITERATOR] = function () { return iter; };
    exec(arr);
  } catch (e) { /* empty */ }
  return safe;
};


/***/ }),
/* 154 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.listen = exports.filter = exports.off = exports.on = undefined;

var _on = __webpack_require__(63);

var _on2 = _interopRequireDefault(_on);

var _off = __webpack_require__(64);

var _off2 = _interopRequireDefault(_off);

var _filter = __webpack_require__(155);

var _filter2 = _interopRequireDefault(_filter);

var _listen = __webpack_require__(157);

var _listen2 = _interopRequireDefault(_listen);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.on = _on2.default;
exports.off = _off2.default;
exports.filter = _filter2.default;
exports.listen = _listen2.default;
exports.default = { on: _on2.default, off: _off2.default, filter: _filter2.default, listen: _listen2.default };

/***/ }),
/* 155 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = filterEvents;

var _contains = __webpack_require__(26);

var _contains2 = _interopRequireDefault(_contains);

var _querySelectorAll = __webpack_require__(156);

var _querySelectorAll2 = _interopRequireDefault(_querySelectorAll);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function filterEvents(selector, handler) {
  return function filterHandler(e) {
    var top = e.currentTarget,
        target = e.target,
        matches = (0, _querySelectorAll2.default)(top, selector);

    if (matches.some(function (match) {
      return (0, _contains2.default)(match, target);
    })) handler.call(this, e);
  };
}
module.exports = exports['default'];

/***/ }),
/* 156 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = qsa;
// Zepto.js
// (c) 2010-2015 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
var simpleSelectorRE = /^[\w-]*$/;
var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);

function qsa(element, selector) {
  var maybeID = selector[0] === '#',
      maybeClass = selector[0] === '.',
      nameOnly = maybeID || maybeClass ? selector.slice(1) : selector,
      isSimple = simpleSelectorRE.test(nameOnly),
      found;

  if (isSimple) {
    if (maybeID) {
      element = element.getElementById ? element : document;
      return (found = element.getElementById(nameOnly)) ? [found] : [];
    }

    if (element.getElementsByClassName && maybeClass) return toArray(element.getElementsByClassName(nameOnly));

    return toArray(element.getElementsByTagName(selector));
  }

  return toArray(element.querySelectorAll(selector));
}
module.exports = exports['default'];

/***/ }),
/* 157 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _inDOM = __webpack_require__(15);

var _inDOM2 = _interopRequireDefault(_inDOM);

var _on = __webpack_require__(63);

var _on2 = _interopRequireDefault(_on);

var _off = __webpack_require__(64);

var _off2 = _interopRequireDefault(_off);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var listen = function listen() {};

if (_inDOM2.default) {
  listen = function listen(node, eventName, handler, capture) {
    (0, _on2.default)(node, eventName, handler, capture);
    return function () {
      (0, _off2.default)(node, eventName, handler, capture);
    };
  };
}

exports.default = listen;
module.exports = exports['default'];

/***/ }),
/* 158 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _activeElement = __webpack_require__(82);

var _activeElement2 = _interopRequireDefault(_activeElement);

var _contains = __webpack_require__(26);

var _contains2 = _interopRequireDefault(_contains);

var _inDOM = __webpack_require__(15);

var _inDOM2 = _interopRequireDefault(_inDOM);

var _propTypes = __webpack_require__(7);

var _propTypes2 = _interopRequireDefault(_propTypes);

var _componentOrElement = __webpack_require__(39);

var _componentOrElement2 = _interopRequireDefault(_componentOrElement);

var _deprecated = __webpack_require__(159);

var _deprecated2 = _interopRequireDefault(_deprecated);

var _elementType = __webpack_require__(8);

var _elementType2 = _interopRequireDefault(_elementType);

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _reactDom = __webpack_require__(9);

var _reactDom2 = _interopRequireDefault(_reactDom);

var _warning = __webpack_require__(10);

var _warning2 = _interopRequireDefault(_warning);

var _ModalManager = __webpack_require__(160);

var _ModalManager2 = _interopRequireDefault(_ModalManager);

var _Portal = __webpack_require__(88);

var _Portal2 = _interopRequireDefault(_Portal);

var _RefHolder = __webpack_require__(166);

var _RefHolder2 = _interopRequireDefault(_RefHolder);

var _addEventListener = __webpack_require__(84);

var _addEventListener2 = _interopRequireDefault(_addEventListener);

var _addFocusListener = __webpack_require__(167);

var _addFocusListener2 = _interopRequireDefault(_addFocusListener);

var _getContainer = __webpack_require__(41);

var _getContainer2 = _interopRequireDefault(_getContainer);

var _ownerDocument = __webpack_require__(27);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable react/prop-types */

var modalManager = new _ModalManager2.default();

/**
 * Love them or hate them, `<Modal/>` provides a solid foundation for creating dialogs, lightboxes, or whatever else.
 * The Modal component renders its `children` node in front of a backdrop component.
 *
 * The Modal offers a few helpful features over using just a `<Portal/>` component and some styles:
 *
 * - Manages dialog stacking when one-at-a-time just isn't enough.
 * - Creates a backdrop, for disabling interaction below the modal.
 * - It properly manages focus; moving to the modal content, and keeping it there until the modal is closed.
 * - It disables scrolling of the page content while open.
 * - Adds the appropriate ARIA roles are automatically.
 * - Easily pluggable animations via a `<Transition/>` component.
 *
 * Note that, in the same way the backdrop element prevents users from clicking or interacting
 * with the page content underneath the Modal, Screen readers also need to be signaled to not to
 * interact with page content while the Modal is open. To do this, we use a common technique of applying
 * the `aria-hidden='true'` attribute to the non-Modal elements in the Modal `container`. This means that for
 * a Modal to be truly modal, it should have a `container` that is _outside_ your app's
 * React hierarchy (such as the default: document.body).
 */

var Modal = function (_React$Component) {
  _inherits(Modal, _React$Component);

  function Modal() {
    var _temp, _this, _ret;

    _classCallCheck(this, Modal);

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _initialiseProps.call(_this), _temp), _possibleConstructorReturn(_this, _ret);
  }

  Modal.prototype.omitProps = function omitProps(props, propTypes) {

    var keys = Object.keys(props);
    var newProps = {};
    keys.map(function (prop) {
      if (!Object.prototype.hasOwnProperty.call(propTypes, prop)) {
        newProps[prop] = props[prop];
      }
    });

    return newProps;
  };

  Modal.prototype.render = function render() {
    var _props = this.props,
        show = _props.show,
        container = _props.container,
        children = _props.children,
        Transition = _props.transition,
        backdrop = _props.backdrop,
        className = _props.className,
        style = _props.style,
        onExit = _props.onExit,
        onExiting = _props.onExiting,
        onEnter = _props.onEnter,
        onEntering = _props.onEntering,
        onEntered = _props.onEntered;


    var dialog = _react2.default.Children.only(children);
    var filteredProps = this.omitProps(this.props, Modal.propTypes);

    var mountModal = show || Transition && !this.state.exited;
    if (!mountModal) {
      return null;
    }

    var _dialog$props = dialog.props,
        role = _dialog$props.role,
        tabIndex = _dialog$props.tabIndex;


    if (role === undefined || tabIndex === undefined) {
      dialog = (0, _react.cloneElement)(dialog, {
        role: role === undefined ? 'document' : role,
        tabIndex: tabIndex == null ? '-1' : tabIndex
      });
    }

    if (Transition) {
      dialog = _react2.default.createElement(
        Transition,
        {
          appear: true,
          unmountOnExit: true,
          'in': show,
          onExit: onExit,
          onExiting: onExiting,
          onExited: this.handleHidden,
          onEnter: onEnter,
          onEntering: onEntering,
          onEntered: onEntered
        },
        dialog
      );
    }

    return _react2.default.createElement(
      _Portal2.default,
      {
        ref: this.setMountNode,
        container: container,
        onRendered: this.onPortalRendered
      },
      _react2.default.createElement(
        'div',
        _extends({
          ref: this.setModalNodeRef,
          role: role || 'dialog'
        }, filteredProps, {
          style: style,
          className: className
        }),
        backdrop && this.renderBackdrop(),
        _react2.default.createElement(
          _RefHolder2.default,
          { ref: this.setDialogRef },
          dialog
        )
      )
    );
  };

  Modal.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
    if (nextProps.show) {
      this.setState({ exited: false });
    } else if (!nextProps.transition) {
      // Otherwise let handleHidden take care of marking exited.
      this.setState({ exited: true });
    }
  };

  Modal.prototype.componentWillUpdate = function componentWillUpdate(nextProps) {
    if (!this.props.show && nextProps.show) {
      this.checkForFocus();
    }
  };

  Modal.prototype.componentDidMount = function componentDidMount() {
    this._isMounted = true;
    if (this.props.show) {
      this.onShow();
    }
  };

  Modal.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
    var transition = this.props.transition;


    if (prevProps.show && !this.props.show && !transition) {
      // Otherwise handleHidden will call this.
      this.onHide();
    } else if (!prevProps.show && this.props.show) {
      this.onShow();
    }
  };

  Modal.prototype.componentWillUnmount = function componentWillUnmount() {
    var _props2 = this.props,
        show = _props2.show,
        transition = _props2.transition;


    this._isMounted = false;

    if (show || transition && !this.state.exited) {
      this.onHide();
    }
  };

  Modal.prototype.autoFocus = function autoFocus() {
    if (!this.props.autoFocus) {
      return;
    }

    var dialogElement = this.getDialogElement();
    var currentActiveElement = (0, _activeElement2.default)((0, _ownerDocument2.default)(this));

    if (dialogElement && !(0, _contains2.default)(dialogElement, currentActiveElement)) {
      this.lastFocus = currentActiveElement;

      if (!dialogElement.hasAttribute('tabIndex')) {
        (0, _warning2.default)(false, 'The modal content node does not accept focus. For the benefit of ' + 'assistive technologies, the tabIndex of the node is being set ' + 'to "-1".');

        dialogElement.setAttribute('tabIndex', -1);
      }

      dialogElement.focus();
    }
  };

  Modal.prototype.restoreLastFocus = function restoreLastFocus() {
    // Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917)
    if (this.lastFocus && this.lastFocus.focus) {
      this.lastFocus.focus();
      this.lastFocus = null;
    }
  };

  Modal.prototype.getDialogElement = function getDialogElement() {
    return _reactDom2.default.findDOMNode(this.dialog);
  };

  Modal.prototype.isTopModal = function isTopModal() {
    return this.props.manager.isTopModal(this);
  };

  return Modal;
}(_react2.default.Component);

Modal.propTypes = _extends({}, _Portal2.default.propTypes, {

  /**
   * Set the visibility of the Modal
   */
  show: _propTypes2.default.bool,

  /**
   * A Node, Component instance, or function that returns either. The Modal is appended to it's container element.
   *
   * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the
   * page content can be placed behind a virtual backdrop as well as a visual one.
   */
  container: _propTypes2.default.oneOfType([_componentOrElement2.default, _propTypes2.default.func]),

  /**
   * A callback fired when the Modal is opening.
   */
  onShow: _propTypes2.default.func,

  /**
   * A callback fired when either the backdrop is clicked, or the escape key is pressed.
   *
   * The `onHide` callback only signals intent from the Modal,
   * you must actually set the `show` prop to `false` for the Modal to close.
   */
  onHide: _propTypes2.default.func,

  /**
   * Include a backdrop component.
   */
  backdrop: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.oneOf(['static'])]),

  /**
   * A function that returns a backdrop component. Useful for custom
   * backdrop rendering.
   *
   * ```js
   *  renderBackdrop={props => <MyBackdrop {...props} />}
   * ```
   */
  renderBackdrop: _propTypes2.default.func,

  /**
   * A callback fired when the escape key, if specified in `keyboard`, is pressed.
   */
  onEscapeKeyDown: _propTypes2.default.func,

  /**
   * Support for this function will be deprecated. Please use `onEscapeKeyDown` instead
   * A callback fired when the escape key, if specified in `keyboard`, is pressed.
   * @deprecated
   */
  onEscapeKeyUp: (0, _deprecated2.default)(_propTypes2.default.func, 'Please use onEscapeKeyDown instead for consistency'),

  /**
   * A callback fired when the backdrop, if specified, is clicked.
   */
  onBackdropClick: _propTypes2.default.func,

  /**
   * A style object for the backdrop component.
   */
  backdropStyle: _propTypes2.default.object,

  /**
   * A css class or classes for the backdrop component.
   */
  backdropClassName: _propTypes2.default.string,

  /**
   * A css class or set of classes applied to the modal container when the modal is open,
   * and removed when it is closed.
   */
  containerClassName: _propTypes2.default.string,

  /**
   * Close the modal when escape key is pressed
   */
  keyboard: _propTypes2.default.bool,

  /**
   * A `react-transition-group@2.0.0` `<Transition/>` component used
   * to control animations for the dialog component.
   */
  transition: _elementType2.default,

  /**
   * A `react-transition-group@2.0.0` `<Transition/>` component used
   * to control animations for the backdrop components.
   */
  backdropTransition: _elementType2.default,

  /**
   * When `true` The modal will automatically shift focus to itself when it opens, and
   * replace it to the last focused element when it closes. This also
   * works correctly with any Modal children that have the `autoFocus` prop.
   *
   * Generally this should never be set to `false` as it makes the Modal less
   * accessible to assistive technologies, like screen readers.
   */
  autoFocus: _propTypes2.default.bool,

  /**
   * When `true` The modal will prevent focus from leaving the Modal while open.
   *
   * Generally this should never be set to `false` as it makes the Modal less
   * accessible to assistive technologies, like screen readers.
   */
  enforceFocus: _propTypes2.default.bool,

  /**
   * When `true` The modal will restore focus to previously focused element once
   * modal is hidden
   */
  restoreFocus: _propTypes2.default.bool,

  /**
   * Callback fired before the Modal transitions in
   */
  onEnter: _propTypes2.default.func,

  /**
   * Callback fired as the Modal begins to transition in
   */
  onEntering: _propTypes2.default.func,

  /**
   * Callback fired after the Modal finishes transitioning in
   */
  onEntered: _propTypes2.default.func,

  /**
   * Callback fired right before the Modal transitions out
   */
  onExit: _propTypes2.default.func,

  /**
   * Callback fired as the Modal begins to transition out
   */
  onExiting: _propTypes2.default.func,

  /**
   * Callback fired after the Modal finishes transitioning out
   */
  onExited: _propTypes2.default.func,

  /**
   * A ModalManager instance used to track and manage the state of open
   * Modals. Useful when customizing how modals interact within a container
   */
  manager: _propTypes2.default.object.isRequired
});
Modal.defaultProps = {
  show: false,
  backdrop: true,
  keyboard: true,
  autoFocus: true,
  enforceFocus: true,
  restoreFocus: true,
  onHide: function onHide() {},
  manager: modalManager,
  renderBackdrop: function renderBackdrop(props) {
    return _react2.default.createElement('div', props);
  }
};

var _initialiseProps = function _initialiseProps() {
  var _this2 = this;

  this.state = { exited: !this.props.show };

  this.renderBackdrop = function () {
    var _props3 = _this2.props,
        backdropStyle = _props3.backdropStyle,
        backdropClassName = _props3.backdropClassName,
        renderBackdrop = _props3.renderBackdrop,
        Transition = _props3.backdropTransition;


    var backdropRef = function backdropRef(ref) {
      return _this2.backdrop = ref;
    };

    var backdrop = renderBackdrop({
      ref: backdropRef,
      style: backdropStyle,
      className: backdropClassName,
      onClick: _this2.handleBackdropClick
    });

    if (Transition) {
      backdrop = _react2.default.createElement(
        Transition,
        {
          appear: true,
          'in': _this2.props.show
        },
        backdrop
      );
    }

    return backdrop;
  };

  this.onPortalRendered = function () {
    _this2.autoFocus();

    if (_this2.props.onShow) {
      _this2.props.onShow();
    }
  };

  this.onShow = function () {
    var doc = (0, _ownerDocument2.default)(_this2);
    var container = (0, _getContainer2.default)(_this2.props.container, doc.body);

    _this2.props.manager.add(_this2, container, _this2.props.containerClassName);

    _this2._onDocumentKeydownListener = (0, _addEventListener2.default)(doc, 'keydown', _this2.handleDocumentKeyDown);

    _this2._onDocumentKeyupListener = (0, _addEventListener2.default)(doc, 'keyup', _this2.handleDocumentKeyUp);

    _this2._onFocusinListener = (0, _addFocusListener2.default)(_this2.enforceFocus);
  };

  this.onHide = function () {
    _this2.props.manager.remove(_this2);

    _this2._onDocumentKeydownListener.remove();

    _this2._onDocumentKeyupListener.remove();

    _this2._onFocusinListener.remove();

    if (_this2.props.restoreFocus) {
      _this2.restoreLastFocus();
    }
  };

  this.setMountNode = function (ref) {
    _this2.mountNode = ref ? ref.getMountNode() : ref;
  };

  this.setModalNodeRef = function (ref) {
    _this2.modalNode = ref;
  };

  this.setDialogRef = function (ref) {
    _this2.dialog = ref;
  };

  this.handleHidden = function () {
    _this2.setState({ exited: true });
    _this2.onHide();

    if (_this2.props.onExited) {
      var _props4;

      (_props4 = _this2.props).onExited.apply(_props4, arguments);
    }
  };

  this.handleBackdropClick = function (e) {
    if (e.target !== e.currentTarget) {
      return;
    }

    if (_this2.props.onBackdropClick) {
      _this2.props.onBackdropClick(e);
    }

    if (_this2.props.backdrop === true) {
      _this2.props.onHide();
    }
  };

  this.handleDocumentKeyDown = function (e) {
    if (_this2.props.keyboard && e.keyCode === 27 && _this2.isTopModal()) {
      if (_this2.props.onEscapeKeyDown) {
        _this2.props.onEscapeKeyDown(e);
      }

      _this2.props.onHide();
    }
  };

  this.handleDocumentKeyUp = function (e) {
    if (_this2.props.keyboard && e.keyCode === 27 && _this2.isTopModal()) {
      if (_this2.props.onEscapeKeyUp) {
        _this2.props.onEscapeKeyUp(e);
      }
    }
  };

  this.checkForFocus = function () {
    if (_inDOM2.default) {
      _this2.lastFocus = (0, _activeElement2.default)();
    }
  };

  this.enforceFocus = function () {
    if (!_this2.props.enforceFocus || !_this2._isMounted || !_this2.isTopModal()) {
      return;
    }

    var dialogElement = _this2.getDialogElement();
    var currentActiveElement = (0, _activeElement2.default)((0, _ownerDocument2.default)(_this2));

    if (dialogElement && !(0, _contains2.default)(dialogElement, currentActiveElement)) {
      dialogElement.focus();
    }
  };
};

Modal.Manager = _ModalManager2.default;

exports.default = Modal;
module.exports = exports['default'];

/***/ }),
/* 159 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = deprecated;

var _warning = __webpack_require__(10);

var _warning2 = _interopRequireDefault(_warning);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var warned = {};

function deprecated(validator, reason) {
  return function validate(props, propName, componentName, location, propFullName) {
    var componentNameSafe = componentName || '<<anonymous>>';
    var propFullNameSafe = propFullName || propName;

    if (props[propName] != null) {
      var messageKey = componentName + '.' + propName;

      (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason + '.'));

      warned[messageKey] = true;
    }

    for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
      args[_key - 5] = arguments[_key];
    }

    return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
  };
}

/* eslint-disable no-underscore-dangle */
function _resetWarned() {
  warned = {};
}

deprecated._resetWarned = _resetWarned;
/* eslint-enable no-underscore-dangle */

module.exports = exports['default'];

/***/ }),
/* 160 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _class = __webpack_require__(161);

var _class2 = _interopRequireDefault(_class);

var _style = __webpack_require__(33);

var _style2 = _interopRequireDefault(_style);

var _scrollbarSize = __webpack_require__(85);

var _scrollbarSize2 = _interopRequireDefault(_scrollbarSize);

var _isOverflowing = __webpack_require__(87);

var _isOverflowing2 = _interopRequireDefault(_isOverflowing);

var _manageAriaHidden = __webpack_require__(164);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function findIndexOf(arr, cb) {
  var idx = -1;
  arr.some(function (d, i) {
    if (cb(d, i)) {
      idx = i;
      return true;
    }
  });
  return idx;
}

function findContainer(data, modal) {
  return findIndexOf(data, function (d) {
    return d.modals.indexOf(modal) !== -1;
  });
}

function setContainerStyle(state, container) {
  var style = { overflow: 'hidden' };

  // we are only interested in the actual `style` here
  // becasue we will override it
  state.style = {
    overflow: container.style.overflow,
    paddingRight: container.style.paddingRight
  };

  if (state.overflowing) {
    // use computed style, here to get the real padding
    // to add our scrollbar width
    style.paddingRight = parseInt((0, _style2.default)(container, 'paddingRight') || 0, 10) + (0, _scrollbarSize2.default)() + 'px';
  }

  (0, _style2.default)(container, style);
}

function removeContainerStyle(_ref, container) {
  var style = _ref.style;


  Object.keys(style).forEach(function (key) {
    return container.style[key] = style[key];
  });
}
/**
 * Proper state managment for containers and the modals in those containers.
 *
 * @internal Used by the Modal to ensure proper styling of containers.
 */

var ModalManager = function ModalManager() {
  var _this = this;

  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
      _ref2$hideSiblingNode = _ref2.hideSiblingNodes,
      hideSiblingNodes = _ref2$hideSiblingNode === undefined ? true : _ref2$hideSiblingNode,
      _ref2$handleContainer = _ref2.handleContainerOverflow,
      handleContainerOverflow = _ref2$handleContainer === undefined ? true : _ref2$handleContainer;

  _classCallCheck(this, ModalManager);

  this.add = function (modal, container, className) {
    var modalIdx = _this.modals.indexOf(modal);
    var containerIdx = _this.containers.indexOf(container);

    if (modalIdx !== -1) {
      return modalIdx;
    }

    modalIdx = _this.modals.length;
    _this.modals.push(modal);

    if (_this.hideSiblingNodes) {
      (0, _manageAriaHidden.hideSiblings)(container, modal.mountNode);
    }

    if (containerIdx !== -1) {
      _this.data[containerIdx].modals.push(modal);
      return modalIdx;
    }

    var data = {
      modals: [modal],
      //right now only the first modal of a container will have its classes applied
      classes: className ? className.split(/\s+/) : [],

      overflowing: (0, _isOverflowing2.default)(container)
    };

    if (_this.handleContainerOverflow) {
      setContainerStyle(data, container);
    }

    data.classes.forEach(_class2.default.addClass.bind(null, container));

    _this.containers.push(container);
    _this.data.push(data);

    return modalIdx;
  };

  this.remove = function (modal) {
    var modalIdx = _this.modals.indexOf(modal);

    if (modalIdx === -1) {
      return;
    }

    var containerIdx = findContainer(_this.data, modal);
    var data = _this.data[containerIdx];
    var container = _this.containers[containerIdx];

    data.modals.splice(data.modals.indexOf(modal), 1);

    _this.modals.splice(modalIdx, 1);

    // if that was the last modal in a container,
    // clean up the container
    if (data.modals.length === 0) {
      data.classes.forEach(_class2.default.removeClass.bind(null, container));

      if (_this.handleContainerOverflow) {
        removeContainerStyle(data, container);
      }

      if (_this.hideSiblingNodes) {
        (0, _manageAriaHidden.showSiblings)(container, modal.mountNode);
      }
      _this.containers.splice(containerIdx, 1);
      _this.data.splice(containerIdx, 1);
    } else if (_this.hideSiblingNodes) {
      //otherwise make sure the next top modal is visible to a SR
      (0, _manageAriaHidden.ariaHidden)(false, data.modals[data.modals.length - 1].mountNode);
    }
  };

  this.isTopModal = function (modal) {
    return !!_this.modals.length && _this.modals[_this.modals.length - 1] === modal;
  };

  this.hideSiblingNodes = hideSiblingNodes;
  this.handleContainerOverflow = handleContainerOverflow;
  this.modals = [];
  this.containers = [];
  this.data = [];
};

exports.default = ModalManager;
module.exports = exports['default'];

/***/ }),
/* 161 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.hasClass = exports.removeClass = exports.addClass = undefined;

var _addClass = __webpack_require__(162);

var _addClass2 = _interopRequireDefault(_addClass);

var _removeClass = __webpack_require__(163);

var _removeClass2 = _interopRequireDefault(_removeClass);

var _hasClass = __webpack_require__(86);

var _hasClass2 = _interopRequireDefault(_hasClass);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.addClass = _addClass2.default;
exports.removeClass = _removeClass2.default;
exports.hasClass = _hasClass2.default;
exports.default = { addClass: _addClass2.default, removeClass: _removeClass2.default, hasClass: _hasClass2.default };

/***/ }),
/* 162 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = addClass;

var _hasClass = __webpack_require__(86);

var _hasClass2 = _interopRequireDefault(_hasClass);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function addClass(element, className) {
  if (element.classList) element.classList.add(className);else if (!(0, _hasClass2.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);
}
module.exports = exports['default'];

/***/ }),
/* 163 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


function replaceClassName(origClass, classToRemove) {
  return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
}

module.exports = function removeClass(element, className) {
  if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
};

/***/ }),
/* 164 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.ariaHidden = ariaHidden;
exports.hideSiblings = hideSiblings;
exports.showSiblings = showSiblings;

var BLACKLIST = ['template', 'script', 'style'];

var isHidable = function isHidable(_ref) {
  var nodeType = _ref.nodeType,
      tagName = _ref.tagName;
  return nodeType === 1 && BLACKLIST.indexOf(tagName.toLowerCase()) === -1;
};

var siblings = function siblings(container, mount, cb) {
  mount = [].concat(mount);

  [].forEach.call(container.children, function (node) {
    if (mount.indexOf(node) === -1 && isHidable(node)) {
      cb(node);
    }
  });
};

function ariaHidden(show, node) {
  if (!node) {
    return;
  }
  if (show) {
    node.setAttribute('aria-hidden', 'true');
  } else {
    node.removeAttribute('aria-hidden');
  }
}

function hideSiblings(container, mountNode) {
  siblings(container, mountNode, function (node) {
    return ariaHidden(true, node);
  });
}

function showSiblings(container, mountNode) {
  siblings(container, mountNode, function (node) {
    return ariaHidden(false, node);
  });
}

/***/ }),
/* 165 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _propTypes = __webpack_require__(7);

var _propTypes2 = _interopRequireDefault(_propTypes);

var _componentOrElement = __webpack_require__(39);

var _componentOrElement2 = _interopRequireDefault(_componentOrElement);

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _reactDom = __webpack_require__(9);

var _reactDom2 = _interopRequireDefault(_reactDom);

var _getContainer = __webpack_require__(41);

var _getContainer2 = _interopRequireDefault(_getContainer);

var _ownerDocument = __webpack_require__(27);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

/**
 * The `<Portal/>` component renders its children into a new "subtree" outside of current component hierarchy.
 * You can think of it as a declarative `appendChild()`, or jQuery's `$.fn.appendTo()`.
 * The children of `<Portal/>` component will be appended to the `container` specified.
 */
var Portal = function (_React$Component) {
  _inherits(Portal, _React$Component);

  function Portal() {
    var _temp, _this, _ret;

    _classCallCheck(this, Portal);

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this._mountOverlayTarget = function () {
      if (!_this._overlayTarget) {
        _this._overlayTarget = document.createElement('div');
        _this._portalContainerNode = (0, _getContainer2.default)(_this.props.container, (0, _ownerDocument2.default)(_this).body);
        _this._portalContainerNode.appendChild(_this._overlayTarget);
      }
    }, _this._unmountOverlayTarget = function () {
      if (_this._overlayTarget) {
        _this._portalContainerNode.removeChild(_this._overlayTarget);
        _this._overlayTarget = null;
      }
      _this._portalContainerNode = null;
    }, _this._renderOverlay = function () {
      var overlay = !_this.props.children ? null : _react2.default.Children.only(_this.props.children);

      // Save reference for future access.
      if (overlay !== null) {
        _this._mountOverlayTarget();

        var initialRender = !_this._overlayInstance;

        _this._overlayInstance = _reactDom2.default.unstable_renderSubtreeIntoContainer(_this, overlay, _this._overlayTarget, function () {
          if (initialRender && _this.props.onRendered) {
            _this.props.onRendered();
          }
        });
      } else {
        // Unrender if the component is null for transitions to null
        _this._unrenderOverlay();
        _this._unmountOverlayTarget();
      }
    }, _this._unrenderOverlay = function () {
      if (_this._overlayTarget) {
        _reactDom2.default.unmountComponentAtNode(_this._overlayTarget);
        _this._overlayInstance = null;
      }
    }, _this.getMountNode = function () {
      return _this._overlayTarget;
    }, _temp), _possibleConstructorReturn(_this, _ret);
  }

  Portal.prototype.componentDidMount = function componentDidMount() {
    this._isMounted = true;
    this._renderOverlay();
  };

  Portal.prototype.componentDidUpdate = function componentDidUpdate() {
    this._renderOverlay();
  };

  Portal.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
    if (this._overlayTarget && nextProps.container !== this.props.container) {
      this._portalContainerNode.removeChild(this._overlayTarget);
      this._portalContainerNode = (0, _getContainer2.default)(nextProps.container, (0, _ownerDocument2.default)(this).body);
      this._portalContainerNode.appendChild(this._overlayTarget);
    }
  };

  Portal.prototype.componentWillUnmount = function componentWillUnmount() {
    this._isMounted = false;
    this._unrenderOverlay();
    this._unmountOverlayTarget();
  };

  Portal.prototype.render = function render() {
    return null;
  };

  return Portal;
}(_react2.default.Component);

Portal.displayName = 'Portal';
Portal.propTypes = {
  /**
   * A Node, Component instance, or function that returns either. The `container` will have the Portal children
   * appended to it.
   */
  container: _propTypes2.default.oneOfType([_componentOrElement2.default, _propTypes2.default.func]),

  onRendered: _propTypes2.default.func
};
exports.default = Portal;
module.exports = exports['default'];

/***/ }),
/* 166 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _propTypes = __webpack_require__(7);

var _propTypes2 = _interopRequireDefault(_propTypes);

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var propTypes = {
  children: _propTypes2.default.node
};

/**
 * Internal helper component to allow attaching a non-conflicting ref to a
 * child element that may not accept refs.
 */

var RefHolder = function (_React$Component) {
  _inherits(RefHolder, _React$Component);

  function RefHolder() {
    _classCallCheck(this, RefHolder);

    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
  }

  RefHolder.prototype.render = function render() {
    return this.props.children;
  };

  return RefHolder;
}(_react2.default.Component);

RefHolder.propTypes = propTypes;

exports.default = RefHolder;
module.exports = exports['default'];

/***/ }),
/* 167 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.default = addFocusListener;
/**
 * Firefox doesn't have a focusin event so using capture is easiest way to get bubbling
 * IE8 can't do addEventListener, but does have onfocusin, so we use that in ie8
 *
 * We only allow one Listener at a time to avoid stack overflows
 */
function addFocusListener(handler) {
  var useFocusin = !document.addEventListener;
  var remove = void 0;

  if (useFocusin) {
    document.attachEvent('onfocusin', handler);
    remove = function remove() {
      return document.detachEvent('onfocusin', handler);
    };
  } else {
    document.addEventListener('focus', handler, true);
    remove = function remove() {
      return document.removeEventListener('focus', handler, true);
    };
  }

  return { remove: remove };
}
module.exports = exports['default'];

/***/ }),
/* 168 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _propTypes = __webpack_require__(7);

var _propTypes2 = _interopRequireDefault(_propTypes);

var _elementType = __webpack_require__(8);

var _elementType2 = _interopRequireDefault(_elementType);

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _Portal = __webpack_require__(88);

var _Portal2 = _interopRequireDefault(_Portal);

var _Position = __webpack_require__(169);

var _Position2 = _interopRequireDefault(_Position);

var _RootCloseWrapper = __webpack_require__(83);

var _RootCloseWrapper2 = _interopRequireDefault(_RootCloseWrapper);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

/**
 * Built on top of `<Position/>` and `<Portal/>`, the overlay component is great for custom tooltip overlays.
 */
var Overlay = function (_React$Component) {
  _inherits(Overlay, _React$Component);

  function Overlay(props, context) {
    _classCallCheck(this, Overlay);

    var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));

    _this.handleHidden = function () {
      _this.setState({ exited: true });

      if (_this.props.onExited) {
        var _this$props;

        (_this$props = _this.props).onExited.apply(_this$props, arguments);
      }
    };

    _this.state = { exited: !props.show };
    _this.onHiddenListener = _this.handleHidden.bind(_this);
    return _this;
  }

  Overlay.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
    if (nextProps.show) {
      this.setState({ exited: false });
    } else if (!nextProps.transition) {
      // Otherwise let handleHidden take care of marking exited.
      this.setState({ exited: true });
    }
  };

  Overlay.prototype.render = function render() {
    var _props = this.props,
        container = _props.container,
        containerPadding = _props.containerPadding,
        target = _props.target,
        placement = _props.placement,
        shouldUpdatePosition = _props.shouldUpdatePosition,
        rootClose = _props.rootClose,
        children = _props.children,
        Transition = _props.transition,
        props = _objectWithoutProperties(_props, ['container', 'containerPadding', 'target', 'placement', 'shouldUpdatePosition', 'rootClose', 'children', 'transition']);

    // Don't un-render the overlay while it's transitioning out.


    var mountOverlay = props.show || Transition && !this.state.exited;
    if (!mountOverlay) {
      // Don't bother showing anything if we don't have to.
      return null;
    }

    var child = children;

    // Position is be inner-most because it adds inline styles into the child,
    // which the other wrappers don't forward correctly.
    child = _react2.default.createElement(
      _Position2.default,
      { container: container, containerPadding: containerPadding, target: target, placement: placement, shouldUpdatePosition: shouldUpdatePosition },
      child
    );

    if (Transition) {
      var onExit = props.onExit,
          onExiting = props.onExiting,
          onEnter = props.onEnter,
          onEntering = props.onEntering,
          onEntered = props.onEntered;

      // This animates the child node by injecting props, so it must precede
      // anything that adds a wrapping div.

      child = _react2.default.createElement(
        Transition,
        {
          'in': props.show,
          appear: true,
          onExit: onExit,
          onExiting: onExiting,
          onExited: this.onHiddenListener,
          onEnter: onEnter,
          onEntering: onEntering,
          onEntered: onEntered
        },
        child
      );
    }

    // This goes after everything else because it adds a wrapping div.
    if (rootClose) {
      child = _react2.default.createElement(
        _RootCloseWrapper2.default,
        { onRootClose: props.onHide },
        child
      );
    }

    return _react2.default.createElement(
      _Portal2.default,
      { container: container },
      child
    );
  };

  return Overlay;
}(_react2.default.Component);

Overlay.propTypes = _extends({}, _Portal2.default.propTypes, _Position2.default.propTypes, {

  /**
   * Set the visibility of the Overlay
   */
  show: _propTypes2.default.bool,

  /**
   * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay
   */
  rootClose: _propTypes2.default.bool,

  /**
   * A Callback fired by the Overlay when it wishes to be hidden.
   *
   * __required__ when `rootClose` is `true`.
   *
   * @type func
   */
  onHide: function onHide(props) {
    var propType = _propTypes2.default.func;
    if (props.rootClose) {
      propType = propType.isRequired;
    }

    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }

    return propType.apply(undefined, [props].concat(args));
  },


  /**
   * A `react-transition-group@2.0.0` `<Transition/>` component
   * used to animate the overlay as it changes visibility.
   */
  transition: _elementType2.default,

  /**
   * Callback fired before the Overlay transitions in
   */
  onEnter: _propTypes2.default.func,

  /**
   * Callback fired as the Overlay begins to transition in
   */
  onEntering: _propTypes2.default.func,

  /**
   * Callback fired after the Overlay finishes transitioning in
   */
  onEntered: _propTypes2.default.func,

  /**
   * Callback fired right before the Overlay transitions out
   */
  onExit: _propTypes2.default.func,

  /**
   * Callback fired as the Overlay begins to transition out
   */
  onExiting: _propTypes2.default.func,

  /**
   * Callback fired after the Overlay finishes transitioning out
   */
  onExited: _propTypes2.default.func
});

exports.default = Overlay;
module.exports = exports['default'];

/***/ }),
/* 169 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _classnames = __webpack_require__(6);

var _classnames2 = _interopRequireDefault(_classnames);

var _propTypes = __webpack_require__(7);

var _propTypes2 = _interopRequireDefault(_propTypes);

var _componentOrElement = __webpack_require__(39);

var _componentOrElement2 = _interopRequireDefault(_componentOrElement);

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _reactDom = __webpack_require__(9);

var _reactDom2 = _interopRequireDefault(_reactDom);

var _calculatePosition = __webpack_require__(170);

var _calculatePosition2 = _interopRequireDefault(_calculatePosition);

var _getContainer = __webpack_require__(41);

var _getContainer2 = _interopRequireDefault(_getContainer);

var _ownerDocument = __webpack_require__(27);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

/**
 * The Position component calculates the coordinates for its child, to position
 * it relative to a `target` component or node. Useful for creating callouts
 * and tooltips, the Position component injects a `style` props with `left` and
 * `top` values for positioning your component.
 *
 * It also injects "arrow" `left`, and `top` values for styling callout arrows
 * for giving your components a sense of directionality.
 */
var Position = function (_React$Component) {
  _inherits(Position, _React$Component);

  function Position(props, context) {
    _classCallCheck(this, Position);

    var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));

    _this.getTarget = function () {
      var target = _this.props.target;

      var targetElement = typeof target === 'function' ? target() : target;
      return targetElement && _reactDom2.default.findDOMNode(targetElement) || null;
    };

    _this.maybeUpdatePosition = function (placementChanged) {
      var target = _this.getTarget();

      if (!_this.props.shouldUpdatePosition && target === _this._lastTarget && !placementChanged) {
        return;
      }

      _this.updatePosition(target);
    };

    _this.state = {
      positionLeft: 0,
      positionTop: 0,
      arrowOffsetLeft: null,
      arrowOffsetTop: null
    };

    _this._needsFlush = false;
    _this._lastTarget = null;
    return _this;
  }

  Position.prototype.componentDidMount = function componentDidMount() {
    this.updatePosition(this.getTarget());
  };

  Position.prototype.componentWillReceiveProps = function componentWillReceiveProps() {
    this._needsFlush = true;
  };

  Position.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
    if (this._needsFlush) {
      this._needsFlush = false;
      this.maybeUpdatePosition(this.props.placement !== prevProps.placement);
    }
  };

  Position.prototype.render = function render() {
    var _props = this.props,
        children = _props.children,
        className = _props.className,
        props = _objectWithoutProperties(_props, ['children', 'className']);

    var _state = this.state,
        positionLeft = _state.positionLeft,
        positionTop = _state.positionTop,
        arrowPosition = _objectWithoutProperties(_state, ['positionLeft', 'positionTop']);

    // These should not be forwarded to the child.


    delete props.target;
    delete props.container;
    delete props.containerPadding;
    delete props.shouldUpdatePosition;

    var child = _react2.default.Children.only(children);
    return (0, _react.cloneElement)(child, _extends({}, props, arrowPosition, {
      // FIXME: Don't forward `positionLeft` and `positionTop` via both props
      // and `props.style`.
      positionLeft: positionLeft,
      positionTop: positionTop,
      className: (0, _classnames2.default)(className, child.props.className),
      style: _extends({}, child.props.style, {
        left: positionLeft,
        top: positionTop
      })
    }));
  };

  Position.prototype.updatePosition = function updatePosition(target) {
    this._lastTarget = target;

    if (!target) {
      this.setState({
        positionLeft: 0,
        positionTop: 0,
        arrowOffsetLeft: null,
        arrowOffsetTop: null
      });

      return;
    }

    var overlay = _reactDom2.default.findDOMNode(this);
    var container = (0, _getContainer2.default)(this.props.container, (0, _ownerDocument2.default)(this).body);

    this.setState((0, _calculatePosition2.default)(this.props.placement, overlay, target, container, this.props.containerPadding));
  };

  return Position;
}(_react2.default.Component);

Position.propTypes = {
  /**
   * A node, element, or function that returns either. The child will be
   * be positioned next to the `target` specified.
   */
  target: _propTypes2.default.oneOfType([_componentOrElement2.default, _propTypes2.default.func]),

  /**
   * "offsetParent" of the component
   */
  container: _propTypes2.default.oneOfType([_componentOrElement2.default, _propTypes2.default.func]),
  /**
   * Minimum spacing in pixels between container border and component border
   */
  containerPadding: _propTypes2.default.number,
  /**
   * How to position the component relative to the target
   */
  placement: _propTypes2.default.oneOf(['top', 'right', 'bottom', 'left']),
  /**
   * Whether the position should be changed on each update
   */
  shouldUpdatePosition: _propTypes2.default.bool
};

Position.displayName = 'Position';

Position.defaultProps = {
  containerPadding: 0,
  placement: 'right',
  shouldUpdatePosition: false
};

exports.default = Position;
module.exports = exports['default'];

/***/ }),
/* 170 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.default = calculatePosition;

var _offset = __webpack_require__(89);

var _offset2 = _interopRequireDefault(_offset);

var _position = __webpack_require__(171);

var _position2 = _interopRequireDefault(_position);

var _scrollTop = __webpack_require__(90);

var _scrollTop2 = _interopRequireDefault(_scrollTop);

var _ownerDocument = __webpack_require__(27);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function getContainerDimensions(containerNode) {
  var width = void 0,
      height = void 0,
      scroll = void 0;

  if (containerNode.tagName === 'BODY') {
    width = window.innerWidth;
    height = window.innerHeight;

    scroll = (0, _scrollTop2.default)((0, _ownerDocument2.default)(containerNode).documentElement) || (0, _scrollTop2.default)(containerNode);
  } else {
    var _getOffset = (0, _offset2.default)(containerNode);

    width = _getOffset.width;
    height = _getOffset.height;

    scroll = (0, _scrollTop2.default)(containerNode);
  }

  return { width: width, height: height, scroll: scroll };
}

function getTopDelta(top, overlayHeight, container, padding) {
  var containerDimensions = getContainerDimensions(container);
  var containerScroll = containerDimensions.scroll;
  var containerHeight = containerDimensions.height;

  var topEdgeOffset = top - padding - containerScroll;
  var bottomEdgeOffset = top + padding - containerScroll + overlayHeight;

  if (topEdgeOffset < 0) {
    return -topEdgeOffset;
  } else if (bottomEdgeOffset > containerHeight) {
    return containerHeight - bottomEdgeOffset;
  } else {
    return 0;
  }
}

function getLeftDelta(left, overlayWidth, container, padding) {
  var containerDimensions = getContainerDimensions(container);
  var containerWidth = containerDimensions.width;

  var leftEdgeOffset = left - padding;
  var rightEdgeOffset = left + padding + overlayWidth;

  if (leftEdgeOffset < 0) {
    return -leftEdgeOffset;
  } else if (rightEdgeOffset > containerWidth) {
    return containerWidth - rightEdgeOffset;
  }

  return 0;
}

function calculatePosition(placement, overlayNode, target, container, padding) {
  var childOffset = container.tagName === 'BODY' ? (0, _offset2.default)(target) : (0, _position2.default)(target, container);

  var _getOffset2 = (0, _offset2.default)(overlayNode),
      overlayHeight = _getOffset2.height,
      overlayWidth = _getOffset2.width;

  var positionLeft = void 0,
      positionTop = void 0,
      arrowOffsetLeft = void 0,
      arrowOffsetTop = void 0;

  if (placement === 'left' || placement === 'right') {
    positionTop = childOffset.top + (childOffset.height - overlayHeight) / 2;

    if (placement === 'left') {
      positionLeft = childOffset.left - overlayWidth;
    } else {
      positionLeft = childOffset.left + childOffset.width;
    }

    var topDelta = getTopDelta(positionTop, overlayHeight, container, padding);

    positionTop += topDelta;
    arrowOffsetTop = 50 * (1 - 2 * topDelta / overlayHeight) + '%';
    arrowOffsetLeft = void 0;
  } else if (placement === 'top' || placement === 'bottom') {
    positionLeft = childOffset.left + (childOffset.width - overlayWidth) / 2;

    if (placement === 'top') {
      positionTop = childOffset.top - overlayHeight;
    } else {
      positionTop = childOffset.top + childOffset.height;
    }

    var leftDelta = getLeftDelta(positionLeft, overlayWidth, container, padding);

    positionLeft += leftDelta;
    arrowOffsetLeft = 50 * (1 - 2 * leftDelta / overlayWidth) + '%';
    arrowOffsetTop = void 0;
  } else {
    throw new Error('calcOverlayPosition(): No such placement of "' + placement + '" found.');
  }

  return { positionLeft: positionLeft, positionTop: positionTop, arrowOffsetLeft: arrowOffsetLeft, arrowOffsetTop: arrowOffsetTop };
}
module.exports = exports['default'];

/***/ }),
/* 171 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

exports.default = position;

var _offset = __webpack_require__(89);

var _offset2 = _interopRequireDefault(_offset);

var _offsetParent = __webpack_require__(172);

var _offsetParent2 = _interopRequireDefault(_offsetParent);

var _scrollTop = __webpack_require__(90);

var _scrollTop2 = _interopRequireDefault(_scrollTop);

var _scrollLeft = __webpack_require__(173);

var _scrollLeft2 = _interopRequireDefault(_scrollLeft);

var _style = __webpack_require__(33);

var _style2 = _interopRequireDefault(_style);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function nodeName(node) {
  return node.nodeName && node.nodeName.toLowerCase();
}

function position(node, offsetParent) {
  var parentOffset = { top: 0, left: 0 },
      offset;

  // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
  // because it is its only offset parent
  if ((0, _style2.default)(node, 'position') === 'fixed') {
    offset = node.getBoundingClientRect();
  } else {
    offsetParent = offsetParent || (0, _offsetParent2.default)(node);
    offset = (0, _offset2.default)(node);

    if (nodeName(offsetParent) !== 'html') parentOffset = (0, _offset2.default)(offsetParent);

    parentOffset.top += parseInt((0, _style2.default)(offsetParent, 'borderTopWidth'), 10) - (0, _scrollTop2.default)(offsetParent) || 0;
    parentOffset.left += parseInt((0, _style2.default)(offsetParent, 'borderLeftWidth'), 10) - (0, _scrollLeft2.default)(offsetParent) || 0;
  }

  // Subtract parent offsets and node margins
  return _extends({}, offset, {
    top: offset.top - parentOffset.top - (parseInt((0, _style2.default)(node, 'marginTop'), 10) || 0),
    left: offset.left - parentOffset.left - (parseInt((0, _style2.default)(node, 'marginLeft'), 10) || 0)
  });
}
module.exports = exports['default'];

/***/ }),
/* 172 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = offsetParent;

var _ownerDocument = __webpack_require__(25);

var _ownerDocument2 = _interopRequireDefault(_ownerDocument);

var _style = __webpack_require__(33);

var _style2 = _interopRequireDefault(_style);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function nodeName(node) {
  return node.nodeName && node.nodeName.toLowerCase();
}

function offsetParent(node) {
  var doc = (0, _ownerDocument2.default)(node),
      offsetParent = node && node.offsetParent;

  while (offsetParent && nodeName(node) !== 'html' && (0, _style2.default)(offsetParent, 'position') === 'static') {
    offsetParent = offsetParent.offsetParent;
  }

  return offsetParent || doc.documentElement;
}
module.exports = exports['default'];

/***/ }),
/* 173 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = scrollTop;

var _isWindow = __webpack_require__(40);

var _isWindow2 = _interopRequireDefault(_isWindow);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function scrollTop(node, val) {
  var win = (0, _isWindow2.default)(node);

  if (val === undefined) return win ? 'pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft : node.scrollLeft;

  if (win) win.scrollTo(val, 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop);else node.scrollLeft = val;
}
module.exports = exports['default'];

/***/ }),
/* 174 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.default = createChainableTypeChecker;
/**
 * Copyright 2013-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.
 */

// Mostly taken from ReactPropTypes.

function createChainableTypeChecker(validate) {
  function checkType(isRequired, props, propName, componentName, location, propFullName) {
    var componentNameSafe = componentName || '<<anonymous>>';
    var propFullNameSafe = propFullName || propName;

    if (props[propName] == null) {
      if (isRequired) {
        return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));
      }

      return null;
    }

    for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
      args[_key - 6] = arguments[_key];
    }

    return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));
  }

  var chainedCheckType = checkType.bind(null, false);
  chainedCheckType.isRequired = checkType.bind(null, true);

  return chainedCheckType;
}

/***/ })
/******/ ]);
});;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Select = function (_React$Component) {
    _inherits(Select, _React$Component);

    function Select(props) {
        _classCallCheck(this, Select);

        var _this2 = _possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, props));

        autobind(_this2);

        _this2.dropdown = React.createRef();
        _this2.select = React.createRef();

        var _this = _this2;
        var intersect = _this2.props.selected.filter(function (e) {
            return _this.props.options.filter(function (x) {
                return x.key === e.key;
            })[0] != undefined;
        });
        _this2.state = { selected: intersect, validationString: "", isInvalid: false, expanded: false };
        return _this2;
    }

    _createClass(Select, [{
        key: "onChangeMulti",
        value: function onChangeMulti(event) {
            var key = event.target.attributes["keyname"].value;
            var index = this.state.selected.findIndex(function (x) {
                return x.key === key;
            });
            var option = this.props.options.filter(function (x) {
                return x.key === key;
            })[0];
            if (event.target.checked === true && index === -1) {
                this.state.selected.push(option);
            } else if (index !== -1) {
                this.state.selected.splice(index, 1);
            }
            this.onChange(event, this.state.selected);
        }
    }, {
        key: "onChangeSingle",
        value: function onChangeSingle(event) {
            console.log(event.target);
            var key = event.target.attributes["keyname"].value;
            var selected = event.target.checked === true ? [this.props.options.filter(function (x) {
                return x.key === key;
            })[0]] : [];
            this.onChange(event, selected);
        }
    }, {
        key: "onChange",
        value: function onChange(event, selected) {
            var validationString = "";
            var isInvalid = false;
            if (selected.length < this.props.required) {
                validationString = "Must select " + this.props.required + " items.";
                isInvalid = true;
            }
            this.setState({
                isInvalid: isInvalid,
                validationString: validationString,
                selected: selected
            });
            this.props.onChange(selected);
        }
    }, {
        key: "showHideDropdown",
        value: function showHideDropdown(event) {
            if (!this.dropdown || !this.select) return;
            var isInsideSelect = this.select.current.contains(event.target);
            var isInsideDropdown = this.dropdown.current.contains(event.target);
            if (!isInsideDropdown && this.state.expanded === true) {
                this.setState({ expanded: false });
            } else if (isInsideSelect && this.state.expanded === false) {
                this.setState({ expanded: true });
            }
        }
    }, {
        key: "selectText",
        value: function selectText() {
            var length = this.state.selected.length;
            if (length === 1) {
                return this.state.selected[0].value;
            } else if (length > 1) {
                return length + " items selected.";
            } else {
                return this.props.defaultText;
            }
        }
    }, {
        key: "isChecked",
        value: function isChecked() {}
    }, {
        key: "render",
        value: function render() {
            var _this3 = this;

            console.log("Select " + this.state.selected.length);
            var dd = this.state.expanded ? React.createElement(
                "div",
                { ref: this.dropdown, className: "select-dropdown-container-visable" },
                this.props.options.map(function (option, index) {
                    return React.createElement(
                        "label",
                        { className: "select-dropdown-label", key: index },
                        React.createElement("input", { className: "select-dropdown-checkbox", type: "checkbox",
                            keyname: option.key,
                            onChange: _this3.props.isMulti ? _this3.onChangeMulti : _this3.onChangeSingle,
                            checked: _this3.state.selected.indexOf(_this3.state.selected.filter(function (x) {
                                return x.key === option.key;
                            })[0]) !== -1 ? true : false }),
                        React.createElement(
                            "span",
                            null,
                            option.value
                        )
                    );
                })
            ) : React.createElement("div", { ref: this.dropdown });
            return React.createElement(
                "div",
                { style: { width: this.props.size }, className: "component-container" },
                React.createElement(
                    "div",
                    { className: "select-container" },
                    React.createElement(
                        "select",
                        { style: { minWidth: this.props.size }, className: this.state.isInvalid ? "select-invalid" : "select" },
                        React.createElement(
                            "option",
                            null,
                            this.selectText()
                        )
                    ),
                    React.createElement(
                        "label",
                        { className: "validation-label" },
                        this.state.validationString
                    ),
                    React.createElement("div", { className: "select-blocker", ref: this.select })
                ),
                React.createElement(
                    "div",
                    null,
                    dd
                )
            );
        }
    }, {
        key: "shouldComponentUpdate",
        value: function shouldComponentUpdate(nextProps, nextState) {
            var isUpdate = this.state.expanded || nextState.expanded || this.state.validationString !== nextState.validationString || this.state.isInvalid !== nextState.isInvalid;

            console.log("Select Render " + isUpdate);
            return isUpdate;
        }
    }, {
        key: "componentDidMount",
        value: function componentDidMount() {
            document.addEventListener('mousedown', this.showHideDropdown);
        }
    }, {
        key: "componentWillUnmount",
        value: function componentWillUnmount() {
            document.removeEventListener('mousedown', this.showHideDropdown);
        }
    }], [{
        key: "defaultProps",
        get: function get() {
            return {
                onChange: function onChange() {},

                selected: [],
                size: 480,
                required: 0,
                options: [],
                isMulti: false,
                defaultText: ""
            };
        }
    }]);

    return Select;
}(React.Component);;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Select2 = function (_React$Component) {
    _inherits(Select2, _React$Component);

    _createClass(Select2, null, [{
        key: "defaultProps",
        get: function get() {
            return {
                onChange: function onChange() {},
                onSelect: function onSelect() {},

                selected: [],
                size: 480,
                options: [],
                isMulti: false,
                defaultText: "",
                required: false,
                name: ""
            };
        }
    }]);

    function Select2(props) {
        _classCallCheck(this, Select2);

        var _this = _possibleConstructorReturn(this, (Select2.__proto__ || Object.getPrototypeOf(Select2)).call(this, props));

        autobind(_this);

        // SPLIT MULTISELECT ITEMS
        var selectedItemValues = [];
        if (_this.props.selected != null && _this.props.selected.length > 0) {
            if (_this.props.selected[0].key) {
                // selections are key-value pairs
                for (var i = 0; i < _this.props.selected.length; i++) {
                    var allItems = _this.props.selected[i].value.split(';');
                    for (var j = 0; j < allItems.length; j++) {
                        selectedItemValues.push(allItems[j]);
                    }
                }
            } else {
                selectedItemValues = _this.props.selected;
            }
        }

        _this.state = { selectedItems: selectedItemValues, options: _this.props.options };

        if (props.name !== null && props.name !== undefined) {

            if (window["select2ChangeValueMethod"] === null || window["select2ChangeValueMethod"] === undefined) {

                window["select2ChangeValueMethod"] = {};
            }

            window["select2ChangeValueMethod"][props.name] = _this.onChange;
        }

        return _this;
    }

    _createClass(Select2, [{
        key: "onChange",
        value: function onChange(NewValue) {
            var selectedItemsArray = [];

            selectedItemsArray.push(NewValue);

            var selectedItemIDs = [];
            for (var i = 0; i < this.state.options.length; i++) {
                if ($.inArray(this.state.options[i].value, selectedItemsArray) >= 0) {
                    selectedItemIDs.push(this.state.options[i].key);
                }
            }

            this.setState({ selectedItems: selectedItemsArray, options: this.state.options });
            this.props.onChange(selectedItemsArray, selectedItemIDs);
        }
    }, {
        key: "onSelect",
        value: function onSelect() {
            this.props.onSelect();
        }
    }, {
        key: "render",
        value: function render() {
            var _this2 = this;

            var selectOptions;
            if (this.state.options.length == 0) {
                selectOptions = [];
            } else if (typeof this.state.options[0].key != "undefined") {
                // options are key-value pairs
                selectOptions = this.props.options.map(function (option, index) {
                    return React.createElement(
                        "option",
                        { key: option.key, keyname: option.key, value: option.value },
                        " ",
                        option.value
                    );
                }.bind(this));
            } else {
                // options are just values
                selectOptions = this.props.options.map(function (option, index) {
                    return React.createElement(
                        "option",
                        { key: option, keyname: option, value: option },
                        " ",
                        option
                    );
                }.bind(this));
            }

            var widthStyle = {};
            if (this.props.size != null) {
                widthStyle["width"] = this.props.size.toString() + "px";
            }

            var selectedItem;
            if (typeof this.state.selectedItems == "string") {
                selectedItem = this.state.selectedItems;
            } else if (typeof this.state.selectedItems == "undefined") {
                selectedItem = null;
            } else {
                selectedItem = this.state.selectedItems[0];
            }

            var classID = "formControlsSelect";

            if (typeof this.props.name === "string") {
                classID = classID + this.props.name;
            }

            return React.createElement(
                ReactBootstrap.FormGroup,
                { controlId: classID, className: "formControlsSelect" },
                React.createElement(
                    ReactBootstrap.FormControl,
                    { onChange: function onChange(event) {
                            return _this2.onChange(event.target.value);
                        }, componentClass: "select", placeholder: "select", value: selectedItem, style: widthStyle, onFocus: this.onSelect },
                    React.createElement(NothingSelectionOption, { IsRequired: this.props.required }),
                    selectOptions
                )
            );
        }
    }]);

    return Select2;
}(React.Component);

function NothingSelectionOption(props) {
    if (props.IsRequired) {
        return React.createElement(
            "option",
            { disabled: true, value: true },
            " -- select an option -- "
        );
    } else {
        return React.createElement(
            "option",
            { value: true },
            " -- not set -- "
        );
    }
};
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var MultiSelect = function (_React$Component) {
    _inherits(MultiSelect, _React$Component);

    function MultiSelect(props) {
        _classCallCheck(this, MultiSelect);

        var _this = _possibleConstructorReturn(this, (MultiSelect.__proto__ || Object.getPrototypeOf(MultiSelect)).call(this, props));

        autobind(_this);

        _this.refMultiSelect = React.createRef();

        var selectedItemValues = [];

        // SPLIT MULTISELECT ITEMS
        for (var i = 0; i < _this.props.selected.length; i++) {
            var allItems = _this.props.selected[i].value.split(';');
            for (var j = 0; j < allItems.length; j++) {
                selectedItemValues.push(allItems[j]);
            }
        }

        _this.state = { selectedItems: selectedItemValues, options: _this.props.options };
        return _this;
    }

    _createClass(MultiSelect, [{
        key: "onChange",
        value: function onChange(event) {
            var selectedItemsArray = [];

            // USE JQUERY TO GET PAST LIMITATION OF IE
            var selectObj = ReactDOM.findDOMNode(this.select);
            selectedItemsArray = $(selectObj).val();

            this.setState({ selectedItems: selectedItemsArray, options: this.state.options });

            this.props.onChange(selectedItemsArray);
        }
    }, {
        key: "render",
        value: function render() {
            var _this2 = this;

            var maxRows = this.props.options.length;
            if (maxRows > 10) {
                maxRows = 10;
            }

            return React.createElement(
                ReactBootstrap.FormGroup,
                null,
                React.createElement(
                    ReactBootstrap.FormControl,
                    { ref: function ref(select) {
                            _this2.select = select;
                        }, onChange: this.onChange, size: maxRows, componentClass: "select", multiple: true, value: this.state.selectedItems },
                    this.state.options.map(function (option, index) {
                        return React.createElement(
                            "option",
                            { key: option.key, value: option.value },
                            option.value
                        );
                    }.bind(this))
                )
            );
        }
    }], [{
        key: "defaultProps",
        get: function get() {
            return {
                onChange: function onChange() {},

                selected: [],
                size: 480,
                options: [],
                defaultText: ""
            };
        }
    }]);

    return MultiSelect;
}(React.Component);;
"use strict";

//wrapper component for ReactBootstraps.ProgressBar, so that we can change implementation without changing how it's used
document.kNextReactComponents.ProgressBar = function (_ref) {
    var _ref$styleClass = _ref.styleClass,
        styleClass = _ref$styleClass === undefined ? "danger" : _ref$styleClass,
        _ref$score = _ref.score,
        score = _ref$score === undefined ? 0 : _ref$score,
        _ref$minScore = _ref.minScore,
        minScore = _ref$minScore === undefined ? 0 : _ref$minScore,
        _ref$maxScore = _ref.maxScore,
        maxScore = _ref$maxScore === undefined ? 100 : _ref$maxScore,
        _ref$animated = _ref.animated,
        animated = _ref$animated === undefined ? false : _ref$animated,
        _ref$striped = _ref.striped,
        striped = _ref$striped === undefined ? true : _ref$striped;

    return React.createElement(ReactBootstrap.ProgressBar, {
        bsStyle: styleClass,
        now: score,
        min: minScore,
        max: maxScore,
        active: animated,
        striped: striped,
        componentname: "ProgressBar"
    });
};;
"use strict";

document.kNextReactComponents.Link = function (_ref) {
    var _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$role = _ref.role,
        role = _ref$role === undefined ? null : _ref$role,
        _ref$domRef = _ref.domRef,
        domRef = _ref$domRef === undefined ? null : _ref$domRef,
        _ref$tabIndex = _ref.tabIndex,
        tabIndex = _ref$tabIndex === undefined ? 0 : _ref$tabIndex,
        _ref$ariaLevel = _ref.ariaLevel,
        ariaLevel = _ref$ariaLevel === undefined ? null : _ref$ariaLevel,
        _ref$text = _ref.text,
        text = _ref$text === undefined ? null : _ref$text,
        _ref$link = _ref.link,
        link = _ref$link === undefined ? null : _ref$link,
        _ref$target = _ref.target,
        target = _ref$target === undefined ? "_self" : _ref$target,
        _ref$external = _ref.external,
        external = _ref$external === undefined ? false : _ref$external,
        _ref$showExternalIcon = _ref.showExternalIcon,
        showExternalIcon = _ref$showExternalIcon === undefined ? false : _ref$showExternalIcon,
        _ref$tooltip = _ref.tooltip,
        tooltip = _ref$tooltip === undefined ? null : _ref$tooltip,
        _ref$children = _ref.children,
        children = _ref$children === undefined ? null : _ref$children,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$onKeyDownWireUp = _ref.onKeyDownWireUp,
        onKeyDownWireUp = _ref$onKeyDownWireUp === undefined ? null : _ref$onKeyDownWireUp,
        _ref$iconTabIndex = _ref.iconTabIndex,
        iconTabIndex = _ref$iconTabIndex === undefined ? -1 : _ref$iconTabIndex;

    var eventHandler = {
        "handleLinkKeyPress": function handleLinkKeyPress(Event) {
            if (onClickWireUp === "function" && Event.key === 'Enter') {
                onClickWireUp();
            }
        }
    };

    var domGenerator = {
        "linkTextDOM": function linkTextDOM() {
            var _linkText = null;
            if (!Globals.Utilities.isUndefinedOrNull(children)) {
                _linkText = children;
            } else if (!Globals.Utilities.isUndefinedOrNull(text)) {
                _linkText = text;
            } else {
                _linkText = link;
            }

            var _externalIconDOM = null;
            if (external && showExternalIcon) {
                _externalIconDOM = React.createElement(document.kNextReactComponents.Icon, {
                    iconClassName: "fal fa-external-link",
                    additionalClasses: "external",
                    tabIndex: iconTabIndex
                });
            }

            return React.createElement(
                React.Fragment,
                null,
                _linkText,
                " ",
                _externalIconDOM
            );
        }
    };

    var _targetType = target;
    if (external) {
        _targetType = "_blank";
    }

    return React.createElement(
        "a",
        {
            href: link,
            title: tooltip,
            target: _targetType,
            onClick: onClickWireUp,
            tabIndex: tabIndex,
            onKeyDown: onKeyDownWireUp,
            ref: domRef,
            onKeyPress: eventHandler.handleLinkKeyPress,
            className: "link " + className,
            componentname: "Link",
            role: role,
            "aria-level": ariaLevel
        },
        domGenerator.linkTextDOM()
    );
};;
"use strict";

document.kNextReactComponents.Icon = function (_ref) {
    var _ref$iconClassName = _ref.iconClassName,
        iconClassName = _ref$iconClassName === undefined ? "" : _ref$iconClassName,
        _ref$iconType = _ref.iconType,
        iconType = _ref$iconType === undefined ? null : _ref$iconType,
        _ref$additionalClasse = _ref.additionalClasses,
        additionalClasses = _ref$additionalClasse === undefined ? "" : _ref$additionalClasse,
        _ref$color = _ref.color,
        color = _ref$color === undefined ? null : _ref$color,
        _ref$ariaLabel = _ref.ariaLabel,
        ariaLabel = _ref$ariaLabel === undefined ? "" : _ref$ariaLabel,
        _ref$tabIndex = _ref.tabIndex,
        tabIndex = _ref$tabIndex === undefined ? -1 : _ref$tabIndex,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$onKeyPressWireUp = _ref.onKeyPressWireUp,
        onKeyPressWireUp = _ref$onKeyPressWireUp === undefined ? null : _ref$onKeyPressWireUp,
        _ref$ariaHidden = _ref.ariaHidden,
        ariaHidden = _ref$ariaHidden === undefined ? true : _ref$ariaHidden,
        _ref$disabled = _ref.disabled,
        disabled = _ref$disabled === undefined ? false : _ref$disabled,
        _ref$domRef = _ref.domRef,
        domRef = _ref$domRef === undefined ? null : _ref$domRef;

    var eventHandler = {
        "handleIconKeyPress": function handleIconKeyPress(Event) {
            if (typeof onKeyPressWireUp === "function") {
                onKeyPressWireUp(Event);
            } else if (typeof onClickWireUp === "function" && Event.key === "Enter") {
                onClickWireUp();
            }
        }
    };

    var _className = "icon " + additionalClasses + " ";
    if (iconClassName.length > 0) {
        _className += iconClassName;
    } else {
        //mapping icon type to class name here
        switch (iconType) {
            case IconType.Delete:
                _className += "fa fa-times";
                break;
            case IconType.Add:
                _className += "fa fa-plus";
                break;
            case IconType.Minus:
                _className += "fa fa-minus";
                break;
            case IconType.Sort:
                _className += "fa fa-sort";
                break;
            case IconType.SortUp:
                _className += "fa fa-sort-up";
                break;
            case IconType.SortDown:
                _className += "fa fa-sort-down";
                break;
            case IconType.ArrowUp:
                _className += "fa fa-angle-up";
                break;
            case IconType.ArrowDown:
                _className += "fa fa-angle-down";
                break;
            case IconType.Thumbtack:
                _className += "fa fa-thumbtack";
                break;
            case IconType.Search:
                _className += "far fa-search";
                break;
            case IconType.Ellipses:
                _className += "far fa-ellipsis-h";
                break;
            case IconType.Footnotes:
                _className += "fad fa-comment-alt-lines";
                break;
            case IconType.Circle:
                _className += "fas fa-circle";
                break;
            case IconType.Bullhorn:
                _className += "far fa-bullhorn";
                break;
            case IconType.Document:
                _className += "fal fa-file";
                break;
            case IconType.Link:
                _className += "far fa-link";
                break;
            case IconType.Books:
                _className += "fal fa-books";
                break;
            case IconType.Newspaper:
                _className += "fal fa-newspaper";
                break;
            case IconType.Tools:
                _className += "fal fa-tools";
                break;
            case IconType.Teacher:
                _className += "fal fa-chalkboard-teacher";
                break;
            case IconType.History:
                _className += "fal fa-history";
                break;
            case IconType.Toolbox:
                _className += "fal fa-toolbox";
                break;
            case IconType.Store:
                _className += "fal fa-store";
                break;
            case IconType.PhotoVideo:
                _className += "fal fa-photo-video";
                break;
            case IconType.Video:
                _className += "fal fa-video";
                break;
            case IconType.Passport:
                _className += "fal fa-passport";
                break;
            case IconType.Info:
                _className += "fad fa-info-circle";
                break;
            case IconType.Folder:
                _className += "fal fa-folders";
                break;
            case IconType.FileDownload:
                _className += "fal fa-file-download";
                break;
            case IconType.LayerGroup:
                _className += "fal fa-layer-group";
                break;
            case IconType.LightbulbOn:
                _className += "fal fa-lightbulb-on";
                break;
            case IconType.StarExclamation:
                _className += "fal fa-star-exclamation";
                break;
            case IconType.Swatchbook:
                _className += "fal fa-swatchbook";
                break;
            case IconType.Building:
                _className += "fal fa-building";
                break;
            case IconType.Telescope:
                _className += "fal fa-telescope";
                break;
            case IconType.BuildingMemo:
                _className += "fal fa-building-memo";
                break;
            case IconType.MoneyBillTrendUp:
                _className += "fal fa-money-bill-trend-up";
                break;
            case IconType.GlobePointer:
                _className += "fal fa-globe-pointer";
                break;
            case IconType.EarthAmericas:
                _className += "fal fa-earth-americas";
                break;
            case IconType.HandshakeAngle:
                _className += "fal fa-handshake-angle";
                break;
            case IconType.Globe:
                _className += "fal fa-globe";
                break;
            case IconType.ListTimeline:
                _className += "fal fa-list-timeline";
                break;
            default:
                break;
        }
    }

    var _colorStyle = !Globals.Utilities.isUndefinedOrNull(color) ? { "color": color } : null;

    var _ariaHidden = ariaHidden;
    var _ariaRole = "presentation";
    if (typeof onClickWireUp === "function") {
        _ariaHidden = false;
        _ariaRole = "button";
    }

    var _tabIndex = tabIndex;
    if (disabled) {
        _tabIndex = -1;
    }

    return React.createElement("i", {
        className: _className,
        style: _colorStyle,
        role: _ariaRole,
        "aria-hidden": _ariaHidden,
        "aria-label": ariaLabel,
        tabIndex: _tabIndex,
        componentname: "Icon",
        onClick: onClickWireUp,
        onKeyPress: eventHandler.handleIconKeyPress,
        ref: domRef
    });
};;
"use strict";

document.kNextReactComponents.Button = function (_ref) {
    var _ref$id = _ref.id,
        id = _ref$id === undefined ? null : _ref$id,
        _ref$role = _ref.role,
        role = _ref$role === undefined ? "button" : _ref$role,
        _ref$type = _ref.type,
        type = _ref$type === undefined ? "button" : _ref$type,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$buttonStyle = _ref.buttonStyle,
        buttonStyle = _ref$buttonStyle === undefined ? null : _ref$buttonStyle,
        _ref$domRef = _ref.domRef,
        domRef = _ref$domRef === undefined ? null : _ref$domRef,
        _ref$active = _ref.active,
        active = _ref$active === undefined ? false : _ref$active,
        _ref$disabled = _ref.disabled,
        disabled = _ref$disabled === undefined ? false : _ref$disabled,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? null : _ref$label,
        _ref$ariaLabel = _ref.ariaLabel,
        ariaLabel = _ref$ariaLabel === undefined ? null : _ref$ariaLabel,
        _ref$children = _ref.children,
        children = _ref$children === undefined ? null : _ref$children,
        _ref$tooltipText = _ref.tooltipText,
        tooltipText = _ref$tooltipText === undefined ? null : _ref$tooltipText,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$onKeyDownWireUp = _ref.onKeyDownWireUp,
        onKeyDownWireUp = _ref$onKeyDownWireUp === undefined ? null : _ref$onKeyDownWireUp,
        _ref$onMouseOverWireU = _ref.onMouseOverWireUp,
        onMouseOverWireUp = _ref$onMouseOverWireU === undefined ? null : _ref$onMouseOverWireU,
        _ref$onFocusWireUp = _ref.onFocusWireUp,
        onFocusWireUp = _ref$onFocusWireUp === undefined ? null : _ref$onFocusWireUp,
        _ref$onMouseDownWireU = _ref.onMouseDownWireUp,
        onMouseDownWireUp = _ref$onMouseDownWireU === undefined ? null : _ref$onMouseDownWireU,
        _ref$tabIndex = _ref.tabIndex,
        tabIndex = _ref$tabIndex === undefined ? 0 : _ref$tabIndex;

    var domGenerator = {
        //generating the content inside the button
        //if the button style is delete and no label is provided then showing and 'x' icon as the content
        //same thing as above for adding but with a '+' icon
        "buttonBodyDOM": function buttonBodyDOM() {
            var _buttonBodyDOM = null;

            if (!Globals.Utilities.isUndefinedOrNull(children)) {
                _buttonBodyDOM = children;
            } else if (buttonStyle === ButtonStyle.Delete) {
                if (!Globals.Utilities.isUndefinedOrNull(label)) {
                    _buttonBodyDOM = label;
                } else {
                    _buttonBodyDOM = React.createElement(document.kNextReactComponents.Icon, {
                        iconType: IconType.Delete,
                        tabIndex: -1,
                        ariaLabel: "delete",
                        additionalClasses: "delete",
                        ariaHidden: false
                    });
                }
            } else if (buttonStyle === ButtonStyle.Add) {
                if (!Globals.Utilities.isUndefinedOrNull(label)) {
                    _buttonBodyDOM = label;
                } else {
                    _buttonBodyDOM = React.createElement(document.kNextReactComponents.Icon, {
                        iconType: IconType.Add,
                        additionalClasses: "add",
                        ariaHidden: false
                    });
                }
            } else if (buttonStyle === ButtonStyle.Search) {
                if (!Globals.Utilities.isUndefinedOrNull(label)) {
                    _buttonBodyDOM = label;
                } else {
                    _buttonBodyDOM = React.createElement(document.kNextReactComponents.Icon, {
                        iconType: IconType.Search,
                        additionalClasses: "search",
                        ariaHidden: false
                    });
                }
            } else if (buttonStyle === ButtonStyle.Ellipses) {
                if (!Globals.Utilities.isUndefinedOrNull(label)) {
                    _buttonBodyDOM = label;
                } else {
                    _buttonBodyDOM = React.createElement(document.kNextReactComponents.Icon, {
                        iconType: IconType.Ellipses,
                        additionalClasses: "ellipses",
                        ariaHidden: false
                    });
                }
            } else if (buttonStyle === ButtonStyle.Info) {
                if (!Globals.Utilities.isUndefinedOrNull(label)) {
                    _buttonBodyDOM = label;
                } else {
                    _buttonBodyDOM = React.createElement(document.kNextReactComponents.Icon, {
                        iconType: IconType.Info,
                        additionalClasses: "info",
                        ariaHidden: false
                    });
                }
            } else if (!Globals.Utilities.isUndefinedOrNull(label)) {
                _buttonBodyDOM = label;
            }

            return _buttonBodyDOM;
        }
    };

    //button class name
    var _classNameToUse = className + " ";
    // Let's determine which Button style to use.
    if (disabled === true) {
        _classNameToUse += "button button-disabled";
    } else {
        switch (buttonStyle) {
            case ButtonStyle.Secondary:
                _classNameToUse += "button button-secondary";
                break;
            case ButtonStyle.Disabled:
                _classNameToUse += "button button-disabled";
                break;
            case ButtonStyle.Utility:
                _classNameToUse += "button button-utility";
                break;
            case ButtonStyle.Delete:
                _classNameToUse += "button button-delete";
                break;
            case ButtonStyle.Add:
                _classNameToUse += "button button-add";
                break;
            case ButtonStyle.Search:
                _classNameToUse += "button button-search";
                break;
            case ButtonStyle.Ellipses:
                _classNameToUse += "button button-ellipses";
                break;
            case ButtonStyle.Text:
                _classNameToUse += "button button-text";
                break;
            case ButtonStyle.Toggle:
                _classNameToUse += "button button-toggle";
                break;
            case ButtonStyle.Transparent:
                _classNameToUse += "button button-transparent";
                break;
            case ButtonStyle.Info:
                _classNameToUse += "button button-none";
                break;
            case ButtonStyle.Primary:
            default:
                _classNameToUse += "button button-primary";
        }
    }
    if (active) {
        _classNameToUse += " active";
    }

    //button tooltip
    var _tooltipToUse = "";
    var _tooltipClass = "";
    if (typeof tooltipText === "string" && !disabled) {
        _tooltipToUse = tooltipText;
        _tooltipClass = "btn-tooltip";
    }

    //aria label text
    var _ariaLabelText = "";
    if (!Globals.Utilities.isUndefinedOrNull(ariaLabel) && ariaLabel.length > 0) {
        _ariaLabelText = ariaLabel;
    } else if (!Globals.Utilities.isUndefinedOrNull(label)) {
        _ariaLabelText = label;
    }

    //tab index
    var _tabIndexValue = tabIndex;
    if (disabled) {
        _tabIndexValue = -1;
    }

    return React.createElement(
        "span",
        {
            className: "button-container " + _tooltipClass,
            componentname: "Button"
        },
        React.createElement("span", {
            className: "btn-tooltiptext",
            dangerouslySetInnerHTML: { __html: _tooltipToUse }
        }),
        React.createElement(
            "button",
            {
                id: id,
                role: role,
                type: type,
                className: _classNameToUse,
                onClick: onClickWireUp,
                onMouseDown: onMouseDownWireUp // NEW: wire up onMouseDown
                , disabled: disabled,
                tabIndex: _tabIndexValue,
                onKeyDown: onKeyDownWireUp,
                onMouseOver: onMouseOverWireUp,
                onFocus: onFocusWireUp,
                "aria-label": _ariaLabelText,
                ref: domRef
            },
            domGenerator.buttonBodyDOM()
        )
    );
};;
"use strict";

document.kNextReactComponents.Toggle = function (_ref) {
    var _ref$text = _ref.text,
        text = _ref$text === undefined ? 'Toggle text' : _ref$text,
        _ref$isOn = _ref.isOn,
        isOn = _ref$isOn === undefined ? false : _ref$isOn,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp;

    var _toggleIconClassName = "";
    var _toggleAccessibilityClassName = "";
    var _toggleAccessibilityIconClassName = "";
    if (isOn) {
        _toggleIconClassName = "fad fa-toggle-on";
        _toggleAccessibilityIconClassName = "fas fa-horizontal-rule";
        _toggleAccessibilityClassName = "rect";
    } else {
        _toggleIconClassName = "fad fa-toggle-off";
        _toggleAccessibilityIconClassName = "far fa-circle";
        _toggleAccessibilityClassName = "circ";
    }

    return React.createElement(
        document.kNextReactComponents.Button,
        {
            type: "button",
            role: "switch",
            buttonStyle: ButtonStyle.Toggle,
            onClickWireUp: onClickWireUp,
            className: "toggle " + className,
            ariaChecked: isOn
        },
        React.createElement(
            "span",
            { className: "toggle-text" },
            text
        ),
        React.createElement(document.kNextReactComponents.Icon, {
            iconClassName: _toggleAccessibilityIconClassName,
            additionalClasses: _toggleAccessibilityClassName
        }),
        React.createElement(document.kNextReactComponents.Icon, {
            iconClassName: _toggleIconClassName,
            additionalClasses: "toggle-icon"
        })
    );
};;
"use strict";

document.kNextReactComponents.TextToggle = function (_ref) {
    var _ref$label = _ref.label,
        label = _ref$label === undefined ? null : _ref$label,
        _ref$options = _ref.options,
        options = _ref$options === undefined ? [] : _ref$options,
        _ref$selectedOption = _ref.selectedOption,
        selectedOption = _ref$selectedOption === undefined ? "" : _ref$selectedOption,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp;

    var eventHandler = {
        "handleToggleButtonClick": function handleToggleButtonClick(Option) {
            if (!Option.disabled) {
                onClickWireUp(Option.value);
            }
        },
        "handleToggleButtonKeyDown": function handleToggleButtonKeyDown(Event, Option) {
            if (Event.key === 'Enter' && !Option.disabled) {
                onClickWireUp(Option.value);
            }
        }
    };

    var domGenerator = {
        "labelDOM": function labelDOM() {
            if (Globals.Utilities.isUndefinedOrNull(label)) {
                return null;
            }

            return React.createElement(
                "span",
                { className: "toggle-label" },
                label
            );
        },
        "toggleButtonsDOM": function toggleButtonsDOM() {
            var _toggleButtonsDOM = options.map(function (_option) {
                var _toggleClassName = "toggle-button";
                if (_option.value === selectedOption) {
                    _toggleClassName += " active-toggle-button";
                }
                if (_option.disabled) {
                    _toggleClassName += " disabled-toggle-button";
                }

                return React.createElement(
                    "div",
                    {
                        tabIndex: 0,
                        onKeyDown: function onKeyDown(Event) {
                            return eventHandler.handleToggleButtonKeyDown(Event, _option);
                        },
                        key: _option.value,
                        className: _toggleClassName,
                        onClick: function onClick() {
                            return eventHandler.handleToggleButtonClick(_option);
                        }
                    },
                    _option.text,
                    _option.additionElement
                );
            });
            return _toggleButtonsDOM;
        }
    };

    return React.createElement(
        "div",
        {
            className: "text-toggle " + className,
            componentname: "TextToggle"
        },
        domGenerator.labelDOM(),
        React.createElement(
            "div",
            { className: "toggle-button-list" },
            domGenerator.toggleButtonsDOM()
        )
    );
};;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

document.kNextReactComponents.Alert = function (_React$Component) {
    _inherits(Alert, _React$Component);

    function Alert(props) {
        _classCallCheck(this, Alert);

        var _this = _possibleConstructorReturn(this, (Alert.__proto__ || Object.getPrototypeOf(Alert)).call(this, props));

        autobind(_this);
        _this.state = {
            visible: true
        };
        return _this;
    }

    _createClass(Alert, [{
        key: "handleClick",
        value: function handleClick() {

            this.setState({
                visible: false
            });
        }
    }, {
        key: "render",
        value: function render() {

            // Let's determine which alert style to use.
            var classNameToUse = "";
            var iconClass = "";

            switch (this.props.alertType) {
                case AlertType.Error:
                    classNameToUse = "alert alert-errorMessage";
                    iconClass = "fa fa-exclamation-triangle";
                    break;
                case AlertType.Success:
                    classNameToUse = "alert alert-success";
                    iconClass = "fa fa-check-circle";
                    break;
                default:
                case AlertType.Default:
                    classNameToUse = "alert alert-default";
                    iconClass = "fa fa-info-circle";
            }

            //shows an 'x' icon if closeable is true
            var closeBlock = this.props.closeable === true ? React.createElement(document.kNextReactComponents.Icon, { iconType: IconType.Delete, onClick: this.handleClick }) : null;

            if (this.state.visible) {

                return React.createElement(
                    "div",
                    { className: classNameToUse, componentname: "Alert" },
                    React.createElement("i", { className: iconClass, "aria-hidden": "true" }),
                    this.props.label,
                    closeBlock
                );
            } else {
                return null;
            }
        }
    }], [{
        key: "defaultProps",
        get: function get() {

            return {
                label: GetString('str_Component_defaultAlertBox'),
                alertType: AlertType.Default,
                closeable: true
            };
        }
    }]);

    return Alert;
}(React.Component);

document.kNextReactComponents.Alert.propTypes = {
    label: PropTypes.string,
    alertType: PropTypes.number,
    closeable: PropTypes.bool
};;
"use strict";

document.kNextReactComponents.TextArea = function (_ref) {
    var _ref$value = _ref.value,
        value = _ref$value === undefined ? "" : _ref$value,
        _ref$errorMessage = _ref.errorMessage,
        errorMessage = _ref$errorMessage === undefined ? "" : _ref$errorMessage,
        _ref$name = _ref.name,
        name = _ref$name === undefined ? null : _ref$name,
        _ref$required = _ref.required,
        required = _ref$required === undefined ? true : _ref$required,
        _ref$rows = _ref.rows,
        rows = _ref$rows === undefined ? 4 : _ref$rows,
        _ref$cols = _ref.cols,
        cols = _ref$cols === undefined ? 30 : _ref$cols,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$maxLength = _ref.maxLength,
        maxLength = _ref$maxLength === undefined ? document.kNextReact['ComponentDefaults'].TextMaxLength : _ref$maxLength,
        _ref$minLength = _ref.minLength,
        minLength = _ref$minLength === undefined ? 0 : _ref$minLength,
        _ref$disabled = _ref.disabled,
        disabled = _ref$disabled === undefined ? false : _ref$disabled,
        _ref$readOnly = _ref.readOnly,
        readOnly = _ref$readOnly === undefined ? false : _ref$readOnly,
        _ref$resizeable = _ref.resizeable,
        resizeable = _ref$resizeable === undefined ? false : _ref$resizeable,
        _ref$autoGrowing = _ref.autoGrowing,
        autoGrowing = _ref$autoGrowing === undefined ? false : _ref$autoGrowing,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? "" : _ref$label,
        _ref$placeholder = _ref.placeholder,
        placeholder = _ref$placeholder === undefined ? GetString('str_Component_defaultTextArea') : _ref$placeholder,
        _ref$domRef = _ref.domRef,
        domRef = _ref$domRef === undefined ? null : _ref$domRef,
        _ref$onKeyDownWireUp = _ref.onKeyDownWireUp,
        onKeyDownWireUp = _ref$onKeyDownWireUp === undefined ? null : _ref$onKeyDownWireUp,
        _ref$onChangeWireUp = _ref.onChangeWireUp,
        onChangeWireUp = _ref$onChangeWireUp === undefined ? function () {} : _ref$onChangeWireUp,
        _ref$onBlurWireUp = _ref.onBlurWireUp,
        onBlurWireUp = _ref$onBlurWireUp === undefined ? function () {} : _ref$onBlurWireUp;

    var eventHandler = {
        "handleChange": function handleChange(NewValue) {
            if (autoGrowing) {
                domRef.current.style.height = "auto";
                if (NewValue.length > 0) {
                    domRef.current.style.height = domRef.current.scrollHeight + "px";
                }
            }

            onChangeWireUp(NewValue);
        }
    };

    var domGenerator = {
        "labelDOM": function labelDOM() {
            if (label.length === 0) {
                return null;
            }

            return React.createElement(
                "label",
                {
                    id: "label-for-" + name,
                    htmlFor: name,
                    className: "input-label",
                    "aria-label": label
                },
                label
            );
        }
    };

    React.useEffect(function () {
        if (autoGrowing) {
            domRef.current.style.height = "auto";
            domRef.current.style.height = domRef.current.scrollHeight + "px";
        }
    }, [value]);

    return React.createElement(
        "div",
        {
            className: "input-box text-area",
            componentname: "TextArea"
        },
        domGenerator.labelDOM(),
        React.createElement(document.kNextReactComponents.Icon, {
            iconClassName: "fa fa-exclamation-triangle",
            additionalClasses: "error-icon " + (errorMessage.length === 0 ? "hidden" : ""),
            "aria-hidden": errorMessage.length === 0
        }),
        React.createElement(
            "span",
            {
                id: "error-for-" + name,
                className: "input-error-message",
                "aria-label": errorMessage
            },
            errorMessage
        ),
        React.createElement("textarea", {
            id: name,
            name: name,
            rows: rows,
            cols: cols,
            value: value,
            className: "input text-area " + className + " " + (resizeable ? "resizable" : "") + " " + (errorMessage.length > 0 ? "input-error" : ""),
            placeholder: placeholder,
            minLength: minLength,
            maxLength: maxLength,
            readOnly: readOnly,
            ref: domRef,
            onKeyDown: onKeyDownWireUp,
            onChange: function onChange(Event) {
                return onChangeWireUp(Event.target.value);
            },
            onBlur: function onBlur(Event) {
                return onBlurWireUp(Event.target.value);
            },
            role: "textarea",
            "aria-required": required,
            "aria-invalid": errorMessage.length > 0,
            "aria-placeholder": placeholder,
            "aria-multiline": true,
            "aria-readonly": readOnly,
            "aria-disabled": disabled,
            "aria-label": "" + name + (errorMessage.length > 0 ? GetString("str_Aria_inputErrorConjunction") + " " + errorMessage : ""),
            "aria-errormessage": "error-for-" + name,
            "aria-describedby": "error-for-" + name
        })
    );
};;
"use strict";

document.kNextReactComponents.PasswordInput = function (_ref) {
    var _ref$name = _ref.name,
        name = _ref$name === undefined ? null : _ref$name,
        _ref$value = _ref.value,
        value = _ref$value === undefined ? "" : _ref$value,
        _ref$forceErrorMessag = _ref.forceErrorMessage,
        forceErrorMessage = _ref$forceErrorMessag === undefined ? "" : _ref$forceErrorMessag,
        _ref$required = _ref.required,
        required = _ref$required === undefined ? true : _ref$required,
        _ref$minLength = _ref.minLength,
        minLength = _ref$minLength === undefined ? 6 : _ref$minLength,
        _ref$maxLength = _ref.maxLength,
        maxLength = _ref$maxLength === undefined ? null : _ref$maxLength,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? GetString('str_Component_defaultPasswordInput') : _ref$label,
        _ref$placeholder = _ref.placeholder,
        placeholder = _ref$placeholder === undefined ? GetString('str_Component_defaultPasswordInput') : _ref$placeholder,
        _ref$onChangeWireUp = _ref.onChangeWireUp,
        onChangeWireUp = _ref$onChangeWireUp === undefined ? null : _ref$onChangeWireUp,
        _ref$onBlurWireUp = _ref.onBlurWireUp,
        onBlurWireUp = _ref$onBlurWireUp === undefined ? null : _ref$onBlurWireUp,
        _ref$passwordType = _ref.passwordType,
        passwordType = _ref$passwordType === undefined ? PasswordType.UpperAndLowerCaseLetters : _ref$passwordType,
        _ref$skipValidatePass = _ref.skipValidatePassword,
        skipValidatePassword = _ref$skipValidatePass === undefined ? false : _ref$skipValidatePass,
        _ref$displayRedAsteri = _ref.displayRedAsterisk,
        displayRedAsterisk = _ref$displayRedAsteri === undefined ? false : _ref$displayRedAsteri;

    var domGenerator = {
        "passwordValidityLabelsDOM": function passwordValidityLabelsDOM() {
            if (skipValidatePassword) {
                return null;
            }

            var _passwordValidityLabelsDOM = [];
            if (value.length > 0) {
                //check if the value meets the length requirement
                if (value.length < minLength) {
                    _passwordValidityLabelsDOM.push(React.createElement(
                        "p",
                        { key: "minLen" },
                        React.createElement(document.kNextReactComponents.Icon, {
                            iconClassName: "fal fa-times-circle",
                            tabIndex: -1
                        }),
                        "\xA0",
                        GetString("str_CCRARegFormError_Password_MinLength").replace("xx", minLength)
                    ));
                }

                /////NOTE: the first couple of cases doesn't contain a "break" keyword
                ///// we want to intentionally test for the "lower" cases
                /////since the top ones are superset of the lower one
                switch (passwordType) {
                    case PasswordType.AlphaNumericAndSpecialCharacters:
                        if (!Globals.Utilities.hasAtLeastOneSymbol(value)) {
                            _passwordValidityLabelsDOM.push(React.createElement(
                                "p",
                                { key: "symbol" },
                                React.createElement(document.kNextReactComponents.Icon, {
                                    iconClassName: "fal fa-times-circle",
                                    tabIndex: -1
                                }),
                                "\xA0",
                                GetString("str_CCRARegFormError_Password_Symbol")
                            ));
                        }
                    case PasswordType.AlphaNumericCharacters:
                        if (!Globals.Utilities.hasAtLeastOneDigit(value)) {
                            _passwordValidityLabelsDOM.push(React.createElement(
                                "p",
                                { key: "digit" },
                                React.createElement(document.kNextReactComponents.Icon, {
                                    iconClassName: "fal fa-times-circle",
                                    tabIndex: -1
                                }),
                                "\xA0",
                                GetString("str_CCRARegFormError_Password_Digit")
                            ));
                        }
                    case PasswordType.UpperAndLowerCaseLetters:
                    default:
                        if (!Globals.Utilities.hasAtLeastOneUpperCaseCharacter(value)) {
                            _passwordValidityLabelsDOM.push(React.createElement(
                                "p",
                                { key: "upper" },
                                React.createElement(document.kNextReactComponents.Icon, {
                                    iconClassName: "fal fa-times-circle",
                                    tabIndex: -1
                                }),
                                "\xA0",
                                GetString("str_CCRARegFormError_Password_UpperCase")
                            ));
                        }
                        if (!Globals.Utilities.hasAtLeastOneLowerCaseCharacter(value)) {
                            _passwordValidityLabelsDOM.push(React.createElement(
                                "p",
                                { key: "lower" },
                                React.createElement(document.kNextReactComponents.Icon, {
                                    iconClassName: "fal fa-times-circle",
                                    tabIndex: -1
                                }),
                                "\xA0",
                                GetString("str_CCRARegFormError_Password_LowerCase")
                            ));
                        }
                        if (!Globals.Utilities.hasNoInvalidSymbol(value)) {
                            _passwordValidityLabelsDOM.push(React.createElement(
                                "p",
                                { key: "invalidSymbol" },
                                React.createElement(document.kNextReactComponents.Icon, {
                                    iconClassName: "fal fa-times-circle",
                                    tabIndex: -1
                                }),
                                "\xA0",
                                GetString("str_Invalid_Password_Symbol")
                            ));
                        }
                        break;
                }
            }

            if (_passwordValidityLabelsDOM.length === 0) {
                return null;
            } else {
                return React.createElement(
                    "label",
                    {
                        id: "label-for-password",
                        className: "input-label password-info"
                    },
                    _passwordValidityLabelsDOM
                );
            }
        }
    };

    var _errorMessage = "";
    if (forceErrorMessage.length > 0) {
        _errorMessage = forceErrorMessage.trim();
    }

    return React.createElement(
        "div",
        {
            className: "input-box passwordInputStrengthCheckerBox",
            componentname: "PasswordInput"
        },
        React.createElement(document.kNextReactComponents.TextInput, {
            label: label,
            name: name,
            placeholder: placeholder,
            onChangeWireUp: onChangeWireUp,
            onBlurWireUp: onBlurWireUp,
            value: value,
            type: "password",
            required: required,
            errorMessage: _errorMessage,
            maxLength: maxLength,
            className: "input-password",
            displayRedAsterisk: displayRedAsterisk
        }),
        domGenerator.passwordValidityLabelsDOM()
    );
};;
"use strict";

var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();

document.kNextReactComponents.ConfirmPasswordInput = function (_ref) {
    var _ref$name = _ref.name,
        name = _ref$name === undefined ? "" : _ref$name,
        _ref$value = _ref.value,
        value = _ref$value === undefined ? "" : _ref$value,
        _ref$compareWithValue = _ref.compareWithValue,
        compareWithValue = _ref$compareWithValue === undefined ? "" : _ref$compareWithValue,
        _ref$onChangeWireUp = _ref.onChangeWireUp,
        onChangeWireUp = _ref$onChangeWireUp === undefined ? null : _ref$onChangeWireUp,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? "(hd) Confirm password" : _ref$label,
        _ref$placeholder = _ref.placeholder,
        placeholder = _ref$placeholder === undefined ? "" : _ref$placeholder,
        _ref$displayRedAsteri = _ref.displayRedAsterisk,
        displayRedAsterisk = _ref$displayRedAsteri === undefined ? false : _ref$displayRedAsteri,
        _ref$maxLength = _ref.maxLength,
        maxLength = _ref$maxLength === undefined ? null : _ref$maxLength,
        _ref$forceErrorMessag = _ref.forceErrorMessage,
        forceErrorMessage = _ref$forceErrorMessag === undefined ? "" : _ref$forceErrorMessag;

    var _React$useState = React.useState(""),
        _React$useState2 = _slicedToArray(_React$useState, 2),
        errorMessageState = _React$useState2[0],
        setErrorMessageState = _React$useState2[1];

    var eventHandler = {
        "handlePasswordInputBlur": function handlePasswordInputBlur() {
            var _password = compareWithValue.toString();
            var _confirmedPassword = value.toString();

            if (_password !== _confirmedPassword) {
                if (_confirmedPassword.length > 0) {
                    //user entered a mismatched password
                    setErrorMessageState(GetString("str_CCRARegFormError_ValuesMustMatch"));
                } else {
                    //user clicked on the textbox but didn't enter anything
                    setErrorMessageState(GetString("str_CCRARegFormError_ConfirmPassword"));
                }
            } else {
                setErrorMessageState("");
            }
        }
    };

    var _errorMessage = errorMessageState;
    if (forceErrorMessage.length > 0) {
        _errorMessage = forceErrorMessage.trim();
    }

    return React.createElement(
        "div",
        {
            className: "password-input-container",
            componentname: "ConfirmPasswordInput"
        },
        React.createElement(document.kNextReactComponents.TextInput, {
            name: name,
            label: label,
            value: value,
            placeholder: placeholder,
            onChangeWireUp: onChangeWireUp,
            onBlurWireUp: eventHandler.handlePasswordInputBlur,
            type: "password",
            errorMessage: _errorMessage,
            maxLength: maxLength,
            className: "input-password",
            displayRedAsterisk: displayRedAsterisk
        })
    );
};;
"use strict";

var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();

document.kNextReactComponents.Pagination = function (_ref) {
    var _ref$displaySkipButto = _ref.displaySkipButton,
        displaySkipButton = _ref$displaySkipButto === undefined ? true : _ref$displaySkipButto,
        _ref$current = _ref.current,
        current = _ref$current === undefined ? 1 : _ref$current,
        _ref$step = _ref.step,
        step = _ref$step === undefined ? 5 : _ref$step,
        _ref$total = _ref.total,
        total = _ref$total === undefined ? 1 : _ref$total,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp;

    var _React$useState = React.useState(0),
        _React$useState2 = _slicedToArray(_React$useState, 2),
        startPageNumState = _React$useState2[0],
        setStartPageNumState = _React$useState2[1];

    var _React$useState3 = React.useState(0),
        _React$useState4 = _slicedToArray(_React$useState3, 2),
        endPageNumState = _React$useState4[0],
        setEndPageNumState = _React$useState4[1];

    React.useEffect(function () {
        var _startPageNum = Math.floor((current - 1) / step) * step + 1;
        setStartPageNumState(_startPageNum);

        var _endPageNum = _startPageNum + step - 1;
        if (_endPageNum > total) {
            _endPageNum = total;
        }
        setEndPageNumState(_endPageNum);
    }, [current, step, total]);

    var helperFunction = {
        "isPreviousSkipButtonEnabled": function isPreviousSkipButtonEnabled() {
            return current > step;
        },
        "isNextSkipButtonEnabled": function isNextSkipButtonEnabled() {
            return endPageNumState < total;
        },
        "isPreviousPageButtonEnabled": function isPreviousPageButtonEnabled() {
            return current > 1;
        },
        "isNextPageButtonEnabled": function isNextPageButtonEnabled() {
            return current < total;
        }
    };

    var eventHandler = {
        "handlePreviousSkipButtonClick": function handlePreviousSkipButtonClick() {
            if (helperFunction.isPreviousSkipButtonEnabled()) {
                var _newPageNum = (Math.floor(current / step) - 1) * step + 1;
                onClickWireUp(_newPageNum);
            }
        },
        "handlePreviousSkipButtonKeyPress": function handlePreviousSkipButtonKeyPress(Event) {
            if (Event.key === "Enter") {
                eventHandler.handlePreviousSkipButtonClick();
            }
        },
        "handlePreviousPageButtonClick": function handlePreviousPageButtonClick() {
            if (helperFunction.isPreviousPageButtonEnabled()) {
                onClickWireUp(current - 1);
            }
        },
        "handlePreviousPageButtonKeyPress": function handlePreviousPageButtonKeyPress(Event) {
            if (Event.key === "Enter") {
                eventHandler.handlePreviousPageButtonClick();
            }
        },
        "handleNextSkipButtonClick": function handleNextSkipButtonClick() {
            if (helperFunction.isNextSkipButtonEnabled()) {
                onClickWireUp(endPageNumState + 1);
            }
        },
        "handleNextSkipButtonKeyPress": function handleNextSkipButtonKeyPress(Event) {
            if (Event.key === "Enter") {
                eventHandler.handleNextSkipButtonClick();
            }
        },
        "handleNextPageButtonClick": function handleNextPageButtonClick() {
            if (helperFunction.isNextPageButtonEnabled()) {
                onClickWireUp(current + 1);
            }
        },
        "handleNextPageButtonKeyPress": function handleNextPageButtonKeyPress(Event) {
            if (Event.key === "Enter") {
                eventHandler.handleNextPageButtonClick();
            }
        },
        "handlePageNumButtonKeyPress": function handlePageNumButtonKeyPress(Event, PageNum) {
            if (Event.key === "Enter") {
                onClickWireUp(PageNum);
            }
        }
    };

    var domGenerator = {
        "previousSkipButtonDOM": function previousSkipButtonDOM() {
            if (!displaySkipButton) {
                return null;
            }

            return React.createElement(
                "li",
                {
                    "aria-label": GetString("str_Pagination_SkipToPreviousPages").replace("<num>", step),
                    className: "page-item " + (helperFunction.isPreviousSkipButtonEnabled() ? "" : "disabled"),
                    onClick: eventHandler.handlePreviousSkipButtonClick,
                    tabIndex: helperFunction.isPreviousSkipButtonEnabled() ? 0 : -1,
                    onKeyPress: eventHandler.handlePreviousSkipButtonKeyPress
                },
                React.createElement(
                    "a",
                    { className: "page-link" },
                    React.createElement(document.kNextReactComponents.Icon, {
                        iconClassName: "fas fa-chevron-double-left",
                        tabIndex: -1
                    })
                )
            );
        },
        "nextSkipButtonDOM": function nextSkipButtonDOM() {
            if (!displaySkipButton) {
                return null;
            }

            return React.createElement(
                "li",
                {
                    "aria-label": GetString("str_Pagination_SkipToNextPages").replace("<num>", step),
                    className: "page-item " + (helperFunction.isNextSkipButtonEnabled() ? "" : "disabled"),
                    onClick: eventHandler.handleNextSkipButtonClick,
                    tabIndex: helperFunction.isNextSkipButtonEnabled() ? 0 : -1,
                    onKeyPress: eventHandler.handleNextSkipButtonKeyPress
                },
                React.createElement(
                    "a",
                    { className: "page-link" },
                    React.createElement(document.kNextReactComponents.Icon, {
                        iconClassName: "fas fa-chevron-double-right",
                        tabIndex: -1
                    })
                )
            );
        },
        "previousPageButtonDOM": function previousPageButtonDOM() {
            return React.createElement(
                "li",
                {
                    "aria-label": GetString("str_Pagination_PreviousPage"),
                    className: "page-item " + (helperFunction.isPreviousPageButtonEnabled() ? "" : "disabled"),
                    onClick: eventHandler.handlePreviousPageButtonClick,
                    tabIndex: helperFunction.isPreviousPageButtonEnabled() ? 0 : -1,
                    onKeyPress: eventHandler.handlePreviousPageButtonKeyPress
                },
                React.createElement(
                    "a",
                    { className: "page-link" },
                    React.createElement(document.kNextReactComponents.Icon, {
                        iconClassName: "fas fa-chevron-left",
                        tabIndex: -1
                    })
                )
            );
        },
        "nextPageButtonDOM": function nextPageButtonDOM() {
            return React.createElement(
                "li",
                {
                    "aria-label": GetString("str_Pagination_NextPage"),
                    className: "page-item " + (helperFunction.isNextPageButtonEnabled() ? "" : "disabled"),
                    onClick: eventHandler.handleNextPageButtonClick,
                    tabIndex: helperFunction.isNextPageButtonEnabled() ? 0 : -1,
                    onKeyPress: eventHandler.handleNextPageButtonKeyPress
                },
                React.createElement(
                    "a",
                    { className: "page-link" },
                    React.createElement(document.kNextReactComponents.Icon, {
                        iconClassName: "fas fa-chevron-right",
                        tabIndex: -1
                    })
                )
            );
        },
        "pageNumButtonsDOM": function pageNumButtonsDOM() {
            var _pageNumButtonsDOM = [];

            var _loop = function _loop(_pageNum) {
                _pageNumButtonsDOM.push(React.createElement(
                    "li",
                    {
                        key: _pageNum,
                        className: "page-item " + (_pageNum === current ? "active" : ""),
                        onClick: function onClick() {
                            return onClickWireUp(_pageNum);
                        },
                        "aria-label": GetString("str_Pagination_PageNumber").replace("<num>", _pageNum),
                        tabIndex: 0,
                        onKeyPress: function onKeyPress(Event) {
                            return eventHandler.handlePageNumButtonKeyPress(Event, _pageNum);
                        }
                    },
                    React.createElement(
                        "a",
                        { className: "page-link" },
                        _pageNum
                    )
                ));
            };

            for (var _pageNum = startPageNumState; _pageNum <= endPageNumState; _pageNum++) {
                _loop(_pageNum);
            }
            return _pageNumButtonsDOM;
        }
    };

    if (total <= 1) {
        return null;
    }

    return React.createElement(
        "nav",
        {
            className: "table-pagination",
            componentname: "Pagination"
        },
        React.createElement(
            "ul",
            { className: "pagination" },
            domGenerator.previousSkipButtonDOM(),
            domGenerator.previousPageButtonDOM(),
            domGenerator.pageNumButtonsDOM(),
            domGenerator.nextPageButtonDOM(),
            domGenerator.nextSkipButtonDOM()
        )
    );
};;
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

document.kNextReactComponents.Table = function (_ref) {
    var _ref$tableRows = _ref.tableRows,
        tableRows = _ref$tableRows === undefined ? [] : _ref$tableRows,
        _ref$numOfRows = _ref.numOfRows,
        numOfRows = _ref$numOfRows === undefined ? 0 : _ref$numOfRows,
        _ref$stickyHeader = _ref.stickyHeader,
        stickyHeader = _ref$stickyHeader === undefined ? false : _ref$stickyHeader,
        _ref$tableResponsive = _ref.tableResponsive,
        tableResponsive = _ref$tableResponsive === undefined ? true : _ref$tableResponsive,
        _ref$tableColumnMappi = _ref.tableColumnMapping,
        tableColumnMapping = _ref$tableColumnMappi === undefined ? null : _ref$tableColumnMappi,
        _ref$showPagination = _ref.showPagination,
        showPagination = _ref$showPagination === undefined ? false : _ref$showPagination,
        _ref$currentPageNum = _ref.currentPageNum,
        currentPageNum = _ref$currentPageNum === undefined ? 1 : _ref$currentPageNum,
        _ref$maxPaginationSte = _ref.maxPaginationSteps,
        maxPaginationSteps = _ref$maxPaginationSte === undefined ? 10 : _ref$maxPaginationSte,
        _ref$pageSize = _ref.pageSize,
        pageSize = _ref$pageSize === undefined ? 25 : _ref$pageSize,
        _ref$paginationPositi = _ref.paginationPosition,
        paginationPosition = _ref$paginationPositi === undefined ? TablePaginationPosition.Bottom : _ref$paginationPositi,
        _ref$displayPaginatio = _ref.displayPaginationSkipButton,
        displayPaginationSkipButton = _ref$displayPaginatio === undefined ? false : _ref$displayPaginatio,
        _ref$uniqueIdField = _ref.uniqueIdField,
        uniqueIdField = _ref$uniqueIdField === undefined ? null : _ref$uniqueIdField,
        _ref$tabIndex = _ref.tabIndex,
        tabIndex = _ref$tabIndex === undefined ? 0 : _ref$tabIndex,
        _ref$striped = _ref.striped,
        striped = _ref$striped === undefined ? true : _ref$striped,
        _ref$bordered = _ref.bordered,
        bordered = _ref$bordered === undefined ? true : _ref$bordered,
        _ref$alternateRowColo = _ref.alternateRowColor,
        alternateRowColor = _ref$alternateRowColo === undefined ? true : _ref$alternateRowColo,
        _ref$tableHeaderStyle = _ref.tableHeaderStyle,
        tableHeaderStyle = _ref$tableHeaderStyle === undefined ? TableHeaderStyle.Default : _ref$tableHeaderStyle,
        _ref$filterInputPlace = _ref.filterInputPlaceholder,
        filterInputPlaceholder = _ref$filterInputPlace === undefined ? GetString('str_Component_placeholderTable') : _ref$filterInputPlace,
        _ref$filterable = _ref.filterable,
        filterable = _ref$filterable === undefined ? false : _ref$filterable,
        _ref$filterText = _ref.filterText,
        filterText = _ref$filterText === undefined ? "" : _ref$filterText,
        _ref$notFoundText = _ref.notFoundText,
        notFoundText = _ref$notFoundText === undefined ? GetString('str_Component_errorNotFoundText') : _ref$notFoundText,
        _ref$sortable = _ref.sortable,
        sortable = _ref$sortable === undefined ? false : _ref$sortable,
        _ref$sortedBy = _ref.sortedBy,
        sortedBy = _ref$sortedBy === undefined ? [] : _ref$sortedBy,
        _ref$sortedDirection = _ref.sortedDirection,
        sortedDirection = _ref$sortedDirection === undefined ? {} : _ref$sortedDirection,
        _ref$displayResultsNu = _ref.displayResultsNum,
        displayResultsNum = _ref$displayResultsNu === undefined ? false : _ref$displayResultsNu,
        _ref$topDetailsBarSpa = _ref.topDetailsBarSpace,
        topDetailsBarSpace = _ref$topDetailsBarSpa === undefined ? false : _ref$topDetailsBarSpa,
        _ref$selectable = _ref.selectable,
        selectable = _ref$selectable === undefined ? false : _ref$selectable,
        _ref$selectAllEnabled = _ref.selectAllEnabled,
        selectAllEnabled = _ref$selectAllEnabled === undefined ? false : _ref$selectAllEnabled,
        _ref$onSortClickWireU = _ref.onSortClickWireUp,
        onSortClickWireUp = _ref$onSortClickWireU === undefined ? null : _ref$onSortClickWireU,
        _ref$onSelectRowClick = _ref.onSelectRowClickWireUp,
        onSelectRowClickWireUp = _ref$onSelectRowClick === undefined ? null : _ref$onSelectRowClick,
        _ref$onSelectAllClick = _ref.onSelectAllClickWireUp,
        onSelectAllClickWireUp = _ref$onSelectAllClick === undefined ? null : _ref$onSelectAllClick,
        _ref$onFilterTextChan = _ref.onFilterTextChangeWireUp,
        onFilterTextChangeWireUp = _ref$onFilterTextChan === undefined ? null : _ref$onFilterTextChan,
        _ref$onPageNumClickWi = _ref.onPageNumClickWireUp,
        onPageNumClickWireUp = _ref$onPageNumClickWi === undefined ? null : _ref$onPageNumClickWi;

    var helperFunction = {
        "isSelectAll": function isSelectAll() {
            var _numOfSelectedRows = 0;
            tableRows.forEach(function (_tableRow) {
                if (_tableRow.selected) {
                    _numOfSelectedRows++;
                }
            });

            return _tableRows.length === _numOfSelectedRows;
        }
    };

    var domGenerator = {
        "filterInputDOM": function filterInputDOM() {
            if (!filterable) {
                return null;
            }

            return React.createElement(document.kNextReactComponents.FilterTextBox, {
                inputClassName: 'input table-filter-text',
                label: null,
                required: false,
                onChangeWireUp: onFilterTextChangeWireUp,
                value: filterText,
                placeholder: filterInputPlaceholder,
                leftIconClass: 'far fa-search',
                rightIconClass: 'fa fa-times',
                onRightIconClickWireUp: function onRightIconClickWireUp() {
                    return onFilterTextChangeWireUp("");
                }
            });
        },
        "paginationDOM": function paginationDOM() {
            if (!showPagination) {
                return null;
            }

            return React.createElement(document.kNextReactComponents.Pagination, {
                key: 'pagination',
                current: currentPageNum,
                total: Math.ceil(numOfRows / pageSize),
                step: maxPaginationSteps,
                onClickWireUp: onPageNumClickWireUp,
                displaySkipButton: displayPaginationSkipButton
            });
        },
        "displayResultsNumDOM": function displayResultsNumDOM() {
            if (!displayResultsNum) {
                return null;
            }

            var _startIndex = (currentPageNum - 1) * pageSize + 1;
            var _endIndex = currentPageNum * pageSize;
            _endIndex = _endIndex > numOfRows ? numOfRows : _endIndex;

            return React.createElement(
                'span',
                { key: 'table-results' },
                GetString("str_Table_ResultsNum").replace("<startIndex>", _startIndex).replace("<endIndex>", _endIndex).replace("<totalNumber>", numOfRows.toLocaleString())
            );
        },
        "topDetailsDOM": function topDetailsDOM() {
            return React.createElement(
                'div',
                { className: 'table-top-details' },
                domGenerator.filterInputDOM(),
                React.createElement(
                    'div',
                    { className: 'table-top-bar' },
                    paginationPosition === TablePaginationPosition.Top ? domGenerator.paginationDOM() : null,
                    domGenerator.displayResultsNumDOM()
                )
            );
        },
        "tableHeaderDOM": function tableHeaderDOM() {
            //Note: Browser is rendering some random lines for the <th> tag
            //      so we are using <th scope="col"> tag instead

            var _tableHeadersDOM = [];

            //add a "Select" column
            if (selectable) {
                if (selectAllEnabled) {
                    _tableHeadersDOM.push(React.createElement(
                        'td',
                        {
                            className: 'table-header',
                            key: 'select-table-header',
                            scope: 'col'
                        },
                        React.createElement(document.kNextReactComponents.Checkbox, {
                            text: '',
                            checked: helperFunction.isSelectAll(),
                            onClickWireUp: onSelectAllClickWireUp
                        })
                    ));
                } else {
                    _tableHeadersDOM.push(React.createElement('td', {
                        className: 'table-header',
                        key: 'select-table-header',
                        scope: 'col'
                    }));
                }
            }

            //table header mapping

            var _loop = function _loop(_tableColumnKey) {
                var _tableColumn = tableColumnMapping[_tableColumnKey];

                var _tableHeaderText = void 0;
                if ((typeof _tableColumn === 'undefined' ? 'undefined' : _typeof(_tableColumn)) === "object") {
                    _tableHeaderText = _tableColumn.text;
                } else {
                    _tableHeaderText = _tableColumn;
                }

                if (sortable && sortedBy.includes(_tableColumnKey)) {
                    var _tableHeaderClassName2 = "table-header";
                    var _tableHeaderSortIconType = void 0;
                    switch (sortedDirection[_tableColumnKey]) {
                        case SortOrder.Ascending:
                            _tableHeaderClassName2 += " sorted";
                            _tableHeaderSortIconType = IconType.SortUp;
                            break;
                        case SortOrder.Descending:
                            _tableHeaderClassName2 += " sorted-reverse";
                            _tableHeaderSortIconType = IconType.SortDown;
                            break;
                        default:
                            _tableHeaderClassName2 += " sortable";
                            _tableHeaderSortIconType = IconType.Sort;
                            break;
                    }

                    _tableHeadersDOM.push(React.createElement(
                        'td',
                        {
                            className: _tableHeaderClassName2,
                            key: _tableColumnKey,
                            onClick: function onClick() {
                                return onSortClickWireUp(_tableColumnKey);
                            },
                            onKeyDown: function onKeyDown(Event) {
                                if (Event.key === "Enter") {
                                    onSortClickWireUp(_tableColumnKey);
                                }
                            },
                            tabIndex: 0,
                            scope: 'col'
                        },
                        _tableHeaderText,
                        React.createElement(document.kNextReactComponents.Icon, { iconType: _tableHeaderSortIconType })
                    ));
                } else {
                    _tableHeadersDOM.push(React.createElement(
                        'td',
                        {
                            className: 'table-header',
                            key: _tableColumnKey,
                            scope: 'col'
                        },
                        _tableHeaderText
                    ));
                }
            };

            for (var _tableColumnKey in tableColumnMapping) {
                _loop(_tableColumnKey);
            }

            var _tableHeaderClassName = "table-header-box";
            switch (tableHeaderStyle) {
                case TableHeaderStyle.Light:
                    _tableHeaderClassName += " light";
                    break;
                case TableHeaderStyle.Transparent:
                    _tableHeaderClassName += " transparent";
                    break;
                case TableHeaderStyle.Dark:
                    _tableHeaderClassName += " dark";
                    break;
                case TableHeaderStyle.Default:
                default:
                    break;
            }

            return React.createElement(
                'thead',
                null,
                React.createElement(
                    'tr',
                    { className: _tableHeaderClassName },
                    _tableHeadersDOM
                )
            );
        },
        "tableCellIconDOM": function tableCellIconDOM(TableColumnKey, IconProps, TableRow, RowIndex) {
            //IconProps Example Data Structure:
            //{
            //    dataFunc: null
            //}

            var _iconObj = IconProps.dataFunc(TableRow);
            //_iconObj Example Data Structure:
            //{
            //    text: "",
            //    iconType: "",
            //    additionalClasses: "",
            //    onClickFunc: null
            //}

            var _textDOM = null;
            if (!Globals.Utilities.isUndefinedOrNull(_iconObj.text)) {
                _textDOM = React.createElement(
                    'span',
                    { className: 'status-text' },
                    _iconObj.text
                );
            }

            return React.createElement(
                'td',
                {
                    className: 'icon-box',
                    id: 'row-' + RowIndex + '-icon-box-' + TableColumnKey,
                    key: TableColumnKey,
                    onClick: _iconObj.onClickFunc
                },
                React.createElement(document.kNextReactComponents.Icon, {
                    iconType: _iconObj.iconType,
                    additionalClasses: _iconObj.additionalClasses
                }),
                _textDOM
            );
        },
        "tableCellLinkDOM": function tableCellLinkDOM(TableColumnKey, LinkProps, TableRow, RowIndex) {
            //LinkProps Example Data Structure:
            //{
            //    dataFunc: null
            //}

            var _linkObj = LinkProps.dataFunc(TableRow);
            //_linkObj Example Data Structure:
            //{
            //    link: "",
            //    text: ""
            //}

            return React.createElement(
                'td',
                {
                    className: 'link',
                    id: 'row-' + RowIndex + '-link-' + TableColumnKey,
                    key: TableColumnKey
                },
                React.createElement(document.kNextReactComponents.Link, {
                    link: _linkObj.link,
                    text: _linkObj.text
                })
            );
        },
        "tableCellStatusBallDOM": function tableCellStatusBallDOM(TableColumnKey, StatusBallProps, TableRow, RowIndex) {
            //StatusBallProps Example Data Structure:
            //{
            //    dataFunc: null
            //}

            var _statusBallObj = StatusBallProps.dataFunc(TableRow);
            //_statusBallObj Example Data Structure:
            //{
            //    hidden: false,
            //    text: "",
            //    color: ""
            //}

            if (_statusBallObj.hidden) {
                return React.createElement('td', {
                    id: 'row-' + RowIndex + '-status-ball-box-' + TableColumnKey,
                    key: TableColumnKey
                });
            } else {
                var _textDOM = null;
                if (!Globals.Utilities.isUndefinedOrNull(_statusBallObj.text)) {
                    _textDOM = React.createElement(
                        'span',
                        { className: 'status-text' },
                        _statusBallObj.text
                    );
                }

                return React.createElement(
                    'td',
                    {
                        className: 'status-ball-box',
                        id: 'row-' + RowIndex + '-status-ball-box-' + TableColumnKey,
                        key: TableColumnKey
                    },
                    React.createElement(document.kNextReactComponents.Icon, {
                        additionalClasses: 'status-' + _statusBallObj.color,
                        iconType: IconType.Circle
                    }),
                    _textDOM
                );
            }
        },
        "tableCellHTMLStringDOM": function tableCellHTMLStringDOM(TableColumnKey, TableRow, RowIndex) {
            return React.createElement('td', {
                id: 'row-' + RowIndex + '-html-string-' + TableColumnKey,
                key: TableColumnKey,
                dangerouslySetInnerHTML: { __html: TableRow[TableColumnKey] }
            });
        },
        "tableCellTextDOM": function tableCellTextDOM(TableColumnKey, TableRow, RowIndex) {
            var _text = void 0;
            if (typeof TableRow[TableColumnKey] == "string") {
                _text = TableRow[TableColumnKey];
            } else {
                _text = JSON.stringify(TableRow[TableColumnKey]);
            }

            return React.createElement(
                'td',
                {
                    id: 'row-' + RowIndex + '-text-' + TableColumnKey,
                    key: TableColumnKey
                },
                _text
            );
        },
        "tableBodyDOM": function tableBodyDOM() {
            var _tableRowsDOM = tableRows.map(function (_tableRow, _rowIndex) {
                var _tableCellsDOM = [];

                //add a "Select" column
                if (selectable) {
                    _tableCellsDOM.push(React.createElement(
                        'td',
                        {
                            className: 'select-checkbox',
                            key: 'select-checkbox'
                        },
                        React.createElement(document.kNextReactComponents.Checkbox, {
                            text: '',
                            checked: _tableRow.selected,
                            onClickWireUp: function onClickWireUp() {
                                return onSelectRowClickWireUp(_rowIndex, _tableRow);
                            }
                        })
                    ));
                }

                //column data mapping
                for (var _tableColumnKey in tableColumnMapping) {
                    var _tableCellComponentSpec = tableColumnMapping[_tableColumnKey].componentSpec;
                    //_tableCellComponentSpec Example Data Structure:
                    //{
                    //    type: _tableCellComponentSpec.Icon,
                    //    props: {}
                    //}

                    if (!Globals.Utilities.isUndefinedOrNull(_tableCellComponentSpec)) {
                        //render icon / link / status ball
                        switch (_tableCellComponentSpec.type) {
                            case TableCellComponentSpecType.Icon:
                                _tableCellsDOM.push(domGenerator.tableCellIconDOM(_tableColumnKey, _tableCellComponentSpec.props, _tableRow, _rowIndex));
                                break;
                            case TableCellComponentSpecType.Link:
                                _tableCellsDOM.push(domGenerator.tableCellLinkDOM(_tableColumnKey, _tableCellComponentSpec.props, _tableRow, _rowIndex));
                                break;
                            case TableCellComponentSpecType.StatusBall:
                                _tableCellsDOM.push(domGenerator.tableCellStatusBallDOM(_tableColumnKey, _tableCellComponentSpec.props, _tableRow, _rowIndex));
                                break;
                        }
                    } else if (tableColumnMapping[_tableColumnKey].dangerouslyEscapeString) {
                        //render HTML string
                        _tableCellsDOM.push(domGenerator.tableCellHTMLStringDOM(_tableColumnKey, _tableRow, _rowIndex));
                    } else {
                        //render as string
                        _tableCellsDOM.push(domGenerator.tableCellTextDOM(_tableColumnKey, _tableRow, _rowIndex));
                    }
                }

                return React.createElement(
                    'tr',
                    {
                        id: 'table-row-' + _tableRow[uniqueIdField],
                        key: _tableRow[uniqueIdField],
                        scope: 'row'
                    },
                    _tableCellsDOM
                );
            });

            return React.createElement(
                'tbody',
                null,
                _tableRowsDOM
            );
        },
        "tableDOM": function tableDOM() {
            if (tableRows.length === 0) {
                return React.createElement(
                    'div',
                    { className: 'table-not-found' },
                    React.createElement('br', null),
                    React.createElement(
                        'p',
                        null,
                        notFoundText
                    )
                );
            }

            var _tableBoxClassName = "table-box";
            if (tableResponsive) {
                _tableBoxClassName += " table-responsive";
            }
            if (topDetailsBarSpace) {
                _tableBoxClassName += " extra-space";
            }

            var _tableClassName = "table";
            if (striped) {
                _tableClassName += " table-striped";
            }
            if (bordered) {
                _tableClassName += " table-bordered";
            }
            if (stickyHeader) {
                _tableClassName += " sticky-header";
            }
            if (alternateRowColor) {
                _tableClassName += " alternating-color";
            }

            return React.createElement(
                'div',
                { className: _tableBoxClassName },
                React.createElement(
                    'table',
                    {
                        tabIndex: tabIndex,
                        className: _tableClassName
                    },
                    domGenerator.tableHeaderDOM(),
                    domGenerator.tableBodyDOM()
                )
            );
        }
    };

    return React.createElement(
        'div',
        { componentname: 'Table' },
        domGenerator.topDetailsDOM(),
        domGenerator.tableDOM(),
        paginationPosition === TablePaginationPosition.Bottom ? domGenerator.paginationDOM() : null
    );
};;
"use strict";

document.kNextReactComponents.ContentBox = function (_ref) {
    var _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$id = _ref.id,
        id = _ref$id === undefined ? null : _ref$id,
        _ref$domRef = _ref.domRef,
        domRef = _ref$domRef === undefined ? null : _ref$domRef,
        _ref$expandPanelStyle = _ref.expandPanelStyle,
        expandPanelStyle = _ref$expandPanelStyle === undefined ? ExpandPanelStyle.Arrow : _ref$expandPanelStyle,
        _ref$expandable = _ref.expandable,
        expandable = _ref$expandable === undefined ? true : _ref$expandable,
        _ref$expanded = _ref.expanded,
        expanded = _ref$expanded === undefined ? false : _ref$expanded,
        _ref$headerDOM = _ref.headerDOM,
        _headerDOM = _ref$headerDOM === undefined ? null : _ref$headerDOM,
        _ref$titleRole = _ref.titleRole,
        titleRole = _ref$titleRole === undefined ? null : _ref$titleRole,
        _ref$titleAriaLevel = _ref.titleAriaLevel,
        titleAriaLevel = _ref$titleAriaLevel === undefined ? null : _ref$titleAriaLevel,
        _ref$title = _ref.title,
        title = _ref$title === undefined ? null : _ref$title,
        _ref$children = _ref.children,
        children = _ref$children === undefined ? null : _ref$children,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$role = _ref.role,
        role = _ref$role === undefined ? "button" : _ref$role,
        _ref$tabIndex = _ref.tabIndex,
        tabIndex = _ref$tabIndex === undefined ? 0 : _ref$tabIndex,
        _ref$iconTabIndex = _ref.iconTabIndex,
        iconTabIndex = _ref$iconTabIndex === undefined ? -1 : _ref$iconTabIndex;

    var eventHandler = {
        "handleBoxHeaderKeyPress": function handleBoxHeaderKeyPress(Event) {
            //if they press enter or spacebar
            if ((Event.key === "Enter" || Event.keyCode === 32) && typeof onClickWireUp === "function") {
                onClickWireUp(Event);
            }
        }
    };

    var domGenerator = {
        "headerDOM": function headerDOM() {
            var _headerContentDOM = null;

            if (!Globals.Utilities.isUndefinedOrNull(_headerDOM)) {
                _headerContentDOM = _headerDOM;
            }

            var _contentSectionID = null;
            if (!Globals.Utilities.isUndefinedOrNull(id)) {
                _contentSectionID = id + "_contentSection";
            }

            var _expandedIcon = "";
            var _minimizedIcon = "";
            switch (expandPanelStyle) {
                case ExpandPanelStyle.PlusMinus:
                    _expandedIcon = IconType.Minus;
                    _minimizedIcon = IconType.Add;
                    break;
                case ExpandPanelStyle.Arrow:
                default:
                    _expandedIcon = IconType.ArrowUp;
                    _minimizedIcon = IconType.ArrowDown;
            }

            var iconDOM = null;
            var onBoxHeaderClickFunc = null;
            var onBoxHeaderKeyPressFunc = null;
            if (expandable) {
                var expandIcon = expanded ? _expandedIcon : _minimizedIcon;
                iconDOM = React.createElement(document.kNextReactComponents.Icon, {
                    iconType: expandIcon,
                    tabIndex: iconTabIndex
                });

                onBoxHeaderClickFunc = onClickWireUp;
                onBoxHeaderKeyPressFunc = eventHandler.handleBoxHeaderKeyPress;
            }

            _headerContentDOM = React.createElement(
                React.Fragment,
                null,
                React.createElement(
                    "span",
                    {
                        role: titleRole,
                        "aria-level": titleAriaLevel
                    },
                    title
                ),
                iconDOM
            );

            return React.createElement(
                "div",
                {
                    className: "box-header",
                    onClick: onBoxHeaderClickFunc,
                    tabIndex: tabIndex,
                    onKeyPress: onBoxHeaderKeyPressFunc,
                    ref: domRef,
                    "aria-expanded": expanded,
                    "aria-controls": _contentSectionID,
                    "aria-label": title,
                    id: id,
                    role: role
                },
                _headerContentDOM
            );
        },
        "contentBodyDOM": function contentBodyDOM() {
            if (!expanded) {
                return null;
            }

            var _contentSectionID = null;
            if (!Globals.Utilities.isUndefinedOrNull(id)) {
                _contentSectionID = id + "_contentSection";
            }

            return React.createElement(
                "div",
                {
                    className: "content-box-body",
                    tabIndex: tabIndex,
                    role: "region",
                    id: _contentSectionID,
                    "aria-labelledby": id
                },
                children
            );
        }
    };

    var _componentClassName = "content-box " + className;
    if (expanded) {
        _componentClassName += " selected";
    }

    return React.createElement(
        "div",
        {
            className: _componentClassName,
            componentname: "ContentBox"
        },
        domGenerator.headerDOM(),
        domGenerator.contentBodyDOM()
    );
};;
"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

document.kNextReactComponents.UnorderedList = function (_ref) {
    var _ref$itemList = _ref.itemList,
        itemList = _ref$itemList === undefined ? [] : _ref$itemList,
        _ref$bulletStyle = _ref.bulletStyle,
        bulletStyle = _ref$bulletStyle === undefined ? BulletStyle.Arrow : _ref$bulletStyle,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp;

    var domGenerator = {
        "listItemsDOM": function listItemsDOM() {
            var _listItemsDOM = [];

            itemList.forEach(function (_item, _index) {
                var _itemDOM = [];

                if ((typeof _item === "undefined" ? "undefined" : _typeof(_item)) === "object" && "link" in _item) {
                    //if the list item is a link
                    var _external = !Globals.Utilities.isUndefinedOrNull(_item["external"]) ? _item["external"] : false;
                    var _showExternalIcon = _external && _item["showExternalIcon"];

                    var _onClickFunc = null;
                    if (!Globals.Utilities.isUndefinedOrNull(onClickWireUp) && !Globals.Utilities.isUndefinedOrNull(_item.id) && !_item.preventClick) {
                        _onClickFunc = function _onClickFunc() {
                            onClickWireUp(_item.id);
                        };
                    }

                    _itemDOM.push(React.createElement(document.kNextReactComponents.Link, {
                        onClickWireUp: _onClickFunc,
                        key: "link",
                        className: _item.className,
                        link: _item.link,
                        text: _item.text,
                        tooltip: _item.tooltip,
                        external: _external,
                        showExternalIcon: _showExternalIcon
                    }));
                } else {
                    _itemDOM.push(React.createElement(
                        "span",
                        { key: "text" },
                        _item
                    ));
                }

                if ((typeof _item === "undefined" ? "undefined" : _typeof(_item)) === "object" && !Globals.Utilities.isUndefinedOrNull(_item["descriptionText"])) {
                    _itemDOM.push(React.createElement(
                        "div",
                        {
                            key: "description-text",
                            className: "description-text"
                        },
                        _item.descriptionText
                    ));
                }

                _listItemsDOM.push(React.createElement(
                    "li",
                    {
                        className: "list-item",
                        key: _index
                    },
                    _itemDOM
                ));
            });

            return _listItemsDOM;
        }
    };

    var _listClassName = void 0;
    switch (bulletStyle) {
        case BulletStyle.Square:
            _listClassName = "square-bullet";
            break;
        case BulletStyle.Circle:
            _listClassName = "circle-bullet";
            break;
        case BulletStyle.None:
            _listClassName = "no-bullet";
            break;
        case BulletStyle.Arrow:
        default:
            _listClassName = "arrow-bullet";
    }

    return React.createElement(
        "div",
        {
            className: "input-group unordered-list",
            componentname: "UnorderedList"
        },
        React.createElement(
            "ul",
            { className: _listClassName },
            domGenerator.listItemsDOM()
        )
    );
};;
"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

document.kNextReactComponents.Checkbox = function (_ref) {
    var _ref$checked = _ref.checked,
        checked = _ref$checked === undefined ? false : _ref$checked,
        _ref$valuesCanBeParti = _ref.valuesCanBePartial,
        valuesCanBePartial = _ref$valuesCanBeParti === undefined ? false : _ref$valuesCanBeParti,
        _ref$text = _ref.text,
        text = _ref$text === undefined ? null : _ref$text,
        _ref$additionalText = _ref.additionalText,
        additionalText = _ref$additionalText === undefined ? null : _ref$additionalText,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$tabIndex = _ref.tabIndex,
        tabIndex = _ref$tabIndex === undefined ? 0 : _ref$tabIndex,
        _ref$descriptionText = _ref.descriptionText,
        descriptionText = _ref$descriptionText === undefined ? null : _ref$descriptionText,
        _ref$domRef = _ref.domRef,
        domRef = _ref$domRef === undefined ? null : _ref$domRef,
        _ref$onKeyDownWireUp = _ref.onKeyDownWireUp,
        onKeyDownWireUp = _ref$onKeyDownWireUp === undefined ? null : _ref$onKeyDownWireUp,
        _ref$checkboxID = _ref.checkboxID,
        checkboxID = _ref$checkboxID === undefined ? null : _ref$checkboxID,
        _ref$disabled = _ref.disabled,
        disabled = _ref$disabled === undefined ? false : _ref$disabled,
        _ref$checkBoxStyle = _ref.checkBoxStyle,
        checkBoxStyle = _ref$checkBoxStyle === undefined ? null : _ref$checkBoxStyle;

    var eventHandler = {
        "handleKeyDown": function handleKeyDown(Event) {
            if (typeof onKeyDownWireUp === "function") {
                onKeyDownWireUp(Event);
            }

            switch (Event.keyCode) {
                case 32:
                    //spacebar
                    if (typeof onClickWireUp === "function") {
                        onClickWireUp();
                    }
            }
        }
    };

    var domGenerator = {
        "labelBoxDOM": function labelBoxDOM() {
            var _checkboxHTMLfor = null;
            var _checkboxLabelID = null;
            if (!Globals.Utilities.isUndefinedOrNull(checkboxID)) {
                _checkboxHTMLfor = "chk-" + checkboxID;
                _checkboxLabelID = "chk-label-" + checkboxID;
            }

            var _labelDOM = React.createElement(
                "label",
                {
                    id: _checkboxLabelID,
                    htmlFor: _checkboxHTMLfor,
                    key: checkboxID
                },
                text,
                " ",
                additionalText
            );

            var _labelBoxDOM = null;
            //render the description if it was provided
            if (typeof descriptionText === "string" && descriptionText.length > 0) {
                _labelBoxDOM = React.createElement(
                    "div",
                    { className: "label-box" },
                    _labelDOM,
                    React.createElement(
                        "span",
                        { className: "description beside-label" },
                        "\xA0\u2014\xA0",
                        descriptionText
                    )
                );
            } else if (!Globals.Utilities.isUndefinedOrNull(descriptionText) && (typeof descriptionText === "undefined" ? "undefined" : _typeof(descriptionText)) === "object") {
                _labelBoxDOM = React.createElement(
                    "label",
                    {
                        id: _checkboxLabelID,
                        htmlFor: _checkboxHTMLfor,
                        key: checkboxID
                    },
                    text,
                    " ",
                    descriptionText.children
                );
            } else {
                _labelBoxDOM = _labelDOM;
            }

            return _labelBoxDOM;
        },
        "checkboxIconDOM": function checkboxIconDOM() {
            var _checkboxLabelID = null;
            if (!Globals.Utilities.isUndefinedOrNull(checkboxID)) {
                _checkboxLabelID = "chk-label-" + checkboxID;
            }

            //check marker styles and checked status
            var _checkMarkClassName = void 0;
            var _ariaChecked = false;
            if (valuesCanBePartial) {
                switch (checked) {
                    case NodeCheckedStatusType.CHECKED:
                        _checkMarkClassName = "fad fa-check-square checked";
                        _ariaChecked = true;
                        break;
                    case NodeCheckedStatusType.PARTIALLY_CHECKED:
                        _checkMarkClassName = "fad fa-check-square partial";
                        _ariaChecked = true;
                        break;
                    default:
                    case NodeCheckedStatusType.UNCHECKED:
                        _checkMarkClassName = "fal fa-square unchecked";
                        break;
                }
            } else {
                _checkMarkClassName = checked === true ? "fad fa-check-square checked" : "fal fa-square unchecked";
                _ariaChecked = checked;
            }

            var _onClickFunc = null;
            var _checkboxTabIndex = -1;
            if (!disabled) {
                _onClickFunc = onClickWireUp;
                _checkboxTabIndex = tabIndex;
            }

            var _checkboxIconDOM = React.createElement("i", {
                role: "checkbox",
                id: "checkbox-id-" + checkboxID,
                className: disabled ? "fal fa-ban" : _checkMarkClassName,
                "aria-disabled": disabled,
                "aria-checked": _ariaChecked,
                "aria-labelledby": _checkboxLabelID,
                "aria-label": checkboxID,
                tabIndex: _checkboxTabIndex,
                onKeyDown: eventHandler.handleKeyDown,
                onClick: _onClickFunc,
                ref: domRef
            });
            if (disabled) {
                _checkboxIconDOM = React.createElement(
                    "span",
                    { className: "fa-stack checkbox-disabled-icon" },
                    React.createElement("i", { className: "fa-regular fa-square fa-stack-2x" }),
                    React.createElement("i", { className: "fa-solid fa-slash-back fa-stack-1x" })
                );
            }

            return _checkboxIconDOM;
        }
    };

    //checkbox class name
    var _checkboxClassName = "checkbox select-option " + className + " ";
    switch (checkBoxStyle) {
        case CheckBoxStyle.Secondary:
            _checkboxClassName += "checkbox-secondary";
            break;
        case CheckBoxStyle.Dark:
            _checkboxClassName += "checkbox-dark";
            break;
        case CheckBoxStyle.Primary:
        default:
            _checkboxClassName += "checkbox-primary";
    }

    return React.createElement(
        "span",
        {
            className: "checkbox-container",
            componentname: "Checkbox"
        },
        React.createElement(
            "div",
            { className: _checkboxClassName },
            domGenerator.checkboxIconDOM()
        ),
        domGenerator.labelBoxDOM()
    );
};;
"use strict";

document.kNextReactComponents.Radio = function (_ref) {
    var _ref$name = _ref.name,
        name = _ref$name === undefined ? null : _ref$name,
        _ref$checked = _ref.checked,
        checked = _ref$checked === undefined ? false : _ref$checked,
        _ref$text = _ref.text,
        text = _ref$text === undefined ? null : _ref$text,
        _ref$titleTooltip = _ref.titleTooltip,
        titleTooltip = _ref$titleTooltip === undefined ? null : _ref$titleTooltip,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? null : _ref$className,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$disabled = _ref.disabled,
        disabled = _ref$disabled === undefined ? false : _ref$disabled,
        _ref$descriptionText = _ref.descriptionText,
        descriptionText = _ref$descriptionText === undefined ? "" : _ref$descriptionText,
        _ref$tabIndex = _ref.tabIndex,
        tabIndex = _ref$tabIndex === undefined ? 1 : _ref$tabIndex,
        _ref$radioBoxStyle = _ref.radioBoxStyle,
        radioBoxStyle = _ref$radioBoxStyle === undefined ? RadioBoxStyle.Primary : _ref$radioBoxStyle;

    var eventHandler = {
        "handleIconKeyDown": function handleIconKeyDown(Event) {
            if (Event.keyCode === 32 && !disabled) {
                //spacebar
                onClickWireUp();
            }
        }
    };

    var domGenerator = {
        "radioIconDOM": function radioIconDOM() {
            var _radioClassName = checked ? "fa-solid fa-circle-dot" : "fa-regular fa-circle";
            var _tabIndex = disabled ? -1 : tabIndex;

            var _radioLabelID = null;
            if (!Globals.Utilities.isUndefinedOrNull(name)) {
                _radioLabelID = "radio-label-" + name;
            }

            return React.createElement("i", {
                role: "radio",
                id: name,
                className: _radioClassName,
                "aria-disabled": disabled,
                "aria-checked": checked,
                "aria-labelledby": _radioLabelID,
                tabIndex: -1
            });
        },
        "labelBoxDOM": function labelBoxDOM() {
            var _radioID = null;
            var _radioLabelID = null;
            if (!Globals.Utilities.isUndefinedOrNull(name)) {
                _radioID = "radio-" + name;
                _radioLabelID = "radio-label-" + name;
            }

            var _labelDOM = React.createElement(
                "label",
                {
                    id: _radioLabelID,
                    htmlFor: _radioID,
                    title: titleTooltip
                },
                text
            );

            var _labelBoxDOM = null;
            if (typeof descriptionText === "string" && descriptionText.length > 0) {
                //render the description if it was provided
                _labelBoxDOM = React.createElement(
                    "div",
                    { className: "label-box" },
                    _labelDOM,
                    React.createElement(
                        "span",
                        { className: "description beside-label" },
                        "\xA0\u2014\xA0",
                        descriptionText
                    )
                );
            } else {
                _labelBoxDOM = _labelDOM;
            }

            return _labelBoxDOM;
        }
    };

    var _radioClassName = "radio select-option " + className + " " + (disabled ? "disabled" : "") + " ";
    switch (radioBoxStyle) {
        case RadioBoxStyle.Secondary:
            _radioClassName += "radio-secondary";
            break;
        case RadioBoxStyle.Dark:
            _radioClassName += "radio-dark";
            break;
        case RadioBoxStyle.Primary:
        default:
            _radioClassName += "radio-primary";
    }

    var _onClickFunc = disabled ? null : onClickWireUp;
    var _tabIndex = disabled ? -1 : tabIndex;

    return React.createElement(
        "div",
        {
            className: "radio-box",
            componentname: "Radio"
        },
        React.createElement(
            "div",
            {
                className: _radioClassName,
                onClick: _onClickFunc,
                onKeyDown: eventHandler.handleIconKeyDown,
                tabIndex: _tabIndex
            },
            domGenerator.radioIconDOM()
        ),
        domGenerator.labelBoxDOM()
    );
};;
"use strict";

document.kNextReactComponents.CheckboxList = function (_ref) {
    var _ref$value = _ref.value,
        value = _ref$value === undefined ? {} : _ref$value,
        _ref$valueOrder = _ref.valueOrder,
        valueOrder = _ref$valueOrder === undefined ? [] : _ref$valueOrder,
        _ref$valuesCanBeParti = _ref.valuesCanBePartial,
        valuesCanBePartial = _ref$valuesCanBeParti === undefined ? false : _ref$valuesCanBeParti,
        _ref$error = _ref.error,
        error = _ref$error === undefined ? "" : _ref$error,
        _ref$ulTabIndex = _ref.ulTabIndex,
        ulTabIndex = _ref$ulTabIndex === undefined ? 0 : _ref$ulTabIndex,
        _ref$listItemTabIndex = _ref.listItemTabIndex,
        listItemTabIndex = _ref$listItemTabIndex === undefined ? -1 : _ref$listItemTabIndex,
        _ref$name = _ref.name,
        name = _ref$name === undefined ? null : _ref$name,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? null : _ref$label,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp;

    var checkboxesRef = React.useRef([]);

    var helperFunction = {
        "checkboxGoDown": function checkboxGoDown(Index) {
            //if we are at the end of the list go back to the first element
            if (Index + 1 === Object.keys(value).length) {
                checkboxesRef.current[0].focus();
            } else {
                checkboxesRef.current[Index + 1].focus();
            }
        },
        "checkboxGoUp": function checkboxGoUp(Index) {
            if (Index - 1 >= 0) {
                checkboxesRef.current[Index - 1].focus();
            } else {
                checkboxesRef.current[Object.keys(value).length - 1].focus();
            }
        }
    };

    var eventHandler = {
        "handleCheckboxKeyDown": function handleCheckboxKeyDown(Event, OptionKey, Index) {
            Event.preventDefault();

            switch (Event.keyCode) {
                case 32: //spacebar
                case 13:
                    //enter
                    onClickWireUp(OptionKey);
                    break;
                case 40:
                    //down arrow
                    helperFunction.checkboxGoDown(Index);
                    break;
                case 38:
                    //up arrow
                    helperFunction.checkboxGoUp(Index);
                    break;
                default:
                    return;
            }
        },
        "handleCheckboxListKeyDown": function handleCheckboxListKeyDown(Event) {
            Event.preventDefault();

            //we only do this when the focus is on the ul element
            if (!Event.target.className.includes("select-options-list")) {
                return;
            }

            switch (Event.keyCode) {
                case 40:
                    //down arrow
                    if (checkboxesRef.current.length >= 1) {
                        checkboxesRef.current[0].focus();
                    }
                    break;
                default:
                    return;
            }
        }
    };

    var domGenerator = {
        "errorMessageDOM": function errorMessageDOM() {
            if (error.length === 0) {
                return null;
            }

            return React.createElement(
                "span",
                null,
                React.createElement(document.kNextReactComponents.Icon, {
                    iconClassName: "fa fa-exclamation-triangle",
                    ariaHidden: true
                }),
                React.createElement(
                    "span",
                    { className: "input-error-message" },
                    error
                )
            );
        },
        "checkboxesDOM": function checkboxesDOM() {
            var _valueOrder = valueOrder;
            if (_valueOrder.length === 0) {
                _valueOrder = Object.keys(value);
            }

            var _checkboxesDOM = _valueOrder.map(function (_optionKey, _index) {
                var _ariaChecked = false;
                if (valuesCanBePartial) {
                    switch (value[_optionKey].checked) {
                        case NodeCheckedStatusType.CHECKED:
                            _ariaChecked = true;
                            break;
                        case NodeCheckedStatusType.PARTIALLY_CHECKED:
                            _ariaChecked = true;
                            break;
                        default:
                    }
                } else {
                    _ariaChecked = value[_optionKey].checked;
                }

                return React.createElement(
                    "li",
                    {
                        tabIndex: listItemTabIndex,
                        key: _optionKey,
                        role: "option",
                        "aria-checked": _ariaChecked,
                        ref: function ref(element) {
                            return checkboxesRef.current[_index] = element;
                        },
                        onClick: function onClick() {
                            onClickWireUp(_optionKey);
                        },
                        onKeyDown: function onKeyDown(event) {
                            eventHandler.handleCheckboxKeyDown(event, _optionKey, _index);
                        },
                        className: "list-item"
                    },
                    React.createElement(document.kNextReactComponents.Checkbox, {
                        checked: value[_optionKey].checked,
                        valuesCanBePartial: valuesCanBePartial,
                        text: value[_optionKey].text,
                        descriptionText: value[_optionKey].descriptionText,
                        tabIndex: -1
                    })
                );
            });

            return _checkboxesDOM;
        }
    };

    var _checkboxListID = null;
    var _checkboxListLabelID = null;
    if (!Globals.Utilities.isUndefinedOrNull(name)) {
        _checkboxListID = "chkboxlist-" + name;
        _checkboxListLabelID = "chkboxlist-label-" + name;
    }

    return React.createElement(
        "div",
        {
            className: "input-group checkbox-list",
            componentname: "CheckboxList"
        },
        React.createElement(
            "p",
            { id: _checkboxListID },
            label,
            " ",
            domGenerator.errorMessageDOM()
        ),
        React.createElement(
            "ul",
            {
                id: _checkboxListLabelID,
                role: "listbox",
                "aria-labelledby": _checkboxListID,
                className: "select-options-list no-bullet",
                tabIndex: ulTabIndex,
                onKeyDown: eventHandler.handleCheckboxListKeyDown
            },
            domGenerator.checkboxesDOM()
        )
    );
};;
'use strict';

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

document.kNextReactComponents.FederatedSearchCheckboxList = function (_React$Component) {
    _inherits(FederatedSearchCheckboxList, _React$Component);

    _createClass(FederatedSearchCheckboxList, null, [{
        key: 'defaultProps',


        //NOTE FUTURE: keeping simple for now, can allow specific number of selections in the future if required
        //numSelectedMin: 1,
        //numSelectedMax: 1,
        //NOTE FUTURE: controls max number of options displayed, if more values entered than this then figure out different view for it. (i.e. can make it scrollable after, add filtering, or modal pop-up)
        //maxNumberDisplayed: 5 
        //global error message i.e if they didn't select any
        get: function get() {
            return {
                //mapping of each option to an obj containing it's value and properties (text, checked)
                value: {},
                valueOrder: [],
                //if valuesCanBePartial is true then the checked property is a string of type enum NodeCheckedStatusType
                valuesCanBePartial: false,
                error: false,
                //requires atleast 1 value selected, else throws an error message
                required: true,
                errorRequiredText: GetString('str_Component_errorRequired'),
                name: null, //required
                label: GetString('str_Component_defaultCheckboxList'),
                CheckBoxStyle: CheckBoxStyle.Primary,
                ulTabIndex: 0,
                onClickWireUp: null, //required,
                listItemTabIndex: -1,
                focusFirstElement: false
            };
        }
    }]);

    function FederatedSearchCheckboxList(props) {
        _classCallCheck(this, FederatedSearchCheckboxList);

        var _this = _possibleConstructorReturn(this, (FederatedSearchCheckboxList.__proto__ || Object.getPrototypeOf(FederatedSearchCheckboxList)).call(this, props));

        autobind(_this);

        //maps element indexes to their DOM element ... used for keyboard navigation functionality 
        //such as listening for on up / down arrow key presses
        _this.elementRefs = [];
        return _this;
    }

    _createClass(FederatedSearchCheckboxList, [{
        key: 'componentDidUpdate',
        value: function componentDidUpdate(prevProps, prevState, snapshot) {

            if (prevProps.focusFirstElement === false && this.props.focusFirstElement === true) {
                //focus first element
                if (!Globals.Utilities.isUndefinedOrNull(this.elementRefs) && this.elementRefs.length > 0) {
                    this.elementRefs[0].current.focus();
                }
            }
        }
    }, {
        key: 'handleClick',
        value: function handleClick(Key) {

            if (typeof this.props.onClickWireUp === "function") {
                this.props.onClickWireUp(Key);
            }
        }
    }, {
        key: 'handleUpArrowKeyPress',
        value: function handleUpArrowKeyPress(Index) {

            var newIndex = Index - 1;

            if (newIndex >= 0) {
                this.elementRefs[newIndex].current.focus();
            }
        }
    }, {
        key: 'handleDownArrowKeyPress',
        value: function handleDownArrowKeyPress(Index) {

            var newIndex = Index + 1;
            //we should store max length in state as well to be a bit more efficient
            var listLength = Object.keys(this.props.value).length;

            //if we are at the end of the list go back to the first element
            if (newIndex === listLength) {
                this.elementRefs[0].current.focus();
            } else if (newIndex < Object.keys(this.props.value).length) {
                this.elementRefs[Index + 1].current.focus();
            }
        }
    }, {
        key: 'handleKeyPress',
        value: function handleKeyPress(KeyPressEvent, Key, Index) {

            switch (KeyPressEvent.keyCode) {
                case 32:
                    //spacebar
                    this.props.onClickWireUp(Key);
                    break;
                case 40:
                    //down arrow
                    this.handleDownArrowKeyPress(Index);
                    break;
                case 38:
                    //up arrow
                    this.handleUpArrowKeyPress(Index);
                    break;
                default:
                    return;
            }

            KeyPressEvent.preventDefault();
            return;
        }
    }, {
        key: 'handleOnMouseOver',
        value: function handleOnMouseOver(Key) {
            this.props.onClickWireUp(Key);
            console.log("over", Key);
        }
    }, {
        key: 'handleOnMouseOut',
        value: function handleOnMouseOut(Key) {
            this.props.onClickWireUp(Key);
            console.log("out", Key);
        }
    }, {
        key: 'addCheckboxToCheckboxesDOM',
        value: function addCheckboxToCheckboxesDOM(CheckboxesDOM, Values, OptionKey, Index) {
            var _this2 = this;

            var checkboxRef = React.createRef();
            this.elementRefs[Index] = checkboxRef;
            //window.r = this.elementRefs;

            var checkboxDOM = React.createElement(document.kNextReactComponents.FederatedSearchCheckbox, {
                name: OptionKey,
                index: Index,
                checked: Values[OptionKey].checked,
                valuesCanBePartial: this.props.valuesCanBePartial,
                text: Values[OptionKey].text,
                descriptionText: Values[OptionKey].descriptionText,
                tabIndex: -1
            });

            var index = Index;

            //do we need aria-checked on this li element? underlying checkbox component has it too
            //yes since the focus can be on this

            var ariaChecked = false;

            if (this.props.valuesCanBePartial) {
                switch (Values[OptionKey].checked) {
                    case NodeCheckedStatusType.CHECKED:
                        ariaChecked = true;
                        break;
                    case NodeCheckedStatusType.PARTIALLY_CHECKED:
                        ariaChecked = true;
                        break;
                    default:
                }
            } else {
                ariaChecked = Values[OptionKey].checked;
            }

            var checkboxListItem = "list-item";

            CheckboxesDOM.push(React.createElement(
                'li',
                { tabIndex: this.props.listItemTabIndex, key: OptionKey, role: 'option', 'aria-checked': ariaChecked, ref: checkboxRef,
                    onClick: function onClick() {
                        return _this2.handleClick(OptionKey);
                    },
                    onKeyDown: function onKeyDown(KeyPressEvent) {
                        _this2.handleKeyPress(KeyPressEvent, OptionKey, index);console.log("?", KeyPressEvent);
                    },
                    className: checkboxListItem
                },
                checkboxDOM
            ));
        }
    }, {
        key: 'generateCheckBoxes',
        value: function generateCheckBoxes() {

            var values = this.props.value;
            var valuesOrder = this.props.valueOrder;
            var checkboxes = [];

            var i = 0;

            if (!Globals.Utilities.isUndefinedOrNull(valuesOrder) && valuesOrder.length > 0) {
                var _iteratorNormalCompletion = true;
                var _didIteratorError = false;
                var _iteratorError = undefined;

                try {
                    for (var _iterator = valuesOrder[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                        var option = _step.value;

                        this.addCheckboxToCheckboxesDOM(checkboxes, values, option, i);
                        i++;
                    }
                } catch (err) {
                    _didIteratorError = true;
                    _iteratorError = err;
                } finally {
                    try {
                        if (!_iteratorNormalCompletion && _iterator.return) {
                            _iterator.return();
                        }
                    } finally {
                        if (_didIteratorError) {
                            throw _iteratorError;
                        }
                    }
                }
            } else {
                //just use values
                for (var _option in values) {
                    this.addCheckboxToCheckboxesDOM(checkboxes, values, _option, i);
                    i++;
                }
            }

            return checkboxes;
        }

        //if the down arrow is pressed then focus the first list item

    }, {
        key: 'handleCheckboxListKeyDown',
        value: function handleCheckboxListKeyDown(KeyPressEvent) {

            //we only do this when the focus is on the ul element
            if (!KeyPressEvent.target.className.includes("select-options-list")) {
                return;
            }

            switch (KeyPressEvent.keyCode) {
                case 40:
                    //down arrow
                    if (this.elementRefs != null && this.elementRefs.length > 1) {
                        this.elementRefs[0].current.focus();
                    }
                    break;
                default:
                    return;
            }

            KeyPressEvent.preventDefault();
            return;
        }
    }, {
        key: 'render',
        value: function render() {

            var errorBlock = this.props.error != "" ? React.createElement(
                'span',
                null,
                React.createElement('i', { className: 'fa fa-exclamation-triangle', 'aria-hidden': 'true' }),
                React.createElement(
                    'span',
                    { className: 'input-error-message' },
                    this.props.error
                )
            ) : null;

            var checkboxListID = null;
            var checkboxListLabelID = null;

            if (typeof this.props.name === "string" && this.props.name !== "") {
                checkboxListID = "chkboxlist-" + this.props.name;
                checkboxListLabelID = "chkboxlist-label-" + this.props.name;
            }

            return React.createElement(
                'div',
                { className: 'input-group checkbox-list', componentname: 'FederatedSearchCheckboxList' },
                React.createElement(
                    'p',
                    { id: checkboxListID },
                    ' ',
                    this.props.label,
                    ' ',
                    errorBlock
                ),
                React.createElement(
                    'ul',
                    { id: checkboxListLabelID, role: 'listbox', 'aria-labelledby': checkboxListID, className: 'select-options-list no-bullet', tabIndex: this.props.ulTabIndex,
                        onKeyDown: this.handleCheckboxListKeyDown
                    },
                    this.generateCheckBoxes()
                )
            );
        }
    }]);

    return FederatedSearchCheckboxList;
}(React.Component);

var checkboxStyleValues = [];

for (var key in CheckBoxStyle) {

    checkboxStyleValues.push(CheckBoxStyle[key]);
}

document.kNextReactComponents.CheckboxList.propTypes = {
    value: PropTypes.object,
    required: PropTypes.bool,
    errorRequiredText: PropTypes.string,
    name: PropTypes.string.isRequired,
    label: PropTypes.string,
    CheckBoxStyle: PropTypes.oneOf(checkboxStyleValues),
    onClickWireUp: PropTypes.func.isRequired
};;
'use strict';

document.kNextReactComponents.RadioButtonList = function (_ref) {
    var _ref$selectedValue = _ref.selectedValue,
        selectedValue = _ref$selectedValue === undefined ? '' : _ref$selectedValue,
        _ref$values = _ref.values,
        values = _ref$values === undefined ? {} : _ref$values,
        _ref$valueOrder = _ref.valueOrder,
        valueOrder = _ref$valueOrder === undefined ? [] : _ref$valueOrder,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? GetString('str_Component_defaultRadioButtonList') : _ref$label,
        _ref$description = _ref.description,
        description = _ref$description === undefined ? null : _ref$description,
        _ref$errorMessage = _ref.errorMessage,
        errorMessage = _ref$errorMessage === undefined ? "" : _ref$errorMessage,
        _ref$radioBoxStyle = _ref.radioBoxStyle,
        radioBoxStyle = _ref$radioBoxStyle === undefined ? RadioBoxStyle.Primary : _ref$radioBoxStyle,
        _ref$descriptionPosit = _ref.descriptionPosition,
        descriptionPosition = _ref$descriptionPosit === undefined ? DescriptionPosition.BelowLabel : _ref$descriptionPosit,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp;

    var radioButtonsRef = React.useRef([]);

    var helperFunction = {
        "radioButtonGoDown": function radioButtonGoDown(Index) {
            var _nextIndex = void 0;
            for (_nextIndex = Index + 1; _nextIndex !== Index; _nextIndex++) {
                if (_nextIndex === Object.keys(values).length) {
                    _nextIndex = 0;
                }

                if (radioButtonsRef.current[_nextIndex].ariaDisabled === "false") {
                    break;
                }
            }

            if (_nextIndex !== Index) {
                radioButtonsRef.current[_nextIndex].focus();
            }
        },
        "radioButtonGoUp": function radioButtonGoUp(Index) {
            var _previousIndex = void 0;
            for (_previousIndex = Index - 1; _previousIndex !== Index; _previousIndex--) {
                if (_previousIndex < 0) {
                    _previousIndex = Object.keys(values).length - 1;
                }

                if (radioButtonsRef.current[_previousIndex].ariaDisabled === "false") {
                    break;
                }
            }

            if (_previousIndex !== Index) {
                radioButtonsRef.current[_previousIndex].focus();
            }
        }
    };

    var eventHandler = {
        "handleRadioOptionKeyDown": function handleRadioOptionKeyDown(Event, OptionKey, Index) {
            switch (Event.keyCode) {
                case 32: //spacebar
                case 13:
                    //enter
                    Event.preventDefault();
                    onClickWireUp(OptionKey);
                    break;
                case 40:
                    //down arrow
                    Event.preventDefault();
                    helperFunction.radioButtonGoDown(Index);
                    break;
                case 38:
                    //up arrow
                    Event.preventDefault();
                    helperFunction.radioButtonGoUp(Index);
                    break;
                default:
                    return;
            }
        }
    };

    var domGenerator = {
        "errorMessageDOM": function errorMessageDOM() {
            if (errorMessage.length === 0) {
                return null;
            }

            return React.createElement(
                'span',
                null,
                React.createElement(document.kNextReactComponents.Icon, {
                    iconClassName: 'fa fa-exclamation-triangle',
                    additionalClasses: 'error-icon'
                }),
                React.createElement(
                    'span',
                    { className: 'input-error-message' },
                    errorMessage
                )
            );
        },
        "radioButtonsDOM": function radioButtonsDOM() {
            var _valueOrder = valueOrder;
            if (_valueOrder.length === 0) {
                _valueOrder = Object.keys(values);
            }

            var _radioButtonsDOM = _valueOrder.map(function (_optionKey, _index) {
                var _onKeyDownFunc = function _onKeyDownFunc(Event) {
                    eventHandler.handleRadioOptionKeyDown(Event, _optionKey, _index);
                };
                var _onClickFunc = function _onClickFunc() {
                    onClickWireUp(_optionKey);
                };
                var _radioOptionClassName = 'radio-option';
                var _radioButtonDisabled = false;
                if (values[_optionKey].disabled) {
                    _onKeyDownFunc = null;
                    _onClickFunc = null;
                    _radioOptionClassName += " disabled";
                    _radioButtonDisabled = true;
                }

                var _radioButtonChecked = selectedValue === _optionKey;

                switch (descriptionPosition) {
                    case DescriptionPosition.BesideLabel:
                        return React.createElement(
                            'li',
                            {
                                key: _optionKey,
                                className: _radioOptionClassName + ' beside-label',
                                disabled: _radioButtonDisabled,
                                ref: function ref(element) {
                                    return radioButtonsRef.current[_index] = element;
                                },
                                tabIndex: 0,
                                'aria-disabled': _radioButtonDisabled,
                                'aria-checked': _radioButtonChecked,
                                'aria-label': values[_optionKey].label,
                                role: 'radio',
                                onClick: _onClickFunc,
                                onKeyDown: _onKeyDownFunc
                            },
                            React.createElement(document.kNextReactComponents.Radio, {
                                checked: _radioButtonChecked,
                                text: values[_optionKey].label,
                                disabled: _radioButtonDisabled,
                                tabIndex: -1,
                                descriptionText: values[_optionKey].description,
                                radioBoxStyle: radioBoxStyle
                            })
                        );
                    case DescriptionPosition.BelowLabel:
                    default:
                        return React.createElement(
                            'li',
                            {
                                key: _optionKey,
                                className: _radioOptionClassName + ' below-label',
                                ref: function ref(element) {
                                    return radioButtonsRef.current[_index] = element;
                                },
                                onClick: _onClickFunc,
                                onKeyDown: _onKeyDownFunc,
                                tabIndex: 0,
                                disabled: _radioButtonDisabled,
                                'aria-disabled': _radioButtonDisabled,
                                'aria-checked': _radioButtonChecked,
                                'aria-label': values[_optionKey].label
                            },
                            React.createElement(
                                'div',
                                { className: 'radio-label-box' },
                                React.createElement(document.kNextReactComponents.Radio, {
                                    checked: _radioButtonChecked,
                                    text: values[_optionKey].label,
                                    disabled: _radioButtonDisabled,
                                    tabIndex: -1,
                                    radioBoxStyle: radioBoxStyle
                                })
                            ),
                            React.createElement(
                                'div',
                                { className: 'description below-label' },
                                values[_optionKey].description
                            )
                        );
                }
            });

            return _radioButtonsDOM;
        }
    };

    return React.createElement(
        'div',
        {
            className: 'input-group radio-list',
            componentname: 'RadioButtonList'
        },
        React.createElement(
            'p',
            { className: 'title' },
            label,
            ' ',
            domGenerator.errorMessageDOM()
        ),
        React.createElement(
            'p',
            { className: 'group-description' },
            description
        ),
        React.createElement(
            'ul',
            {
                role: 'radiogroup',
                className: 'select-options-list no-bullet'
            },
            domGenerator.radioButtonsDOM()
        )
    );
};;
"use strict";

var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();

document.kNextReactComponents.PhoneNumberInput = function (_ref) {
    var _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$value = _ref.value,
        value = _ref$value === undefined ? "" : _ref$value,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? GetString('str_Component_defaultPhoneInput') : _ref$label,
        _ref$placeholder = _ref.placeholder,
        placeholder = _ref$placeholder === undefined ? GetString('str_Component_placeholderPhoneInput') : _ref$placeholder,
        _ref$name = _ref.name,
        name = _ref$name === undefined ? null : _ref$name,
        _ref$pattern = _ref.pattern,
        pattern = _ref$pattern === undefined ? [] : _ref$pattern,
        _ref$maxlength = _ref.maxlength,
        maxlength = _ref$maxlength === undefined ? 3 : _ref$maxlength,
        _ref$required = _ref.required,
        required = _ref$required === undefined ? true : _ref$required,
        _ref$showError = _ref.showError,
        showError = _ref$showError === undefined ? false : _ref$showError,
        _ref$errorRequiredTex = _ref.errorRequiredText,
        errorRequiredText = _ref$errorRequiredTex === undefined ? GetString('str_Component_errorRequired') : _ref$errorRequiredTex,
        _ref$onChangeWireUp = _ref.onChangeWireUp,
        onChangeWireUp = _ref$onChangeWireUp === undefined ? null : _ref$onChangeWireUp;

    var _React$useState = React.useState(""),
        _React$useState2 = _slicedToArray(_React$useState, 2),
        errorMessageState = _React$useState2[0],
        setErrorMessageState = _React$useState2[1];

    var helperFunction = {
        "getFormattedPhoneNumber": function getFormattedPhoneNumber() {
            var _formattedPhoneNumber = value;

            if (pattern.length > 0 && value.length > pattern[0]) {
                var _splittedPhoneNumber = value.split("");
                pattern.forEach(function (_dashIndex) {
                    _splittedPhoneNumber.splice(_dashIndex, 0, "-");
                });
                _formattedPhoneNumber = _splittedPhoneNumber.join("");
            }

            return _formattedPhoneNumber;
        }
    };

    var eventHandler = {
        "handleBlur": function handleBlur() {
            if (value.length === 0 && required && showError) {
                setErrorMessageState(errorRequiredText);
            } else {
                setErrorMessageState("");
            }
        },
        "handleChange": function handleChange(NewValue) {
            //remove possible dashes from the value, because we formatted the input value
            var _sanitizedNewValue = NewValue.replaceAll("-", "");

            //clear any error messages
            setErrorMessageState("");

            //only accept numeric values
            if (isNaN(_sanitizedNewValue)) {
                setErrorMessageState(GetString("str_Component_errorNumericValuesOnly"));
                return;
            }

            //ensure length is less than maxlength
            if (_sanitizedNewValue.length > maxlength) {
                setErrorMessageState(GetString("str_Component_errorMaxLengthText"));
                return;
            }

            //hand-off to parent caller
            onChangeWireUp(_sanitizedNewValue);
        }
    };

    return React.createElement(
        "div",
        { componentname: "PhoneNumberInput" },
        React.createElement(document.kNextReactComponents.TextInput, {
            label: label,
            name: name,
            placeholder: placeholder,
            onChangeWireUp: eventHandler.handleChange,
            onBlurWireUp: eventHandler.handleBlur,
            value: helperFunction.getFormattedPhoneNumber(),
            type: "tel",
            required: required,
            errorMessage: errorMessageState,
            className: className
        })
    );
};;
'use strict';

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

//stateless presentational component
document.kNextReactComponents.TotalPhoneNumberInput = function (_React$Component) {
    _inherits(TotalPhoneNumberInput, _React$Component);

    function TotalPhoneNumberInput(props) {
        _classCallCheck(this, TotalPhoneNumberInput);

        var _this = _possibleConstructorReturn(this, (TotalPhoneNumberInput.__proto__ || Object.getPrototypeOf(TotalPhoneNumberInput)).call(this, props));

        autobind(_this);
        return _this;
    }

    //NOTE: to override need to copy paste whole props dict for the input because we don't do any merging
    //we can do it now since no nested inputs so it's easier


    _createClass(TotalPhoneNumberInput, [{
        key: 'componentDidMount',
        value: function componentDidMount() {
            //Globals.Utilities.consoleLog("base profile inputs compdidmount refs are " + JSON.stringify(this.refs));
        }
    }, {
        key: 'render',
        value: function render() {
            var _this2 = this;

            var props = this.props;
            console.log("totalphonenumber props: " + JSON.stringify(props));

            var inputsDiv = React.createElement(
                'div',
                { className: 'my-account-form-phone-number', componentname: 'TotalPhoneNumberInput' },
                React.createElement(
                    'div',
                    { 'class': 'row' },
                    React.createElement(
                        'div',
                        { 'class': 'col-sm-3' },
                        React.createElement(document.kNextReactComponents.FilterableSelect, { label: 'Phone Type', elements: ['Business Phone', 'Business Fax', 'Cellular', 'Pager', 'Toll Free', 'Other'], placeholder: 'Phone Type',
                            height: 200, value: this.props.phoneNumberType.value, errorMessage: this.props.phoneNumberType.errorMessage,
                            required: true, formSubmitted: this.props.formSubmitted, name: 'phoneNumberType', onBlur: function onBlur(value) {
                                _this2.props.onBlur('phoneNumberType', value);
                            }
                        })
                    ),
                    React.createElement(
                        'div',
                        { 'class': 'col-sm-8' },
                        React.createElement(
                            'div',
                            { className: 'extended-phone-input-box' },
                            React.createElement(document.kNextReactComponents.PhoneNumberInput, { className: 'phone-area-code', name: 'phoneAreaCode', label: 'Area Code', placeholder: 'Area Code',
                                onChange: function onChange(value) {
                                    _this2.props.onChange('phoneAreaCode', value);
                                }, format: null, maxlength: 3,
                                onBlur: function onBlur(value) {
                                    _this2.props.onBlur('phoneAreaCode', value);
                                },
                                required: true, formSubmitted: this.props.formSubmitted, value: this.props.phoneAreaCode.value, errorMessage: this.props.phoneAreaCode.errorMessage
                            }),
                            React.createElement(document.kNextReactComponents.PhoneNumberInput, { className: 'phone-number', name: 'phoneNumber', label: 'Phone Number', placeholder: 'Phone Number',
                                onChange: function onChange(value) {
                                    _this2.props.onChange('phoneNumber', value);
                                }, format: [3], maxlength: 7,
                                onBlur: function onBlur(value) {
                                    _this2.props.onBlur('phoneNumber', value);
                                },
                                required: true, formSubmitted: this.props.formSubmitted, value: this.props.phoneNumber.value, errorMessage: this.props.phoneNumber.errorMessage
                            }),
                            React.createElement(document.kNextReactComponents.PhoneNumberInput, { className: 'phone-extension', name: 'phoneExtension', label: 'Ext', placeholder: 'Ext',
                                onChange: function onChange(value) {
                                    _this2.props.onChange('phoneExtension', value);
                                }, format: null, maxlength: 3,
                                onBlur: function onBlur(value) {
                                    _this2.props.onBlur('phoneExtension', value);
                                },
                                required: true, formSubmitted: this.props.formSubmitted, value: this.props.phoneExtension.value, errorMessage: this.props.phoneExtension.errorMessage
                            })
                        )
                    ),
                    React.createElement(
                        'div',
                        { className: 'col-sm-1 delete-phone-box' },
                        React.createElement(document.kNextReactComponents.Button, { key: 'button', ButtonStyle: ButtonStyle.Delete, onClick: this.props.onDelete })
                    )
                )
            );

            return React.createElement(
                'div',
                { 'class': 'profile-form user-phone' },
                inputsDiv
            );
        }
    }], [{
        key: 'defaultProps',
        get: function get() {
            return {
                formSubmitted: false,
                onChange: function onChange() {
                    "presentational total phone number input, please provide onChange as props";
                }, //required
                phoneNumberType: {
                    value: '',
                    errorMessage: ''
                },
                phoneNumber: {
                    value: '',
                    errorMessage: ''
                },
                phoneAreaCode: {
                    value: '',
                    errorMessage: ''
                },
                phoneExtension: {
                    value: '',
                    errorMessage: ''
                },
                //external function provided to the form, that we call onsubmit
                onSubmit: function onSubmit(result) {
                    alert("presentational total phone number input, please provide onSubmit as props");
                }
            };
        }
    }]);

    return TotalPhoneNumberInput;
}(React.Component);;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Input = function (_React$Component) {
    _inherits(Input, _React$Component);

    function Input(props) {
        _classCallCheck(this, Input);

        var _this = _possibleConstructorReturn(this, (Input.__proto__ || Object.getPrototypeOf(Input)).call(this, props));

        autobind(_this);

        var value = _this.props.value === null || _this.props.value === undefined ? "" : _this.props.value;

        _this.state = { value: value, validationString: "", isInvalid: false };
        _this.inputRef = React.createRef();
        return _this;
    }

    _createClass(Input, [{
        key: "onChange",
        value: function onChange(event) {
            var value = event.target.value;
            var validateResults = this.validate(value);
            this.setState({
                isInvalid: validateResults[0],
                validationString: validateResults[1],
                value: value
            });
            this.props.onChange(value);
        }
    }, {
        key: "onSelect",
        value: function onSelect() {
            this.props.onSelect(this.inputRef);
        }
    }, {
        key: "validate",
        value: function validate(event) {
            for (var i = 0; i < this.props.validationTuples.length; i++) {
                var tuple = this.props.validationTuples[i];
                if (!tuple[0].test(event)) {
                    return [true, tuple[1]];
                }
            }
            return [false, ""];
        }
    }, {
        key: "render_newBootstrap",
        value: function render_newBootstrap() {

            return React.createElement(
                "div",
                { style: { width: this.props.size } },
                React.createElement(ReactBootstrap.FormControl, { onChange: this.onChange, onSelect: this.onSelect, onBlur: this.props.onBlur, type: "text", style: { width: "100%", padding: "0px 0px" }, value: this.state.value, ref: this.inputRef })
            );
        }
    }, {
        key: "render",
        value: function render() {
            var inputStyles = Globals.Utilities.safeObjectAssign({}, this.props.style);
            if (this.props.size != null) {
                inputStyles["width"] = this.props.size.toString() + "px";
            }

            return React.createElement(
                "div",
                null,
                React.createElement("input", {
                    className: "form-control",
                    type: this.props.type,
                    onChange: this.onChange,
                    onSelect: this.onSelect,
                    onBlur: this.props.onBlur,
                    value: this.state.value,
                    style: inputStyles,
                    ref: this.inputRef
                }),
                React.createElement(
                    "label",
                    { className: "validation-label" },
                    this.state.validationString
                )
            );
        }
    }], [{
        key: "defaultProps",
        get: function get() {
            return {
                onChange: function onChange() {},
                onSelect: function onSelect() {},
                onBlur: function onBlur() {},

                value: "",
                size: 480,
                type: "text",
                validationTuples: [],
                style: {}
            };
        }
    }]);

    return Input;
}(React.Component);;
"use strict";

document.kNextReactComponents.DatePicker = function (_ref) {
    var _ref$date = _ref.date,
        date = _ref$date === undefined ? "" : _ref$date,
        _ref$onDateChangeWire = _ref.onDateChangeWireUp,
        onDateChangeWireUp = _ref$onDateChangeWire === undefined ? null : _ref$onDateChangeWire,
        _ref$dateFormat = _ref.dateFormat,
        dateFormat = _ref$dateFormat === undefined ? null : _ref$dateFormat;

    var dateInputRef = React.useRef(null);

    React.useEffect(function () {
        //We're using jQuery datepicker plugin to render a calender
        //Documentation can be found here: https://api.jqueryui.com/datepicker/

        //set up the configuration for our datepicker
        var _siteLanguage = Globals.Utilities.getCurrentSiteLanguage();
        var _languageOption = "";
        switch (_siteLanguage) {
            case Globals.LanguageType.fr:
                _languageOption = "fr";
                break;
            case Globals.LanguageType.en:
            default:
                _languageOption = "en";
                break;
        }
        // Need to render the calendar based on the user's set language, but if not provided, the default is English.
        var _currDateFormat = dateFormat;
        if (Globals.Utilities.isUndefinedOrNull(_currDateFormat)) {
            _currDateFormat = _languageOption == "fr" ? "d M yy" : "M d yy";
        }
        var datePickerOptions = {
            "dateFormat": _currDateFormat,
            "monthNamesShort": $.datepicker.regional[_languageOption].monthNamesShort,
            "monthNames": $.datepicker.regional[_languageOption].monthNames,
            "defaultDate": date,
            "beforeShow": function beforeShow(input, inst) {
                // Get the position of the select element
                var selectPos = $(dateInputRef.current).offset();
                // Set the position of the datepicker div
                setTimeout(function () {
                    inst.dpDiv.css({
                        top: selectPos.top + $(dateInputRef.current).outerHeight(),
                        left: selectPos.left,
                        position: "absolute"
                    });
                }, 0);
            },
            "onSelect": function onSelect(dateText, inst) {
                //sometimes the datepicker is rendered in French, so we need to parse it accordingly
                //otherwise, it'll throw an "Invalid date" exception.
                var d = $.datepicker.parseDate(_currDateFormat, dateText, {
                    monthNamesShort: $.datepicker.regional[_languageOption].monthNamesShort,
                    monthNames: $.datepicker.regional[_languageOption].monthNames
                }).toISOString().split('T')[0];

                var _date = d.split("-");
                var _month = _date[1];
                var _day = _date[2];
                var _year = _date[0];
                var dateInput = [_month, _day, _year];

                onDateChangeWireUp(dateInput.join("-"));
            }

        };

        $(dateInputRef.current).datepicker(datePickerOptions);
        $(dateInputRef.current).datepicker("setDate", new Date(date));
    }, [date]);

    return React.createElement(
        "div",
        {
            className: "datepicker-container",
            componentname: "DatePicker"
        },
        React.createElement(
            "div",
            { className: "date-input" },
            React.createElement("input", {
                type: "text",
                ref: dateInputRef,
                className: "datepicker",
                "aria-label": Globals.Date.toLocaleDateString(new Date(date), { month: 'short', day: 'numeric', year: 'numeric' })
            }),
            React.createElement(document.kNextReactComponents.Icon, {
                iconClassName: "far fa-calendar-day",
                additionalClasses: "calendar-icon",
                tabIndex: -1
            })
        )
    );
};;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Modal = function (_React$Component) {
    _inherits(Modal, _React$Component);

    function Modal(props) {
        _classCallCheck(this, Modal);

        var _this = _possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this, props));

        autobind(_this);

        _this.divRef = React.createRef();
        return _this;
    }

    _createClass(Modal, [{
        key: "render",
        value: function render() {
            return React.createElement(
                "div",
                null,
                React.createElement(
                    "div",
                    { ref: this.divRef, title: this.props.title },
                    this.props.children,
                    React.createElement("hr", null)
                )
            );
        }
    }, {
        key: "componentWillReceiveProps",
        value: function componentWillReceiveProps(newProps) {
            var this2 = this;
            $(this.divRef.current).dialog({
                resizable: false,
                height: "auto",
                width: 400,
                modal: true,
                buttons: {
                    "Delete all items": function DeleteAllItems() {
                        $(this).dialog("close");
                    },
                    Cancel: function Cancel() {
                        $(this).dialog("close");
                    }
                }
            });

            //$(this.divRef.current).dialog({ beforeClose: function () { this2.handleClose(); return true; }, height: this.props.height, width: this.props.width, close: (event, ui) => { this.handleClose(); }, closeOnEscape: false });
        }
    }, {
        key: "handleActionLocal",
        value: function handleActionLocal(e) {
            $(this.divRef.current).dialog('close');
            this.props.handleAction();
        }
    }, {
        key: "componentDidMount",
        value: function componentDidMount() {
            var this2 = this;

            $(this.divRef.current).dialog({
                resizable: false,
                height: "auto",
                width: 400,
                modal: true,
                buttons: {
                    "Delete all items": function DeleteAllItems() {
                        $(this).dialog("close");
                    },
                    Cancel: function Cancel() {
                        $(this).dialog("close");
                    }
                }
            });

            //

            //$(this.divRef.current).dialog({ beforeClose: function () { this2.handleClose(); return true; }, height: this.props.height, width: this.props.width, close: (event, ui) => { this.handleClose(); }, closeOnEscape: false });
        }
    }, {
        key: "handleClose",
        value: function handleClose() {
            this.props.handleClose();
        }
    }]);

    return Modal;
}(React.Component);

// Specifies the default values for props:


Modal.defaultProps = {
    actionType: 'Submit',
    handleAction: {}
};;
'use strict';

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Dialog = function (_React$Component) {
    _inherits(Dialog, _React$Component);

    function Dialog(props) {
        _classCallCheck(this, Dialog);

        var _this = _possibleConstructorReturn(this, (Dialog.__proto__ || Object.getPrototypeOf(Dialog)).call(this, props));

        autobind(_this);

        _this.divRef = React.createRef();

        return _this;
    }

    _createClass(Dialog, [{
        key: 'render',
        value: function render() {
            return React.createElement(
                'div',
                null,
                React.createElement(
                    'div',
                    { ref: this.divRef, title: this.props.title },
                    this.props.children,
                    React.createElement('hr', null),
                    React.createElement(
                        'div',
                        { style: { float: 'right' } },
                        React.createElement(
                            'button',
                            { className: 'js--button--convert-to-jQuery', onClick: this.handleActionLocal },
                            ' ',
                            this.props.actionType
                        ),
                        ' ',
                        React.createElement(
                            'button',
                            { className: 'js--button--convert-to-jQuery', onClick: this.handleClose },
                            'Cancel'
                        )
                    )
                )
            );
        }
    }, {
        key: 'componentWillReceiveProps',
        value: function componentWillReceiveProps(newProps) {
            var _this2 = this;

            //removing call to handleClose directly from beforeClose, as if beforeClose returns true then it will call the close method
            //which will call handleClose
            $(this.divRef.current).dialog({ beforeClose: function beforeClose() {
                    /* this2.handleClose();*/return true;
                }, height: this.props.height, width: this.props.width, close: function close(event, ui) {
                    _this2.handleClose();
                }, closeOnEscape: false });
            Globals.UI.knotiaFlatModernizeStandardButtons();
        }
    }, {
        key: 'handleActionLocal',
        value: function handleActionLocal(e) {
            $(this.divRef.current).dialog('close');
            this.props.handleAction();
        }
    }, {
        key: 'componentDidMount',
        value: function componentDidMount() {
            var _this3 = this;

            //removing call to handleClose directly from beforeClose, as if beforeClose returns true then it will call the close method
            //which will call handleClose
            $(this.divRef.current).dialog({ beforeClose: function beforeClose() {
                    /*this2.handleClose(); */return true;
                }, height: this.props.height, width: this.props.width, close: function close(event, ui) {
                    _this3.handleClose();
                }, closeOnEscape: false });
            Globals.UI.knotiaFlatModernizeStandardButtons();
        }
    }, {
        key: 'handleClose',
        value: function handleClose() {
            //this is what closes the modal dialog
            $(this.divRef.current).dialog('close');
            this.props.handleClose();
        }
    }]);

    return Dialog;
}(React.Component);

// Specifies the default values for props:


Dialog.defaultProps = {
    actionType: 'Submit',
    handleAction: {}
};;
'use strict';

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var SimpleDialog = function (_React$Component) {
	_inherits(SimpleDialog, _React$Component);

	function SimpleDialog(props) {
		_classCallCheck(this, SimpleDialog);

		var _this = _possibleConstructorReturn(this, (SimpleDialog.__proto__ || Object.getPrototypeOf(SimpleDialog)).call(this, props));

		autobind(_this);

		if (props.specifyRef == null) {
			_this.divRef = React.createRef();
		} else {
			_this.divRef = props.specifyRef;
		}
		return _this;
	}

	_createClass(SimpleDialog, [{
		key: 'render',
		value: function render() {
			return React.createElement(
				'div',
				null,
				React.createElement(
					'div',
					{ ref: this.divRef, title: this.props.title },
					createDialog(this.props)
				)
			);
		}
	}, {
		key: 'componentWillReceiveProps',
		value: function componentWillReceiveProps(newProps) {
			$(this.divRef.current).dialog({ height: this.props.height, width: this.props.width });
		}
	}, {
		key: 'componentDidMount',
		value: function componentDidMount() {
			$(this.divRef.current).dialog({ height: this.props.height, width: this.props.width });
		}
	}]);

	return SimpleDialog;
}(React.Component);

// Specifies the default values for props:


SimpleDialog.defaultProps = {
	title: '',
	body: '',
	height: 100,
	width: 100,
	isBodyHtml: false,
	specifyRef: null
};

function createDialog(props) {
	if (props.isBodyHtml) {
		return React.createElement('div', { dangerouslySetInnerHTML: createMarkup(props.body) });
	} else {
		return props.body;
	}
}

function createMarkup(html) {
	return { __html: html };
};
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var ToggleControl = function (_React$Component) {
	_inherits(ToggleControl, _React$Component);

	function ToggleControl(props) {
		_classCallCheck(this, ToggleControl);

		var _this = _possibleConstructorReturn(this, (ToggleControl.__proto__ || Object.getPrototypeOf(ToggleControl)).call(this, props));

		autobind(_this);

		_this.state = { isOn: _this.props.isOn };
		return _this;
	}

	_createClass(ToggleControl, [{
		key: "render",
		value: function render() {
			var _this2 = this;

			var toggleText, toggleStatusClass;
			if (this.state.isOn) {
				toggleText = this.props.onText;
				toggleStatusClass = "fa-toggle-on";
			} else {
				toggleText = this.props.offText;
				toggleStatusClass = "fa-toggle-off";
			}

			var toggleClasses = "fa " + toggleStatusClass + " size18px cursor-pointer";

			return React.createElement(
				"div",
				{ onClick: function onClick() {
						return _this2.doToggle({});
					} },
				React.createElement("span", { className: toggleClasses, style: { fontSize: this.props.pixelSize.toString() + "px" } }),
				"\xA0",
				React.createElement(
					"b",
					null,
					toggleText
				)
			);
		}
	}, {
		key: "doToggle",
		value: function doToggle() {
			var newState = !this.state.isOn;
			this.setState({ isOn: newState });

			if (this.props.onToggleMethod != null) {
				this.props.onToggleMethod(newState);
			}
		}
	}]);

	return ToggleControl;
}(React.Component);

ToggleControl.defaultProps = {
	offText: "Off",
	onText: "On",
	isOn: false,
	onToggleMethod: null,
	pixelSize: 18
};;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var SliderControl = function (_React$Component) {
	_inherits(SliderControl, _React$Component);

	function SliderControl(props) {
		_classCallCheck(this, SliderControl);

		var _this = _possibleConstructorReturn(this, (SliderControl.__proto__ || Object.getPrototypeOf(SliderControl)).call(this, props));

		autobind(_this);
		return _this;
	}

	// First, the render() method creates the minimal barebones that our component needs.


	_createClass(SliderControl, [{
		key: "render",
		value: function render() {
			var styles;
			if (this.props.fixedWidth > 0) {
				styles = { "width": this.props.fixedWidth.toString() + "px" };
			} else if (this.props.optionsTexts != null && this.props.doShowTexts) {
				styles = { "width": "80%", "marginLeft": "10%" };
			} else {
				styles = { "width": "100%" };
			}

			return React.createElement("div", { style: styles });
		}

		// Second, the componentDidMount() method should set up the non-React component.

	}, {
		key: "componentDidMount",
		value: function componentDidMount() {
			var _this2 = this;

			var parent = ReactDOM.findDOMNode(this);

			var slider = $(parent).slider({
				min: this.props.min,
				max: this.props.max,
				step: this.props.step,
				value: this.props.initialValue,
				create: function create() {
					_this2.addLabels();
				},
				change: function change(event, ui) {
					if (_this2.props.onChange != null) {
						var sliderValue = _this2.props.onChange(ui.value);
					}
				}
			});
		}

		// Third, the componentWillUnmount() method should destroy any non-React components.

	}, {
		key: "componentWillUnmount",
		value: function componentWillUnmount() {
			var parent = ReactDOM.findDOMNode(this);
			$(parent).slider("destroy");
		}

		// Fourth, the shouldComponentUpdate() method should override the default React behaviour of updating the component when the state changes (because we are handling the changes to our element ourselves)

	}, {
		key: "shouldComponentUpdate",
		value: function shouldComponentUpdate() {
			return false;
		}
	}, {
		key: "addLabels",
		value: function addLabels() {
			if (this.props.optionsTexts != null && this.props.doShowTexts) {
				var parent = ReactDOM.findDOMNode(this);
				parent = $(parent);

				var controlWidth = parent.width();
				var position = controlWidth / (this.props.optionsTexts.length - 1);

				var left = parseInt(parent.css("marginLeft").replace(/px/i, ""));

				var labelBuilder = [];
				labelBuilder.push("<div style='width:" + controlWidth.toString() + "px; height:12px;'>");
				for (var i = 0; i < this.props.optionsTexts.length; i++) {
					labelBuilder.push("<div style='position:absolute; left:" + (position * i + left).toString() + "px; padding-top:5px; text-align:center; '>" + this.props.optionsTexts[i] + "</div>");
				}
				labelBuilder.push("</div>");

				parent.after(labelBuilder.join(""));
			}
		}
	}]);

	return SliderControl;
}(React.Component);

SliderControl.defaultProps = {
	min: 0,
	max: 100,
	step: 1,
	initialValue: 0,
	onChange: null,
	optionsTexts: null,
	doShowTexts: true,
	fixedWidth: 0
};;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var SliderControlForOptionsList = function (_React$Component) {
	_inherits(SliderControlForOptionsList, _React$Component);

	function SliderControlForOptionsList(props) {
		_classCallCheck(this, SliderControlForOptionsList);

		var _this = _possibleConstructorReturn(this, (SliderControlForOptionsList.__proto__ || Object.getPrototypeOf(SliderControlForOptionsList)).call(this, props));

		autobind(_this);
		return _this;
	}

	_createClass(SliderControlForOptionsList, [{
		key: "render",
		value: function render() {
			var initialValueOffset = 0;
			for (var i = 0; i < this.props.optionsList.length; i++) {
				if (this.props.optionsList[i] == this.props.initialValue) {
					initialValueOffset = i;
					break;
				}
			}

			return React.createElement(SliderControl, { min: 0, max: this.props.optionsList.length - 1, step: 1, initialValue: initialValueOffset, optionsTexts: this.props.optionsTexts, doShowTexts: this.props.doShowTexts, onChange: this.onChange, fixedWidth: this.props.fixedWidth });
		}
	}, {
		key: "onChange",
		value: function onChange(selectedOffset) {
			var selectedValue = this.props.optionsList[selectedOffset];
			this.props.onChange(selectedValue);
		}
	}]);

	return SliderControlForOptionsList;
}(React.Component);

SliderControlForOptionsList.defaultProps = {
	optionsList: null,
	optionsTexts: null,
	doShowTexts: true,
	initialValue: 0,
	onChange: null,
	fixedWidth: 0
};;
!function (r, t) { "object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((r = "undefined" != typeof globalThis ? globalThis : r || self).Redux = {}) }(this, (function (r) { "use strict"; function t(r) { return "Minified Redux error #" + r + "; visit https://redux.js.org/Errors?code=" + r + " for the full message or use the non-minified dev environment for full errors. " } var e = "function" == typeof Symbol && Symbol.observable || "@@observable", n = function () { return Math.random().toString(36).substring(7).split("").join(".") }, o = { INIT: "@@redux/INIT" + n(), REPLACE: "@@redux/REPLACE" + n(), PROBE_UNKNOWN_ACTION: function () { return "@@redux/PROBE_UNKNOWN_ACTION" + n() } }; function i(r) { if ("object" != typeof r || null === r) return !1; for (var t = r; null !== Object.getPrototypeOf(t);)t = Object.getPrototypeOf(t); return Object.getPrototypeOf(r) === t } function f(r, t) { return function () { return t(r.apply(this, arguments)) } } function u(r, t, e) { return t in r ? Object.defineProperty(r, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : r[t] = e, r } function c(r, t) { var e = Object.keys(r); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(r); t && (n = n.filter((function (t) { return Object.getOwnPropertyDescriptor(r, t).enumerable }))), e.push.apply(e, n) } return e } function p(r) { for (var t = 1; arguments.length > t; t++) { var e = null != arguments[t] ? arguments[t] : {}; t % 2 ? c(Object(e), !0).forEach((function (t) { u(r, t, e[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(e)) : c(Object(e)).forEach((function (t) { Object.defineProperty(r, t, Object.getOwnPropertyDescriptor(e, t)) })) } return r } function a() { for (var r = arguments.length, t = Array(r), e = 0; r > e; e++)t[e] = arguments[e]; return 0 === t.length ? function (r) { return r } : 1 === t.length ? t[0] : t.reduce((function (r, t) { return function () { return r(t.apply(void 0, arguments)) } })) } r.__DO_NOT_USE__ActionTypes = o, r.applyMiddleware = function () { for (var r = arguments.length, e = Array(r), n = 0; r > n; n++)e[n] = arguments[n]; return function (r) { return function () { var n = r.apply(void 0, arguments), o = function () { throw Error(t(15)) }, i = { getState: n.getState, dispatch: function () { return o.apply(void 0, arguments) } }, f = e.map((function (r) { return r(i) })); return o = a.apply(void 0, f)(n.dispatch), p(p({}, n), {}, { dispatch: o }) } } }, r.bindActionCreators = function (r, e) { if ("function" == typeof r) return f(r, e); if ("object" != typeof r || null === r) throw Error(t(16)); var n = {}; for (var o in r) { var i = r[o]; "function" == typeof i && (n[o] = f(i, e)) } return n }, r.combineReducers = function (r) { for (var e = Object.keys(r), n = {}, i = 0; e.length > i; i++) { var f = e[i]; "function" == typeof r[f] && (n[f] = r[f]) } var u, c = Object.keys(n); try { !function (r) { Object.keys(r).forEach((function (e) { var n = r[e]; if (void 0 === n(void 0, { type: o.INIT })) throw Error(t(12)); if (void 0 === n(void 0, { type: o.PROBE_UNKNOWN_ACTION() })) throw Error(t(13)) })) }(n) } catch (r) { u = r } return function (r, e) { if (void 0 === r && (r = {}), u) throw u; for (var o = !1, i = {}, f = 0; c.length > f; f++) { var p = c[f], a = r[p], l = (0, n[p])(a, e); if (void 0 === l) throw Error(t(14)); i[p] = l, o = o || l !== a } return (o = o || c.length !== Object.keys(r).length) ? i : r } }, r.compose = a, r.createStore = function r(n, f, u) { var c; if ("function" == typeof f && "function" == typeof u || "function" == typeof u && "function" == typeof arguments[3]) throw Error(t(0)); if ("function" == typeof f && void 0 === u && (u = f, f = void 0), void 0 !== u) { if ("function" != typeof u) throw Error(t(1)); return u(r)(n, f) } if ("function" != typeof n) throw Error(t(2)); var p = n, a = f, l = [], y = l, s = !1; function d() { y === l && (y = l.slice()) } function b() { if (s) throw Error(t(3)); return a } function h(r) { if ("function" != typeof r) throw Error(t(4)); if (s) throw Error(t(5)); var e = !0; return d(), y.push(r), function () { if (e) { if (s) throw Error(t(6)); e = !1, d(); var n = y.indexOf(r); y.splice(n, 1), l = null } } } function v(r) { if (!i(r)) throw Error(t(7)); if (void 0 === r.type) throw Error(t(8)); if (s) throw Error(t(9)); try { s = !0, a = p(a, r) } finally { s = !1 } for (var e = l = y, n = 0; e.length > n; n++) { (0, e[n])() } return r } function O(r) { if ("function" != typeof r) throw Error(t(10)); p = r, v({ type: o.REPLACE }) } function E() { var r, n = h; return (r = { subscribe: function (r) { if ("object" != typeof r || null === r) throw Error(t(11)); function e() { r.next && r.next(b()) } return e(), { unsubscribe: n(e) } } })[e] = function () { return this }, r } return v({ type: o.INIT }), (c = { dispatch: v, subscribe: h, getState: b, replaceReducer: O })[e] = E, c }, Object.defineProperty(r, "__esModule", { value: !0 }) }));;
!function (e, t) { "object" == typeof exports && "undefined" != typeof module ? t(exports, require("react"), require("redux")) : "function" == typeof define && define.amd ? define(["exports", "react", "redux"], t) : t(e.ReactRedux = {}, e.React, e.Redux) }(this, function (e, g, r) { "use strict"; var S = "default" in g ? g.default : g; function w(e, t) { e.prototype = Object.create(t.prototype), (e.prototype.constructor = e).__proto__ = t } function t(e, t) { return e(t = { exports: {} }, t.exports), t.exports } function n() { } var o = t(function (e) { e.exports = function () { function e(e, t, r, n, o, i) { if ("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED" !== i) { var a = 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 a.name = "Invariant Violation", a } } function t() { return e } var r = { array: e.isRequired = e, bool: e, func: e, number: e, object: e, string: e, symbol: e, any: e, arrayOf: t, element: e, instanceOf: t, node: e, objectOf: t, oneOf: t, oneOfType: t, shape: t, exact: t }; return r.checkPropTypes = n, r.PropTypes = r }() }), x = S.createContext(null), i = function (n) { function e(e) { var t; t = n.call(this, e) || this; var r = e.store; return t.state = { storeState: r.getState(), store: r }, t } w(e, n); var t = e.prototype; return t.componentDidMount = function () { this._isMounted = !0, this.subscribe() }, t.componentWillUnmount = function () { this.unsubscribe && this.unsubscribe(), this._isMounted = !1 }, t.componentDidUpdate = function (e) { this.props.store !== e.store && (this.unsubscribe && this.unsubscribe(), this.subscribe()) }, t.subscribe = function () { var e = this, r = this.props.store; this.unsubscribe = r.subscribe(function () { var t = r.getState(); e._isMounted && e.setState(function (e) { return e.storeState === t ? null : { storeState: t } }) }); var t = r.getState(); t !== this.state.storeState && this.setState({ storeState: t }) }, t.render = function () { return S.createElement((this.props.context || x).Provider, { value: this.state }, this.props.children) }, e }(g.Component); function C(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e } function E() { return (E = Object.assign || function (e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]) } return e }).apply(this, arguments) } function R(e, t) { if (null == e) return {}; var r, n, o = {}, i = Object.keys(e); for (n = 0; n < i.length; n++)t.indexOf(r = i[n]) < 0 && (o[r] = e[r]); return o } i.propTypes = { store: o.shape({ subscribe: o.func.isRequired, dispatch: o.func.isRequired, getState: o.func.isRequired }), context: o.object, children: o.any }; var a, s = t(function (e, t) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = "function" == typeof Symbol && Symbol.for, n = r ? Symbol.for("react.element") : 60103, o = r ? Symbol.for("react.portal") : 60106, i = r ? Symbol.for("react.fragment") : 60107, a = r ? Symbol.for("react.strict_mode") : 60108, s = r ? Symbol.for("react.profiler") : 60114, p = r ? Symbol.for("react.provider") : 60109, c = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, f = r ? Symbol.for("react.concurrent_mode") : 60111, d = r ? Symbol.for("react.forward_ref") : 60112, l = r ? Symbol.for("react.suspense") : 60113, m = r ? Symbol.for("react.memo") : 60115, y = r ? Symbol.for("react.lazy") : 60116; function v(e) { if ("object" == typeof e && null !== e) { var t = e.$$typeof; switch (t) { case n: switch (e = e.type) { case u: case f: case i: case s: case a: return e; default: switch (e = e && e.$$typeof) { case c: case d: case p: return e; default: return t } }case o: return t } } } function h(e) { return v(e) === f } t.typeOf = v, t.AsyncMode = u, t.ConcurrentMode = f, t.ContextConsumer = c, t.ContextProvider = p, t.Element = n, t.ForwardRef = d, t.Fragment = i, t.Profiler = s, t.Portal = o, t.StrictMode = a, t.isValidElementType = function (e) { return "string" == typeof e || "function" == typeof e || e === i || e === f || e === s || e === a || e === l || "object" == typeof e && null !== e && (e.$$typeof === y || e.$$typeof === m || e.$$typeof === p || e.$$typeof === c || e.$$typeof === d) }, t.isAsyncMode = function (e) { return h(e) || v(e) === u }, t.isConcurrentMode = h, t.isContextConsumer = function (e) { return v(e) === c }, t.isContextProvider = function (e) { return v(e) === p }, t.isElement = function (e) { return "object" == typeof e && null !== e && e.$$typeof === n }, t.isForwardRef = function (e) { return v(e) === d }, t.isFragment = function (e) { return v(e) === i }, t.isProfiler = function (e) { return v(e) === s }, t.isPortal = function (e) { return v(e) === o }, t.isStrictMode = function (e) { return v(e) === a } }); (a = s) && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default"); var p = t(function (e) { e.exports = s }), f = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, d = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, l = {}; l[p.ForwardRef] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }; var m = Object.defineProperty, y = Object.getOwnPropertyNames, v = Object.getOwnPropertySymbols, h = Object.getOwnPropertyDescriptor, P = Object.getPrototypeOf, b = Object.prototype; var T = function e(t, r, n) { if ("string" == typeof r) return t; if (b) { var o = P(r); o && o !== b && e(t, o, n) } var i = y(r); v && (i = i.concat(v(r))); for (var a = l[t.$$typeof] || f, s = l[r.$$typeof] || f, p = 0; p < i.length; ++p) { var c = i[p]; if (!(d[c] || n && n[c] || s && s[c] || a && a[c])) { var u = h(r, c); try { m(t, c, u) } catch (e) { } } } return t }, M = function (e, t, r, n, o, i, a, s) { if (!e) { var p; if (void 0 === t) p = Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else { var c = [r, n, o, i, a, s], u = 0; (p = Error(t.replace(/%s/g, function () { return c[u++] }))).name = "Invariant Violation" } throw p.framesToPop = 1, p } }; function c(m, e) { void 0 === e && (e = {}); var t = e.getDisplayName, a = void 0 === t ? function (e) { return "ConnectAdvanced(" + e + ")" } : t, r = e.methodName, s = void 0 === r ? "connectAdvanced" : r, n = e.renderCountProp, p = void 0 === n ? void 0 : n, o = e.shouldHandleStateChanges, c = void 0 === o || o, i = e.storeKey, y = void 0 === i ? "store" : i, u = e.withRef, f = void 0 !== u && u, d = e.forwardRef, v = void 0 !== d && d, l = e.context, h = void 0 === l ? x : l, P = R(e, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"]); M(void 0 === p, "renderCountProp is removed. render counting is built into the latest React dev tools profiling extension"), M(!f, "withRef is removed. To access the wrapped instance, use a ref on the connected component"); var b = "To use a custom Redux store for specific components,  create a custom React context with React.createContext(), and pass the context object to React-Redux's Provider and specific components like:  <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect"; M("store" === y, "storeKey has been removed and does not do anything. " + b); var O = h; return function (e) { var t = e.displayName || e.name || "Component", o = a(t), f = E({}, P, { getDisplayName: a, methodName: s, renderCountProp: p, shouldHandleStateChanges: c, storeKey: y, displayName: o, wrappedComponentName: t, WrappedComponent: e }), d = P.pure, r = g.Component, l = e; d && (r = g.PureComponent); var n = function (u) { function e(e) { var t, o, i, a, s, p, r, n, c; return t = u.call(this, e) || this, M(v ? !e.wrapperProps[y] : !e[y], "Passing redux store in props has been removed and does not do anything. " + b), t.selectDerivedProps = function (e, t, r) { if (d && o === t && i === e) return a; r !== s && (p = m((s = r).dispatch, f)); var n = p(i = e, o = t); return a === n ? a : a = n }, t.selectChildElement = function (e, t) { return e === r && t === n || (c = S.createElement(l, E({}, r = e, { ref: n = t }))), c }, t.renderWrappedComponent = t.renderWrappedComponent.bind(C(C(t))), t } w(e, u); var t = e.prototype; return t.renderWrappedComponent = function (e) { M(e, 'Could not find "store" in the context of "' + o + '". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ' + o + " in connect options."); var t, r = this.props; v && (r = this.props.wrapperProps, t = this.props.forwardedRef); var n = this.selectDerivedProps(e.storeState, r, e.store); return this.selectChildElement(n, t) }, t.render = function () { return S.createElement((this.props.context || O).Consumer, null, this.renderWrappedComponent) }, e }(r); if (n.WrappedComponent = e, n.displayName = o, v) { var i = S.forwardRef(function (e, t) { return S.createElement(n, { wrapperProps: e, forwardedRef: t }) }); return i.displayName = o, i.WrappedComponent = e, T(i, e) } return T(n, e) } } var u = Object.prototype.hasOwnProperty; function O(e, t) { return e === t ? 0 !== e || 0 !== t || 1 / e == 1 / t : e != e && t != t } function j(e, t) { if (O(e, t)) return !0; if ("object" != typeof e || null === e || "object" != typeof t || null === t) return !1; var r = Object.keys(e); if (r.length !== Object.keys(t).length) return !1; for (var n = 0; n < r.length; n++)if (!u.call(t, r[n]) || !O(e[r[n]], t[r[n]])) return !1; return !0 } function _(o) { return function (e, t) { var r = o(e, t); function n() { return r } return n.dependsOnOwnProps = !1, n } } function q(e) { return null != e.dependsOnOwnProps ? !!e.dependsOnOwnProps : 1 !== e.length } function $(o, e) { return function (e, t) { var n = function (e, t) { return n.dependsOnOwnProps ? n.mapToProps(e, t) : n.mapToProps(e) }; return n.dependsOnOwnProps = !0, n.mapToProps = function (e, t) { n.mapToProps = o, n.dependsOnOwnProps = q(o); var r = n(e, t); return "function" == typeof r && (n.mapToProps = r, n.dependsOnOwnProps = q(r), r = n(e, t)), r }, n } } function D(e, t, r) { return E({}, r, e, t) } function N(r, n, o, i) { return function (e, t) { return o(r(e, t), n(i, t), t) } } function F(a, s, p, c, e) { var u, f, d, l, m, y = e.areStatesEqual, v = e.areOwnPropsEqual, h = e.areStatePropsEqual, r = !1; function n(e, t) { var r, n, o = !v(t, f), i = !y(e, u); return u = e, f = t, o && i ? (d = a(u, f), s.dependsOnOwnProps && (l = s(c, f)), m = p(d, l, f)) : o ? (a.dependsOnOwnProps && (d = a(u, f)), s.dependsOnOwnProps && (l = s(c, f)), m = p(d, l, f)) : (i && (r = a(u, f), n = !h(r, d), d = r, n && (m = p(d, l, f))), m) } return function (e, t) { return r ? n(e, t) : (d = a(u = e, f = t), l = s(c, f), m = p(d, l, f), r = !0, m) } } function W(e, t) { var r = t.initMapStateToProps, n = t.initMapDispatchToProps, o = t.initMergeProps, i = R(t, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]), a = r(e, i), s = n(e, i), p = o(e, i); return (i.pure ? F : N)(a, s, p, e, i) } function k(r, e, n) { for (var t = e.length - 1; 0 <= t; t--) { var o = e[t](r); if (o) return o } return function (e, t) { throw Error("Invalid value of type " + typeof r + " for " + n + " argument when connecting component " + t.wrappedComponentName + ".") } } function A(e, t) { return e === t } var H, I, K, U, V, L, Y, z, B, G, J, Q, X = (U = void 0 === (K = (I = void 0 === H ? {} : H).connectHOC) ? c : K, L = void 0 === (V = I.mapStateToPropsFactories) ? [function (e) { return "function" == typeof e ? $(e) : void 0 }, function (e) { return e ? void 0 : _(function () { return {} }) }] : V, z = void 0 === (Y = I.mapDispatchToPropsFactories) ? [function (e) { return "function" == typeof e ? $(e) : void 0 }, function (e) { return e ? void 0 : _(function (e) { return { dispatch: e } }) }, function (t) { return t && "object" == typeof t ? _(function (e) { return r.bindActionCreators(t, e) }) : void 0 }] : Y, G = void 0 === (B = I.mergePropsFactories) ? [function (e) { return "function" == typeof e ? (p = e, function (e, t) { var o, i = t.pure, a = t.areMergedPropsEqual, s = !1; return function (e, t, r) { var n = p(e, t, r); return s ? i && a(n, o) || (o = n) : (s = !0, o = n), o } }) : void 0; var p }, function (e) { return e ? void 0 : function () { return D } }] : B, Q = void 0 === (J = I.selectorFactory) ? W : J, function (e, t, r, n) { void 0 === n && (n = {}); var o = n.pure, i = void 0 === o || o, a = n.areStatesEqual, s = void 0 === a ? A : a, p = n.areOwnPropsEqual, c = void 0 === p ? j : p, u = n.areStatePropsEqual, f = void 0 === u ? j : u, d = n.areMergedPropsEqual, l = void 0 === d ? j : d, m = R(n, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]), y = k(e, L, "mapStateToProps"), v = k(t, z, "mapDispatchToProps"), h = k(r, G, "mergeProps"); return U(Q, E({ methodName: "connect", getDisplayName: function (e) { return "Connect(" + e + ")" }, shouldHandleStateChanges: !!e, initMapStateToProps: y, initMapDispatchToProps: v, initMergeProps: h, pure: i, areStatesEqual: s, areOwnPropsEqual: c, areStatePropsEqual: f, areMergedPropsEqual: l }, m)) }); e.Provider = i, e.connectAdvanced = c, e.ReactReduxContext = x, e.connect = X, Object.defineProperty(e, "__esModule", { value: !0 }) });;
/**
  @license
  Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt
 **/
/**
  @license
  Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt
 **/
/*
 *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0

    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.

    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
*****************************************************************************/
(function (k, h) { "object" === typeof exports && "undefined" !== typeof module ? h(exports) : "function" === typeof define && define.amd ? define("rxjs", ["exports"], h) : h(k.rxjs = {}) })(this, function (k) {
    function h(c, a) { function b() { this.constructor = c } Ib(c, a); c.prototype = null === a ? Object.create(a) : (b.prototype = a.prototype, new b) } function P(c) { return "function" === typeof c } function Q(c) { setTimeout(function () { throw c; }, 0) } function ra(c) { return null !== c && "object" === typeof c } function Ka(c) {
        return c.reduce(function (a, b) {
            return a.concat(b instanceof
                Y ? b.errors : b)
        }, [])
    } function sa(c) { for (; c;) { var a = c.destination, b = c.isStopped; if (c.closed || b) return !1; c = a && a instanceof m ? a : null } return !0 } function D() { } function ta() { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; return La(c) } function La(c) { return c ? 1 === c.length ? c[0] : function (a) { return c.reduce(function (b, a) { return a(b) }, a) } : D } function Ma(c) { c || (c = C.Promise || Promise); if (!c) throw Error("no Promise impl found"); return c } function ua() { return function (c) { return c.lift(new Jb(c)) } } function R(c) {
        return c ?
            Kb(c) : S
    } function Kb(c) { return new n(function (a) { return c.schedule(function () { return a.complete() }) }) } function A(c) { return c && "function" === typeof c.schedule } function va(c, a) { return new n(function (b) { var d = new t, e = 0; d.add(a.schedule(function () { e === c.length ? b.complete() : (b.next(c[e++]), b.closed || d.add(this.schedule())) })); return d }) } function Z(c, a) { return a ? va(c, a) : new n(Na(c)) } function ga() { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; a = c[c.length - 1]; return A(a) ? (c.pop(), va(c, a)) : Z(c) }
    function wa(c, a) { return a ? new n(function (b) { return a.schedule(Lb, 0, { error: c, subscriber: b }) }) : new n(function (b) { return b.error(c) }) } function Lb(c) { c.subscriber.error(c.error) } function J(c) { return c } function B(c, a) { return function (b) { if ("function" !== typeof c) throw new TypeError("argument is not a function. Are you looking for `mapTo()`?"); return b.lift(new Mb(c, a)) } } function Oa(c, a, b) {
        if (a) if (A(a)) b = a; else return function () {
            for (var d = [], e = 0; e < arguments.length; e++)d[e] = arguments[e]; return Oa(c, b).apply(void 0,
                d).pipe(B(function (b) { return x(b) ? a.apply(void 0, b) : a(b) }))
        }; return function () { for (var a = [], e = 0; e < arguments.length; e++)a[e] = arguments[e]; var f = this, g, l = { context: f, subject: g, callbackFunc: c, scheduler: b }; return new n(function (d) { if (b) return b.schedule(Nb, 0, { args: a, subscriber: d, params: l }); if (!g) { g = new T; try { c.apply(f, a.concat([function () { for (var b = [], a = 0; a < arguments.length; a++)b[a] = arguments[a]; g.next(1 >= b.length ? b[0] : b); g.complete() }])) } catch (K) { sa(g) ? g.error(K) : console.warn(K) } } return g.subscribe(d) }) }
    }
    function Nb(c) { var a = this, b = c.args, d = c.subscriber; c = c.params; var e = c.callbackFunc, f = c.context, g = c.scheduler, l = c.subject; if (!l) { l = c.subject = new T; try { e.apply(f, b.concat([function () { for (var b = [], c = 0; c < arguments.length; c++)b[c] = arguments[c]; a.add(g.schedule(Ob, 0, { value: 1 >= b.length ? b[0] : b, subject: l })) }])) } catch (u) { l.error(u) } } this.add(l.subscribe(d)) } function Ob(c) { var a = c.subject; a.next(c.value); a.complete() } function Pa(c, a, b) {
        if (a) if (A(a)) b = a; else return function () {
            for (var d = [], e = 0; e < arguments.length; e++)d[e] =
                arguments[e]; return Pa(c, b).apply(void 0, d).pipe(B(function (b) { return x(b) ? a.apply(void 0, b) : a(b) }))
        }; return function () {
            for (var a = [], e = 0; e < arguments.length; e++)a[e] = arguments[e]; var f = { subject: void 0, args: a, callbackFunc: c, scheduler: b, context: this }; return new n(function (d) {
                var e = f.context, g = f.subject; if (b) return b.schedule(Pb, 0, { params: f, subscriber: d, context: e }); if (!g) {
                    g = f.subject = new T; try {
                        c.apply(e, a.concat([function () {
                            for (var b = [], a = 0; a < arguments.length; a++)b[a] = arguments[a]; (a = b.shift()) ? g.error(a) :
                                (g.next(1 >= b.length ? b[0] : b), g.complete())
                        }]))
                    } catch (K) { sa(g) ? g.error(K) : console.warn(K) }
                } return g.subscribe(d)
            })
        }
    } function Pb(c) {
        var a = this, b = c.params, d = c.subscriber; c = c.context; var e = b.callbackFunc, f = b.args, g = b.scheduler, l = b.subject; if (!l) {
            l = b.subject = new T; try { e.apply(c, f.concat([function () { for (var b = [], c = 0; c < arguments.length; c++)b[c] = arguments[c]; (c = b.shift()) ? a.add(g.schedule(Qa, 0, { err: c, subject: l })) : a.add(g.schedule(Qb, 0, { value: 1 >= b.length ? b[0] : b, subject: l })) }])) } catch (u) {
                this.add(g.schedule(Qa,
                    0, { err: u, subject: l }))
            }
        } this.add(l.subscribe(d))
    } function Qb(c) { var a = c.subject; a.next(c.value); a.complete() } function Qa(c) { c.subject.error(c.err) } function Ra(c) { return !!c && "function" !== typeof c.subscribe && "function" === typeof c.then } function p(c, a, b, d, e) { void 0 === e && (e = new G(c, b, d)); if (!e.closed) return a instanceof n ? a.subscribe(e) : ha(a)(e) } function Rb(c, a) {
        return new n(function (b) {
            var d = new t; d.add(a.schedule(function () {
                var e = c[U](); d.add(e.subscribe({
                    next: function (c) { d.add(a.schedule(function () { return b.next(c) })) },
                    error: function (c) { d.add(a.schedule(function () { return b.error(c) })) }, complete: function () { d.add(a.schedule(function () { return b.complete() })) }
                }))
            })); return d
        })
    } function Sb(c, a) { return new n(function (b) { var d = new t; d.add(a.schedule(function () { return c.then(function (c) { d.add(a.schedule(function () { b.next(c); d.add(a.schedule(function () { return b.complete() })) })) }, function (c) { d.add(a.schedule(function () { return b.error(c) })) }) })); return d }) } function Tb(c, a) {
        if (!c) throw Error("Iterable cannot be null"); return new n(function (b) {
            var d =
                new t, e; d.add(function () { e && "function" === typeof e.return && e.return() }); d.add(a.schedule(function () { e = c[E](); d.add(a.schedule(function () { if (!b.closed) { var a, c; try { var d = e.next(); a = d.value; c = d.done } catch (u) { b.error(u); return } c ? b.complete() : (b.next(a), this.schedule()) } })) })); return d
        })
    } function Sa(c, a) {
        if (null != c) { if (c && "function" === typeof c[U]) return Rb(c, a); if (Ra(c)) return Sb(c, a); if (Ta(c)) return va(c, a); if (c && "function" === typeof c[E] || "string" === typeof c) return Tb(c, a) } throw new TypeError((null !==
            c && typeof c || c) + " is not observable");
    } function F(c, a) { return a ? Sa(c, a) : c instanceof n ? c : new n(ha(c)) } function L(c, a, b) { void 0 === b && (b = Number.POSITIVE_INFINITY); if ("function" === typeof a) return function (d) { return d.pipe(L(function (b, d) { return F(c(b, d)).pipe(B(function (c, e) { return a(b, c, d, e) })) }, b)) }; "number" === typeof a && (b = a); return function (a) { return a.lift(new Ub(c, b)) } } function xa(c) { void 0 === c && (c = Number.POSITIVE_INFINITY); return L(J, c) } function Ua() { return xa(1) } function aa() {
        for (var c = [], a = 0; a <
            arguments.length; a++)c[a] = arguments[a]; return Ua()(ga.apply(void 0, c))
    } function ya(c) { return new n(function (a) { var b; try { b = c() } catch (d) { a.error(d); return } return (b ? F(b) : R()).subscribe(a) }) } function ia(c, a) {
        return new n(function (b) {
            var d = c.length; if (0 === d) b.complete(); else for (var e = Array(d), f = 0, g = 0, l = function (l) {
                var h = F(c[l]), u = !1; b.add(h.subscribe({
                    next: function (b) { u || (u = !0, g++); e[l] = b }, error: function (a) { return b.error(a) }, complete: function () {
                        f++; f !== d && u || (g === d && b.next(a ? a.reduce(function (b, a, c) {
                            return b[a] =
                                e[c], b
                        }, {}) : e), b.complete())
                    }
                }))
            }, h = 0; h < d; h++)l(h)
        })
    } function Va(c, a, b, d) { P(b) && (d = b, b = void 0); return d ? Va(c, a, b).pipe(B(function (b) { return x(b) ? d.apply(void 0, b) : d(b) })) : new n(function (d) { Wa(c, a, function (b) { 1 < arguments.length ? d.next(Array.prototype.slice.call(arguments)) : d.next(b) }, d, b) }) } function Wa(c, a, b, d, e) {
        var f; if (c && "function" === typeof c.addEventListener && "function" === typeof c.removeEventListener) c.addEventListener(a, b, e), f = function () { return c.removeEventListener(a, b, e) }; else if (c && "function" ===
            typeof c.on && "function" === typeof c.off) c.on(a, b), f = function () { return c.off(a, b) }; else if (c && "function" === typeof c.addListener && "function" === typeof c.removeListener) c.addListener(a, b), f = function () { return c.removeListener(a, b) }; else if (c && c.length) for (var g = 0, l = c.length; g < l; g++)Wa(c[g], a, b, d, e); else throw new TypeError("Invalid event target"); d.add(f)
    } function Xa(c, a, b) {
        return b ? Xa(c, a).pipe(B(function (a) { return x(a) ? b.apply(void 0, a) : b(a) })) : new n(function (b) {
            var d = function () {
                for (var a = [], c = 0; c < arguments.length; c++)a[c] =
                    arguments[c]; return b.next(1 === a.length ? a[0] : a)
            }, f; try { f = c(d) } catch (g) { b.error(g); return } if (P(a)) return function () { return a(d, f) }
        })
    } function Yb(c) { var a = c.subscriber, b = c.condition; if (!a.closed) { if (c.needIterate) try { c.state = c.iterate(c.state) } catch (f) { a.error(f); return } else c.needIterate = !0; if (b) { var d = void 0; try { d = b(c.state) } catch (f) { a.error(f); return } if (!d) { a.complete(); return } if (a.closed) return } var e; try { e = c.resultSelector(c.state) } catch (f) { a.error(f); return } if (!a.closed && (a.next(e), !a.closed)) return this.schedule(c) } }
    function V(c) { return !x(c) && 0 <= c - parseFloat(c) + 1 } function Zb(c) { var a = c.subscriber, b = c.counter; c = c.period; a.next(b); this.schedule({ subscriber: a, counter: b + 1, period: c }, c) } function Ya() { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; var a = Number.POSITIVE_INFINITY, b = null, d = c[c.length - 1]; A(d) ? (b = c.pop(), 1 < c.length && "number" === typeof c[c.length - 1] && (a = c.pop())) : "number" === typeof d && (a = c.pop()); return null === b && 1 === c.length && c[0] instanceof n ? c[0] : xa(a)(Z(c, b)) } function za() {
        for (var c = [], a = 0; a <
            arguments.length; a++)c[a] = arguments[a]; if (0 === c.length) return S; var b = c[0], d = c.slice(1); return 1 === c.length && x(b) ? za.apply(void 0, b) : new n(function (a) { var c = function () { return a.add(za.apply(void 0, d).subscribe(a)) }; return F(b).subscribe({ next: function (b) { a.next(b) }, error: c, complete: c }) })
    } function $b(c) { var a = c.keys, b = c.index, d = c.subscriber, e = c.subscription; c = c.obj; if (!d.closed) if (b < a.length) { var f = a[b]; d.next([f, c[f]]); e.add(this.schedule({ keys: a, index: b + 1, subscriber: d, subscription: e, obj: c })) } else d.complete() }
    function Za(c, a) { function b() { return !b.pred.apply(b.thisArg, arguments) } b.pred = c; b.thisArg = a; return b } function H(c, a) { return function (b) { return b.lift(new ac(c, a)) } } function $a() { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; if (1 === c.length) if (x(c[0])) c = c[0]; else return c[0]; return Z(c, void 0).lift(new bc) } function cc(c) { var a = c.start, b = c.index, d = c.subscriber; b >= c.count ? d.complete() : (d.next(a), d.closed || (c.index = b + 1, c.start = a + 1, this.schedule(c))) } function ab(c, a, b) {
    void 0 === c && (c = 0); var d =
        -1; V(a) ? d = 1 > Number(a) && 1 || Number(a) : A(a) && (b = a); A(b) || (b = y); return new n(function (a) { var e = V(c) ? c : +c - b.now(); return b.schedule(dc, e, { index: 0, period: d, subscriber: a }) })
    } function dc(c) { var a = c.index, b = c.period, d = c.subscriber; d.next(a); if (!d.closed) { if (-1 === b) return d.complete(); c.index = a + 1; this.schedule(c, b) } } function bb() { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; a = c[c.length - 1]; "function" === typeof a && c.pop(); return Z(c, void 0).lift(new cb(a)) } function db(c) { return function (a) { return a.lift(new ec(c)) } }
    function eb(c) { var a = c.subscriber, b = c.context; b && a.closeContext(b); a.closed || (c.context = a.openContext(), c.context.closeAction = this.schedule(c, c.bufferTimeSpan)) } function fc(c) { var a = c.bufferCreationInterval, b = c.bufferTimeSpan, d = c.subscriber, e = c.scheduler, f = d.openContext(); d.closed || (d.add(f.closeAction = e.schedule(fb, b, { subscriber: d, context: f })), this.schedule(c, a)) } function fb(c) { c.subscriber.closeContext(c.context) } function gb(c, a) { return L(c, a, 1) } function gc(c) { c.debouncedNext() } function ba(c) {
    void 0 ===
        c && (c = null); return function (a) { return a.lift(new hc(c)) }
    } function hb(c, a) { return function (b) { return b.lift(new ic(c, a)) } } function ja(c) { void 0 === c && (c = jc); return function (a) { return a.lift(new kc(c)) } } function jc() { return new ca } function Aa(c) { return function (a) { return 0 === c ? R() : a.lift(new lc(c)) } } function ib(c, a) { return a ? function (b) { return b.pipe(ib(function (b, e) { return F(c(b, e)).pipe(B(function (c, d) { return a(b, c, e, d) })) })) } : function (b) { return b.lift(new mc(c)) } } function ka(c) {
        return function (a) {
            return 0 ===
                c ? R() : a.lift(new nc(c))
        }
    } function la(c, a) { var b = !1; 2 <= arguments.length && (b = !0); return function (d) { return d.lift(new oc(c, a, b)) } } function ma(c, a) { return 2 <= arguments.length ? function (b) { return ta(la(c, a), ka(1), ba(a))(b) } : function (b) { return ta(la(function (b, a, f) { return c(b, a, f + 1) }), ka(1))(b) } } function M(c, a) { return function (b) { var d; d = "function" === typeof c ? c : function () { return c }; if ("function" === typeof a) return b.lift(new pc(d, a)); var e = Object.create(b, qc); e.source = b; e.subjectFactory = d; return e } } function rc(c,
        a) { return function (b) { var d = b; for (b = 0; b < a; b++)if (d = d[c[b]], "undefined" === typeof d) return; return d } } function sc(c) { var a = c.period; c.subscriber.notifyNext(); this.schedule(c, a) } function tc() { return new v } function uc(c) {
            var a = c.bufferSize, b = void 0 === a ? Number.POSITIVE_INFINITY : a, a = c.windowTime, d = void 0 === a ? Number.POSITIVE_INFINITY : a, e = c.refCount, f = c.scheduler, g, l = 0, h, k = !1, r = !1; return function (a) {
                l++; if (!g || k) k = !1, g = new W(b, d, f), h = a.subscribe({
                    next: function (b) { g.next(b) }, error: function (b) { k = !0; g.error(b) },
                    complete: function () { r = !0; g.complete() }
                }); var c = g.subscribe(this); this.add(function () { l--; c.unsubscribe(); h && !r && e && 0 === l && (h.unsubscribe(), g = h = void 0) })
            }
        } function da(c, a) { return "function" === typeof a ? function (b) { return b.pipe(da(function (b, e) { return F(c(b, e)).pipe(B(function (c, d) { return a(b, c, e, d) })) })) } : function (b) { return b.lift(new vc(c)) } } function wc(c) { c.subscriber.clearThrottle() } function jb(c, a, b) {
        void 0 === b && (b = y); return function (d) {
            var e = c instanceof Date && !isNaN(+c), f = e ? +c - b.now() : Math.abs(c);
            return d.lift(new xc(f, e, a, b))
        }
        } function yc(c, a, b) { if (0 === b) return [a]; c.push(a); return c } function zc(c) { var a = c.subscriber, b = c.windowTimeSpan, d = c.window; d && a.closeWindow(d); c.window = a.openWindow(); this.schedule(c, b) } function Ac(c) { var a = c.windowTimeSpan, b = c.subscriber, d = c.scheduler, e = c.windowCreationInterval, f = b.openWindow(), g = { action: this, subscription: null }; g.subscription = d.schedule(kb, a, { subscriber: b, window: f, context: g }); this.add(g.subscription); this.schedule(c, e) } function kb(c) {
            var a = c.subscriber,
            b = c.window; (c = c.context) && c.action && c.subscription && c.action.remove(c.subscription); a.closeWindow(b)
        } function lb(c, a) { for (var b = 0, d = a.length; b < d; b++)for (var e = a[b], f = Object.getOwnPropertyNames(e.prototype), g = 0, l = f.length; g < l; g++) { var h = f[g]; c.prototype[h] = e.prototype[h] } } function Bc(c, a) { void 0 === a && (a = null); return new N({ method: "GET", url: c, headers: a }) } function Cc(c, a, b) { return new N({ method: "POST", url: c, body: a, headers: b }) } function Dc(c, a) { return new N({ method: "DELETE", url: c, headers: a }) } function Ec(c,
            a, b) { return new N({ method: "PUT", url: c, body: a, headers: b }) } function Fc(c, a, b) { return new N({ method: "PATCH", url: c, body: a, headers: b }) } function Gc(c, a) { return Hc(new N({ method: "GET", url: c, responseType: "json", headers: a })) } function mb(c, a) { switch (c) { case "json": return c = "response" in a ? a.responseType ? a.response : JSON.parse(a.response || a.responseText || "null") : JSON.parse(a.responseText || "null"), c; case "xml": return a.responseXML; default: return "response" in a ? a.response : a.responseText } } var Ib = Object.setPrototypeOf ||
                { __proto__: [] } instanceof Array && function (c, a) { c.__proto__ = a } || function (c, a) { for (var b in a) a.hasOwnProperty(b) && (c[b] = a[b]) }, Ic = Object.assign || function (c) { for (var a, b = 1, d = arguments.length; b < d; b++) { a = arguments[b]; for (var e in a) Object.prototype.hasOwnProperty.call(a, e) && (c[e] = a[e]) } return c }, Ba = !1, C = {
                    Promise: void 0, set useDeprecatedSynchronousErrorHandling(c) {
                        c ? console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n" + Error().stack) : Ba && console.log("RxJS: Back to a better error behavior. Thank you. \x3c3");
                        Ba = c
                    }, get useDeprecatedSynchronousErrorHandling() { return Ba }
                }, na = { closed: !0, next: function (c) { }, error: function (c) { if (C.useDeprecatedSynchronousErrorHandling) throw c; Q(c) }, complete: function () { } }, x = function () { return Array.isArray || function (c) { return c && "number" === typeof c.length } }(), Y = function () {
                    function c(a) {
                        Error.call(this); this.message = a ? a.length + " errors occurred during unsubscription:\n" + a.map(function (b, a) { return a + 1 + ") " + b.toString() }).join("\n  ") : ""; this.name = "UnsubscriptionError"; this.errors =
                            a; return this
                    } c.prototype = Object.create(Error.prototype); return c
                }(), t = function () {
                    function c(a) { this.closed = !1; this._subscriptions = this._parentOrParents = null; a && (this._unsubscribe = a) } c.prototype.unsubscribe = function () {
                        var a; if (!this.closed) {
                            var b = this._parentOrParents, d = this._unsubscribe, e = this._subscriptions; this.closed = !0; this._subscriptions = this._parentOrParents = null; if (b instanceof c) b.remove(this); else if (null !== b) for (var f = 0; f < b.length; ++f)b[f].remove(this); if (P(d)) try { d.call(this) } catch (g) {
                                a =
                                g instanceof Y ? Ka(g.errors) : [g]
                            } if (x(e)) for (f = -1, b = e.length; ++f < b;)if (d = e[f], ra(d)) try { d.unsubscribe() } catch (g) { a = a || [], g instanceof Y ? a = a.concat(Ka(g.errors)) : a.push(g) } if (a) throw new Y(a);
                        }
                    }; c.prototype.add = function (a) {
                        var b = a; if (!a) return c.EMPTY; switch (typeof a) {
                            case "function": b = new c(a); case "object": if (b === this || b.closed || "function" !== typeof b.unsubscribe) return b; if (this.closed) return b.unsubscribe(), b; b instanceof c || (a = b, b = new c, b._subscriptions = [a]); break; default: throw Error("unrecognized teardown " +
                                a + " added to Subscription.");
                        }a = b._parentOrParents; if (null === a) b._parentOrParents = this; else if (a instanceof c) { if (a === this) return b; b._parentOrParents = [a, this] } else if (-1 === a.indexOf(this)) a.push(this); else return b; a = this._subscriptions; null === a ? this._subscriptions = [b] : a.push(b); return b
                    }; c.prototype.remove = function (a) { var b = this._subscriptions; b && (a = b.indexOf(a), -1 !== a && b.splice(a, 1)) }; c.EMPTY = function (a) { a.closed = !0; return a }(new c); return c
                }(), oa = "function" === typeof Symbol ? Symbol("rxSubscriber") :
                    "@@rxSubscriber_" + Math.random(), m = function (c) {
                        function a(b, d, e) { var f = c.call(this) || this; f.syncErrorValue = null; f.syncErrorThrown = !1; f.syncErrorThrowable = !1; f.isStopped = !1; switch (arguments.length) { case 0: f.destination = na; break; case 1: if (!b) { f.destination = na; break } if ("object" === typeof b) { b instanceof a ? (f.syncErrorThrowable = b.syncErrorThrowable, f.destination = b, b.add(f)) : (f.syncErrorThrowable = !0, f.destination = new nb(f, b)); break } default: f.syncErrorThrowable = !0, f.destination = new nb(f, b, d, e) }return f } h(a,
                            c); a.prototype[oa] = function () { return this }; a.create = function (b, c, e) { b = new a(b, c, e); b.syncErrorThrowable = !1; return b }; a.prototype.next = function (b) { this.isStopped || this._next(b) }; a.prototype.error = function (b) { this.isStopped || (this.isStopped = !0, this._error(b)) }; a.prototype.complete = function () { this.isStopped || (this.isStopped = !0, this._complete()) }; a.prototype.unsubscribe = function () { this.closed || (this.isStopped = !0, c.prototype.unsubscribe.call(this)) }; a.prototype._next = function (b) { this.destination.next(b) };
                        a.prototype._error = function (b) { this.destination.error(b); this.unsubscribe() }; a.prototype._complete = function () { this.destination.complete(); this.unsubscribe() }; a.prototype._unsubscribeAndRecycle = function () { var b = this._parentOrParents; this._parentOrParents = null; this.unsubscribe(); this.isStopped = this.closed = !1; this._parentOrParents = b; return this }; return a
                    }(t), nb = function (c) {
                        function a(b, a, e, f) {
                            var d = c.call(this) || this; d._parentSubscriber = b; var l; b = d; P(a) ? l = a : a && (l = a.next, e = a.error, f = a.complete, a !== na &&
                                (b = Object.create(a), P(b.unsubscribe) && d.add(b.unsubscribe.bind(b)), b.unsubscribe = d.unsubscribe.bind(d))); d._context = b; d._next = l; d._error = e; d._complete = f; return d
                        } h(a, c); a.prototype.next = function (b) { if (!this.isStopped && this._next) { var a = this._parentSubscriber; C.useDeprecatedSynchronousErrorHandling && a.syncErrorThrowable ? this.__tryOrSetError(a, this._next, b) && this.unsubscribe() : this.__tryOrUnsub(this._next, b) } }; a.prototype.error = function (b) {
                            if (!this.isStopped) {
                                var a = this._parentSubscriber, c = C.useDeprecatedSynchronousErrorHandling;
                                if (this._error) c && a.syncErrorThrowable ? this.__tryOrSetError(a, this._error, b) : this.__tryOrUnsub(this._error, b), this.unsubscribe(); else if (a.syncErrorThrowable) c ? (a.syncErrorValue = b, a.syncErrorThrown = !0) : Q(b), this.unsubscribe(); else { this.unsubscribe(); if (c) throw b; Q(b) }
                            }
                        }; a.prototype.complete = function () {
                            var b = this; if (!this.isStopped) {
                                var a = this._parentSubscriber; if (this._complete) {
                                    var c = function () { return b._complete.call(b._context) }; C.useDeprecatedSynchronousErrorHandling && a.syncErrorThrowable ? this.__tryOrSetError(a,
                                        c) : this.__tryOrUnsub(c)
                                } this.unsubscribe()
                            }
                        }; a.prototype.__tryOrUnsub = function (b, a) { try { b.call(this._context, a) } catch (e) { this.unsubscribe(); if (C.useDeprecatedSynchronousErrorHandling) throw e; Q(e) } }; a.prototype.__tryOrSetError = function (b, a, c) { if (!C.useDeprecatedSynchronousErrorHandling) throw Error("bad call"); try { a.call(this._context, c) } catch (f) { return C.useDeprecatedSynchronousErrorHandling ? (b.syncErrorValue = f, b.syncErrorThrown = !0) : Q(f), !0 } return !1 }; a.prototype._unsubscribe = function () {
                            var b = this._parentSubscriber;
                            this._parentSubscriber = this._context = null; b.unsubscribe()
                        }; return a
                    }(m), U = "function" === typeof Symbol && Symbol.observable || "@@observable", n = function () {
                        function c(a) { this._isScalar = !1; a && (this._subscribe = a) } c.prototype.lift = function (a) { var b = new c; b.source = this; b.operator = a; return b }; c.prototype.subscribe = function (a, b, c) {
                            var d = this.operator; a: { if (a) { if (a instanceof m) break a; if (a[oa]) { a = a[oa](); break a } } a = a || b || c ? new m(a, b, c) : new m(na) } d ? a.add(d.call(a, this.source)) : a.add(this.source || C.useDeprecatedSynchronousErrorHandling &&
                                !a.syncErrorThrowable ? this._subscribe(a) : this._trySubscribe(a)); if (C.useDeprecatedSynchronousErrorHandling && a.syncErrorThrowable && (a.syncErrorThrowable = !1, a.syncErrorThrown)) throw a.syncErrorValue; return a
                        }; c.prototype._trySubscribe = function (a) { try { return this._subscribe(a) } catch (b) { C.useDeprecatedSynchronousErrorHandling && (a.syncErrorThrown = !0, a.syncErrorValue = b), sa(a) ? a.error(b) : console.warn(b) } }; c.prototype.forEach = function (a, b) {
                            var c = this; b = Ma(b); return new b(function (b, d) {
                                var e; e = c.subscribe(function (b) {
                                    try { a(b) } catch (u) {
                                    d(u),
                                        e && e.unsubscribe()
                                    }
                                }, d, b)
                            })
                        }; c.prototype._subscribe = function (a) { var b = this.source; return b && b.subscribe(a) }; c.prototype[U] = function () { return this }; c.prototype.pipe = function () { for (var a = [], b = 0; b < arguments.length; b++)a[b] = arguments[b]; return 0 === a.length ? this : La(a)(this) }; c.prototype.toPromise = function (a) { var b = this; a = Ma(a); return new a(function (a, c) { var d; b.subscribe(function (b) { return d = b }, function (b) { return c(b) }, function () { return a(d) }) }) }; c.create = function (a) { return new c(a) }; return c
                    }(), I = function () {
                        function c() {
                            Error.call(this);
                            this.message = "object unsubscribed"; this.name = "ObjectUnsubscribedError"; return this
                        } c.prototype = Object.create(Error.prototype); return c
                    }(), ob = function (c) { function a(b, a) { var d = c.call(this) || this; d.subject = b; d.subscriber = a; d.closed = !1; return d } h(a, c); a.prototype.unsubscribe = function () { if (!this.closed) { this.closed = !0; var b = this.subject, a = b.observers; this.subject = null; !a || 0 === a.length || b.isStopped || b.closed || (b = a.indexOf(this.subscriber), -1 !== b && a.splice(b, 1)) } }; return a }(t), pb = function (c) {
                        function a(b) {
                            var a =
                                c.call(this, b) || this; a.destination = b; return a
                        } h(a, c); return a
                    }(m), v = function (c) {
                        function a() { var b = c.call(this) || this; b.observers = []; b.closed = !1; b.isStopped = !1; b.hasError = !1; b.thrownError = null; return b } h(a, c); a.prototype[oa] = function () { return new pb(this) }; a.prototype.lift = function (b) { var a = new Ca(this, this); a.operator = b; return a }; a.prototype.next = function (b) { if (this.closed) throw new I; if (!this.isStopped) for (var a = this.observers, c = a.length, a = a.slice(), f = 0; f < c; f++)a[f].next(b) }; a.prototype.error = function (b) {
                            if (this.closed) throw new I;
                            this.hasError = !0; this.thrownError = b; this.isStopped = !0; for (var a = this.observers, c = a.length, a = a.slice(), f = 0; f < c; f++)a[f].error(b); this.observers.length = 0
                        }; a.prototype.complete = function () { if (this.closed) throw new I; this.isStopped = !0; for (var b = this.observers, a = b.length, b = b.slice(), c = 0; c < a; c++)b[c].complete(); this.observers.length = 0 }; a.prototype.unsubscribe = function () { this.closed = this.isStopped = !0; this.observers = null }; a.prototype._trySubscribe = function (b) {
                            if (this.closed) throw new I; return c.prototype._trySubscribe.call(this,
                                b)
                        }; a.prototype._subscribe = function (b) { if (this.closed) throw new I; if (this.hasError) return b.error(this.thrownError), t.EMPTY; if (this.isStopped) return b.complete(), t.EMPTY; this.observers.push(b); return new ob(this, b) }; a.prototype.asObservable = function () { var b = new n; b.source = this; return b }; a.create = function (b, a) { return new Ca(b, a) }; return a
                    }(n), Ca = function (c) {
                        function a(b, a) { var d = c.call(this) || this; d.destination = b; d.source = a; return d } h(a, c); a.prototype.next = function (b) {
                            var a = this.destination; a && a.next &&
                                a.next(b)
                        }; a.prototype.error = function (b) { var a = this.destination; a && a.error && this.destination.error(b) }; a.prototype.complete = function () { var b = this.destination; b && b.complete && this.destination.complete() }; a.prototype._subscribe = function (b) { return this.source ? this.source.subscribe(b) : t.EMPTY }; return a
                    }(v), Jb = function () { function c(a) { this.connectable = a } c.prototype.call = function (a, b) { var c = this.connectable; c._refCount++; a = new Jc(a, c); b = b.subscribe(a); a.closed || (a.connection = c.connect()); return b }; return c }(),
                Jc = function (c) { function a(b, a) { b = c.call(this, b) || this; b.connectable = a; return b } h(a, c); a.prototype._unsubscribe = function () { var b = this.connectable; if (b) { this.connectable = null; var a = b._refCount; 0 >= a ? this.connection = null : (b._refCount = a - 1, 1 < a ? this.connection = null : (a = this.connection, b = b._connection, this.connection = null, !b || a && b !== a || b.unsubscribe())) } else this.connection = null }; return a }(m), qb = function (c) {
                    function a(b, a) {
                        var d = c.call(this) || this; d.source = b; d.subjectFactory = a; d._refCount = 0; d._isComplete =
                            !1; return d
                    } h(a, c); a.prototype._subscribe = function (b) { return this.getSubject().subscribe(b) }; a.prototype.getSubject = function () { var b = this._subject; if (!b || b.isStopped) this._subject = this.subjectFactory(); return this._subject }; a.prototype.connect = function () { var b = this._connection; b || (this._isComplete = !1, b = this._connection = new t, b.add(this.source.subscribe(new Kc(this.getSubject(), this))), b.closed && (this._connection = null, b = t.EMPTY)); return b }; a.prototype.refCount = function () { return ua()(this) }; return a
                }(n),
                qc = function () { var c = qb.prototype; return { operator: { value: null }, _refCount: { value: 0, writable: !0 }, _subject: { value: null, writable: !0 }, _connection: { value: null, writable: !0 }, _subscribe: { value: c._subscribe }, _isComplete: { value: c._isComplete, writable: !0 }, getSubject: { value: c.getSubject }, connect: { value: c.connect }, refCount: { value: c.refCount } } }(), Kc = function (c) {
                    function a(b, a) { b = c.call(this, b) || this; b.connectable = a; return b } h(a, c); a.prototype._error = function (b) { this._unsubscribe(); c.prototype._error.call(this, b) };
                    a.prototype._complete = function () { this.connectable._isComplete = !0; this._unsubscribe(); c.prototype._complete.call(this) }; a.prototype._unsubscribe = function () { var b = this.connectable; if (b) { this.connectable = null; var a = b._connection; b._refCount = 0; b._subject = null; b._connection = null; a && a.unsubscribe() } }; return a
                }(pb); (function (c) {
                    function a(b, a) { b = c.call(this, b) || this; b.connectable = a; return b } h(a, c); a.prototype._unsubscribe = function () {
                        var b = this.connectable; if (b) {
                        this.connectable = null; var a = b._refCount; 0 >=
                            a ? this.connection = null : (b._refCount = a - 1, 1 < a ? this.connection = null : (a = this.connection, b = b._connection, this.connection = null, !b || a && b !== a || b.unsubscribe()))
                        } else this.connection = null
                    }; return a
                })(m); var Mc = function () { function c(a, b, c, e) { this.keySelector = a; this.elementSelector = b; this.durationSelector = c; this.subjectSelector = e } c.prototype.call = function (a, b) { return b.subscribe(new Lc(a, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector)) }; return c }(), Lc = function (c) {
                    function a(b,
                        a, e, f, g) { b = c.call(this, b) || this; b.keySelector = a; b.elementSelector = e; b.durationSelector = f; b.subjectSelector = g; b.groups = null; b.attemptedToUnsubscribe = !1; b.count = 0; return b } h(a, c); a.prototype._next = function (b) { var a; try { a = this.keySelector(b) } catch (e) { this.error(e); return } this._group(b, a) }; a.prototype._group = function (b, a) {
                            var c = this.groups; c || (c = this.groups = new Map); var d = c.get(a), g; if (this.elementSelector) try { g = this.elementSelector(b) } catch (l) { this.error(l) } else g = b; if (!d && (d = this.subjectSelector ? this.subjectSelector() :
                                new v, c.set(a, d), b = new Da(a, d, this), this.destination.next(b), this.durationSelector)) { b = void 0; try { b = this.durationSelector(new Da(a, d)) } catch (l) { this.error(l); return } this.add(b.subscribe(new Nc(a, d, this))) } d.closed || d.next(g)
                        }; a.prototype._error = function (b) { var a = this.groups; a && (a.forEach(function (a, c) { a.error(b) }), a.clear()); this.destination.error(b) }; a.prototype._complete = function () { var b = this.groups; b && (b.forEach(function (b, a) { b.complete() }), b.clear()); this.destination.complete() }; a.prototype.removeGroup =
                            function (b) { this.groups.delete(b) }; a.prototype.unsubscribe = function () { this.closed || (this.attemptedToUnsubscribe = !0, 0 === this.count && c.prototype.unsubscribe.call(this)) }; return a
                }(m), Nc = function (c) { function a(b, a, e) { var d = c.call(this, a) || this; d.key = b; d.group = a; d.parent = e; return d } h(a, c); a.prototype._next = function (b) { this.complete() }; a.prototype._unsubscribe = function () { var b = this.parent, a = this.key; this.key = this.parent = null; b && b.removeGroup(a) }; return a }(m), Da = function (c) {
                    function a(b, a, e) {
                        var d = c.call(this) ||
                            this; d.key = b; d.groupSubject = a; d.refCountSubscription = e; return d
                    } h(a, c); a.prototype._subscribe = function (b) { var a = new t, c = this.refCountSubscription, f = this.groupSubject; c && !c.closed && a.add(new Oc(c)); a.add(f.subscribe(b)); return a }; return a
                }(n), Oc = function (c) {
                    function a(b) { var a = c.call(this) || this; a.parent = b; b.count++; return a } h(a, c); a.prototype.unsubscribe = function () { var b = this.parent; b.closed || this.closed || (c.prototype.unsubscribe.call(this), --b.count, 0 === b.count && b.attemptedToUnsubscribe && b.unsubscribe()) };
                    return a
                }(t), rb = function (c) {
                    function a(b) { var a = c.call(this) || this; a._value = b; return a } h(a, c); Object.defineProperty(a.prototype, "value", { get: function () { return this.getValue() }, enumerable: !0, configurable: !0 }); a.prototype._subscribe = function (b) { var a = c.prototype._subscribe.call(this, b); a && !a.closed && b.next(this._value); return a }; a.prototype.getValue = function () { if (this.hasError) throw this.thrownError; if (this.closed) throw new I; return this._value }; a.prototype.next = function (b) {
                        c.prototype.next.call(this,
                            this._value = b)
                    }; return a
                }(v), ea = function (c) {
                    function a(b, a) { var d = c.call(this, b, a) || this; d.scheduler = b; d.work = a; d.pending = !1; return d } h(a, c); a.prototype.schedule = function (b, a) { void 0 === a && (a = 0); if (this.closed) return this; this.state = b; b = this.id; var c = this.scheduler; null != b && (this.id = this.recycleAsyncId(c, b, a)); this.pending = !0; this.delay = a; this.id = this.id || this.requestAsyncId(c, this.id, a); return this }; a.prototype.requestAsyncId = function (b, a, c) {
                    void 0 === c && (c = 0); return setInterval(b.flush.bind(b, this),
                        c)
                    }; a.prototype.recycleAsyncId = function (b, a, c) { void 0 === c && (c = 0); if (null !== c && this.delay === c && !1 === this.pending) return a; clearInterval(a) }; a.prototype.execute = function (b, a) { if (this.closed) return Error("executing a cancelled action"); this.pending = !1; if (b = this._execute(b, a)) return b; !1 === this.pending && null != this.id && (this.id = this.recycleAsyncId(this.scheduler, this.id, null)) }; a.prototype._execute = function (b, a) {
                        a = !1; var c = void 0; try { this.work(b) } catch (f) { a = !0, c = !!f && f || Error(f) } if (a) return this.unsubscribe(),
                            c
                    }; a.prototype._unsubscribe = function () { var b = this.id, a = this.scheduler, c = a.actions, f = c.indexOf(this); this.state = this.work = null; this.pending = !1; this.scheduler = null; -1 !== f && c.splice(f, 1); null != b && (this.id = this.recycleAsyncId(a, b, null)); this.delay = null }; return a
                }(function (c) { function a(b, a) { return c.call(this) || this } h(a, c); a.prototype.schedule = function (b, a) { return this }; return a }(t)), Pc = function (c) {
                    function a(b, a) { var d = c.call(this, b, a) || this; d.scheduler = b; d.work = a; return d } h(a, c); a.prototype.schedule =
                        function (b, a) { void 0 === a && (a = 0); if (0 < a) return c.prototype.schedule.call(this, b, a); this.delay = a; this.state = b; this.scheduler.flush(this); return this }; a.prototype.execute = function (b, a) { return 0 < a || this.closed ? c.prototype.execute.call(this, b, a) : this._execute(b, a) }; a.prototype.requestAsyncId = function (b, a, e) { void 0 === e && (e = 0); return null !== e && 0 < e || null === e && 0 < this.delay ? c.prototype.requestAsyncId.call(this, b, a, e) : b.flush(this) }; return a
                }(ea), Ea = function () {
                    function c(a, b) {
                    void 0 === b && (b = c.now); this.SchedulerAction =
                        a; this.now = b
                    } c.prototype.schedule = function (a, b, c) { void 0 === b && (b = 0); return (new this.SchedulerAction(this, a)).schedule(c, b) }; c.now = function () { return Date.now() }; return c
                }(), O = function (c) {
                    function a(b, d) { void 0 === d && (d = Ea.now); var e = c.call(this, b, function () { return a.delegate && a.delegate !== e ? a.delegate.now() : d() }) || this; e.actions = []; e.active = !1; e.scheduled = void 0; return e } h(a, c); a.prototype.schedule = function (b, d, e) {
                    void 0 === d && (d = 0); return a.delegate && a.delegate !== this ? a.delegate.schedule(b, d, e) : c.prototype.schedule.call(this,
                        b, d, e)
                    }; a.prototype.flush = function (b) { var a = this.actions; if (this.active) a.push(b); else { var c; this.active = !0; do if (c = b.execute(b.state, b.delay)) break; while (b = a.shift()); this.active = !1; if (c) { for (; b = a.shift();)b.unsubscribe(); throw c; } } }; return a
                }(Ea), sb = new (function (c) { function a() { return null !== c && c.apply(this, arguments) || this } h(a, c); return a }(O))(Pc), S = new n(function (c) { return c.complete() }), Na = function (c) { return function (a) { for (var b = 0, d = c.length; b < d && !a.closed; b++)a.next(c[b]); a.complete() } }; (function (c) {
                c.NEXT =
                    "N"; c.ERROR = "E"; c.COMPLETE = "C"
                })(k.NotificationKind || (k.NotificationKind = {})); var w = function () {
                    function c(a, b, c) { this.kind = a; this.value = b; this.error = c; this.hasValue = "N" === a } c.prototype.observe = function (a) { switch (this.kind) { case "N": return a.next && a.next(this.value); case "E": return a.error && a.error(this.error); case "C": return a.complete && a.complete() } }; c.prototype.do = function (a, b, c) { switch (this.kind) { case "N": return a && a(this.value); case "E": return b && b(this.error); case "C": return c && c() } }; c.prototype.accept =
                        function (a, b, c) { return a && "function" === typeof a.next ? this.observe(a) : this.do(a, b, c) }; c.prototype.toObservable = function () { switch (this.kind) { case "N": return ga(this.value); case "E": return wa(this.error); case "C": return R() }throw Error("unexpected notification kind value"); }; c.createNext = function (a) { return "undefined" !== typeof a ? new c("N", a) : c.undefinedValueNotification }; c.createError = function (a) { return new c("E", void 0, a) }; c.createComplete = function () { return c.completeNotification }; c.completeNotification =
                            new c("C"); c.undefinedValueNotification = new c("N", void 0); return c
                }(), Qc = function () { function c(a, b) { void 0 === b && (b = 0); this.scheduler = a; this.delay = b } c.prototype.call = function (a, b) { return b.subscribe(new tb(a, this.scheduler, this.delay)) }; return c }(), tb = function (c) {
                    function a(b, a, e) { void 0 === e && (e = 0); b = c.call(this, b) || this; b.scheduler = a; b.delay = e; return b } h(a, c); a.dispatch = function (b) { b.notification.observe(b.destination); this.unsubscribe() }; a.prototype.scheduleMessage = function (b) {
                        this.destination.add(this.scheduler.schedule(a.dispatch,
                            this.delay, new Rc(b, this.destination)))
                    }; a.prototype._next = function (b) { this.scheduleMessage(w.createNext(b)) }; a.prototype._error = function (b) { this.scheduleMessage(w.createError(b)); this.unsubscribe() }; a.prototype._complete = function () { this.scheduleMessage(w.createComplete()); this.unsubscribe() }; return a
                }(m), Rc = function () { return function (c, a) { this.notification = c; this.destination = a } }(), W = function (c) {
                    function a(b, a, e) {
                    void 0 === b && (b = Number.POSITIVE_INFINITY); void 0 === a && (a = Number.POSITIVE_INFINITY); var d =
                        c.call(this) || this; d.scheduler = e; d._events = []; d._infiniteTimeWindow = !1; d._bufferSize = 1 > b ? 1 : b; d._windowTime = 1 > a ? 1 : a; a === Number.POSITIVE_INFINITY ? (d._infiniteTimeWindow = !0, d.next = d.nextInfiniteTimeWindow) : d.next = d.nextTimeWindow; return d
                    } h(a, c); a.prototype.nextInfiniteTimeWindow = function (b) { var a = this._events; a.push(b); a.length > this._bufferSize && a.shift(); c.prototype.next.call(this, b) }; a.prototype.nextTimeWindow = function (b) {
                        this._events.push(new Sc(this._getNow(), b)); this._trimBufferThenGetEvents();
                        c.prototype.next.call(this, b)
                    }; a.prototype._subscribe = function (b) { var a = this._infiniteTimeWindow, c = a ? this._events : this._trimBufferThenGetEvents(), f = this.scheduler, g = c.length, l; if (this.closed) throw new I; this.isStopped || this.hasError ? l = t.EMPTY : (this.observers.push(b), l = new ob(this, b)); f && b.add(b = new tb(b, f)); if (a) for (a = 0; a < g && !b.closed; a++)b.next(c[a]); else for (a = 0; a < g && !b.closed; a++)b.next(c[a].value); this.hasError ? b.error(this.thrownError) : this.isStopped && b.complete(); return l }; a.prototype._getNow =
                        function () { return (this.scheduler || sb).now() }; a.prototype._trimBufferThenGetEvents = function () { for (var b = this._getNow(), a = this._bufferSize, c = this._windowTime, f = this._events, g = f.length, l = 0; l < g && !(b - f[l].time < c);)l++; g > a && (l = Math.max(l, g - a)); 0 < l && f.splice(0, l); return f }; return a
                }(v), Sc = function () { return function (c, a) { this.time = c; this.value = a } }(), T = function (c) {
                    function a() { var b = null !== c && c.apply(this, arguments) || this; b.value = null; b.hasNext = !1; b.hasCompleted = !1; return b } h(a, c); a.prototype._subscribe = function (b) {
                        return this.hasError ?
                            (b.error(this.thrownError), t.EMPTY) : this.hasCompleted && this.hasNext ? (b.next(this.value), b.complete(), t.EMPTY) : c.prototype._subscribe.call(this, b)
                    }; a.prototype.next = function (b) { this.hasCompleted || (this.value = b, this.hasNext = !0) }; a.prototype.error = function (b) { this.hasCompleted || c.prototype.error.call(this, b) }; a.prototype.complete = function () { this.hasCompleted = !0; this.hasNext && c.prototype.next.call(this, this.value); c.prototype.complete.call(this) }; return a
                }(v), Tc = 1, Fa = {}, ub = {
                    setImmediate: function (c) {
                        var a =
                            Tc++; Fa[a] = c; Promise.resolve().then(function () { var b = Fa[a]; b && b() }); return a
                    }, clearImmediate: function (c) { delete Fa[c] }
                }, Uc = function (c) {
                    function a(b, a) { var d = c.call(this, b, a) || this; d.scheduler = b; d.work = a; return d } h(a, c); a.prototype.requestAsyncId = function (b, a, e) { void 0 === e && (e = 0); if (null !== e && 0 < e) return c.prototype.requestAsyncId.call(this, b, a, e); b.actions.push(this); return b.scheduled || (b.scheduled = ub.setImmediate(b.flush.bind(b, null))) }; a.prototype.recycleAsyncId = function (b, a, e) {
                    void 0 === e && (e = 0);
                        if (null !== e && 0 < e || null === e && 0 < this.delay) return c.prototype.recycleAsyncId.call(this, b, a, e); 0 === b.actions.length && (ub.clearImmediate(a), b.scheduled = void 0)
                    }; return a
                }(ea), pa = new (function (c) {
                    function a() { return null !== c && c.apply(this, arguments) || this } h(a, c); a.prototype.flush = function (b) {
                    this.active = !0; this.scheduled = void 0; var a = this.actions, c, f = -1, g = a.length; b = b || a.shift(); do if (c = b.execute(b.state, b.delay)) break; while (++f < g && (b = a.shift())); this.active = !1; if (c) {
                        for (; ++f < g && (b = a.shift());)b.unsubscribe();
                        throw c;
                    }
                    }; return a
                }(O))(Uc), y = new O(ea), Vc = function (c) {
                    function a(b, a) { var d = c.call(this, b, a) || this; d.scheduler = b; d.work = a; return d } h(a, c); a.prototype.requestAsyncId = function (b, a, e) { void 0 === e && (e = 0); if (null !== e && 0 < e) return c.prototype.requestAsyncId.call(this, b, a, e); b.actions.push(this); return b.scheduled || (b.scheduled = requestAnimationFrame(function () { return b.flush(null) })) }; a.prototype.recycleAsyncId = function (b, a, e) {
                    void 0 === e && (e = 0); if (null !== e && 0 < e || null === e && 0 < this.delay) return c.prototype.recycleAsyncId.call(this,
                        b, a, e); 0 === b.actions.length && (cancelAnimationFrame(a), b.scheduled = void 0)
                    }; return a
                }(ea), Wc = new (function (c) { function a() { return null !== c && c.apply(this, arguments) || this } h(a, c); a.prototype.flush = function (b) { this.active = !0; this.scheduled = void 0; var a = this.actions, c, f = -1, g = a.length; b = b || a.shift(); do if (c = b.execute(b.state, b.delay)) break; while (++f < g && (b = a.shift())); this.active = !1; if (c) { for (; ++f < g && (b = a.shift());)b.unsubscribe(); throw c; } }; return a }(O))(Vc), vb = function (c) {
                    function a(b, a) {
                    void 0 === b && (b =
                        Ga); void 0 === a && (a = Number.POSITIVE_INFINITY); var d = c.call(this, b, function () { return d.frame }) || this; d.maxFrames = a; d.frame = 0; d.index = -1; return d
                    } h(a, c); a.prototype.flush = function () { for (var b = this.actions, a = this.maxFrames, c, f; (f = b[0]) && f.delay <= a && !(b.shift(), this.frame = f.delay, c = f.execute(f.state, f.delay));); if (c) { for (; f = b.shift();)f.unsubscribe(); throw c; } }; a.frameTimeFactor = 10; return a
                }(O), Ga = function (c) {
                    function a(b, a, e) {
                    void 0 === e && (e = b.index += 1); var d = c.call(this, b, a) || this; d.scheduler = b; d.work =
                        a; d.index = e; d.active = !0; d.index = b.index = e; return d
                    } h(a, c); a.prototype.schedule = function (b, d) { void 0 === d && (d = 0); if (!this.id) return c.prototype.schedule.call(this, b, d); this.active = !1; var e = new a(this.scheduler, this.work); this.add(e); return e.schedule(b, d) }; a.prototype.requestAsyncId = function (b, c, e) { void 0 === e && (e = 0); this.delay = b.frame + e; b = b.actions; b.push(this); b.sort(a.sortActions); return !0 }; a.prototype.recycleAsyncId = function (b, a, c) { }; a.prototype._execute = function (b, a) {
                        if (!0 === this.active) return c.prototype._execute.call(this,
                            b, a)
                    }; a.sortActions = function (b, a) { return b.delay === a.delay ? b.index === a.index ? 0 : b.index > a.index ? 1 : -1 : b.delay > a.delay ? 1 : -1 }; return a
                }(ea), X = function () { function c() { Error.call(this); this.message = "argument out of range"; this.name = "ArgumentOutOfRangeError"; return this } c.prototype = Object.create(Error.prototype); return c }(), ca = function () { function c() { Error.call(this); this.message = "no elements in sequence"; this.name = "EmptyError"; return this } c.prototype = Object.create(Error.prototype); return c }(), wb = function () {
                    function c() {
                        Error.call(this);
                        this.message = "Timeout has occurred"; this.name = "TimeoutError"; return this
                    } c.prototype = Object.create(Error.prototype); return c
                }(), Mb = function () { function c(a, b) { this.project = a; this.thisArg = b } c.prototype.call = function (a, b) { return b.subscribe(new Xc(a, this.project, this.thisArg)) }; return c }(), Xc = function (c) {
                    function a(b, a, e) { b = c.call(this, b) || this; b.project = a; b.count = 0; b.thisArg = e || b; return b } h(a, c); a.prototype._next = function (b) {
                        var a; try { a = this.project.call(this.thisArg, b, this.count++) } catch (e) {
                            this.destination.error(e);
                            return
                        } this.destination.next(a)
                    }; return a
                }(m), q = function (c) { function a() { return null !== c && c.apply(this, arguments) || this } h(a, c); a.prototype.notifyNext = function (b, a, c, f, g) { this.destination.next(a) }; a.prototype.notifyError = function (b, a) { this.destination.error(b) }; a.prototype.notifyComplete = function (b) { this.destination.complete() }; return a }(m), G = function (c) {
                    function a(b, a, e) { var d = c.call(this) || this; d.parent = b; d.outerValue = a; d.outerIndex = e; d.index = 0; return d } h(a, c); a.prototype._next = function (b) {
                        this.parent.notifyNext(this.outerValue,
                            b, this.outerIndex, this.index++, this)
                    }; a.prototype._error = function (b) { this.parent.notifyError(b, this); this.unsubscribe() }; a.prototype._complete = function () { this.parent.notifyComplete(this); this.unsubscribe() }; return a
                }(m), Yc = function (c) { return function (a) { c.then(function (b) { a.closed || (a.next(b), a.complete()) }, function (b) { return a.error(b) }).then(null, Q); return a } }, E; E = "function" === typeof Symbol && Symbol.iterator ? Symbol.iterator : "@@iterator"; var Zc = function (c) {
                    return function (a) {
                        var b = c[E](); do {
                            var d =
                                b.next(); if (d.done) { a.complete(); break } a.next(d.value); if (a.closed) break
                        } while (1); "function" === typeof b.return && a.add(function () { b.return && b.return() }); return a
                    }
                }, $c = function (c) { return function (a) { var b = c[U](); if ("function" !== typeof b.subscribe) throw new TypeError("Provided object does not correctly implement Symbol.observable"); return b.subscribe(a) } }, Ta = function (c) { return c && "number" === typeof c.length && "function" !== typeof c }, ha = function (c) {
                    if (c && "function" === typeof c[U]) return $c(c); if (Ta(c)) return Na(c);
                    if (Ra(c)) return Yc(c); if (c && "function" === typeof c[E]) return Zc(c); c = ra(c) ? "an invalid object" : "'" + c + "'"; throw new TypeError("You provided " + c + " where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.");
                }, xb = {}, Ha = function () { function c(a) { this.resultSelector = a } c.prototype.call = function (a, b) { return b.subscribe(new ad(a, this.resultSelector)) }; return c }(), ad = function (c) {
                    function a(b, a) { b = c.call(this, b) || this; b.resultSelector = a; b.active = 0; b.values = []; b.observables = []; return b }
                    h(a, c); a.prototype._next = function (b) { this.values.push(xb); this.observables.push(b) }; a.prototype._complete = function () { var b = this.observables, a = b.length; if (0 === a) this.destination.complete(); else { this.toRespond = this.active = a; for (var c = 0; c < a; c++) { var f = b[c]; this.add(p(this, f, f, c)) } } }; a.prototype.notifyComplete = function (b) { 0 === --this.active && this.destination.complete() }; a.prototype.notifyNext = function (b, a, c, f, g) {
                        b = this.values; f = b[c]; f = this.toRespond ? f === xb ? --this.toRespond : this.toRespond : 0; b[c] = a; 0 ===
                            f && (this.resultSelector ? this._tryResultSelector(b) : this.destination.next(b.slice()))
                    }; a.prototype._tryResultSelector = function (b) { var a; try { a = this.resultSelector.apply(this, b) } catch (e) { this.destination.error(e); return } this.destination.next(a) }; return a
                }(q), Ub = function () { function c(a, b) { void 0 === b && (b = Number.POSITIVE_INFINITY); this.project = a; this.concurrent = b } c.prototype.call = function (a, b) { return b.subscribe(new bd(a, this.project, this.concurrent)) }; return c }(), bd = function (c) {
                    function a(b, a, e) {
                    void 0 ===
                        e && (e = Number.POSITIVE_INFINITY); b = c.call(this, b) || this; b.project = a; b.concurrent = e; b.hasCompleted = !1; b.buffer = []; b.active = 0; b.index = 0; return b
                    } h(a, c); a.prototype._next = function (b) { this.active < this.concurrent ? this._tryNext(b) : this.buffer.push(b) }; a.prototype._tryNext = function (b) { var a, c = this.index++; try { a = this.project(b, c) } catch (f) { this.destination.error(f); return } this.active++; this._innerSub(a, b, c) }; a.prototype._innerSub = function (b, a, c) {
                        var d = new G(this, void 0, void 0); this.destination.add(d); p(this,
                            b, a, c, d)
                    }; a.prototype._complete = function () { this.hasCompleted = !0; 0 === this.active && 0 === this.buffer.length && this.destination.complete(); this.unsubscribe() }; a.prototype.notifyNext = function (b, a, c, f, g) { this.destination.next(a) }; a.prototype.notifyComplete = function (b) { var a = this.buffer; this.remove(b); this.active--; 0 < a.length ? this._next(a.shift()) : 0 === this.active && this.hasCompleted && this.destination.complete() }; return a
                }(q), yb = new n(D), ac = function () {
                    function c(a, b) { this.predicate = a; this.thisArg = b } c.prototype.call =
                        function (a, b) { return b.subscribe(new cd(a, this.predicate, this.thisArg)) }; return c
                }(), cd = function (c) { function a(b, a, e) { b = c.call(this, b) || this; b.predicate = a; b.thisArg = e; b.count = 0; return b } h(a, c); a.prototype._next = function (b) { var a; try { a = this.predicate.call(this.thisArg, b, this.count++) } catch (e) { this.destination.error(e); return } a && this.destination.next(b) }; return a }(m), bc = function () { function c() { } c.prototype.call = function (a, b) { return b.subscribe(new dd(a)) }; return c }(), dd = function (c) {
                    function a(b) {
                        b =
                        c.call(this, b) || this; b.hasFirst = !1; b.observables = []; b.subscriptions = []; return b
                    } h(a, c); a.prototype._next = function (b) { this.observables.push(b) }; a.prototype._complete = function () { var b = this.observables, a = b.length; if (0 === a) this.destination.complete(); else { for (var c = 0; c < a && !this.hasFirst; c++) { var f = b[c], f = p(this, f, f, c); this.subscriptions && this.subscriptions.push(f); this.add(f) } this.observables = null } }; a.prototype.notifyNext = function (b, a, c, f, g) {
                        if (!this.hasFirst) {
                        this.hasFirst = !0; for (b = 0; b < this.subscriptions.length; b++)b !==
                            c && (f = this.subscriptions[b], f.unsubscribe(), this.remove(f)); this.subscriptions = null
                        } this.destination.next(a)
                    }; return a
                }(q), cb = function () { function c(a) { this.resultSelector = a } c.prototype.call = function (a, b) { return b.subscribe(new ed(a, this.resultSelector)) }; return c }(), ed = function (c) {
                    function a(b, a, e) { void 0 === e && (e = Object.create(null)); b = c.call(this, b) || this; b.iterators = []; b.active = 0; b.resultSelector = "function" === typeof a ? a : null; b.values = e; return b } h(a, c); a.prototype._next = function (b) {
                        var a = this.iterators;
                        x(b) ? a.push(new fd(b)) : "function" === typeof b[E] ? a.push(new gd(b[E]())) : a.push(new hd(this.destination, this, b))
                    }; a.prototype._complete = function () { var b = this.iterators, a = b.length; this.unsubscribe(); if (0 === a) this.destination.complete(); else { this.active = a; for (var c = 0; c < a; c++) { var f = b[c]; f.stillUnsubscribed ? this.destination.add(f.subscribe(f, c)) : this.active-- } } }; a.prototype.notifyInactive = function () { this.active--; 0 === this.active && this.destination.complete() }; a.prototype.checkIterators = function () {
                        for (var b =
                            this.iterators, a = b.length, c = this.destination, f = 0; f < a; f++) { var g = b[f]; if ("function" === typeof g.hasValue && !g.hasValue()) return } for (var l = !1, h = [], f = 0; f < a; f++) { var g = b[f], k = g.next(); g.hasCompleted() && (l = !0); if (k.done) { c.complete(); return } h.push(k.value) } this.resultSelector ? this._tryresultSelector(h) : c.next(h); l && c.complete()
                    }; a.prototype._tryresultSelector = function (b) { var a; try { a = this.resultSelector.apply(this, b) } catch (e) { this.destination.error(e); return } this.destination.next(a) }; return a
                }(m), gd = function () {
                    function c(a) {
                    this.iterator =
                        a; this.nextResult = a.next()
                    } c.prototype.hasValue = function () { return !0 }; c.prototype.next = function () { var a = this.nextResult; this.nextResult = this.iterator.next(); return a }; c.prototype.hasCompleted = function () { var a = this.nextResult; return a && a.done }; return c
                }(), fd = function () {
                    function c(a) { this.array = a; this.length = this.index = 0; this.length = a.length } c.prototype[E] = function () { return this }; c.prototype.next = function (a) { a = this.index++; var b = this.array; return a < this.length ? { value: b[a], done: !1 } : { value: null, done: !0 } };
                    c.prototype.hasValue = function () { return this.array.length > this.index }; c.prototype.hasCompleted = function () { return this.array.length === this.index }; return c
                }(), hd = function (c) {
                    function a(b, a, e) { b = c.call(this, b) || this; b.parent = a; b.observable = e; b.stillUnsubscribed = !0; b.buffer = []; b.isComplete = !1; return b } h(a, c); a.prototype[E] = function () { return this }; a.prototype.next = function () { var b = this.buffer; return 0 === b.length && this.isComplete ? { value: null, done: !0 } : { value: b.shift(), done: !1 } }; a.prototype.hasValue = function () {
                        return 0 <
                            this.buffer.length
                    }; a.prototype.hasCompleted = function () { return 0 === this.buffer.length && this.isComplete }; a.prototype.notifyComplete = function () { 0 < this.buffer.length ? (this.isComplete = !0, this.parent.notifyInactive()) : this.destination.complete() }; a.prototype.notifyNext = function (b, a, c, f, g) { this.buffer.push(a); this.parent.checkIterators() }; a.prototype.subscribe = function (b, a) { return p(this, this.observable, this, a) }; return a
                }(q), ec = function () {
                    function c(a) { this.durationSelector = a } c.prototype.call = function (a,
                        b) { return b.subscribe(new id(a, this.durationSelector)) }; return c
                }(), id = function (c) {
                    function a(b, a) { b = c.call(this, b) || this; b.durationSelector = a; b.hasValue = !1; return b } h(a, c); a.prototype._next = function (b) { this.value = b; this.hasValue = !0; if (!this.throttled) { var a = void 0; try { var c = this.durationSelector, a = c(b) } catch (f) { return this.destination.error(f) } b = p(this, a); !b || b.closed ? this.clearThrottle() : this.add(this.throttled = b) } }; a.prototype.clearThrottle = function () {
                        var b = this.value, a = this.hasValue, c = this.throttled;
                        c && (this.remove(c), this.throttled = null, c.unsubscribe()); a && (this.value = null, this.hasValue = !1, this.destination.next(b))
                    }; a.prototype.notifyNext = function (b, a, c, f) { this.clearThrottle() }; a.prototype.notifyComplete = function () { this.clearThrottle() }; return a
                }(q), kd = function () { function c(a) { this.closingNotifier = a } c.prototype.call = function (a, b) { return b.subscribe(new jd(a, this.closingNotifier)) }; return c }(), jd = function (c) {
                    function a(b, a) { b = c.call(this, b) || this; b.buffer = []; b.add(p(b, a)); return b } h(a, c); a.prototype._next =
                        function (b) { this.buffer.push(b) }; a.prototype.notifyNext = function (b, a, c, f, g) { b = this.buffer; this.buffer = []; this.destination.next(b) }; return a
                }(q), nd = function () { function c(a, b) { this.bufferSize = a; this.subscriberClass = (this.startBufferEvery = b) && a !== b ? ld : md } c.prototype.call = function (a, b) { return b.subscribe(new this.subscriberClass(a, this.bufferSize, this.startBufferEvery)) }; return c }(), md = function (c) {
                    function a(b, a) { b = c.call(this, b) || this; b.bufferSize = a; b.buffer = []; return b } h(a, c); a.prototype._next = function (b) {
                        var a =
                            this.buffer; a.push(b); a.length == this.bufferSize && (this.destination.next(a), this.buffer = [])
                    }; a.prototype._complete = function () { var b = this.buffer; 0 < b.length && this.destination.next(b); c.prototype._complete.call(this) }; return a
                }(m), ld = function (c) {
                    function a(b, a, e) { b = c.call(this, b) || this; b.bufferSize = a; b.startBufferEvery = e; b.buffers = []; b.count = 0; return b } h(a, c); a.prototype._next = function (b) {
                        var a = this.bufferSize, c = this.startBufferEvery, f = this.buffers, g = this.count; this.count++; 0 === g % c && f.push([]); for (c =
                            f.length; c--;)g = f[c], g.push(b), g.length === a && (f.splice(c, 1), this.destination.next(g))
                    }; a.prototype._complete = function () { for (var b = this.buffers, a = this.destination; 0 < b.length;) { var e = b.shift(); 0 < e.length && a.next(e) } c.prototype._complete.call(this) }; return a
                }(m), pd = function () {
                    function c(a, b, c, e) { this.bufferTimeSpan = a; this.bufferCreationInterval = b; this.maxBufferSize = c; this.scheduler = e } c.prototype.call = function (a, b) {
                        return b.subscribe(new od(a, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize,
                            this.scheduler))
                    }; return c
                }(), qd = function () { return function () { this.buffer = [] } }(), od = function (c) {
                    function a(b, a, e, f, g) {
                        b = c.call(this, b) || this; b.bufferTimeSpan = a; b.bufferCreationInterval = e; b.maxBufferSize = f; b.scheduler = g; b.contexts = []; f = b.openContext(); b.timespanOnly = null == e || 0 > e; if (b.timespanOnly) b.add(f.closeAction = g.schedule(eb, a, { subscriber: b, context: f, bufferTimeSpan: a })); else {
                            var d = { bufferTimeSpan: a, bufferCreationInterval: e, subscriber: b, scheduler: g }; b.add(f.closeAction = g.schedule(fb, a, {
                                subscriber: b,
                                context: f
                            })); b.add(g.schedule(fc, e, d))
                        } return b
                    } h(a, c); a.prototype._next = function (b) { for (var a = this.contexts, c = a.length, f, g = 0; g < c; g++) { var l = a[g], h = l.buffer; h.push(b); h.length == this.maxBufferSize && (f = l) } if (f) this.onBufferFull(f) }; a.prototype._error = function (b) { this.contexts.length = 0; c.prototype._error.call(this, b) }; a.prototype._complete = function () { for (var b = this.contexts, a = this.destination; 0 < b.length;) { var e = b.shift(); a.next(e.buffer) } c.prototype._complete.call(this) }; a.prototype._unsubscribe = function () {
                    this.contexts =
                        null
                    }; a.prototype.onBufferFull = function (b) { this.closeContext(b); b = b.closeAction; b.unsubscribe(); this.remove(b); if (!this.closed && this.timespanOnly) { b = this.openContext(); var a = this.bufferTimeSpan; this.add(b.closeAction = this.scheduler.schedule(eb, a, { subscriber: this, context: b, bufferTimeSpan: a })) } }; a.prototype.openContext = function () { var b = new qd; this.contexts.push(b); return b }; a.prototype.closeContext = function (b) {
                        this.destination.next(b.buffer); var a = this.contexts; 0 <= (a ? a.indexOf(b) : -1) && a.splice(a.indexOf(b),
                            1)
                    }; return a
                }(m), sd = function () { function c(a, b) { this.openings = a; this.closingSelector = b } c.prototype.call = function (a, b) { return b.subscribe(new rd(a, this.openings, this.closingSelector)) }; return c }(), rd = function (c) {
                    function a(b, a, e) { b = c.call(this, b) || this; b.openings = a; b.closingSelector = e; b.contexts = []; b.add(p(b, a)); return b } h(a, c); a.prototype._next = function (b) { for (var a = this.contexts, c = a.length, f = 0; f < c; f++)a[f].buffer.push(b) }; a.prototype._error = function (b) {
                        for (var a = this.contexts; 0 < a.length;) {
                            var e = a.shift();
                            e.subscription.unsubscribe(); e.buffer = null; e.subscription = null
                        } this.contexts = null; c.prototype._error.call(this, b)
                    }; a.prototype._complete = function () { for (var b = this.contexts; 0 < b.length;) { var a = b.shift(); this.destination.next(a.buffer); a.subscription.unsubscribe(); a.buffer = null; a.subscription = null } this.contexts = null; c.prototype._complete.call(this) }; a.prototype.notifyNext = function (b, a, c, f, g) { b ? this.closeBuffer(b) : this.openBuffer(a) }; a.prototype.notifyComplete = function (b) { this.closeBuffer(b.context) };
                    a.prototype.openBuffer = function (b) { try { var a = this.closingSelector.call(this, b); a && this.trySubscribe(a) } catch (e) { this._error(e) } }; a.prototype.closeBuffer = function (b) { var a = this.contexts; if (a && b) { var c = b.subscription; this.destination.next(b.buffer); a.splice(a.indexOf(b), 1); this.remove(c); c.unsubscribe() } }; a.prototype.trySubscribe = function (b) { var a = this.contexts, c = new t, f = { buffer: [], subscription: c }; a.push(f); b = p(this, b, f); !b || b.closed ? this.closeBuffer(f) : (b.context = f, this.add(b), c.add(b)) }; return a
                }(q),
                    ud = function () { function c(a) { this.closingSelector = a } c.prototype.call = function (a, b) { return b.subscribe(new td(a, this.closingSelector)) }; return c }(), td = function (c) {
                        function a(b, a) { b = c.call(this, b) || this; b.closingSelector = a; b.subscribing = !1; b.openBuffer(); return b } h(a, c); a.prototype._next = function (b) { this.buffer.push(b) }; a.prototype._complete = function () { var b = this.buffer; b && this.destination.next(b); c.prototype._complete.call(this) }; a.prototype._unsubscribe = function () {
                        this.buffer = null; this.subscribing =
                            !1
                        }; a.prototype.notifyNext = function (b, a, c, f, g) { this.openBuffer() }; a.prototype.notifyComplete = function () { this.subscribing ? this.complete() : this.openBuffer() }; a.prototype.openBuffer = function () { var b = this.closingSubscription; b && (this.remove(b), b.unsubscribe()); (b = this.buffer) && this.destination.next(b); this.buffer = []; var a; try { var c = this.closingSelector; a = c() } catch (f) { return this.error(f) } this.closingSubscription = b = new t; this.add(b); this.subscribing = !0; b.add(p(this, a)); this.subscribing = !1 }; return a
                    }(q),
                    wd = function () { function c(a) { this.selector = a } c.prototype.call = function (a, b) { return b.subscribe(new vd(a, this.selector, this.caught)) }; return c }(), vd = function (c) { function a(b, a, e) { b = c.call(this, b) || this; b.selector = a; b.caught = e; return b } h(a, c); a.prototype.error = function (b) { if (!this.isStopped) { var a = void 0; try { a = this.selector(b, this.caught) } catch (e) { c.prototype.error.call(this, e); return } this._unsubscribeAndRecycle(); b = new G(this, void 0, void 0); this.add(b); p(this, a, void 0, void 0, b) } }; return a }(q), yd = function () {
                        function c(a,
                            b) { this.predicate = a; this.source = b } c.prototype.call = function (a, b) { return b.subscribe(new xd(a, this.predicate, this.source)) }; return c
                    }(), xd = function (c) {
                        function a(b, a, e) { b = c.call(this, b) || this; b.predicate = a; b.source = e; b.count = 0; b.index = 0; return b } h(a, c); a.prototype._next = function (b) { this.predicate ? this._tryPredicate(b) : this.count++ }; a.prototype._tryPredicate = function (b) { var a; try { a = this.predicate(b, this.index++, this.source) } catch (e) { this.destination.error(e); return } a && this.count++ }; a.prototype._complete =
                            function () { this.destination.next(this.count); this.destination.complete() }; return a
                    }(m), Ad = function () { function c(a) { this.durationSelector = a } c.prototype.call = function (a, b) { return b.subscribe(new zd(a, this.durationSelector)) }; return c }(), zd = function (c) {
                        function a(b, a) { b = c.call(this, b) || this; b.durationSelector = a; b.hasValue = !1; b.durationSubscription = null; return b } h(a, c); a.prototype._next = function (b) { try { var a = this.durationSelector.call(this, b); a && this._tryNext(b, a) } catch (e) { this.destination.error(e) } };
                        a.prototype._complete = function () { this.emitValue(); this.destination.complete() }; a.prototype._tryNext = function (b, a) { var c = this.durationSubscription; this.value = b; this.hasValue = !0; c && (c.unsubscribe(), this.remove(c)); (c = p(this, a)) && !c.closed && this.add(this.durationSubscription = c) }; a.prototype.notifyNext = function (b, a, c, f, g) { this.emitValue() }; a.prototype.notifyComplete = function () { this.emitValue() }; a.prototype.emitValue = function () {
                            if (this.hasValue) {
                                var b = this.value, a = this.durationSubscription; a && (this.durationSubscription =
                                    null, a.unsubscribe(), this.remove(a)); this.value = null; this.hasValue = !1; c.prototype._next.call(this, b)
                            }
                        }; return a
                    }(q), Cd = function () { function c(a, b) { this.dueTime = a; this.scheduler = b } c.prototype.call = function (a, b) { return b.subscribe(new Bd(a, this.dueTime, this.scheduler)) }; return c }(), Bd = function (c) {
                        function a(b, a, e) { b = c.call(this, b) || this; b.dueTime = a; b.scheduler = e; b.debouncedSubscription = null; b.lastValue = null; b.hasValue = !1; return b } h(a, c); a.prototype._next = function (b) {
                            this.clearDebounce(); this.lastValue =
                                b; this.hasValue = !0; this.add(this.debouncedSubscription = this.scheduler.schedule(gc, this.dueTime, this))
                        }; a.prototype._complete = function () { this.debouncedNext(); this.destination.complete() }; a.prototype.debouncedNext = function () { this.clearDebounce(); if (this.hasValue) { var b = this.lastValue; this.lastValue = null; this.hasValue = !1; this.destination.next(b) } }; a.prototype.clearDebounce = function () { var b = this.debouncedSubscription; null !== b && (this.remove(b), b.unsubscribe(), this.debouncedSubscription = null) }; return a
                    }(m),
                    hc = function () { function c(a) { this.defaultValue = a } c.prototype.call = function (a, b) { return b.subscribe(new Dd(a, this.defaultValue)) }; return c }(), Dd = function (c) { function a(b, a) { b = c.call(this, b) || this; b.defaultValue = a; b.isEmpty = !0; return b } h(a, c); a.prototype._next = function (b) { this.isEmpty = !1; this.destination.next(b) }; a.prototype._complete = function () { this.isEmpty && this.destination.next(this.defaultValue); this.destination.complete() }; return a }(m), Fd = function () {
                        function c(a, b) { this.delay = a; this.scheduler = b }
                        c.prototype.call = function (a, b) { return b.subscribe(new Ed(a, this.delay, this.scheduler)) }; return c
                    }(), Ed = function (c) {
                        function a(b, a, e) { b = c.call(this, b) || this; b.delay = a; b.scheduler = e; b.queue = []; b.active = !1; b.errored = !1; return b } h(a, c); a.dispatch = function (b) { for (var a = b.source, c = a.queue, f = b.scheduler, g = b.destination; 0 < c.length && 0 >= c[0].time - f.now();)c.shift().notification.observe(g); 0 < c.length ? (a = Math.max(0, c[0].time - f.now()), this.schedule(b, a)) : (this.unsubscribe(), a.active = !1) }; a.prototype._schedule =
                            function (b) { this.active = !0; this.destination.add(b.schedule(a.dispatch, this.delay, { source: this, destination: this.destination, scheduler: b })) }; a.prototype.scheduleNotification = function (b) { if (!0 !== this.errored) { var a = this.scheduler; b = new Gd(a.now() + this.delay, b); this.queue.push(b); !1 === this.active && this._schedule(a) } }; a.prototype._next = function (b) { this.scheduleNotification(w.createNext(b)) }; a.prototype._error = function (b) { this.errored = !0; this.queue = []; this.destination.error(b); this.unsubscribe() }; a.prototype._complete =
                                function () { this.scheduleNotification(w.createComplete()); this.unsubscribe() }; return a
                    }(m), Gd = function () { return function (c, a) { this.time = c; this.notification = a } }(), zb = function () { function c(a) { this.delayDurationSelector = a } c.prototype.call = function (a, b) { return b.subscribe(new Hd(a, this.delayDurationSelector)) }; return c }(), Hd = function (c) {
                        function a(b, a) { b = c.call(this, b) || this; b.delayDurationSelector = a; b.completed = !1; b.delayNotifierSubscriptions = []; b.index = 0; return b } h(a, c); a.prototype.notifyNext = function (b,
                            a, c, f, g) { this.destination.next(b); this.removeSubscription(g); this.tryComplete() }; a.prototype.notifyError = function (b, a) { this._error(b) }; a.prototype.notifyComplete = function (b) { (b = this.removeSubscription(b)) && this.destination.next(b); this.tryComplete() }; a.prototype._next = function (b) { var a = this.index++; try { var c = this.delayDurationSelector(b, a); c && this.tryDelay(c, b) } catch (f) { this.destination.error(f) } }; a.prototype._complete = function () { this.completed = !0; this.tryComplete(); this.unsubscribe() }; a.prototype.removeSubscription =
                                function (b) { b.unsubscribe(); var a = this.delayNotifierSubscriptions.indexOf(b); -1 !== a && this.delayNotifierSubscriptions.splice(a, 1); return b.outerValue }; a.prototype.tryDelay = function (b, a) { (b = p(this, b, a)) && !b.closed && (this.destination.add(b), this.delayNotifierSubscriptions.push(b)) }; a.prototype.tryComplete = function () { this.completed && 0 === this.delayNotifierSubscriptions.length && this.destination.complete() }; return a
                    }(q), Jd = function (c) {
                        function a(b, a) {
                            var d = c.call(this) || this; d.source = b; d.subscriptionDelay =
                                a; return d
                        } h(a, c); a.prototype._subscribe = function (b) { this.subscriptionDelay.subscribe(new Id(b, this.source)) }; return a
                    }(n), Id = function (c) {
                        function a(b, a) { var d = c.call(this) || this; d.parent = b; d.source = a; d.sourceSubscribed = !1; return d } h(a, c); a.prototype._next = function (b) { this.subscribeToSource() }; a.prototype._error = function (b) { this.unsubscribe(); this.parent.error(b) }; a.prototype._complete = function () { this.unsubscribe(); this.subscribeToSource() }; a.prototype.subscribeToSource = function () {
                        this.sourceSubscribed ||
                            (this.sourceSubscribed = !0, this.unsubscribe(), this.source.subscribe(this.parent))
                        }; return a
                    }(m), Ld = function () { function c() { } c.prototype.call = function (a, b) { return b.subscribe(new Kd(a)) }; return c }(), Kd = function (c) { function a(b) { return c.call(this, b) || this } h(a, c); a.prototype._next = function (b) { b.observe(this.destination) }; return a }(m), Nd = function () { function c(a, b) { this.keySelector = a; this.flushes = b } c.prototype.call = function (a, b) { return b.subscribe(new Md(a, this.keySelector, this.flushes)) }; return c }(),
                    Md = function (c) {
                        function a(b, a, e) { b = c.call(this, b) || this; b.keySelector = a; b.values = new Set; e && b.add(p(b, e)); return b } h(a, c); a.prototype.notifyNext = function (b, a, c, f, g) { this.values.clear() }; a.prototype.notifyError = function (b, a) { this._error(b) }; a.prototype._next = function (b) { this.keySelector ? this._useKeySelector(b) : this._finalizeNext(b, b) }; a.prototype._useKeySelector = function (b) { var a, c = this.destination; try { a = this.keySelector(b) } catch (f) { c.error(f); return } this._finalizeNext(a, b) }; a.prototype._finalizeNext =
                            function (b, a) { var c = this.values; c.has(b) || (c.add(b), this.destination.next(a)) }; return a
                    }(q), ic = function () { function c(a, b) { this.compare = a; this.keySelector = b } c.prototype.call = function (a, b) { return b.subscribe(new Od(a, this.compare, this.keySelector)) }; return c }(), Od = function (c) {
                        function a(b, a, e) { b = c.call(this, b) || this; b.keySelector = e; b.hasKey = !1; "function" === typeof a && (b.compare = a); return b } h(a, c); a.prototype.compare = function (b, a) { return b === a }; a.prototype._next = function (b) {
                            var a; try {
                                var c = this.keySelector;
                                a = c ? c(b) : b
                            } catch (g) { return this.destination.error(g) } c = !1; if (this.hasKey) try { var f = this.compare, c = f(this.key, a) } catch (g) { return this.destination.error(g) } else this.hasKey = !0; c || (this.key = a, this.destination.next(b))
                        }; return a
                    }(m), kc = function () { function c(a) { this.errorFactory = a } c.prototype.call = function (a, b) { return b.subscribe(new Pd(a, this.errorFactory)) }; return c }(), Pd = function (c) {
                        function a(b, a) { b = c.call(this, b) || this; b.errorFactory = a; b.hasValue = !1; return b } h(a, c); a.prototype._next = function (b) {
                        this.hasValue =
                            !0; this.destination.next(b)
                        }; a.prototype._complete = function () { if (this.hasValue) return this.destination.complete(); var b = void 0; try { b = this.errorFactory() } catch (d) { b = d } this.destination.error(b) }; return a
                    }(m), lc = function () { function c(a) { this.total = a; if (0 > this.total) throw new X; } c.prototype.call = function (a, b) { return b.subscribe(new Qd(a, this.total)) }; return c }(), Qd = function (c) {
                        function a(b, a) { b = c.call(this, b) || this; b.total = a; b.count = 0; return b } h(a, c); a.prototype._next = function (b) {
                            var a = this.total, c = ++this.count;
                            c <= a && (this.destination.next(b), c === a && (this.destination.complete(), this.unsubscribe()))
                        }; return a
                    }(m), Sd = function () { function c(a, b, c) { this.predicate = a; this.thisArg = b; this.source = c } c.prototype.call = function (a, b) { return b.subscribe(new Rd(a, this.predicate, this.thisArg, this.source)) }; return c }(), Rd = function (c) {
                        function a(b, a, e, f) { b = c.call(this, b) || this; b.predicate = a; b.thisArg = e; b.source = f; b.index = 0; b.thisArg = e || b; return b } h(a, c); a.prototype.notifyComplete = function (b) { this.destination.next(b); this.destination.complete() };
                        a.prototype._next = function (b) { var a = !1; try { a = this.predicate.call(this.thisArg, b, this.index++, this.source) } catch (e) { this.destination.error(e); return } a || this.notifyComplete(!1) }; a.prototype._complete = function () { this.notifyComplete(!0) }; return a
                    }(m), Ud = function () { function c() { } c.prototype.call = function (a, b) { return b.subscribe(new Td(a)) }; return c }(), Td = function (c) {
                        function a(b) { b = c.call(this, b) || this; b.hasCompleted = !1; b.hasSubscription = !1; return b } h(a, c); a.prototype._next = function (b) {
                        this.hasSubscription ||
                            (this.hasSubscription = !0, this.add(p(this, b)))
                        }; a.prototype._complete = function () { this.hasCompleted = !0; this.hasSubscription || this.destination.complete() }; a.prototype.notifyComplete = function (b) { this.remove(b); this.hasSubscription = !1; this.hasCompleted && this.destination.complete() }; return a
                    }(q), mc = function () { function c(a) { this.project = a } c.prototype.call = function (a, b) { return b.subscribe(new Vd(a, this.project)) }; return c }(), Vd = function (c) {
                        function a(b, a) {
                            b = c.call(this, b) || this; b.project = a; b.hasSubscription =
                                !1; b.hasCompleted = !1; b.index = 0; return b
                        } h(a, c); a.prototype._next = function (b) { this.hasSubscription || this.tryNext(b) }; a.prototype.tryNext = function (b) { var a, c = this.index++; try { a = this.project(b, c) } catch (f) { this.destination.error(f); return } this.hasSubscription = !0; this._innerSub(a, b, c) }; a.prototype._innerSub = function (b, a, c) { var d = new G(this, void 0, void 0); this.destination.add(d); p(this, b, a, c, d) }; a.prototype._complete = function () { this.hasCompleted = !0; this.hasSubscription || this.destination.complete(); this.unsubscribe() };
                        a.prototype.notifyNext = function (b, a, c, f, g) { this.destination.next(a) }; a.prototype.notifyError = function (b) { this.destination.error(b) }; a.prototype.notifyComplete = function (b) { this.destination.remove(b); this.hasSubscription = !1; this.hasCompleted && this.destination.complete() }; return a
                    }(q), Xd = function () { function c(a, b, c) { this.project = a; this.concurrent = b; this.scheduler = c } c.prototype.call = function (a, b) { return b.subscribe(new Wd(a, this.project, this.concurrent, this.scheduler)) }; return c }(), Wd = function (c) {
                        function a(b,
                            a, e, f) { b = c.call(this, b) || this; b.project = a; b.concurrent = e; b.scheduler = f; b.index = 0; b.active = 0; b.hasCompleted = !1; e < Number.POSITIVE_INFINITY && (b.buffer = []); return b } h(a, c); a.dispatch = function (b) { b.subscriber.subscribeToProjection(b.result, b.value, b.index) }; a.prototype._next = function (b) {
                                var c = this.destination; if (c.closed) this._complete(); else {
                                    var e = this.index++; if (this.active < this.concurrent) {
                                        c.next(b); try {
                                            var f = this.project, g = f(b, e); this.scheduler ? this.destination.add(this.scheduler.schedule(a.dispatch,
                                                0, { subscriber: this, result: g, value: b, index: e })) : this.subscribeToProjection(g, b, e)
                                        } catch (l) { c.error(l) }
                                    } else this.buffer.push(b)
                                }
                            }; a.prototype.subscribeToProjection = function (b, a, c) { this.active++; this.destination.add(p(this, b, a, c)) }; a.prototype._complete = function () { (this.hasCompleted = !0, 0 === this.active) && this.destination.complete(); this.unsubscribe() }; a.prototype.notifyNext = function (b, a, c, f, g) { this._next(a) }; a.prototype.notifyComplete = function (b) {
                                var a = this.buffer; this.destination.remove(b); this.active--;
                                a && 0 < a.length && this._next(a.shift()); this.hasCompleted && 0 === this.active && this.destination.complete()
                            }; return a
                    }(q), Zd = function () { function c(a) { this.callback = a } c.prototype.call = function (a, b) { return b.subscribe(new Yd(a, this.callback)) }; return c }(), Yd = function (c) { function a(b, a) { b = c.call(this, b) || this; b.add(new t(a)); return b } h(a, c); return a }(m), Ab = function () {
                        function c(a, b, c, e) { this.predicate = a; this.source = b; this.yieldIndex = c; this.thisArg = e } c.prototype.call = function (a, b) {
                            return b.subscribe(new $d(a,
                                this.predicate, this.source, this.yieldIndex, this.thisArg))
                        }; return c
                    }(), $d = function (c) {
                        function a(b, a, e, f, g) { b = c.call(this, b) || this; b.predicate = a; b.source = e; b.yieldIndex = f; b.thisArg = g; b.index = 0; return b } h(a, c); a.prototype.notifyComplete = function (b) { var a = this.destination; a.next(b); a.complete(); this.unsubscribe() }; a.prototype._next = function (b) { var a = this.predicate, c = this.thisArg, f = this.index++; try { a.call(c || this, b, f, this.source) && this.notifyComplete(this.yieldIndex ? f : b) } catch (g) { this.destination.error(g) } };
                        a.prototype._complete = function () { this.notifyComplete(this.yieldIndex ? -1 : void 0) }; return a
                    }(m), be = function () { function c() { } c.prototype.call = function (a, b) { return b.subscribe(new ae(a)) }; return c }(), ae = function (c) { function a() { return null !== c && c.apply(this, arguments) || this } h(a, c); a.prototype._next = function (b) { }; return a }(m), de = function () { function c() { } c.prototype.call = function (a, b) { return b.subscribe(new ce(a)) }; return c }(), ce = function (c) {
                        function a(b) { return c.call(this, b) || this } h(a, c); a.prototype.notifyComplete =
                            function (b) { var a = this.destination; a.next(b); a.complete() }; a.prototype._next = function (b) { this.notifyComplete(!1) }; a.prototype._complete = function () { this.notifyComplete(!0) }; return a
                    }(m), nc = function () { function c(a) { this.total = a; if (0 > this.total) throw new X; } c.prototype.call = function (a, b) { return b.subscribe(new ee(a, this.total)) }; return c }(), ee = function (c) {
                        function a(b, a) { b = c.call(this, b) || this; b.total = a; b.ring = []; b.count = 0; return b } h(a, c); a.prototype._next = function (b) {
                            var a = this.ring, c = this.total, f =
                                this.count++; a.length < c ? a.push(b) : a[f % c] = b
                        }; a.prototype._complete = function () { var b = this.destination, a = this.count; if (0 < a) for (var c = this.count >= this.total ? this.total : this.count, f = this.ring, g = 0; g < c; g++) { var l = a++ % c; b.next(f[l]) } b.complete() }; return a
                    }(m), ge = function () { function c(a) { this.value = a } c.prototype.call = function (a, b) { return b.subscribe(new fe(a, this.value)) }; return c }(), fe = function (c) {
                        function a(b, a) { b = c.call(this, b) || this; b.value = a; return b } h(a, c); a.prototype._next = function (b) { this.destination.next(this.value) };
                        return a
                    }(m), ie = function () { function c() { } c.prototype.call = function (a, b) { return b.subscribe(new he(a)) }; return c }(), he = function (c) { function a(b) { return c.call(this, b) || this } h(a, c); a.prototype._next = function (b) { this.destination.next(w.createNext(b)) }; a.prototype._error = function (b) { var a = this.destination; a.next(w.createError(b)); a.complete() }; a.prototype._complete = function () { var b = this.destination; b.next(w.createComplete()); b.complete() }; return a }(m), oc = function () {
                        function c(a, b, c) {
                        void 0 === c && (c = !1);
                            this.accumulator = a; this.seed = b; this.hasSeed = c
                        } c.prototype.call = function (a, b) { return b.subscribe(new je(a, this.accumulator, this.seed, this.hasSeed)) }; return c
                    }(), je = function (c) {
                        function a(b, a, e, f) { b = c.call(this, b) || this; b.accumulator = a; b._seed = e; b.hasSeed = f; b.index = 0; return b } h(a, c); Object.defineProperty(a.prototype, "seed", { get: function () { return this._seed }, set: function (b) { this.hasSeed = !0; this._seed = b }, enumerable: !0, configurable: !0 }); a.prototype._next = function (b) {
                            if (this.hasSeed) return this._tryNext(b);
                            this.seed = b; this.destination.next(b)
                        }; a.prototype._tryNext = function (b) { var a = this.index++, c; try { c = this.accumulator(this.seed, b, a) } catch (f) { this.destination.error(f) } this.seed = c; this.destination.next(c) }; return a
                    }(m), le = function () { function c(a, b, c) { this.accumulator = a; this.seed = b; this.concurrent = c } c.prototype.call = function (a, b) { return b.subscribe(new ke(a, this.accumulator, this.seed, this.concurrent)) }; return c }(), ke = function (c) {
                        function a(b, a, e, f) {
                            b = c.call(this, b) || this; b.accumulator = a; b.acc = e; b.concurrent =
                                f; b.hasValue = !1; b.hasCompleted = !1; b.buffer = []; b.active = 0; b.index = 0; return b
                        } h(a, c); a.prototype._next = function (b) { if (this.active < this.concurrent) { var a = this.index++, c = this.destination, f = void 0; try { var g = this.accumulator, f = g(this.acc, b, a) } catch (l) { return c.error(l) } this.active++; this._innerSub(f, b, a) } else this.buffer.push(b) }; a.prototype._innerSub = function (b, a, c) { var d = new G(this, void 0, void 0); this.destination.add(d); p(this, b, a, c, d) }; a.prototype._complete = function () {
                        this.hasCompleted = !0; 0 === this.active &&
                            0 === this.buffer.length && (!1 === this.hasValue && this.destination.next(this.acc), this.destination.complete()); this.unsubscribe()
                        }; a.prototype.notifyNext = function (b, a, c, f, g) { b = this.destination; this.acc = a; this.hasValue = !0; b.next(a) }; a.prototype.notifyComplete = function (b) { var a = this.buffer; this.destination.remove(b); this.active--; 0 < a.length ? this._next(a.shift()) : 0 === this.active && this.hasCompleted && (!1 === this.hasValue && this.destination.next(this.acc), this.destination.complete()) }; return a
                    }(q), pc = function () {
                        function c(a,
                            b) { this.subjectFactory = a; this.selector = b } c.prototype.call = function (a, b) { var c = this.selector, e = this.subjectFactory(); a = c(e).subscribe(a); a.add(b.subscribe(e)); return a }; return c
                    }(), ne = function () { function c(a) { this.nextSources = a } c.prototype.call = function (a, b) { return b.subscribe(new me(a, this.nextSources)) }; return c }(), me = function (c) {
                        function a(b, a) { var d = c.call(this, b) || this; d.destination = b; d.nextSources = a; return d } h(a, c); a.prototype.notifyError = function (b, a) { this.subscribeToNextSource() }; a.prototype.notifyComplete =
                            function (b) { this.subscribeToNextSource() }; a.prototype._error = function (b) { this.subscribeToNextSource(); this.unsubscribe() }; a.prototype._complete = function () { this.subscribeToNextSource(); this.unsubscribe() }; a.prototype.subscribeToNextSource = function () { var b = this.nextSources.shift(); if (b) { var a = new G(this, void 0, void 0); this.destination.add(a); p(this, b, void 0, void 0, a) } else this.destination.complete() }; return a
                    }(q), pe = function () {
                        function c() { } c.prototype.call = function (a, b) { return b.subscribe(new oe(a)) };
                        return c
                    }(), oe = function (c) { function a(b) { b = c.call(this, b) || this; b.hasPrev = !1; return b } h(a, c); a.prototype._next = function (b) { var a; this.hasPrev ? a = [this.prev, b] : this.hasPrev = !0; this.prev = b; a && this.destination.next(a) }; return a }(m), Bb = function () { function c(a, b) { this.count = a; this.source = b } c.prototype.call = function (a, b) { return b.subscribe(new qe(a, this.count, this.source)) }; return c }(), qe = function (c) {
                        function a(b, a, e) { b = c.call(this, b) || this; b.count = a; b.source = e; return b } h(a, c); a.prototype.complete = function () {
                            if (!this.isStopped) {
                                var b =
                                    this.source, a = this.count; if (0 === a) return c.prototype.complete.call(this); -1 < a && (this.count = a - 1); b.subscribe(this._unsubscribeAndRecycle())
                            }
                        }; return a
                    }(m), se = function () { function c(a) { this.notifier = a } c.prototype.call = function (a, b) { return b.subscribe(new re(a, this.notifier, b)) }; return c }(), re = function (c) {
                        function a(b, a, e) { b = c.call(this, b) || this; b.notifier = a; b.source = e; b.sourceIsBeingSubscribedTo = !0; return b } h(a, c); a.prototype.notifyNext = function (b, a, c, f, g) { this.sourceIsBeingSubscribedTo = !0; this.source.subscribe(this) };
                        a.prototype.notifyComplete = function (b) { if (!1 === this.sourceIsBeingSubscribedTo) return c.prototype.complete.call(this) }; a.prototype.complete = function () { this.sourceIsBeingSubscribedTo = !1; if (!this.isStopped) { this.retries || this.subscribeToRetries(); if (!this.retriesSubscription || this.retriesSubscription.closed) return c.prototype.complete.call(this); this._unsubscribeAndRecycle(); this.notifications.next() } }; a.prototype._unsubscribe = function () {
                            var b = this.notifications, a = this.retriesSubscription; b && (b.unsubscribe(),
                                this.notifications = null); a && (a.unsubscribe(), this.retriesSubscription = null); this.retries = null
                        }; a.prototype._unsubscribeAndRecycle = function () { var b = this._unsubscribe; this._unsubscribe = null; c.prototype._unsubscribeAndRecycle.call(this); this._unsubscribe = b; return this }; a.prototype.subscribeToRetries = function () { this.notifications = new v; var b; try { var a = this.notifier; b = a(this.notifications) } catch (e) { return c.prototype.complete.call(this) } this.retries = b; this.retriesSubscription = p(this, b) }; return a
                    }(q), ue =
                        function () { function c(a, b) { this.count = a; this.source = b } c.prototype.call = function (a, b) { return b.subscribe(new te(a, this.count, this.source)) }; return c }(), te = function (c) { function a(b, a, e) { b = c.call(this, b) || this; b.count = a; b.source = e; return b } h(a, c); a.prototype.error = function (b) { if (!this.isStopped) { var a = this.source, e = this.count; if (0 === e) return c.prototype.error.call(this, b); -1 < e && (this.count = e - 1); a.subscribe(this._unsubscribeAndRecycle()) } }; return a }(m), we = function () {
                            function c(a, b) {
                            this.notifier = a; this.source =
                                b
                            } c.prototype.call = function (a, b) { return b.subscribe(new ve(a, this.notifier, this.source)) }; return c
                        }(), ve = function (c) {
                            function a(b, a, e) { b = c.call(this, b) || this; b.notifier = a; b.source = e; return b } h(a, c); a.prototype.error = function (b) {
                                if (!this.isStopped) {
                                    var a = this.errors, e = this.retries, f = this.retriesSubscription; if (e) this.retriesSubscription = this.errors = null; else { a = new v; try { var g = this.notifier, e = g(a) } catch (l) { return c.prototype.error.call(this, l) } f = p(this, e) } this._unsubscribeAndRecycle(); this.errors = a;
                                    this.retries = e; this.retriesSubscription = f; a.next(b)
                                }
                            }; a.prototype._unsubscribe = function () { var b = this.errors, a = this.retriesSubscription; b && (b.unsubscribe(), this.errors = null); a && (a.unsubscribe(), this.retriesSubscription = null); this.retries = null }; a.prototype.notifyNext = function (b, a, c, f, g) { b = this._unsubscribe; this._unsubscribe = null; this._unsubscribeAndRecycle(); this._unsubscribe = b; this.source.subscribe(this) }; return a
                        }(q), ye = function () {
                            function c(a) { this.notifier = a } c.prototype.call = function (a, b) {
                                a = new xe(a);
                                b = b.subscribe(a); b.add(p(a, this.notifier)); return b
                            }; return c
                        }(), xe = function (c) { function a() { var b = null !== c && c.apply(this, arguments) || this; b.hasValue = !1; return b } h(a, c); a.prototype._next = function (b) { this.value = b; this.hasValue = !0 }; a.prototype.notifyNext = function (b, a, c, f, g) { this.emitValue() }; a.prototype.notifyComplete = function () { this.emitValue() }; a.prototype.emitValue = function () { this.hasValue && (this.hasValue = !1, this.destination.next(this.value)) }; return a }(q), Ae = function () {
                            function c(a, b) {
                            this.period =
                                a; this.scheduler = b
                            } c.prototype.call = function (a, b) { return b.subscribe(new ze(a, this.period, this.scheduler)) }; return c
                        }(), ze = function (c) { function a(b, a, e) { b = c.call(this, b) || this; b.period = a; b.scheduler = e; b.hasValue = !1; b.add(e.schedule(sc, a, { subscriber: b, period: a })); return b } h(a, c); a.prototype._next = function (b) { this.lastValue = b; this.hasValue = !0 }; a.prototype.notifyNext = function () { this.hasValue && (this.hasValue = !1, this.destination.next(this.lastValue)) }; return a }(m), Ce = function () {
                            function c(a, b) {
                            this.compareTo =
                                a; this.comparator = b
                            } c.prototype.call = function (a, b) { return b.subscribe(new Be(a, this.compareTo, this.comparator)) }; return c
                        }(), Be = function (c) {
                            function a(b, a, e) { var d = c.call(this, b) || this; d.compareTo = a; d.comparator = e; d._a = []; d._b = []; d._oneComplete = !1; d.destination.add(a.subscribe(new De(b, d))); return d } h(a, c); a.prototype._next = function (b) { this._oneComplete && 0 === this._b.length ? this.emit(!1) : (this._a.push(b), this.checkValues()) }; a.prototype._complete = function () {
                                this._oneComplete ? this.emit(0 === this._a.length &&
                                    0 === this._b.length) : this._oneComplete = !0; this.unsubscribe()
                            }; a.prototype.checkValues = function () { for (var b = this._a, a = this._b, c = this.comparator; 0 < b.length && 0 < a.length;) { var f = b.shift(), g = a.shift(), l = !1; try { l = c ? c(f, g) : f === g } catch (u) { this.destination.error(u) } l || this.emit(!1) } }; a.prototype.emit = function (b) { var a = this.destination; a.next(b); a.complete() }; a.prototype.nextB = function (b) { this._oneComplete && 0 === this._a.length ? this.emit(!1) : (this._b.push(b), this.checkValues()) }; a.prototype.completeB = function () {
                                this._oneComplete ?
                                this.emit(0 === this._a.length && 0 === this._b.length) : this._oneComplete = !0
                            }; return a
                        }(m), De = function (c) { function a(b, a) { b = c.call(this, b) || this; b.parent = a; return b } h(a, c); a.prototype._next = function (b) { this.parent.nextB(b) }; a.prototype._error = function (b) { this.parent.error(b); this.unsubscribe() }; a.prototype._complete = function () { this.parent.completeB(); this.unsubscribe() }; return a }(m), Fe = function () {
                            function c(a, b) { this.predicate = a; this.source = b } c.prototype.call = function (a, b) {
                                return b.subscribe(new Ee(a, this.predicate,
                                    this.source))
                            }; return c
                        }(), Ee = function (c) {
                            function a(b, a, e) { b = c.call(this, b) || this; b.predicate = a; b.source = e; b.seenValue = !1; b.index = 0; return b } h(a, c); a.prototype.applySingleValue = function (b) { this.seenValue ? this.destination.error("Sequence contains more than one element") : (this.seenValue = !0, this.singleValue = b) }; a.prototype._next = function (b) { var a = this.index++; this.predicate ? this.tryNext(b, a) : this.applySingleValue(b) }; a.prototype.tryNext = function (b, a) { try { this.predicate(b, a, this.source) && this.applySingleValue(b) } catch (e) { this.destination.error(e) } };
                            a.prototype._complete = function () { var b = this.destination; 0 < this.index ? (b.next(this.seenValue ? this.singleValue : void 0), b.complete()) : b.error(new ca) }; return a
                        }(m), He = function () { function c(a) { this.total = a } c.prototype.call = function (a, b) { return b.subscribe(new Ge(a, this.total)) }; return c }(), Ge = function (c) { function a(b, a) { b = c.call(this, b) || this; b.total = a; b.count = 0; return b } h(a, c); a.prototype._next = function (b) { ++this.count > this.total && this.destination.next(b) }; return a }(m), Je = function () {
                            function c(a) {
                            this._skipCount =
                                a; if (0 > this._skipCount) throw new X;
                            } c.prototype.call = function (a, b) { return 0 === this._skipCount ? b.subscribe(new m(a)) : b.subscribe(new Ie(a, this._skipCount)) }; return c
                        }(), Ie = function (c) { function a(b, a) { b = c.call(this, b) || this; b._skipCount = a; b._count = 0; b._ring = Array(a); return b } h(a, c); a.prototype._next = function (b) { var a = this._skipCount, c = this._count++; if (c < a) this._ring[c] = b; else { var a = c % a, c = this._ring, f = c[a]; c[a] = b; this.destination.next(f) } }; return a }(m), Le = function () {
                            function c(a) { this.notifier = a } c.prototype.call =
                                function (a, b) { return b.subscribe(new Ke(a, this.notifier)) }; return c
                        }(), Ke = function (c) { function a(b, a) { b = c.call(this, b) || this; b.hasValue = !1; var d = new G(b, void 0, void 0); b.add(d); b.innerSubscription = d; p(b, a, void 0, void 0, d); return b } h(a, c); a.prototype._next = function (a) { this.hasValue && c.prototype._next.call(this, a) }; a.prototype.notifyNext = function (a, c, e, f, g) { this.hasValue = !0; this.innerSubscription && this.innerSubscription.unsubscribe() }; a.prototype.notifyComplete = function () { }; return a }(q), Ne = function () {
                            function c(a) {
                            this.predicate =
                                a
                            } c.prototype.call = function (a, b) { return b.subscribe(new Me(a, this.predicate)) }; return c
                        }(), Me = function (c) { function a(a, d) { a = c.call(this, a) || this; a.predicate = d; a.skipping = !0; a.index = 0; return a } h(a, c); a.prototype._next = function (a) { var b = this.destination; this.skipping && this.tryCallPredicate(a); this.skipping || b.next(a) }; a.prototype.tryCallPredicate = function (a) { try { this.skipping = !!this.predicate(a, this.index++) } catch (d) { this.destination.error(d) } }; return a }(m), Oe = function (c) {
                            function a(a, d, e) {
                            void 0 ===
                                d && (d = 0); void 0 === e && (e = pa); var b = c.call(this) || this; b.source = a; b.delayTime = d; b.scheduler = e; if (!V(d) || 0 > d) b.delayTime = 0; e && "function" === typeof e.schedule || (b.scheduler = pa); return b
                            } h(a, c); a.create = function (b, c, e) { void 0 === c && (c = 0); void 0 === e && (e = pa); return new a(b, c, e) }; a.dispatch = function (a) { return this.add(a.source.subscribe(a.subscriber)) }; a.prototype._subscribe = function (b) { return this.scheduler.schedule(a.dispatch, this.delayTime, { source: this.source, subscriber: b }) }; return a
                        }(n), Pe = function () {
                            function c(a,
                                b) { this.scheduler = a; this.delay = b } c.prototype.call = function (a, b) { return (new Oe(b, this.delay, this.scheduler)).subscribe(a) }; return c
                        }(), vc = function () { function c(a) { this.project = a } c.prototype.call = function (a, b) { return b.subscribe(new Qe(a, this.project)) }; return c }(), Qe = function (c) {
                            function a(a, d) { a = c.call(this, a) || this; a.project = d; a.index = 0; return a } h(a, c); a.prototype._next = function (a) { var b, c = this.index++; try { b = this.project(a, c) } catch (f) { this.destination.error(f); return } this._innerSub(b, a, c) }; a.prototype._innerSub =
                                function (a, c, e) { var b = this.innerSubscription; b && b.unsubscribe(); b = new G(this, void 0, void 0); this.destination.add(b); this.innerSubscription = p(this, a, c, e, b) }; a.prototype._complete = function () { var a = this.innerSubscription; a && !a.closed || c.prototype._complete.call(this); this.unsubscribe() }; a.prototype._unsubscribe = function () { this.innerSubscription = null }; a.prototype.notifyComplete = function (a) { this.destination.remove(a); this.innerSubscription = null; this.isStopped && c.prototype._complete.call(this) }; a.prototype.notifyNext =
                                    function (a, c, e, f, g) { this.destination.next(c) }; return a
                        }(q), Se = function () { function c(a) { this.notifier = a } c.prototype.call = function (a, b) { a = new Re(a); var c = p(a, this.notifier); return c && !a.seenValue ? (a.add(c), b.subscribe(a)) : a }; return c }(), Re = function (c) { function a(a) { a = c.call(this, a) || this; a.seenValue = !1; return a } h(a, c); a.prototype.notifyNext = function (a, c, e, f, g) { this.seenValue = !0; this.complete() }; a.prototype.notifyComplete = function () { }; return a }(q), Ue = function () {
                            function c(a, b) {
                            this.predicate = a; this.inclusive =
                                b
                            } c.prototype.call = function (a, b) { return b.subscribe(new Te(a, this.predicate, this.inclusive)) }; return c
                        }(), Te = function (c) { function a(a, d, e) { a = c.call(this, a) || this; a.predicate = d; a.inclusive = e; a.index = 0; return a } h(a, c); a.prototype._next = function (a) { var b = this.destination, c; try { c = this.predicate(a, this.index++) } catch (f) { b.error(f); return } this.nextOrComplete(a, c) }; a.prototype.nextOrComplete = function (a, c) { var b = this.destination; c ? b.next(a) : (this.inclusive && b.next(a), b.complete()) }; return a }(m), We = function () {
                            function c(a,
                                b, c) { this.nextOrObserver = a; this.error = b; this.complete = c } c.prototype.call = function (a, b) { return b.subscribe(new Ve(a, this.nextOrObserver, this.error, this.complete)) }; return c
                        }(), Ve = function (c) {
                            function a(a, d, e, f) { a = c.call(this, a) || this; a._tapNext = D; a._tapError = D; a._tapComplete = D; a._tapError = e || D; a._tapComplete = f || D; P(d) ? (a._context = a, a._tapNext = d) : d && (a._context = d, a._tapNext = d.next || D, a._tapError = d.error || D, a._tapComplete = d.complete || D); return a } h(a, c); a.prototype._next = function (a) {
                                try {
                                    this._tapNext.call(this._context,
                                        a)
                                } catch (d) { this.destination.error(d); return } this.destination.next(a)
                            }; a.prototype._error = function (a) { try { this._tapError.call(this._context, a) } catch (d) { this.destination.error(d); return } this.destination.error(a) }; a.prototype._complete = function () { try { this._tapComplete.call(this._context) } catch (b) { this.destination.error(b); return } return this.destination.complete() }; return a
                        }(m), Cb = { leading: !0, trailing: !1 }, Ye = function () {
                            function c(a, b, c) { this.durationSelector = a; this.leading = b; this.trailing = c } c.prototype.call =
                                function (a, b) { return b.subscribe(new Xe(a, this.durationSelector, this.leading, this.trailing)) }; return c
                        }(), Xe = function (c) {
                            function a(a, d, e, f) { var b = c.call(this, a) || this; b.destination = a; b.durationSelector = d; b._leading = e; b._trailing = f; b._hasValue = !1; return b } h(a, c); a.prototype._next = function (a) { this._hasValue = !0; this._sendValue = a; this._throttled || (this._leading ? this.send() : this.throttle(a)) }; a.prototype.send = function () {
                                var a = this._sendValue; this._hasValue && (this.destination.next(a), this.throttle(a));
                                this._hasValue = !1; this._sendValue = null
                            }; a.prototype.throttle = function (a) { (a = this.tryDurationSelector(a)) && this.add(this._throttled = p(this, a)) }; a.prototype.tryDurationSelector = function (a) { try { return this.durationSelector(a) } catch (d) { return this.destination.error(d), null } }; a.prototype.throttlingDone = function () { var a = this._throttled, c = this._trailing; a && a.unsubscribe(); this._throttled = null; c && this.send() }; a.prototype.notifyNext = function (a, c, e, f, g) { this.throttlingDone() }; a.prototype.notifyComplete = function () { this.throttlingDone() };
                            return a
                        }(q), $e = function () { function c(a, b, c, e) { this.duration = a; this.scheduler = b; this.leading = c; this.trailing = e } c.prototype.call = function (a, b) { return b.subscribe(new Ze(a, this.duration, this.scheduler, this.leading, this.trailing)) }; return c }(), Ze = function (c) {
                            function a(a, d, e, f, g) { a = c.call(this, a) || this; a.duration = d; a.scheduler = e; a.leading = f; a.trailing = g; a._hasTrailingValue = !1; a._trailingValue = null; return a } h(a, c); a.prototype._next = function (a) {
                                this.throttled ? this.trailing && (this._trailingValue = a, this._hasTrailingValue =
                                    !0) : (this.add(this.throttled = this.scheduler.schedule(wc, this.duration, { subscriber: this })), this.leading ? this.destination.next(a) : this.trailing && (this._trailingValue = a, this._hasTrailingValue = !0))
                            }; a.prototype._complete = function () { this._hasTrailingValue && this.destination.next(this._trailingValue); this.destination.complete() }; a.prototype.clearThrottle = function () {
                                var a = this.throttled; a && (this.trailing && this._hasTrailingValue && (this.destination.next(this._trailingValue), this._trailingValue = null, this._hasTrailingValue =
                                    !1), a.unsubscribe(), this.remove(a), this.throttled = null)
                            }; return a
                        }(m), af = function () { return function (c, a) { this.value = c; this.interval = a } }(), xc = function () { function c(a, b, c, e) { this.waitFor = a; this.absoluteTimeout = b; this.withObservable = c; this.scheduler = e } c.prototype.call = function (a, b) { return b.subscribe(new bf(a, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler)) }; return c }(), bf = function (c) {
                            function a(a, d, e, f, g) {
                                a = c.call(this, a) || this; a.absoluteTimeout = d; a.waitFor = e; a.withObservable =
                                    f; a.scheduler = g; a.action = null; a.scheduleTimeout(); return a
                            } h(a, c); a.dispatchTimeout = function (a) { var b = a.withObservable; a._unsubscribeAndRecycle(); a.add(p(a, b)) }; a.prototype.scheduleTimeout = function () { var b = this.action; b ? this.action = b.schedule(this, this.waitFor) : this.add(this.action = this.scheduler.schedule(a.dispatchTimeout, this.waitFor, this)) }; a.prototype._next = function (a) { this.absoluteTimeout || this.scheduleTimeout(); c.prototype._next.call(this, a) }; a.prototype._unsubscribe = function () {
                            this.withObservable =
                                this.scheduler = this.action = null
                            }; return a
                        }(q), cf = function () { return function (c, a) { this.value = c; this.timestamp = a } }(), ef = function () { function c(a) { this.windowBoundaries = a } c.prototype.call = function (a, b) { a = new df(a); b = b.subscribe(a); b.closed || a.add(p(a, this.windowBoundaries)); return b }; return c }(), df = function (c) {
                            function a(a) { var b = c.call(this, a) || this; b.window = new v; a.next(b.window); return b } h(a, c); a.prototype.notifyNext = function (a, c, e, f, g) { this.openWindow() }; a.prototype.notifyError = function (a, c) { this._error(a) };
                            a.prototype.notifyComplete = function (a) { this._complete() }; a.prototype._next = function (a) { this.window.next(a) }; a.prototype._error = function (a) { this.window.error(a); this.destination.error(a) }; a.prototype._complete = function () { this.window.complete(); this.destination.complete() }; a.prototype._unsubscribe = function () { this.window = null }; a.prototype.openWindow = function () { var a = this.window; a && a.complete(); var a = this.destination, c = this.window = new v; a.next(c) }; return a
                        }(q), gf = function () {
                            function c(a, b) {
                            this.windowSize =
                                a; this.startWindowEvery = b
                            } c.prototype.call = function (a, b) { return b.subscribe(new ff(a, this.windowSize, this.startWindowEvery)) }; return c
                        }(), ff = function (c) {
                            function a(a, d, e) { var b = c.call(this, a) || this; b.destination = a; b.windowSize = d; b.startWindowEvery = e; b.windows = [new v]; b.count = 0; a.next(b.windows[0]); return b } h(a, c); a.prototype._next = function (a) {
                                for (var b = 0 < this.startWindowEvery ? this.startWindowEvery : this.windowSize, c = this.destination, f = this.windowSize, g = this.windows, l = g.length, h = 0; h < l && !this.closed; h++)g[h].next(a);
                                a = this.count - f + 1; 0 <= a && 0 === a % b && !this.closed && g.shift().complete(); 0 !== ++this.count % b || this.closed || (b = new v, g.push(b), c.next(b))
                            }; a.prototype._error = function (a) { var b = this.windows; if (b) for (; 0 < b.length && !this.closed;)b.shift().error(a); this.destination.error(a) }; a.prototype._complete = function () { var a = this.windows; if (a) for (; 0 < a.length && !this.closed;)a.shift().complete(); this.destination.complete() }; a.prototype._unsubscribe = function () { this.count = 0; this.windows = null }; return a
                        }(m), jf = function () {
                            function c(a,
                                b, c, e) { this.windowTimeSpan = a; this.windowCreationInterval = b; this.maxWindowSize = c; this.scheduler = e } c.prototype.call = function (a, b) { return b.subscribe(new hf(a, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler)) }; return c
                        }(), kf = function (c) {
                            function a() { var a = null !== c && c.apply(this, arguments) || this; a._numberOfNextedValues = 0; return a } h(a, c); a.prototype.next = function (a) { this._numberOfNextedValues++; c.prototype.next.call(this, a) }; Object.defineProperty(a.prototype, "numberOfNextedValues",
                                { get: function () { return this._numberOfNextedValues }, enumerable: !0, configurable: !0 }); return a
                        }(v), hf = function (c) {
                            function a(a, d, e, f, g) {
                                var b = c.call(this, a) || this; b.destination = a; b.windowTimeSpan = d; b.windowCreationInterval = e; b.maxWindowSize = f; b.scheduler = g; b.windows = []; a = b.openWindow(); null !== e && 0 <= e ? (f = { windowTimeSpan: d, windowCreationInterval: e, subscriber: b, scheduler: g }, b.add(g.schedule(kb, d, { subscriber: b, window: a, context: null })), b.add(g.schedule(Ac, e, f))) : b.add(g.schedule(zc, d, {
                                    subscriber: b, window: a,
                                    windowTimeSpan: d
                                })); return b
                            } h(a, c); a.prototype._next = function (a) { for (var b = this.windows, c = b.length, f = 0; f < c; f++) { var g = b[f]; g.closed || (g.next(a), g.numberOfNextedValues >= this.maxWindowSize && this.closeWindow(g)) } }; a.prototype._error = function (a) { for (var b = this.windows; 0 < b.length;)b.shift().error(a); this.destination.error(a) }; a.prototype._complete = function () { for (var a = this.windows; 0 < a.length;) { var c = a.shift(); c.closed || c.complete() } this.destination.complete() }; a.prototype.openWindow = function () {
                                var a =
                                    new kf; this.windows.push(a); this.destination.next(a); return a
                            }; a.prototype.closeWindow = function (a) { a.complete(); var b = this.windows; b.splice(b.indexOf(a), 1) }; return a
                        }(m), mf = function () { function c(a, b) { this.openings = a; this.closingSelector = b } c.prototype.call = function (a, b) { return b.subscribe(new lf(a, this.openings, this.closingSelector)) }; return c }(), lf = function (c) {
                            function a(a, d, e) { a = c.call(this, a) || this; a.openings = d; a.closingSelector = e; a.contexts = []; a.add(a.openSubscription = p(a, d, d)); return a } h(a, c);
                            a.prototype._next = function (a) { var b = this.contexts; if (b) for (var c = b.length, f = 0; f < c; f++)b[f].window.next(a) }; a.prototype._error = function (a) { var b = this.contexts; this.contexts = null; if (b) for (var e = b.length, f = -1; ++f < e;) { var g = b[f]; g.window.error(a); g.subscription.unsubscribe() } c.prototype._error.call(this, a) }; a.prototype._complete = function () { var a = this.contexts; this.contexts = null; if (a) for (var d = a.length, e = -1; ++e < d;) { var f = a[e]; f.window.complete(); f.subscription.unsubscribe() } c.prototype._complete.call(this) };
                            a.prototype._unsubscribe = function () { var a = this.contexts; this.contexts = null; if (a) for (var c = a.length, e = -1; ++e < c;) { var f = a[e]; f.window.unsubscribe(); f.subscription.unsubscribe() } }; a.prototype.notifyNext = function (a, c, e, f, g) { if (a === this.openings) { a = void 0; try { var b = this.closingSelector; a = b(c) } catch (u) { return this.error(u) } c = new v; b = new t; e = { window: c, subscription: b }; this.contexts.push(e); a = p(this, a, e); a.closed ? this.closeWindow(this.contexts.length - 1) : (a.context = e, b.add(a)); this.destination.next(c) } else this.closeWindow(this.contexts.indexOf(a)) };
                            a.prototype.notifyError = function (a) { this.error(a) }; a.prototype.notifyComplete = function (a) { a !== this.openSubscription && this.closeWindow(this.contexts.indexOf(a.context)) }; a.prototype.closeWindow = function (a) { if (-1 !== a) { var b = this.contexts, c = b[a], f = c.window, c = c.subscription; b.splice(a, 1); f.complete(); c.unsubscribe() } }; return a
                        }(q), of = function () { function c(a) { this.closingSelector = a } c.prototype.call = function (a, b) { return b.subscribe(new nf(a, this.closingSelector)) }; return c }(), nf = function (c) {
                            function a(a,
                                d) { var b = c.call(this, a) || this; b.destination = a; b.closingSelector = d; b.openWindow(); return b } h(a, c); a.prototype.notifyNext = function (a, c, e, f, g) { this.openWindow(g) }; a.prototype.notifyError = function (a, c) { this._error(a) }; a.prototype.notifyComplete = function (a) { this.openWindow(a) }; a.prototype._next = function (a) { this.window.next(a) }; a.prototype._error = function (a) { this.window.error(a); this.destination.error(a); this.unsubscribeClosingNotification() }; a.prototype._complete = function () {
                                    this.window.complete(); this.destination.complete();
                                    this.unsubscribeClosingNotification()
                                }; a.prototype.unsubscribeClosingNotification = function () { this.closingNotification && this.closingNotification.unsubscribe() }; a.prototype.openWindow = function (a) { void 0 === a && (a = null); a && (this.remove(a), a.unsubscribe()); (a = this.window) && a.complete(); a = this.window = new v; this.destination.next(a); var b; try { var c = this.closingSelector; b = c() } catch (f) { this.destination.error(f); this.window.error(f); return } this.add(this.closingNotification = p(this, b)) }; return a
                        }(q), qf = function () {
                            function c(a,
                                b) { this.observables = a; this.project = b } c.prototype.call = function (a, b) { return b.subscribe(new pf(a, this.observables, this.project)) }; return c
                        }(), pf = function (c) {
                            function a(a, d, e) { a = c.call(this, a) || this; a.observables = d; a.project = e; a.toRespond = []; e = d.length; a.values = Array(e); for (var b = 0; b < e; b++)a.toRespond.push(b); for (b = 0; b < e; b++) { var g = d[b]; a.add(p(a, g, g, b)) } return a } h(a, c); a.prototype.notifyNext = function (a, c, e, f, g) { this.values[e] = c; a = this.toRespond; 0 < a.length && (e = a.indexOf(e), -1 !== e && a.splice(e, 1)) }; a.prototype.notifyComplete =
                                function () { }; a.prototype._next = function (a) { 0 === this.toRespond.length && (a = [a].concat(this.values), this.project ? this._tryProject(a) : this.destination.next(a)) }; a.prototype._tryProject = function (a) { var b; try { b = this.project.apply(this, a) } catch (e) { this.destination.error(e); return } this.destination.next(b) }; return a
                        }(q), rf = Object.freeze({
                            audit: db, auditTime: function (c, a) { void 0 === a && (a = y); return db(function () { return ab(c, a) }) }, buffer: function (c) { return function (a) { return a.lift(new kd(c)) } }, bufferCount: function (c,
                                a) { void 0 === a && (a = null); return function (b) { return b.lift(new nd(c, a)) } }, bufferTime: function (c) { var a = arguments.length, b = y; A(arguments[arguments.length - 1]) && (b = arguments[arguments.length - 1], a--); var d = null; 2 <= a && (d = arguments[1]); var e = Number.POSITIVE_INFINITY; 3 <= a && (e = arguments[2]); return function (a) { return a.lift(new pd(c, d, e, b)) } }, bufferToggle: function (c, a) { return function (b) { return b.lift(new sd(c, a)) } }, bufferWhen: function (c) { return function (a) { return a.lift(new ud(c)) } }, catchError: function (c) {
                                    return function (a) {
                                        var b =
                                            new wd(c); a = a.lift(b); return b.caught = a
                                    }
                                }, combineAll: function (c) { return function (a) { return a.lift(new Ha(c)) } }, combineLatest: function () { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; var b = null; "function" === typeof c[c.length - 1] && (b = c.pop()); 1 === c.length && x(c[0]) && (c = c[0].slice()); return function (a) { return a.lift.call(F([a].concat(c)), new Ha(b)) } }, concat: function () { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; return function (a) { return a.lift.call(aa.apply(void 0, [a].concat(c))) } },
                            concatAll: Ua, concatMap: gb, concatMapTo: function (c, a) { return gb(function () { return c }, a) }, count: function (c) { return function (a) { return a.lift(new yd(c, a)) } }, debounce: function (c) { return function (a) { return a.lift(new Ad(c)) } }, debounceTime: function (c, a) { void 0 === a && (a = y); return function (b) { return b.lift(new Cd(c, a)) } }, defaultIfEmpty: ba, delay: function (c, a) { void 0 === a && (a = y); var b = c instanceof Date && !isNaN(+c) ? +c - a.now() : Math.abs(c); return function (c) { return c.lift(new Fd(b, a)) } }, delayWhen: function (c, a) {
                                return a ?
                                    function (b) { return (new Jd(b, a)).lift(new zb(c)) } : function (a) { return a.lift(new zb(c)) }
                            }, dematerialize: function () { return function (c) { return c.lift(new Ld) } }, distinct: function (c, a) { return function (b) { return b.lift(new Nd(c, a)) } }, distinctUntilChanged: hb, distinctUntilKeyChanged: function (c, a) { return hb(function (b, d) { return a ? a(b[c], d[c]) : b[c] === d[c] }) }, elementAt: function (c, a) { if (0 > c) throw new X; var b = 2 <= arguments.length; return function (d) { return d.pipe(H(function (a, b) { return b === c }), Aa(1), b ? ba(a) : ja(function () { return new X })) } },
                            endWith: function () { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; return function (a) { return aa(a, ga.apply(void 0, c)) } }, every: function (c, a) { return function (b) { return b.lift(new Sd(c, a, b)) } }, exhaust: function () { return function (c) { return c.lift(new Ud) } }, exhaustMap: ib, expand: function (c, a, b) { void 0 === a && (a = Number.POSITIVE_INFINITY); void 0 === b && (b = void 0); a = 1 > (a || 0) ? Number.POSITIVE_INFINITY : a; return function (d) { return d.lift(new Xd(c, a, b)) } }, filter: H, finalize: function (c) { return function (a) { return a.lift(new Zd(c)) } },
                            find: function (c, a) { if ("function" !== typeof c) throw new TypeError("predicate is not a function"); return function (b) { return b.lift(new Ab(c, b, !1, a)) } }, findIndex: function (c, a) { return function (b) { return b.lift(new Ab(c, b, !0, a)) } }, first: function (c, a) { var b = 2 <= arguments.length; return function (d) { return d.pipe(c ? H(function (a, b) { return c(a, b, d) }) : J, Aa(1), b ? ba(a) : ja(function () { return new ca })) } }, groupBy: function (c, a, b, d) { return function (e) { return e.lift(new Mc(c, a, b, d)) } }, ignoreElements: function () { return function (c) { return c.lift(new be) } },
                            isEmpty: function () { return function (c) { return c.lift(new de) } }, last: function (c, a) { var b = 2 <= arguments.length; return function (d) { return d.pipe(c ? H(function (a, b) { return c(a, b, d) }) : J, ka(1), b ? ba(a) : ja(function () { return new ca })) } }, map: B, mapTo: function (c) { return function (a) { return a.lift(new ge(c)) } }, materialize: function () { return function (c) { return c.lift(new ie) } }, max: function (c) { return ma("function" === typeof c ? function (a, b) { return 0 < c(a, b) ? a : b } : function (a, b) { return a > b ? a : b }) }, merge: function () {
                                for (var c =
                                    [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; return function (a) { return a.lift.call(Ya.apply(void 0, [a].concat(c))) }
                            }, mergeAll: xa, mergeMap: L, flatMap: L, mergeMapTo: function (c, a, b) { void 0 === b && (b = Number.POSITIVE_INFINITY); if ("function" === typeof a) return L(function () { return c }, a, b); "number" === typeof a && (b = a); return L(function () { return c }, b) }, mergeScan: function (c, a, b) { void 0 === b && (b = Number.POSITIVE_INFINITY); return function (d) { return d.lift(new le(c, a, b)) } }, min: function (c) {
                                return ma("function" === typeof c ?
                                    function (a, b) { return 0 > c(a, b) ? a : b } : function (a, b) { return a < b ? a : b })
                            }, multicast: M, observeOn: function (c, a) { void 0 === a && (a = 0); return function (b) { return b.lift(new Qc(c, a)) } }, onErrorResumeNext: function () { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; 1 === c.length && x(c[0]) && (c = c[0]); return function (a) { return a.lift(new ne(c)) } }, pairwise: function () { return function (c) { return c.lift(new pe) } }, partition: function (c, a) { return function (b) { return [H(c, a)(b), H(Za(c, a))(b)] } }, pluck: function () {
                                for (var c =
                                    [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; var b = c.length; if (0 === b) throw Error("list of properties cannot be empty."); return function (a) { return B(rc(c, b))(a) }
                            }, publish: function (c) { return c ? M(function () { return new v }, c) : M(new v) }, publishBehavior: function (c) { return function (a) { return M(new rb(c))(a) } }, publishLast: function () { return function (c) { return M(new T)(c) } }, publishReplay: function (c, a, b, d) {
                            b && "function" !== typeof b && (d = b); var e = "function" === typeof b ? b : void 0, f = new W(c, a, d); return function (a) {
                                return M(function () { return f },
                                    e)(a)
                            }
                            }, race: function () { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; return function (a) { 1 === c.length && x(c[0]) && (c = c[0]); return a.lift.call($a.apply(void 0, [a].concat(c))) } }, reduce: ma, repeat: function (c) { void 0 === c && (c = -1); return function (a) { return 0 === c ? R() : 0 > c ? a.lift(new Bb(-1, a)) : a.lift(new Bb(c - 1, a)) } }, repeatWhen: function (c) { return function (a) { return a.lift(new se(c)) } }, retry: function (c) { void 0 === c && (c = -1); return function (a) { return a.lift(new ue(c, a)) } }, retryWhen: function (c) {
                                return function (a) {
                                    return a.lift(new we(c,
                                        a))
                                }
                            }, refCount: ua, sample: function (c) { return function (a) { return a.lift(new ye(c)) } }, sampleTime: function (c, a) { void 0 === a && (a = y); return function (b) { return b.lift(new Ae(c, a)) } }, scan: la, sequenceEqual: function (c, a) { return function (b) { return b.lift(new Ce(c, a)) } }, share: function () { return function (c) { return ua()(M(tc)(c)) } }, shareReplay: function (c, a, b) { var d; d = c && "object" === typeof c ? c : { bufferSize: c, windowTime: a, refCount: !1, scheduler: b }; return function (a) { return a.lift(uc(d)) } }, single: function (c) {
                                return function (a) {
                                    return a.lift(new Fe(c,
                                        a))
                                }
                            }, skip: function (c) { return function (a) { return a.lift(new He(c)) } }, skipLast: function (c) { return function (a) { return a.lift(new Je(c)) } }, skipUntil: function (c) { return function (a) { return a.lift(new Le(c)) } }, skipWhile: function (c) { return function (a) { return a.lift(new Ne(c)) } }, startWith: function () { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; var b = c[c.length - 1]; return A(b) ? (c.pop(), function (a) { return aa(c, a, b) }) : function (a) { return aa(c, a) } }, subscribeOn: function (c, a) {
                            void 0 === a && (a = 0); return function (b) {
                                return b.lift(new Pe(c,
                                    a))
                            }
                            }, switchAll: function () { return da(J) }, switchMap: da, switchMapTo: function (c, a) { return a ? da(function () { return c }, a) : da(function () { return c }) }, take: Aa, takeLast: ka, takeUntil: function (c) { return function (a) { return a.lift(new Se(c)) } }, takeWhile: function (c, a) { void 0 === a && (a = !1); return function (b) { return b.lift(new Ue(c, a)) } }, tap: function (c, a, b) { return function (d) { return d.lift(new We(c, a, b)) } }, throttle: function (c, a) { void 0 === a && (a = Cb); return function (b) { return b.lift(new Ye(c, a.leading, a.trailing)) } }, throttleTime: function (c,
                                a, b) { void 0 === a && (a = y); void 0 === b && (b = Cb); return function (d) { return d.lift(new $e(c, a, b.leading, b.trailing)) } }, throwIfEmpty: ja, timeInterval: function (c) { void 0 === c && (c = y); return function (a) { return ya(function () { return a.pipe(la(function (a, d) { a = a.current; return { value: d, current: c.now(), last: a } }, { current: c.now(), value: void 0, last: void 0 }), B(function (a) { return new af(a.value, a.current - a.last) })) }) } }, timeout: function (c, a) { void 0 === a && (a = y); return jb(c, wa(new wb), a) }, timeoutWith: jb, timestamp: function (c) {
                                void 0 ===
                                    c && (c = y); return B(function (a) { return new cf(a, c.now()) })
                                }, toArray: function () { return ma(yc, []) }, window: function (c) { return function (a) { return a.lift(new ef(c)) } }, windowCount: function (c, a) { void 0 === a && (a = 0); return function (b) { return b.lift(new gf(c, a)) } }, windowTime: function (c, a, b, d) { var e = y, f = null, g = Number.POSITIVE_INFINITY; A(d) && (e = d); A(b) ? e = b : V(b) && (g = b); A(a) ? e = a : V(a) && (f = a); return function (a) { return a.lift(new jf(c, f, g, e)) } }, windowToggle: function (c, a) { return function (b) { return b.lift(new mf(c, a)) } },
                            windowWhen: function (c) { return function (a) { return a.lift(new of(c)) } }, withLatestFrom: function () { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; return function (a) { var b; "function" === typeof c[c.length - 1] && (b = c.pop()); return a.lift(new qf(c, b)) } }, zip: function () { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; return function (a) { return a.lift.call(bb.apply(void 0, [a].concat(c))) } }, zipAll: function (c) { return function (a) { return a.lift(new cb(c)) } }
                        }), fa = function () {
                            return function (c, a) {
                            void 0 ===
                                a && (a = Number.POSITIVE_INFINITY); this.subscribedFrame = c; this.unsubscribedFrame = a
                            }
                        }(), Db = function () { function c() { this.subscriptions = [] } c.prototype.logSubscribedFrame = function () { this.subscriptions.push(new fa(this.scheduler.now())); return this.subscriptions.length - 1 }; c.prototype.logUnsubscribedFrame = function (a) { var b = this.subscriptions; b[a] = new fa(b[a].subscribedFrame, this.scheduler.now()) }; return c }(), Ia = function (c) {
                            function a(a, d) {
                                var b = c.call(this, function (a) {
                                    var b = this, c = b.logSubscribedFrame(), d =
                                        new t; d.add(new t(function () { b.logUnsubscribedFrame(c) })); b.scheduleMessages(a); return d
                                }) || this; b.messages = a; b.subscriptions = []; b.scheduler = d; return b
                            } h(a, c); a.prototype.scheduleMessages = function (a) { for (var b = this.messages.length, c = 0; c < b; c++) { var f = this.messages[c]; a.add(this.scheduler.schedule(function (a) { a.message.notification.observe(a.subscriber) }, f.frame, { message: f, subscriber: a })) } }; return a
                        }(n); lb(Ia, [Db]); var Eb = function (c) {
                            function a(a, d) {
                                var b = c.call(this) || this; b.messages = a; b.subscriptions =
                                    []; b.scheduler = d; return b
                            } h(a, c); a.prototype._subscribe = function (a) { var b = this, e = b.logSubscribedFrame(), f = new t; f.add(new t(function () { b.logUnsubscribedFrame(e) })); f.add(c.prototype._subscribe.call(this, a)); return f }; a.prototype.setup = function () { for (var a = this, c = a.messages.length, e = 0; e < c; e++)(function () { var b = a.messages[e]; a.scheduler.schedule(function () { b.notification.observe(a) }, b.frame) })() }; return a
                        }(v); lb(Eb, [Db]); var tf = function (c) {
                            function a(a) {
                                var b = c.call(this, Ga, 750) || this; b.assertDeepEqual =
                                    a; b.hotObservables = []; b.coldObservables = []; b.flushTests = []; b.runMode = !1; return b
                            } h(a, c); a.prototype.createTime = function (b) { b = b.indexOf("|"); if (-1 === b) throw Error('marble diagram for time should have a completion marker "|"'); return b * a.frameTimeFactor }; a.prototype.createColdObservable = function (b, c, e) {
                                if (-1 !== b.indexOf("^")) throw Error('cold observable cannot have subscription offset "^"'); if (-1 !== b.indexOf("!")) throw Error('cold observable cannot have unsubscription marker "!"'); b = a.parseMarbles(b,
                                    c, e, void 0, this.runMode); b = new Ia(b, this); this.coldObservables.push(b); return b
                            }; a.prototype.createHotObservable = function (b, c, e) { if (-1 !== b.indexOf("!")) throw Error('hot observable cannot have unsubscription marker "!"'); b = a.parseMarbles(b, c, e, void 0, this.runMode); b = new Eb(b, this); this.hotObservables.push(b); return b }; a.prototype.materializeInnerObservable = function (a, c) {
                                var b = this, d = []; a.subscribe(function (a) { d.push({ frame: b.frame - c, notification: w.createNext(a) }) }, function (a) {
                                    d.push({
                                        frame: b.frame -
                                            c, notification: w.createError(a)
                                    })
                                }, function () { d.push({ frame: b.frame - c, notification: w.createComplete() }) }); return d
                            }; a.prototype.expectObservable = function (b, c) {
                                var d = this; void 0 === c && (c = null); var f = [], g = { actual: f, ready: !1 }; c = a.parseMarblesAsSubscriptions(c, this.runMode); var h = c.unsubscribedFrame, k; this.schedule(function () {
                                    k = b.subscribe(function (a) { var b = a; a instanceof n && (b = d.materializeInnerObservable(b, d.frame)); f.push({ frame: d.frame, notification: w.createNext(b) }) }, function (a) {
                                        f.push({
                                            frame: d.frame,
                                            notification: w.createError(a)
                                        })
                                    }, function () { f.push({ frame: d.frame, notification: w.createComplete() }) })
                                }, c.subscribedFrame === Number.POSITIVE_INFINITY ? 0 : c.subscribedFrame); h !== Number.POSITIVE_INFINITY && this.schedule(function () { return k.unsubscribe() }, h); this.flushTests.push(g); var m = this.runMode; return { toBe: function (b, c, d) { g.ready = !0; g.expected = a.parseMarbles(b, c, d, !0, m) } }
                            }; a.prototype.expectSubscriptions = function (b) {
                                var c = { actual: b, ready: !1 }; this.flushTests.push(c); var e = this.runMode; return {
                                    toBe: function (b) {
                                        b =
                                        "string" === typeof b ? [b] : b; c.ready = !0; c.expected = b.map(function (b) { return a.parseMarblesAsSubscriptions(b, e) })
                                    }
                                }
                            }; a.prototype.flush = function () { for (var a = this, d = this.hotObservables; 0 < d.length;)d.shift().setup(); c.prototype.flush.call(this); this.flushTests = this.flushTests.filter(function (b) { return b.ready ? (a.assertDeepEqual(b.actual, b.expected), !1) : !0 }) }; a.parseMarblesAsSubscriptions = function (a, c) {
                                var b = this; void 0 === c && (c = !1); if ("string" !== typeof a) return new fa(Number.POSITIVE_INFINITY); for (var d =
                                    a.length, g = -1, h = Number.POSITIVE_INFINITY, k = Number.POSITIVE_INFINITY, m = 0, r = function (d) {
                                        var e = m, f = function (a) { e += a * b.frameTimeFactor }, l = a[d]; switch (l) {
                                            case " ": c || f(1); break; case "-": f(1); break; case "(": g = m; f(1); break; case ")": g = -1; f(1); break; case "^": if (h !== Number.POSITIVE_INFINITY) throw Error("found a second subscription point '^' in a subscription marble diagram. There can only be one."); h = -1 < g ? g : m; f(1); break; case "!": if (k !== Number.POSITIVE_INFINITY) throw Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");
                                                k = -1 < g ? g : m; break; default: if (c && l.match(/^[0-9]$/) && (0 === d || " " === a[d - 1])) { var r = a.slice(d).match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); if (r) { d += r[0].length - 1; var l = parseFloat(r[1]), u = void 0; switch (r[2]) { case "ms": u = l; break; case "s": u = 1E3 * l; break; case "m": u = 6E4 * l }f(u / n.frameTimeFactor); break } } throw Error("there can only be '^' and '!' markers in a subscription marble diagram. Found instead '" + l + "'.");
                                        }m = e; p = d
                                    }, n = this, p, q = 0; q < d; q++)r(q), q = p; return 0 > k ? new fa(h) : new fa(h, k)
                            }; a.parseMarbles = function (a, c,
                                e, f, g) {
                                    var b = this; void 0 === f && (f = !1); void 0 === g && (g = !1); if (-1 !== a.indexOf("!")) throw Error('conventional marble diagrams cannot have the unsubscription marker "!"'); for (var d = a.length, h = [], k = g ? a.replace(/^[ ]+/, "").indexOf("^") : a.indexOf("^"), m = -1 === k ? 0 : k * -this.frameTimeFactor, n = "object" !== typeof c ? function (a) { return a } : function (a) { return f && c[a] instanceof Ia ? c[a].messages : c[a] }, p = -1, k = function (c) {
                                        var d = m, f = function (a) { d += a * b.frameTimeFactor }, l = void 0, k = a[c]; switch (k) {
                                            case " ": g || f(1); break; case "-": f(1);
                                                break; case "(": p = m; f(1); break; case ")": p = -1; f(1); break; case "|": l = w.createComplete(); f(1); break; case "^": f(1); break; case "#": l = w.createError(e || "error"); f(1); break; default: if (g && k.match(/^[0-9]$/) && (0 === c || " " === a[c - 1])) { var u = a.slice(c).match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); if (u) { c += u[0].length - 1; var k = parseFloat(u[1]), r = void 0; switch (u[2]) { case "ms": r = k; break; case "s": r = 1E3 * k; break; case "m": r = 6E4 * k }f(r / q.frameTimeFactor); break } } l = w.createNext(n(k)); f(1)
                                        }l && h.push({ frame: -1 < p ? p : m, notification: l });
                                        m = d; t = c
                                    }, q = this, t, v = 0; v < d; v++)k(v), v = t; return h
                            }; a.prototype.run = function (b) {
                                var c = a.frameTimeFactor, e = this.maxFrames; a.frameTimeFactor = 1; this.maxFrames = Number.POSITIVE_INFINITY; this.runMode = !0; O.delegate = this; var f = { cold: this.createColdObservable.bind(this), hot: this.createHotObservable.bind(this), flush: this.flush.bind(this), expectObservable: this.expectObservable.bind(this), expectSubscriptions: this.expectSubscriptions.bind(this) }; try { var g = b(f); this.flush(); return g } finally {
                                a.frameTimeFactor = c, this.maxFrames =
                                    e, this.runMode = !1, O.delegate = void 0
                                }
                            }; return a
                        }(vb), uf = Object.freeze({ TestScheduler: tf }), vf = "undefined" !== typeof self && "undefined" !== typeof WorkerGlobalScope && self instanceof WorkerGlobalScope && self, wf = "undefined" !== typeof global && global, z = "undefined" !== typeof window && window || wf || vf; if (!z) throw Error("RxJS could not find any global context (window, self, global)"); var Hc = B(function (c, a) { return c.response }), N = function (c) {
                            function a(a) {
                                var b = c.call(this) || this, e = {
                                    async: !0, createXHR: function () {
                                        var a;
                                        if (this.crossDomain) if (z.XMLHttpRequest) a = new z.XMLHttpRequest; else if (z.XDomainRequest) a = new z.XDomainRequest; else throw Error("CORS is not supported by your browser"); else if (z.XMLHttpRequest) a = new z.XMLHttpRequest; else { var b = void 0; try { for (var c = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0"], d = 0; 3 > d; d++)try { b = c[d]; new z.ActiveXObject(b); break } catch (r) { } a = new z.ActiveXObject(b) } catch (r) { throw Error("XMLHttpRequest is not supported by your browser"); } } return a
                                    }, crossDomain: !0, withCredentials: !1,
                                    headers: {}, method: "GET", responseType: "json", timeout: 0
                                }; if ("string" === typeof a) e.url = a; else for (var f in a) a.hasOwnProperty(f) && (e[f] = a[f]); b.request = e; return b
                            } h(a, c); a.prototype._subscribe = function (a) { return new xf(a, this.request) }; a.create = function () { var b = function (b) { return new a(b) }; b.get = Bc; b.post = Cc; b.delete = Dc; b.put = Ec; b.patch = Fc; b.getJSON = Gc; return b }(); return a
                        }(n), xf = function (c) {
                            function a(a, d) {
                                a = c.call(this, a) || this; a.request = d; a.done = !1; var b = d.headers = d.headers || {}; d.crossDomain || a.getHeader(b,
                                    "X-Requested-With") || (b["X-Requested-With"] = "XMLHttpRequest"); a.getHeader(b, "Content-Type") || z.FormData && d.body instanceof z.FormData || "undefined" === typeof d.body || (b["Content-Type"] = "application/x-www-form-urlencoded; charset\x3dUTF-8"); d.body = a.serializeBody(d.body, a.getHeader(d.headers, "Content-Type")); a.send(); return a
                            } h(a, c); a.prototype.next = function (a) { this.done = !0; var b = this.xhr, c = this.request, f = this.destination, g; try { g = new Fb(a, b, c) } catch (l) { return f.error(l) } f.next(g) }; a.prototype.send = function () {
                                var a =
                                    this.request, c = this.request, e = c.user, f = c.method, g = c.url, h = c.async, k = c.password, m = c.headers, c = c.body; try { var r = this.xhr = a.createXHR(); this.setupEvents(r, a); e ? r.open(f, g, h, e, k) : r.open(f, g, h); h && (r.timeout = a.timeout, r.responseType = a.responseType); "withCredentials" in r && (r.withCredentials = !!a.withCredentials); this.setHeaders(r, m); c ? r.send(c) : r.send() } catch (Vb) { this.error(Vb) }
                            }; a.prototype.serializeBody = function (a, c) {
                                if (!a || "string" === typeof a || z.FormData && a instanceof z.FormData) return a; if (c) {
                                    var b =
                                        c.indexOf(";"); -1 !== b && (c = c.substring(0, b))
                                } switch (c) { case "application/x-www-form-urlencoded": return Object.keys(a).map(function (b) { return encodeURIComponent(b) + "\x3d" + encodeURIComponent(a[b]) }).join("\x26"); case "application/json": return JSON.stringify(a); default: return a }
                            }; a.prototype.setHeaders = function (a, c) { for (var b in c) c.hasOwnProperty(b) && a.setRequestHeader(b, c[b]) }; a.prototype.getHeader = function (a, c) { for (var b in a) if (b.toLowerCase() === c.toLowerCase()) return a[b] }; a.prototype.setupEvents =
                                function (a, c) {
                                    function b(a) { var c = b.subscriber, d = b.progressSubscriber, e = b.request; d && d.error(a); var f; try { f = new Gb(this, e) } catch (Ja) { f = Ja } c.error(f) } function d(a) { } function g(a) {
                                        var b = g.subscriber, c = g.progressSubscriber, d = g.request; if (4 === this.readyState) {
                                            var e = 1223 === this.status ? 204 : this.status, f = "text" === this.responseType ? this.response || this.responseText : this.response; 0 === e && (e = f ? 200 : 0); if (400 > e) c && c.complete(), b.next(a), b.complete(); else {
                                                c && c.error(a); a = void 0; try {
                                                    a = new qa("ajax error " + e, this,
                                                        d)
                                                } catch (sf) { a = sf } b.error(a)
                                            }
                                        }
                                    } var h = c.progressSubscriber; a.ontimeout = b; b.request = c; b.subscriber = this; b.progressSubscriber = h; if (a.upload && "withCredentials" in a) {
                                        if (h) { var k; k = function (a) { k.progressSubscriber.next(a) }; z.XDomainRequest ? a.onprogress = k : a.upload.onprogress = k; k.progressSubscriber = h } var m; m = function (a) { var b = m.progressSubscriber, c = m.subscriber, d = m.request; b && b.error(a); var e; try { e = new qa("ajax error", this, d) } catch (Ja) { e = Ja } c.error(e) }; a.onerror = m; m.request = c; m.subscriber = this; m.progressSubscriber =
                                            h
                                    } a.onreadystatechange = d; d.subscriber = this; d.progressSubscriber = h; d.request = c; a.onload = g; g.subscriber = this; g.progressSubscriber = h; g.request = c
                                }; a.prototype.unsubscribe = function () { var a = this.xhr; !this.done && a && 4 !== a.readyState && "function" === typeof a.abort && a.abort(); c.prototype.unsubscribe.call(this) }; return a
                        }(m), Fb = function () {
                            return function (c, a, b) {
                            this.originalEvent = c; this.xhr = a; this.request = b; this.status = a.status; this.responseType = a.responseType || b.responseType; this.response = mb(this.responseType,
                                a)
                            }
                        }(), qa = function () { function c(a, b, c) { Error.call(this); this.message = a; this.name = "AjaxError"; this.xhr = b; this.request = c; this.status = b.status; this.responseType = b.responseType || c.responseType; this.response = mb(this.responseType, b); return this } c.prototype = Object.create(Error.prototype); return c }(), Gb = function (c, a) { qa.call(this, "ajax timeout", c, a); this.name = "AjaxTimeoutError"; return this }, yf = Object.freeze({ ajax: N.create, AjaxResponse: Fb, AjaxError: qa, AjaxTimeoutError: Gb }), zf = {
                            url: "", deserializer: function (c) { return JSON.parse(c.data) },
                            serializer: function (c) { return JSON.stringify(c) }
                        }, Hb = function (c) {
                            function a(a, d) { var b = c.call(this) || this; if (a instanceof n) b.destination = d, b.source = a; else { d = b._config = Ic({}, zf); b._output = new v; if ("string" === typeof a) d.url = a; else for (var f in a) a.hasOwnProperty(f) && (d[f] = a[f]); if (!d.WebSocketCtor && WebSocket) d.WebSocketCtor = WebSocket; else if (!d.WebSocketCtor) throw Error("no WebSocket constructor can be found"); b.destination = new W } return b } h(a, c); a.prototype.lift = function (b) {
                                var c = new a(this._config,
                                    this.destination); c.operator = b; c.source = this; return c
                            }; a.prototype._resetState = function () { this._socket = null; this.source || (this.destination = new W); this._output = new v }; a.prototype.multiplex = function (a, c, e) { var b = this; return new n(function (d) { try { b.next(a()) } catch (u) { d.error(u) } var f = b.subscribe(function (a) { try { e(a) && d.next(a) } catch (K) { d.error(K) } }, function (a) { return d.error(a) }, function () { return d.complete() }); return function () { try { b.next(c()) } catch (u) { d.error(u) } f.unsubscribe() } }) }; a.prototype._connectSocket =
                                function () {
                                    var a = this, c = this._config, e = c.WebSocketCtor, f = c.protocol, g = c.url, c = c.binaryType, h = this._output, k = null; try { this._socket = k = f ? new e(g, f) : new e(g), c && (this._socket.binaryType = c) } catch (r) { h.error(r); return } var n = new t(function () { a._socket = null; k && 1 === k.readyState && k.close() }); k.onopen = function (b) {
                                        if (a._socket) {
                                            var c = a._config.openObserver; c && c.next(b); b = a.destination; a.destination = m.create(function (b) { if (1 === k.readyState) try { var c = a._config.serializer; k.send(c(b)) } catch (Xb) { a.destination.error(Xb) } },
                                                function (b) { var c = a._config.closingObserver; c && c.next(void 0); b && b.code ? k.close(b.code, b.reason) : h.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")); a._resetState() }, function () { var b = a._config.closingObserver; b && b.next(void 0); k.close(); a._resetState() }); b && b instanceof W && n.add(b.subscribe(a.destination))
                                        } else k.close(), a._resetState()
                                    }; k.onerror = function (b) { a._resetState(); h.error(b) }; k.onclose =
                                        function (b) { a._resetState(); var c = a._config.closeObserver; c && c.next(b); b.wasClean ? h.complete() : h.error(b) }; k.onmessage = function (b) { try { var c = a._config.deserializer; h.next(c(b)) } catch (Wb) { h.error(Wb) } }
                                }; a.prototype._subscribe = function (a) { var b = this, c = this.source; if (c) return c.subscribe(a); this._socket || this._connectSocket(); this._output.subscribe(a); a.add(function () { var a = b._socket; 0 === b._output.observers.length && (a && 1 === a.readyState && a.close(), b._resetState()) }); return a }; a.prototype.unsubscribe =
                                    function () { var a = this._socket; a && 1 === a.readyState && a.close(); this._resetState(); c.prototype.unsubscribe.call(this) }; return a
                        }(Ca), Af = Object.freeze({ webSocket: function (c) { return new Hb(c) }, WebSocketSubject: Hb }), Bf = Object.freeze({
                            fromFetch: function (c, a) {
                                return new n(function (b) {
                                    var d = new AbortController, e = d.signal, f = !0, g = !1; a ? (a.signal && a.signal.addEventListener("abort", function () { e.aborted || d.abort() }), a.signal = e) : a = { signal: e }; fetch(c, a).then(function (a) { f = !1; b.next(a); b.complete() }).catch(function (a) {
                                        f =
                                        !1; g || b.error(a)
                                    }); return function () { g = !0; f && d.abort() }
                                })
                            }
                        }); k.operators = rf; k.testing = uf; k.ajax = yf; k.webSocket = Af; k.fetch = Bf; k.Observable = n; k.ConnectableObservable = qb; k.GroupedObservable = Da; k.observable = U; k.Subject = v; k.BehaviorSubject = rb; k.ReplaySubject = W; k.AsyncSubject = T; k.asapScheduler = pa; k.asyncScheduler = y; k.queueScheduler = sb; k.animationFrameScheduler = Wc; k.VirtualTimeScheduler = vb; k.VirtualAction = Ga; k.Scheduler = Ea; k.Subscription = t; k.Subscriber = m; k.Notification = w; k.pipe = ta; k.noop = D; k.identity = J;
    k.isObservable = function (c) { return !!c && (c instanceof n || "function" === typeof c.lift && "function" === typeof c.subscribe) }; k.ArgumentOutOfRangeError = X; k.EmptyError = ca; k.ObjectUnsubscribedError = I; k.UnsubscriptionError = Y; k.TimeoutError = wb; k.bindCallback = Oa; k.bindNodeCallback = Pa; k.combineLatest = function () { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; var b = a = null; A(c[c.length - 1]) && (b = c.pop()); "function" === typeof c[c.length - 1] && (a = c.pop()); 1 === c.length && x(c[0]) && (c = c[0]); return Z(c, b).lift(new Ha(a)) };
    k.concat = aa; k.defer = ya; k.empty = R; k.forkJoin = function () { for (var c = [], a = 0; a < arguments.length; a++)c[a] = arguments[a]; if (1 === c.length) { var b = c[0]; if (x(b)) return ia(b, null); if (ra(b) && Object.getPrototypeOf(b) === Object.prototype) return c = Object.keys(b), ia(c.map(function (a) { return b[a] }), c) } if ("function" === typeof c[c.length - 1]) { var d = c.pop(), c = 1 === c.length && x(c[0]) ? c[0] : c; return ia(c, null).pipe(B(function (a) { return d.apply(void 0, a) })) } return ia(c, null) }; k.from = F; k.fromEvent = Va; k.fromEventPattern = Xa; k.generate =
        function (c, a, b, d, e) { var f, g; 1 == arguments.length ? (g = c.initialState, a = c.condition, b = c.iterate, f = c.resultSelector || J, e = c.scheduler) : void 0 === d || A(d) ? (g = c, f = J, e = d) : (g = c, f = d); return new n(function (c) { var d = g; if (e) return e.schedule(Yb, 0, { subscriber: c, iterate: b, condition: a, resultSelector: f, state: d }); do { if (a) { var h = void 0; try { h = a(d) } catch (r) { c.error(r); break } if (!h) { c.complete(); break } } h = void 0; try { h = f(d) } catch (r) { c.error(r); break } c.next(h); if (c.closed) break; try { d = b(d) } catch (r) { c.error(r); break } } while (1) }) };
    k.iif = function (c, a, b) { void 0 === a && (a = S); void 0 === b && (b = S); return ya(function () { return c() ? a : b }) }; k.interval = function (c, a) { void 0 === c && (c = 0); void 0 === a && (a = y); if (!V(c) || 0 > c) c = 0; a && "function" === typeof a.schedule || (a = y); return new n(function (b) { b.add(a.schedule(Zb, c, { subscriber: b, counter: 0, period: c })); return b }) }; k.merge = Ya; k.never = function () { return yb }; k.of = ga; k.onErrorResumeNext = za; k.pairs = function (c, a) {
        return a ? new n(function (b) {
            var d = Object.keys(c), e = new t; e.add(a.schedule($b, 0, {
                keys: d, index: 0, subscriber: b,
                subscription: e, obj: c
            })); return e
        }) : new n(function (a) { for (var b = Object.keys(c), e = 0; e < b.length && !a.closed; e++) { var f = b[e]; c.hasOwnProperty(f) && a.next([f, c[f]]) } a.complete() })
    }; k.partition = function (c, a, b) { return [H(a, b)(new n(ha(c))), H(Za(a, b))(new n(ha(c)))] }; k.race = $a; k.range = function (c, a, b) { void 0 === c && (c = 0); return new n(function (d) { void 0 === a && (a = c, c = 0); var e = 0, f = c; if (b) return b.schedule(cc, 0, { index: e, count: a, start: c, subscriber: d }); do { if (e++ >= a) { d.complete(); break } d.next(f++); if (d.closed) break } while (1) }) };
    k.throwError = wa; k.timer = ab; k.using = function (c, a) { return new n(function (b) { var d; try { d = c() } catch (g) { b.error(g); return } var e; try { e = a(d) } catch (g) { b.error(g); return } var f = (e ? F(e) : S).subscribe(b); return function () { f.unsubscribe(); d && d.unsubscribe() } }) }; k.zip = bb; k.scheduled = Sa; k.EMPTY = S; k.NEVER = yb; k.config = C; Object.defineProperty(k, "__esModule", { value: !0 })
});
//# sourceMappingURL=rxjs.umd.min.js.map
;
!function (e, t) { "object" == typeof exports && "object" == typeof module ? module.exports = t(require("rxjs"), require("rxjs/operators")) : "function" == typeof define && define.amd ? define(["rxjs", "rxjs/operators"], t) : "object" == typeof exports ? exports.ReduxObservable = t(require("rxjs"), require("rxjs/operators")) : e.ReduxObservable = t(e.rxjs, e.rxjs.operators) }(window, function (e, t) { return function (e) { var t = {}; function r(n) { if (t[n]) return t[n].exports; var o = t[n] = { i: n, l: !1, exports: {} }; return e[n].call(o.exports, o, o.exports, r), o.l = !0, o.exports } return r.m = e, r.c = t, r.d = function (e, t, n) { r.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: n }) }, r.r = function (e) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) }, r.t = function (e, t) { if (1 & t && (e = r(e)), 8 & t) return e; if (4 & t && "object" == typeof e && e && e.__esModule) return e; var n = Object.create(null); if (r.r(n), Object.defineProperty(n, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e) for (var o in e) r.d(n, o, function (t) { return e[t] }.bind(null, o)); return n }, r.n = function (e) { var t = e && e.__esModule ? function () { return e.default } : function () { return e }; return r.d(t, "a", t), t }, r.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, r.p = "", r(r.s = 5) }([function (t, r) { t.exports = e }, function (e, r) { e.exports = t }, function (e, t, r) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), t.ActionsObservable = void 0; var n = function () { function e(e, t) { for (var r = 0; r < t.length; r++) { var n = t[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) } } return function (t, r, n) { return r && e(t.prototype, r), n && e(t, n), t } }(), o = r(0), u = r(3); t.ActionsObservable = function (e) { function t(e) { !function (e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var r = function (e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return r.source = e, r } return function (e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, o.Observable), n(t, null, [{ key: "of", value: function () { return new this(o.of.apply(void 0, arguments)) } }, { key: "from", value: function (e, t) { return new this((0, o.from)(e, t)) } }]), n(t, [{ key: "lift", value: function (e) { var r = new t(this); return r.operator = e, r } }, { key: "ofType", value: function () { return u.ofType.apply(void 0, arguments)(this) } }]), t }() }, function (e, t, r) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), t.ofType = void 0; var n = r(1), o = function (e, t) { return e === t || "function" == typeof t && e === t.toString() }; t.ofType = function () { for (var e = arguments.length, t = Array(e), r = 0; r < e; r++)t[r] = arguments[r]; return function (e) { return e.pipe((0, n.filter)(function (e) { var r = e.type, n = t.length; if (1 === n) return o(r, t[0]); for (var u = 0; u < n; u++)if (o(r, t[u])) return !0; return !1 })) } } }, function (e, t, r) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), t.StateObservable = void 0; var n = r(0); t.StateObservable = function (e) { function t(e, r) { !function (e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var o = function (e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, function (e) { var t = o.__notifier.subscribe(e); return t && !t.closed && e.next(o.value), t })); return o.value = r, o.__notifier = new n.Subject, o.__subscription = e.subscribe(function (e) { e !== o.value && (o.value = e, o.__notifier.next(e)) }), o } return function (e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.Observable), t }() }, function (e, t, r) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var n = r(6); Object.defineProperty(t, "createEpicMiddleware", { enumerable: !0, get: function () { return n.createEpicMiddleware } }); var o = r(2); Object.defineProperty(t, "ActionsObservable", { enumerable: !0, get: function () { return o.ActionsObservable } }); var u = r(4); Object.defineProperty(t, "StateObservable", { enumerable: !0, get: function () { return u.StateObservable } }); var i = r(8); Object.defineProperty(t, "combineEpics", { enumerable: !0, get: function () { return i.combineEpics } }); var c = r(3); Object.defineProperty(t, "ofType", { enumerable: !0, get: function () { return c.ofType } }) }, function (e, t, r) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), t.createEpicMiddleware = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, t = new (0, n.queueScheduler.constructor)(n.queueScheduler.SchedulerAction); 0; var r = new n.Subject, c = void 0, a = function (a) { c = a; var f = (new n.Subject).pipe((0, o.observeOn)(t)), s = (new n.Subject).pipe((0, o.observeOn)(t)), l = new u.ActionsObservable(f), p = new i.StateObservable(s, c.getState()), b = r.pipe((0, o.map)(function (t) { var r = "dependencies" in e ? t(l, p, e.dependencies) : t(l, p); if (!r) throw new TypeError('Your root Epic "' + (t.name || "<anonymous>") + "\" does not return a stream. Double check you're not missing a return statement!"); return r }), (0, o.mergeMap)(function (e) { return (0, n.from)(e).pipe((0, o.subscribeOn)(t), (0, o.observeOn)(t)) })); return b.subscribe(c.dispatch), function (e) { return function (t) { var r = e(t); return s.next(c.getState()), f.next(t), r } } }; return a.run = function (e) { r.next(e) }, a }; var n = r(0), o = r(1), u = r(2), i = r(4); r(7) }, function (e, t, r) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var 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 }, o = {}, u = (t.resetDeprecationsSeen = function () { o = {} }, "object" === ("undefined" == typeof console ? "undefined" : n(console)) && "function" == typeof console.warn ? function () { var e; return (e = console).warn.apply(e, arguments) } : function () { }); t.deprecate = function (e) { o[e] || (o[e] = !0, u("redux-observable | DEPRECATION: " + e)) }, t.warn = function (e) { u("redux-observable | WARNING: " + e) } }, function (e, t, r) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), t.combineEpics = void 0; var n = r(0); t.combineEpics = function () { for (var e = arguments.length, t = Array(e), r = 0; r < e; r++)t[r] = arguments[r]; var o = function () { for (var e = arguments.length, r = Array(e), o = 0; o < e; o++)r[o] = arguments[o]; return n.merge.apply(void 0, function (e) { if (Array.isArray(e)) { for (var t = 0, r = Array(e.length); t < e.length; t++)r[t] = e[t]; return r } return Array.from(e) }(t.map(function (e) { var t = e.apply(void 0, r); if (!t) throw new TypeError('combineEpics: one of the provided Epics "' + (e.name || "<anonymous>") + "\" does not return a stream. Double check you're not missing a return statement!"); return t }))) }; try { Object.defineProperty(o, "name", { value: "combineEpics(" + t.map(function (e) { return e.name || "<anonymous>" }).join(", ") + ")" }) } catch (e) { } return o } }]) });;
/**
 * Skipped minification because the original files appears to be already minified.
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function (e, r) { "object" == typeof exports && "undefined" != typeof module ? r(exports) : "function" == typeof define && define.amd ? define(["exports"], r) : r((e = e || self).immer = {}) }(this, function (e) { "use strict"; var r, t = "undefined" != typeof Symbol ? Symbol("immer-nothing") : ((r = {})["immer-nothing"] = !0, r), n = "undefined" != typeof Symbol && Symbol.for ? Symbol.for("immer-draftable") : "__$immer_draftable", o = "undefined" != typeof Symbol && Symbol.for ? Symbol.for("immer-state") : "__$immer_state"; function i(e) { return !!e && !!e[o] } function a(e) { return !!e && (function (e) { if (!e || "object" != typeof e) return !1; if (Array.isArray(e)) return !0; var r = Object.getPrototypeOf(e); return !r || r === Object.prototype }(e) || !!e[n] || !!e.constructor[n] || g(e) || w(e)) } function u(e) { if (e && e[o]) return e[o].base } var f = Object.assign || function (e) { for (var r = [], t = arguments.length - 1; t-- > 0;)r[t] = arguments[t + 1]; return r.forEach(function (r) { return Object.keys(r).forEach(function (t) { return e[t] = r[t] }) }), e }, c = "undefined" != typeof Reflect && Reflect.ownKeys ? Reflect.ownKeys : void 0 !== Object.getOwnPropertySymbols ? function (e) { return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)) } : Object.getOwnPropertyNames; function s(e, r) { if (void 0 === r && (r = !1), Array.isArray(e)) return e.slice(); if (g(e)) return new Map(e); if (w(e)) return new Set(e); var t = Object.create(Object.getPrototypeOf(e)); return c(e).forEach(function (n) { if (n !== o) { var i = Object.getOwnPropertyDescriptor(e, n), a = i.value; if (i.get) { if (!r) throw new Error("Immer drafts cannot have computed properties"); a = i.get.call(e) } i.enumerable ? t[n] = a : Object.defineProperty(t, n, { value: a, writable: !0, configurable: !0 }) } }), t } function p(e, r) { Array.isArray(e) || g(e) || w(e) ? e.forEach(function (t, n) { return r(n, t, e) }) : c(e).forEach(function (t) { return r(t, e[t], e) }) } function l(e, r) { var t = Object.getOwnPropertyDescriptor(e, r); return !!t && t.enumerable } function d(e, r) { return g(e) ? e.has(r) : Object.prototype.hasOwnProperty.call(e, r) } function h(e, r) { return g(e) ? e.get(r) : e[r] } function y(e, r) { return e === r ? 0 !== e || 1 / e == 1 / r : e != e && r != r } var v = "undefined" != typeof Symbol, b = "undefined" != typeof Map; function g(e) { return b && e instanceof Map } var m = "undefined" != typeof Set; function w(e) { return m && e instanceof Set } function P(e) { var r, t; return (r = {})[Symbol.iterator] = function () { return t }, r.next = e, t = r } function O(e, r, t) { var n = "values" !== r; return function () { var r = j(e)[Symbol.iterator](); return P(function () { var e = r.next(); if (!e.done) { var o = e.value[0], i = t.get(o); e.value = n ? [o, i] : i } return e }) } } function z(e) { return function (r, t) { var n = "entries" === t; return function () { var t = j(r)[Symbol.iterator](); return P(function () { var o = t.next(); if (!o.done) { var i = function (r, t) { var n = u(t) || t, o = r.drafts.get(n); if (!o) { if (r.finalized || !a(t) || r.finalizing) return t; o = e(t, r), r.drafts.set(n, o), r.modified && r.copy.add(o) } return o }(r, o.value); o.value = n ? [i, i] : i } return o }) } } } function j(e) { return e.copy || e.base } function E(e) { if (!a(e)) return e; if (Array.isArray(e)) return e.map(E); if (g(e)) return new Map(e); if (w(e)) return new Set(e); var r = Object.create(Object.getPrototypeOf(e)); for (var t in e) r[t] = E(e[t]); return r } function A(e, r) { void 0 === r && (r = !1), !a(e) || i(e) || Object.isFrozen(e) || (w(e) ? e.add = e.clear = e.delete = k : g(e) && (e.set = e.clear = e.delete = k), Object.freeze(e), r && p(e, function (e, r) { return A(r, !0) })) } function k() { throw new Error("This object has been frozen and should not be mutated") } var x = function (e) { this.drafts = [], this.parent = e, this.canAutoFreeze = !0, this.patches = null }; function D(e) { e[o].revoke() } function S(e, r) { var t, n = Array.isArray(e), i = _(e); g(e) ? (t = i, Object.defineProperties(t, W), v && Object.defineProperty(t, Symbol.iterator, $(O))) : w(e) ? function (e) { Object.defineProperties(e, K), v && Object.defineProperty(e, Symbol.iterator, $(C)) }(i) : p(i, function (r) { !function (e, r, t) { var n = T[r]; n ? n.enumerable = t : T[r] = n = { configurable: !0, enumerable: t, get: function () { return function (e, r) { J(e); var t = R(M(e), r); if (e.finalizing) return t; if (t === R(e.base, r) && a(t)) return N(e), e.copy[r] = S(t, e); return t }(this[o], r) }, set: function (e) { !function (e, r, t) { if (J(e), e.assigned[r] = !0, !e.modified) { if (y(t, R(M(e), r))) return; I(e), N(e) } e.copy[r] = t }(this[o], r, e) } }; Object.defineProperty(e, r, n) }(i, r, n || l(e, r)) }); var u = r ? r.scope : x.current, f = { scope: u, modified: !1, finalizing: !1, finalized: !1, assigned: g(e) ? new Map : {}, parent: r, base: e, draft: i, drafts: w(e) ? new Map : null, copy: null, revoke: F, revoked: !1 }; return function (e, r, t) { Object.defineProperty(e, r, { value: t, enumerable: !1, writable: !0 }) }(i, o, f), u.drafts.push(i), i } function F() { this.revoked = !0 } function M(e) { return e.copy || e.base } function R(e, r) { var t = e[o]; if (t && !t.finalizing) { t.finalizing = !0; var n = e[r]; return t.finalizing = !1, n } return e[r] } function I(e) { e.modified || (e.modified = !0, e.parent && I(e.parent)) } function N(e) { e.copy || (e.copy = _(e.base)) } function _(e) { var r = e && e[o]; if (r) { r.finalizing = !0; var t = s(r.draft, !0); return r.finalizing = !1, t } return s(e) } x.prototype.usePatches = function (e) { e && (this.patches = [], this.inversePatches = [], this.patchListener = e) }, x.prototype.revoke = function () { this.leave(), this.drafts.forEach(D), this.drafts = null }, x.prototype.leave = function () { this === x.current && (x.current = this.parent) }, x.current = null, x.enter = function () { return this.current = new x(this.current) }; var T = {}; var W = U({ size: function (e) { return M(e).size }, has: function (e) { return function (r) { return M(e).has(r) } }, set: function (e) { return function (r, t) { return M(e).get(r) !== t && (N(e), I(e), e.assigned.set(r, !0), e.copy.set(r, t)), e.draft } }, delete: function (e) { return function (r) { return N(e), I(e), e.assigned.set(r, !1), e.copy.delete(r), !1 } }, clear: function (e) { return function () { e.copy || N(e), I(e), e.assigned = new Map; for (var r = 0, t = M(e).keys(); r < t.length; r += 1) { var n = t[r]; e.assigned.set(n, !1) } return e.copy.clear() } }, forEach: function (e, r, t) { return function (r) { M(e).forEach(function (e, n, o) { r(t.get(n), n, o) }) } }, get: function (e) { return function (r) { var t = M(e).get(r); if (e.finalizing || e.finalized || !a(t)) return t; if (t !== e.base.get(r)) return t; var n = S(t, e); return N(e), e.copy.set(r, n), n } }, keys: function (e) { return function () { return M(e).keys() } }, values: O, entries: O }); var C = z(S), K = U({ size: function (e) { return M(e).size }, add: function (e) { return function (r) { return M(e).has(r) || (I(e), e.copy || N(e), e.copy.add(r)), e.draft } }, delete: function (e) { return function (r) { return I(e), e.copy || N(e), e.copy.delete(r) } }, has: function (e) { return function (r) { return M(e).has(r) } }, clear: function (e) { return function () { return I(e), e.copy || N(e), e.copy.clear() } }, keys: C, entries: C, values: C, forEach: function (e) { return function (r, t) { for (var n = C(e)(), o = n.next(); !o.done;)r.call(t, o.value, o.value, e.draft), o = n.next() } } }); function U(e) { return Object.keys(e).reduce(function (r, t) { var n = "size" === t ? L : $; return r[t] = n(e[t], t), r }, {}) } function L(e) { return { get: function () { var r = this[o]; return J(r), e(r) } } } function $(e, r) { return { get: function () { return function () { for (var t = [], n = arguments.length; n--;)t[n] = arguments[n]; var i = this[o]; return J(i), e(i, r, i.draft).apply(void 0, t) } } } } function J(e) { if (!0 === e.revoked) throw new Error("Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + JSON.stringify(M(e))) } function V(e) { for (var r = e.length - 1; r >= 0; r--) { var t = e[r][o]; t.modified || (Array.isArray(t.base) ? B(t) && I(t) : g(t.base) ? G(t) && I(t) : w(t.base) ? H(t) && I(t) : q(t) && I(t)) } } function q(e) { for (var r = e.base, t = e.draft, n = Object.keys(t), i = n.length - 1; i >= 0; i--) { var a = n[i], u = r[a]; if (void 0 === u && !d(r, a)) return !0; var f = t[a], c = f && f[o]; if (c ? c.base !== u : !y(f, u)) return !0 } return n.length !== Object.keys(r).length } function B(e) { var r = e.draft; if (r.length !== e.base.length) return !0; var t = Object.getOwnPropertyDescriptor(r, r.length - 1); return !(!t || t.get) } function G(e) { var r = e.base, t = e.draft; if (r.size !== t.size) return !0; var n = !1; return t.forEach(function (e, t) { n || (n = a(e) ? e.modified : e !== r.get(t)) }), n } function H(e) { var r = e.base, t = e.draft; if (r.size !== t.size) return !0; var n = !1; return t.forEach(function (e, t) { n || (n = a(e) ? e.modified : !r.has(t)) }), n } var Q, X, Y = Object.freeze({ willFinalize: function (e, r, t) { e.drafts.forEach(function (e) { e[o].finalizing = !0 }), t ? i(r) && r[o].scope === e && V(e.drafts) : (e.patches && function e(r) { if (r && "object" == typeof r) { var t = r[o]; if (t) { var n = t.base, i = t.draft, a = t.assigned; if (Array.isArray(r)) { if (B(t)) { if (I(t), a.length = !0, i.length < n.length) for (var u = i.length; u < n.length; u++)a[u] = !1; else for (var f = n.length; f < i.length; f++)a[f] = !0; for (var c = 0; c < i.length; c++)void 0 === a[c] && e(i[c]) } } else Object.keys(i).forEach(function (r) { void 0 !== n[r] || d(n, r) ? a[r] || e(i[r]) : (a[r] = !0, I(t)) }), Object.keys(n).forEach(function (e) { void 0 !== i[e] || d(i, e) || (a[e] = !1, I(t)) }) } } }(e.drafts[0]), V(e.drafts)) }, createProxy: S }); function Z(e, r) { var t = r ? r.scope : x.current, n = { scope: t, modified: !1, finalized: !1, assigned: {}, parent: r, base: e, draft: null, drafts: {}, copy: null, revoke: null }, o = n, i = ee; Array.isArray(e) ? (o = [n], i = re) : g(e) ? (i = ne, n.drafts = new Map, n.assigned = new Map) : w(e) && (i = ie, n.drafts = new Map); var a = Proxy.revocable(o, i), u = a.revoke, f = a.proxy; return n.draft = f, n.revoke = u, t.drafts.push(f), f } var ee = { get: function (e, r) { if (r === o) return e; var t = e.drafts; if (!e.modified && d(t, r)) return t[r]; var n = ae(e)[r]; if (e.finalized || !a(n)) return n; if (e.modified) { if (n !== ue(e.base, r)) return n; t = e.copy } return t[r] = Z(n, e) }, has: function (e, r) { return r in ae(e) }, ownKeys: function (e) { return Reflect.ownKeys(ae(e)) }, set: function (e, r, t) { if (!e.modified) { var n = ue(e.base, r); if (t ? y(n, t) || t === e.drafts[r] : y(n, t) && r in e.base) return !0; fe(e) } return e.assigned[r] = !0, e.copy[r] = t, !0 }, deleteProperty: function (e, r) { return void 0 !== ue(e.base, r) || r in e.base ? (e.assigned[r] = !1, fe(e)) : e.assigned[r] && delete e.assigned[r], e.copy && delete e.copy[r], !0 }, getOwnPropertyDescriptor: function (e, r) { var t = ae(e), n = Reflect.getOwnPropertyDescriptor(t, r); return n && (n.writable = !0, n.configurable = !Array.isArray(t) || "length" !== r), n }, defineProperty: function () { throw new Error("Object.defineProperty() cannot be used on an Immer draft") }, getPrototypeOf: function (e) { return Object.getPrototypeOf(e.base) }, setPrototypeOf: function () { throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft") } }, re = {}; p(ee, function (e, r) { re[e] = function () { return arguments[0] = arguments[0][0], r.apply(this, arguments) } }), re.deleteProperty = function (e, r) { if (isNaN(parseInt(r))) throw new Error("Immer only supports deleting array indices"); return ee.deleteProperty.call(this, e[0], r) }, re.set = function (e, r, t) { if ("length" !== r && isNaN(parseInt(r))) throw new Error("Immer only supports setting array indices and the 'length' property"); return ee.set.call(this, e[0], r, t) }; var te = ["ownKeys", "has", "set", "deleteProperty", "defineProperty", "getOwnPropertyDescriptor", "preventExtensions", "isExtensible", "getPrototypeOf"].reduce(function (e, r) { return e[r] = function (e) { for (var t = [], n = arguments.length - 1; n-- > 0;)t[n] = arguments[n + 1]; return Reflect[r].apply(Reflect, [ae(e)].concat(t)) }, e }, {}), ne = ce(((Q = {})[o] = function (e) { return e }, Q.size = function (e) { return ae(e).size }, Q.has = function (e) { return function (r) { return ae(e).has(r) } }, Q.set = function (e) { return function (r, t) { var n = ae(e); return n.has(r) && n.get(r) === t || (fe(e), e.assigned.set(r, !0), e.copy.set(r, t)), e.draft } }, Q.delete = function (e) { return function (r) { return !!ae(e).has(r) && (fe(e), e.assigned.set(r, !1), e.copy.delete(r)) } }, Q.clear = function (e) { return function () { fe(e), e.assigned = new Map; for (var r = 0, t = ae(e).keys(); r < t.length; r += 1) { var n = t[r]; e.assigned.set(n, !1) } return e.copy.clear() } }, Q.forEach = function (e, r, t) { return function (r, n) { return ae(e).forEach(function (e, o, i) { var a = t.get(o); r.call(n, a, o, i) }) } }, Q.get = function (e) { return function (r) { var t = e[e.modified ? "copy" : "drafts"]; if (t.has(r)) return t.get(r); var n = ae(e).get(r); if (e.finalized || !a(n)) return n; var o = Z(n, e); return t.set(r, o), o } }, Q.keys = function (e) { return function () { return ae(e).keys() } }, Q.values = O, Q.entries = O, Q[v ? Symbol.iterator : "@@iterator"] = O, Q)), oe = z(Z), ie = ce(((X = {})[o] = function (e) { return e }, X.size = function (e) { return ae(e).size }, X.has = function (e) { return function (r) { return ae(e).has(r) } }, X.add = function (e) { return function (r) { return ae(e).has(r) || (fe(e), e.copy.add(r)), e.draft } }, X.delete = function (e) { return function (r) { return fe(e), e.copy.delete(r) } }, X.clear = function (e) { return function () { return fe(e), e.copy.clear() } }, X.forEach = function (e) { return function (r, t) { for (var n = oe(e)(), o = n.next(); !o.done;)r.call(t, o.value, o.value, e.draft), o = n.next() } }, X.keys = oe, X.values = oe, X.entries = oe, X[v ? Symbol.iterator : "@@iterator"] = oe, X)); function ae(e) { return e.copy || e.base } function ue(e, r) { var t = e[o], n = Reflect.getOwnPropertyDescriptor(t ? ae(t) : e, r); return n && n.value } function fe(e) { if (!e.modified) { e.modified = !0; var r = e.base, t = e.drafts, n = e.parent, o = s(r); w(r) ? (i = o, t.forEach(function (e) { var r = u(e); r && i.delete(r), i.add(e) })) : (g(r) ? function (e, r) { r.forEach(function (r, t) { return e.set(t, r) }) }(o, t) : f(o, t), e.drafts = null), e.copy = o, n && fe(n) } var i } function ce(e) { return Object.assign({}, te, { get: function (r, t, n) { return e.hasOwnProperty(t) ? e[t](r, t, n) : Reflect.get(r, t, n) }, setPrototypeOf: function (e) { throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft") } }) } var se = Object.freeze({ willFinalize: function () { }, createProxy: Z }); function pe(e, r, t, n) { var o, i, a = e.base, u = e.copy, f = e.assigned; u.length < a.length && (a = (o = [u, a])[0], u = o[1], t = (i = [n, t])[0], n = i[1]); for (var c = u.length - a.length, s = 0; a[s] === u[s] && s < a.length;)++s; for (var p = a.length; p > s && a[p - 1] === u[p + c - 1];)--p; for (var l = s; l < p; ++l)if (f[l] && u[l] !== a[l]) { var d = r.concat([l]); t.push({ op: "replace", path: d, value: u[l] }), n.push({ op: "replace", path: d, value: a[l] }) } for (var h = t.length, y = p + c - 1; y >= p; --y) { var v = r.concat([y]); t[h + y - p] = { op: "add", path: v, value: u[y] }, n.push({ op: "remove", path: v }) } } function le(e, r, t, n) { var o = e.base, i = e.copy; p(e.assigned, function (e, a) { var u = h(o, e), f = h(i, e), c = a ? d(o, e) ? "replace" : "add" : "remove"; if (u !== f || "replace" !== c) { var s = r.concat(e); t.push("remove" === c ? { op: c, path: s } : { op: c, path: s, value: f }), n.push("add" === c ? { op: "remove", path: s } : "remove" === c ? { op: "add", path: s, value: u } : { op: "replace", path: s, value: u }) } }) } function de(e, r, t, n) { for (var o = e.base, i = e.copy, a = 0, u = 0, f = o; u < f.length; u += 1) { var c = f[u]; if (!i.has(c)) { var s = r.concat([a]); t.push({ op: "remove", path: s, value: c }), n.unshift({ op: "add", path: s, value: c }) } a++ } a = 0; for (var p = 0, l = i; p < l.length; p += 1) { var d = l[p]; if (!o.has(d)) { var h = r.concat([a]); t.push({ op: "add", path: h, value: d }), n.unshift({ op: "remove", path: h, value: d }) } a++ } } var he = function (e, r) { for (var t = 0, n = r; t < n.length; t += 1) { var o = n[t], i = o.path, a = o.op; if (!i.length) throw new Error("Illegal state"); for (var u = e, f = 0; f < i.length - 1; f++)if (!(u = h(u, i[f])) || "object" != typeof u) throw new Error("Cannot apply patch, path doesn't resolve: " + i.join("/")); var c = E(o.value), s = i[i.length - 1]; switch (a) { case "replace": if (g(u)) u.set(s, c); else { if (w(u)) throw new Error('Sets cannot have "replace" patches.'); u[s] = c } break; case "add": w(u) && u.delete(o.value), Array.isArray(u) ? u.splice(s, 0, c) : g(u) ? u.set(s, c) : w(u) ? u.add(c) : u[s] = c; break; case "remove": Array.isArray(u) ? u.splice(s, 1) : g(u) ? u.delete(s) : w(u) ? u.delete(o.value) : delete u[s]; break; default: throw new Error("Unsupported patch operation: " + a) } } return e }; var ye = { useProxies: "undefined" != typeof Proxy && void 0 !== Proxy.revocable && "undefined" != typeof Reflect, autoFreeze: "undefined" != typeof process ? "production" !== process.env.NODE_ENV : "verifyMinified" === function () { }.name, onAssign: null, onDelete: null, onCopy: null }, ve = function (e) { f(this, ye, e), this.setUseProxies(this.useProxies), this.produce = this.produce.bind(this), this.produceWithPatches = this.produceWithPatches.bind(this) }; ve.prototype.produce = function (e, r, n) { var o, i = this; if ("function" == typeof e && "function" != typeof r) { var u = r; r = e; var f = this; return function (e) { var t = this; void 0 === e && (e = u); for (var n = [], o = arguments.length - 1; o-- > 0;)n[o] = arguments[o + 1]; return f.produce(e, function (e) { return r.call.apply(r, [t, e].concat(n)) }) } } if ("function" != typeof r) throw new Error("The first or second argument to `produce` must be a function"); if (void 0 !== n && "function" != typeof n) throw new Error("The third argument to `produce` must be a function or undefined"); if (a(e)) { var c = x.enter(), s = this.createProxy(e), p = !0; try { o = r(s), p = !1 } finally { p ? c.revoke() : c.leave() } return "undefined" != typeof Promise && o instanceof Promise ? o.then(function (e) { return c.usePatches(n), i.processResult(e, c) }, function (e) { throw c.revoke(), e }) : (c.usePatches(n), this.processResult(o, c)) } if ((o = r(e)) !== t) return void 0 === o && (o = e), this.maybeFreeze(o, !0), o }, ve.prototype.produceWithPatches = function (e, r, t) { var n, o, i = this; if ("function" == typeof e) return function (r) { for (var t = [], n = arguments.length - 1; n-- > 0;)t[n] = arguments[n + 1]; return i.produceWithPatches(r, function (r) { return e.apply(void 0, [r].concat(t)) }) }; if (t) throw new Error("A patch listener cannot be passed to produceWithPatches"); return [this.produce(e, r, function (e, r) { n = e, o = r }), n, o] }, ve.prototype.createDraft = function (e) { if (!a(e)) throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object"); var r = x.enter(), t = this.createProxy(e); return t[o].isManual = !0, r.leave(), t }, ve.prototype.finishDraft = function (e, r) { var t = e && e[o]; if (!t || !t.isManual) throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`"); if (t.finalized) throw new Error("The given draft is already finalized"); var n = t.scope; return n.usePatches(r), this.processResult(void 0, n) }, ve.prototype.setAutoFreeze = function (e) { this.autoFreeze = e }, ve.prototype.setUseProxies = function (e) { this.useProxies = e, f(this, e ? se : Y) }, ve.prototype.applyPatches = function (e, r) { var t; for (t = r.length - 1; t >= 0; t--) { var n = r[t]; if (0 === n.path.length && "replace" === n.op) { e = n.value; break } } return i(e) ? he(e, r) : this.produce(e, function (e) { return he(e, r.slice(t + 1)) }) }, ve.prototype.processResult = function (e, r) { var n = r.drafts[0], i = void 0 !== e && e !== n; if (this.willFinalize(r, e, i), i) { if (n[o].modified) throw r.revoke(), new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."); a(e) && (e = this.finalize(e, null, r), this.maybeFreeze(e)), r.patches && (r.patches.push({ op: "replace", path: [], value: e }), r.inversePatches.push({ op: "replace", path: [], value: n[o].base })) } else e = this.finalize(n, [], r); return r.revoke(), r.patches && r.patchListener(r.patches, r.inversePatches), e !== t ? e : void 0 }, ve.prototype.finalize = function (e, r, t) { var n = this, i = e[o]; if (!i) return Object.isFrozen(e) ? e : this.finalizeTree(e, null, t); if (i.scope !== t) return e; if (!i.modified) return this.maybeFreeze(i.base, !0), i.base; if (!i.finalized) { if (i.finalized = !0, this.finalizeTree(i.draft, r, t), this.onDelete && !w(i.base)) if (this.useProxies) { p(i.assigned, function (e, r) { r || n.onDelete(i, e) }) } else { var a = i.base, u = i.copy; p(a, function (e) { d(u, e) || n.onDelete(i, e) }) } this.onCopy && this.onCopy(i), this.autoFreeze && t.canAutoFreeze && A(i.copy, !1), r && t.patches && function (e, r, t, n) { (Array.isArray(e.base) ? pe : w(e.base) ? de : le)(e, r, t, n) }(i, r, t.patches, t.inversePatches) } return i.copy }, ve.prototype.finalizeTree = function (e, r, t) { var n = this, u = e[o]; u && (this.useProxies || (u.copy = s(u.draft, !0)), e = u.copy); var f = !!r && !!t.patches, c = function (o, s, v) { if (s === v) throw Error("Immer forbids circular references"); var b = !!u && v === e, m = w(v); if (i(s)) { var P = b && f && !m && !d(u.assigned, o) ? r.concat(o) : null; if (function (e, r, t) { g(e) ? e.set(r, t) : w(e) ? (e.delete(r), e.add(t)) : Array.isArray(e) || l(e, r) ? e[r] = t : Object.defineProperty(e, r, { value: t, writable: !0, configurable: !0 }) }(v, o, s = n.finalize(s, P, t)), i(s) && (t.canAutoFreeze = !1), b && s === h(u.base, o)) return } else { if (b && y(s, h(u.base, o))) return; a(s) && !Object.isFrozen(s) && (p(s, c), n.maybeFreeze(s)) } b && n.onAssign && !m && n.onAssign(u, o, s) }; return p(e, c), e }, ve.prototype.maybeFreeze = function (e, r) { void 0 === r && (r = !1), this.autoFreeze && !i(e) && A(e, r) }; var be = new ve, ge = be.produce, me = be.produceWithPatches.bind(be), we = be.setAutoFreeze.bind(be), Pe = be.setUseProxies.bind(be), Oe = be.applyPatches.bind(be), ze = be.createDraft.bind(be), je = be.finishDraft.bind(be); e.Immer = ve, e.applyPatches = Oe, e.createDraft = ze, e.default = ge, e.finishDraft = je, e.immerable = n, e.isDraft = i, e.isDraftable = a, e.nothing = t, e.original = u, e.produce = ge, e.produceWithPatches = me, e.setAutoFreeze = we, e.setUseProxies = Pe, Object.defineProperty(e, "__esModule", { value: !0 }) });
//# sourceMappingURL=immer.umd.js.map;
"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var HelperUtilities = function () {
    function HelperUtilities() {
        _classCallCheck(this, HelperUtilities);
    }

    _createClass(HelperUtilities, null, [{
        key: "retrieveState",
        value: function retrieveState(InputObj) {
            var inputState = {};

            if (typeof InputObj.value !== "undefined" && InputObj.value !== null) {
                inputState.value = InputObj.value;
            } else {
                inputState.value = '';
            }

            if (InputObj.errorMessage !== null && typeof InputObj.value === "string") {
                inputState.errorMessage = InputObj.errorMessage;
            } else {
                inputState.errorMessage = '';
            }

            return inputState;
        }
    }, {
        key: "convertArraytoObject",
        value: function convertArraytoObject(PropsElements) {

            var elements = {};

            if (Array.isArray(PropsElements)) {
                var _iteratorNormalCompletion = true;
                var _didIteratorError = false;
                var _iteratorError = undefined;

                try {
                    for (var _iterator = PropsElements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                        var obj = _step.value;

                        if (typeof obj === "string") {
                            elements[obj] = obj;
                        } else if ((typeof obj === "undefined" ? "undefined" : _typeof(obj)) === "object") {
                            if (obj['key'] !== null && obj['value'] !== null) {
                                elements[obj['key']] = obj['value'];
                            }
                        }
                    }
                } catch (err) {
                    _didIteratorError = true;
                    _iteratorError = err;
                } finally {
                    try {
                        if (!_iteratorNormalCompletion && _iterator.return) {
                            _iterator.return();
                        }
                    } finally {
                        if (_didIteratorError) {
                            throw _iteratorError;
                        }
                    }
                }
            } else {
                return PropsElements;
            }

            return elements;
        }
    }]);

    return HelperUtilities;
}();

var InputHelpers = function () {
    function InputHelpers() {
        _classCallCheck(this, InputHelpers);
    }

    _createClass(InputHelpers, null, [{
        key: "onChange",
        value: function onChange(Event) {
            if (Globals.Utilities.isFunctionDefined(this.props.onChangeWireUp)) {
                this.props.onChangeWireUp(Event.target.value);
            }
        }
    }, {
        key: "onClick",
        value: function onClick(Event) {
            if (Globals.Utilities.isFunctionDefined(this.props.onClickWireUp)) {
                this.props.onClickWireUp(Event.target.value);
            }
        }
    }, {
        key: "onBlur",
        value: function onBlur(Event) {
            if (Globals.Utilities.isFunctionDefined(this.props.onBlurWireUp)) {
                this.props.onBlurWireUp(Event.target.value);
            }
        }
    }]);

    return InputHelpers;
}();

var FormInput = function () {
    function FormInput() {
        _classCallCheck(this, FormInput);
    }

    _createClass(FormInput, null, [{
        key: "setStateValue",
        value: function setStateValue(StateTarget, NewValue) {
            var stateTargetLength = StateTarget.length;

            if (StateTarget === null || !Globals.Utilities.isArray(StateTarget) || stateTargetLength === 0) {
                throw "FormInput.setStateValue error: invalid StateTarget provided";
            }

            var stateObj = Globals.Utilities.createNewObjectFrom(this.state);
            var stateSliceToUpdate = stateObj;

            for (var i = 0; i < stateTargetLength; i++) {
                if (stateSliceToUpdate[StateTarget[i]] !== null && typeof stateSliceToUpdate[StateTarget[i]] !== "undefined") {
                    stateSliceToUpdate = stateSliceToUpdate[StateTarget[i]];
                } else {
                    throw "FormInput.setStateValue error: StateTarget doesn't map to component's state, so failed to update";
                }
            }

            stateSliceToUpdate.value = NewValue;

            this.setState(stateObj);
        }
    }]);

    return FormInput;
}();

document.kNextReact = {
    "FormInput": FormInput,
    "HelperUtilities": HelperUtilities,
    "InputHelpers": InputHelpers,
    "ComponentDefaults": {
        "TextMaxLength": 524288
    }
};;
"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var ReduxUtilities = function () {
    function ReduxUtilities() {
        _classCallCheck(this, ReduxUtilities);
    }

    _createClass(ReduxUtilities, null, [{
        key: "initStoreAndMiddleware",
        value: function initStoreAndMiddleware(PageReducer, PageFetchEpics) {
            var _Redux;

            var composeEnhancers = Redux.compose;

            if (window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ !== null && typeof window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ !== "undefined") {
                composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ trace: true, traceLimit: 100 }) || Redux.compose;
            }

            var epicMiddleware = ReduxObservable.createEpicMiddleware();

            var middlewares = [epicMiddleware];

            document.glb_reduxStore = Redux.createStore(PageReducer, composeEnhancers((_Redux = Redux).applyMiddleware.apply(_Redux, middlewares)));

            if (PageFetchEpics !== null && typeof PageFetchEpics !== "undefined" && (typeof PageFetchEpics === "undefined" ? "undefined" : _typeof(PageFetchEpics)) === "object") {
                var _ReduxObservable;

                epicMiddleware.run((_ReduxObservable = ReduxObservable).combineEpics.apply(_ReduxObservable, _toConsumableArray(PageFetchEpics)));
            }

            return document.glb_reduxStore;
        }
    }, {
        key: "autoCreatePageReducers",
        value: function autoCreatePageReducers(PageObject) {

            if ((typeof PageObject === "undefined" ? "undefined" : _typeof(PageObject)) !== "object" || PageObject === null) {
                throw "Globals.Redux.js autoCreatePageReducers: input PageObject is invalid";
            }

            var pageReducer = {};

            var _loop = function _loop(rootKey) {
                pageReducer[rootKey] = function () {
                    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PageObject[rootKey];
                    var action = arguments[1];

                    return knotiaRedux.Utilities.updateReducer(state, action, rootKey);
                };
            };

            for (var rootKey in PageObject) {
                _loop(rootKey);
            }

            var combinedPageReducer = Redux.combineReducers(pageReducer);

            var rootReducer = function rootReducer(PreviousState, Action) {
                if (Action.type === "REPLACE_WHOLE_STORE") {
                    return Action.payload;
                } else {
                    return combinedPageReducer(PreviousState, Action);
                }
            };

            return rootReducer;
        }
    }, {
        key: "updateReducer",
        value: function updateReducer(PreviousState, Action, ReduxStoreEntryToModify) {

            if (typeof ReduxStoreEntryToModify !== "string" || ReduxStoreEntryToModify !== Action.storeTarget) {
                return PreviousState;
            }

            switch (Action.activityType) {
                case "UPDATE_DATA":
                    return Action.payload;
                case "SERVER_FETCH_REQUEST":

                    if (Action.payload !== null && _typeof(Action.payload) === "object" && Action.payload.updatedComponentData !== null) {
                        return Action.payload.updatedComponentData;
                    }

                    return PreviousState;

                default:
                    return PreviousState;
            }
        }
    }, {
        key: "createUpdatedStateObject",
        value: function createUpdatedStateObject(PreviousState, NewStateValueToAssign, StateTarget) {

            var newState = null;

            if (Globals.Utilities.isArray(PreviousState)) {
                newState = [];
            } else {
                newState = {};
            }

            for (var key in PreviousState) {
                if (key !== StateTarget.toString()) {
                    newState[key] = PreviousState[key];
                } else {
                    newState[key] = NewStateValueToAssign;
                }
            }

            return newState;
        }
    }]);

    return ReduxUtilities;
}();

var EpicUtilities = function () {
    function EpicUtilities() {
        _classCallCheck(this, EpicUtilities);
    }

    _createClass(EpicUtilities, null, [{
        key: "autoCreateFetchEpics",
        value: function autoCreateFetchEpics(FetchEpicNameObj) {

            var epics = [];

            for (var fetchActionKey in FetchEpicNameObj) {
                var generatedFetchEpic = knotiaRedux.EpicUtilities.generateFetchEpic(fetchActionKey, fetchActionKey + "_CANCEL");
                epics.push(generatedFetchEpic);
            }

            return epics;
        }
    }, {
        key: "generateFetchEpic",
        value: function generateFetchEpic(FetchActionType, CancelActionType) {
            return function (actionObservableStream, stateObservableStream) {
                return knotiaRedux.EpicUtilities.fetchEpic(actionObservableStream, stateObservableStream, FetchActionType, CancelActionType);
            };
        }
    }, {
        key: "fetchEpic",
        value: function fetchEpic(ActionObservableStream, StateObservableStream, FetchActionTypeName, FetchCancelActionTypeName) {

            return ActionObservableStream.pipe(rxjs.operators.filter(function (action) {
                return action.type === FetchActionTypeName;
            }), rxjs.operators.mergeMap(function (action) {
                return action.apiCaller.fetchInformation(action.payload).pipe(rxjs.operators.takeUntil(ActionObservableStream.pipe(ReduxObservable.ofType(FetchCancelActionTypeName))));
            }), rxjs.operators.map(function (mappedActionObject) {
                if (mappedActionObject !== null && (typeof mappedActionObject === "undefined" ? "undefined" : _typeof(mappedActionObject)) === "object") {
                    if (mappedActionObject.type !== null && mappedActionObject.type !== undefined) {
                        return mappedActionObject;
                    }
                }
                return { type: knotiaRedux.ActivityTypes.SERVER_FETCH_EMPTY_RESPONSE + FetchActionTypeName };
            }));
        }
    }]);

    return EpicUtilities;
}();

var ActivityTypes = {
    "SERVER_FETCH_REQUEST": "SERVER_FETCH_REQUEST",
    "SERVER_FETCH_EMPTY_RESPONSE": "SERVER_FETCH_EMPTY_RESPONSE",
    "UPDATE_DATA": "UPDATE_DATA"
};

var ReducerActionObjectMapping = function () {
    function ReducerActionObjectMapping() {
        _classCallCheck(this, ReducerActionObjectMapping);
    }

    _createClass(ReducerActionObjectMapping, null, [{
        key: "fetchRequestAction",
        value: function fetchRequestAction(Type, Url, FetchOptions, ExecutionObj, ApiCaller) {

            if (WebAPIUtilities.checkIfFetchParamsValid(Url, FetchOptions, ExecutionObj)) {

                if (ApiCaller === null || typeof ApiCaller === "undefined") {
                    throw "Globals.Redux.js fetchRequest: ApiCaller param is invalid";
                }

                var timeout = ApiCaller.getConnectionTimeoutValue(FetchOptions);

                var execution = new KnotiaFetchExecution();

                if (ExecutionObj["404"] == null) {
                    ExecutionObj["404"] = function (ApiData) {
                        alert("Sorry, a 404 has occurred. Please contact help desk if you continue to experience issues.");
                    };
                }

                if (ExecutionObj["500"] == null) {
                    ExecutionObj["500"] = function (ApiData) {
                        alert("Sorry, a 500 error has occurred. Please contact help desk if you continue to experience issues.");
                    };
                }

                if (ExecutionObj["timeout"] == null) {
                    ExecutionObj["timeout"] = function (ApiData) {
                        alert("Sorry, a timeout error has occurred. Please contact help desk if you continue to experience issues.");
                    };
                }

                for (var statusCode in ExecutionObj) {
                    execution.addExecution(statusCode, ExecutionObj[statusCode]);
                }

                var actionObject = {
                    "type": Type,
                    "activityType": knotiaRedux.ActivityTypes.SERVER_FETCH_REQUEST,
                    "apiCaller": ApiCaller,
                    "payload": {
                        "url": Url,
                        "timeout": timeout,
                        "fetchOptions": FetchOptions,
                        "executionObj": execution.executionObject
                    }
                };

                return actionObject;
            } else {
                throw "Action fetchRequest: invalid params";
            }
        }
    }, {
        key: "updateStoreData",
        value: function updateStoreData(StoreTarget, Data, UpdateTypeName) {

            if (Data === null && (typeof Data === "undefined" ? "undefined" : _typeof(Data)) !== "object") {
                throw "Action updateData: invalid params";
            }

            var updateTypeName = null;

            if (UpdateTypeName === null || typeof UpdateTypeName === "undefined") {
                updateTypeName = "UPDATE_" + StoreTarget.toUpperCase() + "_STORE";
            } else {
                updateTypeName = UpdateTypeName;
            }

            return {
                "type": updateTypeName,
                "activityType": knotiaRedux.ActivityTypes.UPDATE_DATA,
                "storeTarget": StoreTarget,
                "payload": Data
            };
        }
    }]);

    return ReducerActionObjectMapping;
}();

document.kNextRedux = {
    "EpicUtilities": EpicUtilities,
    "Utilities": ReduxUtilities,
    "fetchRequestAction": ReducerActionObjectMapping.fetchRequestAction,
    "updateStoreData": ReducerActionObjectMapping.updateStoreData,
    "ActivityTypes": ActivityTypes
};

var knotiaRedux = document.kNextRedux;;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var GlobalUtilities = function () {
    function GlobalUtilities() {
        _classCallCheck(this, GlobalUtilities);
    }

    _createClass(GlobalUtilities, null, [{
        key: "convertToNumberWithCommas",
        value: function convertToNumberWithCommas(Number) {
            var numberString = void 0;
            if (Globals.Utilities.isUndefinedOrNull(Number)) {
                return;
            } else if (typeof Number === "number") {
                numberString = Number.toString();
            }
            return numberString.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
        }
    }]);

    return GlobalUtilities;
}();;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var ReduxCommonTemplateObjects = function () {
    function ReduxCommonTemplateObjects() {
        _classCallCheck(this, ReduxCommonTemplateObjects);
    }

    _createClass(ReduxCommonTemplateObjects, null, [{
        key: "getKnotiaPageState",
        value: function getKnotiaPageState() {
            return {
                "userInfo": {
                    "userGUID": document.userGUID,
                    "userID": document.userID,
                    "companyGUID": document.companyGUID,
                    "userRole": "",
                    "languageSelected": "en",
                    "languageOptions": {
                        "en": "English",
                        "fr": "French"
                    }
                },
                "siteInfo": {
                    "siteID": document.siteIDNum,
                    "siteName": document.siteName,
                    "baseAPIURL": document.apiURL
                },
                "announcements": document.kNextCommonObjectsHelper.getKnotiaPageAnnouncerState(),
                "expandedModal": null,
                "expandedDropdown": null
            };
        }
    }, {
        key: "getKnotiaPageAnnouncerState",
        value: function getKnotiaPageAnnouncerState() {
            return {
                "politeMessage": null,
                "assertiveMessage": null
            };
        }
    }, {
        key: "getTextInputState",
        value: function getTextInputState() {
            return {
                "value": "",
                "errorMessage": "",
                "required": true,
                "componentType": "TextInput",
                "maxlength": document.kNextReact['ComponentDefaults'].TextMaxLength,
                "minlength": 0,
                "disabled": false,
                "readOnly": false,
                "canAutocomplete": false
            };
        }
    }, {
        key: "getFilterableSelectInputState",
        value: function getFilterableSelectInputState() {
            return {
                "value": "",
                "errorMessage": "",
                "required": true,
                "componentType": "FilterableSelect",
                "minlength": 0
            };
        }
    }, {
        key: "getEmailInputState",
        value: function getEmailInputState() {
            return {
                "value": "",
                "errorMessage": "",
                "required": true,
                "componentType": "EmailInput",
                "minlength": 0
            };
        }
    }, {
        key: "getTextAreaState",
        value: function getTextAreaState() {
            return {
                "value": "",
                "errorMessage": "",
                "required": true,
                "componentType": "TextArea"
            };
        }
    }, {
        key: "getPasswordInputState",
        value: function getPasswordInputState() {
            return {
                "value": "",
                "errorMessage": "",
                "required": true,
                "componentType": "PasswordInput",
                "minlength": 8
            };
        }
    }, {
        key: "getInputValidationErrorObject",
        value: function getInputValidationErrorObject() {
            return {
                "errorText": null,
                "isError": false
            };
        }
    }, {
        key: "getBaseUILoadingState",
        value: function getBaseUILoadingState() {
            return {
                "fetchSuccessMessage": null,
                "fetchErrorMessage": null,
                "loadingMessage": null
            };
        }
    }]);

    return ReduxCommonTemplateObjects;
}();

document.kNextCommonObjectsHelper = ReduxCommonTemplateObjects;;
"use strict";

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var LoadingUIHelpers = function () {
    function LoadingUIHelpers() {
        _classCallCheck(this, LoadingUIHelpers);
    }

    _createClass(LoadingUIHelpers, null, [{
        key: "setSuccessMessage",
        value: function setSuccessMessage(StateObj, SuccessMessage) {

            return immer.produce(StateObj, function (newStateObj) {
                var successString = GetString("str_Component_defaultSuccess");

                if (typeof SuccessMessage === "string") {
                    successString = SuccessMessage;
                }

                newStateObj.fetchErroMessage = null;
                newStateObj.fetchSuccessMessage = successString;
                newStateObj.loadingMessage = null;
            });
        }
    }, {
        key: "setErrorMessage",
        value: function setErrorMessage(StateObj, ErrorMessage) {
            var errorString = GetString("str_Component_FetchGenericServerError");

            if (ErrorMessage !== null && (typeof ErrorMessage === "undefined" ? "undefined" : _typeof(ErrorMessage)) === "object" && typeof ErrorMessage.message === "string") {
                errorString = ErrorMessage.message;
            } else if (typeof ErrorMessage === "string") {
                errorString = ErrorMessage;
            }

            var newValues = {
                "fetchErrorMessage": errorString,
                "fetchSuccessMessage": null,
                "loadingMessage": null
            };

            return _extends({}, StateObj, newValues);
        }
    }, {
        key: "setLoadingMessage",
        value: function setLoadingMessage(StateObj, LoadingMessage) {

            return immer.produce(StateObj, function (newStateObj) {
                var loadingString = GetString("str_Component_defaultLoading");

                if (typeof ErrorMessage === "string") {
                    loadingString = LoadingMessage;
                }

                newStateObj.fetchErrorMessage = null;
                newStateObj.fetchSuccessMessage = null;
                newStateObj.loadingMessage = loadingString;
            });
        }
    }]);

    return LoadingUIHelpers;
}();

var ServerFetchRequestHelpers = function () {
    function ServerFetchRequestHelpers() {
        _classCallCheck(this, ServerFetchRequestHelpers);
    }

    _createClass(ServerFetchRequestHelpers, null, [{
        key: "_genericErrorHandlerCallback",
        value: function _genericErrorHandlerCallback(GetStore, UpdateStoreFromMiddlewareCallback, ApiData) {

            var stateObj = GetStore();

            if (stateObj === null || (typeof stateObj === "undefined" ? "undefined" : _typeof(stateObj)) !== "object") {
                throw "knotiaRedux.Helpers.ServerFetch error: invalid storeTarget provided";
            }

            var newStateObj = knotiaRedux.Helpers.LoadingUI.setErrorMessage(stateObj, ApiData);
            return UpdateStoreFromMiddlewareCallback(newStateObj);
        }
    }, {
        key: "addGenericErrorHandlerCallbacks",
        value: function addGenericErrorHandlerCallbacks(GetStore, UpdateStoreFromMiddlewareCallback, ExecutionObject) {

            ExecutionObject[400] = function (ApiData) {
                return knotiaRedux.Helpers.ServerFetch._genericErrorHandlerCallback(GetStore, UpdateStoreFromMiddlewareCallback, ApiData);
            };

            ExecutionObject[404] = function (ApiData) {
                return knotiaRedux.Helpers.ServerFetch._genericErrorHandlerCallback(GetStore, UpdateStoreFromMiddlewareCallback, ApiData);
            };

            ExecutionObject[500] = function (ApiData) {
                return knotiaRedux.Helpers.ServerFetch._genericErrorHandlerCallback(GetStore, UpdateStoreFromMiddlewareCallback, ApiData);
            };

            ExecutionObject["timeout"] = function (ApiData) {
                return knotiaRedux.Helpers.ServerFetch._genericErrorHandlerCallback(GetStore, UpdateStoreFromMiddlewareCallback, ApiData);
            };
        }
    }]);

    return ServerFetchRequestHelpers;
}();

var FormHelpers = function () {
    function FormHelpers() {
        _classCallCheck(this, FormHelpers);
    }

    _createClass(FormHelpers, null, [{
        key: "updateInputState",
        value: function updateInputState(OldState, inputName, NewValue, NewErrorMessage) {
            return immer.produce(OldState, function (NewStateObj) {
                NewStateObj[inputName].value = NewValue;
                NewStateObj[inputName].errorMessage = NewErrorMessage;
            });
        }
    }]);

    return FormHelpers;
}();

knotiaRedux.Helpers = {
    "LoadingUI": LoadingUIHelpers,
    "ServerFetch": ServerFetchRequestHelpers,
    "Form": FormHelpers
};;
"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var ReactInputValidatorHelper = function () {
    function ReactInputValidatorHelper() {
        _classCallCheck(this, ReactInputValidatorHelper);
    }

    _createClass(ReactInputValidatorHelper, null, [{
        key: "_requiredStringValidator",
        value: function _requiredStringValidator(Value, InputObj, oldErrorObj) {

            if (typeof InputObj.required === "boolean" && InputObj.required === true) {
                if (Value == null || typeof Value === "string" && Value === "") {

                    var errorText = typeof InputObj["errorRequiredText"] === "string" ? InputObj["errorRequiredText"] : GetString('str_Component_errorRequired');

                    return {
                        'errorText': errorText,
                        'isError': true
                    };
                }
            }

            return oldErrorObj;
        }
    }, {
        key: "_minLengthValidator",
        value: function _minLengthValidator(Value, InputObj, oldErrorObj) {

            if (typeof InputObj.minlength === "number" && InputObj.minlength > 0) {

                if (Value === null || typeof Value !== "string" || Value.length < InputObj.minlength) {

                    var errorText = typeof InputObj["errorMinLengthText"] === "string" ? InputObj["errorMinLengthText"] + InputObj.minlength : GetString("str_Component_errorMinLengthText") + InputObj.minlength;

                    return {
                        'errorText': errorText,
                        'isError': true
                    };
                }
            }

            return oldErrorObj;
        }
    }, {
        key: "_emailValidator",
        value: function _emailValidator(Value, InputObj, oldErrorObj) {
            var validationPattern = typeof InputObj.validationPattern === "string" ? InputObj.validationPattern : "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?";

            if (Value.match(new RegExp(validationPattern)) == null) {

                var errorText = typeof InputObj["errorInvalidEmailText"] === "string" ? InputObj["errorInvalidEmailText"] : GetString("str_Component_errorEmailInvalid");

                return {
                    'errorText': errorText,
                    'isError': true
                };
            }

            return oldErrorObj;
        }
    }, {
        key: "applyInputValidationChecks",
        value: function applyInputValidationChecks(Value, InputObj, InputValidationFuncs) {

            var errorObj = document.kNextCommonObjectsHelper.getInputValidationErrorObject();

            for (var i = 0; i < InputValidationFuncs.length; i++) {

                errorObj = InputValidationFuncs[i](Value, InputObj, errorObj);

                if (errorObj.isError) {
                    return errorObj;
                }
            }

            return errorObj;
        }
    }, {
        key: "TextInput",
        value: function TextInput(Value, InputObj) {

            var validatorFunctions = [document.kNextHelpers.InputValidation._requiredStringValidator, document.kNextHelpers.InputValidation._minLengthValidator];

            return document.kNextHelpers.InputValidation.applyInputValidationChecks(Value, InputObj, validatorFunctions);
        }
    }, {
        key: "TextArea",
        value: function TextArea(Value, InputObj) {
            var validatorFunctions = [document.kNextHelpers.InputValidation._requiredStringValidator, document.kNextHelpers.InputValidation._minLengthValidator];

            return document.kNextHelpers.InputValidation.applyInputValidationChecks(Value, InputObj, validatorFunctions);
        }
    }, {
        key: "FilterableSelect",
        value: function FilterableSelect(Value, InputObj) {
            return InputValidation._requiredStringValidator(Value, InputObj);
        }
    }, {
        key: "PhoneNumberInput",
        value: function PhoneNumberInput(Value, InputObj) {
            return document.kNextHelpers.InputValidation._requiredStringValidator(Value, InputObj);
        }
    }, {
        key: "EmailInput",
        value: function EmailInput(Value, InputObj) {

            var validatorFunctions = [document.kNextHelpers.InputValidation._requiredStringValidator, document.kNextHelpers.InputValidation._minLengthValidator, document.kNextHelpers.InputValidation._emailValidator];

            return document.kNextHelpers.InputValidation.applyInputValidationChecks(Value, InputObj, validatorFunctions);
        }
    }, {
        key: "PasswordInput",
        value: function PasswordInput(Value, InputObj) {

            var validatorFunctions = [document.kNextHelpers.InputValidation._requiredStringValidator, document.kNextHelpers.InputValidation._minLengthValidator];

            return document.kNextHelpers.InputValidation.applyInputValidationChecks(Value, InputObj, validatorFunctions);
        }
    }, {
        key: "checkError",
        value: function checkError(InputObjState, NewValue) {

            var inputType = InputObjState.componentType;

            if (typeof inputType === "string" && typeof document.kNextHelpers.InputValidation[inputType] === "function") {

                var errorObj = document.kNextHelpers.InputValidation[inputType](NewValue, InputObjState);

                if (errorObj.isError) {
                    return errorObj.errorText;
                } else {
                    return "";
                }
            }
        }
    }, {
        key: "validateForm",
        value: function validateForm(State) {
            var formHasError = false;

            var newState = _extends({}, State);

            for (var key in State) {

                var inputProps = State[key];
                var stateObjectToEval = State[key];

                if (stateObjectToEval === null || (typeof stateObjectToEval === "undefined" ? "undefined" : _typeof(stateObjectToEval)) !== "object") {
                    continue;
                }

                if (stateObjectToEval.value !== null && State[key].errorMessage !== null) {
                    var inputType = inputProps.componentType;

                    if (typeof inputType === "string" && typeof document.kNextHelpers.InputValidation[inputType] === "function") {

                        var errorObj = document.kNextHelpers.InputValidation[inputType](stateObjectToEval.value, inputProps);

                        if (errorObj.isError) {
                            var newInputState = document.kNextRedux.Utilities.createUpdatedStateObject(stateObjectToEval, errorObj.errorText, "errorMessage");
                            newState[key] = newInputState;
                            formHasError = true;
                        } else {
                            var _newInputState = document.kNextRedux.Utilities.createUpdatedStateObject(stateObjectToEval, errorObj.errorText, "");
                            newState[key] = _newInputState;
                        }
                    }
                } else {
                    var nestedCheckErrorsObj = document.kNextHelpers.InputValidation.validateForm(stateObjectToEval, inputProps);
                    var nestedStateObj = nestedCheckErrorsObj['stateObj'];
                    var nestedFormError = nestedCheckErrorsObj['formHasError'];

                    stateObjectToEval = nestedStateObj;

                    if (nestedFormError) {
                        formHasError = nestedFormError;
                    }
                }
            }

            return {
                'stateObj': newState,
                'formHasError': formHasError
            };
        }
    }]);

    return ReactInputValidatorHelper;
}();

document.kNextHelpers = {
    "InputValidation": ReactInputValidatorHelper
};;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var KnowledgeProductStateBE = function () {
    function KnowledgeProductStateBE() {
        _classCallCheck(this, KnowledgeProductStateBE);
    }

    _createClass(KnowledgeProductStateBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                productCategories: null,
                productMetadata: null,
                productSort: null
            };
        }
    }]);

    return KnowledgeProductStateBE;
}();

var KnowledgeProductBE = function () {
    function KnowledgeProductBE() {
        _classCallCheck(this, KnowledgeProductBE);
    }

    _createClass(KnowledgeProductBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                FetchPrefixExamples: [],
                isFetchable: false,

                ProductCategory: null,

                ProductCollectionType: "",

                ProductLanguage: null,

                ProductFullName: {},

                ProductShortName: {},
                ProductLink: "",

                ProductType: null,

                Templates: {},

                TemplatesSortedIDs: [],

                TopicalIndex: {},

                TopicalIndexesSortedIDs: []
            };
        }
    }]);

    return KnowledgeProductBE;
}();

var KnowledgeProductFetchPrefixExampleBE = function () {
    function KnowledgeProductFetchPrefixExampleBE() {
        _classCallCheck(this, KnowledgeProductFetchPrefixExampleBE);
    }

    _createClass(KnowledgeProductFetchPrefixExampleBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                DocumentType: "",
                Example: "",
                FetchID: ""
            };
        }
    }]);

    return KnowledgeProductFetchPrefixExampleBE;
}();

var KnowledgeProductSearchTemplateBE = function () {
    function KnowledgeProductSearchTemplateBE() {
        _classCallCheck(this, KnowledgeProductSearchTemplateBE);
    }

    _createClass(KnowledgeProductSearchTemplateBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                id: "",
                TemplateFullName: "",
                TemplatePath: "",
                TemplateShortName: ""
            };
        }
    }]);

    return KnowledgeProductSearchTemplateBE;
}();

var KnowledgeProductTopicalIndexBE = function () {
    function KnowledgeProductTopicalIndexBE() {
        _classCallCheck(this, KnowledgeProductTopicalIndexBE);
    }

    _createClass(KnowledgeProductTopicalIndexBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                id: "",
                TemplateFullName: "",
                TemplatePath: "",
                TemplateShortName: ""
            };
        }
    }]);

    return KnowledgeProductTopicalIndexBE;
}();

var KnotiaPageStateBE = function () {
    function KnotiaPageStateBE() {
        _classCallCheck(this, KnotiaPageStateBE);
    }

    _createClass(KnotiaPageStateBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                userInfo: UserInfoBE.getObj(),

                companyInfo: CompanyInfoBE.getObj(),

                languageInfo: LanguageInfoBE.getObj(),

                announcements: AccessibilityAnnouncementsBE.getObj(),

                expandedModal: null,

                expandedDropdown: null
            };
        }
    }]);

    return KnotiaPageStateBE;
}();

var UserInfoBE = function () {
    function UserInfoBE() {
        _classCallCheck(this, UserInfoBE);
    }

    _createClass(UserInfoBE, null, [{
        key: "getObj",
        value: function getObj(InitialParams) {

            var userInfoObj = {
                userGUID: "",
                userID: null,
                userEmailAddress: "",
                userFirstName: "",
                userLastName: "",
                adminRoles: [],
                clientList: [],
                hasCMTAccess: false,
                hasViewDocumentCountAccess: false,
                isAdmin: false,
                isAuthenticated: false,
                uxPilotUser: 0
            };

            if (!Globals.Utilities.isUndefinedOrNull(InitialParams)) {

                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userGUID)) {
                    userInfoObj.userGUID = InitialParams.userGUID;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userID)) {
                    userInfoObj.userID = InitialParams.userID;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userEmailAddress)) {
                    userInfoObj.userEmailAddress = InitialParams.userEmailAddress;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userFirstName)) {
                    userInfoObj.userFirstName = InitialParams.userFirstName;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userLastName)) {
                    userInfoObj.userLastName = InitialParams.userLastName;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.adminRoles)) {
                    userInfoObj.adminRoles = InitialParams.adminRoles;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.clientList)) {
                    userInfoObj.clientList = InitialParams.clientList;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.hasCMTAccess)) {
                    userInfoObj.hasCMTAccess = InitialParams.hasCMTAccess;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.hasViewDocumentCountAccess)) {
                    userInfoObj.hasViewDocumentCountAccess = InitialParams.hasViewDocumentCountAccess;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.isAdmin)) {
                    userInfoObj.isAdmin = InitialParams.isAdmin;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.isAuthenticated)) {
                    userInfoObj.isAuthenticated = InitialParams.isAuthenticated;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.uxPilotUser)) {
                    userInfoObj.uxPilotUser = InitialParams.uxPilotUser;
                }
            }

            return userInfoObj;
        }
    }]);

    return UserInfoBE;
}();

var CompanyInfoBE = function () {
    function CompanyInfoBE() {
        _classCallCheck(this, CompanyInfoBE);
    }

    _createClass(CompanyInfoBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                companyGUID: "",
                companyName: ""
            };
        }
    }]);

    return CompanyInfoBE;
}();

var LanguageInfoBE = function () {
    function LanguageInfoBE() {
        _classCallCheck(this, LanguageInfoBE);
    }

    _createClass(LanguageInfoBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                languageNames: {},

                languages: {},

                selectedLanguageID: null,

                selectedLanguageKey: ""
            };
        }
    }]);

    return LanguageInfoBE;
}();

var AccessibilityAnnouncementsBE = function () {
    function AccessibilityAnnouncementsBE() {
        _classCallCheck(this, AccessibilityAnnouncementsBE);
    }

    _createClass(AccessibilityAnnouncementsBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                assertiveMessage: null,
                politeMessage: null
            };
        }
    }]);

    return AccessibilityAnnouncementsBE;
}();;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var KnotiaPageDAL = function () {
    function KnotiaPageDAL() {
        _classCallCheck(this, KnotiaPageDAL);
    }

    _createClass(KnotiaPageDAL, [{
        key: "updateWholeStore",
        value: function updateWholeStore(WholeStoryState) {
            var replaceWholeStoreAction = {
                type: "REPLACE_WHOLE_STORE",
                payload: WholeStoryState
            };
            currentPage.store.dispatch(replaceWholeStoreAction);
        }
    }, {
        key: "getUserInfoState",
        value: function getUserInfoState() {
            return currentPage.store.getState().userInfo;
        }
    }, {
        key: "updateUserInfoState",
        value: function updateUserInfoState(UpdatedUserInfoState) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("userInfo", UpdatedUserInfoState));
        }
    }, {
        key: "getPageInfoState",
        value: function getPageInfoState() {
            return currentPage.store.getState().pageInfo;
        }
    }, {
        key: "updatePageInfoState",
        value: function updatePageInfoState(UpdatedPageInfoState) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("pageInfo", UpdatedPageInfoState));
        }
    }, {
        key: "getUserGUID",
        value: function getUserGUID() {
            return currentPage.store.getState().userInfo.userGUID;
        }
    }, {
        key: "getCompanyGUID",
        value: function getCompanyGUID() {
            return currentPage.store.getState().userInfo.companyGUID;
        }
    }, {
        key: "getSiteName",
        value: function getSiteName() {
            return currentPage.store.getState().siteInfo.siteName;
        }
    }, {
        key: "getBaseAPIURL",
        value: function getBaseAPIURL() {
            return currentPage.store.getState().siteInfo.baseAPIURL;
        }
    }, {
        key: "getAnnouncements",
        value: function getAnnouncements() {
            return currentPage.store.getState().announcements;
        }
    }, {
        key: "updateAnnouncements",
        value: function updateAnnouncements(PoliteAnnouncement, AssertiveAnnouncement) {

            var announcementObj = document.kNextCommonObjectsHelper.getKnotiaPageAnnouncerState();
            announcementObj.politeMessage = PoliteAnnouncement;
            announcementObj.assertiveMessage = AssertiveAnnouncement;

            return currentPage.store.dispatch(knotiaRedux.updateStoreData("announcements", announcementObj));
        }
    }, {
        key: "getExpandedModalState",
        value: function getExpandedModalState() {
            return currentPage.store.getState().expandedModal;
        }
    }, {
        key: "updateExpandedModalState",
        value: function updateExpandedModalState(ExpandedModalKey) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("expandedModal", ExpandedModalKey));
        }
    }, {
        key: "getExpandedDropdownState",
        value: function getExpandedDropdownState() {
            return currentPage.store.getState().expandedDropdown;
        }
    }, {
        key: "updateExpandedDropdownState",
        value: function updateExpandedDropdownState(ExpandedDrodownKey) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("expandedDropdown", ExpandedDrodownKey));
        }
    }, {
        key: "getLanguageState",
        value: function getLanguageState() {
            return currentPage.store.getState().languageInfo;
        }
    }, {
        key: "updateLanguageInfoState",
        value: function updateLanguageInfoState(UpdatedLanguageInfoState) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("languageInfo", UpdatedLanguageInfoState));
        }
    }]);

    return KnotiaPageDAL;
}();

document.KnotiaPageDAL = KnotiaPageDAL;;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var KnotiaPageBLL = function () {
    function KnotiaPageBLL() {
        _classCallCheck(this, KnotiaPageBLL);
    }

    _createClass(KnotiaPageBLL, [{
        key: "onModalBackgroundClick",
        value: function onModalBackgroundClick() {
            currentPage.DAL.updateExpandedModalState(null);
        }
    }, {
        key: "closeModal",
        value: function closeModal() {
            currentPage.DAL.updateExpandedModalState(null);
        }
    }, {
        key: "makeBodyUnscrollable",
        value: function makeBodyUnscrollable() {
            $("body").css("overflow", "hidden");
        }
    }, {
        key: "makeBodyScrollable",
        value: function makeBodyScrollable() {
            $("body").css("overflow", "");
        }
    }, {
        key: "isKnowledgeOrDownloadsProduct",
        value: function isKnowledgeOrDownloadsProduct(ProductObj) {
            if (Globals.Utilities.isUndefinedOrNull(ProductObj) || ProductObj.ProductCollectionType === ProductCollectionType.NEWS || ProductObj.ProductType !== ProductType.KNOWLEDGE && ProductObj.ProductType !== ProductType.DOWNLOADS) {
                return false;
            }
            return true;
        }
    }, {
        key: "isKnowledgeOrURLProduct",
        value: function isKnowledgeOrURLProduct(ProductObj) {
            if (Globals.Utilities.isUndefinedOrNull(ProductObj) || ProductObj.ProductCollectionType === ProductCollectionType.NEWS || ProductObj.ProductType !== ProductType.KNOWLEDGE && ProductObj.ProductType !== ProductType.URL) {
                return false;
            }
            return true;
        }
    }, {
        key: "isKnowledgeResearchProduct",
        value: function isKnowledgeResearchProduct(ProductObj) {
            if (Globals.Utilities.isUndefinedOrNull(ProductObj) && ProductObj.ProductCollectionType === ProductCollectionType.NEWS || ProductObj.ProductType !== ProductType.KNOWLEDGE) {
                return false;
            }
            return true;
        }
    }]);

    return KnotiaPageBLL;
}();;
"use strict";

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var KnotiaPage = function KnotiaPage() {
    _classCallCheck(this, KnotiaPage);

    var companyInfo = CompanyInfoBE.getObj();
    if (!Globals.Utilities.isUndefinedOrNull(document.kNextCompany)) {
        companyInfo.companyGUID = document.kNextCompany.companyGUID;
        companyInfo.companyName = document.kNextCompany.companyName;
    }

    var languageInfo = LanguageInfoBE.getObj();
    if (!Globals.Utilities.isUndefinedOrNull(document.kNextPlatform) && !Globals.Utilities.isUndefinedOrNull(document.kNextPlatform.languages) && !Globals.Utilities.isUndefinedOrNull(document.kNextState)) {

        languageInfo.languages = document.kNextPlatform.languages;
        languageInfo.languageNames = {
            "en": "English",
            "fr": "Fran\xE7ais"
        };
        languageInfo.selectedLanguageKey = document.kNextState.language;
        languageInfo.selectedLanguageID = document.kNextPlatform.languages[document.kNextState.language];
    }

    var userInfo = UserInfoBE.getObj();
    if (!Globals.Utilities.isUndefinedOrNull(document.kNextUser) && !Globals.Utilities.isUndefinedOrNull(document.kNextState)) {
        userInfo = _extends({}, document.kNextUser, {
            "isAuthenticated": document.kNextState.isAuthenticated || document.kNextState.isAuthenticated === "True" ? true : false
        });

        userInfo.hasCMTAccess = userInfo.hasCMTAccess === "True" ? true : false;
        userInfo.hasViewDocumentCountAccess = userInfo.hasViewDocumentCountAccess === "True" ? true : false;
    }

    this.appState = KnotiaPageStateBE.getObj();
    this.appState.userInfo = userInfo;
    this.appState.companyInfo = companyInfo;
    this.appState.languageInfo = languageInfo;

    this.ModalTypes = {
        "LOADING": "LOADING"
    };
};

document.KnotiaPage = new KnotiaPage();

var knotiaPage = document.KnotiaPage;;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var PlatformKnowledgeProductStateBE = function () {
    function PlatformKnowledgeProductStateBE() {
        _classCallCheck(this, PlatformKnowledgeProductStateBE);
    }

    _createClass(PlatformKnowledgeProductStateBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                productCategories: null,
                productMetadata: null,
                productSort: null
            };
        }
    }]);

    return PlatformKnowledgeProductStateBE;
}();

var PlatformKnowledgeProductBE = function () {
    function PlatformKnowledgeProductBE() {
        _classCallCheck(this, PlatformKnowledgeProductBE);
    }

    _createClass(PlatformKnowledgeProductBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                FetchPrefixExamples: [],
                isFetchable: false,

                ProductCategory: null,

                ProductCollectionType: "",

                ProductLanguage: null,

                ProductFullName: {},

                ProductShortName: {},
                ProductLink: "",

                ProductType: null,

                Templates: {},

                TemplatesSortedIDs: [],

                TopicalIndex: {},

                TopicalIndexesSortedIDs: []
            };
        }
    }]);

    return PlatformKnowledgeProductBE;
}();

var PlatformKnowledgeProductFetchPrefixExampleBE = function () {
    function PlatformKnowledgeProductFetchPrefixExampleBE() {
        _classCallCheck(this, PlatformKnowledgeProductFetchPrefixExampleBE);
    }

    _createClass(PlatformKnowledgeProductFetchPrefixExampleBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                DocumentType: "",
                Example: "",
                FetchID: ""
            };
        }
    }]);

    return PlatformKnowledgeProductFetchPrefixExampleBE;
}();

var PlatformKnowledgeProductSearchTemplateBE = function () {
    function PlatformKnowledgeProductSearchTemplateBE() {
        _classCallCheck(this, PlatformKnowledgeProductSearchTemplateBE);
    }

    _createClass(PlatformKnowledgeProductSearchTemplateBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                id: "",
                TemplateFullName: "",
                TemplatePath: "",
                TemplateShortName: ""
            };
        }
    }]);

    return PlatformKnowledgeProductSearchTemplateBE;
}();

var PlatformKnowledgeProductTopicalIndexBE = function () {
    function PlatformKnowledgeProductTopicalIndexBE() {
        _classCallCheck(this, PlatformKnowledgeProductTopicalIndexBE);
    }

    _createClass(PlatformKnowledgeProductTopicalIndexBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                id: "",
                TemplateFullName: "",
                TemplatePath: "",
                TemplateShortName: ""
            };
        }
    }]);

    return PlatformKnowledgeProductTopicalIndexBE;
}();

var PlatformSitePageStateBE = function () {
    function PlatformSitePageStateBE() {
        _classCallCheck(this, PlatformSitePageStateBE);
    }

    _createClass(PlatformSitePageStateBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                userInfo: PlatformUserInfoBE.getObj(),

                companyInfo: PlatformCompanyInfoBE.getObj(),

                languageInfo: PlatformLanguageInfoBE.getObj(),

                announcements: PlatformAccessibilityAnnouncementsBE.getObj(),

                expandedModal: null,

                expandedDropdown: null
            };
        }
    }]);

    return PlatformSitePageStateBE;
}();

var PlatformUserInfoBE = function () {
    function PlatformUserInfoBE() {
        _classCallCheck(this, PlatformUserInfoBE);
    }

    _createClass(PlatformUserInfoBE, null, [{
        key: "getObj",
        value: function getObj(InitialParams) {

            var userInfoObj = {
                userGUID: "",
                userID: null,
                userEmailAddress: "",
                userFirstName: "",
                userLastName: "",
                adminRoles: [],
                clientList: [],
                hasCMTAccess: false,
                hasViewDocumentCountAccess: false,
                isAdmin: false,
                isAuthenticated: false,
                uxPilotUser: 0
            };

            if (!Globals.Utilities.isUndefinedOrNull(InitialParams)) {

                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userGUID)) {
                    userInfoObj.userGUID = InitialParams.userGUID;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userID)) {
                    userInfoObj.userID = InitialParams.userID;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userEmailAddress)) {
                    userInfoObj.userEmailAddress = InitialParams.userEmailAddress;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userFirstName)) {
                    userInfoObj.userFirstName = InitialParams.userFirstName;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userLastName)) {
                    userInfoObj.userLastName = InitialParams.userLastName;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.adminRoles)) {
                    userInfoObj.adminRoles = InitialParams.adminRoles;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.clientList)) {
                    userInfoObj.clientList = InitialParams.clientList;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.hasCMTAccess)) {
                    userInfoObj.hasCMTAccess = InitialParams.hasCMTAccess;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.hasViewDocumentCountAccess)) {
                    userInfoObj.hasViewDocumentCountAccess = InitialParams.hasViewDocumentCountAccess;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.isAdmin)) {
                    userInfoObj.isAdmin = InitialParams.isAdmin;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.isAuthenticated)) {
                    userInfoObj.isAuthenticated = InitialParams.isAuthenticated;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.uxPilotUser)) {
                    userInfoObj.uxPilotUser = InitialParams.uxPilotUser;
                }
            }

            return userInfoObj;
        }
    }]);

    return PlatformUserInfoBE;
}();

var PlatformCompanyInfoBE = function () {
    function PlatformCompanyInfoBE() {
        _classCallCheck(this, PlatformCompanyInfoBE);
    }

    _createClass(PlatformCompanyInfoBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                companyGUID: "",
                companyName: ""
            };
        }
    }]);

    return PlatformCompanyInfoBE;
}();

var PlatformLanguageInfoBE = function () {
    function PlatformLanguageInfoBE() {
        _classCallCheck(this, PlatformLanguageInfoBE);
    }

    _createClass(PlatformLanguageInfoBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                languageNames: {},

                languages: {},

                selectedLanguageID: null,

                selectedLanguageKey: "",

                languageOptions: [{
                    id: "en",
                    text: "English - EN",
                    link: null,
                    className: document.kNextState.language === "en" ? "active" : null,
                    preventClick: document.kNextState.language === "en" ? true : false
                }, {
                    id: "fr",
                    text: "Fran\xE7ais - FR",
                    link: null,
                    className: document.kNextState.language === "fr" ? "active" : null,
                    preventClick: document.kNextState.language === "fr" ? true : false
                }]
            };
        }
    }]);

    return PlatformLanguageInfoBE;
}();

var PlatformAccessibilityAnnouncementsBE = function () {
    function PlatformAccessibilityAnnouncementsBE() {
        _classCallCheck(this, PlatformAccessibilityAnnouncementsBE);
    }

    _createClass(PlatformAccessibilityAnnouncementsBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                assertiveMessage: null,
                politeMessage: null
            };
        }
    }]);

    return PlatformAccessibilityAnnouncementsBE;
}();;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var PlatformPageDAL = function () {
    function PlatformPageDAL() {
        _classCallCheck(this, PlatformPageDAL);
    }

    _createClass(PlatformPageDAL, [{
        key: "updateWholeStore",
        value: function updateWholeStore(WholeStoryState) {
            var replaceWholeStoreAction = {
                type: "REPLACE_WHOLE_STORE",
                payload: WholeStoryState
            };
            currentPage.store.dispatch(replaceWholeStoreAction);
        }
    }, {
        key: "getUserInfoState",
        value: function getUserInfoState() {
            return currentPage.store.getState().userInfo;
        }
    }, {
        key: "updateUserInfoState",
        value: function updateUserInfoState(UpdatedUserInfoState) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("userInfo", UpdatedUserInfoState));
        }
    }, {
        key: "getPageInfoState",
        value: function getPageInfoState() {
            return currentPage.store.getState().pageInfo;
        }
    }, {
        key: "updatePageInfoState",
        value: function updatePageInfoState(UpdatedPageInfoState) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("pageInfo", UpdatedPageInfoState));
        }
    }, {
        key: "getUserGUID",
        value: function getUserGUID() {
            return currentPage.store.getState().userInfo.userGUID;
        }
    }, {
        key: "getCompanyGUID",
        value: function getCompanyGUID() {
            return currentPage.store.getState().userInfo.companyGUID;
        }
    }, {
        key: "getSiteName",
        value: function getSiteName() {
            return currentPage.store.getState().siteInfo.siteName;
        }
    }, {
        key: "getBaseAPIURL",
        value: function getBaseAPIURL() {
            return currentPage.store.getState().siteInfo.baseAPIURL;
        }
    }, {
        key: "getAnnouncements",
        value: function getAnnouncements() {
            return currentPage.store.getState().announcements;
        }
    }, {
        key: "updateAnnouncements",
        value: function updateAnnouncements(PoliteAnnouncement, AssertiveAnnouncement) {

            var announcementObj = document.kNextCommonObjectsHelper.getKnotiaPageAnnouncerState();
            announcementObj.politeMessage = PoliteAnnouncement;
            announcementObj.assertiveMessage = AssertiveAnnouncement;

            return currentPage.store.dispatch(knotiaRedux.updateStoreData("announcements", announcementObj));
        }
    }, {
        key: "getExpandedModalState",
        value: function getExpandedModalState() {
            return currentPage.store.getState().expandedModal;
        }
    }, {
        key: "updateExpandedModalState",
        value: function updateExpandedModalState(ExpandedModalKey) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("expandedModal", ExpandedModalKey));
        }
    }, {
        key: "getExpandedDropdownState",
        value: function getExpandedDropdownState() {
            return currentPage.store.getState().expandedDropdown;
        }
    }, {
        key: "updateExpandedDropdownState",
        value: function updateExpandedDropdownState(ExpandedDrodownKey) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("expandedDropdown", ExpandedDrodownKey));
        }
    }, {
        key: "getLanguageState",
        value: function getLanguageState() {
            return currentPage.store.getState().languageInfo;
        }
    }, {
        key: "updateLanguageInfoState",
        value: function updateLanguageInfoState(UpdatedLanguageInfoState) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("languageInfo", UpdatedLanguageInfoState));
        }
    }]);

    return PlatformPageDAL;
}();

document.PlatformPageDAL = PlatformPageDAL;;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var PlatformPageBLL = function () {
    function PlatformPageBLL() {
        _classCallCheck(this, PlatformPageBLL);
    }

    _createClass(PlatformPageBLL, [{
        key: "onModalBackgroundClick",
        value: function onModalBackgroundClick() {
            currentPage.DAL.updateExpandedModalState(null);
        }
    }, {
        key: "closeModal",
        value: function closeModal() {
            currentPage.DAL.updateExpandedModalState(null);
        }
    }, {
        key: "makeBodyUnscrollable",
        value: function makeBodyUnscrollable() {
            $("body").css("overflow", "hidden");
        }
    }, {
        key: "makeBodyScrollable",
        value: function makeBodyScrollable() {
            $("body").css("overflow", "");
        }
    }, {
        key: "isKnowledgeOrDownloadsProduct",
        value: function isKnowledgeOrDownloadsProduct(ProductObj) {
            if (Globals.Utilities.isUndefinedOrNull(ProductObj) || ProductObj.ProductCollectionType === ProductCollectionType.NEWS || ProductObj.ProductType !== ProductType.KNOWLEDGE && ProductObj.ProductType !== ProductType.DOWNLOADS) {
                return false;
            }
            return true;
        }
    }, {
        key: "isKnowledgeOrURLProduct",
        value: function isKnowledgeOrURLProduct(ProductObj) {
            if (Globals.Utilities.isUndefinedOrNull(ProductObj) || ProductObj.ProductCollectionType === ProductCollectionType.NEWS || ProductObj.ProductType !== ProductType.KNOWLEDGE && ProductObj.ProductType !== ProductType.URL) {
                return false;
            }
            return true;
        }
    }, {
        key: "isKnowledgeResearchProduct",
        value: function isKnowledgeResearchProduct(ProductObj) {
            if (Globals.Utilities.isUndefinedOrNull(ProductObj) && ProductObj.ProductCollectionType === ProductCollectionType.NEWS || ProductObj.ProductType !== ProductType.KNOWLEDGE) {
                return false;
            }
            return true;
        }
    }]);

    return PlatformPageBLL;
}();;
"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var PlatformPageStructure = function PlatformPageStructure() {
    _classCallCheck(this, PlatformPageStructure);

    var companyInfo = PlatformCompanyInfoBE.getObj();
    if (!Globals.Utilities.isUndefinedOrNull(document.kNextCompany)) {
        companyInfo.companyGUID = document.kNextCompany.companyGUID;
        companyInfo.companyName = document.kNextCompany.companyName;
    }

    var languageInfo = PlatformLanguageInfoBE.getObj();
    if (!Globals.Utilities.isUndefinedOrNull(document.kNextPlatform) && !Globals.Utilities.isUndefinedOrNull(document.kNextPlatform.languages) && !Globals.Utilities.isUndefinedOrNull(document.kNextState)) {

        languageInfo.languages = document.kNextPlatform.languages;
        languageInfo.languageNames = {
            "en": "English",
            "fr": "Fran\xE7ais"
        };
        languageInfo.selectedLanguageKey = document.kNextState.language;
        languageInfo.selectedLanguageID = document.kNextPlatform.languages[document.kNextState.language];
    }

    var userInfo = PlatformUserInfoBE.getObj();
    if (!Globals.Utilities.isUndefinedOrNull(document.kNextUser) && !Globals.Utilities.isUndefinedOrNull(document.kNextState)) {
        userInfo = _extends({}, document.kNextUser, {
            "isAuthenticated": document.kNextState.isAuthenticated || document.kNextState.isAuthenticated === "True" ? true : false
        });

        userInfo.hasCMTAccess = userInfo.hasCMTAccess === "True" ? true : false;
        userInfo.hasViewDocumentCountAccess = userInfo.hasViewDocumentCountAccess === "True" ? true : false;
    }

    this.appState = PlatformSitePageStateBE.getObj();
    this.appState.userInfo = userInfo;
    this.appState.companyInfo = companyInfo;
    this.appState.languageInfo = languageInfo;

    this.ModalTypes = {
        "LOADING": "LOADING"
    };
};

var platformPage = null;

if (!_typeof(window.glb_EnableKnotiaNext === 'undefined')) {
    document.PlatformPageStructure = new PlatformPageStructure();
    platformPage = document.PlatformPageStructure;
};
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var TaxNewsPlatformSitePageStateBE = function () {
    function TaxNewsPlatformSitePageStateBE() {
        _classCallCheck(this, TaxNewsPlatformSitePageStateBE);
    }

    _createClass(TaxNewsPlatformSitePageStateBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                userInfo: TaxNewsPlatformUserInfoBE.getObj(),

                companyInfo: TaxNewsPlatformCompanyInfoBE.getObj(),

                languageInfo: TaxNewsPlatformLanguageInfoBE.getObj(),

                announcements: TaxNewsPlatformAccessibilityAnnouncementsBE.getObj(),

                expandedModal: null,

                expandedDropdown: null
            };
        }
    }]);

    return TaxNewsPlatformSitePageStateBE;
}();

var TaxNewsPlatformUserInfoBE = function () {
    function TaxNewsPlatformUserInfoBE() {
        _classCallCheck(this, TaxNewsPlatformUserInfoBE);
    }

    _createClass(TaxNewsPlatformUserInfoBE, null, [{
        key: "getObj",
        value: function getObj(InitialParams) {

            var userInfoObj = {
                userGUID: "",
                userID: null,
                userEmailAddress: "",
                userFirstName: "",
                userLastName: "",
                adminRoles: [],
                clientList: [],
                hasCMTAccess: false,
                hasViewDocumentCountAccess: false,
                isAdmin: false,
                isAuthenticated: false,
                uxPilotUser: 0
            };

            if (!Globals.Utilities.isUndefinedOrNull(InitialParams)) {

                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userGUID)) {
                    userInfoObj.userGUID = InitialParams.userGUID;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userID)) {
                    userInfoObj.userID = InitialParams.userID;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userEmailAddress)) {
                    userInfoObj.userEmailAddress = InitialParams.userEmailAddress;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userFirstName)) {
                    userInfoObj.userFirstName = InitialParams.userFirstName;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.userLastName)) {
                    userInfoObj.userLastName = InitialParams.userLastName;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.adminRoles)) {
                    userInfoObj.adminRoles = InitialParams.adminRoles;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.clientList)) {
                    userInfoObj.clientList = InitialParams.clientList;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.hasCMTAccess)) {
                    userInfoObj.hasCMTAccess = InitialParams.hasCMTAccess;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.hasViewDocumentCountAccess)) {
                    userInfoObj.hasViewDocumentCountAccess = InitialParams.hasViewDocumentCountAccess;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.isAdmin)) {
                    userInfoObj.isAdmin = InitialParams.isAdmin;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.isAuthenticated)) {
                    userInfoObj.isAuthenticated = InitialParams.isAuthenticated;
                }
                if (!Globals.Utilities.isUndefinedOrNull(InitialParams.uxPilotUser)) {
                    userInfoObj.uxPilotUser = InitialParams.uxPilotUser;
                }
            }

            return userInfoObj;
        }
    }]);

    return TaxNewsPlatformUserInfoBE;
}();

var TaxNewsPlatformCompanyInfoBE = function () {
    function TaxNewsPlatformCompanyInfoBE() {
        _classCallCheck(this, TaxNewsPlatformCompanyInfoBE);
    }

    _createClass(TaxNewsPlatformCompanyInfoBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                companyGUID: "",
                companyName: ""
            };
        }
    }]);

    return TaxNewsPlatformCompanyInfoBE;
}();

var TaxNewsPlatformLanguageInfoBE = function () {
    function TaxNewsPlatformLanguageInfoBE() {
        _classCallCheck(this, TaxNewsPlatformLanguageInfoBE);
    }

    _createClass(TaxNewsPlatformLanguageInfoBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                languageNames: {},

                languages: {},

                selectedLanguageID: null,

                selectedLanguageKey: "",

                languageOptions: [{
                    id: "en",
                    text: "English - EN",
                    link: null,
                    className: document.kNextState.language === "en" ? "active" : null,
                    preventClick: document.kNextState.language === "en" ? true : false
                }, {
                    id: "fr",
                    text: "Fran\xE7ais - FR",
                    link: null,
                    className: document.kNextState.language === "fr" ? "active" : null,
                    preventClick: document.kNextState.language === "fr" ? true : false
                }]
            };
        }
    }]);

    return TaxNewsPlatformLanguageInfoBE;
}();

var TaxNewsPlatformAccessibilityAnnouncementsBE = function () {
    function TaxNewsPlatformAccessibilityAnnouncementsBE() {
        _classCallCheck(this, TaxNewsPlatformAccessibilityAnnouncementsBE);
    }

    _createClass(TaxNewsPlatformAccessibilityAnnouncementsBE, null, [{
        key: "getObj",
        value: function getObj() {
            return {
                assertiveMessage: null,
                politeMessage: null
            };
        }
    }]);

    return TaxNewsPlatformAccessibilityAnnouncementsBE;
}();;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var TaxNewsPlatformPageDAL = function () {
    function TaxNewsPlatformPageDAL() {
        _classCallCheck(this, TaxNewsPlatformPageDAL);
    }

    _createClass(TaxNewsPlatformPageDAL, [{
        key: "updateWholeStore",
        value: function updateWholeStore(WholeStoryState) {
            var replaceWholeStoreAction = {
                type: "REPLACE_WHOLE_STORE",
                payload: WholeStoryState
            };
            currentPage.store.dispatch(replaceWholeStoreAction);
        }
    }, {
        key: "getUserInfoState",
        value: function getUserInfoState() {
            return currentPage.store.getState().userInfo;
        }
    }, {
        key: "updateUserInfoState",
        value: function updateUserInfoState(UpdatedUserInfoState) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("userInfo", UpdatedUserInfoState));
        }
    }, {
        key: "getPageInfoState",
        value: function getPageInfoState() {
            return currentPage.store.getState().pageInfo;
        }
    }, {
        key: "updatePageInfoState",
        value: function updatePageInfoState(UpdatedPageInfoState) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("pageInfo", UpdatedPageInfoState));
        }
    }, {
        key: "getUserGUID",
        value: function getUserGUID() {
            return currentPage.store.getState().userInfo.userGUID;
        }
    }, {
        key: "getCompanyGUID",
        value: function getCompanyGUID() {
            return currentPage.store.getState().userInfo.companyGUID;
        }
    }, {
        key: "getSiteName",
        value: function getSiteName() {
            return currentPage.store.getState().siteInfo.siteName;
        }
    }, {
        key: "getBaseAPIURL",
        value: function getBaseAPIURL() {
            return currentPage.store.getState().siteInfo.baseAPIURL;
        }
    }, {
        key: "getAnnouncements",
        value: function getAnnouncements() {
            return currentPage.store.getState().announcements;
        }
    }, {
        key: "updateAnnouncements",
        value: function updateAnnouncements(PoliteAnnouncement, AssertiveAnnouncement) {

            var announcementObj = document.kNextCommonObjectsHelper.getKnotiaPageAnnouncerState();
            announcementObj.politeMessage = PoliteAnnouncement;
            announcementObj.assertiveMessage = AssertiveAnnouncement;

            return currentPage.store.dispatch(knotiaRedux.updateStoreData("announcements", announcementObj));
        }
    }, {
        key: "getExpandedModalState",
        value: function getExpandedModalState() {
            return currentPage.store.getState().expandedModal;
        }
    }, {
        key: "updateExpandedModalState",
        value: function updateExpandedModalState(ExpandedModalKey) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("expandedModal", ExpandedModalKey));
        }
    }, {
        key: "getExpandedDropdownState",
        value: function getExpandedDropdownState() {
            return currentPage.store.getState().expandedDropdown;
        }
    }, {
        key: "updateExpandedDropdownState",
        value: function updateExpandedDropdownState(ExpandedDrodownKey) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("expandedDropdown", ExpandedDrodownKey));
        }
    }, {
        key: "getLanguageState",
        value: function getLanguageState() {
            return currentPage.store.getState().languageInfo;
        }
    }, {
        key: "updateLanguageInfoState",
        value: function updateLanguageInfoState(UpdatedLanguageInfoState) {
            return currentPage.store.dispatch(knotiaRedux.updateStoreData("languageInfo", UpdatedLanguageInfoState));
        }
    }]);

    return TaxNewsPlatformPageDAL;
}();

document.TaxNewsPlatformPageDAL = TaxNewsPlatformPageDAL;;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var TaxNewsPlatformPageBLL = function () {
    function TaxNewsPlatformPageBLL() {
        _classCallCheck(this, TaxNewsPlatformPageBLL);
    }

    _createClass(TaxNewsPlatformPageBLL, [{
        key: "onModalBackgroundClick",
        value: function onModalBackgroundClick() {
            currentPage.DAL.updateExpandedModalState(null);
        }
    }, {
        key: "closeModal",
        value: function closeModal() {
            currentPage.DAL.updateExpandedModalState(null);
        }
    }, {
        key: "makeBodyUnscrollable",
        value: function makeBodyUnscrollable() {
            $("body").css("overflow", "hidden");
        }
    }, {
        key: "makeBodyScrollable",
        value: function makeBodyScrollable() {
            $("body").css("overflow", "");
        }
    }, {
        key: "isKnowledgeOrDownloadsProduct",
        value: function isKnowledgeOrDownloadsProduct(ProductObj) {
            if (Globals.Utilities.isUndefinedOrNull(ProductObj) || ProductObj.ProductCollectionType === ProductCollectionType.NEWS || ProductObj.ProductType !== ProductType.KNOWLEDGE && ProductObj.ProductType !== ProductType.DOWNLOADS) {
                return false;
            }
            return true;
        }
    }, {
        key: "isKnowledgeOrURLProduct",
        value: function isKnowledgeOrURLProduct(ProductObj) {
            if (Globals.Utilities.isUndefinedOrNull(ProductObj) || ProductObj.ProductCollectionType === ProductCollectionType.NEWS || ProductObj.ProductType !== ProductType.KNOWLEDGE && ProductObj.ProductType !== ProductType.URL) {
                return false;
            }
            return true;
        }
    }, {
        key: "isKnowledgeResearchProduct",
        value: function isKnowledgeResearchProduct(ProductObj) {
            if (Globals.Utilities.isUndefinedOrNull(ProductObj) && ProductObj.ProductCollectionType === ProductCollectionType.NEWS || ProductObj.ProductType !== ProductType.KNOWLEDGE) {
                return false;
            }
            return true;
        }
    }]);

    return TaxNewsPlatformPageBLL;
}();;
"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var TaxNewsPlatformPageStructure = function TaxNewsPlatformPageStructure() {
    _classCallCheck(this, TaxNewsPlatformPageStructure);

    var companyInfo = TaxNewsPlatformCompanyInfoBE.getObj();
    if (!Globals.Utilities.isUndefinedOrNull(document.kNextCompany)) {
        companyInfo.companyGUID = document.kNextCompany.companyGUID;
        companyInfo.companyName = document.kNextCompany.companyName;
    }

    var languageInfo = TaxNewsPlatformLanguageInfoBE.getObj();
    if (!Globals.Utilities.isUndefinedOrNull(document.kNextPlatform) && !Globals.Utilities.isUndefinedOrNull(document.kNextPlatform.languages) && !Globals.Utilities.isUndefinedOrNull(document.kNextState)) {

        languageInfo.languages = document.kNextPlatform.languages;
        languageInfo.languageNames = {
            "en": "English",
            "fr": "Fran\xE7ais"
        };
        languageInfo.selectedLanguageKey = document.kNextState.language;
        languageInfo.selectedLanguageID = document.kNextPlatform.languages[document.kNextState.language];
    }

    var userInfo = TaxNewsPlatformUserInfoBE.getObj();
    if (!Globals.Utilities.isUndefinedOrNull(document.kNextUser) && !Globals.Utilities.isUndefinedOrNull(document.kNextState)) {
        userInfo = _extends({}, document.kNextUser, {
            "isAuthenticated": document.kNextState.isAuthenticated || document.kNextState.isAuthenticated === "True" ? true : false
        });

        userInfo.hasCMTAccess = userInfo.hasCMTAccess === "True" ? true : false;
        userInfo.hasViewDocumentCountAccess = userInfo.hasViewDocumentCountAccess === "True" ? true : false;
    }

    this.appState = TaxNewsPlatformSitePageStateBE.getObj();
    this.appState.userInfo = userInfo;
    this.appState.companyInfo = companyInfo;
    this.appState.languageInfo = languageInfo;

    this.ModalTypes = {
        "LOADING": "LOADING"
    };
};

var taxNewsPlatformPage = null;

if (!_typeof(window.glb_EnableKnotiaNext === 'undefined')) {
    document.TaxNewsPlatformPageStructure = new TaxNewsPlatformPageStructure();
    taxNewsPlatformPage = document.TaxNewsPlatformPageStructure;
};
"use strict";

document.kNextReactComponents.ScrollUpButton = function (_ref) {
    var _ref$role = _ref.role,
        role = _ref$role === undefined ? "button" : _ref$role,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? null : _ref$label,
        _ref$ariaLabel = _ref.ariaLabel,
        ariaLabel = _ref$ariaLabel === undefined ? null : _ref$ariaLabel,
        _ref$isVisible = _ref.isVisible,
        isVisible = _ref$isVisible === undefined ? false : _ref$isVisible,
        _ref$domRef = _ref.domRef,
        domRef = _ref$domRef === undefined ? null : _ref$domRef,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$onKeyDownWireUp = _ref.onKeyDownWireUp,
        onKeyDownWireUp = _ref$onKeyDownWireUp === undefined ? null : _ref$onKeyDownWireUp,
        _ref$onFocusWireUp = _ref.onFocusWireUp,
        onFocusWireUp = _ref$onFocusWireUp === undefined ? null : _ref$onFocusWireUp;

    if (!isVisible) {
        return null;
    }

    var _ariaLabelText = "";
    if (!Globals.Utilities.isUndefinedOrNull(ariaLabel) && ariaLabel.length > 0) {
        _ariaLabelText = ariaLabel;
    } else if (!Globals.Utilities.isUndefinedOrNull(label)) {
        _ariaLabelText = label;
    }

    return React.createElement(
        "span",
        { componentname: "ScrollUpButton" },
        React.createElement(
            "button",
            {
                id: "scrollup-button",
                role: role,
                type: "button",
                onClick: onClickWireUp,
                tabIndex: 0,
                onKeyDown: onKeyDownWireUp,
                onFocus: onFocusWireUp,
                "aria-label": _ariaLabelText,
                ref: domRef
            },
            React.createElement(document.kNextReactComponents.Icon, {
                iconClassName: "fas fa-arrow-circle-up",
                tabIndex: -1
            }),
            GetString("str_BackToTop")
        )
    );
};;
"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

document.kNextReactComponents.FederatedSearchCheckbox = function (_React$Component) {
    _inherits(FederatedSearchCheckbox, _React$Component);

    _createClass(FederatedSearchCheckbox, null, [{
        key: "defaultProps",
        get: function get() {

            return {
                name: null, //key ... required
                checked: false,
                //if valuesCanBePartial is true then the checked property is a string of type enum NodeCheckedStatusType
                valuesCanBePartial: false,
                text: null,
                className: null, //a string that specifies the class on the DOM
                onClickWireUp: null,
                tabIndex: 0,
                descriptionText: "",
                domRef: null,
                onKeyDownWireUp: null,
                ariaLabel: null
            };
        }
    }]);

    function FederatedSearchCheckbox(props) {
        _classCallCheck(this, FederatedSearchCheckbox);

        var _this = _possibleConstructorReturn(this, (FederatedSearchCheckbox.__proto__ || Object.getPrototypeOf(FederatedSearchCheckbox)).call(this, props));

        autobind(_this);
        return _this;
    }

    _createClass(FederatedSearchCheckbox, [{
        key: "handleKeyDownEvent",
        value: function handleKeyDownEvent(Event) {
            if (typeof this.props.onKeyDownWireUp === "function") {
                this.props.onKeyDownWireUp(Event);
            }

            switch (Event.keyCode) {
                case 13: //enter
                case 32:
                    //spacebar
                    if (typeof this.props.onClickWireUp === "function") {
                        this.props.onClickWireUp();
                    }
            }
        }
    }, {
        key: "handleKeyPressEvent",
        value: function handleKeyPressEvent(KeyPressEvent) {

            //handle navigation for checkbox lists
            //NOTE: DON'T THINK THIS IS BEING USED... TO DO THIS THE PARENT COMPONENT CAN WRAP IT INSIDE A NAVIGATION COMPONENT AND HANDLE IT BYITSELF. SEE: CHECKBOXLIST.JSX
            switch (KeyPressEvent.keyCode) {
                case 32:
                    //spacebar
                    if (typeof this.props.onClickWireUp === "function") {
                        this.props.onClickWireUp();
                    }
            }

            return;
        }
    }, {
        key: "render",
        value: function render() {

            var checkboxClassName = "checkbox select-option";

            switch (this.props.CheckBoxStyle) {
                case CheckBoxStyle.Secondary:
                    checkboxClassName = "checkbox select-option checkbox-secondary";
                    break;
                case CheckBoxStyle.Dark:
                    checkboxClassName = "checkbox select-option checkbox-dark";
                    break;
                case CheckBoxStyle.Primary:
                default:
                    checkboxClassName = "checkbox select-option checkbox-primary";
            }

            if (typeof this.props.className === "string") {
                checkboxClassName = checkboxClassName + " " + this.props.className;
            }

            var checkMarkClassName = void 0;
            var ariaChecked = false;
            var ariaCheckedStatus = "";
            var ariaLabelText = "";

            if (this.props.valuesCanBePartial) {
                switch (this.props.checked) {
                    case NodeCheckedStatusType.CHECKED:
                        checkMarkClassName = "fad fa-check-square checked";
                        ariaChecked = true;
                        ariaCheckedStatus = "checked";
                        break;
                    case NodeCheckedStatusType.PARTIALLY_CHECKED:
                        checkMarkClassName = "fad fa-square partial hidden";
                        ariaChecked = true;
                        ariaCheckedStatus = "partially checked";

                        break;
                    default:
                    case NodeCheckedStatusType.UNCHECKED:
                        checkMarkClassName = "fal fa-square unchecked";
                        ariaCheckedStatus = "not checked";
                        break;
                }
            } else {
                checkMarkClassName = this.props.checked === true ? "fad fa-check-square checked" : "fal fa-square unchecked";
                ariaChecked = this.props.checked;
            }

            var checkboxID = null;
            var checkboxLabelID = null;

            if (typeof this.props.name === "string" && this.props.name !== "") {
                checkboxID = "chk-" + this.props.name;
                checkboxLabelID = "chk-label-" + this.props.name;
            } else {
                //they did not provide a name for the checkbox 
                //should we make one for them? using random so the ids won't conflict
            }

            var labelBoxDOM = null;
            var labelDOM = React.createElement(
                "label",
                { id: checkboxLabelID, htmlFor: checkboxID, key: this.props.name },
                this.props.text
            );

            //render the description if it was provided
            if (typeof this.props.descriptionText === "string" && this.props.descriptionText !== "") {
                labelBoxDOM = React.createElement(
                    "div",
                    { className: "label-box" },
                    labelDOM,
                    React.createElement(
                        "span",
                        { className: "description beside-label" },
                        "\xA0\u2014\xA0",
                        this.props.descriptionText
                    )
                );
            } else if (_typeof(this.props.descriptionText) === "object") {
                labelBoxDOM = React.createElement(
                    "label",
                    { id: checkboxLabelID, htmlFor: checkboxID, key: this.props.name },
                    this.props.text,
                    " ",
                    this.props.descriptionText.props.children
                );
            } else {
                labelBoxDOM = labelDOM;
            }

            var onClickFunc = null;
            var tabIndex = -1;

            if (!this.props.disabled) {
                onClickFunc = this.props.onClickWireUp;
                tabIndex = this.props.tabIndex;
            }

            if (this.props.ariaLabel != null && this.props.ariaLabel.length > 0) {
                ariaLabelText = this.props.ariaLabel;
            }

            var checkboxIconDOM = React.createElement(
                "div",
                { className: this.props.checked === NodeCheckedStatusType.PARTIALLY_CHECKED ? "partial-check-active " + checkboxClassName : checkboxClassName },
                React.createElement("i", {
                    role: "checkbox",
                    id: name,
                    className: checkMarkClassName,
                    "aria-disabled": this.props.disabled,
                    "aria-checked": ariaChecked,
                    "aria-labelledby": checkboxLabelID,
                    "aria-label": ariaLabelText + " " + ariaCheckedStatus,
                    tabIndex: tabIndex,
                    onKeyDown: this.handleKeyDownEvent,
                    onClick: function onClick() {
                        if (typeof onClickFunc === "function") {
                            onClickFunc();
                        }
                    },

                    ref: this.props.domRef
                })
            );

            var partiallyCheckedDOM = React.createElement(
                "div",
                {
                    className: this.props.checked === NodeCheckedStatusType.PARTIALLY_CHECKED ? "partial-square-container" : "partial-square-container hidden",
                    tabIndex: tabIndex
                },
                React.createElement("img", {
                    className: "partial-square",
                    tabIndex: tabIndex,
                    onClick: function onClick() {
                        if (typeof onClickFunc === "function") {
                            onClickFunc();
                        }
                    }
                })
            );

            return React.createElement(
                "span",
                { className: "federated-search-checkbox", componentname: "FederatedSearchCheckbox" },
                checkboxIconDOM,
                partiallyCheckedDOM,
                labelBoxDOM
            );
        }
    }]);

    return FederatedSearchCheckbox;
}(React.Component);;
"use strict";

document.kNextReactComponents.ContentBox = function (_ref) {
    var _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$id = _ref.id,
        id = _ref$id === undefined ? null : _ref$id,
        _ref$domRef = _ref.domRef,
        domRef = _ref$domRef === undefined ? null : _ref$domRef,
        _ref$expandPanelStyle = _ref.expandPanelStyle,
        expandPanelStyle = _ref$expandPanelStyle === undefined ? ExpandPanelStyle.Arrow : _ref$expandPanelStyle,
        _ref$expandable = _ref.expandable,
        expandable = _ref$expandable === undefined ? true : _ref$expandable,
        _ref$expanded = _ref.expanded,
        expanded = _ref$expanded === undefined ? false : _ref$expanded,
        _ref$headerDOM = _ref.headerDOM,
        _headerDOM = _ref$headerDOM === undefined ? null : _ref$headerDOM,
        _ref$titleRole = _ref.titleRole,
        titleRole = _ref$titleRole === undefined ? null : _ref$titleRole,
        _ref$titleAriaLevel = _ref.titleAriaLevel,
        titleAriaLevel = _ref$titleAriaLevel === undefined ? null : _ref$titleAriaLevel,
        _ref$title = _ref.title,
        title = _ref$title === undefined ? null : _ref$title,
        _ref$children = _ref.children,
        children = _ref$children === undefined ? null : _ref$children,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$role = _ref.role,
        role = _ref$role === undefined ? "button" : _ref$role,
        _ref$tabIndex = _ref.tabIndex,
        tabIndex = _ref$tabIndex === undefined ? 0 : _ref$tabIndex,
        _ref$iconTabIndex = _ref.iconTabIndex,
        iconTabIndex = _ref$iconTabIndex === undefined ? -1 : _ref$iconTabIndex;

    var eventHandler = {
        "handleBoxHeaderKeyPress": function handleBoxHeaderKeyPress(Event) {
            //if they press enter or spacebar
            if ((Event.key === "Enter" || Event.keyCode === 32) && typeof onClickWireUp === "function") {
                onClickWireUp(Event);
            }
        }
    };

    var domGenerator = {
        "headerDOM": function headerDOM() {
            var _headerContentDOM = null;

            if (!Globals.Utilities.isUndefinedOrNull(_headerDOM)) {
                _headerContentDOM = _headerDOM;
            }

            var _contentSectionID = null;
            if (!Globals.Utilities.isUndefinedOrNull(id)) {
                _contentSectionID = id + "_contentSection";
            }

            var _expandedIcon = "";
            var _minimizedIcon = "";
            switch (expandPanelStyle) {
                case ExpandPanelStyle.PlusMinus:
                    _expandedIcon = IconType.Minus;
                    _minimizedIcon = IconType.Add;
                    break;
                case ExpandPanelStyle.Arrow:
                default:
                    _expandedIcon = IconType.ArrowUp;
                    _minimizedIcon = IconType.ArrowDown;
            }

            var iconDOM = null;
            var onBoxHeaderClickFunc = null;
            var onBoxHeaderKeyPressFunc = null;
            if (expandable) {
                var expandIcon = expanded ? _expandedIcon : _minimizedIcon;
                iconDOM = React.createElement(document.kNextReactComponents.Icon, {
                    iconType: expandIcon,
                    tabIndex: iconTabIndex
                });

                onBoxHeaderClickFunc = onClickWireUp;
                onBoxHeaderKeyPressFunc = eventHandler.handleBoxHeaderKeyPress;
            }

            _headerContentDOM = React.createElement(
                React.Fragment,
                null,
                React.createElement(
                    "span",
                    {
                        role: titleRole,
                        "aria-level": titleAriaLevel
                    },
                    title
                ),
                iconDOM
            );

            return React.createElement(
                "div",
                {
                    className: "box-header",
                    onClick: onBoxHeaderClickFunc,
                    tabIndex: tabIndex,
                    onKeyPress: onBoxHeaderKeyPressFunc,
                    ref: domRef,
                    "aria-expanded": expanded,
                    "aria-controls": _contentSectionID,
                    "aria-label": title,
                    id: id,
                    role: role
                },
                _headerContentDOM
            );
        },
        "contentBodyDOM": function contentBodyDOM() {
            if (!expanded) {
                return null;
            }

            var _contentSectionID = null;
            if (!Globals.Utilities.isUndefinedOrNull(id)) {
                _contentSectionID = id + "_contentSection";
            }

            return React.createElement(
                "div",
                {
                    className: "content-box-body",
                    tabIndex: tabIndex,
                    role: "region",
                    id: _contentSectionID,
                    "aria-labelledby": id
                },
                children
            );
        }
    };

    var _componentClassName = "content-box " + className;
    if (expanded) {
        _componentClassName += " selected";
    }

    return React.createElement(
        "div",
        {
            className: _componentClassName,
            componentname: "ContentBox"
        },
        domGenerator.headerDOM(),
        domGenerator.contentBodyDOM()
    );
};;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

document.kNextReactComponents.UnorderedListBox = function (_React$Component) {
    _inherits(UnorderedListBox, _React$Component);

    function UnorderedListBox(props) {
        _classCallCheck(this, UnorderedListBox);

        var _this = _possibleConstructorReturn(this, (UnorderedListBox.__proto__ || Object.getPrototypeOf(UnorderedListBox)).call(this, props));

        var defaultExpand = typeof props.defaultExpand === "boolean" ? props.defaultExpand : false;

        //Globals.Utilities.consoleLog("unorderedlist box default expand is " + defaultExpand);

        _this.state = {
            expand: defaultExpand
        };

        autobind(_this);
        return _this;
    }

    _createClass(UnorderedListBox, [{
        key: "render",
        value: function render() {

            return React.createElement(
                document.kNextReactComponents.ContentBox,
                { title: this.props.title, defaultExpand: this.state.expand, componentname: "UnorderedListBox" },
                React.createElement(document.kNextReactComponents.UnorderedList, { BulletStyle: this.props.BulletStyle, ItemList: this.props.ItemList })
            );
        }
    }], [{
        key: "defaultProps",
        get: function get() {

            return {
                title: GetString('str_Component_defaultContentBox'),
                ItemList: [],
                BulletStyle: BulletStyle.Arrow,
                defaultExpand: false,
                onClick: null
            };
        }
    }]);

    return UnorderedListBox;
}(React.Component);

var bulletStyleValues = [];

for (var key in BulletStyle) {
    bulletStyleValues.push(BulletStyle[key]);
}

document.kNextReactComponents.UnorderedListBox.propTypes = {
    title: PropTypes.string,
    ItemList: PropTypes.array.isRequired,
    BulletStyle: PropTypes.oneOf(bulletStyleValues),
    onClick: PropTypes.func,
    defaultExpand: PropTypes.bool
};;
"use strict";

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var ErrorBoundary = function (_React$Component) {
	_inherits(ErrorBoundary, _React$Component);

	function ErrorBoundary(props) {
		_classCallCheck(this, ErrorBoundary);

		var _this = _possibleConstructorReturn(this, (ErrorBoundary.__proto__ || Object.getPrototypeOf(ErrorBoundary)).call(this, props));

		_this.state = { hasError: false };
		return _this;
	}

	_createClass(ErrorBoundary, [{
		key: "componentDidCatch",
		value: function componentDidCatch(error, info) {
			// Display fallback UI
			this.setState({ hasError: true });
			// You can also log the error to an error reporting service
			console.log(error);
			console.log(info);
		}
	}, {
		key: "render",
		value: function render() {
			if (this.state.hasError) {
				// You can render any custom fallback UI
				return React.createElement(
					"h1",
					null,
					"Something went wrong."
				);
			}
			return this.props.children;
		}
	}]);

	return ErrorBoundary;
}(React.Component);;
"use strict";

document.kNextReactComponents.Loading = function (_ref) {
    var _ref$loadingItems = _ref.loadingItems,
        loadingItems = _ref$loadingItems === undefined ? 10 : _ref$loadingItems,
        _ref$ulOptionalClassN = _ref.ulOptionalClassName,
        ulOptionalClassName = _ref$ulOptionalClassN === undefined ? "" : _ref$ulOptionalClassN,
        _ref$liOptionalClassN = _ref.liOptionalClassName,
        liOptionalClassName = _ref$liOptionalClassN === undefined ? "" : _ref$liOptionalClassN;

    var domGenerator = {
        "loadingCardsDOM": function loadingCardsDOM() {
            var _loadingCardsDOM = [];
            for (var _cardNum = 1; _cardNum <= loadingItems; _cardNum++) {
                _loadingCardsDOM.push(React.createElement(
                    "li",
                    {
                        className: liOptionalClassName,
                        key: _cardNum
                    },
                    React.createElement(
                        "div",
                        { className: "loading-card" },
                        React.createElement("div", { className: "background-masker" })
                    )
                ));
            }

            return _loadingCardsDOM;
        }
    };

    return React.createElement(
        "ul",
        {
            className: "loading-card-list " + ulOptionalClassName,
            componentname: "Loading"
        },
        domGenerator.loadingCardsDOM()
    );
};;
"use strict";

document.kNextReactComponents.TypingDots = function (_ref) {
    var _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$dotColour = _ref.dotColour,
        dotColour = _ref$dotColour === undefined ? "#000" : _ref$dotColour,
        _ref$dotSize = _ref.dotSize,
        dotSize = _ref$dotSize === undefined ? "10px" : _ref$dotSize,
        _ref$spaceBetweenDots = _ref.spaceBetweenDots,
        spaceBetweenDots = _ref$spaceBetweenDots === undefined ? "16px" : _ref$spaceBetweenDots;

    React.useEffect(function () {
        document.documentElement.style.setProperty("--dot-colour", dotColour);
    }, [dotColour]);

    React.useEffect(function () {
        document.documentElement.style.setProperty("--dot-size", dotSize);
    }, [dotSize]);

    React.useEffect(function () {
        document.documentElement.style.setProperty("--space-between-dots", spaceBetweenDots);
    }, [spaceBetweenDots]);

    return React.createElement("div", { className: "typing-dots " + className });
};;
'use strict';

var offScreenStyle = {
    border: 0,
    clip: 'rect(0 0 0 0)',
    height: '1px',
    margin: '-1px',
    overflow: 'hidden',
    padding: 0,
    width: '1px',
    position: 'absolute'
};

document.kNextReactComponents.MessageBlock = function MessageBlock(props) {

    return React.createElement(
        'div',
        {
            style: offScreenStyle,
            role: 'log',
            'aria-live': 'assertive',
            'aria-relevant': 'additions text',
            'aria-atomic': 'true',
            className: 'announcer message-block',
            componentname: 'MessageBlock'
        },
        props.message ? props.message : ''
    );
};;
'use strict';

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

document.kNextReactComponents.Announcer = function (_React$Component) {
    _inherits(Announcer, _React$Component);

    _createClass(Announcer, null, [{
        key: 'getDerivedStateFromProps',
        value: function getDerivedStateFromProps(nextProps, nextState) {
            var oldPolitemessage = nextProps.politeMessage,
                oldAssertiveMessage = nextProps.assertiveMessage;
            var politeMessage = nextProps.politeMessage,
                assertiveMessage = nextProps.assertiveMessage;


            if (oldPolitemessage !== politeMessage) {
                return {
                    politeMessage1: this.setAlternatePolite ? '' : politeMessage,
                    politeMessage2: this.setAlternatePolite ? politeMessage : '',
                    setAlternatePolite: !this.setAlternatePolite
                };
                //this.setAlternatePolite = !this.setAlternatePolite;
            }

            if (oldAssertiveMessage !== assertiveMessage) {
                return {
                    assertiveMessage1: this.setAlternateAssertive ? '' : assertiveMessage,
                    assertiveMessage2: this.setAlternateAssertive ? assertiveMessage : '',
                    setAlternateAssertive: !this.setAlternateAssertive
                };
                //this.setAlternateAssertive = !this.setAlternateAssertive;
            }

            //returning null means state won't be updated
            return null;
        }
    }]);

    function Announcer(props) {
        _classCallCheck(this, Announcer);

        var _this = _possibleConstructorReturn(this, (Announcer.__proto__ || Object.getPrototypeOf(Announcer)).call(this, props));

        autobind(_this);

        _this.state = {
            assertiveMessage1: '',
            assertiveMessage2: '',
            politeMessage1: '',
            politeMessage2: '',
            setAlternatePolite: false,
            setAlternateAssertive: false
        };

        //why is this not part of state? b/c changing this shouldn't trigger rendering and we don't want to unnecessarily pollute the state
        //this.setAlternatePolite = false;
        //this.setAlternateAssertive = false;
        return _this;
    }

    _createClass(Announcer, [{
        key: 'render',
        value: function render() {
            var _state = this.state,
                assertiveMessage1 = _state.assertiveMessage1,
                assertiveMessage2 = _state.assertiveMessage2,
                politeMessage1 = _state.politeMessage1,
                politeMessage2 = _state.politeMessage2;

            return React.createElement(
                'div',
                { componentname: 'Announcer' },
                React.createElement(document.kNextReactComponents.MessageBlock, { key: "assertiveMessage1", 'aria-live': 'assertive', message: assertiveMessage1 }),
                React.createElement(document.kNextReactComponents.MessageBlock, { key: "assertiveMessage2", 'aria-live': 'assertive', message: assertiveMessage2 }),
                React.createElement(document.kNextReactComponents.MessageBlock, { key: "politeMessage1", 'aria-live': 'polite', message: politeMessage1 }),
                React.createElement(document.kNextReactComponents.MessageBlock, { key: "politeMessage2", 'aria-live': 'polite', message: politeMessage2 })
            );
        }
    }]);

    return Announcer;
}(React.Component);;
"use strict";

var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();

document.kNextReactComponents.Modal = function (_ref) {
    var _ref$active = _ref.active,
        active = _ref$active === undefined ? false : _ref$active,
        _ref$showHeader = _ref.showHeader,
        showHeader = _ref$showHeader === undefined ? true : _ref$showHeader,
        _ref$title = _ref.title,
        title = _ref$title === undefined ? "" : _ref$title,
        _ref$showCancel = _ref.showCancel,
        showCancel = _ref$showCancel === undefined ? true : _ref$showCancel,
        _ref$autoFocus = _ref.autoFocus,
        autoFocus = _ref$autoFocus === undefined ? true : _ref$autoFocus,
        _ref$modalContentLeft = _ref.modalContentLeftPositionPixels,
        modalContentLeftPositionPixels = _ref$modalContentLeft === undefined ? null : _ref$modalContentLeft,
        _ref$modalContentTopP = _ref.modalContentTopPositionPixels,
        modalContentTopPositionPixels = _ref$modalContentTopP === undefined ? null : _ref$modalContentTopP,
        _ref$modalContentWidt = _ref.modalContentWidthPixels,
        modalContentWidthPixels = _ref$modalContentWidt === undefined ? null : _ref$modalContentWidt,
        _ref$modalBackgroundL = _ref.modalBackgroundLeftPositionPixels,
        modalBackgroundLeftPositionPixels = _ref$modalBackgroundL === undefined ? null : _ref$modalBackgroundL,
        _ref$modalBackgroundT = _ref.modalBackgroundTopPositionPixels,
        modalBackgroundTopPositionPixels = _ref$modalBackgroundT === undefined ? null : _ref$modalBackgroundT,
        _ref$modalBackgroundW = _ref.modalBackgroundWidthPixels,
        modalBackgroundWidthPixels = _ref$modalBackgroundW === undefined ? null : _ref$modalBackgroundW,
        _ref$centered = _ref.centered,
        centered = _ref$centered === undefined ? false : _ref$centered,
        _ref$closeDOMRef = _ref.closeDOMRef,
        closeDOMRef = _ref$closeDOMRef === undefined ? null : _ref$closeDOMRef,
        _ref$padding = _ref.padding,
        padding = _ref$padding === undefined ? true : _ref$padding,
        _ref$componentname = _ref.componentname,
        componentname = _ref$componentname === undefined ? "" : _ref$componentname,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$modalBackgroundC = _ref.modalBackgroundClickIgnoredDOMID,
        modalBackgroundClickIgnoredDOMID = _ref$modalBackgroundC === undefined ? null : _ref$modalBackgroundC,
        _ref$makeBackgroundUn = _ref.makeBackgroundUnscrollableWhenActive,
        makeBackgroundUnscrollableWhenActive = _ref$makeBackgroundUn === undefined ? true : _ref$makeBackgroundUn,
        _ref$children = _ref.children,
        children = _ref$children === undefined ? null : _ref$children,
        _ref$onCloseModalKeyP = _ref.onCloseModalKeyPressWireUp,
        onCloseModalKeyPressWireUp = _ref$onCloseModalKeyP === undefined ? null : _ref$onCloseModalKeyP,
        _ref$onCloseModalClic = _ref.onCloseModalClickWireUp,
        onCloseModalClickWireUp = _ref$onCloseModalClic === undefined ? null : _ref$onCloseModalClic,
        _ref$onModalEscKeyDow = _ref.onModalEscKeyDownWireUp,
        onModalEscKeyDownWireUp = _ref$onModalEscKeyDow === undefined ? null : _ref$onModalEscKeyDow,
        _ref$onModalBackgroun = _ref.onModalBackgroundClickWireUp,
        onModalBackgroundClickWireUp = _ref$onModalBackgroun === undefined ? null : _ref$onModalBackgroun,
        _ref$loading = _ref.loading,
        loading = _ref$loading === undefined ? false : _ref$loading;

    var _React$useState = React.useState(0),
        _React$useState2 = _slicedToArray(_React$useState, 2),
        scrollLeftState = _React$useState2[0],
        setScrollLeftState = _React$useState2[1];

    var _React$useState3 = React.useState(0),
        _React$useState4 = _slicedToArray(_React$useState3, 2),
        scrollTopState = _React$useState4[0],
        setScrollTopState = _React$useState4[1];

    var modalContentRef = React.useRef(null);

    var eventHandler = {
        "handleOutsideClick": function handleOutsideClick(Event) {
            if (typeof onModalBackgroundClickWireUp === "function" && !Globals.Utilities.isUndefinedOrNull(modalContentRef.current) && !modalContentRef.current.contains(Event.target) && active) {
                var _modalBackgroundClickIgnoredElement = null;
                if (!Globals.Utilities.isUndefinedOrNull(modalBackgroundClickIgnoredDOMID)) {
                    _modalBackgroundClickIgnoredElement = document.querySelector("#" + modalBackgroundClickIgnoredDOMID);
                }

                if (Globals.Utilities.isUndefinedOrNull(_modalBackgroundClickIgnoredElement) || !_modalBackgroundClickIgnoredElement.contains(Event.target)) {
                    onModalBackgroundClickWireUp();
                }
            }
        },
        "handleModalKeyDown": function handleModalKeyDown(Event) {
            if (Event.keyCode === 27) {
                if (typeof onModalEscKeyDownWireUp === "function") {
                    Event.preventDefault();
                    onModalEscKeyDownWireUp(Event);
                } else if (typeof onCloseModalClickWireUp === "function") {
                    Event.preventDefault();
                    onCloseModalClickWireUp();
                }
            }
        },
        "handleModalScroll": function handleModalScroll() {
            window.scrollTo(scrollLeftState, scrollTopState);
        }
    };

    React.useEffect(function () {
        if (active) {
            document.addEventListener("click", eventHandler.handleOutsideClick);
            document.addEventListener("keydown", eventHandler.handleModalKeyDown);

            if (makeBackgroundUnscrollableWhenActive) {
                // Get the current page scroll position
                setScrollLeftState(window.pageXOffset || document.documentElement.scrollLeft);
                setScrollTopState(window.pageYOffset || document.documentElement.scrollTop);

                document.addEventListener("scroll", eventHandler.handleModalScroll);
            }

            //focus on the modal for accessibility keyboard navigation
            if (autoFocus && !Globals.Utilities.isUndefinedOrNull(modalContentRef.current)) {
                modalContentRef.current.focus();
            }
        }

        return function () {
            document.removeEventListener("click", eventHandler.handleOutsideClick);
            document.removeEventListener("keydown", eventHandler.handleModalKeyDown);

            if (makeBackgroundUnscrollableWhenActive) {
                document.removeEventListener("scroll", eventHandler.handleModalScroll);
            }
        };
    }, [active]);

    var domGenerator = {
        "modalHeaderDOM": function modalHeaderDOM() {
            if (!showHeader) {
                return null;
            }

            var _cancelDOM = null;
            if (showCancel) {
                _cancelDOM = React.createElement(document.kNextReactComponents.Icon, {
                    iconClassName: "far fa-times",
                    additionalClasses: "close",
                    onClickWireUp: onCloseModalClickWireUp,
                    onKeyPressWireUp: onCloseModalKeyPressWireUp,
                    tabIndex: 0,
                    domRef: closeDOMRef
                });
            }

            return React.createElement(
                "div",
                { className: "modal-header" },
                React.createElement(
                    "div",
                    {
                        className: "title",
                        role: "heading",
                        "aria-level": 2
                    },
                    title
                ),
                _cancelDOM
            );
        },
        "modalBodyDOM": function modalBodyDOM() {
            if (loading) {
                return React.createElement(
                    "div",
                    { className: "modal-body" },
                    React.createElement(
                        "div",
                        { className: "loading-container" },
                        React.createElement(
                            "span",
                            null,
                            GetString("str_Loading"),
                            "..."
                        ),
                        React.createElement("div", { className: "loading" })
                    )
                );
            } else {
                return children;
            }
        }
    };

    if (!active) {
        return null;
    }

    var _modalContentClassName = "modal-content " + className;
    if (centered) {
        _modalContentClassName += " centered";
    }
    if (padding) {
        _modalContentClassName += " padding";
    }

    var _modalContentStyle = {};
    if (typeof modalContentLeftPositionPixels === "number") {
        _modalContentStyle.left = modalContentLeftPositionPixels + "px";
    }
    if (typeof modalContentTopPositionPixels === "number") {
        _modalContentStyle.top = modalContentTopPositionPixels + "px";
    }
    if (typeof modalContentWidthPixels === "number") {
        _modalContentStyle.width = modalContentWidthPixels + "px";
    }

    var _modalBackgroundStyle = {};
    if (typeof modalBackgroundLeftPositionPixels === "number") {
        _modalBackgroundStyle.left = modalBackgroundLeftPositionPixels + "px";
    }
    if (typeof modalBackgroundTopPositionPixels === "number") {
        _modalBackgroundStyle.top = modalBackgroundTopPositionPixels + "px";
    }
    if (typeof modalBackgroundWidthPixels === "number") {
        _modalBackgroundStyle.width = modalBackgroundWidthPixels + "px";
    }

    return React.createElement(
        "div",
        {
            className: "modal-background " + className,
            componentname: "Modal " + componentname,
            style: _modalBackgroundStyle
        },
        React.createElement(
            "div",
            {
                className: _modalContentClassName,
                style: _modalContentStyle,
                role: "dialog",
                "aria-hidden": !active,
                ref: modalContentRef,
                tabIndex: 0
            },
            domGenerator.modalHeaderDOM(),
            domGenerator.modalBodyDOM()
        )
    );
};;
"use strict";

document.kNextReactComponents.AlertModal = function (_ref) {
    var _ref$componentName = _ref.componentName,
        componentName = _ref$componentName === undefined ? null : _ref$componentName,
        _ref$modalActive = _ref.modalActive,
        modalActive = _ref$modalActive === undefined ? false : _ref$modalActive,
        _ref$modaltitle = _ref.modaltitle,
        modaltitle = _ref$modaltitle === undefined ? null : _ref$modaltitle,
        _ref$showHeader = _ref.showHeader,
        showHeader = _ref$showHeader === undefined ? true : _ref$showHeader,
        _ref$showCancel = _ref.showCancel,
        showCancel = _ref$showCancel === undefined ? true : _ref$showCancel,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$centered = _ref.centered,
        centered = _ref$centered === undefined ? true : _ref$centered,
        _ref$padding = _ref.padding,
        padding = _ref$padding === undefined ? true : _ref$padding,
        _ref$modalContentText = _ref.modalContentText,
        modalContentText = _ref$modalContentText === undefined ? null : _ref$modalContentText,
        _ref$isContentHtml = _ref.isContentHtml,
        isContentHtml = _ref$isContentHtml === undefined ? false : _ref$isContentHtml,
        _ref$showLeftButton = _ref.showLeftButton,
        showLeftButton = _ref$showLeftButton === undefined ? false : _ref$showLeftButton,
        _ref$showRightButton = _ref.showRightButton,
        showRightButton = _ref$showRightButton === undefined ? false : _ref$showRightButton,
        _ref$leftButtonStyle = _ref.leftButtonStyle,
        leftButtonStyle = _ref$leftButtonStyle === undefined ? ButtonStyle.Utility : _ref$leftButtonStyle,
        _ref$rightButtonStyle = _ref.rightButtonStyle,
        rightButtonStyle = _ref$rightButtonStyle === undefined ? ButtonStyle.Primary : _ref$rightButtonStyle,
        _ref$leftButtonText = _ref.leftButtonText,
        leftButtonText = _ref$leftButtonText === undefined ? null : _ref$leftButtonText,
        _ref$rightButtonText = _ref.rightButtonText,
        rightButtonText = _ref$rightButtonText === undefined ? null : _ref$rightButtonText,
        _ref$onCloseModalClic = _ref.onCloseModalClickWireUp,
        onCloseModalClickWireUp = _ref$onCloseModalClic === undefined ? null : _ref$onCloseModalClic,
        _ref$onLeftButtonClic = _ref.onLeftButtonClickWireUp,
        onLeftButtonClickWireUp = _ref$onLeftButtonClic === undefined ? null : _ref$onLeftButtonClic,
        _ref$onRightButtonCli = _ref.onRightButtonClickWireUp,
        onRightButtonClickWireUp = _ref$onRightButtonCli === undefined ? null : _ref$onRightButtonCli;

    var domGenerator = {
        "modalBodyDOM": function modalBodyDOM() {
            var _contentBodyDOM = React.createElement(
                "p",
                null,
                modalContentText
            );
            if (isContentHtml) {
                _contentBodyDOM = React.createElement("p", { dangerouslySetInnerHTML: { __html: modalContentText } });
            }

            return React.createElement(
                "div",
                { className: "modal-body" },
                _contentBodyDOM
            );
        },
        "modalFooterDOM": function modalFooterDOM() {
            var _leftButtonDOM = null;

            if (!showLeftButton && !showRightButton) {
                return null;
            }

            if (showLeftButton) {
                _leftButtonDOM = React.createElement(document.kNextReactComponents.Button, {
                    tabIndex: 0,
                    className: "left-button",
                    buttonStyle: leftButtonStyle,
                    label: leftButtonText,
                    onClickWireUp: onLeftButtonClickWireUp
                });
            }

            var _rightButtonDOM = null;
            if (showRightButton) {
                _rightButtonDOM = React.createElement(document.kNextReactComponents.Button, {
                    tabIndex: 0,
                    className: "right-button",
                    buttonStyle: rightButtonStyle,
                    label: rightButtonText,
                    onClickWireUp: onRightButtonClickWireUp
                });
            }

            return React.createElement(
                "div",
                { className: "modal-footer" },
                _leftButtonDOM,
                _rightButtonDOM
            );
        }
    };

    return React.createElement(
        document.kNextReactComponents.Modal,
        {
            componentname: componentName,
            active: modalActive,
            title: modaltitle,
            showHeader: showHeader,
            showCancel: showCancel,
            className: className,
            centered: centered,
            padding: padding,
            onCloseModalClickWireUp: onCloseModalClickWireUp
        },
        domGenerator.modalBodyDOM(),
        domGenerator.modalFooterDOM()
    );
};;
"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

//NOTE: this is the updated version of the user info form configured to work with presentational inputs
//also removes reliance on react lifecycle methods that will be deprecated such as componentwillreceieveprops
document.LoadingModal = function (_React$Component) {
    _inherits(LoadingModal, _React$Component);

    _createClass(LoadingModal, null, [{
        key: "getDerivedStateFromProps",


        //this is how react interacts with redux, when redux store chagnes this will be called with the new store being passed as nextProps
        value: function getDerivedStateFromProps(nextProps, nextState) {

            //NOTE: setting extra things to the component state (i.e. loadingMessage) that is not being used (it is used as props instead)
            //can filter it out before setting it but there is no form in keeping it, and filtering is a performance cost
            if (nextProps !== null && (typeof nextProps === "undefined" ? "undefined" : _typeof(nextProps)) === "object") {
                return Globals.Utilities.createNewObjectFrom(nextProps);
            } else {
                //return null if the state hasn't changed
                return null;
            }
        }
    }, {
        key: "defaultProps",
        get: function get() {
            //copy and paste these from the page's store (i.e.in KnotiaAccountInfoDAL.js this case)
            //this MAPS exactly to this section in the global store (a duplicate of that). Read more on encapsulated components in the OneNote -> React Programmer's Guide -> Intro to React section
            return {
                modalActive: false
            };
        }
    }]);

    function LoadingModal(props) {
        _classCallCheck(this, LoadingModal);

        var _this = _possibleConstructorReturn(this, (LoadingModal.__proto__ || Object.getPrototypeOf(LoadingModal)).call(this, props));

        autobind(_this);

        _this.state = {};
        return _this;
    }

    _createClass(LoadingModal, [{
        key: "componentDidMount",
        value: function componentDidMount() {
            //call the parent's initial fetch to load data
            if (typeof this.props.componentLoadSuccessInitWireUp === "function") {
                this.props.componentLoadSuccessInitWireUp();
            }
        }
    }, {
        key: "render",
        value: function render() {

            return React.createElement(
                document.kNextReactComponents.Modal,
                {
                    active: this.props.modalActive,
                    showHeader: false,
                    className: "loading-modal",
                    closeModalWireUp: null,
                    makeBackgroundUnscrollableWhenActive: false
                },
                React.createElement("div", { className: "loading-spinner" })
            );
        }
    }]);

    return LoadingModal;
}(React.Component);;
"use strict";

document.kNextReactComponents.SimpleSelect = function (_ref) {
    var _ref$options = _ref.options,
        options = _ref$options === undefined ? {} : _ref$options,
        _ref$optionOrder = _ref.optionOrder,
        optionOrder = _ref$optionOrder === undefined ? [] : _ref$optionOrder,
        _ref$selectedOption = _ref.selectedOption,
        selectedOption = _ref$selectedOption === undefined ? null : _ref$selectedOption,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$disabled = _ref.disabled,
        disabled = _ref$disabled === undefined ? false : _ref$disabled,
        _ref$selectClassName = _ref.selectClassName,
        selectClassName = _ref$selectClassName === undefined ? "" : _ref$selectClassName,
        _ref$domRef = _ref.domRef,
        domRef = _ref$domRef === undefined ? null : _ref$domRef,
        _ref$onChangeWireUp = _ref.onChangeWireUp,
        onChangeWireUp = _ref$onChangeWireUp === undefined ? null : _ref$onChangeWireUp,
        _ref$onBlurWireUp = _ref.onBlurWireUp,
        onBlurWireUp = _ref$onBlurWireUp === undefined ? null : _ref$onBlurWireUp,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? "" : _ref$label,
        _ref$id = _ref.id,
        id = _ref$id === undefined ? "select" : _ref$id,
        _ref$name = _ref.name,
        name = _ref$name === undefined ? "name-for-select" : _ref$name,
        _ref$errorMessage = _ref.errorMessage,
        errorMessage = _ref$errorMessage === undefined ? "" : _ref$errorMessage,
        _ref$errorPositionRel = _ref.errorPositionRelativeToSelect,
        errorPositionRelativeToSelect = _ref$errorPositionRel === undefined ? ErrorPosition.AboveElement : _ref$errorPositionRel,
        _ref$hideBlankOption = _ref.hideBlankOption,
        hideBlankOption = _ref$hideBlankOption === undefined ? false : _ref$hideBlankOption,
        _ref$displayRedAsteri = _ref.displayRedAsterisk,
        displayRedAsterisk = _ref$displayRedAsteri === undefined ? false : _ref$displayRedAsteri;

    var eventHandler = {
        "handleSelectChange": function handleSelectChange(Event) {
            onChangeWireUp(Event.target.value);
        }
    };

    var domGenerator = {
        "errorMessageDOM": function errorMessageDOM() {
            if (errorMessage.length === 0) {
                return null;
            }

            return React.createElement(
                "div",
                { className: "error-message-container" },
                React.createElement(document.kNextReactComponents.Icon, {
                    iconClassName: "fa fa-exclamation-triangle",
                    additionalClasses: "error-icon",
                    ariaHidden: false
                }),
                React.createElement(
                    "span",
                    {
                        id: "error-for-" + name,
                        className: "input-error-message"
                    },
                    errorMessage
                )
            );
        },
        "labelDOM": function labelDOM() {
            if (label.length === 0) {
                return null;
            }

            var _redAsteriskDOM = null;
            if (displayRedAsterisk) {
                _redAsteriskDOM = React.createElement(
                    "span",
                    {
                        id: "asterisk-" + id,
                        key: "asterisk-" + id,
                        className: "red"
                    },
                    "*"
                );
            }

            return React.createElement(
                "label",
                {
                    htmlFor: "label-for-" + id,
                    className: "input-label",
                    "aria-label": label
                },
                _redAsteriskDOM,
                label
            );
        },
        "optionsDOM": function optionsDOM() {
            var _optionsDOM = [];

            if (!hideBlankOption) {
                _optionsDOM.push(React.createElement("option", {
                    key: "-1",
                    value: "",
                    hidden: true
                }));
            }

            var _optionOrder = optionOrder;
            if (_optionOrder.length === 0) {
                _optionOrder = Object.keys(options);
            }
            _optionOrder.forEach(function (_optionKey) {
                _optionsDOM.push(React.createElement(
                    "option",
                    {
                        key: _optionKey,
                        value: _optionKey
                    },
                    options[_optionKey]
                ));
            });

            return _optionsDOM;
        }
    };

    return React.createElement(
        "div",
        {
            className: "input-group simple-select dropdown " + className,
            componentname: "SimpleSelect"
        },
        domGenerator.labelDOM(),
        errorPositionRelativeToSelect === ErrorPosition.AboveElement ? domGenerator.errorMessageDOM() : null,
        React.createElement(
            "select",
            {
                id: id,
                name: name,
                "aria-label": label,
                className: selectClassName + " " + (errorMessage.length === 0 ? "" : "input-error"),
                value: selectedOption,
                onChange: eventHandler.handleSelectChange,
                onClick: onClickWireUp,
                onBlur: onBlurWireUp,
                disabled: disabled,
                ref: domRef
            },
            domGenerator.optionsDOM()
        ),
        errorPositionRelativeToSelect === ErrorPosition.BelowElement ? domGenerator.errorMessageDOM() : null
    );
};;
"use strict";

var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();

document.kNextReactComponents.IconSelect = function (_ref) {
    var _ref$options = _ref.options,
        options = _ref$options === undefined ? {} : _ref$options,
        _ref$optionOrder = _ref.optionOrder,
        optionOrder = _ref$optionOrder === undefined ? [] : _ref$optionOrder,
        _ref$selectedOption = _ref.selectedOption,
        selectedOption = _ref$selectedOption === undefined ? null : _ref$selectedOption,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? "" : _ref$label,
        _ref$id = _ref.id,
        id = _ref$id === undefined ? "select" : _ref$id,
        _ref$name = _ref.name,
        name = _ref$name === undefined ? "name-for-select" : _ref$name,
        _ref$errorMessage = _ref.errorMessage,
        errorMessage = _ref$errorMessage === undefined ? "" : _ref$errorMessage,
        _ref$errorPositionRel = _ref.errorPositionRelativeToSelect,
        errorPositionRelativeToSelect = _ref$errorPositionRel === undefined ? ErrorPosition.AboveElement : _ref$errorPositionRel,
        _ref$displayRedAsteri = _ref.displayRedAsterisk,
        displayRedAsterisk = _ref$displayRedAsteri === undefined ? false : _ref$displayRedAsteri;

    var _React$useState = React.useState(false),
        _React$useState2 = _slicedToArray(_React$useState, 2),
        dropdownExpandState = _React$useState2[0],
        setDropdownExpandState = _React$useState2[1];

    React.useEffect(function () {
        if (dropdownExpandState) {
            document.addEventListener("click", eventHandler.handleDocumentClick);
        }
        return function () {
            document.removeEventListener("click", eventHandler.handleDocumentClick);
        };
    }, [dropdownExpandState]);

    var eventHandler = {
        "handleDropdownClick": function handleDropdownClick(Key) {
            setDropdownExpandState(false);
            onClickWireUp(Key);
        },
        "handleDocumentClick": function handleDocumentClick() {
            setDropdownExpandState(false);
        }
    };

    var domGenerator = {
        "labelDOM": function labelDOM() {
            if (label.length === 0) {
                return null;
            }

            var _redAsteriskDOM = null;
            if (displayRedAsterisk) {
                _redAsteriskDOM = React.createElement(
                    "span",
                    {
                        id: "asterisk-" + id,
                        key: "asterisk-" + id,
                        className: "red"
                    },
                    "*"
                );
            }

            return React.createElement(
                "label",
                {
                    htmlFor: "label-for-" + id,
                    className: "input-label",
                    "aria-label": label
                },
                _redAsteriskDOM,
                label
            );
        },
        "errorMessageDOM": function errorMessageDOM() {
            if (errorMessage.length === 0) {
                return null;
            }

            return React.createElement(
                "div",
                { className: "error-message-container" },
                React.createElement(document.kNextReactComponents.Icon, {
                    iconClassName: "fa fa-exclamation-triangle",
                    additionalClasses: "error-icon",
                    ariaHidden: false
                }),
                React.createElement(
                    "span",
                    {
                        id: "error-for-" + name,
                        className: "input-error-message"
                    },
                    errorMessage
                )
            );
        },
        "selectedIconDOM": function selectedIconDOM() {
            return React.createElement(
                document.kNextReactComponents.Button,
                {
                    className: "selected-icon-button",
                    buttonStyle: ButtonStyle.Utility,
                    onClickWireUp: function onClickWireUp() {
                        return setDropdownExpandState(!dropdownExpandState);
                    }
                },
                React.createElement(
                    "div",
                    { className: "selected-icon-option" },
                    options[selectedOption].iconClassName ? React.createElement(document.kNextReactComponents.Icon, { iconClassName: "selected-icon fa " + options[selectedOption].iconClassName, tabIndex: -1 }) : null,
                    options[selectedOption].text
                ),
                React.createElement(document.kNextReactComponents.Icon, { iconClassName: dropdownExpandState ? "fas fa-angle-up" : "fas fa-angle-down", tabIndex: -1 })
            );
        },
        "iconSelectDropdownDOM": function iconSelectDropdownDOM() {
            var _optionsDOM = [];

            if (dropdownExpandState) {
                var _optionOrder = optionOrder;
                if (_optionOrder.length === 0) {
                    _optionOrder = Object.keys(options);
                }
                _optionOrder.forEach(function (_optionKey) {
                    var _options$_optionKey = options[_optionKey],
                        iconClassName = _options$_optionKey.iconClassName,
                        text = _options$_optionKey.text;

                    _optionsDOM.push(React.createElement(
                        document.kNextReactComponents.Button,
                        {
                            key: _optionKey,
                            className: "option-button",
                            buttonStyle: ButtonStyle.Utility,
                            onClickWireUp: function onClickWireUp() {
                                return eventHandler.handleDropdownClick(_optionKey);
                            } },
                        React.createElement(document.kNextReactComponents.Icon, { iconClassName: "fa " + iconClassName, tabIndex: -1 }),
                        text
                    ));
                });
            }
            return React.createElement(
                "div",
                { className: "icon-select-dropdown" },
                _optionsDOM
            );
        }
    };

    return React.createElement(
        "div",
        { className: "icon-select " + className },
        domGenerator.labelDOM(),
        errorPositionRelativeToSelect === ErrorPosition.AboveElement ? domGenerator.errorMessageDOM() : null,
        domGenerator.selectedIconDOM(),
        domGenerator.iconSelectDropdownDOM(),
        errorPositionRelativeToSelect === ErrorPosition.BelowElement ? domGenerator.errorMessageDOM() : null
    );
};;
"use strict";

document.kNextReactComponents.PanelBox = function (_ref) {
    var _ref$showButtons = _ref.showButtons,
        showButtons = _ref$showButtons === undefined ? false : _ref$showButtons,
        _ref$primaryButtonLab = _ref.primaryButtonLabel,
        primaryButtonLabel = _ref$primaryButtonLab === undefined ? "Primary" : _ref$primaryButtonLab,
        _ref$primaryButtonSty = _ref.primaryButtonStyle,
        primaryButtonStyle = _ref$primaryButtonSty === undefined ? ButtonStyle.Primary : _ref$primaryButtonSty,
        _ref$onPrimaryButtonC = _ref.onPrimaryButtonClickWireUp,
        onPrimaryButtonClickWireUp = _ref$onPrimaryButtonC === undefined ? null : _ref$onPrimaryButtonC,
        _ref$secondaryButtonL = _ref.secondaryButtonLabel,
        secondaryButtonLabel = _ref$secondaryButtonL === undefined ? "Secondary" : _ref$secondaryButtonL,
        _ref$secondaryButtonS = _ref.secondaryButtonStyle,
        secondaryButtonStyle = _ref$secondaryButtonS === undefined ? ButtonStyle.Utility : _ref$secondaryButtonS,
        _ref$secondaryButtonC = _ref.secondaryButtonClickWireUp,
        secondaryButtonClickWireUp = _ref$secondaryButtonC === undefined ? null : _ref$secondaryButtonC,
        _ref$secondaryButtonD = _ref.secondaryButtonDisabled,
        secondaryButtonDisabled = _ref$secondaryButtonD === undefined ? false : _ref$secondaryButtonD,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$contentID = _ref.contentID,
        contentID = _ref$contentID === undefined ? null : _ref$contentID,
        _ref$contentClassName = _ref.contentClassName,
        contentClassName = _ref$contentClassName === undefined ? null : _ref$contentClassName,
        _ref$contentRole = _ref.contentRole,
        contentRole = _ref$contentRole === undefined ? null : _ref$contentRole,
        _ref$children = _ref.children,
        children = _ref$children === undefined ? null : _ref$children;

    var domGenerator = {
        "buttonsDOM": function buttonsDOM() {
            if (!showButtons) {
                return null;
            }

            return React.createElement(
                "div",
                { className: "buttons-box" },
                React.createElement(document.kNextReactComponents.Button, {
                    label: primaryButtonLabel,
                    buttonStyle: primaryButtonStyle,
                    className: "primary",
                    onClickWireUp: onPrimaryButtonClickWireUp
                }),
                React.createElement(document.kNextReactComponents.Button, {
                    label: secondaryButtonLabel,
                    buttonStyle: secondaryButtonStyle,
                    className: "cancel",
                    onClickWireUp: secondaryButtonClickWireUp,
                    disabled: secondaryButtonDisabled
                })
            );
        }
    };

    return React.createElement(
        "div",
        {
            className: "panel-box " + className,
            componentname: "PanelBox"
        },
        React.createElement(
            "div",
            {
                id: contentID,
                className: "content " + contentClassName,
                role: contentRole
            },
            children
        ),
        domGenerator.buttonsDOM()
    );
};;
"use strict";

document.kNextReactComponents.TextInput = function (_ref) {
    var _ref$value = _ref.value,
        value = _ref$value === undefined ? "" : _ref$value,
        _ref$errorMessage = _ref.errorMessage,
        errorMessage = _ref$errorMessage === undefined ? "" : _ref$errorMessage,
        _ref$id = _ref.id,
        id = _ref$id === undefined ? null : _ref$id,
        _ref$name = _ref.name,
        name = _ref$name === undefined ? null : _ref$name,
        _ref$required = _ref.required,
        required = _ref$required === undefined ? true : _ref$required,
        _ref$maxLength = _ref.maxLength,
        maxLength = _ref$maxLength === undefined ? document.kNextReact['ComponentDefaults'].TextMaxLength : _ref$maxLength,
        _ref$minLength = _ref.minLength,
        minLength = _ref$minLength === undefined ? 0 : _ref$minLength,
        _ref$disabled = _ref.disabled,
        disabled = _ref$disabled === undefined ? false : _ref$disabled,
        _ref$readOnly = _ref.readOnly,
        readOnly = _ref$readOnly === undefined ? false : _ref$readOnly,
        _ref$canAutoComplete = _ref.canAutoComplete,
        canAutoComplete = _ref$canAutoComplete === undefined ? AriaAutoComplete.None : _ref$canAutoComplete,
        _ref$autoCorrect = _ref.autoCorrect,
        autoCorrect = _ref$autoCorrect === undefined ? false : _ref$autoCorrect,
        _ref$spellCheck = _ref.spellCheck,
        spellCheck = _ref$spellCheck === undefined ? false : _ref$spellCheck,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? "" : _ref$label,
        _ref$type = _ref.type,
        type = _ref$type === undefined ? 'text' : _ref$type,
        _ref$textInputRef = _ref.textInputRef,
        textInputRef = _ref$textInputRef === undefined ? null : _ref$textInputRef,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$placeholder = _ref.placeholder,
        placeholder = _ref$placeholder === undefined ? GetString('str_Component_defaultTextInput') : _ref$placeholder,
        _ref$onChangeWireUp = _ref.onChangeWireUp,
        onChangeWireUp = _ref$onChangeWireUp === undefined ? null : _ref$onChangeWireUp,
        _ref$onBlurWireUp = _ref.onBlurWireUp,
        onBlurWireUp = _ref$onBlurWireUp === undefined ? null : _ref$onBlurWireUp,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$onKeyDownWireUp = _ref.onKeyDownWireUp,
        onKeyDownWireUp = _ref$onKeyDownWireUp === undefined ? null : _ref$onKeyDownWireUp,
        _ref$onFocusWireUp = _ref.onFocusWireUp,
        onFocusWireUp = _ref$onFocusWireUp === undefined ? null : _ref$onFocusWireUp,
        _ref$ariaControls = _ref.ariaControls,
        ariaControls = _ref$ariaControls === undefined ? null : _ref$ariaControls,
        _ref$ariaActiveDescen = _ref.ariaActiveDescendant,
        ariaActiveDescendant = _ref$ariaActiveDescen === undefined ? null : _ref$ariaActiveDescen,
        _ref$positionOfErrorM = _ref.positionOfErrorMessage,
        positionOfErrorMessage = _ref$positionOfErrorM === undefined ? "" : _ref$positionOfErrorM,
        _ref$displayRedAsteri = _ref.displayRedAsterisk,
        displayRedAsterisk = _ref$displayRedAsteri === undefined ? false : _ref$displayRedAsteri,
        _ref$encodeValue = _ref.encodeValue,
        encodeValue = _ref$encodeValue === undefined ? false : _ref$encodeValue;

    var eventHandler = {
        "handleInputChange": function handleInputChange(Event) {
            if (typeof onChangeWireUp === "function") {
                if (encodeValue) {
                    onChangeWireUp(Globals.Utilities.htmlEncode(Event.target.value));
                } else {
                    onChangeWireUp(Event.target.value);
                }
            }
        }
    };

    var domGenerator = {
        "labelDOM": function labelDOM() {
            if (Globals.Utilities.isUndefinedOrNull(label) || label.length === 0) {
                return null;
            }

            var _redAsteriskDOM = null;
            if (displayRedAsterisk) {
                _redAsteriskDOM = React.createElement(
                    "span",
                    {
                        id: "asterisk-" + name,
                        className: "red"
                    },
                    "*"
                );
            }

            return React.createElement(
                "label",
                {
                    id: "label-for-" + name,
                    htmlFor: name,
                    className: "input-label",
                    "aria-label": label
                },
                _redAsteriskDOM,
                label
            );
        }
    };

    var _positionClassName = "";
    switch (positionOfErrorMessage) {
        case TextInputErrorMessagePosition.Bottom:
            _positionClassName = "input-bottom";
            break;
        case TextInputErrorMessagePosition.Right:
            _positionClassName = "input-right";
            break;
        case TextInputErrorMessagePosition.Above:
            _positionClassName = "input-above";
            break;
        case TextInputErrorMessagePosition.Left:
            _positionClassName = "input-left";
            break;
        default:
            break;
    }

    var _ariaInputLabel = name;
    if (errorMessage.length > 0) {
        _ariaInputLabel = name + " " + GetString("str_Aria_inputErrorConjunction") + " " + errorMessage;
    }

    return React.createElement(
        "div",
        {
            className: "input-box text " + _positionClassName,
            componentname: "TextInput"
        },
        domGenerator.labelDOM(),
        React.createElement("input", {
            ref: textInputRef,
            id: Globals.Utilities.isUndefinedOrNull(id) ? name : id,
            type: type,
            name: name,
            className: "input " + className + " " + (errorMessage.length === 0 ? "" : "input-error"),
            value: encodeValue ? Globals.Utilities.htmlDecode(value) : value,
            maxLength: maxLength,
            minLength: minLength,
            placeholder: placeholder,
            disabled: disabled,
            readOnly: readOnly,
            autoComplete: canAutoComplete ? "list" : "none",
            autoCorrect: autoCorrect ? "on" : "off",
            spellCheck: spellCheck.toString(),

            onChange: eventHandler.handleInputChange,
            onFocus: onFocusWireUp,
            onClick: onClickWireUp,
            onKeyDown: onKeyDownWireUp,
            onBlur: onBlurWireUp,

            "aria-controls": ariaControls,
            "aria-activedescendant": ariaActiveDescendant,
            "aria-required": required,
            "aria-invalid": errorMessage.length > 0,
            "aria-placeholder": placeholder,
            "aria-multiline": false,
            "aria-readonly": readOnly,
            "aria-disabled": disabled,
            "aria-autocomplete": canAutoComplete,
            "aria-label": _ariaInputLabel,
            "aria-errormessage": "error-for-" + name,
            "aria-describedby": "error-for-" + name,
            title: value.length === 0 ? placeholder : ""
        }),
        React.createElement(
            "div",
            { className: "error-message-container" },
            React.createElement(document.kNextReactComponents.Icon, {
                iconClassName: "fa fa-exclamation-triangle",
                additionalClasses: "error-icon " + (errorMessage.length === 0 ? "hidden" : ""),
                ariaHidden: errorMessage.length === 0
            }),
            React.createElement(
                "span",
                {
                    id: "error-for-" + name,
                    className: "input-error-message"
                },
                errorMessage
            )
        )
    );
};;
"use strict";

document.kNextReactComponents.FilterTextBox = function (_ref) {
    var _ref$containerClassNa = _ref.containerClassName,
        containerClassName = _ref$containerClassNa === undefined ? "" : _ref$containerClassNa,
        _ref$leftIconClass = _ref.leftIconClass,
        leftIconClass = _ref$leftIconClass === undefined ? null : _ref$leftIconClass,
        _ref$rightIconClass = _ref.rightIconClass,
        rightIconClass = _ref$rightIconClass === undefined ? null : _ref$rightIconClass,
        _ref$value = _ref.value,
        value = _ref$value === undefined ? "" : _ref$value,
        _ref$errorMessage = _ref.errorMessage,
        errorMessage = _ref$errorMessage === undefined ? "" : _ref$errorMessage,
        _ref$id = _ref.id,
        id = _ref$id === undefined ? null : _ref$id,
        _ref$name = _ref.name,
        name = _ref$name === undefined ? null : _ref$name,
        _ref$required = _ref.required,
        required = _ref$required === undefined ? true : _ref$required,
        _ref$maxLength = _ref.maxLength,
        maxLength = _ref$maxLength === undefined ? document.kNextReact['ComponentDefaults'].TextMaxLength : _ref$maxLength,
        _ref$minLength = _ref.minLength,
        minLength = _ref$minLength === undefined ? 0 : _ref$minLength,
        _ref$disabled = _ref.disabled,
        disabled = _ref$disabled === undefined ? false : _ref$disabled,
        _ref$readOnly = _ref.readOnly,
        readOnly = _ref$readOnly === undefined ? false : _ref$readOnly,
        _ref$label = _ref.label,
        label = _ref$label === undefined ? "" : _ref$label,
        _ref$type = _ref.type,
        type = _ref$type === undefined ? 'text' : _ref$type,
        _ref$textInputRef = _ref.textInputRef,
        textInputRef = _ref$textInputRef === undefined ? null : _ref$textInputRef,
        _ref$inputClassName = _ref.inputClassName,
        inputClassName = _ref$inputClassName === undefined ? "" : _ref$inputClassName,
        _ref$placeholder = _ref.placeholder,
        placeholder = _ref$placeholder === undefined ? GetString('str_Component_defaultTextInput') : _ref$placeholder,
        _ref$onChangeWireUp = _ref.onChangeWireUp,
        onChangeWireUp = _ref$onChangeWireUp === undefined ? null : _ref$onChangeWireUp,
        _ref$onBlurWireUp = _ref.onBlurWireUp,
        onBlurWireUp = _ref$onBlurWireUp === undefined ? null : _ref$onBlurWireUp,
        _ref$onClickWireUp = _ref.onClickWireUp,
        onClickWireUp = _ref$onClickWireUp === undefined ? null : _ref$onClickWireUp,
        _ref$onKeyDownWireUp = _ref.onKeyDownWireUp,
        onKeyDownWireUp = _ref$onKeyDownWireUp === undefined ? null : _ref$onKeyDownWireUp,
        _ref$onFocusWireUp = _ref.onFocusWireUp,
        onFocusWireUp = _ref$onFocusWireUp === undefined ? null : _ref$onFocusWireUp,
        _ref$positionOfErrorM = _ref.positionOfErrorMessage,
        positionOfErrorMessage = _ref$positionOfErrorM === undefined ? "" : _ref$positionOfErrorM,
        _ref$encodeValue = _ref.encodeValue,
        encodeValue = _ref$encodeValue === undefined ? false : _ref$encodeValue,
        _ref$onRightIconClick = _ref.onRightIconClickWireUp,
        onRightIconClickWireUp = _ref$onRightIconClick === undefined ? null : _ref$onRightIconClick;

    var domGenerator = {
        "rightIconDOM": function rightIconDOM() {
            if (Globals.Utilities.isUndefinedOrNull(rightIconClass)) {
                return null;
            }

            return React.createElement(document.kNextReactComponents.Icon, {
                iconClassName: rightIconClass,
                onClickWireUp: onRightIconClickWireUp,
                onKeyPressWireUp: function onKeyPressWireUp(Event) {
                    if (Event.key === 'Enter') {
                        onRightIconClickWireUp();
                    }
                },
                additionalClasses: "text-input-right-icon"
            });
        },
        "leftIconDOM": function leftIconDOM() {
            if (Globals.Utilities.isUndefinedOrNull(leftIconClass)) {
                return null;
            }

            return React.createElement(document.kNextReactComponents.Icon, {
                iconClassName: leftIconClass,
                additionalClasses: "text-input-left-icon",
                tabIndex: -1
            });
        }
    };

    return React.createElement(
        "div",
        {
            className: "filter-text-box-container " + containerClassName,
            componentname: "FilterTextBox"
        },
        domGenerator.leftIconDOM(),
        React.createElement(document.kNextReactComponents.TextInput, {
            value: value,
            errorMessage: errorMessage,
            name: name,
            required: required,
            maxLength: maxLength,
            minLength: minLength,
            disabled: disabled,
            readOnly: readOnly,
            label: label,
            type: type,
            textInputRef: textInputRef,
            className: inputClassName,
            placeholder: placeholder,
            encodeValue: encodeValue,
            id: id,
            positionOfErrorMessage: positionOfErrorMessage,
            onChangeWireUp: onChangeWireUp,
            onBlurWireUp: onBlurWireUp,
            onClickWireUp: onClickWireUp,
            onKeyDownWireUp: onKeyDownWireUp,
            onFocusWireUp: onFocusWireUp
        }),
        domGenerator.rightIconDOM()
    );
};;
"use strict";

document.kNextReactComponents.Bubble = function (_ref) {
    var _ref$active = _ref.active,
        active = _ref$active === undefined ? false : _ref$active,
        _ref$showHeader = _ref.showHeader,
        showHeader = _ref$showHeader === undefined ? false : _ref$showHeader,
        _ref$title = _ref.title,
        title = _ref$title === undefined ? null : _ref$title,
        _ref$className = _ref.className,
        className = _ref$className === undefined ? "" : _ref$className,
        _ref$children = _ref.children,
        children = _ref$children === undefined ? null : _ref$children,
        _ref$showCloseIcon = _ref.showCloseIcon,
        showCloseIcon = _ref$showCloseIcon === undefined ? false : _ref$showCloseIcon,
        _ref$onCloseClickWire = _ref.onCloseClickWireUp,
        onCloseClickWireUp = _ref$onCloseClickWire === undefined ? null : _ref$onCloseClickWire;

    if (!active) {
        return null;
    }

    var domGenerator = {
        "headerDOM": function headerDOM() {
            var _headerDOM = null;
            if (showHeader && showCloseIcon) {
                _headerDOM = React.createElement(
                    "div",
                    { className: "bubble-header" },
                    React.createElement(
                        "span",
                        { className: "bubble-header-title" },
                        title
                    ),
                    React.createElement(
                        "div",
                        {
                            className: "close-icon-container",
                            tabIndex: 0,
                            onClick: onCloseClickWireUp,
                            onKeyDown: onCloseClickWireUp
                        },
                        React.createElement(document.kNextReactComponents.Icon, {
                            additionalClasses: "close-icon",
                            iconClassName: "far fa-times"
                        })
                    )
                );
            } else if (showHeader) {
                _headerDOM = React.createElement(
                    "div",
                    { className: "bubble-header" },
                    title
                );
            }

            return _headerDOM;
        }
    };

    return React.createElement(
        "div",
        { className: "bubble-container " + className, componentname: "Bubble" },
        React.createElement("div", { className: "bubble-background " + className }),
        React.createElement(
            "div",
            { className: "bubble-content " + className, tabIndex: 0 },
            domGenerator.headerDOM(),
            children
        )
    );
};;
"use strict";

document.kNextReactComponents.Tab = function (_ref) {
    var _ref$tabTitle = _ref.tabTitle,
        tabTitle = _ref$tabTitle === undefined ? "" : _ref$tabTitle,
        _ref$onTabClickWireUp = _ref.onTabClickWireUp,
        onTabClickWireUp = _ref$onTabClickWireUp === undefined ? null : _ref$onTabClickWireUp,
        _ref$tabIcon = _ref.tabIcon,
        tabIcon = _ref$tabIcon === undefined ? null : _ref$tabIcon,
        _ref$onCloseClickWire = _ref.onCloseClickWireUp,
        onCloseClickWireUp = _ref$onCloseClickWire === undefined ? null : _ref$onCloseClickWire,
        _ref$isSelected = _ref.isSelected,
        isSelected = _ref$isSelected === undefined ? false : _ref$isSelected;


    var eventHandler = {};

    return React.createElement(
        "div",
        {
            className: "" + (isSelected ? "tab main-panel-title selected" : "tab main-panel-title"),
            onClick: onTabClickWireUp
        },
        React.createElement(
            "div",
            null,
            tabIcon
        ),
        React.createElement(
            "div",
            null,
            tabTitle
        )
    );
};;
"use strict";

document.kNextReactComponents.TabGroup = function (_ref) {
    var _ref$tabList = _ref.tabList,
        tabList = _ref$tabList === undefined ? [] : _ref$tabList,
        _ref$selectedTab = _ref.selectedTab,
        selectedTab = _ref$selectedTab === undefined ? "" : _ref$selectedTab,
        _ref$onSelectTabWireU = _ref.onSelectTabWireUp,
        onSelectTabWireUp = _ref$onSelectTabWireU === undefined ? null : _ref$onSelectTabWireU;


    var domGenerator = {
        tabListDOM: function tabListDOM() {
            return tabList.map(function (tab, index) {
                var selectedTabLowerCase = selectedTab.toLowerCase();
                var tabLowerCase = tab.id.toLowerCase();
                var _isSelected = tabLowerCase == selectedTabLowerCase;

                return React.createElement(document.kNextReactComponents.Tab, {
                    tabTitle: tab.text,
                    isSelected: _isSelected,
                    onTabClickWireUp: function onTabClickWireUp() {
                        return onSelectTabWireUp(tab.id);
                    }
                });
            });
        }
    };

    return React.createElement(
        "div",
        { className: "tab-container" },
        domGenerator.tabListDOM()
    );
};;
/*! jQuery UI - v1.14.0 - 2024-08-05
* https://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright OpenJS Foundation and other contributors; Licensed MIT */

!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(V){V.ui=V.ui||{};V.ui.version="1.14.0";var n,s,k,x,o,a,r,l,h,i,E=0,N=Array.prototype.hasOwnProperty,c=Array.prototype.slice;V.cleanData=(n=V.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=V._data(i,"events"))&&e.remove&&V(i).triggerHandler("remove");n(t)}),V.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0],l=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=V.Widget),Array.isArray(e)&&(e=V.extend.apply(null,[{}].concat(e))),V.expr.pseudos[l.toLowerCase()]=function(t){return!!V.data(t,l)},V[r]=V[r]||{},s=V[r][t],n=V[r][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},V.extend(n,s,{version:e.version,_proto:V.extend({},e),_childConstructors:[]}),(o=new i).options=V.widget.extend({},o.options),V.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}a[e]="function"!=typeof s?s:function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}}),n.prototype=V.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:l}),s?(V.each(s._childConstructors,function(t,e){var i=e.prototype;V.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),V.widget.bridge(t,n),n},V.widget.extend=function(t){for(var e,i,s=c.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],N.call(s[n],e)&&void 0!==i&&(V.isPlainObject(i)?t[e]=V.isPlainObject(t[e])?V.widget.extend({},t[e],i):V.widget.extend({},i):t[e]=i);return t},V.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;V.fn[o]=function(i){var t="string"==typeof i,s=c.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=V.data(this,a);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V.data(this,a);t?(t.option(i||{}),t._init&&t._init()):V.data(this,a,new e(i,this))})),n}},V.Widget=function(){},V.Widget._childConstructors=[],V.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=V(e||this.defaultElement||this)[0],this.element=V(e),this.uuid=E++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=V(),this.hoverable=V(),this.focusable=V(),this.classesElementLookup={},e!==this&&(V.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=V(e.style?e.ownerDocument:e.document||e),this.window=V(this.document[0].defaultView||this.document[0].parentWindow)),this.options=V.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:V.noop,_create:V.noop,_init:V.noop,destroy:function(){var i=this;this._destroy(),V.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:V.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return V.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=V.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=V(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||V(),i=n.add?(function(){var i=[];n.element.each(function(t,e){V.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(V(i),{remove:"_untrackClassesElement"})}(),V(V.uniqueSort(i.get().concat(n.element.get())))):V(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=V.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;V.each(s.classesElementLookup,function(t,e){-1!==V.inArray(i.target,e)&&(s.classesElementLookup[t]=V(e.not(i.target).get()))}),this._off(V(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,e={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return e.element.toggleClass(this._classes(e),s),this},_on:function(n,o,t){var a,r=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=a=V(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),V.each(t,function(t,e){function i(){if(n||!0!==r.options.disabled&&!V(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||V.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),s=t[1]+r.eventNamespace,t=t[2];t?a.on(s,t,i):o.on(s,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=V(this.bindings.not(t).get()),this.focusable=V(this.focusable.not(t).get()),this.hoverable=V(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(V(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(V(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=V.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},V.each({show:"fadeIn",hide:"fadeOut"},function(o,a){V.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!V.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&V.effects&&V.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){V(this)[o](),i&&i.call(e[0]),t()})}}),V.widget;function C(t,e,i){return[parseFloat(t[0])*(h.test(t[0])?e/100:1),parseFloat(t[1])*(h.test(t[1])?i/100:1)]}function D(t,e){return parseInt(V.css(t,e),10)||0}function I(t){return null!=t&&t===t.window}k=Math.max,x=Math.abs,o=/left|center|right/,a=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,h=/%$/,i=V.fn.position,V.position={scrollbarWidth:function(){var t,e,i;return void 0!==s?s:(i=(e=V("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],V("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?V.position.scrollbarWidth():0,height:e?V.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=V(t||window),i=I(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?V(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},V.fn.position=function(u){var d,p,f,g,m,_,v,b,y,w,t,e;return u&&u.of?(_="string"==typeof(u=V.extend({},u)).of?V(document).find(u.of):V(u.of),v=V.position.getWithinInfo(u.within),b=V.position.getScrollInfo(v),y=(u.collision||"flip").split(" "),w={},e=9===(e=(t=_)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:I(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},_[0].preventDefault&&(u.at="left top"),p=e.width,f=e.height,m=V.extend({},g=e.offset),V.each(["my","at"],function(){var t,e,i=(u[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):a.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=a.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],u[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===u.at[0]?m.left+=p:"center"===u.at[0]&&(m.left+=p/2),"bottom"===u.at[1]?m.top+=f:"center"===u.at[1]&&(m.top+=f/2),d=C(w.at,p,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,t,a=V(this),r=a.outerWidth(),l=a.outerHeight(),e=D(this,"marginLeft"),s=D(this,"marginTop"),n=r+e+D(this,"marginRight")+b.width,o=l+s+D(this,"marginBottom")+b.height,h=V.extend({},m),c=C(w.my,a.outerWidth(),a.outerHeight());"right"===u.my[0]?h.left-=r:"center"===u.my[0]&&(h.left-=r/2),"bottom"===u.my[1]?h.top-=l:"center"===u.my[1]&&(h.top-=l/2),h.left+=c[0],h.top+=c[1],i={marginLeft:e,marginTop:s},V.each(["left","top"],function(t,e){V.ui.position[y[t]]&&V.ui.position[y[t]][e](h,{targetWidth:p,targetHeight:f,elemWidth:r,elemHeight:l,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:v,elem:a})}),u.using&&(t=function(t){var e=g.left-h.left,i=e+p-r,s=g.top-h.top,n=s+f-l,o={target:{element:_,left:g.left,top:g.top,width:p,height:f},element:{element:a,left:h.left,top:h.top,width:r,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<r&&x(e+i)<p&&(o.horizontal="center"),f<l&&x(s+n)<f&&(o.vertical="middle"),k(x(e),x(i))>k(x(s),x(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(V.extend(h,{using:t}))})):i.apply(this,arguments)},V.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,i=i.width,n=t.left-e.collisionPosition.marginLeft,o=s-n,a=n+e.collisionWidth-i-s;i<e.collisionWidth?0<o&&a<=0?t.left+=o-(t.left+o+e.collisionWidth-i-s):t.left=!(0<a&&o<=0)&&a<o?s+i-e.collisionWidth:s:0<o?t.left+=o:0<a?t.left-=a:t.left=k(t.left-n,t.left)},top:function(t,e){var i=e.within,i=i.isWindow?i.scrollTop:i.offset.top,s=e.within.height,n=t.top-e.collisionPosition.marginTop,o=i-n,a=n+e.collisionHeight-s-i;s<e.collisionHeight?0<o&&a<=0?t.top+=o-(t.top+o+e.collisionHeight-s-i):t.top=!(0<a&&o<=0)&&a<o?i+s-e.collisionHeight:i:0<o?t.top+=o:0<a?t.top-=a:t.top=k(t.top-n,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,o=t.left-e.collisionPosition.marginLeft,a=o-i,o=o+e.collisionWidth-n-i,r="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,l="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];a<0?((n=t.left+r+l+h+e.collisionWidth-n-s)<0||n<x(a))&&(t.left+=r+l+h):0<o&&(0<(s=t.left-e.collisionPosition.marginLeft+r+l+h-i)||x(s)<o)&&(t.left+=r+l+h)},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,i=i.isWindow?i.scrollTop:i.offset.top,o=t.top-e.collisionPosition.marginTop,a=o-i,o=o+e.collisionHeight-n-i,r="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,l="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];a<0?((n=t.top+r+l+h+e.collisionHeight-n-s)<0||n<x(a))&&(t.top+=r+l+h):0<o&&(0<(s=t.top-e.collisionPosition.marginTop+r+l+h-i)||x(s)<o)&&(t.top+=r+l+h)}},flipfit:{left:function(){V.ui.position.flip.left.apply(this,arguments),V.ui.position.fit.left.apply(this,arguments)},top:function(){V.ui.position.flip.top.apply(this,arguments),V.ui.position.fit.top.apply(this,arguments)}}};V.ui.position,V.extend(V.expr.pseudos,{data:V.expr.createPseudo(function(e){return function(t){return!!V.data(t,e)}})}),V.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var t,u=V,d={},W=d.toString,F=/^([\-+])=\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})([a-f0-9]{2})?/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),t[4]?(parseInt(t[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([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),t[4]?(parseInt(t[4]+t[4],16)/255).toFixed(2):1]}},{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]]}}],p=u.Color=function(t,e,i,s){return new u.Color.fn.parse(t,e,i,s)},f={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"}}}},R={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},g=u.each;function m(t){return null==t?t+"":"object"==typeof t?d[W.call(t)]||"object":typeof t}function _(t,e,i){var s=R[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),s.mod?(t+s.mod)%s.mod:Math.min(s.max,Math.max(0,t)))}function Y(s){var n=p(),o=n._rgba=[];return s=s.toLowerCase(),g(L,function(t,e){var i=e.re.exec(s),i=i&&e.parse(i),e=e.space||"rgba";if(i)return i=n[e](i),n[f[e].cache]=i[f[e].cache],o=n._rgba=i._rgba,!1}),o.length?("0,0,0,0"===o.join()&&u.extend(o,y.transparent),n):y[s]}function v(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}g(f,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),u.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){d["[object "+e+"]"]=e.toLowerCase()}),p.fn=u.extend(p.prototype,{parse:function(n,t,e,i){if(void 0===n)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=u(n).css(t),t=void 0);var o=this,s=m(n),a=this._rgba=[];return void 0!==t&&(n=[n,t,e,i],s="array"),"string"===s?this.parse(Y(n)||y._default):"array"===s?(g(f.rgba.props,function(t,e){a[e.idx]=_(n[e.idx],e)}),this):"object"===s?(n instanceof p?g(f,function(t,e){n[e.cache]&&(o[e.cache]=n[e.cache].slice())}):g(f,function(t,i){var s=i.cache;g(i.props,function(t,e){if(!o[s]&&i.to){if("alpha"===t||null==n[t])return;o[s]=i.to(o._rgba)}o[s][e.idx]=_(n[t],e,!0)}),o[s]&&u.inArray(null,o[s].slice(0,3))<0&&(null==o[s][3]&&(o[s][3]=1),i.from)&&(o._rgba=i.from(o[s]))}),this):void 0},is:function(t){var n=p(t),o=!0,a=this;return g(f,function(t,e){var i,s=n[e.cache];return s&&(i=a[e.cache]||e.to&&e.to(a._rgba)||[],g(e.props,function(t,e){if(null!=s[e.idx])return o=s[e.idx]===i[e.idx]})),o}),o},_space:function(){var i=[],s=this;return g(f,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,a){var t=(h=p(t))._space(),e=f[t],i=0===this.alpha()?p("transparent"):this,r=i[e.cache]||e.to(i._rgba),l=r.slice(),h=h[e.cache];return g(e.props,function(t,e){var i=e.idx,s=r[i],n=h[i],o=R[e.type]||{};null!==n&&(null===s?l[i]=n:(o.mod&&(o.mod/2<n-s?s+=o.mod:o.mod/2<s-n&&(s-=o.mod)),l[i]=_((n-s)*a+s,e)))}),this[t](l)},blend:function(t){var e,i,s;return 1===this._rgba[3]?this:(e=this._rgba.slice(),i=e.pop(),s=p(t)._rgba,p(u.map(e,function(t,e){return(1-i)*s[e]+i*t})))},toRgbaString:function(){var t="rgba(",e=u.map(this._rgba,function(t,e){return null!=t?t:2<e?1:0});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join(", ")+")"},toHslaString:function(){var t="hsla(",e=u.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),t=e&&e<3?Math.round(100*t)+"%":t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join(", ")+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+u.map(e,function(t){return("0"+(t||0).toString(16)).substr(-2)}).join("")},toString:function(){return this.toRgbaString()}}),p.fn.parse.prototype=p.fn,f.hsla.to=function(t){var e,i,s,n,o,a,r,l;return null==t[0]||null==t[1]||null==t[2]?[null,null,null,t[3]]:(e=t[0]/255,i=t[1]/255,s=t[2]/255,t=t[3],n=(l=Math.max(e,i,s))-(r=Math.min(e,i,s)),a=.5*(o=l+r),r=r===l?0:e===l?60*(i-s)/n+360:i===l?60*(s-e)/n+120:60*(e-i)/n+240,l=0==n?0:a<=.5?n/o:n/(2-o),[Math.round(r)%360,l,a,null==t?1:t])},f.hsla.from=function(t){var e,i,s;return null==t[0]||null==t[1]||null==t[2]?[null,null,null,t[3]]:(e=t[0]/360,s=t[1],i=t[3],s=2*(t=t[2])-(t=t<=.5?t*(1+s):t+s-t*s),[Math.round(255*v(s,t,e+1/3)),Math.round(255*v(s,t,e)),Math.round(255*v(s,t,e-1/3)),i])},g(f,function(r,t){var e=t.props,o=t.cache,a=t.to,l=t.from;p.fn[r]=function(t){var i,s,n;return a&&!this[o]&&(this[o]=a(this._rgba)),void 0===t?this[o].slice():(i=m(t),s="array"===i||"object"===i?t:arguments,n=this[o].slice(),g(e,function(t,e){t=s["object"===i?t:e.idx];null==t&&(t=n[e.idx]),n[e.idx]=_(t,e)}),l?((t=p(l(n)))[o]=n,t):p(n))},g(e,function(o,a){p.fn[o]||(p.fn[o]=function(t){var e=m(t),i="alpha"===o?this._hsla?"hsla":"rgba":r,s=this[i](),n=s[a.idx];return"undefined"===e?n:("function"===e&&(e=m(t=t.call(this,n))),null==t&&a.empty?this:("string"===e&&(e=F.exec(t))&&(t=n+parseFloat(e[2])*("+"===e[1]?1:-1)),s[a.idx]=t,this[i](s)))})})}),p.hook=function(t){t=t.split(" ");g(t,function(t,s){u.cssHooks[s]={set:function(t,e){var i;"transparent"===e||"string"===m(e)&&!(i=Y(e))||(e=(e=p(i||e)).toRgbaString()),t.style[s]=e}},u.fx.step[s]=function(t){t.colorInit||(t.start=p(t.elem,s),t.end=p(t.end),t.colorInit=!0),u.cssHooks[s].set(t.elem,t.start.transition(t.end,t.pos))}})},p.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),u.cssHooks.borderColor={expand:function(i){var s={};return g(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}};var B,j,q,K,U,X,$,G,Q,b,y=u.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"},w="ui-effects-",e="ui-effects-style",T="ui-effects-animated";function J(t){for(var e,i=t.ownerDocument.defaultView.getComputedStyle(t),s={},n=i.length;n--;)"string"==typeof i[e=i[n]]&&(s[e.replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]=i[e]);return s}function P(t,e,i,s){return t={effect:t=V.isPlainObject(t)?(e=t).effect:t},"function"==typeof(e=null==e?{}:e)&&(s=e,i=null,e={}),"number"!=typeof e&&!V.fx.speeds[e]||(s=i,i=e,e={}),"function"==typeof i&&(s=i,i=null),e&&V.extend(t,e),i=i||e.duration,t.duration=V.fx.off?0:"number"==typeof i?i:i in V.fx.speeds?V.fx.speeds[i]:V.fx.speeds._default,t.complete=s||e.complete,t}function M(t){return!t||"number"==typeof t||V.fx.speeds[t]||"string"==typeof t&&!V.effects.effect[t]||"function"==typeof t||"object"==typeof t&&!t.effect}function Z(t,e){var i=e.outerWidth(),e=e.outerHeight(),t=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,e,0];return{top:parseFloat(t[1])||0,right:"auto"===t[2]?i:parseFloat(t[2]),bottom:"auto"===t[3]?e:parseFloat(t[3]),left:parseFloat(t[4])||0}}V.effects={effect:{}},K=["add","remove","toggle"],U={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},V.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){V.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(u.style(t.elem,e,t.end),t.setAttr=!0)}}),V.effects.animateClass=function(n,t,e,i){var o=V.speed(t,e,i);return this.queue(function(){var i=V(this),t=i.attr("class")||"",e=(e=o.children?i.find("*").addBack():i).map(function(){return{el:V(this),start:J(this)}}),s=function(){V.each(K,function(t,e){n[e]&&i[e+"Class"](n[e])})};s(),e=e.map(function(){return this.end=J(this.el[0]),this.diff=function(t,e){var i,s,n={};for(i in e)s=e[i],t[i]===s||U[i]||!V.fx.step[i]&&isNaN(parseFloat(s))||(n[i]=s);return n}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=V.Deferred(),i=V.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),V.when.apply(V,e.get()).done(function(){s(),V.each(arguments,function(){var e=this.el;V.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(i[0])})})},V.fn.extend({addClass:(q=V.fn.addClass,function(t,e,i,s){return e?V.effects.animateClass.call(this,{add:t},e,i,s):q.apply(this,arguments)}),removeClass:(j=V.fn.removeClass,function(t,e,i,s){return 1<arguments.length?V.effects.animateClass.call(this,{remove:t},e,i,s):j.apply(this,arguments)}),toggleClass:(B=V.fn.toggleClass,function(t,e,i,s,n){return"boolean"==typeof e||void 0===e?i?V.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,n):B.apply(this,arguments):V.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,n){return V.effects.animateClass.call(this,{add:e,remove:t},i,s,n)}}),V.expr&&V.expr.pseudos&&V.expr.pseudos.animated&&(V.expr.pseudos.animated=(X=V.expr.pseudos.animated,function(t){return!!V(t).data(T)||X(t)})),!0===V.uiBackCompat&&V.extend(V.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(w+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;s<n;s++)null!==e[s]&&(i=t.data(w+e[s]),t.css(e[s],i))},setMode:function(t,e){return e="toggle"===e?t.is(":hidden")?"show":"hide":e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=V("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),i[0]!==n&&!V.contains(i[0],n)||V(n).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(V.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),V.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!V.contains(t[0],e)||V(e).trigger("focus")),t}}),V.extend(V.effects,{version:"1.14.0",define:function(t,e,i){return i||(i=e,e="effect"),V.effects.effect[t]=i,V.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){var s;return 0===e?{height:0,width:0,outerHeight:0,outerWidth:0}:(s="horizontal"!==i?(e||100)/100:1,i="vertical"!==i?(e||100)/100:1,{height:t.height()*i,width:t.width()*s,outerHeight:t.outerHeight()*i,outerWidth:t.outerWidth()*s})},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(e,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(e)||"",t.removeData(e)},mode:function(t,e){t=t.is(":hidden");return"toggle"===e&&(e=t?"show":"hide"),e=(t?"hide"===e:"show"===e)?"none":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}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=V("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(w+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=w+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){V.effects.restoreStyle(t),V.effects.removePlaceholder(t)},setTransition:function(s,t,n,o){return o=o||{},V.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(o[e]=i[0]*n+i[1])}),o}}),V.fn.extend({effect:function(){function t(t){var e=V(this),i=V.effects.mode(e,r)||o;e.data(T,!0),l.push(i),o&&("show"===i||i===o&&"hide"===i)&&e.show(),o&&"none"===i||V.effects.saveStyle(e),"function"==typeof t&&t()}var s=P.apply(this,arguments),n=V.effects.effect[s.effect],o=n.mode,e=s.queue,i=e||"fx",a=s.complete,r=s.mode,l=[];return V.fx.off||!n?r?this[r](s.duration,a):this.each(function(){a&&a.call(this)}):!1===e?this.each(t).each(h):this.queue(i,t).queue(i,h);function h(t){var e=V(this);function i(){"function"==typeof a&&a.call(e[0]),"function"==typeof t&&t()}s.mode=l.shift(),!0!==V.uiBackCompat||o?"none"===s.mode?(e[r](),i()):n.call(e[0],s,function(){e.removeData(T),V.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===r:"show"===r)?(e[r](),i()):n.call(e[0],s,i)}},show:(Q=V.fn.show,function(t){return M(t)?Q.apply(this,arguments):((t=P.apply(this,arguments)).mode="show",this.effect.call(this,t))}),hide:(G=V.fn.hide,function(t){return M(t)?G.apply(this,arguments):((t=P.apply(this,arguments)).mode="hide",this.effect.call(this,t))}),toggle:($=V.fn.toggle,function(t){return M(t)||"boolean"==typeof t?$.apply(this,arguments):((t=P.apply(this,arguments)).mode="toggle",this.effect.call(this,t))}),cssUnit:function(t){var i=this.css(t),s=[];return V.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):Z(this.css("clip"),this)},transfer:function(t,e){var i=V(this),s=V(t.to),n="fixed"===s.css("position"),o=V("body"),a=n?o.scrollTop():0,o=n?o.scrollLeft():0,r=s.offset(),r={top:r.top-a,left:r.left-o,height:s.innerHeight(),width:s.innerWidth()},s=i.offset(),l=V("<div class='ui-effects-transfer'></div>");l.appendTo("body").addClass(t.className).css({top:s.top-a,left:s.left-o,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(r,t.duration,t.easing,function(){l.remove(),"function"==typeof e&&e()})}}),V.fx.step.clip=function(t){t.clipInit||(t.start=V(t.elem).cssClip(),"string"==typeof t.end&&(t.end=Z(t.end,t.elem)),t.clipInit=!0),V(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},b={},V.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){b[t]=function(t){return Math.pow(t,e+2)}}),V.extend(b,{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;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),V.each(b,function(t,e){V.easing["easeIn"+t]=e,V.easing["easeOut"+t]=function(t){return 1-e(1-t)},V.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});var tt,et,S,it=V.effects,st=(V.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=V(this),n=t.direction||"up",o=s.cssClip(),a={clip:V.extend({},o)},r=V.effects.createPlaceholder(s);a.clip[i[n][0]]=a.clip[i[n][1]],"show"===t.mode&&(s.cssClip(a.clip),r&&r.css(V.effects.clipToBox(a)),a.clip=o),r&&r.animate(V.effects.clipToBox(a),t.duration,t.easing),s.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("bounce",function(t,e){var i,s,n=V(this),o=t.mode,a="hide"===o,o="show"===o,r=t.direction||"up",l=t.distance,h=t.times||5,c=2*h+(o||a?1:0),u=t.duration/c,d=t.easing,p="up"===r||"down"===r?"top":"left",f="up"===r||"left"===r,g=0,t=n.queue().length;for(V.effects.createPlaceholder(n),r=n.css(p),l=l||n["top"==p?"outerHeight":"outerWidth"]()/3,o&&((s={opacity:1})[p]=r,n.css("opacity",0).css(p,f?2*-l:2*l).animate(s,u,d)),a&&(l/=Math.pow(2,h-1)),(s={})[p]=r;g<h;g++)(i={})[p]=(f?"-=":"+=")+l,n.animate(i,u,d).animate(s,u,d),l=a?2*l:l/2;a&&((i={opacity:0})[p]=(f?"-=":"+=")+l,n.animate(i,u,d)),n.queue(e),V.effects.unshift(n,t,1+c)}),V.effects.define("clip","hide",function(t,e){var i={},s=V(this),n=t.direction||"vertical",o="both"===n,a=o||"horizontal"===n,o=o||"vertical"===n,n=s.cssClip();i.clip={top:o?(n.bottom-n.top)/2:n.top,right:a?(n.right-n.left)/2:n.right,bottom:o?(n.bottom-n.top)/2:n.bottom,left:a?(n.right-n.left)/2:n.left},V.effects.createPlaceholder(s),"show"===t.mode&&(s.cssClip(i.clip),i.clip=n),s.animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("drop","hide",function(t,e){var i,s=V(this),n="show"===t.mode,o=t.direction||"left",a="up"===o||"down"===o?"top":"left",o="up"===o||"left"===o?"-=":"+=",r="+="==o?"-=":"+=",l={opacity:0};V.effects.createPlaceholder(s),i=t.distance||s["top"==a?"outerHeight":"outerWidth"](!0)/2,l[a]=o+i,n&&(s.css(l),l[a]=r+i,l.opacity=1),s.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("explode","hide",function(t,e){var i,s,n,o,a,r,l=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=l,c=V(this),u="show"===t.mode,d=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/h),f=Math.ceil(c.outerHeight()/l),g=[];function m(){g.push(this),g.length===l*h&&(c.css({visibility:"visible"}),V(g).remove(),e())}for(i=0;i<l;i++)for(o=d.top+i*f,r=i-(l-1)/2,s=0;s<h;s++)n=d.left+s*p,a=s-(h-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:n+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}),V.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;V(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("fold","hide",function(e,t){var i=V(this),s=e.mode,n="show"===s,s="hide"===s,o=e.size||15,a=/([0-9]+)%/.exec(o),r=!!e.horizFirst?["right","bottom"]:["bottom","right"],l=e.duration/2,h=V.effects.createPlaceholder(i),c=i.cssClip(),u={clip:V.extend({},c)},d={clip:V.extend({},c)},p=[c[r[0]],c[r[1]]],f=i.queue().length;a&&(o=parseInt(a[1],10)/100*p[s?0:1]),u.clip[r[0]]=o,d.clip[r[0]]=o,d.clip[r[1]]=0,n&&(i.cssClip(d.clip),h&&h.css(V.effects.clipToBox(d)),d.clip=c),i.queue(function(t){h&&h.animate(V.effects.clipToBox(u),l,e.easing).animate(V.effects.clipToBox(d),l,e.easing),t()}).animate(u,l,e.easing).animate(d,l,e.easing).queue(t),V.effects.unshift(i,f,4)}),V.effects.define("highlight","show",function(t,e){var i=V(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),V.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("size",function(s,e){var n,i=V(this),t=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],a=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=s.mode,l="effect"!==r,h=s.scale||"both",c=s.origin||["middle","center"],u=i.css("position"),d=i.position(),p=V.effects.scaledDimensions(i),f=s.from||p,g=s.to||V.effects.scaledDimensions(i,0);V.effects.createPlaceholder(i),"show"===r&&(r=f,f=g,g=r),n={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==h&&"both"!==h||(n.from.y!==n.to.y&&(f=V.effects.setTransition(i,o,n.from.y,f),g=V.effects.setTransition(i,o,n.to.y,g)),n.from.x!==n.to.x&&(f=V.effects.setTransition(i,a,n.from.x,f),g=V.effects.setTransition(i,a,n.to.x,g))),"content"!==h&&"both"!==h||n.from.y!==n.to.y&&(f=V.effects.setTransition(i,t,n.from.y,f),g=V.effects.setTransition(i,t,n.to.y,g)),c&&(r=V.effects.getBaseline(c,p),f.top=(p.outerHeight-f.outerHeight)*r.y+d.top,f.left=(p.outerWidth-f.outerWidth)*r.x+d.left,g.top=(p.outerHeight-g.outerHeight)*r.y+d.top,g.left=(p.outerWidth-g.outerWidth)*r.x+d.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(t),a=a.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=V(this),e=V.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},e={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=V.effects.setTransition(t,o,n.from.y,i),e=V.effects.setTransition(t,o,n.to.y,e)),n.from.x!==n.to.x&&(i=V.effects.setTransition(t,a,n.from.x,i),e=V.effects.setTransition(t,a,n.to.x,e)),l&&V.effects.saveStyle(t),t.css(i),t.animate(e,s.duration,s.easing,function(){l&&V.effects.restoreStyle(t)})})),i.animate(g,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=i.offset();0===g.opacity&&i.css("opacity",f.opacity),l||(i.css("position","static"===u?"relative":u).offset(t),V.effects.saveStyle(i)),e()}})}),V.effects.define("scale",function(t,e){var i=V(this),s=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),i=V.extend(!0,{from:V.effects.scaledDimensions(i),to:V.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(i.from.opacity=1,i.to.opacity=0),V.effects.effect.size.call(this,i,e)}),V.effects.define("puff","hide",function(t,e){t=V.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});V.effects.effect.scale.call(this,t,e)}),V.effects.define("pulsate","show",function(t,e){var i=V(this),s=t.mode,n="show"===s,o=2*(t.times||5)+(n||"hide"===s?1:0),a=t.duration/o,r=0,l=1,s=i.queue().length;for(!n&&i.is(":visible")||(i.css("opacity",0).show(),r=1);l<o;l++)i.animate({opacity:r},a,t.easing),r=1-r;i.animate({opacity:r},a,t.easing),i.queue(e),V.effects.unshift(i,s,1+o)}),V.effects.define("shake",function(t,e){var i=1,s=V(this),n=t.direction||"left",o=t.distance||20,a=t.times||3,r=2*a+1,l=Math.round(t.duration/r),h="up"===n||"down"===n?"top":"left",n="up"===n||"left"===n,c={},u={},d={},p=s.queue().length;for(V.effects.createPlaceholder(s),c[h]=(n?"-=":"+=")+o,u[h]=(n?"+=":"-=")+2*o,d[h]=(n?"-=":"+=")+2*o,s.animate(c,l,t.easing);i<a;i++)s.animate(u,l,t.easing).animate(d,l,t.easing);s.animate(u,l,t.easing).animate(c,l/2,t.easing).queue(e),V.effects.unshift(s,p,1+r)}),V.effects.define("slide","show",function(t,e){var i,s,n=V(this),o={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,r=t.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r,c=t.distance||n["top"==l?"outerHeight":"outerWidth"](!0),u={};V.effects.createPlaceholder(n),i=n.cssClip(),s=n.position()[l],u[l]=(h?-1:1)*c+s,u.clip=n.cssClip(),u.clip[o[r][1]]=u.clip[o[r][0]],"show"===a&&(n.cssClip(u.clip),n.css(l,u[l]),u.clip=i,u[l]=s),n.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),it=!0===V.uiBackCompat?V.effects.define("transfer",function(t,e){V(this).transfer(t,e)}):it,V.ui.focusable=function(t,e){var i,s,n,o=t.nodeName.toLowerCase();return"area"===o?(n=(i=t.parentNode).name,!(!t.href||!n||"map"!==i.nodeName.toLowerCase())&&0<(i=V("img[usemap='#"+n+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(o)?(s=!t.disabled)&&(n=V(t).closest("fieldset")[0])&&(s=!n.disabled):s="a"===o&&t.href||e,s&&V(t).is(":visible")&&"visible"===V(t).css("visibility"))},V.extend(V.expr.pseudos,{focusable:function(t){return V.ui.focusable(t,null!=V.attr(t,"tabindex"))}}),V.ui.focusable,V.ui.formResetMixin={_formResetHandler:function(){var e=V(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");V.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=V(this.element.prop("form")),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(V.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},V.escapeSelector||(V.escapeSelector=function(t){return CSS.escape(t+"")}),V.fn.even&&V.fn.odd||V.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),V.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},V.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+CSS.escape(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},V.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=V(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:V(this[0].ownerDocument||document)},V.extend(V.expr.pseudos,{tabbable:function(t){var e=V.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&V.ui.focusable(t,i)}}),V.fn.extend({uniqueId:(tt=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++tt)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&V(this).removeAttr("id")})}}),V.widget("ui.accordion",{version:"1.14.0",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(t){return t.find("> li > :first-child").add(t.find("> :not(li)").filter(function(t){return t%2==0}))},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=V(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():V()}},_createIcons:function(){var t,e=this.options.icons;e&&(t=V("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+e.header),t.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,e.header)._addClass(t,null,e.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"===t?this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e)&&this._createIcons())},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=V.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(V(t.target).attr("tabIndex",-1),V(n).attr("tabIndex",0),V(n).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===V.ui.keyCode.UP&&t.ctrlKey&&V(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=V()):!1===t.active?this._activate(0):this.active.length&&!V.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=V()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=V(this),e=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",e)}).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(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=V(this).outerHeight(!0)}),this.headers.next().each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=V(this).is(":visible");t||V(this).show(),i=Math.max(i,V(this).css("height","").height()),t||V(this).hide()}).height(i))},_activate:function(t){t=this._findActive(t)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):V()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&V.each(t.split(" "),function(t,e){i[e]="_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 e=this.options,i=this.active,s=V(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():s.next(),r=i.next(),r={oldHeader:i,oldPanel:r,newHeader:o?V():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,r)||(e.active=!o&&this.headers.index(s),this.active=n?V():s,this._toggle(r),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),e.icons&&(a=i.children(".ui-accordion-header-icon"),this._removeClass(a,null,e.icons.activeHeader)._addClass(a,null,e.icons.header)),n)||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),e.icons&&(t=s.children(".ui-accordion-header-icon"),this._removeClass(t,null,e.icons.header)._addClass(t,null,e.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active"))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(V(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){function s(){o._toggleComplete(e)}var n,o=this,a=0,r=t.css("box-sizing"),l=t.length&&(!i.length||t.index()<i.index()),h=this.options.animate||{},l=l&&h.down||h,c=(c="string"==typeof l?l:c)||l.easing||h.easing,u=(u="number"==typeof l?l:u)||l.duration||h.duration;return i.length?t.length?(n=t.show().outerHeight(),i.animate(this.hideProps,{duration:u,easing:c,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:u,easing:c,complete:s,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?"content-box"===r&&(a+=e.now):"content"!==o.options.heightStyle&&(e.now=Math.round(n-i.outerHeight()-a),a=0)}})):i.animate(this.hideProps,u,c,s):t.animate(this.showProps,u,c,s)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),this._trigger("activate",null,t)}}),V.widget("ui.menu",{version:"1.14.0",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",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.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=V(t.target),i=V(this.document[0].activeElement);!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.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":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){V.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=V(t.target).closest(".ui-menu-item"),i=V(t.currentTarget),e[0]!==i[0])||i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=V(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case V.ui.keyCode.PAGE_UP:this.previousPage(t);break;case V.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case V.ui.keyCode.HOME:this._move("first","first",t);break;case V.ui.keyCode.END:this._move("last","last",t);break;case V.ui.keyCode.UP:this.previous(t);break;case V.ui.keyCode.DOWN:this.next(t);break;case V.ui.keyCode.LEFT:this.collapse(t);break;case V.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case V.ui.keyCode.ENTER:case V.ui.keyCode.SPACE:this._activate(t);break;case V.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),t=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=V(this),e=t.prev(),i=V("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(t,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=V(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),e=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(e,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!V.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(e=parseFloat(V.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(V.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-e-i,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s<e+t&&this.activeMenu.scrollTop(i+e-s+t))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_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(t){var e=V.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:V(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},i?0:this.delay)},_close:function(t){(t=t||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!V(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},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._menuItems(this.active.children(".ui-menu")).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},_menuItems:function(t){return(t||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(t,e,i){var s;(s=this.active?"first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").last():this.active[t+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(e=V(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=V(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||V(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var t=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return e.test(String.prototype.trim.call(V(this).children(".ui-menu-item-wrapper").text()))})}}),V.widget("ui.autocomplete",{version:"1.14.0",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,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&"true"===this.element.prop("contentEditable"),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)i=!1,this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault();else if(!s){var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){n?(n=!1,t.preventDefault()):this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=V("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent)&&/^mouse/.test(t.originalEvent.type)?(this.menu.blur(),this.document.one("mousemove",function(){V(t.target).trigger(t.originalEvent)})):(s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(i))},100)))},menuselect:function(t,e){var e=e.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.trigger("focus"),this.previous=i),!1!==this._trigger("select",t,{item:e})&&this._value(e.value),this.term=this._value(),this.close(t),this.selectedItem=e}}),this.liveRegion=V("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||V.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=(t=(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))&&t[0]?t:this.element.closest(".ui-front, dialog")).length?t:this.document[0].body},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(V.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=V.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(t){t=t&&this._normalize(t),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:V.map(t,function(t){return"string"==typeof t?{label:t,value:t}:V.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(V.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;V.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return V("<li>").append(V("<div>").text(e.label)).appendTo(t)},_move:function(t,e){this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur()):this.menu[t](e):this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),V.extend(V.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(V.ui.autocomplete.escapeRegex(e),"i");return V.grep(t,function(t){return i.test(t.label||t.value||t)})}}),V.widget("ui.autocomplete",V.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(e))},100))}}),V.ui.autocomplete,/ui-corner-([a-z]){2,6}/g);V.widget("ui.controlgroup",{version:"1.14.0",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var o=this,a=[];V.each(this.options.items,function(s,t){var e,n={};t&&("controlgroupLabel"===s?((e=o.element.find(t)).each(function(){var t=V(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),o._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),a=a.concat(e.get())):V.fn[s]&&(n=o["_"+s+"Options"]?o["_"+s+"Options"]("middle"):{classes:{}},o.element.find(t).each(function(){var t=V(this),e=t[s]("instance"),i=V.widget.extend({},n);"button"===s&&t.parent(".ui-spinner").length||((e=e||t[s]()[s]("instance"))&&(i.classes=o._resolveClassesValues(i.classes,e)),t[s](i),i=t[s]("widget"),V.data(i[0],"ui-controlgroup-data",e||t[s]("instance")),a.push(i[0]))})))}),this.childWidgets=V(V.uniqueSort(a)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=V(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,s){var n={};return V.each(i,function(t){var e=s.options.classes[t]||"",e=String.prototype.trim.call(e.replace(st,""));n[t]=(e+" "+i[t]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?this._callChildMethod(e?"disable":"enable"):this.refresh()},refresh:function(){var n,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),n=this.childWidgets,(n=this.options.onlyVisible?n.filter(":visible"):n).length&&(V.each(["first","last"],function(t,e){var i,s=n[e]().data("ui-controlgroup-data");s&&o["_"+s.widgetName+"Options"]?((i=o["_"+s.widgetName+"Options"](1===n.length?"only":e)).classes=o._resolveClassesValues(i.classes,s),s.element[s.widgetName](i)):o._updateCornerClass(n[e](),e)}),this._callChildMethod("refresh"))}}),V.widget("ui.checkboxradio",[V.ui.formResetMixin,{version:"1.14.0",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e=this._super()||{};return this._readType(),t=this.element.labels(),this.label=V(t[t.length-1]),this.label.length||V.error("No label found for checkboxradio widget"),this.originalLabel="",(t=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=t.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(e.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(e.disabled=t),e},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||V.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+CSS.escape(t)+"']";return t?(this.form.length?V(this.form[0].elements).filter(e):V(e).filter(function(){return 0===V(V(this).prop("form")).length})).not(this.element):V([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=V(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){"label"===t&&!e||(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e):this.refresh())},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=V("<span>"),this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),(t=this.iconSpace?t.not(this.iconSpace[0]):t).remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),V.ui.checkboxradio,V.widget("ui.button",{version:"1.14.0",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===V.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,e){var t="iconPosition"!==t,i=t?this.options.iconPosition:e,s="top"===i||"bottom"===i;this.icon?t&&this._removeClass(this.icon,null,this.options.icon):(this.icon=V("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),t&&this._addClass(this.icon,null,e),this._attachIcon(i),s?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(i))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=(void 0===t.showLabel?this.options:t).showLabel,i=(void 0===t.icon?this.options:t).icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace)&&this.iconSpace.remove()),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e)&&this.element.trigger("blur")},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!0===V.uiBackCompat&&(V.widget("ui.button",V.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"===t?this._super("showLabel",e):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments))}}),V.fn.button=(et=V.fn.button,function(i){var t="string"==typeof i,s=Array.prototype.slice.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=V(this).attr("type"),e=V.data(this,"ui-"+("checkbox"!==e&&"radio"!==e?"button":"checkboxradio"));return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for button widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on button prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V(this).attr("type"),t="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",e=V.data(this,"ui-"+t);e?(e.option(i||{}),e._init&&e._init()):"button"==t?et.call(V(this),i):V(this).checkboxradio(V.extend({icon:!1},i))})),n}),V.fn.buttonset=function(){return V.ui.controlgroup||V.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),V.ui.button;function nt(){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:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},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,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=ot(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function ot(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,at)}function at(){V.datepicker._isDisabledDatepicker((S.inline?S.dpDiv.parent():S.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function H(t,e){for(var i in V.extend(t,e),e)null==e[i]&&(t[i]=e[i])}V.extend(V.ui,{datepicker:{version:"1.14.0"}}),V.extend(nt.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return H(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s=t.nodeName.toLowerCase(),n="div"===s||"span"===s;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(i=this._newInst(V(t),n)).settings=V.extend({},e||{}),"input"===s?this._connectDatepicker(t,i):n&&this._inlineDatepicker(t,i)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?ot(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=V(t);e.append=V([]),e.trigger=V([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),V.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s=this._get(e,"appendText"),n=this._get(e,"isRTL");e.append&&e.append.remove(),s&&(e.append=V("<span>").addClass(this._appendClass).text(s),t[n?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(s=this._get(e,"showOn"))&&"both"!==s||t.on("focus",this._showDatepicker),"button"!==s&&"both"!==s||(s=this._get(e,"buttonText"),i=this._get(e,"buttonImage"),this._get(e,"buttonImageOnly")?e.trigger=V("<img>").addClass(this._triggerClass).attr({src:i,alt:s,title:s}):(e.trigger=V("<button type='button'>").addClass(this._triggerClass),i?e.trigger.html(V("<img>").attr({src:i,alt:s,title:s})):e.trigger.text(s)),t[n?"before":"after"](e.trigger),e.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===t[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==t[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){var e,i,s,n,o,a;this._get(t,"autoSize")&&!t.inline&&(o=new Date(2009,11,20),(a=this._get(t,"dateFormat")).match(/[DM]/)&&(o.setMonth((e=function(t){for(n=s=i=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s})(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length))},_inlineDatepicker:function(t,e){var i=V(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),V.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,s,n){var o,a=this._dialogInst;return a||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(a=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",a)),H(a.settings,s||{}),e=e&&e.constructor===Date?this._formatDate(a,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,e=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+e,s/2-150+n]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),a.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",a),this},_destroyDatepicker:function(t){var e,i=V(t),s=V.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),V.removeData(t,"datepicker"),"input"===e?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),V.datepicker._hideDatepicker(),S===s)&&(S=null,this._curInst=null)},_enableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((s=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((s=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(t)for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return V.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s,n,o=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?V.extend({},V.datepicker._defaults):o?"all"===e?V.extend({},o.settings):this._get(o,e):null;s=e||{},"string"==typeof e&&((s={})[e]=i),o&&(this._curInst===o&&this._hideDatepicker(),e=this._getDateDatepicker(t,!0),i=this._getMinMaxDate(o,"min"),n=this._getMinMaxDate(o,"max"),H(o.settings,s),null!==i&&void 0!==s.dateFormat&&void 0===s.minDate&&(o.settings.minDate=this._formatDate(o,i)),null!==n&&void 0!==s.dateFormat&&void 0===s.maxDate&&(o.settings.maxDate=this._formatDate(o,n)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(V(t),o),this._autoSize(o),this._setDate(o,e),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){t=this._getInst(t);t&&this._updateDatepicker(t)},_setDateDatepicker:function(t,e){t=this._getInst(t);t&&(this._setDate(t,e),this._updateDatepicker(t),this._updateAlternate(t))},_getDateDatepicker:function(t,e){t=this._getInst(t);return t&&!t.inline&&this._setDateFromField(t,e),t?this._getDate(t):null},_doKeyDown:function(t){var e,i,s=V.datepicker._getInst(t.target),n=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,V.datepicker._datepickerShowing)switch(t.keyCode){case 9:V.datepicker._hideDatepicker(),n=!1;break;case 13:return(i=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",s.dpDiv))[0]&&V.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,i[0]),(i=V.datepicker._get(s,"onSelect"))?(e=V.datepicker._formatDate(s),i.apply(s.input?s.input[0]:null,[e,s])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&V.datepicker._clearDate(t.target),n=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&V.datepicker._gotoToday(t.target),n=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?1:-1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,-7,"D"),n=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?-1:1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,7,"D"),n=t.ctrlKey||t.metaKey;break;default:n=!1}else 36===t.keyCode&&t.ctrlKey?V.datepicker._showDatepicker(this):n=!1;n&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i=V.datepicker._getInst(t.target);if(V.datepicker._get(i,"constrainInput"))return i=V.datepicker._possibleChars(V.datepicker._get(i,"dateFormat")),e=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||e<" "||!i||-1<i.indexOf(e)},_doKeyUp:function(t){t=V.datepicker._getInst(t.target);if(t.input.val()!==t.lastVal)try{V.datepicker.parseDate(V.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,V.datepicker._getFormatConfig(t))&&(V.datepicker._setDateFromField(t),V.datepicker._updateAlternate(t),V.datepicker._updateDatepicker(t))}catch(t){}return!0},_showDatepicker:function(t){var e,i,s,n;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=V("input",t.parentNode)[0]),V.datepicker._isDisabledDatepicker(t)||V.datepicker._lastInput===t||(n=V.datepicker._getInst(t),V.datepicker._curInst&&V.datepicker._curInst!==n&&(V.datepicker._curInst.dpDiv.stop(!0,!0),n)&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0]),!1===(i=(i=V.datepicker._get(n,"beforeShow"))?i.apply(t,[t,n]):{}))||(H(n.settings,i),n.lastVal=null,V.datepicker._lastInput=t,V.datepicker._setDateFromField(n),V.datepicker._inDialog&&(t.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(t),V.datepicker._pos[1]+=t.offsetHeight),e=!1,V(t).parents().each(function(){return!(e|="fixed"===V(this).css("position"))}),i={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(n),i=V.datepicker._checkOffset(n,i,e),n.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":e?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"}),n.inline)||(i=V.datepicker._get(n,"showAnim"),s=V.datepicker._get(n,"duration"),n.dpDiv.css("z-index",function(t){for(var e;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(e=parseInt(t.css("zIndex"),10),!isNaN(e))&&0!==e)return e;t=t.parent()}return 0}(V(t))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[i]?n.dpDiv.show(i,V.datepicker._get(n,"showOptions"),s):n.dpDiv[i||"show"](i?s:null),V.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),V.datepicker._curInst=n)},_updateDatepicker:function(t){this.maxRows=4,(S=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),s=i[1],n=t.dpDiv.find("."+this._dayOverClass+" a"),o=V.datepicker._get(t,"onUpdateDatepicker");0<n.length&&at.apply(n.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t.yearshtml),e=t.yearshtml=null},0)),o&&o.apply(t.input?t.input[0]:null,[t])},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,r=document.documentElement.clientWidth+(i?0:V(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:V(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-o:0,e.left-=i&&e.left===t.input.offset().left?V(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+a?V(document).scrollTop():0,e.left-=Math.min(e.left,r<e.left+s&&s<r?Math.abs(e.left+s-r):0),e.top-=Math.min(e.top,l<e.top+n&&n<l?Math.abs(n+a):0),e},_findPos:function(t){for(var e=this._getInst(t),i=this._get(e,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||V.expr.pseudos.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return[(e=V(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,s=this._curInst;!s||t&&s!==V.data(t,"datepicker")||this._datepickerShowing&&(t=this._get(s,"showAnim"),i=this._get(s,"duration"),e=function(){V.datepicker._tidyDialog(s)},V.effects&&V.effects.effect[t]?s.dpDiv.hide(t,V.datepicker._get(s,"showOptions"),i,e):s.dpDiv["slideDown"===t?"slideUp":"fadeIn"===t?"fadeOut":"hide"](t?i:null,e),t||e(),this._datepickerShowing=!1,(i=this._get(s,"onClose"))&&i.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI)&&(V.unblockUI(),V("body").append(this.dpDiv)),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){var e;V.datepicker._curInst&&(t=V(t.target),e=V.datepicker._getInst(t[0]),!(t[0].id===V.datepicker._mainDivId||0!==t.parents("#"+V.datepicker._mainDivId).length||t.hasClass(V.datepicker.markerClassName)||t.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)||t.hasClass(V.datepicker.markerClassName)&&V.datepicker._curInst!==e)&&V.datepicker._hideDatepicker()},_adjustDate:function(t,e,i){var t=V(t),s=this._getInst(t[0]);this._isDisabledDatepicker(t[0])||(this._adjustInstDate(s,e,i),this._updateDatepicker(s))},_gotoToday:function(t){var e,t=V(t),i=this._getInst(t[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(e=new Date,i.selectedDay=e.getDate(),i.drawMonth=i.selectedMonth=e.getMonth(),i.drawYear=i.selectedYear=e.getFullYear()),this._notifyChange(i),this._adjustDate(t)},_selectMonthYear:function(t,e,i){var t=V(t),s=this._getInst(t[0]);s["selected"+("M"===i?"Month":"Year")]=s["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(t)},_selectDay:function(t,e,i,s){var n=V(t);V(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(n[0])||((n=this._getInst(n[0])).selectedDay=n.currentDay=parseInt(V("a",s).attr("data-date")),n.selectedMonth=n.currentMonth=e,n.selectedYear=n.currentYear=i,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){t=V(t);this._selectDate(t,"")},_selectDate:function(t,e){var i,t=V(t),t=this._getInst(t[0]);e=null!=e?e:this._formatDate(t),t.input&&t.input.val(e),this._updateAlternate(t),(i=this._get(t,"onSelect"))?i.apply(t.input?t.input[0]:null,[e,t]):t.input&&t.input.trigger("change"),t.inline?this._updateDatepicker(t):(this._hideDatepicker(),this._lastInput=t.input[0],"object"!=typeof t.input[0]&&t.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,s=this._get(t,"altField");s&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),e=this._getDate(t),i=this.formatDate(i,e,this._getFormatConfig(t)),V(document).find(s).val(i))},noWeekends:function(t){t=t.getDay();return[0<t&&t<6,""]},iso8601Week:function(t){var e,t=new Date(t.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),e=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((e-t)/864e5)/7)+1},parseDate:function(e,n,t){if(null==e||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;for(var i,s,o=0,a=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,a="string"!=typeof a?a:(new Date).getFullYear()%100+parseInt(a,10),r=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,l=(t?t.dayNames:null)||this._defaults.dayNames,h=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,c=(t?t.monthNames:null)||this._defaults.monthNames,u=-1,d=-1,p=-1,f=-1,g=!1,m=function(t){t=y+1<e.length&&e.charAt(y+1)===t;return t&&y++,t},_=function(t){var e=m(t),e="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,t=new RegExp("^\\d{"+("y"===t?e:1)+","+e+"}"),e=n.substring(o).match(t);if(e)return o+=e[0].length,parseInt(e[0],10);throw"Missing number at position "+o},v=function(t,e,i){var s=-1,t=V.map(m(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(V.each(t,function(t,e){var i=e[1];if(n.substr(o,i.length).toLowerCase()===i.toLowerCase())return s=e[0],o+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+o},b=function(){if(n.charAt(o)!==e.charAt(y))throw"Unexpected literal at position "+o;o++},y=0;y<e.length;y++)if(g)"'"!==e.charAt(y)||m("'")?b():g=!1;else switch(e.charAt(y)){case"d":p=_("d");break;case"D":v("D",r,l);break;case"o":f=_("o");break;case"m":d=_("m");break;case"M":d=v("M",h,c);break;case"y":u=_("y");break;case"@":u=(s=new Date(_("@"))).getFullYear(),d=s.getMonth()+1,p=s.getDate();break;case"!":u=(s=new Date((_("!")-this._ticksTo1970)/1e4)).getFullYear(),d=s.getMonth()+1,p=s.getDate();break;case"'":m("'")?b():g=!0;break;default:b()}if(o<n.length&&(t=n.substr(o),!/^\s+/.test(t)))throw"Extra/unparsed characters found in date: "+t;if(-1===u?u=(new Date).getFullYear():u<100&&(u+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u<=a?0:-100)),-1<f)for(d=1,p=f;;){if(p<=(i=this._getDaysInMonth(u,d-1)))break;d++,p-=i}if((s=this._daylightSavingAdjust(new Date(u,d-1,p))).getFullYear()!==u||s.getMonth()+1!==d||s.getDate()!==p)throw"Invalid date";return s},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";function s(t,e,i){var s=""+e;if(c(t))for(;s.length<i;)s="0"+s;return s}function n(t,e,i,s){return(c(t)?s:i)[e]}var o,a=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,h=(i?i.monthNames:null)||this._defaults.monthNames,c=function(t){t=o+1<e.length&&e.charAt(o+1)===t;return t&&o++,t},u="",d=!1;if(t)for(o=0;o<e.length;o++)if(d)"'"!==e.charAt(o)||c("'")?u+=e.charAt(o):d=!1;else switch(e.charAt(o)){case"d":u+=s("d",t.getDate(),2);break;case"D":u+=n("D",t.getDay(),a,r);break;case"o":u+=s("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=s("m",t.getMonth()+1,2);break;case"M":u+=n("M",t.getMonth(),l,h);break;case"y":u+=c("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":c("'")?u+="'":d=!0;break;default:u+=e.charAt(o)}return u},_possibleChars:function(e){for(var t="",i=!1,s=function(t){t=n+1<e.length&&e.charAt(n+1)===t;return t&&n++,t},n=0;n<e.length;n++)if(i)"'"!==e.charAt(n)||s("'")?t+=e.charAt(n):i=!1;else switch(e.charAt(n)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":s("'")?t+="'":i=!0;break;default:t+=e.charAt(n)}return t},_get:function(t,e){return(void 0!==t.settings[e]?t.settings:this._defaults)[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(r,t,e){var i,s=null==t||""===t?e:"string"==typeof t?function(t){try{return V.datepicker.parseDate(V.datepicker._get(r,"dateFormat"),t,V.datepicker._getFormatConfig(r))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?V.datepicker._getDate(r):null)||new Date,i=e.getFullYear(),s=e.getMonth(),n=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=o.exec(t);a;){switch(a[2]||"d"){case"d":case"D":n+=parseInt(a[1],10);break;case"w":case"W":n+=7*parseInt(a[1],10);break;case"m":case"M":s+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s))}a=o.exec(t)}return new Date(i,s,n)}(t):"number"==typeof t?isNaN(t)?e:(s=t,(i=new Date).setDate(i.getDate()+s),i):new Date(t.getTime());return(s=s&&"Invalid Date"===s.toString()?e:s)&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,e=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=e.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=e.getMonth(),t.drawYear=t.selectedYear=t.currentYear=e.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){V.datepicker._adjustDate(i,-e,"M")},next:function(){V.datepicker._adjustDate(i,+e,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(i)},selectDay:function(){return V.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(i,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,N,W,F,L,a,r,R,l,h,c,u,d,p,f,g,m,_,Y,v,b,B,y,j,q,w,k,x,C=new Date,K=this._daylightSavingAdjust(new Date(C.getFullYear(),C.getMonth(),C.getDate())),D=this._get(t,"isRTL"),C=this._get(t,"showButtonPanel"),I=this._get(t,"hideIfNoPrevNext"),T=this._get(t,"navigationAsDateFormat"),P=this._getNumberOfMonths(t),M=this._get(t,"showCurrentAtPos"),S=this._get(t,"stepMonths"),U=1!==P[0]||1!==P[1],H=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),z=this._getMinMaxDate(t,"min"),O=this._getMinMaxDate(t,"max"),A=t.drawMonth-M,E=t.drawYear;if(A<0&&(A+=12,E--),O)for(e=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth()-P[0]*P[1]+1,O.getDate())),e=z&&e<z?z:e;this._daylightSavingAdjust(new Date(E,A,1))>e;)--A<0&&(A=11,E--);for(t.drawMonth=A,t.drawYear=E,M=this._get(t,"prevText"),M=T?this.formatDate(M,this._daylightSavingAdjust(new Date(E,A-S,1)),this._getFormatConfig(t)):M,i=this._canAdjustMonth(t,-1,E,A)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:M}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(D?"e":"w")).text(M))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:M}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(D?"e":"w")).text(M))[0].outerHTML,M=this._get(t,"nextText"),M=T?this.formatDate(M,this._daylightSavingAdjust(new Date(E,A+S,1)),this._getFormatConfig(t)):M,s=this._canAdjustMonth(t,1,E,A)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:M}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(D?"w":"e")).text(M))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:M}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(D?"w":"e")).text(M))[0].outerHTML,S=this._get(t,"currentText"),I=this._get(t,"gotoCurrent")&&t.currentDay?H:K,S=T?this.formatDate(S,I,this._getFormatConfig(t)):S,M="",t.inline||(M=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),T="",C&&(T=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(D?M:"").append(this._isInRange(t,I)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(S):"").append(D?"":M)[0].outerHTML),n=parseInt(this._get(t,"firstDay"),10),n=isNaN(n)?0:n,o=this._get(t,"showWeek"),N=this._get(t,"dayNames"),W=this._get(t,"dayNamesMin"),F=this._get(t,"monthNames"),L=this._get(t,"monthNamesShort"),a=this._get(t,"beforeShowDay"),r=this._get(t,"showOtherMonths"),R=this._get(t,"selectOtherMonths"),l=this._getDefaultDate(t),h="",u=0;u<P[0];u++){for(d="",this.maxRows=4,p=0;p<P[1];p++){if(f=this._daylightSavingAdjust(new Date(E,A,t.selectedDay)),g=" ui-corner-all",m="",U){if(m+="<div class='ui-datepicker-group",1<P[1])switch(p){case 0:m+=" ui-datepicker-group-first",g=" ui-corner-"+(D?"right":"left");break;case P[1]-1:m+=" ui-datepicker-group-last",g=" ui-corner-"+(D?"left":"right");break;default:m+=" ui-datepicker-group-middle",g=""}m+="'>"}for(m+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+g+"'>"+(/all|left/.test(g)&&0===u?D?s:i:"")+(/all|right/.test(g)&&0===u?D?i:s:"")+this._generateMonthYearHeader(t,A,E,z,O,0<u||0<p,F,L)+"</div><table class='ui-datepicker-calendar'><thead><tr>",_=o?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",c=0;c<7;c++)_+="<th scope='col'"+(5<=(c+n+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+N[Y=(c+n)%7]+"'>"+W[Y]+"</span></th>";for(m+=_+"</tr></thead><tbody>",b=this._getDaysInMonth(E,A),E===t.selectedYear&&A===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,b)),v=(this._getFirstDayOfMonth(E,A)-n+7)%7,b=Math.ceil((v+b)/7),B=U&&this.maxRows>b?this.maxRows:b,this.maxRows=B,y=this._daylightSavingAdjust(new Date(E,A,1-v)),j=0;j<B;j++){for(m+="<tr>",q=o?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(y)+"</td>":"",c=0;c<7;c++)w=a?a.apply(t.input?t.input[0]:null,[y]):[!0,""],x=(k=y.getMonth()!==A)&&!R||!w[0]||z&&y<z||O&&O<y,q+="<td class='"+(5<=(c+n+6)%7?" ui-datepicker-week-end":"")+(k?" ui-datepicker-other-month":"")+(y.getTime()===f.getTime()&&A===t.selectedMonth&&t._keyEvent||l.getTime()===y.getTime()&&l.getTime()===f.getTime()?" "+this._dayOverClass:"")+(x?" "+this._unselectableClass+" ui-state-disabled":"")+(k&&!r?"":" "+w[1]+(y.getTime()===H.getTime()?" "+this._currentClass:"")+(y.getTime()===K.getTime()?" ui-datepicker-today":""))+"'"+(k&&!r||!w[2]?"":" title='"+w[2].replace(/'/g,"&#39;")+"'")+(x?"":" data-handler='selectDay' data-event='click' data-month='"+y.getMonth()+"' data-year='"+y.getFullYear()+"'")+">"+(k&&!r?"&#xa0;":x?"<span class='ui-state-default'>"+y.getDate()+"</span>":"<a class='ui-state-default"+(y.getTime()===K.getTime()?" ui-state-highlight":"")+(y.getTime()===H.getTime()?" ui-state-active":"")+(k?" ui-priority-secondary":"")+"' href='#' aria-current='"+(y.getTime()===H.getTime()?"true":"false")+"' data-date='"+y.getDate()+"'>"+y.getDate()+"</a>")+"</td>",y.setDate(y.getDate()+1),y=this._daylightSavingAdjust(y);m+=q+"</tr>"}11<++A&&(A=0,E++),d+=m+="</tbody></table>"+(U?"</div>"+(0<P[0]&&p===P[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}h+=d}return h+=T,t._keyEvent=!1,h},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f=this._get(t,"changeMonth"),g=this._get(t,"changeYear"),m=this._get(t,"showMonthAfterYear"),_=this._get(t,"selectMonthLabel"),v=this._get(t,"selectYearLabel"),b="<div class='ui-datepicker-title'>",y="";if(o||!f)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' aria-label='"+_+"' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=s.getMonth())&&(!h||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(m||(b+=y+(!o&&f&&g?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!g)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(a=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),d=(_=function(t){t=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(t)?u:t})(a[0]),p=Math.max(d,_(a[1]||"")),d=s?Math.max(d,s.getFullYear()):d,p=n?Math.min(p,n.getFullYear()):p,t.yearshtml+="<select class='ui-datepicker-year' aria-label='"+v+"' data-handler='selectYear' data-event='change'>";d<=p;d++)t.yearshtml+="<option value='"+d+"'"+(d===i?" selected='selected'":"")+">"+d+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),m&&(b+=(!o&&f&&g?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,e)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),i=i&&e<i?i:e;return t&&t<i?t:i},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){t=this._get(t,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),i=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&i.setDate(this._getDaysInMonth(i.getFullYear(),i.getMonth())),this._isInRange(t,i)},_isInRange:function(t,e){var i,s=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),o=null,a=null,t=this._get(t,"yearRange");return t&&(t=t.split(":"),i=(new Date).getFullYear(),o=parseInt(t[0],10),a=parseInt(t[1],10),t[0].match(/[+\-].*/)&&(o+=i),t[1].match(/[+\-].*/))&&(a+=i),(!s||e.getTime()>=s.getTime())&&(!n||e.getTime()<=n.getTime())&&(!o||e.getFullYear()>=o)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:"string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);s=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),s,this._getFormatConfig(t))}}),V.fn.datepicker=function(t){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var e=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]?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this].concat(e)):V.datepicker._attachDatepicker(this,t)})},V.datepicker=new nt,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.14.0";var z=!1;V(document).on("mouseup",function(){z=!1}),V.widget("ui.mouse",{version:"1.14.0",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===V.data(t.target,e.widgetName+".preventClickEvent"))return V.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){var e,i,s;if(!z)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),i=1===(this._mouseDownEvent=t).which,s="string"==typeof(e=this).options.cancel&&V(t.target).closest(this.options.cancel).length,i&&!s&&this._mouseCapture(t)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?t.preventDefault():(!0===V.data(t.target,this.widgetName+".preventClickEvent")&&V.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),z=!0)),!0},_mouseMove:function(t){if(this._mouseMoved&&!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t);return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&V.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,z=!1,t.preventDefault()},_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}}),V.ui.plugin={add:function(t,e,i){var s,n=V.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},V.widget("ui.draggable",V.ui.mouse,{version:"1.14.0",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&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<V(t.target).closest(".ui-resizable-handle").length||(this.handle=this._getHandle(t),!this.handle)||(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=V(this);return V("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=this.document[0].activeElement;V(t.target).closest(e).length||V(e).trigger("blur")},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),V.ui.ddmanager&&(V.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===V(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),V.ui.ddmanager&&!e.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),V.ui.ddmanager&&V.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new V.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return V.ui.ddmanager&&!this.options.dropBehaviour&&(i=V.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?V(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),V.ui.ddmanager&&V.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),V.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new V.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!V(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i="function"==typeof e.helper,t=i?V(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){var t,e;return"relative"!==this.cssPosition?{top:0,left:0}:(t=this.element.position(),e=this._isRootNode(this.scrollParent[0]),{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())})},_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 t,e=this.options,i=this.document[0];this.relativeContainer=null,e.containment?"window"===e.containment?this.containment=[V(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,V(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,V(window).scrollLeft()+V(window).width()-this.helperProportions.width-this.margins.left,V(window).scrollTop()+(V(window).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:"document"===e.containment?this.containment=[0,0,V(i).width()-this.helperProportions.width-this.margins.left,(V(i).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:e.containment.constructor===Array?this.containment=e.containment:("parent"===e.containment&&(e.containment=this.helper[0].parentNode),(e=(i=V(e.containment))[0])&&(t=/(scroll|auto)/.test(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),(t?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var t="absolute"===t?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*t+this.offset.parent.top*t-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*t,left:e.left+this.offset.relative.left*t+this.offset.parent.left*t-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*t}},_generatePosition:function(t,e){var i,s=this.options,n=this._isRootNode(this.scrollParent[0]),o=t.pageX,a=t.pageY;return n&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),{top:(a=e&&(this.containment&&(i=this.relativeContainer?(e=this.relativeContainer.offset(),[this.containment[0]+e.left,this.containment[1]+e.top,this.containment[2]+e.left,this.containment[3]+e.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(a=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3])&&(a=i[3]+this.offset.click.top),s.grid&&(e=s.grid[1]?this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,a=!i||e-this.offset.click.top>=i[1]||e-this.offset.click.top>i[3]?e:e-this.offset.click.top>=i[1]?e-s.grid[1]:e+s.grid[1],t=s.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,o=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-s.grid[0]:t+s.grid[0]),"y"===s.axis&&(o=this.originalPageX),"x"===s.axis)?this.originalPageY:a)-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),V.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),V.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),V.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=V.extend({},t,{item:i.element});i.sortables=[],V(i.options.connectToSortable).each(function(){var t=V(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=V.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,V.each(i.sortables,function(){var t=this;t.isOver?(i.cancelHelperRemoval=!(t.isOver=0),t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){V.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,V.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&V.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,V.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,V.each(n.sortables,function(){this.refreshPositions()}))})}}),V.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=V("body"),i=i.options;s.css("cursor")&&(i._cursor=s.css("cursor")),s.css("cursor",i.cursor)},stop:function(t,e,i){i=i.options;i._cursor&&V("body").css("cursor",i._cursor)}}),V.ui.plugin.add("draggable","opacity",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("opacity")&&(i._opacity=e.css("opacity")),e.css("opacity",i.opacity)},stop:function(t,e,i){i=i.options;i._opacity&&V(e.helper).css("opacity",i._opacity)}}),V.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY<s.scrollSensitivity?o.scrollTop=n=o.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(o.scrollTop=n=o.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+o.offsetWidth-t.pageX<s.scrollSensitivity?o.scrollLeft=n=o.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(o.scrollLeft=n=o.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-V(a).scrollTop()<s.scrollSensitivity?n=V(a).scrollTop(V(a).scrollTop()-s.scrollSpeed):V(window).height()-(t.pageY-V(a).scrollTop())<s.scrollSensitivity&&(n=V(a).scrollTop(V(a).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-V(a).scrollLeft()<s.scrollSensitivity?n=V(a).scrollLeft(V(a).scrollLeft()-s.scrollSpeed):V(window).width()-(t.pageX-V(a).scrollLeft())<s.scrollSensitivity&&(n=V(a).scrollLeft(V(a).scrollLeft()+s.scrollSpeed)))),!1!==n&&V.ui.ddmanager&&!s.dropBehaviour&&V.ui.ddmanager.prepareOffsets(i,t)}}),V.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],V(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=V(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,n,o,a,r,l,h,c,u,d=i.options,p=d.snapTolerance,f=e.offset.left,g=f+i.helperProportions.width,m=e.offset.top,_=m+i.helperProportions.height,v=i.snapElements.length-1;0<=v;v--)l=(r=i.snapElements[v].left-i.margins.left)+i.snapElements[v].width,c=(h=i.snapElements[v].top-i.margins.top)+i.snapElements[v].height,g<r-p||l+p<f||_<h-p||c+p<m||!V.contains(i.snapElements[v].item.ownerDocument,i.snapElements[v].item)?(i.snapElements[v].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=!1):("inner"!==d.snapMode&&(s=Math.abs(h-_)<=p,n=Math.abs(c-m)<=p,o=Math.abs(r-g)<=p,a=Math.abs(l-f)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r-i.helperProportions.width}).left),a)&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),u=s||n||o||a,"outer"!==d.snapMode&&(s=Math.abs(h-m)<=p,n=Math.abs(c-_)<=p,o=Math.abs(r-f)<=p,a=Math.abs(l-g)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r}).left),a)&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),!i.snapElements[v].snapping&&(s||n||o||a||u)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=s||n||o||a||u)}}),V.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,i=i.options,i=V.makeArray(V(i.stack)).sort(function(t,e){return(parseInt(V(t).css("zIndex"),10)||0)-(parseInt(V(e).css("zIndex"),10)||0)});i.length&&(s=parseInt(V(i[0]).css("zIndex"),10)||0,V(i).each(function(t){V(this).css("zIndex",s+t)}),this.css("zIndex",s+i.length))}}),V.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("zIndex")&&(i._zIndex=e.css("zIndex")),e.css("zIndex",i.zIndex)},stop:function(t,e,i){i=i.options;i._zIndex&&V(e.helper).css("zIndex",i._zIndex)}}),V.ui.draggable,V.widget("ui.resizable",V.ui.mouse,{version:"1.14.0",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},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},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===V(t).css("overflow"))return!1;var e=e&&"left"===e?"scrollLeft":"scrollTop",i=!1;if(0<t[e])return!0;try{t[e]=1,i=0<t[e],t[e]=0}catch(t){}return i},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),V.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(V("<div class='ui-wrapper'></div>").css({overflow:"hidden",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.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this._proportionallyResize()),this._setupHandles(),e.autoHide&&V(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){V(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(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),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,a=this;if(this.handles=o.handles||(V(".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=V(),this._addedHandles=V(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=String.prototype.trim.call(i[e])),n=V("<div>"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=V(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=V(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?s.outerHeight():s.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=V(this.handles[e])[0])!==t.target&&!V.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=V(s.containment).scrollLeft()||0,i+=V(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=V(".ui-resizable-"+this.axis).css("cursor"),V("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(i=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),V.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(i=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,e=e?0:o.sizeDiff.width,e={width:o.helper.width()-e,height:o.helper.height()-i},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(V.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper)&&!n.animate&&this._proportionallyResize(),V("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.helper.css(t),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px",this.helper.width(t.width)),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px",this.helper.height(t.height)),t},_updateVirtualBoundaries:function(t){var e,i,s,n=this.options,n={minWidth:this._isNumber(n.minWidth)?n.minWidth:0,maxWidth:this._isNumber(n.maxWidth)?n.maxWidth:1/0,minHeight:this._isNumber(n.minHeight)?n.minHeight:0,maxHeight:this._isNumber(n.maxHeight)?n.maxHeight:1/0};(this._aspectRatio||t)&&(t=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,e=n.maxHeight*this.aspectRatio,s=n.maxWidth/this.aspectRatio,n.minWidth<t&&(n.minWidth=t),n.minHeight<i&&(n.minHeight=i),e<n.maxWidth&&(n.maxWidth=e),s<n.maxHeight)&&(n.maxHeight=s),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&i&&(t.top=l-e.minHeight),n&&i&&(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},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||V("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.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;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){V.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,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}}}),V.ui.plugin.add("resizable","animate",{stop:function(e){var i=V(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,n=n?0:i.sizeDiff.width,n={width:i.size.width-n,height:i.size.height-o},o=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,a=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(V.extend(n,a&&o?{top:a,left:o}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&V(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),V.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,n=V(this).resizable("instance"),o=n.options,a=n.element,o=o.containment,a=o instanceof V?o.get(0):/parent/.test(o)?a.parent().get(0):o;a&&(n.containerElement=V(a),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:V(document),left:0,top:0,width:V(document).width(),height:V(document).height()||document.body.parentNode.scrollHeight}):(i=V(a),s=[],V(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},o=n.containerOffset,e=n.containerSize.height,t=n.containerSize.width,t=n._hasScroll(a,"left")?a.scrollWidth:t,e=n._hasScroll(a)?a.scrollHeight:e,n.parentData={element:a,left:o.left,top:o.top,width:t,height:e}))},resize:function(t){var e=V(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,t=e._aspectRatio||t.shiftKey,o={top:0,left:0},a=e.containerElement,r=!0;a[0]!==document&&/static/.test(a.css("position"))&&(o=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-o.left),t&&(e.size.height=e.size.width/e.aspectRatio,r=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),t&&(e.size.width=e.size.height*e.aspectRatio,r=!1),e.position.top=e._helper?s.top:0),a=e.containerElement.get(0)===e.element.parent().get(0),i=/relative|absolute/.test(e.containerElement.css("position")),a&&i?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-o.left:e.offset.left-s.left)),a=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-o.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,t)&&(e.size.height=e.size.width/e.aspectRatio,r=!1),a+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-a,t)&&(e.size.width=e.size.height*e.aspectRatio,r=!1),r||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=V(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=V(t.helper),a=o.offset(),r=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o})}}),V.ui.plugin.add("resizable","alsoResize",{start:function(){var t=V(this).resizable("instance").options;V(t.alsoResize).each(function(){var t=V(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.css("width")),height:parseFloat(t.css("height")),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=V(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,a={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};V(s.alsoResize).each(function(){var t=V(this),s=V(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];V.each(e,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){V(this).removeData("ui-resizable-alsoresize")}}),V.ui.plugin.add("resizable","ghost",{start:function(){var t=V(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!0===V.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=V(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=V(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),V.ui.plugin.add("resizable","grid",{resize:function(){var t,e=V(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,h=r[1]||1,c=Math.round((s.width-n.width)/l)*l,s=Math.round((s.height-n.height)/h)*h,u=n.width+c,d=n.height+s,p=i.maxWidth&&i.maxWidth<u,f=i.maxHeight&&i.maxHeight<d,g=i.minWidth&&i.minWidth>u,m=i.minHeight&&i.minHeight>d;i.grid=r,g&&(u+=l),m&&(d+=h),p&&(u-=l),f&&(d-=h),/^(se|s|e)$/.test(a)?(e.size.width=u,e.size.height=d):/^(ne)$/.test(a)?(e.size.width=u,e.size.height=d,e.position.top=o.top-s):/^(sw)$/.test(a)?(e.size.width=u,e.size.height=d,e.position.left=o.left-c):((d-h<=0||u-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<d-h?(e.size.height=d,e.position.top=o.top-s):(d=h-t.height,e.size.height=d,e.position.top=o.top+n.height-d),0<u-l?(e.size.width=u,e.position.left=o.left-c):(u=l-t.width,e.size.width=u,e.position.left=o.left+n.width-u))}}),V.ui.resizable,V.widget("ui.dialog",{version:"1.14.0",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",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 e=V(this).css(t).offset().top;e<0&&V(this).css("top",t.top-e)}},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},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_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"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&V.fn.draggable&&this._makeDraggable(),this.options.resizable&&V.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?V(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:V.noop,enable:V.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||V(this.document[0].activeElement).trigger("blur"),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+V(this).css("z-index")}).get(),s=Math.max.apply(null,s);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=V(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;(t=(t=(t=(t=(t=t||this.element.find("[autofocus]")).length?t:this.element.find(":tabbable")).length?t:this.uiDialogButtonPane.find(":tabbable")).length?t:this.uiDialogTitlebarClose.filter(":tabbable")).length?t:this.uiDialog).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=this.document[0].activeElement;this.uiDialog[0]===t||V.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(t){t.preventDefault(),this._restoreTabbableFocus()},_createWrapper:function(){this.uiDialog=V("<div>").hide().attr({tabIndex:-1,role:"dialog","aria-modal":this.options.modal?"true":null}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){var e,i,s;this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===V.ui.keyCode.ESCAPE?(t.preventDefault(),this.close(t)):t.keyCode!==V.ui.keyCode.TAB||t.isDefaultPrevented()||(e=this.uiDialog.find(":tabbable"),i=e.first(),s=e.last(),t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault()))},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=V("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){V(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=V("<button type='button'></button>").button({label:V("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=V("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=V("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=V("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var s=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),V.isEmptyObject(t)||Array.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(V.each(t,function(t,e){var i;e=V.extend({type:"button"},e="function"==typeof e?{click:e,text:t}:e),i=e.click,t={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,V("<button></button>",e).button(t).appendTo(s.uiButtonSet).on("click",function(){i.apply(s.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var n=this,o=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){n._addClass(V(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",t,a(e))},drag:function(t,e){n._trigger("drag",t,a(e))},stop:function(t,e){var i=e.offset.left-n.document.scrollLeft(),s=e.offset.top-n.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=s?"+":"")+s,of:n.window},n._removeClass(V(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var n=this,o=this.options,t=o.resizable,e=this.uiDialog.css("position"),t="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function a(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:this._minHeight(),handles:t,start:function(t,e){n._addClass(V(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",t,a(e))},resize:function(t,e){n._trigger("resize",t,a(e))},stop:function(t,e){var i=n.uiDialog.offset(),s=i.left-n.document.scrollLeft(),i=i.top-n.document.scrollTop();o.height=n.uiDialog.height(),o.width=n.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=s?"+":"")+s+" top"+(0<=i?"+":"")+i,of:n.window},n._removeClass(V(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",t,a(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=V(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=V.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||this.document.data("ui-dialog-instances",t=[]),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};V.each(t,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:V("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=s.is(":data(ui-draggable)"))&&!e&&s.draggable("destroy"),!i)&&e&&this._makeDraggable(),"position"===t&&this._position(),"resizable"===t&&((i=s.is(":data(ui-resizable)"))&&!e&&s.resizable("destroy"),i&&"string"==typeof e&&s.resizable("option","handles",e),i||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")),"modal"===t)&&s.attr("aria-modal",e?"true":null)},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),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=V(this);return V("<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!!V(t.target).closest(".ui-dialog").length||!!V(t.target).closest(".ui-datepicker").length},_createOverlay:function(){var i;this.options.modal&&(i=!0,this._delay(function(){i=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(t){var e;i||(e=this._trackingInstances()[0])._allowInteraction(t)||(t.preventDefault(),e._focusTabbable())}.bind(this)),this.overlay=V("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var t;this.options.modal&&this.overlay&&((t=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",t):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!0===V.uiBackCompat&&V.widget("ui.dialog",V.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),V.ui.dialog;function rt(t,e,i){return e<=t&&t<e+i}V.widget("ui.droppable",{version:"1.14.0",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof i?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t=t||{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){V.ui.ddmanager.droppables[t]=V.ui.ddmanager.droppables[t]||[],V.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=V.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept="function"==typeof e?e:function(t){return t.is(e)}:"scope"===t&&(i=V.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=V.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=V.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||V.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0]||(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=V(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&V.ui.intersect(i,V.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),s)||!this.accept.call(this.element[0],i.currentItem||i.element))&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),V.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var n=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,a=n+t.helperProportions.width,r=o+t.helperProportions.height,l=e.offset.left,h=e.offset.top,c=l+e.proportions().width,u=h+e.proportions().height;switch(i){case"fit":return l<=n&&a<=c&&h<=o&&r<=u;case"intersect":return l<n+t.helperProportions.width/2&&a-t.helperProportions.width/2<c&&h<o+t.helperProportions.height/2&&r-t.helperProportions.height/2<u;case"pointer":return rt(s.pageY,h,e.proportions().height)&&rt(s.pageX,l,e.proportions().width);case"touch":return(h<=o&&o<=u||h<=r&&r<=u||o<h&&u<r)&&(l<=n&&n<=c||l<=a&&a<=c||n<l&&c<a);default:return!1}},V.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,n=V.ui.ddmanager.droppables[t.options.scope]||[],o=e?e.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<n.length;i++)if(!(n[i].options.disabled||t&&!n[i].accept.call(n[i].element[0],t.currentItem||t.element))){for(s=0;s<a.length;s++)if(a[s]===n[i].element[0]){n[i].proportions().height=0;continue t}n[i].visible="none"!==n[i].element.css("display"),n[i].visible&&("mousedown"===o&&n[i]._activate.call(n[i],e),n[i].offset=n[i].element.offset(),n[i].proportions({width:n[i].element[0].offsetWidth,height:n[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return V.each((V.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&V.ui.intersect(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled)&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,o){n.options.refreshPositions&&V.ui.ddmanager.prepareOffsets(n,o),V.each(V.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s;this.options.disabled||this.greedyChild||!this.visible||(s=!(s=V.ui.intersect(n,this,this.options.tolerance,o))&&this.isover?"isout":s&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return V(this).droppable("instance").options.scope===e})).length)&&((t=V(i[0]).droppable("instance")).greedyChild="isover"===s),t&&"isover"===s&&(t.isover=!1,t.isout=!0,t._out.call(t,o)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,o),t)&&"isout"===s&&(t.isout=!1,t.isover=!0,t._over.call(t,o))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)}},!0===V.uiBackCompat&&V.widget("ui.droppable",V.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});V.ui.droppable,V.widget("ui.progressbar",{version:"1.14.0",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=V("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&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)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=V("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),V.widget("ui.selectable",V.ui.mouse,{version:"1.14.0",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 i=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){i.elementPos=V(i.element[0]).offset(),i.selectees=V(i.options.filter,i.element[0]),i._addClass(i.selectees,"ui-selectee"),i.selectees.each(function(){var t=V(this),e=t.offset(),e={left:e.left-i.elementPos.left,top:e.top-i.elementPos.top};V.data(this,"selectable-item",{element:this,$element:t,left:e.left,top:e.top,right:e.left+t.outerWidth(),bottom:e.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=V("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=V(this.element[0]).offset(),this.options.disabled||(this.selectees=V(t.filter,this.element[0]),this._trigger("start",i),V(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=V.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),V(i.target).parents().addBack().each(function(){var t,e=V.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){var t,n,o,a,r,l,h;if(this.dragged=!0,!this.options.disabled)return o=(n=this).options,a=this.opos[0],r=this.opos[1],(l=s.pageX)<a&&(t=l,l=a,a=t),(h=s.pageY)<r&&(t=h,h=r,r=t),this.helper.css({left:a,top:r,width:l-a,height:h-r}),this.selectees.each(function(){var t=V.data(this,"selectable-item"),e=!1,i={};t&&t.element!==n.element[0]&&(i.left=t.left+n.elementPos.left,i.right=t.right+n.elementPos.left,i.top=t.top+n.elementPos.top,i.bottom=t.bottom+n.elementPos.top,"touch"===o.tolerance?e=!(l<i.left||i.right<a||h<i.top||i.bottom<r):"fit"===o.tolerance&&(e=a<i.left&&i.right<l&&r<i.top&&i.bottom<h),e?(t.selected&&(n._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(n._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(n._addClass(t.$element,"ui-selecting"),t.selecting=!0,n._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,n._addClass(t.$element,"ui-selected"),t.selected=!0):(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),n._trigger("unselecting",s,{unselecting:t.element}))),!t.selected||s.metaKey||s.ctrlKey||t.startselected||(n._removeClass(t.$element,"ui-selected"),t.selected=!1,n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,n._trigger("unselecting",s,{unselecting:t.element}))))}),!1},_mouseStop:function(e){var i=this;return this.dragged=!1,V(".ui-unselecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),V(".ui-selecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),V.widget("ui.selectmenu",[V.ui.formResetMixin,{version:"1.14.0",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=V()},_drawButton:function(){var t,e=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.trigger("focus"),t.preventDefault()}}),this.element.hide(),this.button=V("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=V("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e._rendered||e._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=V("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=V("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,e){t.preventDefault(),i._select(e.item.data("ui-selectmenu-item"),t)},focus:function(t,e){e=e.item.data("ui-selectmenu-item");null!=i.focusIndex&&e.index!==i.focusIndex&&(i._trigger("focus",t,{item:e}),i.isOpen||i._select(e,t)),i.focusIndex=e.index,i.button.attr("aria-activedescendant",i.menuItems.eq(e.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(V.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var e=V("<span>");return this._setText(e,t.label),this._addClass(e,"ui-selectmenu-text"),e},_renderMenu:function(s,t){var n=this,o="";V.each(t,function(t,e){var i;e.optgroup!==o&&(i=V("<li>",{text:e.optgroup}),n._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(e.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(s),o=e.optgroup),n._renderItemData(s,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(t,e){var i=V("<li>"),s=V("<div>",{title:e.element.attr("title")});return e.disabled&&this._addClass(i,null,"ui-state-disabled"),e.hidden?i.prop("hidden",!0):this._setText(s,e.label),i.append(s).appendTo(t)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(i="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0)).length&&this.menuInstance.focus(e,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&((t=window.getSelection()).removeAllRanges(),t.addRange(this.range))},_documentClick:{mousedown:function(t){!this.isOpen||V(t.target).closest(".ui-selectmenu-menu, #"+CSS.escape(this.ids.button)).length||this.close(t)}},_buttonEvents:{mousedown:function(){var t=window.getSelection();t.rangeCount&&(this.range=t.getRangeAt(0))},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(t){var e=!0;switch(t.keyCode){case V.ui.keyCode.TAB:case V.ui.keyCode.ESCAPE:this.close(t),e=!1;break;case V.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case V.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case V.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case V.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case V.ui.keyCode.LEFT:this._move("prev",t);break;case V.ui.keyCode.RIGHT:this._move("next",t);break;case V.ui.keyCode.HOME:case V.ui.keyCode.PAGE_UP:this._move("first",t);break;case V.ui.keyCode.END:case V.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),e=!1}e&&t.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){t=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(t,e){var i;"icons"===t&&(i=this.button.find("span.ui-icon"),this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t=(t=(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))&&t[0]?t:this.element.closest(".ui-front, dialog")).length?t:this.document[0].body},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1===t?this.button.css("width",""):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t))},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(t){var i=this,s=[];t.each(function(t,e){s.push(i._parseOption(V(e),t))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),hidden:i.prop("hidden")||t.prop("hidden"),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),V.widget("ui.slider",V.ui.mouse,{version:"1.14.0",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e=this.options,i=this.element.find(".ui-slider-handle"),s=[],n=e.values&&e.values.length||1;for(i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),t=i.length;t<n;t++)s.push("<span tabindex='0'></span>");this.handles=i.add(V(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){V(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=V("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,o,e,a,r=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-r.values(t));(e<s||s===e&&(t===r._lastChangedValue||r.values(t)===l.min))&&(s=e,n=V(this),o=t)}),!1!==this._start(t,o))&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(n,null,"ui-state-active"),n.trigger("focus"),e=n.offset(),a=!V(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:t.pageX-e.left-n.width()/2,top:t.pageY-e.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,i),this._animateOff=!0)},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},e=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,e),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"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},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,t="horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),t=t/e;return(t=1<t?1:t)<0&&(t=0),"vertical"===this.orientation&&(t=1-t),e=this._valueMax()-this._valueMin(),t=this._valueMin()+t*e,this._trimAlignValue(t)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){if(!arguments.length)return this._value();this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0)},values:function(t,e){var i,s,n;if(1<arguments.length)this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),this._change(null,t);else{if(!arguments.length)return this._values();if(!Array.isArray(t))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,s=t,n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()}},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return this._trimAlignValue(t)},_values:function(t){var e,i;if(arguments.length)return t=this.options.values[t],this._trimAlignValue(t);if(this._hasMultipleValues()){for(e=this.options.values.slice(),i=0;i<e.length;i+=1)e[i]=this._trimAlignValue(e[i]);return e}return[]},_trimAlignValue:function(t){var e,i;return t<=this._valueMin()?this._valueMin():t>=this._valueMax()?this._valueMax():(e=0<this.options.step?this.options.step:1,i=t-(t=(t-this._valueMin())%e),2*Math.abs(t)>=e&&(i+=0<t?e:-e),parseFloat(i.toFixed(5)))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var t=t.toString(),e=t.indexOf(".");return-1===e?0:t.length-e-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,t,s,n,o=this.options.range,a=this.options,r=this,l=!this._animateOff&&a.animate,h={};this._hasMultipleValues()?this.handles.each(function(t){i=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,h["horizontal"===r.orientation?"left":"bottom"]=i+"%",V(this).stop(1,1)[l?"animate":"css"](h,a.animate),!0===r.options.range&&("horizontal"===r.orientation?(0===t&&r.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&r.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),s=this._valueMin(),n=this._valueMax(),i=n!==s?(t-s)/(n-s)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,i,s,n=V(t.target).data("ui-slider-handle-index");switch(t.keyCode){case V.ui.keyCode.HOME:case V.ui.keyCode.END:case V.ui.keyCode.PAGE_UP:case V.ui.keyCode.PAGE_DOWN:case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(t.preventDefault(),this._keySliding||(this._keySliding=!0,this._addClass(V(t.target),null,"ui-state-active"),!1!==this._start(t,n)))break;return}switch(s=this.options.step,e=i=this._hasMultipleValues()?this.values(n):this.value(),t.keyCode){case V.ui.keyCode.HOME:i=this._valueMin();break;case V.ui.keyCode.END:i=this._valueMax();break;case V.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+s);break;case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-s)}this._slide(t,n,i)},keyup:function(t){var e=V(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass(V(t.target),null,"ui-state-active"))}}}),V.widget("ui.sortable",V.ui.mouse,{version:"1.14.0",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},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),V.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,n=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(t),V(t.target).parents().each(function(){if(V.data(this,n.widgetName+"-item")===n)return i=V(this),!1}),!(i=V.data(t.target,n.widgetName+"-item")===n?V(t.target):i))||(this.options.handle&&!e&&(V(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s)||(this.currentItem=i,this._removeCurrentsFromItems(),0)))},_mouseStart:function(t,e,i){var s,n,o=this.options;if((this.currentContainer=this).refreshPositions(),this.appendTo=V("parent"!==o.appendTo?o.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},V.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),V.extend(this.offset,{parent:this._getParentOffset()}),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this._storedStylesheet=V("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return V.ui.ddmanager&&(V.ui.ddmanager.current=this),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(t){var e,i,s,n,o=this.options;for(this.position=this._generatePosition(t),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"),o.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),V.ui.ddmanager)&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(n=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===s||V.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&V.contains(this.element[0],s))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,n,o;if(t)return V.ui.ddmanager&&!this.options.dropBehaviour&&V.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),o={},(n=this.options.axis)&&"x"!==n||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,V(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new V.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].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(),V.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?V(this.domPosition.prev).after(this.currentItem):V(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},V(t).each(function(){var t=(V(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(V(t.item||this).attr(t.attribute||"id")||"")}),i},_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,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||r<s+h&&s+h<l,c="y"===this.options.axis||o<e+c&&e+c<a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?h&&c:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),t="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!e||!t)&&(e=this.dragDirection.vertical,t=this.dragDirection.horizontal,this.floating?"right"===t||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),t=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this.dragDirection.vertical,s=this.dragDirection.horizontal;return this.floating&&s?"right"===s&&t||"left"===s&&!t:i&&("down"===i&&e||"up"===i&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,n,o=[],a=[],r=this._connectWith();if(r&&t)for(e=r.length-1;0<=e;e--)for(i=(s=V(r[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&a.push(["function"==typeof n.options.items?n.options.items.call(n.element):V(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);function l(){o.push(this)}for(a.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):V(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(l);return V(o)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=V.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,a,r,l,h=this.items,c=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):V(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=V(u[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push(["function"==typeof n.options.items?n.options.items.call(n.element[0],t,{item:this.currentItem}):V(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],l=(a=c[e][i=0]).length;i<l;i++)(r=V(a[i])).data(this.widgetName+"-item",o),h.push({item:r,instance:o,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){for(var e,i,s=this.items.length-1;0<=s;s--)e=this.items[s],this.currentContainer&&e.instance!==this.currentContainer&&e.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?V(this.options.toleranceElement,e.item):e.item,t||(e.width=i.outerWidth(),e.height=i.outerHeight()),i=i.offset(),e.left=i.left,e.top=i.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,n,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,n=i.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var t=V("<"+n+">",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===n?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),V("<tr>",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width())||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10))}}),i.placeholder=V(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){V("<td>&#160;</td>",i.document[0]).attr("colspan",V(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,a,r,l,h,c=null,u=null,d=this.containers.length-1;0<=d;d--)V.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&V.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)V.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(a=this.items[e].item.offset()[n],r=!1,t[h]-a>this.items[e][o]/2&&(r=!0),Math.abs(t[h]-a)<i)&&(i=Math.abs(t[h]-a),s=this.items[e],this.direction=r?"up":"down");(s||this.options.dropOnEmpty)&&(this.currentContainer===this.containers[u]?this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1):(s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[u].element,!0),this._trigger("change",t,this._uiHash()),this.containers[u]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1))}},_createHelper:function(t){var e=this.options,t="function"==typeof e.helper?V(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return t.parents("body").length||this.appendTo[0].appendChild(t[0]),t[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")}),t[0].style.width&&!e.forceHelperSize||t.width(this.currentItem.width()),t[0].style.height&&!e.forceHelperSize||t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this.offsetParent[0]===this.document[0].body?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){var t;return"relative"===this.cssPosition?{top:(t=this.currentItem.position()).top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}:{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 t,e,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=V(i.containment)[0],i=V(i.containment).offset(),e="hidden"!==V(t).css("overflow"),this.containment=[i.left+(parseInt(V(t).css("borderLeftWidth"),10)||0)+(parseInt(V(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(V(t).css("borderTopWidth"),10)||0)+(parseInt(V(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(e?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(V(t).css("borderLeftWidth"),10)||0)-(parseInt(V(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(e?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(V(t).css("borderTopWidth"),10)||0)-(parseInt(V(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var t="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(i[0].tagName);return{top:e.top+this.offset.relative.top*t+this.offset.parent.top*t-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:i.scrollTop())*t,left:e.left+this.offset.relative.left*t+this.offset.parent.left*t-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:i.scrollLeft())*t}},_generatePosition:function(t){var e=this.options,i=t.pageX,s=t.pageY,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3])&&(s=this.containment[3]+this.offset.click.top),e.grid)&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0]),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.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){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.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||s.push(function(t){this._trigger("update",t,this._uiHash())}),this===this.currentContainer||e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this._storedStylesheet&&(this._storedStylesheet.remove(),this._storedStylesheet=null),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===V.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||V([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});function O(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}V.widget("ui.spinner",{version:"1.14.0",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},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 s=this._super(),n=this.element;return V.each(["min","max","step"],function(t,e){var i=n.attr(e);null!=i&&i.length&&(s[e]=i)}),s},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t)},mousewheel:function(t,e){var i=this.document[0].activeElement;if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((0<e?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(t){var e;e=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),function(){this.element[0]!==this.document[0].activeElement&&(this.element.trigger("focus"),this.previous=e)}.call(this),!1!==this._start(t)&&this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(V(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var e=this.options,i=V.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,e.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_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&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?"function"==typeof e?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var t=t.toString(),e=t.indexOf(".");return-1===e?0:t.length-e-1},_adjustValue:function(t){var e=this.options,i=null!==e.min?e.min:0,s=t-i;return t=i+Math.round(s/e.step)*e.step,t=parseFloat(t.toFixed(this._precision())),null!==e.max&&t>e.max?e.max:null!==e.min&&t<e.min?e.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){var i;"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i))):("max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,e.up),i=this.buttons.last().find(".ui-icon"),this._removeClass(i,null,this.options.icons.down),this._addClass(i,null,e.down)),this._super(t,e))},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:O(function(t){this._super(t)}),_parse:function(t){return""===(t="string"==typeof 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())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:O(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:O(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:O(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:O(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());O(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!0===V.uiBackCompat&&V.widget("ui.spinner",V.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var A;V.ui.spinner,V.widget("ui.tabs",{version:"1.14.0",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(A=/#.*$/,function(t){var e=t.href.replace(A,""),i=location.href.replace(A,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=V.uniqueSort(t.disabled.concat(V.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=V(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,s=location.hash.substring(1);return null===i&&(s&&this.tabs.each(function(t,e){if(V(e).attr("aria-controls")===s)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):V()}},_tabKeydown:function(t){var e=V(this.document[0].activeElement).closest("li"),i=this.tabs.index(e),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:i++;break;case V.ui.keyCode.UP:case V.ui.keyCode.LEFT:s=!1,i--;break;case V.ui.keyCode.END:i=this.anchors.length-1;break;case V.ui.keyCode.HOME:i=0;break;case V.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case V.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===V.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===V.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===V.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==V.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"===t?this._activate(e):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=V.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!V.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=V()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=V()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){V(this).is(".ui-state-disabled")&&t.preventDefault()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return V("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=V(),this.anchors.each(function(t,e){var i,s,n,o=V(e).uniqueId().attr("id"),a=V(e).closest("li"),r=a.attr("aria-controls");l._isLocal(e)?(n=(i=e.hash).substring(1),s=l.element.find(l._sanitizeSelector(i))):(n=a.attr("aria-controls")||V({}).uniqueId()[0].id,(s=l.element.find(i="#"+n)).length||(s=l._createPanel(n)).insertAfter(l.panels[t-1]||l.tablist),s.attr("aria-live","polite")),s.length&&(l.panels=l.panels.add(s)),r&&a.data("ui-tabs-aria-controls",r),a.attr({"aria-controls":n,"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return V("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=V(e),!0===t||-1!==V.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),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(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=V(this).outerHeight(!0)}),this.panels.each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,V(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):V(),i={oldTab:i,oldPanel:r,newTab:o?V():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!o&&this.tabs.index(s),this.active=n?V():s,this.xhr&&this.xhr.abort(),r.length||a.length||V.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n.hide(),a()),n.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===V(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=t.length?t:this.active).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return!1===t?V():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+CSS.escape(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){V.data(this,"ui-tabs-destroy")?V(this).remove():V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=V(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?V.map(t,function(t){return t!==i?t:null}):V.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==V.inArray(t,e))return;e=Array.isArray(e)?V.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function n(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),r={tab:i,panel:a};this._isLocal(t[0])||(this.xhr=V.ajax(this._ajaxSettings(t,s,r)),"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,i){a.html(t),o._trigger("load",s,r),n(i,e)}).fail(function(t,e){n(t,e)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,e){return n._trigger("beforeLoad",i,V.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=V(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!0===V.uiBackCompat&&V.widget("ui.tabs",V.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),V.ui.tabs,V.widget("ui.tooltip",{version:"1.14.0",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=V(this).attr("title");return V("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),e=V.inArray(e,i);-1!==e&&i.splice(e,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=V("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=V([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&V.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur");i.target=i.currentTarget=e.element[0],s.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=V(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=V(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=V([])},open:function(t){var i=this,e=V(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=V(this);e.data("ui-tooltip-open")&&((t=V.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t=this.options.content,s=this,n=i?i.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(i,e,t);(t=t.call(e[0],function(t){e.data("ui-tooltip-open")&&(i&&(i.type=n),s._open(i,e,t))}))&&this._open(i,e,t)},_open:function(t,e,i){var s,n,o,a=V.extend({},this.options.position);function r(t){a.of=t,s.is(":hidden")||s.position(a)}i&&((o=this._find(e))?o.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),o=this._tooltip(e),s=o.tooltip,this._addDescribedBy(e,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(o=V("<div>").html(s.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),o.removeAttr("id").find("[id]").removeAttr("id"),o.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):s.position(V.extend({of:e},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(n=this.delayedShow=setInterval(function(){s.is(":visible")&&(r(a.of),clearInterval(n))},13)),this._trigger("open",t,{tooltip:s})))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){t.keyCode===V.ui.keyCode.ESCAPE&&((t=V.Event(t)).currentTarget=e[0],this.close(t,!0))}};e[0]!==this.element[0]&&(i.remove=function(){var t=this._find(e);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var e,i=this,s=V(t?t.currentTarget:this.element),n=this._find(s);n?(e=n.tooltip,n.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),n.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(V(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&V.each(this.parents,function(t,e){V(e.element).attr("title",e.title),delete i.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:e}),n.hiding)||(n.closing=!1)):s.removeData("ui-tooltip-open")},_tooltip:function(t){var e=V("<div>").attr("role","tooltip"),i=V("<div>").appendTo(e),s=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:e}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=t.length?t:this.document[0].body},_destroy:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur"),e=e.element;i.target=i.currentTarget=e[0],s.close(i,!0),V("#"+t).remove(),e.data("ui-tooltip-title")&&(e.attr("title")||e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!0===V.uiBackCompat&&V.widget("ui.tooltip",V.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),V.ui.tooltip});;
/*globals calCultureType*/
/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// START OF GLOBAL UI FUNCTIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

// Register "Globals" in JS as a valid object.
if (typeof (Globals) === "undefined" || Globals === null) {
    Globals = {};
}

Globals.UI = {

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// START OF jQUERY TOOLBAR/SEARCH BAR FUNCTIONS
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.showSimpleDialog
	// Desc: just like Globals.UI.showjQueryToolbarDialog, but simpler for just a dumb dialog box of text
	//
	// Inputs: dialogText, dialogTitle (required)
	//         dialogWidth, dialogHeight (optional)
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	showSimpleDialog: function (dialogText, dialogTitle, dialogWidth, dialogHeight) {
		var objectID = "simpleDialog_" + (new Date()).getTime().toString();
		$("body").append("<div id='" + objectID + "'></div>");
		this.showjQueryToolbarDialog(objectID, dialogWidth, dialogHeight, dialogTitle, dialogText, null, null, null, null);
		return objectID;
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.showjQueryToolbarDialog
	// Desc: Builds and displays a modal jQuery dialog underneath the specified toolbar/searchbar button.
    //
	// Inputs: toolbarSectionItemID - ID string of target toolbar section
	//		dialogWidth - Width (in pixels) of dialog box. Enter 0 to use default value of 300.
	//		dialogHeight - Height (in pixels) of dialog box. Enter 0 to use default value of "auto".
	//		dialogTitle - Title of dialog box (displays at top of box)
	//		dialogContent - HTML content for dialog box
	//      onOpen - Function to be called once dialog is opened
    //      alwaysUseSpecifiedHeight - Used to specify the dialog height
    //      RemoveOnClick - Determines whether the dialog should close when the user clicks outside
    //      OnClose - Function to be called before the dialog is about to close
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	showjQueryToolbarDialog: function (toolbarSectionItemID, dialogWidth, dialogHeight, dialogTitle, dialogContent, onOpen, alwaysUseSpecifiedHeight, RemoveOnClick, OnClose, specifiedPosition) {
		var fullDivID = "dialog_" + toolbarSectionItemID;
		var fullDivJQObj = $("#" + fullDivID);

		var removeOnClick = false;
		if (!Globals.Utilities.isUndefinedOrNull(RemoveOnClick)) {
			removeOnClick = RemoveOnClick;
		}

		// If dialog already exists, close it (i.e., remove it from DOM) before re-building
		if (fullDivJQObj.length !== 0) {
			//$fullDivJQObj.dialog("close");
			fullDivJQObj.dialog("close");
		}
		else {
			//For performance consideration we are not appending the HTML here since JQuery UI takes forever to render the dialog in IE7.
			var titleAttr;
			if (dialogTitle == null) {
				titleAttr = "";
			}
			else {
				titleAttr = "title='" + dialogTitle + "'";
			}
			fullDivJQObj = $("<div id='" + fullDivID + "' " + titleAttr + "></div>").appendTo("body");
		}

		// Set default values for jQuery dialog box
		var x = 300;
		var y = "auto";
		var maxDialogHeight = Math.ceil(($(window).height()) * 0.5); //dialog shouldn't be bigger than the window viewport

		if (!Globals.Utilities.isUndefinedOrNull(dialogWidth) && dialogWidth > 0) {
			x = dialogWidth;
		}

        //ie is not supported anymore
		//if ($.browser.msie || (alwaysUseSpecifiedHeight && !Globals.Utilities.isUndefinedOrNull(alwaysUseSpecifiedHeight))) {
		//	if (!Globals.Utilities.isUndefinedOrNull(dialogHeight) && dialogHeight > 0) {
		//		y = dialogHeight;
		//	}
		//}

		var dialogPosition;
		if (specifiedPosition != null) {
			dialogPosition = specifiedPosition;
		}
		else if (toolbarSectionItemID.indexOf("simpleDialog_") === 0) { // starts with
			var centerIn = $("#divOuterDiv");
			if (centerIn.length == 0) {
				centerIn = window;
			}
			dialogPosition = { "my": "center center", "at": "center center", "of": centerIn };
		}
		else {
			dialogPosition = { "my": "left top", "at": "left bottom", "of": "#" + toolbarSectionItemID };
		}

		fullDivJQObj.dialog({
			position: dialogPosition,
			width: x,
			height: y,
			maxHeight: maxDialogHeight,
			modal: true,
			close: function (event, ui) {
				if (!Globals.Utilities.isUndefinedOrNull(OnClose)) {
					OnClose();
				}
				$(this).empty().dialog('destroy').remove();
            },
            closeText: "",
			open: function (event, ui) {
				if (removeOnClick) {
					$('.ui-widget-overlay').bind('click', function () {
						if (Globals.Utilities.isUndefinedOrNull(OnClose)) {
							Globals.UI.closejQueryToolbarDialog(toolbarSectionItemID);
						}
						else {
							Globals.UI.closejQueryToolbarDialog(toolbarSectionItemID, OnClose);
						}

					});
				}
				if (!Globals.Utilities.isUndefinedOrNull(onOpen)) {
					onOpen();
				}
			}
		});

		//now that we have the schelectal dialog object created we can now append the content. 
		fullDivJQObj.html(dialogContent);

		Globals.UI.modernizeHTMLElements({ "ElementID": fullDivID });
		//return the object if the code who calls it wish to customize it some more.
		return fullDivJQObj;
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.closejQueryToolbarDialog
	// Desc: Closes specified modal jQuery dialog and removes it from the DOM
	// Inputs: toolbarSectionItemID - ID string of target toolbar section
    //      OnClose - Function to be called before the dialog is about to close
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	closejQueryToolbarDialog: function (toolbarSectionItemID, OnClose) {
		if (!Globals.Utilities.isUndefinedOrNull(OnClose)) {
			OnClose();
		}

		var fullDivID = "dialog_" + toolbarSectionItemID;
		$("#" + fullDivID).empty().dialog('destroy').remove();
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.isJqueryDialogOpen
	// Desc: This function will check if a JQuery dialog is openned or not. NOTE: The dialog in question must be
    //       created by this JS Library!!!!!
	// Inputs: DialogID - ID of the dialog to test
    //
    // Returns: True if it is opened false otherwise or when things goes wrong.      
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	isJqueryDialogOpen: function (DialogID) {
		var returnValue = false;
		if (!Globals.Utilities.isUndefinedOrNull(DialogID)) {
			try {
				var jqDialog = $("#dialog_" + DialogID);
				if (jqDialog.length > 0 && jqDialog.dialog("isOpen")) {
					returnValue = true;
				}
			}
			catch (e2) {
				returnValue = false;
			}
		}
		return returnValue;
	},

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.UI.appendTojQueryToolbarDialog
    // Desc:    TO DO
    // Inputs:  toolbarSectionItemID - To be comented
    //          elementToAppend - To be comented
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	appendTojQueryToolbarDialog: function (toolbarSectionItemID, elementToAppend) {
		var fullDivID = "dialog_" + toolbarSectionItemID;
		fullDivID.appendChild(elementToAppend);
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.appendWarningTojQueryToolbarDialog
	// Desc: Appends a warning string to the specified modal jQuery dialog. Overwrites any previous warnings.
	// Inputs: toolbarSectionItemID - ID string of target toolbar section
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	appendWarningTojQueryToolbarDialog: function (toolbarSectionItemID, warningText) {
		var fullDivID = "dialog_" + toolbarSectionItemID;
		//check if there's a previous warning
		if ($("#" + fullDivID + " .js--div--display-warning").length > 0) {
			$("#" + fullDivID + " .js--div--display-warning").val(warningText);
		}
		else {
			$("#" + fullDivID).append("<div class=\"js--div--display-warning\">" + warningText + "</div>");
		}

	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.addButtonsTojQueryToolbarDialog
	// Desc: Adds a button pane to the specified modal jQuery dialog.
	// Inputs: toolbarSectionItemID - ID string of target toolbar section
	//		buttonArray - Array of buttons to add to dialog. See jQuery docs for proper array structure.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	addButtonsTojQueryToolbarDialog: function (toolbarSectionItemID, buttonArray) {
		var fullDivID = "dialog_" + toolbarSectionItemID;
		$("#" + fullDivID).dialog("option", "buttons", buttonArray);
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// END OF jQUERY TOOLBAR/SEARCH BAR FUNCTIONS
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.UI.setContentContainerHeight
    // Desc:    This method will set the height of the content container. It will try to calculate the proper height based on certain
    //          other factors to consider.
    // Inputs:  ContainerID - The ID of the container that needs to have its height adjusted.
    //          OtherContainers - This is an array of containerIDs that would affect the height of the container value.
    //                            This means any footer values etc.
    //          DiscretionaryPadding - Fancy name for a fudge factor / padding that is kind of hard coded.
    // Returns: The inner height and width of the container should you need it.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	setContentContainerHeight: function (ContainerID, OtherContainers, MinimumContainerHeight, DiscretionaryPadding) {

		var containerHeight = parseInt($(window).height(), 10) - parseInt($("#" + ContainerID).offset().top, 10);

		if (Globals.Utilities.isArray(OtherContainers)) {
			var numberOfOtherContainersToDeal = OtherContainers.length;
			for (var i = 0; i < numberOfOtherContainersToDeal; i++) {
				containerHeight -= parseInt($("#" + OtherContainers[i]).outerHeight(), 10);
			}
		}

		// this is to make sure that the discretionary padding is needed.
		try {
			containerHeight -= DiscretionaryPadding;
		}
		catch (e) {
			//do nothing
		}
		try {
			containerHeight = Math.max(containerHeight, MinimumContainerHeight);
		}
		catch (e) {
			// do nothing since we just accept the container height.
		}

		$("#" + ContainerID).css("height", containerHeight + "px");
		$("#" + ContainerID).css("overflow-y", "auto");
		var returnObj = {
			width: $("#" + ContainerID).innerWidth(),
			height: $("#" + ContainerID).innerHeight()
		};
		return returnObj;
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.makeCheckboxIntoAllCheckboxForOtherCheckboxes
	// Desc: Creates "all" functionality on one checkbox for a group of checkboxes
	//		i.e., if you click the "all" box, all the others get set to that status;
	//		if you check any of the other boxes, the "all" box gets checked if the others are all checked;
	//		and on initialization, the "all" box gets checked if the others are all checked
	// Inputs: allCheckboxSelector - the jquery selector of the checkbox that should act as the ALL checkbox
	//		otherCheckboxesSelector - the jquery selector of all checkboxes that should act as a group controlled by the all checkbox
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	makeCheckboxIntoAllCheckboxForOtherCheckboxes: function (allCheckboxSelector, otherCheckboxesSelector, afterCheckAllFunction) {
		Globals.UI.setAllCheckboxStatusBasedOnOtherCheckboxes(allCheckboxSelector, otherCheckboxesSelector);

		$(allCheckboxSelector).on("change", function () {
            if ($(this)[0].checked) {
                //@ CHANGE FOR JQUERY 3.6
                //$(otherCheckboxesSelector).attr("checked", "checked");
                $(otherCheckboxesSelector).prop('checked', true);
			}
            else {
                //@ CHANGE FOR JQUERY 3.6
                //$(otherCheckboxesSelector).removeAttr("checked");
                $(otherCheckboxesSelector).prop('checked', false);
			}

			if (afterCheckAllFunction != null) {
				afterCheckAllFunction.call();
			}
		});

		$(otherCheckboxesSelector).on("change", function () {
			Globals.UI.setAllCheckboxStatusBasedOnOtherCheckboxes(allCheckboxSelector, otherCheckboxesSelector);
		});
	},

	setAllCheckboxStatusBasedOnOtherCheckboxes: function (allCheckboxSelector, otherCheckboxesSelector) {
		if ($(otherCheckboxesSelector).length == $(otherCheckboxesSelector).filter(":checked").length) { // all children are checked
            //@ CHANGE FOR JQUERY 3.6
            //$(allCheckboxSelector).attr("checked", "checked");
            $(allCheckboxSelector).prop("checked", true);
		}
        else {
            //@ CHANGE FOR JQUERY 3.6
            //$(allCheckboxSelector).removeAttr("checked");
            $(allCheckboxSelector).prop("checked", false);
		}
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// START OF jQUERY based UI tools
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.UI.isElementVisibleInContainer
	// NOTE:    There is a dependency with Global.Utilities.js since this function needs to check if the elem parameter is actually a jQuery object.
	// Desc:    Checks if the element is actually viewable to the user within a given viewContainer. So this way this method takes into consideration the
	//          relevant viewing area as opposed to what the browser window can see. If view Container is null then it will use the window object.
	// Inputs:  element           - The element that we are trying to see if it is viewable in the browser.
	//		    viewContainerID   - The view container ID so it could be the ID of a DIV or it could be the Windows Object. (OPTIONAL)
	// Returns: TRUE if it is viewable false otherwise.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	isElementVisibleInContainer: function (element, viewContainerID) {
		var jqElemToTest = element;
		var jqViewContainer;

		//these variables will store the top and bottom of the viewable document area.
		var docViewTop, docViewBottom;
		//these variables will store top and bottom coordinates that the element actually is shown.
		var elemTop, elemBottom;

		//test if the parameters are jQuery objects if not then make them jQuery Objects
		if (!Globals.Utilities.isObjectAJQueryObject(element)) {
			jqElemToTest = $(element);
		}

		//if the viewContainerID is null (i.e. its not passed then let's assert they mean the whole browser window)
		if (Globals.Utilities.isUndefinedOrNull(viewContainerID)) {
			jqViewContainer = $(window);
			docViewTop = jqViewContainer.scrollTop();
		}
		else {
			jqViewContainer = $("#" + viewContainerID);
			docViewTop = jqViewContainer.offset().top;
		}

		//now I need bottom of what is viewable.
		docViewBottom = docViewTop + jqViewContainer.height();

		//let's get the element's possition on screen to see if it is actually on screen.
		elemTop = jqElemToTest.offset().top;
		elemBottom = elemTop + jqElemToTest.height();

		// if the bottom of the element less then the height of the doc view and the top of the element is greather than the top y-coordinates of the 
		// top of the viewing container then this is visible. Otherwise it is not.        
		return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.UI.modernizeHTMLElements
	// Desc:    Converts a set of HTML elements to the modernized look of jQuery. 
    //          HTML elements must be tagged with the proper classnames in order to be updated.
    //          Please refer to /Resources/CSS/Selectors/_DO-NOT-INCLUDE-jsSelectorsDocumentation.css for a list of pre-defined selectors
    //          Specifically,
    //          -converts buttons to jQuery buttons
    //          -adds round corners to textboxes/textareas
	// Inputs:  
    //          OptionsObj {
    //                  "ElementID": The ID of element you want to filter in,
    //                  "RenderingFunction": Modernizing function that needs to execute,
    //                  "Parameters" : The parameters to pass,
    //                  }
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	modernizeHTMLElements: function (OptionsObj) {
		var objTest = Globals.Utilities.isUndefinedOrNull;
		// let's apply this for site theming for now
		if (Globals.UI.isSiteThemeEnabled()) {
			var optionsObjExists = !objTest(OptionsObj);
			var includeThisElementID = " ";

			if (optionsObjExists && !objTest(OptionsObj.ElementID)) {
				includeThisElementID = "#" + OptionsObj.ElementID + " ";
			}

			// call the standards for knotia flat if there are other style types of sister sites populate the SiteStyle
			Globals.UI.knotiaFlatModernizeStandardElements(includeThisElementID);

			if (optionsObjExists && !objTest(OptionsObj.RenderingFunction)) {
				if (!objTest(OptionsObj.Parameters)) {
					OptionsObj.RenderingFunction(includeThisElementID, OptionsObj.Parameters);
				}
				else {
					OptionsObj.RenderingFunction(includeThisElementID);
				}
			}
		}
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.UI.knotiaFlatModernizeStandardSelects
    // Desc:    Convert the select tags to modern jQuery UI designs and filters by the JS css selectors.
    // Inputs:  ElementID   - Parent element of the html tags to be converted. If not passed in, it will grab from the entire DOM.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	knotiaFlatModernizeStandardElements: function (ElementID) {
		if (Globals.UI.isSiteThemeEnabled()) {
			Globals.UI.knotiaFlatModernizeStandardSelects(ElementID);
			Globals.UI.knotiaFlatModernizeStandardButtons(ElementID);
			Globals.UI.knotiaFlatModernizeStandardTextBoxes(ElementID);
			Globals.UI.knotiaFlatModernizeStandardBulletLinkLists(ElementID);
			Globals.UI.knotiaFlatModernizeStandardBulletLists(ElementID);
			Globals.UI.knotiaFlatModernizeStandardLabels(ElementID);
		}
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.UI.knotiaFlatAttachHoverEvents
    // Desc:    Convert any PNG images to have an alternate on hover event. Unlike the other helper functions this is a global change.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	knotiaFlatAttachHoverEvents: function () {
		if (!Globals.UI.isSiteThemeEnabled()) {
			return;
		}
		$(document).on('mouseover', '.js--img--pnghover', function (event) {
			event.stopPropagation();
            var currObject = $(this);
            if (currObject.length > 0
                && !Globals.Utilities.isUndefinedOrNull(currObject.attr('src'))
                    && currObject.attr('src').indexOf('-hover') === -1) {
				var newSrc = currObject.attr('src').replace('.png', '-hover.png');
				currObject.attr('src', newSrc);
			}
		});

		$(document).on('mouseout', '.js--img--pnghover', function (event) {
			event.stopPropagation();
			var currObject = $(this);
			if (currObject.length > 0 && !Globals.Utilities.isUndefinedOrNull(currObject.attr('src'))) {
				var newSrc = currObject.attr('src').replace('-hover.png', '.png');

				currObject.attr('src', newSrc);
			}
		});
	},

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.UI.useDivOuterDivElementIDForKnotia
    // Desc:    This method will test if the paramater being passed is empty for the ElementID if it is it will return #divOuterDiv
    //          otherwise use the ElementID being paseed.
    // Inputs:  ElementID   - Parent element of the html tags to be converted. If not passed in, it will grab from the entire DOM.
    // Returns: The ElementID being passed or the #divOuterDiv string.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	useDivOuterDivElementIDForKnotia: function (ElementID) {
	    var returnValue = ElementID;
	    if (Globals.Utilities.isNullOrWhitespace(ElementID)) {
	        returnValue = "#divOuterDiv";
	    }
	    return returnValue;
    },
	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.UI.knotiaFlatModernizeStandardBulletLinkLists
	// Desc:    Convert the UL tags to modern jQuery UI designs and filters by the JS css selectors.
	// Inputs:  ElementID   - Parent element of the html tags to be converted. If not passed in, it will grab from the entire DOM.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	knotiaFlatModernizeStandardLabels: function (ElementID) {
	    var elementIDToUse = Globals.UI.useDivOuterDivElementIDForKnotia(ElementID);

	    if (Globals.UI.isSiteThemeEnabled())
	    {   
	        $(elementIDToUse).find(".js--td--align-label").attr("align", "right");
	        $(elementIDToUse).find(".js--td--adjust-column-width").attr("width", "20%");
	        
		}
	},
	
	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.UI.knotiaFlatModernizeStandardBulletLinkLists
	// Desc:    Convert the UL tags to modern jQuery UI designs and filters by the JS css selectors.
	// Inputs:  ElementID   - Parent element of the html tags to be converted. If not passed in, it will grab from the entire DOM.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	knotiaFlatModernizeStandardBulletLinkLists: function (ElementID) {
	    var elementIDToUse = Globals.UI.useDivOuterDivElementIDForKnotia(ElementID);

	    if (Globals.UI.isSiteThemeEnabled())
	    {
	        $(elementIDToUse).find(".js--unorderedlist--apply-bullet-style").addClass("arrow-bullet");
		}
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.UI.knotiaFlatModernizeStandardBulletLists
	// Desc:    Convert the LI tags to modern jQuery UI designs and filters by the JS css selectors.
	// Inputs:  ElementID   - Parent element of the html tags to be converted. If not passed in, it will grab from the entire DOM.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	knotiaFlatModernizeStandardBulletLists: function (ElementID) {
	    var elementIDToUse = Globals.UI.useDivOuterDivElementIDForKnotia(ElementID);

	    if (Globals.UI.isSiteThemeEnabled())
	    {
		    Globals.UI.knotiaFlatModernizeStandardBulletLinkLists(ElementID);
		    $(elementIDToUse).find(".js--listitem--text-only").addClass("black");
		    
		}
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name:    Globals.UI.knotiaFlatModernizeStandardSelects
	// Desc:    Convert the select tags to modern jQuery UI designs and filters by the JS css selectors.
	// Inputs:  ElementID   - Parent element of the html tags to be converted. If not passed in, it will grab from the entire DOM.
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	knotiaFlatModernizeStandardSelects: function (ElementID) {
	    var elementIDToUse = Globals.UI.useDivOuterDivElementIDForKnotia(ElementID);

	    if (Globals.UI.isSiteThemeEnabled()) {
	        
	        $(elementIDToUse).find(".js--select--adjust-width").css("width", "90%");
	        $(elementIDToUse).find(".js--select--adjust-width-medium").css("width", "50%");
	        $(elementIDToUse).find(".js--select--adjust-width-small").css("width", "25%");
	        
		}
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.UI.knotiaFlatModernizeStandardButtons
    // Desc:    Convert the buttons to modern jQuery UI designs and filters by the JS css selectors.
    // Inputs:  ElementID   - Parent element of the html tags to be converted. If not passed in, it will grab from the entire DOM.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	knotiaFlatModernizeStandardButtons: function (ElementID) {
	    var elementIDToUse = Globals.UI.useDivOuterDivElementIDForKnotia(ElementID);

	    if (Globals.UI.isSiteThemeEnabled()) {
	        $(elementIDToUse).find(".js--button--align-wrapper").css("text-align", "right");
	        $(elementIDToUse).find(".js--button--convert-to-jQuery").button();
	        
		}
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.UI.knotiaFlatModernizeStandardTextBoxes
    // Desc:    Convert the text boxes to modern jQuery UI designs and filters by the JS css selectors.
    // Inputs:  ElementID   - Parent element of the html tags to be converted. If not passed in, it will grab from the entire DOM.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	knotiaFlatModernizeStandardTextBoxes: function (ElementID) {
	    var elementIDToUse = Globals.UI.useDivOuterDivElementIDForKnotia(ElementID);

	    if (Globals.UI.isSiteThemeEnabled()) {

	        $(elementIDToUse).find(".js--textbox--round-corners").addClass("text ui-widget-content ui-corner-all");
	        $(elementIDToUse).find(".js--textbox--adjust-width").css("width", "90%");
	        $(elementIDToUse).find(".js--textbox--adjust-width-medium").css("width", "50%");
	        $(elementIDToUse).find(".js--textbox--adjust-width-small").css("width", "25%");
	        $(elementIDToUse).find(".js--textarea--adjust-width").css("width", "80%");
	        
	        Globals.UI.knotiaFlatModernizeDatePickers(ElementID);

		}
	},

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.UI.knotiaFlatModernizeDatePickersWithJqWidgets
    // Desc:    For Future use - Convert the text boxes to modern jqWidgets designs and filters by the JS css selectors. 
    //          This also does hide the input element and add a div element to its parent because jqwedgets onlly works with div element
    // Inputs:  ElementID   - Parent element of the html tags to be converted. If not passed in, it will grab from the entire DOM.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	knotiaFlatModernizeDatePickersWithJqWidgets: function (ElementID) {
		if (!Globals.UI.isSiteThemeEnabled()) {
			return;
		}

	    var elementIDToUse = Globals.UI.useDivOuterDivElementIDForKnotia(ElementID);
	    var arrDatePickers = $(elementIDToUse).find(".js--textbox--convert-to-datepicker");
	    var arrLen = arrDatePickers.length;
	    var dateInputOptions = {
	        "width": '100px',
	        "height": '25px',
	        "formatString": 'yyyy-MM-dd',
	        "culture": calCultureType
	    };
        //commented in code review because this is un tested code in jqWidgets. Must be developed properly
	    //for (var i = 0; i < arrLen; i++) {
	    //    var currentElementID = arrDatePickers[i].id;
	    //    var calCultureType = GetString("CurrentLanguageAbbr") + '-CA';

	    //    $("#" + currentElementID).after("<div id='div" + currentElementID + "'></div>").hide();
            
	    //    $("#div" + currentElementID).jqxDateTimeInput(dateInputOptions).on('change', function (event) {
        //        // Put the value of selected date from DIV into the INPUT
	    //        var date = $(this).jqxDateTimeInput('value');
	    //        var formattedDate = $.jqx.dataFormat.formatdate(date, 'yyyy-MM-dd');
	    //        $("#" + this.id.replace("div", "")).val(formattedDate);
	    //    }).on('open', function (event) {
        //        // Close all the open calendars
	    //        for (var j = 0; j < arrLen; j++) {
	    //            if (i != j) {
	    //                $("#div" + arrDatePickers[j].id).jqxDateTimeInput('close');
	    //            }
	    //        }
	    //    });

        //    //Align the "end datepicker" to the right of the associated input
	    //    if (currentElementID === "datepickerEnd") {
	    //        $("#div" + currentElementID).jqxDateTimeInput({ dropDownHorizontalAlignment: 'right' });
	    //    }
	    //}
	},

    /*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.UI.knotiaFlatModernizeDatePickers
    // Desc:    Convert the text boxes to modern jQuery UI designs and filters by the JS css selectors.
    // Inputs:  ElementID   - Parent element of the html tags to be converted. If not passed in, it will grab from the entire DOM.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	knotiaFlatModernizeDatePickers: function (ElementID)
	{
	    var elementIDToUse = Globals.UI.useDivOuterDivElementIDForKnotia(ElementID);
	    if (Globals.UI.isSiteThemeEnabled()) {
	        // localzing the datepicker with the current language
	        $.datepicker.setDefaults($.datepicker.regional[GetString("CurrentLanguageAbbr")]);

	        var dateFormat = "yy-mm-dd";
	        if (document.dateFormat && document.dateFormat != "dd MMM yyyy") {
	        	dateFormat = document.dateFormat;
	        }


	        var datePickerOptions = {
	            "showOn" : "both",
	            "buttonImage" : "/UserControls/Toolbar/Images/KNOTIAFLAT/Icons/Flat-Calendar.png",
	            "buttonImageOnly" : true,
	            "buttonText" : GetString("str_ChooseDate"),
	            "dateFormat": dateFormat,
	            "beforeShow": function () {
	                setTimeout(function () {
	                    $(".ui-datepicker").css("z-index", "2001");
	                }, 250);
	            }
	        };
	        $(elementIDToUse).find(".js--textbox--convert-to-datepicker").datepicker(datePickerOptions);

	        var cssOptions = {
	            "vertical-align": "text-bottom",      
            };

	        $(elementIDToUse).find(".hasDatepicker").css(cssOptions);
            // Defining CSS options for Calendar 
	        cssOptions = {
	            "vertical-align": "text-bottom",
	            "position": "relative",
	            "right": "0px"
	        };

	        $(elementIDToUse).find(".ui-datepicker-trigger").css(cssOptions);
	        
	    }
	},

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// END OF jQUERY based UI tools
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // START OF HTML DOM tools
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name:    Globals.UI.observeDomChangeAttributeToObjectWithoutParameters
    // NOTE:    This will create a global document object called document.knotiaObserver if the MutationObserver object exists.
    //          look at this for an example: michalbe.blogspot.ca/2013/04/javascript-less-known-parts-dom.html
    // Desc:    This is a simplification of DOM change monitor for any attribute changes for a given objectID name. 
    //          If a modern browser is used then MutationObserver object is used other wise we bind the given object the
    //          DOMSubtreeModified method. (IE 9). For IE 8 propertychange event was added.
    // Inputs:  elementToObserve  - The element that we are trying to see what the changes are please put # at the begining of the ID value.
    //		    callBackFunction  - The funciton as an object e.g. if you have doWork() just pass it as doWork
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	observeDomChangeAttributeToObjectWithoutParameters: function (elementToObserve, callBackFunction) {
		var browserMutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;

		// if it is a modern browser.
		if (typeof browserMutationObserver != "undefined") {
			var objToObserve = document.querySelector(elementToObserve);
			var observerConfig = {
				attributes: true,
				childList: false,
				characterDate: false
			};
			document.knotiaObserver = new browserMutationObserver(function (mutations) {
				mutations.forEach(function (mutation) {
					if (mutation.type == "attributes") {
						callBackFunction();
					}
				});
			});
			document.knotiaObserver.observe(objToObserve, observerConfig);
		}
			// if we are using IE 9 & IE 8
		else {
			$(elementToObserve).on("DOMSubtreeModified propertychange", function () {
				callBackFunction();
			});
		}
	},
	/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // END OF HTML DOM tools
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

	// Name:    Globals.UI.selectAllTextInSpecifiedDiv
	selectAllTextInSpecifiedDiv: function (divID) {
		if (document.selection) {
			document.selection.empty();

			var range = document.body.createTextRange();
			range.moveToElementText(document.getElementById(divID));
			range.select();
		} else if (window.getSelection) {
			window.getSelection().removeAllRanges();

			var range = document.createRange();
			range.selectNode(document.getElementById(divID));
			window.getSelection().addRange(range);
		}
	},
	/*////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Name: Globals.UI.isSiteThemeEnabled
    // Desc: This method will determine if site thme is enabled or not.
    // Returns: True if the hdnField exists and the value is > 0 otherwise false.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	isSiteThemeEnabled: function () {
		var hdnField = $("#hdnUseSiteTheme");
		var returnValue = false;
		try {
			if (hdnField.length !== 0 && parseInt(hdnField.val(), 10) > 0) {
				returnValue = true;
			}
		}
		catch (e) {
			returnValue = false;
		}
		return returnValue;
	},

	/*////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.displayFadingMessage
	// Desc: displays a message that fades and disappears
	// Returns: nothing
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	displayFadingMessage: function (divID, message, timeToWaitBeforeFading) {
		if (timeToWaitBeforeFading == null) {
			timeToWaitBeforeFading = 990;
		}

		var div = $("#" + divID);
		div.html("<span class=\"fading-message\">" + message + "</span>");
		div.show();
		div.animate({ opacity: "1" }, 10).animate({ opacity: "1" }, timeToWaitBeforeFading).animate({ opacity: "0" }, 1000, function () { div.hide(); });
	},

	/*////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.fadeOut
	// Desc: fades a message out
	// Returns: nothing
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	fadeOut: function (divID) {
		var div = $("#" + divID);
		div.animate({ opacity: "0" }, 1000, function () { div.hide(); });
	},

	/*////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.handleEnterKeyPressInInputField
	// Desc: performs an action if the enter key is pressed in the specified input field
	// Returns: nothing
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	handleEnterKeyPressInInputField: function (inputFieldID, actionFunction) {
		$("#" + inputFieldID).on("keypress", function (event) {
			if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)) {
				actionFunction.call();
				event.stopPropagation();
				return false;
			}
		});
	},

	/*////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: Globals.UI.showProcessingStatusDialog
	// Desc: Opens a modal dialog with a "processing" message
	// Params: dialogContent: the text of the message, or null to close the dialog
	// Returns: nothing
	///////////////////////////////////////////////////////////////////////////////////////////////////////////*/
	showProcessingStatusDialog: function (dialogContent, includeCloseButton) {
		var fullDivJQObj = $("#processingStatusDialog");

		if (dialogContent == null) {
			this.removeProcessingStatusDialog();
			return;
		}

		if (fullDivJQObj.length == 0) {
			fullDivJQObj = $("<div id='processingStatusDialog' title='Processing'></div>").appendTo("body");
		}

		fullDivJQObj.dialog({
			modal: true
		});

		var content = "<p style='font-size:10pt;'>" + dialogContent + "</p>";
		if (includeCloseButton) {
			content += "<button onclick=\"$('#processingStatusDialog').empty().dialog('destroy').remove();\" style='font-size:10pt'>Close</button>";
		}

		fullDivJQObj.html(content);
	},

	removeProcessingStatusDialog: function () {
		var fullDivJQObj = $("#processingStatusDialog");
		if (fullDivJQObj.length > 0) {
			fullDivJQObj.empty().dialog('destroy').remove();
		}
	}
};
/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// END OF GLOBAL UI FUNCTIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
;
