From afe954db7da9f6460f0c4589fe3df5b45b761427 Mon Sep 17 00:00:00 2001 From: "breno.polanski" Date: Mon, 16 Nov 2015 18:57:16 -0300 Subject: [PATCH] Add component Dropdown --- src/main/resources/dist/saiku/saiku.min.js | 2 +- .../js/saiku/components/Dropdown/Dropdown.jsx | 27 +++++++++++++++++ .../components/Dropdown/DropdownItem.jsx | 0 .../js/saiku/components/Dropdown/README.md | 3 ++ .../js/saiku/components/Toolbar/Toolbar.jsx | 13 +++++++-- .../saiku/components/Toolbar/ToolbarItem.jsx | 2 +- .../src/js/saiku/components/Toolbar/data.json | 29 ++++++++++++++++++- 7 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/src/js/saiku/components/Dropdown/Dropdown.jsx create mode 100644 src/main/resources/src/js/saiku/components/Dropdown/DropdownItem.jsx create mode 100644 src/main/resources/src/js/saiku/components/Dropdown/README.md diff --git a/src/main/resources/dist/saiku/saiku.min.js b/src/main/resources/dist/saiku/saiku.min.js index 08181e8..6c057bc 100644 --- a/src/main/resources/dist/saiku/saiku.min.js +++ b/src/main/resources/dist/saiku/saiku.min.js @@ -19,4 +19,4 @@ },function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule onlyChild\n */\n'use strict';\n\nvar ReactElement = __webpack_require__(11);\n\nvar invariant = __webpack_require__(7);\n\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection. The current implementation of this\n * function assumes that a single child gets passed without a wrapper, but the\n * purpose of this helper function is to abstract away the particular structure\n * of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactComponent} The first and only `ReactComponent` contained in the\n * structure.\n */\nfunction onlyChild(children) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n ReactElement.isValidElement(children),\n 'onlyChild must be passed a children with exactly one child.'\n ) : invariant(ReactElement.isValidElement(children)));\n return children;\n}\n\nmodule.exports = onlyChild;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react/lib/onlyChild.js\n ** module id = 156\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react/lib/onlyChild.js?")},function(module,exports,__webpack_require__){eval("'use strict';\n\nvar _ = __webpack_require__(158);\nvar React = __webpack_require__(1);\nvar MenuBarCollection = __webpack_require__(159);\nvar MenuBarItem = __webpack_require__(163);\n\nvar MenuBar = React.createClass({\n displayName: 'MenuBar',\n\n collection: new MenuBarCollection(),\n\n getInitialState: function getInitialState() {\n return {\n models: ''\n };\n },\n\n componentDidMount: function componentDidMount() {\n this.collection.fetch({\n success: this.handleFetch\n });\n },\n\n handleFetch: function handleFetch(collection) {\n this.setState({\n models: collection.models\n });\n },\n\n render: function render() {\n var itemNode;\n\n if (this.state && !_.isEmpty(this.state.models)) {\n itemNode = this.state.models[0].getItem().map(function (item) {\n return React.createElement(MenuBarItem, { item: item });\n });\n }\n\n return React.createElement(\n 'nav',\n { className: 'top-bar', 'data-topbar': true, role: 'navigation' },\n itemNode\n );\n }\n});\n\nmodule.exports = MenuBar;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/js/saiku/components/MenuBar/MenuBar.jsx\n ** module id = 157\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/js/saiku/components/MenuBar/MenuBar.jsx?")},function(module,exports,__webpack_require__){eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Underscore.js 1.8.3\n// http://underscorejs.org\n// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` in the browser, or `exports` on the server.\n var root = this;\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var\n push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for the old `require()` API. If we're in\n // the browser, add `_` as a global object.\n if (true) {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.8.3';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n case 2: return function(value, other) {\n return func.call(context, value, other);\n };\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n // A mostly-internal function to generate callbacks that can be applied\n // to each element in a collection, returning the desired result — either\n // identity, an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value)) return _.matcher(value);\n return _.property(value);\n };\n _.iteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, undefinedOnly) {\n return function(obj) {\n var length = arguments.length;\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var property = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = property('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n function createReduce(dir) {\n // Optimized iterator function as using arguments.length\n // in the main function will deoptimize the, see #1991.\n function iterator(obj, iteratee, memo, keys, index, length) {\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n }\n\n return function(obj, iteratee, memo, context) {\n iteratee = optimizeCb(iteratee, context, 4);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n // Determine the initial value if none is provided.\n if (arguments.length < 3) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n return iterator(obj, iteratee, memo, keys, index, length);\n };\n }\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var key;\n if (isArrayLike(obj)) {\n key = _.findIndex(obj, predicate, context);\n } else {\n key = _.findKey(obj, predicate, context);\n }\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = function(obj, method) {\n var args = slice.call(arguments, 2);\n var isFunc = _.isFunction(method);\n return _.map(obj, function(value) {\n var func = isFunc ? method : value[method];\n return func == null ? func : func.apply(value, args);\n });\n };\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection, using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n _.shuffle = function(obj) {\n var set = isArrayLike(obj) ? obj : _.values(obj);\n var length = set.length;\n var shuffled = Array(length);\n for (var index = 0, rand; index < length; index++) {\n rand = _.random(0, index);\n if (rand !== index) shuffled[index] = shuffled[rand];\n shuffled[rand] = set[index];\n }\n return shuffled;\n };\n\n // Sample **n** random values from a collection.\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n return _.shuffle(obj).slice(0, Math.max(0, n));\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, index, list) {\n return {\n value: value,\n index: index,\n criteria: iteratee(value, index, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior) {\n return function(obj, iteratee, context) {\n var result = {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key]++; else result[key] = 1;\n });\n\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var pass = [], fail = [];\n _.each(obj, function(value, key, obj) {\n (predicate(value, key, obj) ? pass : fail).push(value);\n });\n return [pass, fail];\n };\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, _.identity);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, startIndex) {\n var output = [], idx = 0;\n for (var i = startIndex || 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n //flatten current level of array or arguments object\n if (!shallow) value = flatten(value, shallow, strict);\n var j = 0, len = value.length;\n output.length += len;\n while (j < len) {\n output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = function(array) {\n return _.difference(array, slice.call(arguments, 1));\n };\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = function() {\n return _.uniq(flatten(arguments, true, true));\n };\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n for (var j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = function(array) {\n var rest = flatten(arguments, true, true, 1);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = function() {\n return _.unzip(arguments);\n };\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions\n function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n }\n\n // Returns the first index on an array-like that passes a predicate test\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions\n function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n }\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n step = step || 1;\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = function(func, context) {\n if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var args = slice.call(arguments, 2);\n var bound = function() {\n return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));\n };\n return bound;\n };\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder, allowing any combination of arguments to be pre-filled.\n _.partial = function(func) {\n var boundArgs = slice.call(arguments, 1);\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n };\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = function(obj) {\n var i, length = arguments.length, key;\n if (length <= 1) throw new Error('bindAll must be passed function names');\n for (i = 1; i < length; i++) {\n key = arguments[i];\n obj[key] = _.bind(obj[key], obj);\n }\n return obj;\n };\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){\n return func.apply(null, args);\n }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n\n var later = function() {\n var last = _.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function() {\n context = this;\n args = arguments;\n timestamp = _.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n function collectNonEnumProps(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n }\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object\n // In contrast to _.map it returns an object\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {},\n currentKey;\n for (var index = 0; index < length; index++) {\n currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s)\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = function(object, oiteratee, context) {\n var result = {}, obj = object, iteratee, keys;\n if (obj == null) return result;\n if (_.isFunction(oiteratee)) {\n keys = _.allKeys(obj);\n iteratee = optimizeCb(oiteratee, context);\n } else {\n keys = flatten(arguments, false, false, 1);\n iteratee = function(value, key, obj) { return key in obj; };\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n };\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = function(obj, iteratee, context) {\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n } else {\n var keys = _.map(flatten(arguments, false, false, 1), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n };\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return _.has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), and in Safari 8 (#1929).\n if (typeof /./ != 'function' && typeof Int8Array != 'object') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n _.isNaN = function(obj) {\n return _.isNumber(obj) && obj !== +obj;\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n _.property = property;\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n return obj == null ? function(){} : function(key) {\n return obj[key];\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // If the value of the named `property` is a function then invoke it with the\n // `object` as context; otherwise, return it.\n _.result = function(object, property, fallback) {\n var value = object == null ? void 0 : object[property];\n if (value === void 0) {\n value = fallback;\n }\n return _.isFunction(value) ? value.call(object) : value;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escaper = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escaper, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offest.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n try {\n var render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var result = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return result(this, func.apply(_, args));\n };\n });\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return result(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return result(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return '' + this._wrapped;\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (true) {\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {\n return _;\n }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n }\n}.call(this));\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/underscore/underscore.js\n ** module id = 158\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/underscore/underscore.js?"); },function(module,exports,__webpack_require__){eval("'use strict';\n\nvar jquery = __webpack_require__(160);\nvar _ = __webpack_require__(158);\nvar Backbone = __webpack_require__(161);\nvar MenuBarModel = __webpack_require__(162);\n\nvar MenuBarCollection = Backbone.Collection.extend({\n model: MenuBarModel,\n url: 'http://localhost:3000/menubar'\n});\n\nmodule.exports = MenuBarCollection;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/js/saiku/components/MenuBar/MenuBarCollection.js\n ** module id = 159\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/js/saiku/components/MenuBar/MenuBarCollection.js?")},function(module,exports,__webpack_require__){eval('var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery JavaScript Library v2.1.4\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-04-28T16:01Z\n */\n\n(function( global, factory ) {\n\n if ( typeof module === "object" && typeof module.exports === "object" ) {\n // For CommonJS and CommonJS-like environments where a proper `window`\n // is present, execute the factory and get jQuery.\n // For environments that do not have a `window` with a `document`\n // (such as Node.js), expose a factory as module.exports.\n // This accentuates the need for the creation of a real `window`.\n // e.g. var jQuery = require("jquery")(window);\n // See ticket #14549 for more info.\n module.exports = global.document ?\n factory( global, true ) :\n function( w ) {\n if ( !w.document ) {\n throw new Error( "jQuery requires a window with a document" );\n }\n return factory( w );\n };\n } else {\n factory( global );\n }\n\n// Pass this if window is not defined yet\n}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can\'t be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through "use strict" call chains. (#13335)\n//\n\nvar arr = [];\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n // Use the correct document accordingly with window argument (sandbox)\n document = window.document,\n\n version = "2.1.4",\n\n // Define a local copy of jQuery\n jQuery = function( selector, context ) {\n // The jQuery object is actually just the init constructor \'enhanced\'\n // Need init if jQuery is called (just allow error to be thrown if not included)\n return new jQuery.fn.init( selector, context );\n },\n\n // Support: Android<4.1\n // Make sure we trim BOM and NBSP\n rtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n // Matches dashed string for camelizing\n rmsPrefix = /^-ms-/,\n rdashAlpha = /-([\\da-z])/gi,\n\n // Used by jQuery.camelCase as callback to replace()\n fcamelCase = function( all, letter ) {\n return letter.toUpperCase();\n };\n\njQuery.fn = jQuery.prototype = {\n // The current version of jQuery being used\n jquery: version,\n\n constructor: jQuery,\n\n // Start with an empty selector\n selector: "",\n\n // The default length of a jQuery object is 0\n length: 0,\n\n toArray: function() {\n return slice.call( this );\n },\n\n // Get the Nth element in the matched element set OR\n // Get the whole matched element set as a clean array\n get: function( num ) {\n return num != null ?\n\n // Return just the one element from the set\n ( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n // Return all the elements in a clean array\n slice.call( this );\n },\n\n // Take an array of elements and push it onto the stack\n // (returning the new matched element set)\n pushStack: function( elems ) {\n\n // Build a new jQuery matched element set\n var ret = jQuery.merge( this.constructor(), elems );\n\n // Add the old object onto the stack (as a reference)\n ret.prevObject = this;\n ret.context = this.context;\n\n // Return the newly-formed element set\n return ret;\n },\n\n // Execute a callback for every element in the matched set.\n // (You can seed the arguments with an array of args, but this is\n // only used internally.)\n each: function( callback, args ) {\n return jQuery.each( this, callback, args );\n },\n\n map: function( callback ) {\n return this.pushStack( jQuery.map(this, function( elem, i ) {\n return callback.call( elem, i, elem );\n }));\n },\n\n slice: function() {\n return this.pushStack( slice.apply( this, arguments ) );\n },\n\n first: function() {\n return this.eq( 0 );\n },\n\n last: function() {\n return this.eq( -1 );\n },\n\n eq: function( i ) {\n var len = this.length,\n j = +i + ( i < 0 ? len : 0 );\n return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );\n },\n\n end: function() {\n return this.prevObject || this.constructor(null);\n },\n\n // For internal use only.\n // Behaves like an Array\'s method, not like a jQuery method.\n push: push,\n sort: arr.sort,\n splice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n var options, name, src, copy, copyIsArray, clone,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false;\n\n // Handle a deep copy situation\n if ( typeof target === "boolean" ) {\n deep = target;\n\n // Skip the boolean and the target\n target = arguments[ i ] || {};\n i++;\n }\n\n // Handle case when target is a string or something (possible in deep copy)\n if ( typeof target !== "object" && !jQuery.isFunction(target) ) {\n target = {};\n }\n\n // Extend jQuery itself if only one argument is passed\n if ( i === length ) {\n target = this;\n i--;\n }\n\n for ( ; i < length; i++ ) {\n // Only deal with non-null/undefined values\n if ( (options = arguments[ i ]) != null ) {\n // Extend the base object\n for ( name in options ) {\n src = target[ name ];\n copy = options[ name ];\n\n // Prevent never-ending loop\n if ( target === copy ) {\n continue;\n }\n\n // Recurse if we\'re merging plain objects or arrays\n if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\n if ( copyIsArray ) {\n copyIsArray = false;\n clone = src && jQuery.isArray(src) ? src : [];\n\n } else {\n clone = src && jQuery.isPlainObject(src) ? src : {};\n }\n\n // Never move original objects, clone them\n target[ name ] = jQuery.extend( deep, clone, copy );\n\n // Don\'t bring in undefined values\n } else if ( copy !== undefined ) {\n target[ name ] = copy;\n }\n }\n }\n }\n\n // Return the modified object\n return target;\n};\n\njQuery.extend({\n // Unique for each copy of jQuery on the page\n expando: "jQuery" + ( version + Math.random() ).replace( /\\D/g, "" ),\n\n // Assume jQuery is ready without the ready module\n isReady: true,\n\n error: function( msg ) {\n throw new Error( msg );\n },\n\n noop: function() {},\n\n isFunction: function( obj ) {\n return jQuery.type(obj) === "function";\n },\n\n isArray: Array.isArray,\n\n isWindow: function( obj ) {\n return obj != null && obj === obj.window;\n },\n\n isNumeric: function( obj ) {\n // parseFloat NaNs numeric-cast false positives (null|true|false|"")\n // ...but misinterprets leading-number strings, particularly hex literals ("0x...")\n // subtraction forces infinities to NaN\n // adding 1 corrects loss of precision from parseFloat (#15100)\n return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;\n },\n\n isPlainObject: function( obj ) {\n // Not plain objects:\n // - Any object or value whose internal [[Class]] property is not "[object Object]"\n // - DOM nodes\n // - window\n if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {\n return false;\n }\n\n if ( obj.constructor &&\n !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {\n return false;\n }\n\n // If the function hasn\'t returned already, we\'re confident that\n // |obj| is a plain object, created by {} or constructed with new Object\n return true;\n },\n\n isEmptyObject: function( obj ) {\n var name;\n for ( name in obj ) {\n return false;\n }\n return true;\n },\n\n type: function( obj ) {\n if ( obj == null ) {\n return obj + "";\n }\n // Support: Android<4.0, iOS<6 (functionish RegExp)\n return typeof obj === "object" || typeof obj === "function" ?\n class2type[ toString.call(obj) ] || "object" :\n typeof obj;\n },\n\n // Evaluates a script in a global context\n globalEval: function( code ) {\n var script,\n indirect = eval;\n\n code = jQuery.trim( code );\n\n if ( code ) {\n // If the code includes a valid, prologue position\n // strict mode pragma, execute code by injecting a\n // script tag into the document.\n if ( code.indexOf("use strict") === 1 ) {\n script = document.createElement("script");\n script.text = code;\n document.head.appendChild( script ).parentNode.removeChild( script );\n } else {\n // Otherwise, avoid the DOM node creation, insertion\n // and removal by using an indirect global eval\n indirect( code );\n }\n }\n },\n\n // Convert dashed to camelCase; used by the css and data modules\n // Support: IE9-11+\n // Microsoft forgot to hump their vendor prefix (#9572)\n camelCase: function( string ) {\n return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );\n },\n\n nodeName: function( elem, name ) {\n return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n },\n\n // args is for internal usage only\n each: function( obj, callback, args ) {\n var value,\n i = 0,\n length = obj.length,\n isArray = isArraylike( obj );\n\n if ( args ) {\n if ( isArray ) {\n for ( ; i < length; i++ ) {\n value = callback.apply( obj[ i ], args );\n\n if ( value === false ) {\n break;\n }\n }\n } else {\n for ( i in obj ) {\n value = callback.apply( obj[ i ], args );\n\n if ( value === false ) {\n break;\n }\n }\n }\n\n // A special, fast, case for the most common use of each\n } else {\n if ( isArray ) {\n for ( ; i < length; i++ ) {\n value = callback.call( obj[ i ], i, obj[ i ] );\n\n if ( value === false ) {\n break;\n }\n }\n } else {\n for ( i in obj ) {\n value = callback.call( obj[ i ], i, obj[ i ] );\n\n if ( value === false ) {\n break;\n }\n }\n }\n }\n\n return obj;\n },\n\n // Support: Android<4.1\n trim: function( text ) {\n return text == null ?\n "" :\n ( text + "" ).replace( rtrim, "" );\n },\n\n // results is for internal usage only\n makeArray: function( arr, results ) {\n var ret = results || [];\n\n if ( arr != null ) {\n if ( isArraylike( Object(arr) ) ) {\n jQuery.merge( ret,\n typeof arr === "string" ?\n [ arr ] : arr\n );\n } else {\n push.call( ret, arr );\n }\n }\n\n return ret;\n },\n\n inArray: function( elem, arr, i ) {\n return arr == null ? -1 : indexOf.call( arr, elem, i );\n },\n\n merge: function( first, second ) {\n var len = +second.length,\n j = 0,\n i = first.length;\n\n for ( ; j < len; j++ ) {\n first[ i++ ] = second[ j ];\n }\n\n first.length = i;\n\n return first;\n },\n\n grep: function( elems, callback, invert ) {\n var callbackInverse,\n matches = [],\n i = 0,\n length = elems.length,\n callbackExpect = !invert;\n\n // Go through the array, only saving the items\n // that pass the validator function\n for ( ; i < length; i++ ) {\n callbackInverse = !callback( elems[ i ], i );\n if ( callbackInverse !== callbackExpect ) {\n matches.push( elems[ i ] );\n }\n }\n\n return matches;\n },\n\n // arg is for internal usage only\n map: function( elems, callback, arg ) {\n var value,\n i = 0,\n length = elems.length,\n isArray = isArraylike( elems ),\n ret = [];\n\n // Go through the array, translating each of the items to their new values\n if ( isArray ) {\n for ( ; i < length; i++ ) {\n value = callback( elems[ i ], i, arg );\n\n if ( value != null ) {\n ret.push( value );\n }\n }\n\n // Go through every key on the object,\n } else {\n for ( i in elems ) {\n value = callback( elems[ i ], i, arg );\n\n if ( value != null ) {\n ret.push( value );\n }\n }\n }\n\n // Flatten any nested arrays\n return concat.apply( [], ret );\n },\n\n // A global GUID counter for objects\n guid: 1,\n\n // Bind a function to a context, optionally partially applying any\n // arguments.\n proxy: function( fn, context ) {\n var tmp, args, proxy;\n\n if ( typeof context === "string" ) {\n tmp = fn[ context ];\n context = fn;\n fn = tmp;\n }\n\n // Quick check to determine if target is callable, in the spec\n // this throws a TypeError, but we will just return undefined.\n if ( !jQuery.isFunction( fn ) ) {\n return undefined;\n }\n\n // Simulated bind\n args = slice.call( arguments, 2 );\n proxy = function() {\n return fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n };\n\n // Set the guid of unique handler to the same of original handler, so it can be removed\n proxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n return proxy;\n },\n\n now: Date.now,\n\n // jQuery.support is not used in Core but other projects attach their\n // properties to it so it needs to exist.\n support: support\n});\n\n// Populate the class2type map\njQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {\n class2type[ "[object " + name + "]" ] = name.toLowerCase();\n});\n\nfunction isArraylike( obj ) {\n\n // Support: iOS 8.2 (not reproducible in simulator)\n // `in` check used to prevent JIT error (gh-2145)\n // hasOwn isn\'t used here due to false negatives\n // regarding Nodelist length in IE\n var length = "length" in obj && obj.length,\n type = jQuery.type( obj );\n\n if ( type === "function" || jQuery.isWindow( obj ) ) {\n return false;\n }\n\n if ( obj.nodeType === 1 && length ) {\n return true;\n }\n\n return type === "array" || length === 0 ||\n typeof length === "number" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.0-pre\n * http://sizzlejs.com/\n *\n * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2014-12-16\n */\n(function( window ) {\n\nvar i,\n support,\n Expr,\n getText,\n isXML,\n tokenize,\n compile,\n select,\n outermostContext,\n sortInput,\n hasDuplicate,\n\n // Local document vars\n setDocument,\n document,\n docElem,\n documentIsHTML,\n rbuggyQSA,\n rbuggyMatches,\n matches,\n contains,\n\n // Instance-specific data\n expando = "sizzle" + 1 * new Date(),\n preferredDoc = window.document,\n dirruns = 0,\n done = 0,\n classCache = createCache(),\n tokenCache = createCache(),\n compilerCache = createCache(),\n sortOrder = function( a, b ) {\n if ( a === b ) {\n hasDuplicate = true;\n }\n return 0;\n },\n\n // General-purpose constants\n MAX_NEGATIVE = 1 << 31,\n\n // Instance methods\n hasOwn = ({}).hasOwnProperty,\n arr = [],\n pop = arr.pop,\n push_native = arr.push,\n push = arr.push,\n slice = arr.slice,\n // Use a stripped-down indexOf as it\'s faster than native\n // http://jsperf.com/thor-indexof-vs-for/5\n indexOf = function( list, elem ) {\n var i = 0,\n len = list.length;\n for ( ; i < len; i++ ) {\n if ( list[i] === elem ) {\n return i;\n }\n }\n return -1;\n },\n\n booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",\n\n // Regular expressions\n\n // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace\n whitespace = "[\\\\x20\\\\t\\\\r\\\\n\\\\f]",\n // http://www.w3.org/TR/css3-syntax/#characters\n characterEncoding = "(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",\n\n // Loosely modeled on CSS identifier characters\n // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors\n // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n identifier = characterEncoding.replace( "w", "w#" ),\n\n // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n attributes = "\\\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +\n // Operator (capture 2)\n "*([*^$|!~]?=)" + whitespace +\n // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"\n "*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|(" + identifier + "))|)" + whitespace +\n "*\\\\]",\n\n pseudos = ":(" + characterEncoding + ")(?:\\\\((" +\n // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n // 1. quoted (capture 3; capture 4 or capture 5)\n "(\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|" +\n // 2. simple (capture 6)\n "((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|" + attributes + ")*)|" +\n // 3. anything else (capture 2)\n ".*" +\n ")\\\\)|)",\n\n // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n rwhitespace = new RegExp( whitespace + "+", "g" ),\n rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)" + whitespace + "+$", "g" ),\n\n rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),\n rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),\n\n rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\\\]\'\\"]*?)" + whitespace + "*\\\\]", "g" ),\n\n rpseudo = new RegExp( pseudos ),\n ridentifier = new RegExp( "^" + identifier + "$" ),\n\n matchExpr = {\n "ID": new RegExp( "^#(" + characterEncoding + ")" ),\n "CLASS": new RegExp( "^\\\\.(" + characterEncoding + ")" ),\n "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),\n "ATTR": new RegExp( "^" + attributes ),\n "PSEUDO": new RegExp( "^" + pseudos ),\n "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(" + whitespace +\n "*(even|odd|(([+-]|)(\\\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +\n "*(\\\\d+)|))" + whitespace + "*\\\\)|)", "i" ),\n "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),\n // For use in libraries implementing .is()\n // We use this for POS matching in `select`\n "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(" +\n whitespace + "*((?:-\\\\d)?\\\\d*)" + whitespace + "*\\\\)|)(?=[^-]|$)", "i" )\n },\n\n rinputs = /^(?:input|select|textarea|button)$/i,\n rheader = /^h\\d$/i,\n\n rnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n // Easily-parseable/retrievable ID or TAG or CLASS selectors\n rquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n rsibling = /[+~]/,\n rescape = /\'|\\\\/g,\n\n // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n runescape = new RegExp( "\\\\\\\\([\\\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),\n funescape = function( _, escaped, escapedWhitespace ) {\n var high = "0x" + escaped - 0x10000;\n // NaN means non-codepoint\n // Support: Firefox<24\n // Workaround erroneous numeric interpretation of +"0x"\n return high !== high || escapedWhitespace ?\n escaped :\n high < 0 ?\n // BMP codepoint\n String.fromCharCode( high + 0x10000 ) :\n // Supplemental Plane codepoint (surrogate pair)\n String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n },\n\n // Used for iframes\n // See setDocument()\n // Removing the function wrapper causes a "Permission Denied"\n // error in IE\n unloadHandler = function() {\n setDocument();\n };\n\n// Optimize for push.apply( _, NodeList )\ntry {\n push.apply(\n (arr = slice.call( preferredDoc.childNodes )),\n preferredDoc.childNodes\n );\n // Support: Android<4.0\n // Detect silently failing push.apply\n arr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n push = { apply: arr.length ?\n\n // Leverage slice if possible\n function( target, els ) {\n push_native.apply( target, slice.call(els) );\n } :\n\n // Support: IE<9\n // Otherwise append directly\n function( target, els ) {\n var j = target.length,\n i = 0;\n // Can\'t trust NodeList.length\n while ( (target[j++] = els[i++]) ) {}\n target.length = j - 1;\n }\n };\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n var match, elem, m, nodeType,\n // QSA vars\n i, groups, old, nid, newContext, newSelector;\n\n if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n setDocument( context );\n }\n\n context = context || document;\n results = results || [];\n nodeType = context.nodeType;\n\n if ( typeof selector !== "string" || !selector ||\n nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n return results;\n }\n\n if ( !seed && documentIsHTML ) {\n\n // Try to shortcut find operations when possible (e.g., not under DocumentFragment)\n if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n // Speed-up: Sizzle("#ID")\n if ( (m = match[1]) ) {\n if ( nodeType === 9 ) {\n elem = context.getElementById( m );\n // Check parentNode to catch when Blackberry 4.6 returns\n // nodes that are no longer in the document (jQuery #6963)\n if ( elem && elem.parentNode ) {\n // Handle the case where IE, Opera, and Webkit return items\n // by name instead of ID\n if ( elem.id === m ) {\n results.push( elem );\n return results;\n }\n } else {\n return results;\n }\n } else {\n // Context is not a document\n if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\n contains( context, elem ) && elem.id === m ) {\n results.push( elem );\n return results;\n }\n }\n\n // Speed-up: Sizzle("TAG")\n } else if ( match[2] ) {\n push.apply( results, context.getElementsByTagName( selector ) );\n return results;\n\n // Speed-up: Sizzle(".CLASS")\n } else if ( (m = match[3]) && support.getElementsByClassName ) {\n push.apply( results, context.getElementsByClassName( m ) );\n return results;\n }\n }\n\n // QSA path\n if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n nid = old = expando;\n newContext = context;\n newSelector = nodeType !== 1 && selector;\n\n // qSA works strangely on Element-rooted queries\n // We can work around this by specifying an extra ID on the root\n // and working up from there (Thanks to Andrew Dupont for the technique)\n // IE 8 doesn\'t work on object elements\n if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {\n groups = tokenize( selector );\n\n if ( (old = context.getAttribute("id")) ) {\n nid = old.replace( rescape, "\\\\$&" );\n } else {\n context.setAttribute( "id", nid );\n }\n nid = "[id=\'" + nid + "\'] ";\n\n i = groups.length;\n while ( i-- ) {\n groups[i] = nid + toSelector( groups[i] );\n }\n newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;\n newSelector = groups.join(",");\n }\n\n if ( newSelector ) {\n try {\n push.apply( results,\n newContext.querySelectorAll( newSelector )\n );\n return results;\n } catch(qsaError) {\n } finally {\n if ( !old ) {\n context.removeAttribute("id");\n }\n }\n }\n }\n }\n\n // All others\n return select( selector.replace( rtrim, "$1" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {Function(string, Object)} Returns the Object data after storing it on itself with\n * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n * deleting the oldest entry\n */\nfunction createCache() {\n var keys = [];\n\n function cache( key, value ) {\n // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)\n if ( keys.push( key + " " ) > Expr.cacheLength ) {\n // Only keep the most recent entries\n delete cache[ keys.shift() ];\n }\n return (cache[ key + " " ] = value);\n }\n return cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n fn[ expando ] = true;\n return fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n var div = document.createElement("div");\n\n try {\n return !!fn( div );\n } catch (e) {\n return false;\n } finally {\n // Remove from its parent by default\n if ( div.parentNode ) {\n div.parentNode.removeChild( div );\n }\n // release memory in IE\n div = null;\n }\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n var arr = attrs.split("|"),\n i = attrs.length;\n\n while ( i-- ) {\n Expr.attrHandle[ arr[i] ] = handler;\n }\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n var cur = b && a,\n diff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n ( ~b.sourceIndex || MAX_NEGATIVE ) -\n ( ~a.sourceIndex || MAX_NEGATIVE );\n\n // Use IE sourceIndex if available on both nodes\n if ( diff ) {\n return diff;\n }\n\n // Check if b follows a\n if ( cur ) {\n while ( (cur = cur.nextSibling) ) {\n if ( cur === b ) {\n return -1;\n }\n }\n }\n\n return a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n return function( elem ) {\n var name = elem.nodeName.toLowerCase();\n return name === "input" && elem.type === type;\n };\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n return function( elem ) {\n var name = elem.nodeName.toLowerCase();\n return (name === "input" || name === "button") && elem.type === type;\n };\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n return markFunction(function( argument ) {\n argument = +argument;\n return markFunction(function( seed, matches ) {\n var j,\n matchIndexes = fn( [], seed.length, argument ),\n i = matchIndexes.length;\n\n // Match elements found at the specified indexes\n while ( i-- ) {\n if ( seed[ (j = matchIndexes[i]) ] ) {\n seed[j] = !(matches[j] = seed[j]);\n }\n }\n });\n });\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n return context && typeof context.getElementsByTagName !== "undefined" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n // documentElement is verified for cases where it doesn\'t yet exist\n // (such as loading iframes in IE - #4833)\n var documentElement = elem && (elem.ownerDocument || elem).documentElement;\n return documentElement ? documentElement.nodeName !== "HTML" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n var hasCompare, parent,\n doc = node ? node.ownerDocument || node : preferredDoc;\n\n // If no document and documentElement is available, return\n if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n return document;\n }\n\n // Set our document\n document = doc;\n docElem = doc.documentElement;\n parent = doc.defaultView;\n\n // Support: IE>8\n // If iframe document is assigned to "document" variable and if iframe has been reloaded,\n // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936\n // IE6-8 do not support the defaultView property so parent will be undefined\n if ( parent && parent !== parent.top ) {\n // IE11 does not have attachEvent, so all must suffer\n if ( parent.addEventListener ) {\n parent.addEventListener( "unload", unloadHandler, false );\n } else if ( parent.attachEvent ) {\n parent.attachEvent( "onunload", unloadHandler );\n }\n }\n\n /* Support tests\n ---------------------------------------------------------------------- */\n documentIsHTML = !isXML( doc );\n\n /* Attributes\n ---------------------------------------------------------------------- */\n\n // Support: IE<8\n // Verify that getAttribute really returns attributes and not properties\n // (excepting IE8 booleans)\n support.attributes = assert(function( div ) {\n div.className = "i";\n return !div.getAttribute("className");\n });\n\n /* getElement(s)By*\n ---------------------------------------------------------------------- */\n\n // Check if getElementsByTagName("*") returns only elements\n support.getElementsByTagName = assert(function( div ) {\n div.appendChild( doc.createComment("") );\n return !div.getElementsByTagName("*").length;\n });\n\n // Support: IE<9\n support.getElementsByClassName = rnative.test( doc.getElementsByClassName );\n\n // Support: IE<10\n // Check if getElementById returns elements by name\n // The broken getElementById methods don\'t pick up programatically-set names,\n // so use a roundabout getElementsByName test\n support.getById = assert(function( div ) {\n docElem.appendChild( div ).id = expando;\n return !doc.getElementsByName || !doc.getElementsByName( expando ).length;\n });\n\n // ID find and filter\n if ( support.getById ) {\n Expr.find["ID"] = function( id, context ) {\n if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {\n var m = context.getElementById( id );\n // Check parentNode to catch when Blackberry 4.6 returns\n // nodes that are no longer in the document #6963\n return m && m.parentNode ? [ m ] : [];\n }\n };\n Expr.filter["ID"] = function( id ) {\n var attrId = id.replace( runescape, funescape );\n return function( elem ) {\n return elem.getAttribute("id") === attrId;\n };\n };\n } else {\n // Support: IE6/7\n // getElementById is not reliable as a find shortcut\n delete Expr.find["ID"];\n\n Expr.filter["ID"] = function( id ) {\n var attrId = id.replace( runescape, funescape );\n return function( elem ) {\n var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");\n return node && node.value === attrId;\n };\n };\n }\n\n // Tag\n Expr.find["TAG"] = support.getElementsByTagName ?\n function( tag, context ) {\n if ( typeof context.getElementsByTagName !== "undefined" ) {\n return context.getElementsByTagName( tag );\n\n // DocumentFragment nodes don\'t have gEBTN\n } else if ( support.qsa ) {\n return context.querySelectorAll( tag );\n }\n } :\n\n function( tag, context ) {\n var elem,\n tmp = [],\n i = 0,\n // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n results = context.getElementsByTagName( tag );\n\n // Filter out possible comments\n if ( tag === "*" ) {\n while ( (elem = results[i++]) ) {\n if ( elem.nodeType === 1 ) {\n tmp.push( elem );\n }\n }\n\n return tmp;\n }\n return results;\n };\n\n // Class\n Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {\n if ( documentIsHTML ) {\n return context.getElementsByClassName( className );\n }\n };\n\n /* QSA/matchesSelector\n ---------------------------------------------------------------------- */\n\n // QSA and matchesSelector support\n\n // matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n rbuggyMatches = [];\n\n // qSa(:focus) reports false when true (Chrome 21)\n // We allow this because of a bug in IE8/9 that throws an error\n // whenever `document.activeElement` is accessed on an iframe\n // So, we allow :focus to pass through QSA all the time to avoid the IE error\n // See http://bugs.jquery.com/ticket/13378\n rbuggyQSA = [];\n\n if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {\n // Build QSA regex\n // Regex strategy adopted from Diego Perini\n assert(function( div ) {\n // Select is set to empty string on purpose\n // This is to test IE\'s treatment of not explicitly\n // setting a boolean content attribute,\n // since its presence should be enough\n // http://bugs.jquery.com/ticket/12359\n docElem.appendChild( div ).innerHTML = "" +\n "";\n\n // Support: IE8, Opera 11-12.16\n // Nothing should be selected when empty strings follow ^= or $= or *=\n // The test attribute must be unknown in Opera but "safe" for WinRT\n // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n if ( div.querySelectorAll("[msallowcapture^=\'\']").length ) {\n rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\'\'|\\"\\")" );\n }\n\n // Support: IE8\n // Boolean attributes and "value" are not treated correctly\n if ( !div.querySelectorAll("[selected]").length ) {\n rbuggyQSA.push( "\\\\[" + whitespace + "*(?:value|" + booleans + ")" );\n }\n\n // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+\n if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {\n rbuggyQSA.push("~=");\n }\n\n // Webkit/Opera - :checked should return selected option elements\n // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n // IE8 throws error here and will not see later tests\n if ( !div.querySelectorAll(":checked").length ) {\n rbuggyQSA.push(":checked");\n }\n\n // Support: Safari 8+, iOS 8+\n // https://bugs.webkit.org/show_bug.cgi?id=136851\n // In-page `selector#id sibing-combinator selector` fails\n if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {\n rbuggyQSA.push(".#.+[+~]");\n }\n });\n\n assert(function( div ) {\n // Support: Windows 8 Native Apps\n // The type and name attributes are restricted during .innerHTML assignment\n var input = doc.createElement("input");\n input.setAttribute( "type", "hidden" );\n div.appendChild( input ).setAttribute( "name", "D" );\n\n // Support: IE8\n // Enforce case-sensitivity of name attribute\n if ( div.querySelectorAll("[name=d]").length ) {\n rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );\n }\n\n // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n // IE8 throws error here and will not see later tests\n if ( !div.querySelectorAll(":enabled").length ) {\n rbuggyQSA.push( ":enabled", ":disabled" );\n }\n\n // Opera 10-11 does not throw on post-comma invalid pseudos\n div.querySelectorAll("*,:x");\n rbuggyQSA.push(",.*:");\n });\n }\n\n if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n docElem.webkitMatchesSelector ||\n docElem.mozMatchesSelector ||\n docElem.oMatchesSelector ||\n docElem.msMatchesSelector) )) ) {\n\n assert(function( div ) {\n // Check to see if it\'s possible to do matchesSelector\n // on a disconnected node (IE 9)\n support.disconnectedMatch = matches.call( div, "div" );\n\n // This should fail with an exception\n // Gecko does not error, returns false instead\n matches.call( div, "[s!=\'\']:x" );\n rbuggyMatches.push( "!=", pseudos );\n });\n }\n\n rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );\n rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );\n\n /* Contains\n ---------------------------------------------------------------------- */\n hasCompare = rnative.test( docElem.compareDocumentPosition );\n\n // Element contains another\n // Purposefully does not implement inclusive descendent\n // As in, an element does not contain itself\n contains = hasCompare || rnative.test( docElem.contains ) ?\n function( a, b ) {\n var adown = a.nodeType === 9 ? a.documentElement : a,\n bup = b && b.parentNode;\n return a === bup || !!( bup && bup.nodeType === 1 && (\n adown.contains ?\n adown.contains( bup ) :\n a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n ));\n } :\n function( a, b ) {\n if ( b ) {\n while ( (b = b.parentNode) ) {\n if ( b === a ) {\n return true;\n }\n }\n }\n return false;\n };\n\n /* Sorting\n ---------------------------------------------------------------------- */\n\n // Document order sorting\n sortOrder = hasCompare ?\n function( a, b ) {\n\n // Flag for duplicate removal\n if ( a === b ) {\n hasDuplicate = true;\n return 0;\n }\n\n // Sort on method existence if only one input has compareDocumentPosition\n var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n if ( compare ) {\n return compare;\n }\n\n // Calculate position if both inputs belong to the same document\n compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n a.compareDocumentPosition( b ) :\n\n // Otherwise we know they are disconnected\n 1;\n\n // Disconnected nodes\n if ( compare & 1 ||\n (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n // Choose the first element that is related to our preferred document\n if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n return -1;\n }\n if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n return 1;\n }\n\n // Maintain original order\n return sortInput ?\n ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n 0;\n }\n\n return compare & 4 ? -1 : 1;\n } :\n function( a, b ) {\n // Exit early if the nodes are identical\n if ( a === b ) {\n hasDuplicate = true;\n return 0;\n }\n\n var cur,\n i = 0,\n aup = a.parentNode,\n bup = b.parentNode,\n ap = [ a ],\n bp = [ b ];\n\n // Parentless nodes are either documents or disconnected\n if ( !aup || !bup ) {\n return a === doc ? -1 :\n b === doc ? 1 :\n aup ? -1 :\n bup ? 1 :\n sortInput ?\n ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n 0;\n\n // If the nodes are siblings, we can do a quick check\n } else if ( aup === bup ) {\n return siblingCheck( a, b );\n }\n\n // Otherwise we need full lists of their ancestors for comparison\n cur = a;\n while ( (cur = cur.parentNode) ) {\n ap.unshift( cur );\n }\n cur = b;\n while ( (cur = cur.parentNode) ) {\n bp.unshift( cur );\n }\n\n // Walk down the tree looking for a discrepancy\n while ( ap[i] === bp[i] ) {\n i++;\n }\n\n return i ?\n // Do a sibling check if the nodes have a common ancestor\n siblingCheck( ap[i], bp[i] ) :\n\n // Otherwise nodes in our document sort first\n ap[i] === preferredDoc ? -1 :\n bp[i] === preferredDoc ? 1 :\n 0;\n };\n\n return doc;\n};\n\nSizzle.matches = function( expr, elements ) {\n return Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n // Set document vars if needed\n if ( ( elem.ownerDocument || elem ) !== document ) {\n setDocument( elem );\n }\n\n // Make sure that attribute selectors are quoted\n expr = expr.replace( rattributeQuotes, "=\'$1\']" );\n\n if ( support.matchesSelector && documentIsHTML &&\n ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n try {\n var ret = matches.call( elem, expr );\n\n // IE 9\'s matchesSelector returns false on disconnected nodes\n if ( ret || support.disconnectedMatch ||\n // As well, disconnected nodes are said to be in a document\n // fragment in IE 9\n elem.document && elem.document.nodeType !== 11 ) {\n return ret;\n }\n } catch (e) {}\n }\n\n return Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n // Set document vars if needed\n if ( ( context.ownerDocument || context ) !== document ) {\n setDocument( context );\n }\n return contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n // Set document vars if needed\n if ( ( elem.ownerDocument || elem ) !== document ) {\n setDocument( elem );\n }\n\n var fn = Expr.attrHandle[ name.toLowerCase() ],\n // Don\'t get fooled by Object.prototype properties (jQuery #13807)\n val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n fn( elem, name, !documentIsHTML ) :\n undefined;\n\n return val !== undefined ?\n val :\n support.attributes || !documentIsHTML ?\n elem.getAttribute( name ) :\n (val = elem.getAttributeNode(name)) && val.specified ?\n val.value :\n null;\n};\n\nSizzle.error = function( msg ) {\n throw new Error( "Syntax error, unrecognized expression: " + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n var elem,\n duplicates = [],\n j = 0,\n i = 0;\n\n // Unless we *know* we can detect duplicates, assume their presence\n hasDuplicate = !support.detectDuplicates;\n sortInput = !support.sortStable && results.slice( 0 );\n results.sort( sortOrder );\n\n if ( hasDuplicate ) {\n while ( (elem = results[i++]) ) {\n if ( elem === results[ i ] ) {\n j = duplicates.push( i );\n }\n }\n while ( j-- ) {\n results.splice( duplicates[ j ], 1 );\n }\n }\n\n // Clear input after sorting to release objects\n // See https://github.com/jquery/sizzle/pull/225\n sortInput = null;\n\n return results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n var node,\n ret = "",\n i = 0,\n nodeType = elem.nodeType;\n\n if ( !nodeType ) {\n // If no nodeType, this is expected to be an array\n while ( (node = elem[i++]) ) {\n // Do not traverse comment nodes\n ret += getText( node );\n }\n } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n // Use textContent for elements\n // innerText usage removed for consistency of new lines (jQuery #11153)\n if ( typeof elem.textContent === "string" ) {\n return elem.textContent;\n } else {\n // Traverse its children\n for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n ret += getText( elem );\n }\n }\n } else if ( nodeType === 3 || nodeType === 4 ) {\n return elem.nodeValue;\n }\n // Do not include comment or processing instruction nodes\n\n return ret;\n};\n\nExpr = Sizzle.selectors = {\n\n // Can be adjusted by the user\n cacheLength: 50,\n\n createPseudo: markFunction,\n\n match: matchExpr,\n\n attrHandle: {},\n\n find: {},\n\n relative: {\n ">": { dir: "parentNode", first: true },\n " ": { dir: "parentNode" },\n "+": { dir: "previousSibling", first: true },\n "~": { dir: "previousSibling" }\n },\n\n preFilter: {\n "ATTR": function( match ) {\n match[1] = match[1].replace( runescape, funescape );\n\n // Move the given value to match[3] whether quoted or unquoted\n match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );\n\n if ( match[2] === "~=" ) {\n match[3] = " " + match[3] + " ";\n }\n\n return match.slice( 0, 4 );\n },\n\n "CHILD": function( match ) {\n /* matches from matchExpr["CHILD"]\n 1 type (only|nth|...)\n 2 what (child|of-type)\n 3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n 4 xn-component of xn+y argument ([+-]?\\d*n|)\n 5 sign of xn-component\n 6 x of xn-component\n 7 sign of y-component\n 8 y of y-component\n */\n match[1] = match[1].toLowerCase();\n\n if ( match[1].slice( 0, 3 ) === "nth" ) {\n // nth-* requires argument\n if ( !match[3] ) {\n Sizzle.error( match[0] );\n }\n\n // numeric x and y parameters for Expr.filter.CHILD\n // remember that false/true cast respectively to 0/1\n match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );\n match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );\n\n // other types prohibit arguments\n } else if ( match[3] ) {\n Sizzle.error( match[0] );\n }\n\n return match;\n },\n\n "PSEUDO": function( match ) {\n var excess,\n unquoted = !match[6] && match[2];\n\n if ( matchExpr["CHILD"].test( match[0] ) ) {\n return null;\n }\n\n // Accept quoted arguments as-is\n if ( match[3] ) {\n match[2] = match[4] || match[5] || "";\n\n // Strip excess characters from unquoted arguments\n } else if ( unquoted && rpseudo.test( unquoted ) &&\n // Get excess from tokenize (recursively)\n (excess = tokenize( unquoted, true )) &&\n // advance to the next closing parenthesis\n (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {\n\n // excess is a negative index\n match[0] = match[0].slice( 0, excess );\n match[2] = unquoted.slice( 0, excess );\n }\n\n // Return only captures needed by the pseudo filter method (type and argument)\n return match.slice( 0, 3 );\n }\n },\n\n filter: {\n\n "TAG": function( nodeNameSelector ) {\n var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n return nodeNameSelector === "*" ?\n function() { return true; } :\n function( elem ) {\n return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n };\n },\n\n "CLASS": function( className ) {\n var pattern = classCache[ className + " " ];\n\n return pattern ||\n (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&\n classCache( className, function( elem ) {\n return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );\n });\n },\n\n "ATTR": function( name, operator, check ) {\n return function( elem ) {\n var result = Sizzle.attr( elem, name );\n\n if ( result == null ) {\n return operator === "!=";\n }\n if ( !operator ) {\n return true;\n }\n\n result += "";\n\n return operator === "=" ? result === check :\n operator === "!=" ? result !== check :\n operator === "^=" ? check && result.indexOf( check ) === 0 :\n operator === "*=" ? check && result.indexOf( check ) > -1 :\n operator === "$=" ? check && result.slice( -check.length ) === check :\n operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :\n operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :\n false;\n };\n },\n\n "CHILD": function( type, what, argument, first, last ) {\n var simple = type.slice( 0, 3 ) !== "nth",\n forward = type.slice( -4 ) !== "last",\n ofType = what === "of-type";\n\n return first === 1 && last === 0 ?\n\n // Shortcut for :nth-*(n)\n function( elem ) {\n return !!elem.parentNode;\n } :\n\n function( elem, context, xml ) {\n var cache, outerCache, node, diff, nodeIndex, start,\n dir = simple !== forward ? "nextSibling" : "previousSibling",\n parent = elem.parentNode,\n name = ofType && elem.nodeName.toLowerCase(),\n useCache = !xml && !ofType;\n\n if ( parent ) {\n\n // :(first|last|only)-(child|of-type)\n if ( simple ) {\n while ( dir ) {\n node = elem;\n while ( (node = node[ dir ]) ) {\n if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {\n return false;\n }\n }\n // Reverse direction for :only-* (if we haven\'t yet done so)\n start = dir = type === "only" && !start && "nextSibling";\n }\n return true;\n }\n\n start = [ forward ? parent.firstChild : parent.lastChild ];\n\n // non-xml :nth-child(...) stores cache data on `parent`\n if ( forward && useCache ) {\n // Seek `elem` from a previously-cached index\n outerCache = parent[ expando ] || (parent[ expando ] = {});\n cache = outerCache[ type ] || [];\n nodeIndex = cache[0] === dirruns && cache[1];\n diff = cache[0] === dirruns && cache[2];\n node = nodeIndex && parent.childNodes[ nodeIndex ];\n\n while ( (node = ++nodeIndex && node && node[ dir ] ||\n\n // Fallback to seeking `elem` from the start\n (diff = nodeIndex = 0) || start.pop()) ) {\n\n // When found, cache indexes on `parent` and break\n if ( node.nodeType === 1 && ++diff && node === elem ) {\n outerCache[ type ] = [ dirruns, nodeIndex, diff ];\n break;\n }\n }\n\n // Use previously-cached element index if available\n } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {\n diff = cache[1];\n\n // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)\n } else {\n // Use the same loop as above to seek `elem` from the start\n while ( (node = ++nodeIndex && node && node[ dir ] ||\n (diff = nodeIndex = 0) || start.pop()) ) {\n\n if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {\n // Cache the index of each encountered element\n if ( useCache ) {\n (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];\n }\n\n if ( node === elem ) {\n break;\n }\n }\n }\n }\n\n // Incorporate the offset, then check against cycle size\n diff -= last;\n return diff === first || ( diff % first === 0 && diff / first >= 0 );\n }\n };\n },\n\n "PSEUDO": function( pseudo, argument ) {\n // pseudo-class names are case-insensitive\n // http://www.w3.org/TR/selectors/#pseudo-classes\n // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n // Remember that setFilters inherits from pseudos\n var args,\n fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n Sizzle.error( "unsupported pseudo: " + pseudo );\n\n // The user may use createPseudo to indicate that\n // arguments are needed to create the filter function\n // just as Sizzle does\n if ( fn[ expando ] ) {\n return fn( argument );\n }\n\n // But maintain support for old signatures\n if ( fn.length > 1 ) {\n args = [ pseudo, pseudo, "", argument ];\n return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n markFunction(function( seed, matches ) {\n var idx,\n matched = fn( seed, argument ),\n i = matched.length;\n while ( i-- ) {\n idx = indexOf( seed, matched[i] );\n seed[ idx ] = !( matches[ idx ] = matched[i] );\n }\n }) :\n function( elem ) {\n return fn( elem, 0, args );\n };\n }\n\n return fn;\n }\n },\n\n pseudos: {\n // Potentially complex pseudos\n "not": markFunction(function( selector ) {\n // Trim the selector passed to compile\n // to avoid treating leading and trailing\n // spaces as combinators\n var input = [],\n results = [],\n matcher = compile( selector.replace( rtrim, "$1" ) );\n\n return matcher[ expando ] ?\n markFunction(function( seed, matches, context, xml ) {\n var elem,\n unmatched = matcher( seed, null, xml, [] ),\n i = seed.length;\n\n // Match elements unmatched by `matcher`\n while ( i-- ) {\n if ( (elem = unmatched[i]) ) {\n seed[i] = !(matches[i] = elem);\n }\n }\n }) :\n function( elem, context, xml ) {\n input[0] = elem;\n matcher( input, null, xml, results );\n // Don\'t keep the element (issue #299)\n input[0] = null;\n return !results.pop();\n };\n }),\n\n "has": markFunction(function( selector ) {\n return function( elem ) {\n return Sizzle( selector, elem ).length > 0;\n };\n }),\n\n "contains": markFunction(function( text ) {\n text = text.replace( runescape, funescape );\n return function( elem ) {\n return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n };\n }),\n\n // "Whether an element is represented by a :lang() selector\n // is based solely on the element\'s language value\n // being equal to the identifier C,\n // or beginning with the identifier C immediately followed by "-".\n // The matching of C against the element\'s language value is performed case-insensitively.\n // The identifier C does not have to be a valid language name."\n // http://www.w3.org/TR/selectors/#lang-pseudo\n "lang": markFunction( function( lang ) {\n // lang value must be a valid identifier\n if ( !ridentifier.test(lang || "") ) {\n Sizzle.error( "unsupported lang: " + lang );\n }\n lang = lang.replace( runescape, funescape ).toLowerCase();\n return function( elem ) {\n var elemLang;\n do {\n if ( (elemLang = documentIsHTML ?\n elem.lang :\n elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {\n\n elemLang = elemLang.toLowerCase();\n return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;\n }\n } while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n return false;\n };\n }),\n\n // Miscellaneous\n "target": function( elem ) {\n var hash = window.location && window.location.hash;\n return hash && hash.slice( 1 ) === elem.id;\n },\n\n "root": function( elem ) {\n return elem === docElem;\n },\n\n "focus": function( elem ) {\n return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n },\n\n // Boolean properties\n "enabled": function( elem ) {\n return elem.disabled === false;\n },\n\n "disabled": function( elem ) {\n return elem.disabled === true;\n },\n\n "checked": function( elem ) {\n // In CSS3, :checked should return both checked and selected elements\n // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n var nodeName = elem.nodeName.toLowerCase();\n return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);\n },\n\n "selected": function( elem ) {\n // Accessing this property makes selected-by-default\n // options in Safari work properly\n if ( elem.parentNode ) {\n elem.parentNode.selectedIndex;\n }\n\n return elem.selected === true;\n },\n\n // Contents\n "empty": function( elem ) {\n // http://www.w3.org/TR/selectors/#empty-pseudo\n // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n // but not by others (comment: 8; processing instruction: 7; etc.)\n // nodeType < 6 works because attributes (2) do not appear as children\n for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n if ( elem.nodeType < 6 ) {\n return false;\n }\n }\n return true;\n },\n\n "parent": function( elem ) {\n return !Expr.pseudos["empty"]( elem );\n },\n\n // Element/input types\n "header": function( elem ) {\n return rheader.test( elem.nodeName );\n },\n\n "input": function( elem ) {\n return rinputs.test( elem.nodeName );\n },\n\n "button": function( elem ) {\n var name = elem.nodeName.toLowerCase();\n return name === "input" && elem.type === "button" || name === "button";\n },\n\n "text": function( elem ) {\n var attr;\n return elem.nodeName.toLowerCase() === "input" &&\n elem.type === "text" &&\n\n // Support: IE<8\n // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"\n ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );\n },\n\n // Position-in-collection\n "first": createPositionalPseudo(function() {\n return [ 0 ];\n }),\n\n "last": createPositionalPseudo(function( matchIndexes, length ) {\n return [ length - 1 ];\n }),\n\n "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {\n return [ argument < 0 ? argument + length : argument ];\n }),\n\n "even": createPositionalPseudo(function( matchIndexes, length ) {\n var i = 0;\n for ( ; i < length; i += 2 ) {\n matchIndexes.push( i );\n }\n return matchIndexes;\n }),\n\n "odd": createPositionalPseudo(function( matchIndexes, length ) {\n var i = 1;\n for ( ; i < length; i += 2 ) {\n matchIndexes.push( i );\n }\n return matchIndexes;\n }),\n\n "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {\n var i = argument < 0 ? argument + length : argument;\n for ( ; --i >= 0; ) {\n matchIndexes.push( i );\n }\n return matchIndexes;\n }),\n\n "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {\n var i = argument < 0 ? argument + length : argument;\n for ( ; ++i < length; ) {\n matchIndexes.push( i );\n }\n return matchIndexes;\n })\n }\n};\n\nExpr.pseudos["nth"] = Expr.pseudos["eq"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n Expr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n Expr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n var matched, match, tokens, type,\n soFar, groups, preFilters,\n cached = tokenCache[ selector + " " ];\n\n if ( cached ) {\n return parseOnly ? 0 : cached.slice( 0 );\n }\n\n soFar = selector;\n groups = [];\n preFilters = Expr.preFilter;\n\n while ( soFar ) {\n\n // Comma and first run\n if ( !matched || (match = rcomma.exec( soFar )) ) {\n if ( match ) {\n // Don\'t consume trailing commas as valid\n soFar = soFar.slice( match[0].length ) || soFar;\n }\n groups.push( (tokens = []) );\n }\n\n matched = false;\n\n // Combinators\n if ( (match = rcombinators.exec( soFar )) ) {\n matched = match.shift();\n tokens.push({\n value: matched,\n // Cast descendant combinators to space\n type: match[0].replace( rtrim, " " )\n });\n soFar = soFar.slice( matched.length );\n }\n\n // Filters\n for ( type in Expr.filter ) {\n if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n (match = preFilters[ type ]( match ))) ) {\n matched = match.shift();\n tokens.push({\n value: matched,\n type: type,\n matches: match\n });\n soFar = soFar.slice( matched.length );\n }\n }\n\n if ( !matched ) {\n break;\n }\n }\n\n // Return the length of the invalid excess\n // if we\'re just parsing\n // Otherwise, throw an error or return tokens\n return parseOnly ?\n soFar.length :\n soFar ?\n Sizzle.error( selector ) :\n // Cache the tokens\n tokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n var i = 0,\n len = tokens.length,\n selector = "";\n for ( ; i < len; i++ ) {\n selector += tokens[i].value;\n }\n return selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n var dir = combinator.dir,\n checkNonElements = base && dir === "parentNode",\n doneName = done++;\n\n return combinator.first ?\n // Check against closest ancestor/preceding element\n function( elem, context, xml ) {\n while ( (elem = elem[ dir ]) ) {\n if ( elem.nodeType === 1 || checkNonElements ) {\n return matcher( elem, context, xml );\n }\n }\n } :\n\n // Check against all ancestor/preceding elements\n function( elem, context, xml ) {\n var oldCache, outerCache,\n newCache = [ dirruns, doneName ];\n\n // We can\'t set arbitrary data on XML nodes, so they don\'t benefit from dir caching\n if ( xml ) {\n while ( (elem = elem[ dir ]) ) {\n if ( elem.nodeType === 1 || checkNonElements ) {\n if ( matcher( elem, context, xml ) ) {\n return true;\n }\n }\n }\n } else {\n while ( (elem = elem[ dir ]) ) {\n if ( elem.nodeType === 1 || checkNonElements ) {\n outerCache = elem[ expando ] || (elem[ expando ] = {});\n if ( (oldCache = outerCache[ dir ]) &&\n oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n // Assign to newCache so results back-propagate to previous elements\n return (newCache[ 2 ] = oldCache[ 2 ]);\n } else {\n // Reuse newcache so results back-propagate to previous elements\n outerCache[ dir ] = newCache;\n\n // A match means we\'re done; a fail means we have to keep checking\n if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n return true;\n }\n }\n }\n }\n }\n };\n}\n\nfunction elementMatcher( matchers ) {\n return matchers.length > 1 ?\n function( elem, context, xml ) {\n var i = matchers.length;\n while ( i-- ) {\n if ( !matchers[i]( elem, context, xml ) ) {\n return false;\n }\n }\n return true;\n } :\n matchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n var i = 0,\n len = contexts.length;\n for ( ; i < len; i++ ) {\n Sizzle( selector, contexts[i], results );\n }\n return results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n var elem,\n newUnmatched = [],\n i = 0,\n len = unmatched.length,\n mapped = map != null;\n\n for ( ; i < len; i++ ) {\n if ( (elem = unmatched[i]) ) {\n if ( !filter || filter( elem, context, xml ) ) {\n newUnmatched.push( elem );\n if ( mapped ) {\n map.push( i );\n }\n }\n }\n }\n\n return newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n if ( postFilter && !postFilter[ expando ] ) {\n postFilter = setMatcher( postFilter );\n }\n if ( postFinder && !postFinder[ expando ] ) {\n postFinder = setMatcher( postFinder, postSelector );\n }\n return markFunction(function( seed, results, context, xml ) {\n var temp, i, elem,\n preMap = [],\n postMap = [],\n preexisting = results.length,\n\n // Get initial elements from seed or context\n elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),\n\n // Prefilter to get matcher input, preserving a map for seed-results synchronization\n matcherIn = preFilter && ( seed || !selector ) ?\n condense( elems, preMap, preFilter, context, xml ) :\n elems,\n\n matcherOut = matcher ?\n // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n // ...intermediate processing is necessary\n [] :\n\n // ...otherwise use results directly\n results :\n matcherIn;\n\n // Find primary matches\n if ( matcher ) {\n matcher( matcherIn, matcherOut, context, xml );\n }\n\n // Apply postFilter\n if ( postFilter ) {\n temp = condense( matcherOut, postMap );\n postFilter( temp, [], context, xml );\n\n // Un-match failing elements by moving them back to matcherIn\n i = temp.length;\n while ( i-- ) {\n if ( (elem = temp[i]) ) {\n matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n }\n }\n }\n\n if ( seed ) {\n if ( postFinder || preFilter ) {\n if ( postFinder ) {\n // Get the final matcherOut by condensing this intermediate into postFinder contexts\n temp = [];\n i = matcherOut.length;\n while ( i-- ) {\n if ( (elem = matcherOut[i]) ) {\n // Restore matcherIn since elem is not yet a final match\n temp.push( (matcherIn[i] = elem) );\n }\n }\n postFinder( null, (matcherOut = []), temp, xml );\n }\n\n // Move matched elements from seed to results to keep them synchronized\n i = matcherOut.length;\n while ( i-- ) {\n if ( (elem = matcherOut[i]) &&\n (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n seed[temp] = !(results[temp] = elem);\n }\n }\n }\n\n // Add elements to results, through postFinder if defined\n } else {\n matcherOut = condense(\n matcherOut === results ?\n matcherOut.splice( preexisting, matcherOut.length ) :\n matcherOut\n );\n if ( postFinder ) {\n postFinder( null, results, matcherOut, xml );\n } else {\n push.apply( results, matcherOut );\n }\n }\n });\n}\n\nfunction matcherFromTokens( tokens ) {\n var checkContext, matcher, j,\n len = tokens.length,\n leadingRelative = Expr.relative[ tokens[0].type ],\n implicitRelative = leadingRelative || Expr.relative[" "],\n i = leadingRelative ? 1 : 0,\n\n // The foundational matcher ensures that elements are reachable from top-level context(s)\n matchContext = addCombinator( function( elem ) {\n return elem === checkContext;\n }, implicitRelative, true ),\n matchAnyContext = addCombinator( function( elem ) {\n return indexOf( checkContext, elem ) > -1;\n }, implicitRelative, true ),\n matchers = [ function( elem, context, xml ) {\n var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n (checkContext = context).nodeType ?\n matchContext( elem, context, xml ) :\n matchAnyContext( elem, context, xml ) );\n // Avoid hanging onto element (issue #299)\n checkContext = null;\n return ret;\n } ];\n\n for ( ; i < len; i++ ) {\n if ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n } else {\n matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n // Return special upon seeing a positional matcher\n if ( matcher[ expando ] ) {\n // Find the next relative operator (if any) for proper handling\n j = ++i;\n for ( ; j < len; j++ ) {\n if ( Expr.relative[ tokens[j].type ] ) {\n break;\n }\n }\n return setMatcher(\n i > 1 && elementMatcher( matchers ),\n i > 1 && toSelector(\n // If the preceding token was a descendant combinator, insert an implicit any-element `*`\n tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })\n ).replace( rtrim, "$1" ),\n matcher,\n i < j && matcherFromTokens( tokens.slice( i, j ) ),\n j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n j < len && toSelector( tokens )\n );\n }\n matchers.push( matcher );\n }\n }\n\n return elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n var bySet = setMatchers.length > 0,\n byElement = elementMatchers.length > 0,\n superMatcher = function( seed, context, xml, results, outermost ) {\n var elem, j, matcher,\n matchedCount = 0,\n i = "0",\n unmatched = seed && [],\n setMatched = [],\n contextBackup = outermostContext,\n // We must always have either seed elements or outermost context\n elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),\n // Use integer dirruns iff this is the outermost matcher\n dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n len = elems.length;\n\n if ( outermost ) {\n outermostContext = context !== document && context;\n }\n\n // Add elements passing elementMatchers directly to results\n // Keep `i` a string if there are no elements so `matchedCount` will be "00" below\n // Support: IE<9, Safari\n // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id\n for ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n if ( byElement && elem ) {\n j = 0;\n while ( (matcher = elementMatchers[j++]) ) {\n if ( matcher( elem, context, xml ) ) {\n results.push( elem );\n break;\n }\n }\n if ( outermost ) {\n dirruns = dirrunsUnique;\n }\n }\n\n // Track unmatched elements for set filters\n if ( bySet ) {\n // They will have gone through all possible matchers\n if ( (elem = !matcher && elem) ) {\n matchedCount--;\n }\n\n // Lengthen the array for every element, matched or not\n if ( seed ) {\n unmatched.push( elem );\n }\n }\n }\n\n // Apply set filters to unmatched elements\n matchedCount += i;\n if ( bySet && i !== matchedCount ) {\n j = 0;\n while ( (matcher = setMatchers[j++]) ) {\n matcher( unmatched, setMatched, context, xml );\n }\n\n if ( seed ) {\n // Reintegrate element matches to eliminate the need for sorting\n if ( matchedCount > 0 ) {\n while ( i-- ) {\n if ( !(unmatched[i] || setMatched[i]) ) {\n setMatched[i] = pop.call( results );\n }\n }\n }\n\n // Discard index placeholder values to get only actual matches\n setMatched = condense( setMatched );\n }\n\n // Add matches to results\n push.apply( results, setMatched );\n\n // Seedless set matches succeeding multiple successful matchers stipulate sorting\n if ( outermost && !seed && setMatched.length > 0 &&\n ( matchedCount + setMatchers.length ) > 1 ) {\n\n Sizzle.uniqueSort( results );\n }\n }\n\n // Override manipulation of globals by nested matchers\n if ( outermost ) {\n dirruns = dirrunsUnique;\n outermostContext = contextBackup;\n }\n\n return unmatched;\n };\n\n return bySet ?\n markFunction( superMatcher ) :\n superMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n var i,\n setMatchers = [],\n elementMatchers = [],\n cached = compilerCache[ selector + " " ];\n\n if ( !cached ) {\n // Generate a function of recursive functions that can be used to check each element\n if ( !match ) {\n match = tokenize( selector );\n }\n i = match.length;\n while ( i-- ) {\n cached = matcherFromTokens( match[i] );\n if ( cached[ expando ] ) {\n setMatchers.push( cached );\n } else {\n elementMatchers.push( cached );\n }\n }\n\n // Cache the compiled function\n cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n // Save selector and tokenization\n cached.selector = selector;\n }\n return cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle\'s compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n var i, tokens, token, type, find,\n compiled = typeof selector === "function" && selector,\n match = !seed && tokenize( (selector = compiled.selector || selector) );\n\n results = results || [];\n\n // Try to minimize operations if there is no seed and only one group\n if ( match.length === 1 ) {\n\n // Take a shortcut and set the context if the root selector is an ID\n tokens = match[0] = match[0].slice( 0 );\n if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&\n support.getById && context.nodeType === 9 && documentIsHTML &&\n Expr.relative[ tokens[1].type ] ) {\n\n context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n if ( !context ) {\n return results;\n\n // Precompiled matchers will still verify ancestry, so step up a level\n } else if ( compiled ) {\n context = context.parentNode;\n }\n\n selector = selector.slice( tokens.shift().value.length );\n }\n\n // Fetch a seed set for right-to-left matching\n i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;\n while ( i-- ) {\n token = tokens[i];\n\n // Abort if we hit a combinator\n if ( Expr.relative[ (type = token.type) ] ) {\n break;\n }\n if ( (find = Expr.find[ type ]) ) {\n // Search, expanding context for leading sibling combinators\n if ( (seed = find(\n token.matches[0].replace( runescape, funescape ),\n rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n )) ) {\n\n // If seed is empty or no tokens remain, we can return early\n tokens.splice( i, 1 );\n selector = seed.length && toSelector( tokens );\n if ( !selector ) {\n push.apply( results, seed );\n return results;\n }\n\n break;\n }\n }\n }\n }\n\n // Compile and execute a filtering function if one is not provided\n // Provide `match` to avoid retokenization if we modified the selector above\n ( compiled || compile( selector, match ) )(\n seed,\n context,\n !documentIsHTML,\n results,\n rsibling.test( selector ) && testContext( context.parentNode ) || context\n );\n return results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split("").sort( sortOrder ).join("") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren\'t passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n // Should return 1, but returns 4 (following)\n return div1.compareDocumentPosition( document.createElement("div") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property "interpolation"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n div.innerHTML = "";\n return div.firstChild.getAttribute("href") === "#" ;\n}) ) {\n addHandle( "type|href|height|width", function( elem, name, isXML ) {\n if ( !isXML ) {\n return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );\n }\n });\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute("value")\nif ( !support.attributes || !assert(function( div ) {\n div.innerHTML = "";\n div.firstChild.setAttribute( "value", "" );\n return div.firstChild.getAttribute( "value" ) === "";\n}) ) {\n addHandle( "value", function( elem, name, isXML ) {\n if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {\n return elem.defaultValue;\n }\n });\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n return div.getAttribute("disabled") == null;\n}) ) {\n addHandle( booleans, function( elem, name, isXML ) {\n var val;\n if ( !isXML ) {\n return elem[ name ] === true ? name.toLowerCase() :\n (val = elem.getAttributeNode( name )) && val.specified ?\n val.value :\n null;\n }\n });\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[":"] = jQuery.expr.pseudos;\njQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = (/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/);\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n if ( jQuery.isFunction( qualifier ) ) {\n return jQuery.grep( elements, function( elem, i ) {\n /* jshint -W018 */\n return !!qualifier.call( elem, i, elem ) !== not;\n });\n\n }\n\n if ( qualifier.nodeType ) {\n return jQuery.grep( elements, function( elem ) {\n return ( elem === qualifier ) !== not;\n });\n\n }\n\n if ( typeof qualifier === "string" ) {\n if ( risSimple.test( qualifier ) ) {\n return jQuery.filter( qualifier, elements, not );\n }\n\n qualifier = jQuery.filter( qualifier, elements );\n }\n\n return jQuery.grep( elements, function( elem ) {\n return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;\n });\n}\n\njQuery.filter = function( expr, elems, not ) {\n var elem = elems[ 0 ];\n\n if ( not ) {\n expr = ":not(" + expr + ")";\n }\n\n return elems.length === 1 && elem.nodeType === 1 ?\n jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n return elem.nodeType === 1;\n }));\n};\n\njQuery.fn.extend({\n find: function( selector ) {\n var i,\n len = this.length,\n ret = [],\n self = this;\n\n if ( typeof selector !== "string" ) {\n return this.pushStack( jQuery( selector ).filter(function() {\n for ( i = 0; i < len; i++ ) {\n if ( jQuery.contains( self[ i ], this ) ) {\n return true;\n }\n }\n }) );\n }\n\n for ( i = 0; i < len; i++ ) {\n jQuery.find( selector, self[ i ], ret );\n }\n\n // Needed because $( selector, context ) becomes $( context ).find( selector )\n ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n ret.selector = this.selector ? this.selector + " " + selector : selector;\n return ret;\n },\n filter: function( selector ) {\n return this.pushStack( winnow(this, selector || [], false) );\n },\n not: function( selector ) {\n return this.pushStack( winnow(this, selector || [], true) );\n },\n is: function( selector ) {\n return !!winnow(\n this,\n\n // If this is a positional/relative selector, check membership in the returned set\n // so $("p:first").is("p:last") won\'t return true for a doc with two "p".\n typeof selector === "string" && rneedsContext.test( selector ) ?\n jQuery( selector ) :\n selector || [],\n false\n ).length;\n }\n});\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n // A simple way to check for HTML strings\n // Prioritize #id over to avoid XSS via location.hash (#9521)\n // Strict HTML recognition (#11290: must start with <)\n rquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n init = jQuery.fn.init = function( selector, context ) {\n var match, elem;\n\n // HANDLE: $(""), $(null), $(undefined), $(false)\n if ( !selector ) {\n return this;\n }\n\n // Handle HTML strings\n if ( typeof selector === "string" ) {\n if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {\n // Assume that strings that start and end with <> are HTML and skip the regex check\n match = [ null, selector, null ];\n\n } else {\n match = rquickExpr.exec( selector );\n }\n\n // Match html or make sure no context is specified for #id\n if ( match && (match[1] || !context) ) {\n\n // HANDLE: $(html) -> $(array)\n if ( match[1] ) {\n context = context instanceof jQuery ? context[0] : context;\n\n // Option to run scripts is true for back-compat\n // Intentionally let the error be thrown if parseHTML is not present\n jQuery.merge( this, jQuery.parseHTML(\n match[1],\n context && context.nodeType ? context.ownerDocument || context : document,\n true\n ) );\n\n // HANDLE: $(html, props)\n if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {\n for ( match in context ) {\n // Properties of context are called as methods if possible\n if ( jQuery.isFunction( this[ match ] ) ) {\n this[ match ]( context[ match ] );\n\n // ...and otherwise set as attributes\n } else {\n this.attr( match, context[ match ] );\n }\n }\n }\n\n return this;\n\n // HANDLE: $(#id)\n } else {\n elem = document.getElementById( match[2] );\n\n // Support: Blackberry 4.6\n // gEBID returns nodes no longer in the document (#6963)\n if ( elem && elem.parentNode ) {\n // Inject the element directly into the jQuery object\n this.length = 1;\n this[0] = elem;\n }\n\n this.context = document;\n this.selector = selector;\n return this;\n }\n\n // HANDLE: $(expr, $(...))\n } else if ( !context || context.jquery ) {\n return ( context || rootjQuery ).find( selector );\n\n // HANDLE: $(expr, context)\n // (which is just equivalent to: $(context).find(expr)\n } else {\n return this.constructor( context ).find( selector );\n }\n\n // HANDLE: $(DOMElement)\n } else if ( selector.nodeType ) {\n this.context = this[0] = selector;\n this.length = 1;\n return this;\n\n // HANDLE: $(function)\n // Shortcut for document ready\n } else if ( jQuery.isFunction( selector ) ) {\n return typeof rootjQuery.ready !== "undefined" ?\n rootjQuery.ready( selector ) :\n // Execute immediately if ready is not present\n selector( jQuery );\n }\n\n if ( selector.selector !== undefined ) {\n this.selector = selector.selector;\n this.context = selector.context;\n }\n\n return jQuery.makeArray( selector, this );\n };\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n // Methods guaranteed to produce a unique set when starting from a unique set\n guaranteedUnique = {\n children: true,\n contents: true,\n next: true,\n prev: true\n };\n\njQuery.extend({\n dir: function( elem, dir, until ) {\n var matched = [],\n truncate = until !== undefined;\n\n while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {\n if ( elem.nodeType === 1 ) {\n if ( truncate && jQuery( elem ).is( until ) ) {\n break;\n }\n matched.push( elem );\n }\n }\n return matched;\n },\n\n sibling: function( n, elem ) {\n var matched = [];\n\n for ( ; n; n = n.nextSibling ) {\n if ( n.nodeType === 1 && n !== elem ) {\n matched.push( n );\n }\n }\n\n return matched;\n }\n});\n\njQuery.fn.extend({\n has: function( target ) {\n var targets = jQuery( target, this ),\n l = targets.length;\n\n return this.filter(function() {\n var i = 0;\n for ( ; i < l; i++ ) {\n if ( jQuery.contains( this, targets[i] ) ) {\n return true;\n }\n }\n });\n },\n\n closest: function( selectors, context ) {\n var cur,\n i = 0,\n l = this.length,\n matched = [],\n pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?\n jQuery( selectors, context || this.context ) :\n 0;\n\n for ( ; i < l; i++ ) {\n for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {\n // Always skip document fragments\n if ( cur.nodeType < 11 && (pos ?\n pos.index(cur) > -1 :\n\n // Don\'t pass non-elements to Sizzle\n cur.nodeType === 1 &&\n jQuery.find.matchesSelector(cur, selectors)) ) {\n\n matched.push( cur );\n break;\n }\n }\n }\n\n return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );\n },\n\n // Determine the position of an element within the set\n index: function( elem ) {\n\n // No argument, return index in parent\n if ( !elem ) {\n return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n }\n\n // Index in selector\n if ( typeof elem === "string" ) {\n return indexOf.call( jQuery( elem ), this[ 0 ] );\n }\n\n // Locate the position of the desired element\n return indexOf.call( this,\n\n // If it receives a jQuery object, the first element is used\n elem.jquery ? elem[ 0 ] : elem\n );\n },\n\n add: function( selector, context ) {\n return this.pushStack(\n jQuery.unique(\n jQuery.merge( this.get(), jQuery( selector, context ) )\n )\n );\n },\n\n addBack: function( selector ) {\n return this.add( selector == null ?\n this.prevObject : this.prevObject.filter(selector)\n );\n }\n});\n\nfunction sibling( cur, dir ) {\n while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}\n return cur;\n}\n\njQuery.each({\n parent: function( elem ) {\n var parent = elem.parentNode;\n return parent && parent.nodeType !== 11 ? parent : null;\n },\n parents: function( elem ) {\n return jQuery.dir( elem, "parentNode" );\n },\n parentsUntil: function( elem, i, until ) {\n return jQuery.dir( elem, "parentNode", until );\n },\n next: function( elem ) {\n return sibling( elem, "nextSibling" );\n },\n prev: function( elem ) {\n return sibling( elem, "previousSibling" );\n },\n nextAll: function( elem ) {\n return jQuery.dir( elem, "nextSibling" );\n },\n prevAll: function( elem ) {\n return jQuery.dir( elem, "previousSibling" );\n },\n nextUntil: function( elem, i, until ) {\n return jQuery.dir( elem, "nextSibling", until );\n },\n prevUntil: function( elem, i, until ) {\n return jQuery.dir( elem, "previousSibling", until );\n },\n siblings: function( elem ) {\n return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );\n },\n children: function( elem ) {\n return jQuery.sibling( elem.firstChild );\n },\n contents: function( elem ) {\n return elem.contentDocument || jQuery.merge( [], elem.childNodes );\n }\n}, function( name, fn ) {\n jQuery.fn[ name ] = function( until, selector ) {\n var matched = jQuery.map( this, fn, until );\n\n if ( name.slice( -5 ) !== "Until" ) {\n selector = until;\n }\n\n if ( selector && typeof selector === "string" ) {\n matched = jQuery.filter( selector, matched );\n }\n\n if ( this.length > 1 ) {\n // Remove duplicates\n if ( !guaranteedUnique[ name ] ) {\n jQuery.unique( matched );\n }\n\n // Reverse order for parents* and prev-derivatives\n if ( rparentsprev.test( name ) ) {\n matched.reverse();\n }\n }\n\n return this.pushStack( matched );\n };\n});\nvar rnotwhite = (/\\S+/g);\n\n\n\n// String to Object options format cache\nvar optionsCache = {};\n\n// Convert String-formatted options into Object-formatted ones and store in cache\nfunction createOptions( options ) {\n var object = optionsCache[ options ] = {};\n jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n object[ flag ] = true;\n });\n return object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n * options: an optional list of space-separated options that will change how\n * the callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * "fired" multiple times.\n *\n * Possible options:\n *\n * once: will ensure the callback list can only be fired once (like a Deferred)\n *\n * memory: will keep track of previous values and will call any callback added\n * after the list has been fired right away with the latest "memorized"\n * values (like a Deferred)\n *\n * unique: will ensure a callback can only be added once (no duplicate in the list)\n *\n * stopOnFalse: interrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n // Convert options from String-formatted to Object-formatted if needed\n // (we check in cache first)\n options = typeof options === "string" ?\n ( optionsCache[ options ] || createOptions( options ) ) :\n jQuery.extend( {}, options );\n\n var // Last fire value (for non-forgettable lists)\n memory,\n // Flag to know if list was already fired\n fired,\n // Flag to know if list is currently firing\n firing,\n // First callback to fire (used internally by add and fireWith)\n firingStart,\n // End of the loop when firing\n firingLength,\n // Index of currently firing callback (modified by remove if needed)\n firingIndex,\n // Actual callback list\n list = [],\n // Stack of fire calls for repeatable lists\n stack = !options.once && [],\n // Fire callbacks\n fire = function( data ) {\n memory = options.memory && data;\n fired = true;\n firingIndex = firingStart || 0;\n firingStart = 0;\n firingLength = list.length;\n firing = true;\n for ( ; list && firingIndex < firingLength; firingIndex++ ) {\n if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {\n memory = false; // To prevent further calls using add\n break;\n }\n }\n firing = false;\n if ( list ) {\n if ( stack ) {\n if ( stack.length ) {\n fire( stack.shift() );\n }\n } else if ( memory ) {\n list = [];\n } else {\n self.disable();\n }\n }\n },\n // Actual Callbacks object\n self = {\n // Add a callback or a collection of callbacks to the list\n add: function() {\n if ( list ) {\n // First, we save the current length\n var start = list.length;\n (function add( args ) {\n jQuery.each( args, function( _, arg ) {\n var type = jQuery.type( arg );\n if ( type === "function" ) {\n if ( !options.unique || !self.has( arg ) ) {\n list.push( arg );\n }\n } else if ( arg && arg.length && type !== "string" ) {\n // Inspect recursively\n add( arg );\n }\n });\n })( arguments );\n // Do we need to add the callbacks to the\n // current firing batch?\n if ( firing ) {\n firingLength = list.length;\n // With memory, if we\'re not firing then\n // we should call right away\n } else if ( memory ) {\n firingStart = start;\n fire( memory );\n }\n }\n return this;\n },\n // Remove a callback from the list\n remove: function() {\n if ( list ) {\n jQuery.each( arguments, function( _, arg ) {\n var index;\n while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n list.splice( index, 1 );\n // Handle firing indexes\n if ( firing ) {\n if ( index <= firingLength ) {\n firingLength--;\n }\n if ( index <= firingIndex ) {\n firingIndex--;\n }\n }\n }\n });\n }\n return this;\n },\n // Check if a given callback is in the list.\n // If no argument is given, return whether or not list has callbacks attached.\n has: function( fn ) {\n return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );\n },\n // Remove all callbacks from the list\n empty: function() {\n list = [];\n firingLength = 0;\n return this;\n },\n // Have the list do nothing anymore\n disable: function() {\n list = stack = memory = undefined;\n return this;\n },\n // Is it disabled?\n disabled: function() {\n return !list;\n },\n // Lock the list in its current state\n lock: function() {\n stack = undefined;\n if ( !memory ) {\n self.disable();\n }\n return this;\n },\n // Is it locked?\n locked: function() {\n return !stack;\n },\n // Call all callbacks with the given context and arguments\n fireWith: function( context, args ) {\n if ( list && ( !fired || stack ) ) {\n args = args || [];\n args = [ context, args.slice ? args.slice() : args ];\n if ( firing ) {\n stack.push( args );\n } else {\n fire( args );\n }\n }\n return this;\n },\n // Call all the callbacks with the given arguments\n fire: function() {\n self.fireWith( this, arguments );\n return this;\n },\n // To know if the callbacks have already been called at least once\n fired: function() {\n return !!fired;\n }\n };\n\n return self;\n};\n\n\njQuery.extend({\n\n Deferred: function( func ) {\n var tuples = [\n // action, add listener, listener list, final state\n [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],\n [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],\n [ "notify", "progress", jQuery.Callbacks("memory") ]\n ],\n state = "pending",\n promise = {\n state: function() {\n return state;\n },\n always: function() {\n deferred.done( arguments ).fail( arguments );\n return this;\n },\n then: function( /* fnDone, fnFail, fnProgress */ ) {\n var fns = arguments;\n return jQuery.Deferred(function( newDefer ) {\n jQuery.each( tuples, function( i, tuple ) {\n var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n // deferred[ done | fail | progress ] for forwarding actions to newDefer\n deferred[ tuple[1] ](function() {\n var returned = fn && fn.apply( this, arguments );\n if ( returned && jQuery.isFunction( returned.promise ) ) {\n returned.promise()\n .done( newDefer.resolve )\n .fail( newDefer.reject )\n .progress( newDefer.notify );\n } else {\n newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );\n }\n });\n });\n fns = null;\n }).promise();\n },\n // Get a promise for this deferred\n // If obj is provided, the promise aspect is added to the object\n promise: function( obj ) {\n return obj != null ? jQuery.extend( obj, promise ) : promise;\n }\n },\n deferred = {};\n\n // Keep pipe for back-compat\n promise.pipe = promise.then;\n\n // Add list-specific methods\n jQuery.each( tuples, function( i, tuple ) {\n var list = tuple[ 2 ],\n stateString = tuple[ 3 ];\n\n // promise[ done | fail | progress ] = list.add\n promise[ tuple[1] ] = list.add;\n\n // Handle state\n if ( stateString ) {\n list.add(function() {\n // state = [ resolved | rejected ]\n state = stateString;\n\n // [ reject_list | resolve_list ].disable; progress_list.lock\n }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n }\n\n // deferred[ resolve | reject | notify ]\n deferred[ tuple[0] ] = function() {\n deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );\n return this;\n };\n deferred[ tuple[0] + "With" ] = list.fireWith;\n });\n\n // Make the deferred a promise\n promise.promise( deferred );\n\n // Call given func if any\n if ( func ) {\n func.call( deferred, deferred );\n }\n\n // All done!\n return deferred;\n },\n\n // Deferred helper\n when: function( subordinate /* , ..., subordinateN */ ) {\n var i = 0,\n resolveValues = slice.call( arguments ),\n length = resolveValues.length,\n\n // the count of uncompleted subordinates\n remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n // the master Deferred. If resolveValues consist of only a single Deferred, just use that.\n deferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n // Update function for both resolve and progress values\n updateFunc = function( i, contexts, values ) {\n return function( value ) {\n contexts[ i ] = this;\n values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n if ( values === progressValues ) {\n deferred.notifyWith( contexts, values );\n } else if ( !( --remaining ) ) {\n deferred.resolveWith( contexts, values );\n }\n };\n },\n\n progressValues, progressContexts, resolveContexts;\n\n // Add listeners to Deferred subordinates; treat others as resolved\n if ( length > 1 ) {\n progressValues = new Array( length );\n progressContexts = new Array( length );\n resolveContexts = new Array( length );\n for ( ; i < length; i++ ) {\n if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n resolveValues[ i ].promise()\n .done( updateFunc( i, resolveContexts, resolveValues ) )\n .fail( deferred.reject )\n .progress( updateFunc( i, progressContexts, progressValues ) );\n } else {\n --remaining;\n }\n }\n }\n\n // If we\'re not waiting on anything, resolve the master\n if ( !remaining ) {\n deferred.resolveWith( resolveContexts, resolveValues );\n }\n\n return deferred.promise();\n }\n});\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n // Add the callback\n jQuery.ready.promise().done( fn );\n\n return this;\n};\n\njQuery.extend({\n // Is the DOM ready to be used? Set to true once it occurs.\n isReady: false,\n\n // A counter to track how many items to wait for before\n // the ready event fires. See #6781\n readyWait: 1,\n\n // Hold (or release) the ready event\n holdReady: function( hold ) {\n if ( hold ) {\n jQuery.readyWait++;\n } else {\n jQuery.ready( true );\n }\n },\n\n // Handle when the DOM is ready\n ready: function( wait ) {\n\n // Abort if there are pending holds or we\'re already ready\n if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n return;\n }\n\n // Remember that the DOM is ready\n jQuery.isReady = true;\n\n // If a normal DOM Ready event fired, decrement, and wait if need be\n if ( wait !== true && --jQuery.readyWait > 0 ) {\n return;\n }\n\n // If there are functions bound, to execute\n readyList.resolveWith( document, [ jQuery ] );\n\n // Trigger any bound ready events\n if ( jQuery.fn.triggerHandler ) {\n jQuery( document ).triggerHandler( "ready" );\n jQuery( document ).off( "ready" );\n }\n }\n});\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n document.removeEventListener( "DOMContentLoaded", completed, false );\n window.removeEventListener( "load", completed, false );\n jQuery.ready();\n}\n\njQuery.ready.promise = function( obj ) {\n if ( !readyList ) {\n\n readyList = jQuery.Deferred();\n\n // Catch cases where $(document).ready() is called after the browser event has already occurred.\n // We once tried to use readyState "interactive" here, but it caused issues like the one\n // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\n if ( document.readyState === "complete" ) {\n // Handle it asynchronously to allow scripts the opportunity to delay ready\n setTimeout( jQuery.ready );\n\n } else {\n\n // Use the handy event callback\n document.addEventListener( "DOMContentLoaded", completed, false );\n\n // A fallback to window.onload, that will always work\n window.addEventListener( "load", completed, false );\n }\n }\n return readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it\'s a function\nvar access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n var i = 0,\n len = elems.length,\n bulk = key == null;\n\n // Sets many values\n if ( jQuery.type( key ) === "object" ) {\n chainable = true;\n for ( i in key ) {\n jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );\n }\n\n // Sets one value\n } else if ( value !== undefined ) {\n chainable = true;\n\n if ( !jQuery.isFunction( value ) ) {\n raw = true;\n }\n\n if ( bulk ) {\n // Bulk operations run against the entire set\n if ( raw ) {\n fn.call( elems, value );\n fn = null;\n\n // ...except when executing function values\n } else {\n bulk = fn;\n fn = function( elem, key, value ) {\n return bulk.call( jQuery( elem ), value );\n };\n }\n }\n\n if ( fn ) {\n for ( ; i < len; i++ ) {\n fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );\n }\n }\n }\n\n return chainable ?\n elems :\n\n // Gets\n bulk ?\n fn.call( elems ) :\n len ? fn( elems[0], key ) : emptyGet;\n};\n\n\n/**\n * Determines whether an object can have data\n */\njQuery.acceptData = function( owner ) {\n // Accepts only:\n // - Node\n // - Node.ELEMENT_NODE\n // - Node.DOCUMENT_NODE\n // - Object\n // - Any\n /* jshint -W018 */\n return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\nfunction Data() {\n // Support: Android<4,\n // Old WebKit does not have Object.preventExtensions/freeze method,\n // return new empty object instead with no [[set]] accessor\n Object.defineProperty( this.cache = {}, 0, {\n get: function() {\n return {};\n }\n });\n\n this.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\nData.accepts = jQuery.acceptData;\n\nData.prototype = {\n key: function( owner ) {\n // We can accept data for non-element nodes in modern browsers,\n // but we should not, see #8335.\n // Always return the key for a frozen object.\n if ( !Data.accepts( owner ) ) {\n return 0;\n }\n\n var descriptor = {},\n // Check if the owner object already has a cache key\n unlock = owner[ this.expando ];\n\n // If not, create one\n if ( !unlock ) {\n unlock = Data.uid++;\n\n // Secure it in a non-enumerable, non-writable property\n try {\n descriptor[ this.expando ] = { value: unlock };\n Object.defineProperties( owner, descriptor );\n\n // Support: Android<4\n // Fallback to a less secure definition\n } catch ( e ) {\n descriptor[ this.expando ] = unlock;\n jQuery.extend( owner, descriptor );\n }\n }\n\n // Ensure the cache object\n if ( !this.cache[ unlock ] ) {\n this.cache[ unlock ] = {};\n }\n\n return unlock;\n },\n set: function( owner, data, value ) {\n var prop,\n // There may be an unlock assigned to this node,\n // if there is no entry for this "owner", create one inline\n // and set the unlock as though an owner entry had always existed\n unlock = this.key( owner ),\n cache = this.cache[ unlock ];\n\n // Handle: [ owner, key, value ] args\n if ( typeof data === "string" ) {\n cache[ data ] = value;\n\n // Handle: [ owner, { properties } ] args\n } else {\n // Fresh assignments by object are shallow copied\n if ( jQuery.isEmptyObject( cache ) ) {\n jQuery.extend( this.cache[ unlock ], data );\n // Otherwise, copy the properties one-by-one to the cache object\n } else {\n for ( prop in data ) {\n cache[ prop ] = data[ prop ];\n }\n }\n }\n return cache;\n },\n get: function( owner, key ) {\n // Either a valid cache is found, or will be created.\n // New caches will be created and the unlock returned,\n // allowing direct access to the newly created\n // empty data object. A valid owner object must be provided.\n var cache = this.cache[ this.key( owner ) ];\n\n return key === undefined ?\n cache : cache[ key ];\n },\n access: function( owner, key, value ) {\n var stored;\n // In cases where either:\n //\n // 1. No key was specified\n // 2. A string key was specified, but no value provided\n //\n // Take the "read" path and allow the get method to determine\n // which value to return, respectively either:\n //\n // 1. The entire cache object\n // 2. The data stored at the key\n //\n if ( key === undefined ||\n ((key && typeof key === "string") && value === undefined) ) {\n\n stored = this.get( owner, key );\n\n return stored !== undefined ?\n stored : this.get( owner, jQuery.camelCase(key) );\n }\n\n // [*]When the key is not a string, or both a key and value\n // are specified, set or extend (existing objects) with either:\n //\n // 1. An object of properties\n // 2. A key and value\n //\n this.set( owner, key, value );\n\n // Since the "set" path can have two possible entry points\n // return the expected data based on which path was taken[*]\n return value !== undefined ? value : key;\n },\n remove: function( owner, key ) {\n var i, name, camel,\n unlock = this.key( owner ),\n cache = this.cache[ unlock ];\n\n if ( key === undefined ) {\n this.cache[ unlock ] = {};\n\n } else {\n // Support array or space separated string of keys\n if ( jQuery.isArray( key ) ) {\n // If "name" is an array of keys...\n // When data is initially created, via ("key", "val") signature,\n // keys will be converted to camelCase.\n // Since there is no way to tell _how_ a key was added, remove\n // both plain key and camelCase key. #12786\n // This will only penalize the array argument path.\n name = key.concat( key.map( jQuery.camelCase ) );\n } else {\n camel = jQuery.camelCase( key );\n // Try the string as a key before any manipulation\n if ( key in cache ) {\n name = [ key, camel ];\n } else {\n // If a key with the spaces exists, use it.\n // Otherwise, create an array by matching non-whitespace\n name = camel;\n name = name in cache ?\n [ name ] : ( name.match( rnotwhite ) || [] );\n }\n }\n\n i = name.length;\n while ( i-- ) {\n delete cache[ name[ i ] ];\n }\n }\n },\n hasData: function( owner ) {\n return !jQuery.isEmptyObject(\n this.cache[ owner[ this.expando ] ] || {}\n );\n },\n discard: function( owner ) {\n if ( owner[ this.expando ] ) {\n delete this.cache[ owner[ this.expando ] ];\n }\n }\n};\nvar data_priv = new Data();\n\nvar data_user = new Data();\n\n\n\n// Implementation Summary\n//\n// 1. Enforce API surface and semantic compatibility with 1.9.x branch\n// 2. Improve the module\'s maintainability by reducing the storage\n// paths to a single mechanism.\n// 3. Use the same single mechanism to support "private" and "user" data.\n// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)\n// 5. Avoid exposing implementation details on user objects (eg. expando properties)\n// 6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n rmultiDash = /([A-Z])/g;\n\nfunction dataAttr( elem, key, data ) {\n var name;\n\n // If nothing was found internally, try to fetch any\n // data from the HTML5 data-* attribute\n if ( data === undefined && elem.nodeType === 1 ) {\n name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();\n data = elem.getAttribute( name );\n\n if ( typeof data === "string" ) {\n try {\n data = data === "true" ? true :\n data === "false" ? false :\n data === "null" ? null :\n // Only convert to a number if it doesn\'t change the string\n +data + "" === data ? +data :\n rbrace.test( data ) ? jQuery.parseJSON( data ) :\n data;\n } catch( e ) {}\n\n // Make sure we set the data so it isn\'t changed later\n data_user.set( elem, key, data );\n } else {\n data = undefined;\n }\n }\n return data;\n}\n\njQuery.extend({\n hasData: function( elem ) {\n return data_user.hasData( elem ) || data_priv.hasData( elem );\n },\n\n data: function( elem, name, data ) {\n return data_user.access( elem, name, data );\n },\n\n removeData: function( elem, name ) {\n data_user.remove( elem, name );\n },\n\n // TODO: Now that all calls to _data and _removeData have been replaced\n // with direct calls to data_priv methods, these can be deprecated.\n _data: function( elem, name, data ) {\n return data_priv.access( elem, name, data );\n },\n\n _removeData: function( elem, name ) {\n data_priv.remove( elem, name );\n }\n});\n\njQuery.fn.extend({\n data: function( key, value ) {\n var i, name, data,\n elem = this[ 0 ],\n attrs = elem && elem.attributes;\n\n // Gets all values\n if ( key === undefined ) {\n if ( this.length ) {\n data = data_user.get( elem );\n\n if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {\n i = attrs.length;\n while ( i-- ) {\n\n // Support: IE11+\n // The attrs elements can be null (#14894)\n if ( attrs[ i ] ) {\n name = attrs[ i ].name;\n if ( name.indexOf( "data-" ) === 0 ) {\n name = jQuery.camelCase( name.slice(5) );\n dataAttr( elem, name, data[ name ] );\n }\n }\n }\n data_priv.set( elem, "hasDataAttrs", true );\n }\n }\n\n return data;\n }\n\n // Sets multiple values\n if ( typeof key === "object" ) {\n return this.each(function() {\n data_user.set( this, key );\n });\n }\n\n return access( this, function( value ) {\n var data,\n camelKey = jQuery.camelCase( key );\n\n // The calling jQuery object (element matches) is not empty\n // (and therefore has an element appears at this[ 0 ]) and the\n // `value` parameter was not undefined. An empty jQuery object\n // will result in `undefined` for elem = this[ 0 ] which will\n // throw an exception if an attempt to read a data cache is made.\n if ( elem && value === undefined ) {\n // Attempt to get data from the cache\n // with the key as-is\n data = data_user.get( elem, key );\n if ( data !== undefined ) {\n return data;\n }\n\n // Attempt to get data from the cache\n // with the key camelized\n data = data_user.get( elem, camelKey );\n if ( data !== undefined ) {\n return data;\n }\n\n // Attempt to "discover" the data in\n // HTML5 custom data-* attrs\n data = dataAttr( elem, camelKey, undefined );\n if ( data !== undefined ) {\n return data;\n }\n\n // We tried really hard, but the data doesn\'t exist.\n return;\n }\n\n // Set the data...\n this.each(function() {\n // First, attempt to store a copy or reference of any\n // data that might\'ve been store with a camelCased key.\n var data = data_user.get( this, camelKey );\n\n // For HTML5 data-* attribute interop, we have to\n // store property names with dashes in a camelCase form.\n // This might not apply to all properties...*\n data_user.set( this, camelKey, value );\n\n // *... In the case of properties that might _actually_\n // have dashes, we need to also store a copy of that\n // unchanged property.\n if ( key.indexOf("-") !== -1 && data !== undefined ) {\n data_user.set( this, key, value );\n }\n });\n }, null, value, arguments.length > 1, null, true );\n },\n\n removeData: function( key ) {\n return this.each(function() {\n data_user.remove( this, key );\n });\n }\n});\n\n\njQuery.extend({\n queue: function( elem, type, data ) {\n var queue;\n\n if ( elem ) {\n type = ( type || "fx" ) + "queue";\n queue = data_priv.get( elem, type );\n\n // Speed up dequeue by getting out quickly if this is just a lookup\n if ( data ) {\n if ( !queue || jQuery.isArray( data ) ) {\n queue = data_priv.access( elem, type, jQuery.makeArray(data) );\n } else {\n queue.push( data );\n }\n }\n return queue || [];\n }\n },\n\n dequeue: function( elem, type ) {\n type = type || "fx";\n\n var queue = jQuery.queue( elem, type ),\n startLength = queue.length,\n fn = queue.shift(),\n hooks = jQuery._queueHooks( elem, type ),\n next = function() {\n jQuery.dequeue( elem, type );\n };\n\n // If the fx queue is dequeued, always remove the progress sentinel\n if ( fn === "inprogress" ) {\n fn = queue.shift();\n startLength--;\n }\n\n if ( fn ) {\n\n // Add a progress sentinel to prevent the fx queue from being\n // automatically dequeued\n if ( type === "fx" ) {\n queue.unshift( "inprogress" );\n }\n\n // Clear up the last queue stop function\n delete hooks.stop;\n fn.call( elem, next, hooks );\n }\n\n if ( !startLength && hooks ) {\n hooks.empty.fire();\n }\n },\n\n // Not public - generate a queueHooks object, or return the current one\n _queueHooks: function( elem, type ) {\n var key = type + "queueHooks";\n return data_priv.get( elem, key ) || data_priv.access( elem, key, {\n empty: jQuery.Callbacks("once memory").add(function() {\n data_priv.remove( elem, [ type + "queue", key ] );\n })\n });\n }\n});\n\njQuery.fn.extend({\n queue: function( type, data ) {\n var setter = 2;\n\n if ( typeof type !== "string" ) {\n data = type;\n type = "fx";\n setter--;\n }\n\n if ( arguments.length < setter ) {\n return jQuery.queue( this[0], type );\n }\n\n return data === undefined ?\n this :\n this.each(function() {\n var queue = jQuery.queue( this, type, data );\n\n // Ensure a hooks for this queue\n jQuery._queueHooks( this, type );\n\n if ( type === "fx" && queue[0] !== "inprogress" ) {\n jQuery.dequeue( this, type );\n }\n });\n },\n dequeue: function( type ) {\n return this.each(function() {\n jQuery.dequeue( this, type );\n });\n },\n clearQueue: function( type ) {\n return this.queue( type || "fx", [] );\n },\n // Get a promise resolved when queues of a certain type\n // are emptied (fx is the type by default)\n promise: function( type, obj ) {\n var tmp,\n count = 1,\n defer = jQuery.Deferred(),\n elements = this,\n i = this.length,\n resolve = function() {\n if ( !( --count ) ) {\n defer.resolveWith( elements, [ elements ] );\n }\n };\n\n if ( typeof type !== "string" ) {\n obj = type;\n type = undefined;\n }\n type = type || "fx";\n\n while ( i-- ) {\n tmp = data_priv.get( elements[ i ], type + "queueHooks" );\n if ( tmp && tmp.empty ) {\n count++;\n tmp.empty.add( resolve );\n }\n }\n resolve();\n return defer.promise( obj );\n }\n});\nvar pnum = (/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/).source;\n\nvar cssExpand = [ "Top", "Right", "Bottom", "Left" ];\n\nvar isHidden = function( elem, el ) {\n // isHidden might be called from jQuery#filter function;\n // in that case, element will be second argument\n elem = el || elem;\n return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );\n };\n\nvar rcheckableType = (/^(?:checkbox|radio)$/i);\n\n\n\n(function() {\n var fragment = document.createDocumentFragment(),\n div = fragment.appendChild( document.createElement( "div" ) ),\n input = document.createElement( "input" );\n\n // Support: Safari<=5.1\n // Check state lost if the name is set (#11217)\n // Support: Windows Web Apps (WWA)\n // `name` and `type` must use .setAttribute for WWA (#14901)\n input.setAttribute( "type", "radio" );\n input.setAttribute( "checked", "checked" );\n input.setAttribute( "name", "t" );\n\n div.appendChild( input );\n\n // Support: Safari<=5.1, Android<4.2\n // Older WebKit doesn\'t clone checked state correctly in fragments\n support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n // Support: IE<=11+\n // Make sure textarea (and checkbox) defaultValue is properly cloned\n div.innerHTML = "";\n support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n})();\nvar strundefined = typeof undefined;\n\n\n\nsupport.focusinBubbles = "onfocusin" in window;\n\n\nvar\n rkeyEvent = /^key/,\n rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,\n rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n rtypenamespace = /^([^.]*)(?:\\.(.+)|)$/;\n\nfunction returnTrue() {\n return true;\n}\n\nfunction returnFalse() {\n return false;\n}\n\nfunction safeActiveElement() {\n try {\n return document.activeElement;\n } catch ( err ) { }\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards\' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n global: {},\n\n add: function( elem, types, handler, data, selector ) {\n\n var handleObjIn, eventHandle, tmp,\n events, t, handleObj,\n special, handlers, type, namespaces, origType,\n elemData = data_priv.get( elem );\n\n // Don\'t attach events to noData or text/comment nodes (but allow plain objects)\n if ( !elemData ) {\n return;\n }\n\n // Caller can pass in an object of custom data in lieu of the handler\n if ( handler.handler ) {\n handleObjIn = handler;\n handler = handleObjIn.handler;\n selector = handleObjIn.selector;\n }\n\n // Make sure that the handler has a unique ID, used to find/remove it later\n if ( !handler.guid ) {\n handler.guid = jQuery.guid++;\n }\n\n // Init the element\'s event structure and main handler, if this is the first\n if ( !(events = elemData.events) ) {\n events = elemData.events = {};\n }\n if ( !(eventHandle = elemData.handle) ) {\n eventHandle = elemData.handle = function( e ) {\n // Discard the second event of a jQuery.event.trigger() and\n // when an event is called after a page has unloaded\n return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?\n jQuery.event.dispatch.apply( elem, arguments ) : undefined;\n };\n }\n\n // Handle multiple events separated by a space\n types = ( types || "" ).match( rnotwhite ) || [ "" ];\n t = types.length;\n while ( t-- ) {\n tmp = rtypenamespace.exec( types[t] ) || [];\n type = origType = tmp[1];\n namespaces = ( tmp[2] || "" ).split( "." ).sort();\n\n // There *must* be a type, no attaching namespace-only handlers\n if ( !type ) {\n continue;\n }\n\n // If event changes its type, use the special event handlers for the changed type\n special = jQuery.event.special[ type ] || {};\n\n // If selector defined, determine special event api type, otherwise given type\n type = ( selector ? special.delegateType : special.bindType ) || type;\n\n // Update special based on newly reset type\n special = jQuery.event.special[ type ] || {};\n\n // handleObj is passed to all event handlers\n handleObj = jQuery.extend({\n type: type,\n origType: origType,\n data: data,\n handler: handler,\n guid: handler.guid,\n selector: selector,\n needsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n namespace: namespaces.join(".")\n }, handleObjIn );\n\n // Init the event handler queue if we\'re the first\n if ( !(handlers = events[ type ]) ) {\n handlers = events[ type ] = [];\n handlers.delegateCount = 0;\n\n // Only use addEventListener if the special events handler returns false\n if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n if ( elem.addEventListener ) {\n elem.addEventListener( type, eventHandle, false );\n }\n }\n }\n\n if ( special.add ) {\n special.add.call( elem, handleObj );\n\n if ( !handleObj.handler.guid ) {\n handleObj.handler.guid = handler.guid;\n }\n }\n\n // Add to the element\'s handler list, delegates in front\n if ( selector ) {\n handlers.splice( handlers.delegateCount++, 0, handleObj );\n } else {\n handlers.push( handleObj );\n }\n\n // Keep track of which events have ever been used, for event optimization\n jQuery.event.global[ type ] = true;\n }\n\n },\n\n // Detach an event or set of events from an element\n remove: function( elem, types, handler, selector, mappedTypes ) {\n\n var j, origCount, tmp,\n events, t, handleObj,\n special, handlers, type, namespaces, origType,\n elemData = data_priv.hasData( elem ) && data_priv.get( elem );\n\n if ( !elemData || !(events = elemData.events) ) {\n return;\n }\n\n // Once for each type.namespace in types; type may be omitted\n types = ( types || "" ).match( rnotwhite ) || [ "" ];\n t = types.length;\n while ( t-- ) {\n tmp = rtypenamespace.exec( types[t] ) || [];\n type = origType = tmp[1];\n namespaces = ( tmp[2] || "" ).split( "." ).sort();\n\n // Unbind all events (on this namespace, if provided) for the element\n if ( !type ) {\n for ( type in events ) {\n jQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n }\n continue;\n }\n\n special = jQuery.event.special[ type ] || {};\n type = ( selector ? special.delegateType : special.bindType ) || type;\n handlers = events[ type ] || [];\n tmp = tmp[2] && new RegExp( "(^|\\\\.)" + namespaces.join("\\\\.(?:.*\\\\.|)") + "(\\\\.|$)" );\n\n // Remove matching events\n origCount = j = handlers.length;\n while ( j-- ) {\n handleObj = handlers[ j ];\n\n if ( ( mappedTypes || origType === handleObj.origType ) &&\n ( !handler || handler.guid === handleObj.guid ) &&\n ( !tmp || tmp.test( handleObj.namespace ) ) &&\n ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {\n handlers.splice( j, 1 );\n\n if ( handleObj.selector ) {\n handlers.delegateCount--;\n }\n if ( special.remove ) {\n special.remove.call( elem, handleObj );\n }\n }\n }\n\n // Remove generic event handler if we removed something and no more handlers exist\n // (avoids potential for endless recursion during removal of special event handlers)\n if ( origCount && !handlers.length ) {\n if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n jQuery.removeEvent( elem, type, elemData.handle );\n }\n\n delete events[ type ];\n }\n }\n\n // Remove the expando if it\'s no longer used\n if ( jQuery.isEmptyObject( events ) ) {\n delete elemData.handle;\n data_priv.remove( elem, "events" );\n }\n },\n\n trigger: function( event, data, elem, onlyHandlers ) {\n\n var i, cur, tmp, bubbleType, ontype, handle, special,\n eventPath = [ elem || document ],\n type = hasOwn.call( event, "type" ) ? event.type : event,\n namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];\n\n cur = tmp = elem = elem || document;\n\n // Don\'t do events on text and comment nodes\n if ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n return;\n }\n\n // focus/blur morphs to focusin/out; ensure we\'re not firing them right now\n if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n return;\n }\n\n if ( type.indexOf(".") >= 0 ) {\n // Namespaced trigger; create a regexp to match event type in handle()\n namespaces = type.split(".");\n type = namespaces.shift();\n namespaces.sort();\n }\n ontype = type.indexOf(":") < 0 && "on" + type;\n\n // Caller can pass in a jQuery.Event object, Object, or just an event type string\n event = event[ jQuery.expando ] ?\n event :\n new jQuery.Event( type, typeof event === "object" && event );\n\n // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n event.isTrigger = onlyHandlers ? 2 : 3;\n event.namespace = namespaces.join(".");\n event.namespace_re = event.namespace ?\n new RegExp( "(^|\\\\.)" + namespaces.join("\\\\.(?:.*\\\\.|)") + "(\\\\.|$)" ) :\n null;\n\n // Clean up the event in case it is being reused\n event.result = undefined;\n if ( !event.target ) {\n event.target = elem;\n }\n\n // Clone any incoming data and prepend the event, creating the handler arg list\n data = data == null ?\n [ event ] :\n jQuery.makeArray( data, [ event ] );\n\n // Allow special events to draw outside the lines\n special = jQuery.event.special[ type ] || {};\n if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n return;\n }\n\n // Determine event propagation path in advance, per W3C events spec (#9951)\n // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n bubbleType = special.delegateType || type;\n if ( !rfocusMorph.test( bubbleType + type ) ) {\n cur = cur.parentNode;\n }\n for ( ; cur; cur = cur.parentNode ) {\n eventPath.push( cur );\n tmp = cur;\n }\n\n // Only add window if we got to document (e.g., not plain obj or detached DOM)\n if ( tmp === (elem.ownerDocument || document) ) {\n eventPath.push( tmp.defaultView || tmp.parentWindow || window );\n }\n }\n\n // Fire handlers on the event path\n i = 0;\n while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {\n\n event.type = i > 1 ?\n bubbleType :\n special.bindType || type;\n\n // jQuery handler\n handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );\n if ( handle ) {\n handle.apply( cur, data );\n }\n\n // Native handler\n handle = ontype && cur[ ontype ];\n if ( handle && handle.apply && jQuery.acceptData( cur ) ) {\n event.result = handle.apply( cur, data );\n if ( event.result === false ) {\n event.preventDefault();\n }\n }\n }\n event.type = type;\n\n // If nobody prevented the default action, do it now\n if ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&\n jQuery.acceptData( elem ) ) {\n\n // Call a native DOM method on the target with the same name name as the event.\n // Don\'t do default actions on window, that\'s where global variables be (#6170)\n if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {\n\n // Don\'t re-trigger an onFOO event when we call its FOO() method\n tmp = elem[ ontype ];\n\n if ( tmp ) {\n elem[ ontype ] = null;\n }\n\n // Prevent re-triggering of the same event, since we already bubbled it above\n jQuery.event.triggered = type;\n elem[ type ]();\n jQuery.event.triggered = undefined;\n\n if ( tmp ) {\n elem[ ontype ] = tmp;\n }\n }\n }\n }\n\n return event.result;\n },\n\n dispatch: function( event ) {\n\n // Make a writable jQuery.Event from the native event object\n event = jQuery.event.fix( event );\n\n var i, j, ret, matched, handleObj,\n handlerQueue = [],\n args = slice.call( arguments ),\n handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],\n special = jQuery.event.special[ event.type ] || {};\n\n // Use the fix-ed jQuery.Event rather than the (read-only) native event\n args[0] = event;\n event.delegateTarget = this;\n\n // Call the preDispatch hook for the mapped type, and let it bail if desired\n if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n return;\n }\n\n // Determine handlers\n handlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n // Run delegates first; they may want to stop propagation beneath us\n i = 0;\n while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {\n event.currentTarget = matched.elem;\n\n j = 0;\n while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {\n\n // Triggered event must either 1) have no namespace, or 2) have namespace(s)\n // a subset or equal to those in the bound event (both can have no namespace).\n if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {\n\n event.handleObj = handleObj;\n event.data = handleObj.data;\n\n ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )\n .apply( matched.elem, args );\n\n if ( ret !== undefined ) {\n if ( (event.result = ret) === false ) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n }\n }\n\n // Call the postDispatch hook for the mapped type\n if ( special.postDispatch ) {\n special.postDispatch.call( this, event );\n }\n\n return event.result;\n },\n\n handlers: function( event, handlers ) {\n var i, matches, sel, handleObj,\n handlerQueue = [],\n delegateCount = handlers.delegateCount,\n cur = event.target;\n\n // Find delegate handlers\n // Black-hole SVG instance trees (#13180)\n // Avoid non-left-click bubbling in Firefox (#3861)\n if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {\n\n for ( ; cur !== this; cur = cur.parentNode || this ) {\n\n // Don\'t process clicks on disabled elements (#6911, #8165, #11382, #11764)\n if ( cur.disabled !== true || event.type !== "click" ) {\n matches = [];\n for ( i = 0; i < delegateCount; i++ ) {\n handleObj = handlers[ i ];\n\n // Don\'t conflict with Object.prototype properties (#13203)\n sel = handleObj.selector + " ";\n\n if ( matches[ sel ] === undefined ) {\n matches[ sel ] = handleObj.needsContext ?\n jQuery( sel, this ).index( cur ) >= 0 :\n jQuery.find( sel, this, null, [ cur ] ).length;\n }\n if ( matches[ sel ] ) {\n matches.push( handleObj );\n }\n }\n if ( matches.length ) {\n handlerQueue.push({ elem: cur, handlers: matches });\n }\n }\n }\n }\n\n // Add the remaining (directly-bound) handlers\n if ( delegateCount < handlers.length ) {\n handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });\n }\n\n return handlerQueue;\n },\n\n // Includes some event props shared by KeyEvent and MouseEvent\n props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),\n\n fixHooks: {},\n\n keyHooks: {\n props: "char charCode key keyCode".split(" "),\n filter: function( event, original ) {\n\n // Add which for key events\n if ( event.which == null ) {\n event.which = original.charCode != null ? original.charCode : original.keyCode;\n }\n\n return event;\n }\n },\n\n mouseHooks: {\n props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),\n filter: function( event, original ) {\n var eventDoc, doc, body,\n button = original.button;\n\n // Calculate pageX/Y if missing and clientX/Y available\n if ( event.pageX == null && original.clientX != null ) {\n eventDoc = event.target.ownerDocument || document;\n doc = eventDoc.documentElement;\n body = eventDoc.body;\n\n event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );\n event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );\n }\n\n // Add which for click: 1 === left; 2 === middle; 3 === right\n // Note: button is not normalized, so don\'t use it\n if ( !event.which && button !== undefined ) {\n event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n }\n\n return event;\n }\n },\n\n fix: function( event ) {\n if ( event[ jQuery.expando ] ) {\n return event;\n }\n\n // Create a writable copy of the event object and normalize some properties\n var i, prop, copy,\n type = event.type,\n originalEvent = event,\n fixHook = this.fixHooks[ type ];\n\n if ( !fixHook ) {\n this.fixHooks[ type ] = fixHook =\n rmouseEvent.test( type ) ? this.mouseHooks :\n rkeyEvent.test( type ) ? this.keyHooks :\n {};\n }\n copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n event = new jQuery.Event( originalEvent );\n\n i = copy.length;\n while ( i-- ) {\n prop = copy[ i ];\n event[ prop ] = originalEvent[ prop ];\n }\n\n // Support: Cordova 2.5 (WebKit) (#13255)\n // All events should have a target; Cordova deviceready doesn\'t\n if ( !event.target ) {\n event.target = document;\n }\n\n // Support: Safari 6.0+, Chrome<28\n // Target should not be a text node (#504, #13143)\n if ( event.target.nodeType === 3 ) {\n event.target = event.target.parentNode;\n }\n\n return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n },\n\n special: {\n load: {\n // Prevent triggered image.load events from bubbling to window.load\n noBubble: true\n },\n focus: {\n // Fire native event if possible so blur/focus sequence is correct\n trigger: function() {\n if ( this !== safeActiveElement() && this.focus ) {\n this.focus();\n return false;\n }\n },\n delegateType: "focusin"\n },\n blur: {\n trigger: function() {\n if ( this === safeActiveElement() && this.blur ) {\n this.blur();\n return false;\n }\n },\n delegateType: "focusout"\n },\n click: {\n // For checkbox, fire native event so checked state will be right\n trigger: function() {\n if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {\n this.click();\n return false;\n }\n },\n\n // For cross-browser consistency, don\'t fire native .click() on links\n _default: function( event ) {\n return jQuery.nodeName( event.target, "a" );\n }\n },\n\n beforeunload: {\n postDispatch: function( event ) {\n\n // Support: Firefox 20+\n // Firefox doesn\'t alert if the returnValue field is not set.\n if ( event.result !== undefined && event.originalEvent ) {\n event.originalEvent.returnValue = event.result;\n }\n }\n }\n },\n\n simulate: function( type, elem, event, bubble ) {\n // Piggyback on a donor event to simulate a different one.\n // Fake originalEvent to avoid donor\'s stopPropagation, but if the\n // simulated event prevents default then we do the same on the donor.\n var e = jQuery.extend(\n new jQuery.Event(),\n event,\n {\n type: type,\n isSimulated: true,\n originalEvent: {}\n }\n );\n if ( bubble ) {\n jQuery.event.trigger( e, null, elem );\n } else {\n jQuery.event.dispatch.call( elem, e );\n }\n if ( e.isDefaultPrevented() ) {\n event.preventDefault();\n }\n }\n};\n\njQuery.removeEvent = function( elem, type, handle ) {\n if ( elem.removeEventListener ) {\n elem.removeEventListener( type, handle, false );\n }\n};\n\njQuery.Event = function( src, props ) {\n // Allow instantiation without the \'new\' keyword\n if ( !(this instanceof jQuery.Event) ) {\n return new jQuery.Event( src, props );\n }\n\n // Event object\n if ( src && src.type ) {\n this.originalEvent = src;\n this.type = src.type;\n\n // Events bubbling up the document may have been marked as prevented\n // by a handler lower down the tree; reflect the correct value.\n this.isDefaultPrevented = src.defaultPrevented ||\n src.defaultPrevented === undefined &&\n // Support: Android<4.0\n src.returnValue === false ?\n returnTrue :\n returnFalse;\n\n // Event type\n } else {\n this.type = src;\n }\n\n // Put explicitly provided properties onto the event object\n if ( props ) {\n jQuery.extend( this, props );\n }\n\n // Create a timestamp if incoming event doesn\'t have one\n this.timeStamp = src && src.timeStamp || jQuery.now();\n\n // Mark it as fixed\n this[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n isDefaultPrevented: returnFalse,\n isPropagationStopped: returnFalse,\n isImmediatePropagationStopped: returnFalse,\n\n preventDefault: function() {\n var e = this.originalEvent;\n\n this.isDefaultPrevented = returnTrue;\n\n if ( e && e.preventDefault ) {\n e.preventDefault();\n }\n },\n stopPropagation: function() {\n var e = this.originalEvent;\n\n this.isPropagationStopped = returnTrue;\n\n if ( e && e.stopPropagation ) {\n e.stopPropagation();\n }\n },\n stopImmediatePropagation: function() {\n var e = this.originalEvent;\n\n this.isImmediatePropagationStopped = returnTrue;\n\n if ( e && e.stopImmediatePropagation ) {\n e.stopImmediatePropagation();\n }\n\n this.stopPropagation();\n }\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// Support: Chrome 15+\njQuery.each({\n mouseenter: "mouseover",\n mouseleave: "mouseout",\n pointerenter: "pointerover",\n pointerleave: "pointerout"\n}, function( orig, fix ) {\n jQuery.event.special[ orig ] = {\n delegateType: fix,\n bindType: fix,\n\n handle: function( event ) {\n var ret,\n target = this,\n related = event.relatedTarget,\n handleObj = event.handleObj;\n\n // For mousenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n if ( !related || (related !== target && !jQuery.contains( target, related )) ) {\n event.type = handleObj.origType;\n ret = handleObj.handler.apply( this, arguments );\n event.type = fix;\n }\n return ret;\n }\n };\n});\n\n// Support: Firefox, Chrome, Safari\n// Create "bubbling" focus and blur events\nif ( !support.focusinBubbles ) {\n jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {\n\n // Attach a single capturing handler on the document while someone wants focusin/focusout\n var handler = function( event ) {\n jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );\n };\n\n jQuery.event.special[ fix ] = {\n setup: function() {\n var doc = this.ownerDocument || this,\n attaches = data_priv.access( doc, fix );\n\n if ( !attaches ) {\n doc.addEventListener( orig, handler, true );\n }\n data_priv.access( doc, fix, ( attaches || 0 ) + 1 );\n },\n teardown: function() {\n var doc = this.ownerDocument || this,\n attaches = data_priv.access( doc, fix ) - 1;\n\n if ( !attaches ) {\n doc.removeEventListener( orig, handler, true );\n data_priv.remove( doc, fix );\n\n } else {\n data_priv.access( doc, fix, attaches );\n }\n }\n };\n });\n}\n\njQuery.fn.extend({\n\n on: function( types, selector, data, fn, /*INTERNAL*/ one ) {\n var origFn, type;\n\n // Types can be a map of types/handlers\n if ( typeof types === "object" ) {\n // ( types-Object, selector, data )\n if ( typeof selector !== "string" ) {\n // ( types-Object, data )\n data = data || selector;\n selector = undefined;\n }\n for ( type in types ) {\n this.on( type, selector, data, types[ type ], one );\n }\n return this;\n }\n\n if ( data == null && fn == null ) {\n // ( types, fn )\n fn = selector;\n data = selector = undefined;\n } else if ( fn == null ) {\n if ( typeof selector === "string" ) {\n // ( types, selector, fn )\n fn = data;\n data = undefined;\n } else {\n // ( types, data, fn )\n fn = data;\n data = selector;\n selector = undefined;\n }\n }\n if ( fn === false ) {\n fn = returnFalse;\n } else if ( !fn ) {\n return this;\n }\n\n if ( one === 1 ) {\n origFn = fn;\n fn = function( event ) {\n // Can use an empty set, since event contains the info\n jQuery().off( event );\n return origFn.apply( this, arguments );\n };\n // Use same guid so caller can remove using origFn\n fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n }\n return this.each( function() {\n jQuery.event.add( this, types, fn, data, selector );\n });\n },\n one: function( types, selector, data, fn ) {\n return this.on( types, selector, data, fn, 1 );\n },\n off: function( types, selector, fn ) {\n var handleObj, type;\n if ( types && types.preventDefault && types.handleObj ) {\n // ( event ) dispatched jQuery.Event\n handleObj = types.handleObj;\n jQuery( types.delegateTarget ).off(\n handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,\n handleObj.selector,\n handleObj.handler\n );\n return this;\n }\n if ( typeof types === "object" ) {\n // ( types-object [, selector] )\n for ( type in types ) {\n this.off( type, selector, types[ type ] );\n }\n return this;\n }\n if ( selector === false || typeof selector === "function" ) {\n // ( types [, fn] )\n fn = selector;\n selector = undefined;\n }\n if ( fn === false ) {\n fn = returnFalse;\n }\n return this.each(function() {\n jQuery.event.remove( this, types, fn, selector );\n });\n },\n\n trigger: function( type, data ) {\n return this.each(function() {\n jQuery.event.trigger( type, data, this );\n });\n },\n triggerHandler: function( type, data ) {\n var elem = this[0];\n if ( elem ) {\n return jQuery.event.trigger( type, data, elem, true );\n }\n }\n});\n\n\nvar\n rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,\n rtagName = /<([\\w:]+)/,\n rhtml = /<|&#?\\w+;/,\n rnoInnerhtml = /<(?:script|style|link)/i,\n // checked="checked" or checked\n rchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n rscriptType = /^$|\\/(?:java|ecma)script/i,\n rscriptTypeMasked = /^true\\/(.*)/,\n rcleanScript = /^\\s*\\s*$/g,\n\n // We have to close these tags to support XHTML (#13200)\n wrapMap = {\n\n // Support: IE9\n option: [ 1, "" ],\n\n thead: [ 1, "", "
" ],\n col: [ 2, "", "
" ],\n tr: [ 2, "", "
" ],\n td: [ 3, "", "
" ],\n\n _default: [ 0, "", "" ]\n };\n\n// Support: IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: 1.x compatibility\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, "table" ) &&\n jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?\n\n elem.getElementsByTagName("tbody")[0] ||\n elem.appendChild( elem.ownerDocument.createElement("tbody") ) :\n elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;\n return elem;\n}\nfunction restoreScript( elem ) {\n var match = rscriptTypeMasked.exec( elem.type );\n\n if ( match ) {\n elem.type = match[ 1 ];\n } else {\n elem.removeAttribute("type");\n }\n\n return elem;\n}\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n var i = 0,\n l = elems.length;\n\n for ( ; i < l; i++ ) {\n data_priv.set(\n elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )\n );\n }\n}\n\nfunction cloneCopyEvent( src, dest ) {\n var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;\n\n if ( dest.nodeType !== 1 ) {\n return;\n }\n\n // 1. Copy private data: events, handlers, etc.\n if ( data_priv.hasData( src ) ) {\n pdataOld = data_priv.access( src );\n pdataCur = data_priv.set( dest, pdataOld );\n events = pdataOld.events;\n\n if ( events ) {\n delete pdataCur.handle;\n pdataCur.events = {};\n\n for ( type in events ) {\n for ( i = 0, l = events[ type ].length; i < l; i++ ) {\n jQuery.event.add( dest, type, events[ type ][ i ] );\n }\n }\n }\n }\n\n // 2. Copy user data\n if ( data_user.hasData( src ) ) {\n udataOld = data_user.access( src );\n udataCur = jQuery.extend( {}, udataOld );\n\n data_user.set( dest, udataCur );\n }\n}\n\nfunction getAll( context, tag ) {\n var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :\n context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :\n [];\n\n return tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n jQuery.merge( [ context ], ret ) :\n ret;\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n var nodeName = dest.nodeName.toLowerCase();\n\n // Fails to persist the checked state of a cloned checkbox or radio button.\n if ( nodeName === "input" && rcheckableType.test( src.type ) ) {\n dest.checked = src.checked;\n\n // Fails to return the selected option to the default selected state when cloning options\n } else if ( nodeName === "input" || nodeName === "textarea" ) {\n dest.defaultValue = src.defaultValue;\n }\n}\n\njQuery.extend({\n clone: function( elem, dataAndEvents, deepDataAndEvents ) {\n var i, l, srcElements, destElements,\n clone = elem.cloneNode( true ),\n inPage = jQuery.contains( elem.ownerDocument, elem );\n\n // Fix IE cloning issues\n if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n !jQuery.isXMLDoc( elem ) ) {\n\n // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n destElements = getAll( clone );\n srcElements = getAll( elem );\n\n for ( i = 0, l = srcElements.length; i < l; i++ ) {\n fixInput( srcElements[ i ], destElements[ i ] );\n }\n }\n\n // Copy the events from the original to the clone\n if ( dataAndEvents ) {\n if ( deepDataAndEvents ) {\n srcElements = srcElements || getAll( elem );\n destElements = destElements || getAll( clone );\n\n for ( i = 0, l = srcElements.length; i < l; i++ ) {\n cloneCopyEvent( srcElements[ i ], destElements[ i ] );\n }\n } else {\n cloneCopyEvent( elem, clone );\n }\n }\n\n // Preserve script evaluation history\n destElements = getAll( clone, "script" );\n if ( destElements.length > 0 ) {\n setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );\n }\n\n // Return the cloned set\n return clone;\n },\n\n buildFragment: function( elems, context, scripts, selection ) {\n var elem, tmp, tag, wrap, contains, j,\n fragment = context.createDocumentFragment(),\n nodes = [],\n i = 0,\n l = elems.length;\n\n for ( ; i < l; i++ ) {\n elem = elems[ i ];\n\n if ( elem || elem === 0 ) {\n\n // Add nodes directly\n if ( jQuery.type( elem ) === "object" ) {\n // Support: QtWebKit, PhantomJS\n // push.apply(_, arraylike) throws on ancient WebKit\n jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n // Convert non-html into a text node\n } else if ( !rhtml.test( elem ) ) {\n nodes.push( context.createTextNode( elem ) );\n\n // Convert html into DOM nodes\n } else {\n tmp = tmp || fragment.appendChild( context.createElement("div") );\n\n // Deserialize a standard representation\n tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();\n wrap = wrapMap[ tag ] || wrapMap._default;\n tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ];\n\n // Descend through wrappers to the right content\n j = wrap[ 0 ];\n while ( j-- ) {\n tmp = tmp.lastChild;\n }\n\n // Support: QtWebKit, PhantomJS\n // push.apply(_, arraylike) throws on ancient WebKit\n jQuery.merge( nodes, tmp.childNodes );\n\n // Remember the top-level container\n tmp = fragment.firstChild;\n\n // Ensure the created nodes are orphaned (#12392)\n tmp.textContent = "";\n }\n }\n }\n\n // Remove wrapper from fragment\n fragment.textContent = "";\n\n i = 0;\n while ( (elem = nodes[ i++ ]) ) {\n\n // #4087 - If origin and destination elements are the same, and this is\n // that element, do not do anything\n if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {\n continue;\n }\n\n contains = jQuery.contains( elem.ownerDocument, elem );\n\n // Append to fragment\n tmp = getAll( fragment.appendChild( elem ), "script" );\n\n // Preserve script evaluation history\n if ( contains ) {\n setGlobalEval( tmp );\n }\n\n // Capture executables\n if ( scripts ) {\n j = 0;\n while ( (elem = tmp[ j++ ]) ) {\n if ( rscriptType.test( elem.type || "" ) ) {\n scripts.push( elem );\n }\n }\n }\n }\n\n return fragment;\n },\n\n cleanData: function( elems ) {\n var data, elem, type, key,\n special = jQuery.event.special,\n i = 0;\n\n for ( ; (elem = elems[ i ]) !== undefined; i++ ) {\n if ( jQuery.acceptData( elem ) ) {\n key = elem[ data_priv.expando ];\n\n if ( key && (data = data_priv.cache[ key ]) ) {\n if ( data.events ) {\n for ( type in data.events ) {\n if ( special[ type ] ) {\n jQuery.event.remove( elem, type );\n\n // This is a shortcut to avoid jQuery.event.remove\'s overhead\n } else {\n jQuery.removeEvent( elem, type, data.handle );\n }\n }\n }\n if ( data_priv.cache[ key ] ) {\n // Discard any remaining `private` data\n delete data_priv.cache[ key ];\n }\n }\n }\n // Discard any remaining `user` data\n delete data_user.cache[ elem[ data_user.expando ] ];\n }\n }\n});\n\njQuery.fn.extend({\n text: function( value ) {\n return access( this, function( value ) {\n return value === undefined ?\n jQuery.text( this ) :\n this.empty().each(function() {\n if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n this.textContent = value;\n }\n });\n }, null, value, arguments.length );\n },\n\n append: function() {\n return this.domManip( arguments, function( elem ) {\n if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n var target = manipulationTarget( this, elem );\n target.appendChild( elem );\n }\n });\n },\n\n prepend: function() {\n return this.domManip( arguments, function( elem ) {\n if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n var target = manipulationTarget( this, elem );\n target.insertBefore( elem, target.firstChild );\n }\n });\n },\n\n before: function() {\n return this.domManip( arguments, function( elem ) {\n if ( this.parentNode ) {\n this.parentNode.insertBefore( elem, this );\n }\n });\n },\n\n after: function() {\n return this.domManip( arguments, function( elem ) {\n if ( this.parentNode ) {\n this.parentNode.insertBefore( elem, this.nextSibling );\n }\n });\n },\n\n remove: function( selector, keepData /* Internal Use Only */ ) {\n var elem,\n elems = selector ? jQuery.filter( selector, this ) : this,\n i = 0;\n\n for ( ; (elem = elems[i]) != null; i++ ) {\n if ( !keepData && elem.nodeType === 1 ) {\n jQuery.cleanData( getAll( elem ) );\n }\n\n if ( elem.parentNode ) {\n if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {\n setGlobalEval( getAll( elem, "script" ) );\n }\n elem.parentNode.removeChild( elem );\n }\n }\n\n return this;\n },\n\n empty: function() {\n var elem,\n i = 0;\n\n for ( ; (elem = this[i]) != null; i++ ) {\n if ( elem.nodeType === 1 ) {\n\n // Prevent memory leaks\n jQuery.cleanData( getAll( elem, false ) );\n\n // Remove any remaining nodes\n elem.textContent = "";\n }\n }\n\n return this;\n },\n\n clone: function( dataAndEvents, deepDataAndEvents ) {\n dataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n return this.map(function() {\n return jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n });\n },\n\n html: function( value ) {\n return access( this, function( value ) {\n var elem = this[ 0 ] || {},\n i = 0,\n l = this.length;\n\n if ( value === undefined && elem.nodeType === 1 ) {\n return elem.innerHTML;\n }\n\n // See if we can take a shortcut and just use innerHTML\n if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&\n !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {\n\n value = value.replace( rxhtmlTag, "<$1>" );\n\n try {\n for ( ; i < l; i++ ) {\n elem = this[ i ] || {};\n\n // Remove element nodes and prevent memory leaks\n if ( elem.nodeType === 1 ) {\n jQuery.cleanData( getAll( elem, false ) );\n elem.innerHTML = value;\n }\n }\n\n elem = 0;\n\n // If using innerHTML throws an exception, use the fallback method\n } catch( e ) {}\n }\n\n if ( elem ) {\n this.empty().append( value );\n }\n }, null, value, arguments.length );\n },\n\n replaceWith: function() {\n var arg = arguments[ 0 ];\n\n // Make the changes, replacing each context element with the new content\n this.domManip( arguments, function( elem ) {\n arg = this.parentNode;\n\n jQuery.cleanData( getAll( this ) );\n\n if ( arg ) {\n arg.replaceChild( elem, this );\n }\n });\n\n // Force removal if there was no new content (e.g., from empty arguments)\n return arg && (arg.length || arg.nodeType) ? this : this.remove();\n },\n\n detach: function( selector ) {\n return this.remove( selector, true );\n },\n\n domManip: function( args, callback ) {\n\n // Flatten any nested arrays\n args = concat.apply( [], args );\n\n var fragment, first, scripts, hasScripts, node, doc,\n i = 0,\n l = this.length,\n set = this,\n iNoClone = l - 1,\n value = args[ 0 ],\n isFunction = jQuery.isFunction( value );\n\n // We can\'t cloneNode fragments that contain checked, in WebKit\n if ( isFunction ||\n ( l > 1 && typeof value === "string" &&\n !support.checkClone && rchecked.test( value ) ) ) {\n return this.each(function( index ) {\n var self = set.eq( index );\n if ( isFunction ) {\n args[ 0 ] = value.call( this, index, self.html() );\n }\n self.domManip( args, callback );\n });\n }\n\n if ( l ) {\n fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );\n first = fragment.firstChild;\n\n if ( fragment.childNodes.length === 1 ) {\n fragment = first;\n }\n\n if ( first ) {\n scripts = jQuery.map( getAll( fragment, "script" ), disableScript );\n hasScripts = scripts.length;\n\n // Use the original fragment for the last item instead of the first because it can end up\n // being emptied incorrectly in certain situations (#8070).\n for ( ; i < l; i++ ) {\n node = fragment;\n\n if ( i !== iNoClone ) {\n node = jQuery.clone( node, true, true );\n\n // Keep references to cloned scripts for later restoration\n if ( hasScripts ) {\n // Support: QtWebKit\n // jQuery.merge because push.apply(_, arraylike) throws\n jQuery.merge( scripts, getAll( node, "script" ) );\n }\n }\n\n callback.call( this[ i ], node, i );\n }\n\n if ( hasScripts ) {\n doc = scripts[ scripts.length - 1 ].ownerDocument;\n\n // Reenable scripts\n jQuery.map( scripts, restoreScript );\n\n // Evaluate executable scripts on first document insertion\n for ( i = 0; i < hasScripts; i++ ) {\n node = scripts[ i ];\n if ( rscriptType.test( node.type || "" ) &&\n !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {\n\n if ( node.src ) {\n // Optional AJAX dependency, but won\'t run scripts if not present\n if ( jQuery._evalUrl ) {\n jQuery._evalUrl( node.src );\n }\n } else {\n jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );\n }\n }\n }\n }\n }\n }\n\n return this;\n }\n});\n\njQuery.each({\n appendTo: "append",\n prependTo: "prepend",\n insertBefore: "before",\n insertAfter: "after",\n replaceAll: "replaceWith"\n}, function( name, original ) {\n jQuery.fn[ name ] = function( selector ) {\n var elems,\n ret = [],\n insert = jQuery( selector ),\n last = insert.length - 1,\n i = 0;\n\n for ( ; i <= last; i++ ) {\n elems = i === last ? this : this.clone( true );\n jQuery( insert[ i ] )[ original ]( elems );\n\n // Support: QtWebKit\n // .get() because push.apply(_, arraylike) throws\n push.apply( ret, elems.get() );\n }\n\n return this.pushStack( ret );\n };\n});\n\n\nvar iframe,\n elemdisplay = {};\n\n/**\n * Retrieve the actual display of a element\n * @param {String} name nodeName of the element\n * @param {Object} doc Document object\n */\n// Called only from within defaultDisplay\nfunction actualDisplay( name, doc ) {\n var style,\n elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\n // getDefaultComputedStyle might be reliably used only on attached element\n display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?\n\n // Use of this method is a temporary fix (more like optimization) until something better comes along,\n // since it was removed from specification and supported only in FF\n style.display : jQuery.css( elem[ 0 ], "display" );\n\n // We don\'t have any data stored on the element,\n // so use "detach" method as fast way to get rid of the element\n elem.detach();\n\n return display;\n}\n\n/**\n * Try to determine the default display value of an element\n * @param {String} nodeName\n */\nfunction defaultDisplay( nodeName ) {\n var doc = document,\n display = elemdisplay[ nodeName ];\n\n if ( !display ) {\n display = actualDisplay( nodeName, doc );\n\n // If the simple way fails, read from inside an iframe\n if ( display === "none" || !display ) {\n\n // Use the already-created iframe if possible\n iframe = (iframe || jQuery( "