Update reduce repeated code.

Former-commit-id: 3412cde47a136dab5c241c67d1c29f2e676c38d1
This commit is contained in:
John-David Dalton
2012-09-29 03:13:45 -07:00
parent 42f58cbbb3
commit 40cf5c99ef
5 changed files with 254 additions and 272 deletions

View File

@@ -142,7 +142,7 @@
'size': ['keys'], 'size': ['keys'],
'some': ['identity'], 'some': ['identity'],
'sortBy': [], 'sortBy': [],
'sortedIndex': ['bind', 'identity'], 'sortedIndex': ['identity'],
'tap': ['mixin'], 'tap': ['mixin'],
'template': ['escape'], 'template': ['escape'],
'throttle': [], 'throttle': [],

View File

@@ -9,10 +9,10 @@
var compiledVars = [ var compiledVars = [
'argsIndex', 'argsIndex',
'argsLength', 'argsLength',
'bindCallback',
'callback', 'callback',
'collection', 'collection',
'concat', 'concat',
'createCallback',
'ctor', 'ctor',
'hasOwnProperty', 'hasOwnProperty',
'identity', 'identity',
@@ -64,7 +64,6 @@
'pass', 'pass',
'properties', 'properties',
'property', 'property',
'propertyCallback',
'propsLength', 'propsLength',
'source', 'source',
'stackA', 'stackA',
@@ -105,7 +104,6 @@
var propWhitelist = [ var propWhitelist = [
'_', '_',
'__chain__', '__chain__',
'__proto__',
'__wrapped__', '__wrapped__',
'after', 'after',
'all', 'all',

File diff suppressed because it is too large Load Diff

187
lodash.js
View File

@@ -81,6 +81,7 @@
/* Native method shortcuts for methods with the same name as other `lodash` methods */ /* Native method shortcuts for methods with the same name as other `lodash` methods */
var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind, var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind,
nativeFloor = Math.floor, nativeFloor = Math.floor,
nativeGetPrototypeOf = reNative.test(nativeGetPrototypeOf = Object.getPrototypeOf) && nativeGetPrototypeOf,
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray, nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
nativeIsFinite = window.isFinite, nativeIsFinite = window.isFinite,
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys, nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
@@ -452,24 +453,14 @@
var baseIteratorOptions = { var baseIteratorOptions = {
'args': 'collection, callback, thisArg', 'args': 'collection, callback, thisArg',
'init': 'collection', 'init': 'collection',
'top': 'top': 'callback = createCallback(callback, thisArg)',
'if (!callback) {\n' +
' callback = identity\n' +
'} else if (thisArg !== undefined) {\n' +
' callback = bindCallback(callback, thisArg)\n' +
'}',
'inLoop': 'if (callback(value, index, collection) === false) return result' 'inLoop': 'if (callback(value, index, collection) === false) return result'
}; };
/** Reusable iterator options for `countBy`, `groupBy`, and `sortBy` */ /** Reusable iterator options for `countBy`, `groupBy`, and `sortBy` */
var countByIteratorOptions = { var countByIteratorOptions = {
'init': '{}', 'init': '{}',
'top': 'top': 'callback = createCallback(callback, thisArg)',
'if (typeof callback != \'function\') {\n' +
' callback = propertyCallback(callback)\n' +
'} else if (thisArg !== undefined) {\n' +
' callback = bindCallback(callback, thisArg)\n' +
'}',
'inLoop': 'inLoop':
'var prop = callback(value, index, collection);\n' + 'var prop = callback(value, index, collection);\n' +
'(hasOwnProperty.call(result, prop) ? result[prop]++ : result[prop] = 1)' '(hasOwnProperty.call(result, prop) ? result[prop]++ : result[prop] = 1)'
@@ -502,7 +493,7 @@
/** Reusable iterator options for `find`, `forEach`, `forIn`, and `forOwn` */ /** Reusable iterator options for `find`, `forEach`, `forIn`, and `forOwn` */
var forEachIteratorOptions = { var forEachIteratorOptions = {
'top': 'if (thisArg !== undefined) callback = bindCallback(callback, thisArg)' 'top': 'callback = createCallback(callback, thisArg)'
}; };
/** Reusable iterator options for `forIn` and `forOwn` */ /** Reusable iterator options for `forIn` and `forOwn` */
@@ -532,11 +523,8 @@
'init': '{}', 'init': '{}',
'top': 'top':
'var isFunc = typeof callback == \'function\';\n' + 'var isFunc = typeof callback == \'function\';\n' +
'if (!isFunc) {\n' + 'callback = createCallback(callback, thisArg);\n' +
' var props = concat.apply(ArrayProto, arguments)\n' + 'if (!isFunc) var props = concat.apply(ArrayProto, arguments)',
'} else if (thisArg !== undefined) {\n' +
' callback = bindCallback(callback, thisArg)\n' +
'}',
'inLoop': 'inLoop':
'if (isFunc\n' + 'if (isFunc\n' +
' ? !callback(value, index, object)\n' + ' ? !callback(value, index, object)\n' +
@@ -546,21 +534,6 @@
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
/**
* Creates a bound iterator function that, when called, invokes `func` with
* the `this` binding of `thisArg` and the arguments (value, index, object).
*
* @private
* @param {Function} func The function to bind.
* @param {Mixed} [thisArg] The `this` binding of `func`.
* @returns {Function} Returns the new bound function.
*/
function bindCallback(func, thisArg) {
return function(value, index, object) {
return func.call(thisArg, value, index, object);
};
}
/** /**
* Creates a function optimized for searching large arrays for a given `value`, * Creates a function optimized for searching large arrays for a given `value`,
* starting at `fromIndex`, using strict equality for comparisons, i.e. `===`. * starting at `fromIndex`, using strict equality for comparisons, i.e. `===`.
@@ -681,6 +654,31 @@
return bound; return bound;
} }
/**
* Produces an iteration callback bound to an optional `thisArg`. If `func` is
* a property name, the callback will return the property value for a given element.
*
* @private
* @param {Function|String} [func=identity|property] The function called per
* iteration or property name to query.
* @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Function} Returns a callback function.
*/
function createCallback(func, thisArg) {
if (!func) {
return identity;
} else if (typeof func != 'function') {
return function(object) {
return object[func];
}
} else if (thisArg !== undefined) {
return function(value, index, object) {
return func.call(thisArg, value, index, object);
};
}
return func;
}
/** /**
* Creates compiled iteration functions. The iteration function will be created * Creates compiled iteration functions. The iteration function will be created
* to iterate over only objects if the first argument of `options.args` is * to iterate over only objects if the first argument of `options.args` is
@@ -767,19 +765,19 @@
} }
// create the function factory // create the function factory
var factory = Function( var factory = Function(
'arrayLikeClasses, ArrayProto, bind, bindCallback, compareAscending, concat, ' + 'arrayLikeClasses, ArrayProto, bind, compareAscending, concat, createCallback, ' +
'forIn, hasOwnProperty, identity, indexOf, isArguments, isArray, isFunction, ' + 'forIn, hasOwnProperty, identity, indexOf, isArguments, isArray, isFunction, ' +
'isPlainObject, objectClass, objectTypes, nativeKeys, propertyIsEnumerable, ' + 'isPlainObject, objectClass, objectTypes, nativeKeys, propertyIsEnumerable, ' +
'propertyCallback, slice, stringClass, toString, undefined', 'slice, stringClass, toString, undefined',
'var callee = function(' + args + ') {\n' + iteratorTemplate(data) + '\n};\n' + 'var callee = function(' + args + ') {\n' + iteratorTemplate(data) + '\n};\n' +
'return callee' 'return callee'
); );
// return the compiled function // return the compiled function
return factory( return factory(
arrayLikeClasses, ArrayProto, bind, bindCallback, compareAscending, concat, arrayLikeClasses, ArrayProto, bind, compareAscending, concat, createCallback,
forIn, hasOwnProperty, identity, indexOf, isArguments, isArray, isFunction, forIn, hasOwnProperty, identity, indexOf, isArguments, isArray, isFunction,
isPlainObject, objectClass, objectTypes, nativeKeys, propertyIsEnumerable, isPlainObject, objectClass, objectTypes, nativeKeys, propertyIsEnumerable,
propertyCallback, slice, stringClass, toString slice, stringClass, toString
); );
} }
@@ -807,16 +805,12 @@
} }
/** /**
* Creates a function that returns the `property` value of the given `object`. * A no-operation function.
* *
* @private * @private
* @param {String} property The property to get the value of.
* @returns {Function} Returns the new function.
*/ */
function propertyCallback(property) { function noop() {
return function(object) { // no operation performed
return object[property];
};
} }
/** /**
@@ -925,15 +919,15 @@
* _.isPlainObject({ 'name': 'moe', 'age': 40 }); * _.isPlainObject({ 'name': 'moe', 'age': 40 });
* // => true * // => true
*/ */
var isPlainObject = objectTypes.__proto__ != ObjectProto ? isPlainFallback : function(value) { var isPlainObject = !nativeGetPrototypeOf ? isPlainFallback : function(value) {
if (!value) { if (!(value && typeof value == 'object')) {
return false; return false;
} }
var valueOf = value.valueOf, var valueOf = value.valueOf,
objProto = typeof valueOf == 'function' && (objProto = valueOf.__proto__) && objProto.__proto__; objProto = typeof valueOf == 'function' && (objProto = nativeGetPrototypeOf(valueOf)) && nativeGetPrototypeOf(objProto);
return objProto return objProto
? value == objProto || (value.__proto__ == objProto && !isArguments(value)) ? value == objProto || (nativeGetPrototypeOf(value) == objProto && !isArguments(value))
: isPlainFallback(value); : isPlainFallback(value);
}; };
@@ -1158,7 +1152,7 @@
* @category Objects * @category Objects
* @param {Object} object The object to iterate over. * @param {Object} object The object to iterate over.
* @param {Function} callback The function called per iteration. * @param {Function} callback The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Object} Returns `object`. * @returns {Object} Returns `object`.
* @example * @example
* *
@@ -1190,7 +1184,7 @@
* @category Objects * @category Objects
* @param {Object} object The object to iterate over. * @param {Object} object The object to iterate over.
* @param {Function} callback The function called per iteration. * @param {Function} callback The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Object} Returns `object`. * @returns {Object} Returns `object`.
* @example * @example
* *
@@ -1784,7 +1778,7 @@
* @param {Object} object The source object. * @param {Object} object The source object.
* @param {Function|String} callback|[prop1, prop2, ...] The properties to omit * @param {Function|String} callback|[prop1, prop2, ...] The properties to omit
* or the function called per iteration. * or the function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Object} Returns an object without the omitted properties. * @returns {Object} Returns an object without the omitted properties.
* @example * @example
* *
@@ -1831,7 +1825,7 @@
* @param {Object} object The source object. * @param {Object} object The source object.
* @param {Function|String} callback|[prop1, prop2, ...] The properties to pick * @param {Function|String} callback|[prop1, prop2, ...] The properties to pick
* or the function called per iteration. * or the function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Object} Returns an object composed of the picked properties. * @returns {Object} Returns an object composed of the picked properties.
* @example * @example
* *
@@ -1854,7 +1848,7 @@
' if (prop in object) result[prop] = object[prop]\n' + ' if (prop in object) result[prop] = object[prop]\n' +
' }\n' + ' }\n' +
'} else {\n' + '} else {\n' +
' if (thisArg !== undefined) callback = bindCallback(callback, thisArg)', ' callback = createCallback(callback, thisArg)',
'inLoop': 'inLoop':
'if (callback(value, index, object)) result[index] = value', 'if (callback(value, index, object)) result[index] = value',
'bottom': '}' 'bottom': '}'
@@ -1926,7 +1920,7 @@
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function|String} callback|property The function called per iteration * @param {Function|String} callback|property The function called per iteration
* or property name to count by. * or property name to count by.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Object} Returns the composed aggregate object. * @returns {Object} Returns the composed aggregate object.
* @example * @example
* *
@@ -1952,7 +1946,7 @@
* @category Collections * @category Collections
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function} [callback=identity] The function called per iteration. * @param {Function} [callback=identity] The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Boolean} Returns `true` if all elements pass the callback check, * @returns {Boolean} Returns `true` if all elements pass the callback check,
* else `false`. * else `false`.
* @example * @example
@@ -1973,7 +1967,7 @@
* @category Collections * @category Collections
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function} [callback=identity] The function called per iteration. * @param {Function} [callback=identity] The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Array} Returns a new array of elements that passed the callback check. * @returns {Array} Returns a new array of elements that passed the callback check.
* @example * @example
* *
@@ -1994,7 +1988,7 @@
* @category Collections * @category Collections
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function} callback The function called per iteration. * @param {Function} callback The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Mixed} Returns the element that passed the callback check, * @returns {Mixed} Returns the element that passed the callback check,
* else `undefined`. * else `undefined`.
* @example * @example
@@ -2019,7 +2013,7 @@
* @category Collections * @category Collections
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function} callback The function called per iteration. * @param {Function} callback The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Array|Object|String} Returns `collection`. * @returns {Array|Object|String} Returns `collection`.
* @example * @example
* *
@@ -2044,7 +2038,7 @@
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function|String} callback|property The function called per iteration * @param {Function|String} callback|property The function called per iteration
* or property name to group by. * or property name to group by.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Object} Returns the composed aggregate object. * @returns {Object} Returns the composed aggregate object.
* @example * @example
* *
@@ -2110,7 +2104,7 @@
* @category Collections * @category Collections
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function} [callback=identity] The function called per iteration. * @param {Function} [callback=identity] The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Array} Returns a new array of the results of each `callback` execution. * @returns {Array} Returns a new array of the results of each `callback` execution.
* @example * @example
* *
@@ -2164,7 +2158,7 @@
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function} callback The function called per iteration. * @param {Function} callback The function called per iteration.
* @param {Mixed} [accumulator] Initial value of the accumulator. * @param {Mixed} [accumulator] Initial value of the accumulator.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Mixed} Returns the accumulated value. * @returns {Mixed} Returns the accumulated value.
* @example * @example
* *
@@ -2176,7 +2170,7 @@
'init': 'accumulator', 'init': 'accumulator',
'top': 'top':
'var noaccum = arguments.length < 3;\n' + 'var noaccum = arguments.length < 3;\n' +
'if (thisArg !== undefined) callback = bindCallback(callback, thisArg)', 'callback = createCallback(callback, thisArg)',
'beforeLoop': { 'beforeLoop': {
'array': 'if (noaccum) result = iteratee[++index]' 'array': 'if (noaccum) result = iteratee[++index]'
}, },
@@ -2200,7 +2194,7 @@
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function} callback The function called per iteration. * @param {Function} callback The function called per iteration.
* @param {Mixed} [accumulator] Initial value of the accumulator. * @param {Mixed} [accumulator] Initial value of the accumulator.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Mixed} Returns the accumulated value. * @returns {Mixed} Returns the accumulated value.
* @example * @example
* *
@@ -2237,7 +2231,7 @@
* @category Collections * @category Collections
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function} [callback=identity] The function called per iteration. * @param {Function} [callback=identity] The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Array} Returns a new array of elements that did **not** pass the * @returns {Array} Returns a new array of elements that did **not** pass the
* callback check. * callback check.
* @example * @example
@@ -2286,7 +2280,7 @@
* @category Collections * @category Collections
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function} [callback=identity] The function called per iteration. * @param {Function} [callback=identity] The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Boolean} Returns `true` if any element passes the callback check, * @returns {Boolean} Returns `true` if any element passes the callback check,
* else `false`. * else `false`.
* @example * @example
@@ -2311,7 +2305,7 @@
* @param {Array|Object|String} collection The collection to iterate over. * @param {Array|Object|String} collection The collection to iterate over.
* @param {Function|String} callback|property The function called per iteration * @param {Function|String} callback|property The function called per iteration
* or property name to sort by. * or property name to sort by.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Array} Returns a new array of sorted elements. * @returns {Array} Returns a new array of sorted elements.
* @example * @example
* *
@@ -2693,7 +2687,7 @@
* @category Arrays * @category Arrays
* @param {Array} array The array to iterate over. * @param {Array} array The array to iterate over.
* @param {Function} [callback] The function called per iteration. * @param {Function} [callback] The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Mixed} Returns the maximum value. * @returns {Mixed} Returns the maximum value.
* @example * @example
* *
@@ -2708,16 +2702,12 @@
*/ */
function max(array, callback, thisArg) { function max(array, callback, thisArg) {
var current, var current,
result,
computed = -Infinity, computed = -Infinity,
index = -1, index = -1,
length = array ? array.length : 0; length = array ? array.length : 0,
result = computed;
if (!callback) { callback = createCallback(callback, thisArg);
callback = identity;
} else if (thisArg !== undefined) {
callback = bindCallback(callback, thisArg);
}
while (++index < length) { while (++index < length) {
current = callback(array[index], index, array); current = callback(array[index], index, array);
if (current > computed) { if (current > computed) {
@@ -2739,7 +2729,7 @@
* @category Arrays * @category Arrays
* @param {Array} array The array to iterate over. * @param {Array} array The array to iterate over.
* @param {Function} [callback] The function called per iteration. * @param {Function} [callback] The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Mixed} Returns the minimum value. * @returns {Mixed} Returns the minimum value.
* @example * @example
* *
@@ -2748,16 +2738,12 @@
*/ */
function min(array, callback, thisArg) { function min(array, callback, thisArg) {
var current, var current,
result,
computed = Infinity, computed = Infinity,
index = -1, index = -1,
length = array ? array.length : 0; length = array ? array.length : 0,
result = computed;
if (!callback) { callback = createCallback(callback, thisArg);
callback = identity;
} else if (thisArg !== undefined) {
callback = bindCallback(callback, thisArg);
}
while (++index < length) { while (++index < length) {
current = callback(array[index], index, array); current = callback(array[index], index, array);
if (current < computed) { if (current < computed) {
@@ -2905,32 +2891,37 @@
* should be inserted into `array` in order to maintain the sort order of the * should be inserted into `array` in order to maintain the sort order of the
* sorted `array`. If `callback` is passed, it will be executed for `value` and * sorted `array`. If `callback` is passed, it will be executed for `value` and
* each element in `array` to compute their sort ranking. The `callback` is * each element in `array` to compute their sort ranking. The `callback` is
* bound to `thisArg` and invoked with one argument; (value). * bound to `thisArg` and invoked with one argument; (value). The `callback`
* argument may also be the name of a property to order by.
* *
* @static * @static
* @memberOf _ * @memberOf _
* @category Arrays * @category Arrays
* @param {Array} array The array to iterate over. * @param {Array} array The array to iterate over.
* @param {Mixed} value The value to evaluate. * @param {Mixed} value The value to evaluate.
* @param {Function} [callback=identity] The function called per iteration. * @param {Function|String} [callback=identity|property] The function called
* @param {Mixed} [thisArg] The `this` binding for the callback. * per iteration or property name to order by.
* @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Number} Returns the index at which the value should be inserted * @returns {Number} Returns the index at which the value should be inserted
* into `array`. * into `array`.
* @example * @example
* *
* _.sortedIndex([20, 30, 40], 35); * _.sortedIndex([20, 30, 50], 40);
* // => 2
*
* _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x');
* // => 2 * // => 2
* *
* var dict = { * var dict = {
* 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'thirty-five': 35, 'fourty': 40 } * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 }
* }; * };
* *
* _.sortedIndex(['twenty', 'thirty', 'fourty'], 'thirty-five', function(word) { * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
* return dict.wordToNumber[word]; * return dict.wordToNumber[word];
* }); * });
* // => 2 * // => 2
* *
* _.sortedIndex(['twenty', 'thirty', 'fourty'], 'thirty-five', function(word) { * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
* return this.wordToNumber[word]; * return this.wordToNumber[word];
* }, dict); * }, dict);
* // => 2 * // => 2
@@ -2940,13 +2931,7 @@
low = 0, low = 0,
high = array.length; high = array.length;
if (!callback) { callback = createCallback(callback, thisArg);
callback = identity;
} else if (typeof callback != 'function') {
callback = propertyCallback(callback);
} else if (thisArg !== undefined) {
callback = bind(callback, thisArg);
}
value = callback(value); value = callback(value);
while (low < high) { while (low < high) {
mid = (low + high) >>> 1; mid = (low + high) >>> 1;
@@ -2998,7 +2983,7 @@
* @param {Array} array The array to process. * @param {Array} array The array to process.
* @param {Boolean} [isSorted=false] A flag to indicate that the `array` is already sorted. * @param {Boolean} [isSorted=false] A flag to indicate that the `array` is already sorted.
* @param {Function} [callback=identity] The function called per iteration. * @param {Function} [callback=identity] The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Array} Returns a duplicate-value-free array. * @returns {Array} Returns a duplicate-value-free array.
* @example * @example
* *
@@ -3027,11 +3012,7 @@
callback = isSorted; callback = isSorted;
isSorted = false; isSorted = false;
} }
if (!callback) { callback = createCallback(callback, thisArg);
callback = identity;
} else if (thisArg !== undefined) {
callback = bindCallback(callback, thisArg);
}
while (++index < length) { while (++index < length) {
computed = callback(array[index], index, array); computed = callback(array[index], index, array);
if (isSorted if (isSorted
@@ -3853,7 +3834,7 @@
* @category Utilities * @category Utilities
* @param {Number} n The number of times to execute the callback. * @param {Number} n The number of times to execute the callback.
* @param {Function} callback The function called per iteration. * @param {Function} callback The function called per iteration.
* @param {Mixed} [thisArg] The `this` binding for the callback. * @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Array} Returns a new array of the results of each `callback` execution. * @returns {Array} Returns a new array of the results of each `callback` execution.
* @example * @example
* *

66
lodash.min.js vendored
View File

@@ -2,38 +2,38 @@
Lo-Dash 0.7.0 lodash.com/license Lo-Dash 0.7.0 lodash.com/license
Underscore.js 1.4.0 underscorejs.org/LICENSE Underscore.js 1.4.0 underscorejs.org/LICENSE
*/ */
;(function(e,t){function s(e){if(e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t){return function(n,r,i){return e.call(t,n,r,i)}}function u(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||H),s=i?{}:e;if(i)for(var o=t-1;++o<r;)n=e[o]+"",(Q.call(s,n)?s[n]:s[n]=[]).push(e[o]);return function(e){if(i){var n=e+"";return Q.call(s,n)&&-1<x(s[n],e)}return-1<x(s,e,t)}}function a(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1 ;(function(e,t){function s(e){if(e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||H),s=i?{}:e;if(i)for(var o=t-1;++o<r;)n=e[o]+"",(Q.call(s,n)?s[n]:s[n]=[]).push(e[o]);return function(e){if(i){var n=e+"";return Q.call(s,n)&&-1<x(s[n],e)}return-1<x(s,e,t)}}function u(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function a(e,t,n){function r(){var u=arguments
}return r<i?-1:1}function f(e,t,n){function r(){var u=arguments,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(Z.call(u)):n),this instanceof r?(noop.prototype=e.prototype,a=new noop,(u=e.apply(a,u))&&Ht[typeof u]?u:a):e.apply(a,u)}var i=m(e),s=!n,o=e;return s&&(n=t),r}function l(){for(var e,t,n,s=-1,u=arguments.length,f={e:"",p:"",c:{d:""},l:{d:""}};++s<u;)for(t in e=arguments[s],e)n=(n=e[t])==r?"":n,/d|h/.test(t)?("string"==typeof n&&(n={b:n,k:n}),f.c[t]=n.b||"",f.l[t]=n.k||""):f[t ,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(Z.call(u)):n),this instanceof r?(p.prototype=e.prototype,a=new p,(u=e.apply(a,u))&&Bt[typeof u]?u:a):e.apply(a,u)}var i=m(e),s=!n,o=e;return s&&(n=t),r}function f(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:A}function l(){for(var e,t,n,s=-1,o=arguments.length,a={e:"",p:"",c:{d:""},l:{d:""}};++s<o;)for(t in e=arguments[s],e)n=(n=e[t])==r?"":n,/d|h/.test(t)?("string"==typeof
]=n;e=f.a,t=/^[^,]+/.exec(e)[0],n=f.i,s=f.r,f.f=t,f.g=bt,f.i=n==r?t:n,f.j=At,f.m=St,f.o=J,f.q=f.q!==i,f.r=s==r?Ot:s,f.n==r&&(f.n=Nt);if("e"!=t||!f.c.h)f.c=r;t="",f.r&&(t+="'use strict';"),t+="var j,B,k="+f.f+",u",f.i&&(t+="="+f.i),t+=";"+f.p+";",f.c&&(t+="var l=k.length;j=-1;",f.l&&(t+="if(l===+l){"),f.n&&(t+="if(z.call(k)==x){k=k.split('')}"),t+=f.c.d+";while(++j<l){B=k[j];"+f.c.h+"}",f.l&&(t+="}"));if(f.l){f.c?t+="else{":f.m&&(t+="var l=k.length;j=-1;if(l&&P(k)){while(++j<l){B=k[j+=''];"+f.l.h+"}}else{" n&&(n={b:n,k:n}),a.c[t]=n.b||"",a.l[t]=n.k||""):a[t]=n;e=a.a,t=/^[^,]+/.exec(e)[0],n=a.i,s=a.r,a.f=t,a.g=wt,a.i=n==r?t:n,a.j=Ot,a.m=xt,a.o=J,a.q=a.q!==i,a.r=s==r?Mt:s,a.n==r&&(a.n=Ct);if("d"!=t||!a.c.h)a.c=r;t="",a.r&&(t+="'use strict';"),t+="var j,B,k="+a.f+",u",a.i&&(t+="="+a.i),t+=";"+a.p+";",a.c&&(t+="var l=k.length;j=-1;",a.l&&(t+="if(l===+l){"),a.n&&(t+="if(z.call(k)==x){k=k.split('')}"),t+=a.c.d+";while(++j<l){B=k[j];"+a.c.h+"}",a.l&&(t+="}"));if(a.l){a.c?t+="else{":a.m&&(t+="var l=k.length;j=-1;if(l&&P(k)){while(++j<l){B=k[j+=''];"+
),f.g||(t+="var v=typeof k=='function'&&r.call(k,'prototype');");if(f.j&&f.q)t+="var o=-1,p=Z[typeof k]?m(k):[],l=p.length;"+f.l.d+";while(++o<l){j=p[o];",f.g||(t+="if(!(v&&j=='prototype')){"),t+="B=k[j];"+f.l.h+"",f.g||(t+="}");else{t+=f.l.d+";for(j in k){";if(!f.g||f.q)t+="if(",f.g||(t+="!(v&&j=='prototype')"),!f.g&&f.q&&(t+="&&"),f.q&&(t+="h.call(k,j)"),t+="){";t+="B=k[j];"+f.l.h+";";if(!f.g||f.q)t+="}"}t+="}";if(f.g){t+="var g=k.constructor;";for(n=0;7>n;n++)t+="j='"+f.o[n]+"';if(","constructor"== a.l.h+"}}else{"),a.g||(t+="var v=typeof k=='function'&&r.call(k,'prototype');");if(a.j&&a.q)t+="var o=-1,p=Z[typeof k]?m(k):[],l=p.length;"+a.l.d+";while(++o<l){j=p[o];",a.g||(t+="if(!(v&&j=='prototype')){"),t+="B=k[j];"+a.l.h+"",a.g||(t+="}");else{t+=a.l.d+";for(j in k){";if(!a.g||a.q)t+="if(",a.g||(t+="!(v&&j=='prototype')"),!a.g&&a.q&&(t+="&&"),a.q&&(t+="h.call(k,j)"),t+="){";t+="B=k[j];"+a.l.h+";";if(!a.g||a.q)t+="}"}t+="}";if(a.g){t+="var g=k.constructor;";for(n=0;7>n;n++)t+="j='"+a.o[n]+"';if("
f.o[n]&&(t+="!(g&&g.prototype===k)&&"),t+="h.call(k,j)){B=k[j];"+f.l.h+"}"}if(f.c||f.m)t+="}"}return t+=f.e+";return u",Function("E,F,G,c,J,f,K,h,i,N,P,R,T,U,Y,Z,m,r,dd,w,x,z,A","var H=function("+e+"){"+t+"};return H")(Mt,_,L,o,a,K,Gt,Q,A,x,v,Vt,m,$t,dt,Ht,st,Y,p,Z,mt,et)}function c(e){return"\\"+Bt[e]}function h(e){return Dt[e]}function p(e){return function(t){return t[e]}}function d(e){return Pt[e]}function v(e){return et.call(e)==ft}function m(e){return"function"==typeof e}function g(e){var t= ,"constructor"==a.o[n]&&(t+="!(g&&g.prototype===k)&&"),t+="h.call(k,j)){B=k[j];"+a.l.h+"}"}if(a.c||a.m)t+="}"}return t+=a.e+";return u",Function("E,F,G,J,e,f,K,h,i,N,P,R,T,U,Y,Z,m,r,w,x,z,A","var H=function("+e+"){"+t+"};return H")(_t,_,L,u,K,f,Yt,Q,A,x,v,$t,m,Jt,vt,Bt,ot,Y,Z,gt,et)}function c(e){return"\\"+jt[e]}function h(e){return Pt[e]}function p(){}function d(e){return Ht[e]}function v(e){return et.call(e)==lt}function m(e){return"function"==typeof e}function g(e){var t=i;if(!e||"object"!=typeof
i;if(!e||"object"!=typeof e||v(e))return t;var n=e.constructor;return(!Ct||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!m(n)||n instanceof n)?Et?(Gt(e,function(e,n,r){return t=!Q.call(r,n),i}),t===i):(Gt(e,function(e,n){t=n}),t===i||Q.call(e,t)):t}function y(e,t,s,o,u){if(e==r)return e;s&&(t=i);if(s=Ht[typeof e]){var a=et.call(e);if(!_t[a]||xt&&v(e))return e;var f=a==lt,s=f||(a==dt?$t(e):s)}if(!s||!t)return s?f?Z.call(e):Qt({},e):e;s=e.constructor;switch(a){case ct:return new s(e==n e||v(e))return t;var n=e.constructor;return(!kt||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!m(n)||n instanceof n)?St?(Yt(e,function(e,n,r){return t=!Q.call(r,n),i}),t===i):(Yt(e,function(e,n){t=n}),t===i||Q.call(e,t)):t}function y(e,t,s,o,u){if(e==r)return e;s&&(t=i);if(s=Bt[typeof e]){var a=et.call(e);if(!Dt[a]||Tt&&v(e))return e;var f=a==ct,s=f||(a==vt?Jt(e):s)}if(!s||!t)return s?f?Z.call(e):Gt({},e):e;s=e.constructor;switch(a){case ht:return new s(e==n);case pt:return new s(+e)
);case ht:return new s(+e);case pt:case mt:return new s(e);case vt:return s(e.source,U.exec(e))}o||(o=[]),u||(u=[]);for(a=o.length;a--;)if(o[a]==e)return u[a];var l=f?s(a=e.length):{};o.push(e),u.push(l);if(f)for(f=-1;++f<a;)l[f]=y(e[f],t,r,o,u);else Yt(e,function(e,n){l[n]=y(e,t,r,o,u)});return l}function b(e,t,s,o){if(e==r||t==r)return e===t;if(e===t)return 0!==e||1/e==1/t;if(Ht[typeof e]||Ht[typeof t])e=e.__wrapped__||e,t=t.__wrapped__||t;var u=et.call(e);if(u!=et.call(t))return i;switch(u){case ct ;case dt:case gt:return new s(e);case mt:return s(e.source,U.exec(e))}o||(o=[]),u||(u=[]);for(a=o.length;a--;)if(o[a]==e)return u[a];var l=f?s(a=e.length):{};o.push(e),u.push(l);if(f)for(f=-1;++f<a;)l[f]=y(e[f],t,r,o,u);else Zt(e,function(e,n){l[n]=y(e,t,r,o,u)});return l}function b(e,t,s,o){if(e==r||t==r)return e===t;if(e===t)return 0!==e||1/e==1/t;if(Bt[typeof e]||Bt[typeof t])e=e.__wrapped__||e,t=t.__wrapped__||t;var u=et.call(e);if(u!=et.call(t))return i;switch(u){case ht:case pt:return+e==+t
:case ht:return+e==+t;case pt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case vt:case mt:return e==t+""}var a=Mt[u];if(xt&&!a&&(a=v(e))&&!v(t)||!a&&(u!=dt||Ct&&("function"!=typeof e.toString&&"string"==typeof (e+"")||"function"!=typeof t.toString&&"string"==typeof (t+""))))return i;s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var u=-1,f=n,l=0;s.push(e),o.push(t);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=b(e[l],t[l],s,o)););return f}a=e.constructor,f=t.constructor;if(a!=f&&(! ;case dt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case mt:case gt:return e==t+""}var a=_t[u];if(Tt&&!a&&(a=v(e))&&!v(t)||!a&&(u!=vt||kt&&("function"!=typeof e.toString&&"string"==typeof (e+"")||"function"!=typeof t.toString&&"string"==typeof (t+""))))return i;s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var u=-1,f=n,l=0;s.push(e),o.push(t);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=b(e[l],t[l],s,o)););return f}a=e.constructor,f=t.constructor;if(a!=f&&(!m(a)||!(a instanceof
m(a)||!(a instanceof a&&m(f)&&f instanceof f)))return i;for(var c in e)if(Q.call(e,c)&&(l++,!Q.call(t,c)||!b(e[c],t[c],s,o)))return i;for(c in t)if(Q.call(t,c)&&!(l--))return i;if(bt)for(;7>++u;)if(c=J[u],Q.call(e,c)&&(!Q.call(t,c)||!b(e[c],t[c],s,o)))return i;return n}function w(e,t,n,r){var s=e,o=e.length,u=3>arguments.length;if(o!==+o)var a=nn(e),o=a.length;else Nt&&et.call(e)==mt&&(s=e.split(""));return dn(e,function(e,f,l){f=a?a[--o]:--o,n=u?(u=i,s[f]):t.call(r,n,s[f],f,l)}),n}function E(e,t a&&m(f)&&f instanceof f)))return i;for(var c in e)if(Q.call(e,c)&&(l++,!Q.call(t,c)||!b(e[c],t[c],s,o)))return i;for(c in t)if(Q.call(t,c)&&!(l--))return i;if(wt)for(;7>++u;)if(c=J[u],Q.call(e,c)&&(!Q.call(t,c)||!b(e[c],t[c],s,o)))return i;return n}function w(e,t,n,r){var s=e,o=e.length,u=3>arguments.length;if(o!==+o)var a=rn(e),o=a.length;else Ct&&et.call(e)==gt&&(s=e.split(""));return vn(e,function(e,f,l){f=a?a[--o]:--o,n=u?(u=i,s[f]):t.call(r,n,s[f],f,l)}),n}function E(e,t,n){return t==r||n?e[0
,n){return t==r||n?e[0]:Z.call(e,0,t)}function S(e,t){for(var n,r=-1,i=e.length,s=[];++r<i;)n=e[r],Vt(n)?G.apply(s,t?n:S(n)):s.push(n);return s}function x(e,t,n){var r=-1,i=e.length;if(n){if("number"!=typeof n)return r=C(e,t),e[r]===t?r:-1;r=(0>n?ot(0,i+n):n)-1}for(;++r<i;)if(e[r]===t)return r;return-1}function T(e,n,r){var i,s=-Infinity,u=-1,a=e?e.length:0;for(n?r!==t&&(n=o(n,r)):n=A;++u<a;)r=n(e[u],u,e),r>s&&(s=r,i=e[u]);return i}function N(e,t,n){return Z.call(e,t==r||n?1:t)}function C(e,n,r,i ]:Z.call(e,0,t)}function S(e,t){for(var n,r=-1,i=e.length,s=[];++r<i;)n=e[r],$t(n)?G.apply(s,t?n:S(n)):s.push(n);return s}function x(e,t,n){var r=-1,i=e.length;if(n){if("number"!=typeof n)return r=C(e,t),e[r]===t?r:-1;r=(0>n?ut(0,i+n):n)-1}for(;++r<i;)if(e[r]===t)return r;return-1}function T(e,t,n){for(var r=-Infinity,i=-1,s=e?e.length:0,o=r,t=f(t,n);++i<s;)n=t(e[i],i,e),n>r&&(r=n,o=e[i]);return o}function N(e,t,n){return Z.call(e,t==r||n?1:t)}function C(e,t,n,r){for(var i=0,s=e.length,n=f(n,r),t=
){var s=0,o=e.length;r?"function"!=typeof r?r=p(r):i!==t&&(r=L(r,i)):r=A;for(n=r(n);s<o;)i=s+o>>>1,r(e[i])<n?s=i+1:o=i;return s}function k(e,n,r,s){var u=-1,a=e.length,f=[],l=[];"function"==typeof n&&(s=r,r=n,n=i);for(r?s!==t&&(r=o(r,s)):r=A;++u<a;)if(s=r(e[u],u,e),n?!u||l[l.length-1]!==s:0>x(l,s))l.push(s),f.push(e[u]);return f}function L(e,t){return Lt||tt&&2<arguments.length?tt.call.apply(tt,arguments):f(e,t,Z.call(arguments,2))}function A(e){return e}function O(e){dn(Zt(e),function(t){var r=s n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function k(e,t,n,r){var s=-1,o=e.length,u=[],a=[];"function"==typeof t&&(r=n,n=t,t=i);for(n=f(n,r);++s<o;)if(r=n(e[s],s,e),t?!s||a[a.length-1]!==r:0>x(a,r))a.push(r),u.push(e[s]);return u}function L(e,t){return At||tt&&2<arguments.length?tt.call.apply(tt,arguments):a(e,t,Z.call(arguments,2))}function A(e){return e}function O(e){vn(en(e),function(t){var r=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return arguments.length&&G.apply(e
[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return arguments.length&&G.apply(e,arguments),e=r.apply(s,e),this.__chain__&&(e=new s(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,M="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),_=Array.prototype,D=Object.prototype,P=0,H=30,B=e._,j=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,F=/&(?:amp|lt|gt|quot|#x27);/g,I=/\b__p\+='';/g,q=/\b(__p\+=)''\+/g,R=/(__e\(.*?\)|\b__t\))\+'';/g ,arguments),e=r.apply(s,e),this.__chain__&&(e=new s(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,M="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),_=Array.prototype,D=Object.prototype,P=0,H=30,B=e._,j=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,F=/&(?:amp|lt|gt|quot|#x27);/g,I=/\b__p\+='';/g,q=/\b(__p\+=)''\+/g,R=/(__e\(.*?\)|\b__t\))\+'';/g,U=/\w*$/,z=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,W=RegExp("^"+(D
,U=/\w*$/,z=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,W=RegExp("^"+(D.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),X=/($^)/,V=/[&<>"']/g,$=/['\n\r\t\u2028\u2029\\]/g,J="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),K=_.concat,Q=D.hasOwnProperty,G=_.push,Y=D.propertyIsEnumerable,Z=_.slice,et=D.toString,tt=W.test(tt=Z.bind)&&tt,nt=Math.floor,rt=W.test(rt=Array.isArray)&&rt,it=e.isFinite,st= .valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),X=/($^)/,V=/[&<>"']/g,$=/['\n\r\t\u2028\u2029\\]/g,J="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),K=_.concat,Q=D.hasOwnProperty,G=_.push,Y=D.propertyIsEnumerable,Z=_.slice,et=D.toString,tt=W.test(tt=Z.bind)&&tt,nt=Math.floor,rt=W.test(rt=Object.getPrototypeOf)&&rt,it=W.test(it=Array.isArray)&&it,st=e.isFinite,ot=W.test(ot=Object.keys)&&ot,
W.test(st=Object.keys)&&st,ot=Math.max,ut=Math.min,at=Math.random,ft="[object Arguments]",lt="[object Array]",ct="[object Boolean]",ht="[object Date]",pt="[object Number]",dt="[object Object]",vt="[object RegExp]",mt="[object String]",gt=e.clearTimeout,yt=e.setTimeout,bt,wt,Et,St=n;(function(){function e(){this.x=1}var t={0:1,length:1},n=[];e.prototype={valueOf:1,y:1};for(var r in new e)n.push(r);for(r in arguments)St=!r;bt=4>(n+"").length,Et="x"!=n[0],wt=(n.splice.call(t,0,1),t[0])})(1);var xt=!v(arguments ut=Math.max,at=Math.min,ft=Math.random,lt="[object Arguments]",ct="[object Array]",ht="[object Boolean]",pt="[object Date]",dt="[object Number]",vt="[object Object]",mt="[object RegExp]",gt="[object String]",yt=e.clearTimeout,bt=e.setTimeout,wt,Et,St,xt=n;(function(){function e(){this.x=1}var t={0:1,length:1},n=[];e.prototype={valueOf:1,y:1};for(var r in new e)n.push(r);for(r in arguments)xt=!r;wt=4>(n+"").length,St="x"!=n[0],Et=(n.splice.call(t,0,1),t[0])})(1);var Tt=!v(arguments),Nt="x"!=Z.call("x"
),Tt="x"!=Z.call("x")[0],Nt="xx"!="x"[0]+Object("x")[0];try{var Ct=("[object Object]",et.call(e.document||0)==dt)}catch(kt){}var Lt=tt&&/\n|Opera/.test(tt+et.call(e.opera)),At=st&&/^.+$|true/.test(st+!!e.attachEvent),Ot=!Lt,Mt={};Mt[ct]=Mt[ht]=Mt["[object Function]"]=Mt[pt]=Mt[dt]=Mt[vt]=i,Mt[ft]=Mt[lt]=Mt[mt]=n;var _t={};_t[ft]=_t["[object Function]"]=i,_t[lt]=_t[ct]=_t[ht]=_t[pt]=_t[dt]=_t[vt]=_t[mt]=n;var Dt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},Pt={"&amp;":"&","&lt;":"<" )[0],Ct="xx"!="x"[0]+Object("x")[0];try{var kt=("[object Object]",et.call(e.document||0)==vt)}catch(Lt){}var At=tt&&/\n|Opera/.test(tt+et.call(e.opera)),Ot=ot&&/^.+$|true/.test(ot+!!e.attachEvent),Mt=!At,_t={};_t[ht]=_t[pt]=_t["[object Function]"]=_t[dt]=_t[vt]=_t[mt]=i,_t[lt]=_t[ct]=_t[gt]=n;var Dt={};Dt[lt]=Dt["[object Function]"]=i,Dt[ct]=Dt[ht]=Dt[pt]=Dt[dt]=Dt[vt]=Dt[mt]=Dt[gt]=n;var Pt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},Ht={"&amp;":"&","&lt;":"<","&gt;":">","&quot;"
,"&gt;":">","&quot;":'"',"&#x27;":"'"},Ht={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},Bt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""};var jt={a:"e,d,y",i:"e",p:"if(!d){d=i}else if(y!==A){d=c(d,y)}",h:"if(d(B,j,e)===false)return u"},Ft={i:"{}",p:"if(typeof d!='function'){d=dd(d)}else if(y!==A){d=c(d,y)}",h:"var q=d(B,j,e);(h.call(u,q)?u[q]++:u[q]=1)" :'"',"&#x27;":"'"},Bt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},jt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""};var Ft={a:"d,c,y",i:"d",p:"c=f(c,y)",h:"if(c(B,j,d)===false)return u"},It={i:"{}",p:"c=f(c,y)",h:"var q=c(B,j,d);(h.call(u,q)?u[q]++:u[q]=1)"},qt={i:"true",h:"if(!c(B,j,d))return!u"},Rt={q:i,r:i,a:"n",
},It={i:"true",h:"if(!d(B,j,e))return!u"},qt={q:i,r:i,a:"n",i:"n",p:"for(var a=1,b=arguments.length;a<b;a++){if(k=arguments[a]){",h:"u[j]=B",e:"}}"},Rt={i:"[]",h:"d(B,j,e)&&u.push(B)"},Ut={p:"if(y!==A)d=c(d,y)"},zt={h:{k:jt.h}},Wt={i:"",d:{b:"u=Array(l)",k:"u="+(At?"Array(l)":"[]")},h:{b:"u[j]=d(B,j,e)",k:"u"+(At?"[o]=":".push")+"(d(B,j,e))"}},Xt={q:i,a:"n,d,y",i:"{}",p:"var S=typeof d=='function';if(!S){var t=f.apply(F,arguments)}else if(y!==A){d=c(d,y)}",h:"if(S?!d(B,j,n):N(t,j)<0)u[j]=B"};xt&& i:"n",p:"for(var a=1,b=arguments.length;a<b;a++){if(k=arguments[a]){",h:"u[j]=B",e:"}}"},Ut={i:"[]",h:"c(B,j,d)&&u.push(B)"},zt={p:"c=f(c,y)"},Wt={h:{k:Ft.h}},Xt={i:"",d:{b:"u=Array(l)",k:"u="+(Ot?"Array(l)":"[]")},h:{b:"u[j]=c(B,j,d)",k:"u"+(Ot?"[o]=":".push")+"(c(B,j,d))"}},Vt={q:i,a:"n,c,y",i:"{}",p:"var S=typeof c=='function';c=f(c,y);if(!S)var t=e.apply(F,arguments)",h:"if(S?!c(B,j,n):N(t,j)<0)u[j]=B"};Tt&&(v=function(e){return!!e&&!!Q.call(e,"callee")});var $t=it||function(e){return et.call
(v=function(e){return!!e&&!!Q.call(e,"callee")});var Vt=rt||function(e){return et.call(e)==lt};m(/x/)&&(m=function(e){return"[object Function]"==et.call(e)});var $t=Ht.__proto__!=D?g:function(e){if(!e)return i;var t=e.valueOf,n="function"==typeof t&&(n=t.__proto__)&&n.__proto__;return n?e==n||e.__proto__==n&&!v(e):g(e)},Jt=l({a:"n",i:"[]",h:"u.push(j)"}),Kt=l(qt,{h:"if(u[j]==null)"+qt.h}),Qt=l(qt),Gt=l(jt,Ut,zt,{q:i}),Yt=l(jt,Ut,zt),Zt=l({q:i,a:"n",i:"[]",h:"if(T(B))u.push(j)",e:"u.sort()"}),en=l (e)==ct};m(/x/)&&(m=function(e){return"[object Function]"==et.call(e)});var Jt=rt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=rt(t))&&rt(n);return n?e==n||rt(e)==n&&!v(e):g(e)}:g,Kt=l({a:"n",i:"[]",h:"u.push(j)"}),Qt=l(Rt,{h:"if(u[j]==null)"+Rt.h}),Gt=l(Rt),Yt=l(Ft,zt,Wt,{q:i}),Zt=l(Ft,zt,Wt),en=l({q:i,a:"n",i:"[]",h:"if(T(B))u.push(j)",e:"u.sort()"}),tn=l({a:"n",i:"{}",h:"u[B]=j"}),nn=l({a:"B",i:"true",p:"if(!B)return u;var I=z.call(B),l=B.length;if(E[I]"+
({a:"n",i:"{}",h:"u[B]=j"}),tn=l({a:"B",i:"true",p:"if(!B)return u;var I=z.call(B),l=B.length;if(E[I]"+(xt?"||P(B)":"")+"||(I==Y&&l===+l&&T(B.splice)))return!l",h:{k:"return false"}}),nn=st?function(e){return"function"==typeof e&&Y.call(e,"prototype")?Jt(e):st(e)}:Jt,rn=l(qt,{a:"n,ff,O",p:"var Q,D=arguments,a=0;if(O==J){var b=2,gg=D[3],hh=D[4]}else{var b=D.length,gg=[],hh=[]}while(++a<b){if(k=D[a]){",h:"if((ff=B)&&((Q=R(ff))||U(ff))){var L=false,ii=gg.length;while(ii--){if(L=gg[ii]==ff)break}if(L){u[j]=hh[ii]}else{gg.push(ff);hh.push(B=(B=u[j])&&Q?(R(B)?B:[]):(U(B)?B:{}));u[j]=H(B,ff,J,gg,hh)}}else if(ff!=null){u[j]=ff}" (Tt?"||P(B)":"")+"||(I==Y&&l===+l&&T(B.splice)))return!l",h:{k:"return false"}}),rn=ot?function(e){return"function"==typeof e&&Y.call(e,"prototype")?Kt(e):ot(e)}:Kt,sn=l(Rt,{a:"n,ee,O",p:"var Q,D=arguments,a=0;if(O==J){var b=2,ff=D[3],gg=D[4]}else{var b=D.length,ff=[],gg=[]}while(++a<b){if(k=D[a]){",h:"if((ee=B)&&((Q=R(ee))||U(ee))){var L=false,hh=ff.length;while(hh--){if(L=ff[hh]==ee)break}if(L){u[j]=gg[hh]}else{ff.push(ee);gg.push(B=(B=u[j])&&Q?(R(B)?B:[]):(U(B)?B:{}));u[j]=H(B,ee,J,ff,gg)}}else if(ee!=null){u[j]=ee}"
}),sn=l(Xt),on=l({a:"n",i:"[]",h:"u"+(At?"[o]=":".push")+"([j,B])"}),un=l(Xt,{p:"if(typeof d!='function'){var q,t=f.apply(F,arguments),l=t.length;for(j=1;j<l;j++){q=t[j];if(q in n)u[q]=n[q]}}else{if(y!==A)d=c(d,y)",h:"if(d(B,j,n))u[j]=B",e:"}"}),an=l({a:"n",i:"[]",h:"u.push(B)"}),fn=l({a:"e,jj",i:"false",n:i,d:{b:"if(z.call(e)==x)return e.indexOf(jj)>-1"},h:"if(B===jj)return true"}),ln=l(jt,Ft),cn=l(jt,It),hn=l(jt,Rt),pn=l(jt,Ut,{i:"",h:"if(d(B,j,e))return B"}),dn=l(jt,Ut),vn=l(jt,Ft,{h:"var q=d(B,j,e);(h.call(u,q)?u[q]:u[q]=[]).push(B)" }),on=l(Vt),un=l({a:"n",i:"[]",h:"u"+(Ot?"[o]=":".push")+"([j,B])"}),an=l(Vt,{p:"if(typeof c!='function'){var q,t=e.apply(F,arguments),l=t.length;for(j=1;j<l;j++){q=t[j];if(q in n)u[q]=n[q]}}else{c=f(c,y)",h:"if(c(B,j,n))u[j]=B",e:"}"}),fn=l({a:"n",i:"[]",h:"u.push(B)"}),ln=l({a:"d,ii",i:"false",n:i,d:{b:"if(z.call(d)==x)return d.indexOf(ii)>-1"},h:"if(B===ii)return true"}),cn=l(Ft,It),hn=l(Ft,qt),pn=l(Ft,Ut),dn=l(Ft,zt,{i:"",h:"if(c(B,j,d))return B"}),vn=l(Ft,zt),mn=l(Ft,It,{h:"var q=c(B,j,d);(h.call(u,q)?u[q]:u[q]=[]).push(B)"
}),mn=l(Wt,{a:"e,V",p:"var D=w.call(arguments,2),S=typeof V=='function'",h:{b:"u[j]=(S?V:B[V]).apply(B,D)",k:"u"+(At?"[o]=":".push")+"((S?V:B[V]).apply(B,D))"}}),gn=l(jt,Wt),yn=l(Wt,{a:"e,cc",h:{b:"u[j]=B[cc]",k:"u"+(At?"[o]=":".push")+"(B[cc])"}}),bn=l({a:"e,d,C,y",i:"C",p:"var W=arguments.length<3;if(y!==A)d=c(d,y)",d:{b:"if(W)u=k[++j]"},h:{b:"u=d(u,B,j,e)",k:"u=W?(W=false,B):d(u,B,j,e)"}}),wn=l(jt,Rt,{h:"!"+Rt.h}),En=l(jt,It,{i:"false",h:It.h.replace("!","")}),Sn=l(jt,Ft,Wt,{h:{b:"u[j]={a:d(B,j,e),b:j,c:B}" }),gn=l(Xt,{a:"d,V",p:"var D=w.call(arguments,2),S=typeof V=='function'",h:{b:"u[j]=(S?V:B[V]).apply(B,D)",k:"u"+(Ot?"[o]=":".push")+"((S?V:B[V]).apply(B,D))"}}),yn=l(Ft,Xt),bn=l(Xt,{a:"d,cc",h:{b:"u[j]=B[cc]",k:"u"+(Ot?"[o]=":".push")+"(B[cc])"}}),wn=l({a:"d,c,C,y",i:"C",p:"var W=arguments.length<3;c=f(c,y)",d:{b:"if(W)u=k[++j]"},h:{b:"u=c(u,B,j,d)",k:"u=W?(W=false,B):c(u,B,j,d)"}}),En=l(Ft,Ut,{h:"!"+Ut.h}),Sn=l(Ft,qt,{i:"false",h:qt.h.replace("!","")}),xn=l(Ft,It,Xt,{h:{b:"u[j]={a:c(B,j,d),b:j,c:B}"
,k:"u"+(At?"[o]=":".push")+"({a:d(B,j,e),b:j,c:B})"},e:"u.sort(J);l=u.length;while(l--){u[l]=u[l].c}"}),xn=l(Rt,{a:"e,bb",p:"var t=[];K(bb,function(B,q){t.push(q)});var ee=t.length",h:"for(var q,aa=true,s=0;s<ee;s++){q=t[s];if(!(aa=B[q]===bb[q]))break}aa&&u.push(B)"}),Tn=l({q:i,r:i,a:"n",p:"var M=arguments,l=M.length;if(l>1){for(var j=1;j<l;j++){u[M[j]]=G(u[M[j]],u)}return u}",h:"if(T(u[j])){u[j]=G(u[j],u)}"});s.VERSION="0.7.0",s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply ,k:"u"+(Ot?"[o]=":".push")+"({a:c(B,j,d),b:j,c:B})"},e:"u.sort(J);l=u.length;while(l--){u[l]=u[l].c}"}),Tn=l(Ut,{a:"d,bb",p:"var t=[];K(bb,function(B,q){t.push(q)});var dd=t.length",h:"for(var q,aa=true,s=0;s<dd;s++){q=t[s];if(!(aa=B[q]===bb[q]))break}aa&&u.push(B)"}),Nn=l({q:i,r:i,a:"n",p:"var M=arguments,l=M.length;if(l>1){for(var j=1;j<l;j++){u[M[j]]=G(u[M[j]],u)}return u}",h:"if(T(u[j])){u[j]=G(u[j],u)}"});s.VERSION="0.7.0",s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply
(this,arguments)}},s.bind=L,s.bindAll=Tn,s.chain=function(e){return e=new s(e),e.__chain__=n,e},s.clone=y,s.compact=function(e){for(var t=-1,n=e.length,r=[];++t<n;)e[t]&&r.push(e[t]);return r},s.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=fn,s.countBy=ln,s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,gt(a),a=yt(i,t),r&&(o= (this,arguments)}},s.bind=L,s.bindAll=Nn,s.chain=function(e){return e=new s(e),e.__chain__=n,e},s.clone=y,s.compact=function(e){for(var t=-1,n=e.length,r=[];++t<n;)e[t]&&r.push(e[t]);return r},s.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=ln,s.countBy=cn,s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,yt(a),a=bt(i,t),r&&(o=
e.apply(u,s)),o}},s.defaults=Kt,s.defer=function(e){var n=Z.call(arguments,1);return yt(function(){return e.apply(t,n)},1)},s.delay=function(e,n){var r=Z.call(arguments,2);return yt(function(){return e.apply(t,r)},n)},s.difference=function(e){for(var t=-1,n=e.length,r=K.apply(_,arguments),r=u(r,n),i=[];++t<n;)r(e[t])||i.push(e[t]);return i},s.escape=function(e){return e==r?"":(e+"").replace(V,h)},s.every=cn,s.extend=Qt,s.filter=hn,s.find=pn,s.first=E,s.flatten=S,s.forEach=dn,s.forIn=Gt,s.forOwn=Yt e.apply(u,s)),o}},s.defaults=Qt,s.defer=function(e){var n=Z.call(arguments,1);return bt(function(){return e.apply(t,n)},1)},s.delay=function(e,n){var r=Z.call(arguments,2);return bt(function(){return e.apply(t,r)},n)},s.difference=function(e){for(var t=-1,n=e.length,r=K.apply(_,arguments),r=o(r,n),i=[];++t<n;)r(e[t])||i.push(e[t]);return i},s.escape=function(e){return e==r?"":(e+"").replace(V,h)},s.every=hn,s.extend=Gt,s.filter=pn,s.find=dn,s.first=E,s.flatten=S,s.forEach=vn,s.forIn=Yt,s.forOwn=Zt
,s.functions=Zt,s.groupBy=vn,s.has=function(e,t){return Q.call(e,t)},s.identity=A,s.indexOf=x,s.initial=function(e,t,n){return Z.call(e,0,-(t==r||n?1:t))},s.intersection=function(e){var t,n=arguments.length,r=[],i=-1,s=e.length,o=[];e:for(;++i<s;)if(t=e[i],0>x(o,t)){for(var a=1;a<n;a++)if(!(r[a]||(r[a]=u(arguments[a])))(t))continue e;o.push(t)}return o},s.invert=en,s.invoke=mn,s.isArguments=v,s.isArray=Vt,s.isBoolean=function(e){return e===n||e===i||et.call(e)==ct},s.isDate=function(e){return et. ,s.functions=en,s.groupBy=mn,s.has=function(e,t){return Q.call(e,t)},s.identity=A,s.indexOf=x,s.initial=function(e,t,n){return Z.call(e,0,-(t==r||n?1:t))},s.intersection=function(e){var t,n=arguments.length,r=[],i=-1,s=e.length,u=[];e:for(;++i<s;)if(t=e[i],0>x(u,t)){for(var a=1;a<n;a++)if(!(r[a]||(r[a]=o(arguments[a])))(t))continue e;u.push(t)}return u},s.invert=tn,s.invoke=gn,s.isArguments=v,s.isArray=$t,s.isBoolean=function(e){return e===n||e===i||et.call(e)==ht},s.isDate=function(e){return et.
call(e)==ht},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=tn,s.isEqual=b,s.isFinite=function(e){return it(e)&&et.call(e)==pt},s.isFunction=m,s.isNaN=function(e){return et.call(e)==pt&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=function(e){return et.call(e)==pt},s.isObject=function(e){return e?Ht[typeof e]:i},s.isPlainObject=$t,s.isRegExp=function(e){return et.call(e)==vt},s.isString=function(e){return et.call(e)==mt},s.isUndefined=function(e){return e===t},s.keys=nn,s.last= call(e)==pt},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=nn,s.isEqual=b,s.isFinite=function(e){return st(e)&&et.call(e)==dt},s.isFunction=m,s.isNaN=function(e){return et.call(e)==dt&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=function(e){return et.call(e)==dt},s.isObject=function(e){return e?Bt[typeof e]:i},s.isPlainObject=Jt,s.isRegExp=function(e){return et.call(e)==mt},s.isString=function(e){return et.call(e)==gt},s.isUndefined=function(e){return e===t},s.keys=rn,s.last=
function(e,t,n){var i=e.length;return t==r||n?e[i-1]:Z.call(e,-t||i)},s.lastIndexOf=function(e,t,n){var r=e.length;for(n&&"number"==typeof n&&(r=(0>n?ot(0,r+n):ut(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.lateBind=function(e,t){return f(t,e,Z.call(arguments,2))},s.map=gn,s.max=T,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Q.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=rn,s.min=function(e,n,r){var i,s=Infinity,u=-1,a=e?e.length function(e,t,n){var i=e.length;return t==r||n?e[i-1]:Z.call(e,-t||i)},s.lastIndexOf=function(e,t,n){var r=e.length;for(n&&"number"==typeof n&&(r=(0>n?ut(0,r+n):at(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.lateBind=function(e,t){return a(t,e,Z.call(arguments,2))},s.map=yn,s.max=T,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Q.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=sn,s.min=function(e,t,n){for(var r=Infinity,i=-1,s=e?e.
:0;for(n?r!==t&&(n=o(n,r)):n=A;++u<a;)r=n(e[u],u,e),r<s&&(s=r,i=e[u]);return i},s.mixin=O,s.noConflict=function(){return e._=B,this},s.object=function(e,t){for(var n=-1,r=e.length,i={};++n<r;)t?i[e[n]]=t[n]:i[e[n][0]]=e[n][1];return i},s.omit=sn,s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.pairs=on,s.partial=function(e){return f(e,Z.call(arguments,1))},s.pick=un,s.pluck=yn,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0 length:0,o=r,t=f(t,n);++i<s;)n=t(e[i],i,e),n<r&&(r=n,o=e[i]);return o},s.mixin=O,s.noConflict=function(){return e._=B,this},s.object=function(e,t){for(var n=-1,r=e.length,i={};++n<r;)t?i[e[n]]=t[n]:i[e[n][0]]=e[n][1];return i},s.omit=on,s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.pairs=un,s.partial=function(e){return a(e,Z.call(arguments,1))},s.pick=an,s.pluck=bn,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+nt(ft
),e+nt(at()*((+t||0)-e+1))},s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=ot(0,Math.ceil((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=bn,s.reduceRight=w,s.reject=wn,s.rest=N,s.result=function(e,t){var n=e?e[t]:r;return m(n)?e[t]():n},s.shuffle=function(e){for(var t,n=-1,r=e.length,i=Array(r);++n<r;)t=nt(at()*(n+1)),i[n]=i[t],i[t]=e[n];return i},s.size=function(e){var t=e?e.length:0;return t===+t?t:nn(e).length},s.some=En,s.sortBy=Sn,s.sortedIndex=C,s.tap=function( ()*((+t||0)-e+1))},s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=ut(0,Math.ceil((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=wn,s.reduceRight=w,s.reject=En,s.rest=N,s.result=function(e,t){var n=e?e[t]:r;return m(n)?e[t]():n},s.shuffle=function(e){for(var t,n=-1,r=e.length,i=Array(r);++n<r;)t=nt(ft()*(n+1)),i[n]=i[t],i[t]=e[n];return i},s.size=function(e){var t=e?e.length:0;return t===+t?t:rn(e).length},s.some=Sn,s.sortBy=xn,s.sortedIndex=C,s.tap=function(e,t
e,t){return t(e),e},s.template=function(e,t,n){n||(n={});var r,i,o=0,u=s.templateSettings,a="__p += '",f=n.variable||u.variable,l=f;e.replace(RegExp((n.escape||u.escape||X).source+"|"+(n.interpolate||u.interpolate||X).source+"|"+(n.evaluate||u.evaluate||X).source+"|$","g"),function(t,n,i,s,u){a+=e.slice(o,u).replace($,c),a+=n?"'+__e("+n+")+'":s?"';"+s+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=s||j.test(n||i)),o=u+t.length}),a+="';",l||(f="obj",r?a="with("+f+"){"+a+"}":(n=RegExp("(\\(\\s*)"+ ){return t(e),e},s.template=function(e,t,n){n||(n={});var r,i,o=0,u=s.templateSettings,a="__p += '",f=n.variable||u.variable,l=f;e.replace(RegExp((n.escape||u.escape||X).source+"|"+(n.interpolate||u.interpolate||X).source+"|"+(n.evaluate||u.evaluate||X).source+"|$","g"),function(t,n,i,s,u){a+=e.slice(o,u).replace($,c),a+=n?"'+__e("+n+")+'":s?"';"+s+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=s||j.test(n||i)),o=u+t.length}),a+="';",l||(f="obj",r?a="with("+f+"){"+a+"}":(n=RegExp("(\\(\\s*)"+
f+"\\."+f+"\\b","g"),a=a.replace(z,"$&"+f+".").replace(n,"$1__d"))),a=(r?a.replace(I,""):a).replace(q,"$1").replace(R,"$1;"),a="function("+f+"){"+(l?"":f+"||("+f+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(l?"":",__d="+f+"."+f+"||"+f)+";")+a+"return __p}";try{i=Function("_","return "+a)(s)}catch(h){throw h.source=a,h}return t?i(t):(i.source=a,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u f+"\\."+f+"\\b","g"),a=a.replace(z,"$&"+f+".").replace(n,"$1__d"))),a=(r?a.replace(I,""):a).replace(q,"$1").replace(R,"$1;"),a="function("+f+"){"+(l?"":f+"||("+f+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(l?"":",__d="+f+"."+f+"||"+f)+";")+a+"return __p}";try{i=Function("_","return "+a)(s)}catch(h){throw h.source=a,h}return t?i(t):(i.source=a,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u
,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(a=r,s=e.apply(o,i)):u||(u=yt(n,f)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){var t=e?e.length:0;return t===+t?(Tt?et.call(e)==mt:"string"==typeof e)?e.split(""):Z.call(e):an(e)},s.unescape=function(e){return e==r?"":(e+"").replace(F,d)},s.union=function(){for(var e=-1,t=K.apply(_,arguments),n=t.length,r=[];++e<n;)0>x(r,t[e])&&r.push(t[e]);return r ,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(a=r,s=e.apply(o,i)):u||(u=bt(n,f)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){var t=e?e.length:0;return t===+t?(Nt?et.call(e)==gt:"string"==typeof e)?e.split(""):Z.call(e):fn(e)},s.unescape=function(e){return e==r?"":(e+"").replace(F,d)},s.union=function(){for(var e=-1,t=K.apply(_,arguments),n=t.length,r=[];++e<n;)0>x(r,t[e])&&r.push(t[e]);return r
},s.uniq=k,s.uniqueId=function(e){var t=P++;return e?e+t:t},s.values=an,s.where=xn,s.without=function(e){for(var t=-1,n=e.length,r=u(arguments,1,20),i=[];++t<n;)r(e[t])||i.push(e[t]);return i},s.wrap=function(e,t){return function(){var n=[e];return arguments.length&&G.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=T(yn(arguments,"length")),r=Array(n);++t<n;)r[t]=yn(arguments,t);return r},s.all=cn,s.any=En,s.collect=gn,s.detect=pn,s.drop=N,s.each=dn,s.foldl=bn,s.foldr=w,s.head= },s.uniq=k,s.uniqueId=function(e){var t=P++;return e?e+t:t},s.values=fn,s.where=Tn,s.without=function(e){for(var t=-1,n=e.length,r=o(arguments,1,20),i=[];++t<n;)r(e[t])||i.push(e[t]);return i},s.wrap=function(e,t){return function(){var n=[e];return arguments.length&&G.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=T(bn(arguments,"length")),r=Array(n);++t<n;)r[t]=bn(arguments,t);return r},s.all=hn,s.any=Sn,s.collect=yn,s.detect=dn,s.drop=N,s.each=vn,s.foldl=wn,s.foldr=w,s.head=
E,s.include=fn,s.inject=bn,s.methods=Zt,s.select=hn,s.tail=N,s.take=E,s.unique=k,O(s),s.prototype.chain=function(){return this.__chain__=n,this},s.prototype.value=function(){return this.__wrapped__},dn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=_[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),wt&&e.length===0&&delete e[0],this.__chain__&&(e=new s(e),e.__chain__=n),e}}),dn(["concat","join","slice"],function(e){var t=_[e];s.prototype[e E,s.include=ln,s.inject=wn,s.methods=en,s.select=pn,s.tail=N,s.take=E,s.unique=k,O(s),s.prototype.chain=function(){return this.__chain__=n,this},s.prototype.value=function(){return this.__wrapped__},vn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=_[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Et&&e.length===0&&delete e[0],this.__chain__&&(e=new s(e),e.__chain__=n),e}}),vn(["concat","join","slice"],function(e){var t=_[e];s.prototype[e
]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new s(e),e.__chain__=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):M?"object"==typeof module&&module&&module.exports==M?(module.exports=s)._=s:M._=s:e._=s})(this); ]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new s(e),e.__chain__=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):M?"object"==typeof module&&module&&module.exports==M?(module.exports=s)._=s:M._=s:e._=s})(this);