From e86eef59055023df38c228a15b2d0b260467a052 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 1 May 2012 00:35:50 -0400 Subject: [PATCH] lodash: Update documentation and lodash.min.js. [jddalton] Former-commit-id: 0fa786b309e699dcf586e5606b7f3c82ac5e460f --- doc/README.md | 184 ++++++++++++++++++++++++++++---------------------- lodash.min.js | 46 ++++++------- 2 files changed, 125 insertions(+), 105 deletions(-) diff --git a/doc/README.md b/doc/README.md index 9d90609ff..955fb9fcd 100644 --- a/doc/README.md +++ b/doc/README.md @@ -139,7 +139,7 @@ The `lodash` function. -### `_.VERSION` +### `_.VERSION` *(String)*: The semantic version number. [▲][1] @@ -148,7 +148,7 @@ The `lodash` function. -### `_.after(times, func)` +### `_.after(times, func)` Creates a new function that is restricted to executing only after it is called a given number of `times`. [▲][1] @@ -173,12 +173,12 @@ _.forEach(notes, function(note) { -### `_.bind(func [, arg1, arg2, ...])` -Creates a new function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends additional arguments to those passed to the bound function. +### `_.bind(func [, arg1, arg2, ...])` +Creates a new function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends additional arguments to those passed to the bound function. Lazy defined methods may be bound by passing the object they are bound to as `func` and the method name as `thisArg`. [▲][1] #### Arguments -1. `func` *(Function)*: The function to bind. +1. `func` *(Function|Object)*: The function to bind or the object the method belongs to. 2. `[arg1, arg2, ...]` *(Mixed)*: Arguments to prepend to those passed to the bound function. #### Returns @@ -186,10 +186,30 @@ Creates a new function that, when called, invokes `func` with the `this` binding #### Example ~~~ js +// basic bind var func = function(greeting) { return greeting + ': ' + this.name; }; func = _.bind(func, { 'name': 'moe' }, 'hi'); func(); // => 'hi: moe' + +// lazy bind +var object = { + 'name': 'moe', + 'greet': function(greeting) { + return greeting + ': ' + this.name; + } +}; + +var func = _.bind(object, 'greet', 'hi'); +func(); +// => 'hi: moe' + +object.greet = function(greeting) { + return greeting + ' ' + this.name + '!'; +}; + +func(); +// => 'hi moe!' ~~~ @@ -197,7 +217,7 @@ func(); -### `_.bindAll(object [, methodName1, methodName2, ...])` +### `_.bindAll(object [, methodName1, methodName2, ...])` Binds methods on the `object` to the object, overwriting the non-bound method. If no method names are provided, all the function properties of the `object` will be bound. [▲][1] @@ -226,7 +246,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick); -### `_.chain()` +### `_.chain()` Extracts the value from a wrapped chainable object. [▲][1] @@ -244,7 +264,7 @@ _([1, 2, 3]).value(); -### `_.chain(value)` +### `_.chain(value)` Wraps the value in a `lodash` chainable object. [▲][1] @@ -275,7 +295,7 @@ var youngest = _.chain(stooges) -### `_.clone(value)` +### `_.clone(value)` Create a shallow clone of the `value`. Any nested objects or arrays will be assigned by reference and not cloned. [▲][1] @@ -296,7 +316,7 @@ _.clone({ 'name': 'moe' }); -### `_.compact(array)` +### `_.compact(array)` Produces a new array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey. [▲][1] @@ -317,7 +337,7 @@ _.compact([0, 1, false, 2, '', 3]); -### `_.compose([func1, func2, ...])` +### `_.compose([func1, func2, ...])` Creates a new function that is the composition of the passed functions, where each function consumes the return value of the function that follows. In math terms, composing thefunctions `f()`, `g()`, and `h()` produces `f(g(h()))`. [▲][1] @@ -363,8 +383,8 @@ _.contains([1, 2, 3], 3); -### `_.debounce(func, wait, immediate)` -Creates a new function that will postpone its execution until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke the function on the leading, instead of the trailing, edge of the `wait` timeout. +### `_.debounce(func, wait, immediate)` +Creates a new function that will delay its execution until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke the function on the leading, instead of the trailing, edge of the `wait` timeout. [▲][1] #### Arguments @@ -386,7 +406,7 @@ jQuery(window).on('resize', lazyLayout); -### `_.defaults(object [, defaults1, defaults2, ..])` +### `_.defaults(object [, defaults1, defaults2, ..])` Assigns missing properties in `object` with default values from the defaults objects. As soon as a property is set, additional defaults of the same property will be ignored. [▲][1] @@ -409,8 +429,8 @@ _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'lots' }); -### `_.defer(func [, arg1, arg2, ...])` -Defers invoking the `func` function until the current call stack has cleared. Additional arguments are passed to `func` when it is invoked. +### `_.defer(func [, arg1, arg2, ...])` +Defers executing the `func` function until the current call stack has cleared. Additional arguments are passed to `func` when it is invoked. [▲][1] #### Arguments @@ -431,8 +451,8 @@ _.defer(function() { alert('deferred'); }); -### `_.delay(func, wait [, arg1, arg2, ...])` -Invokes the `func` function after `wait` milliseconds. Additional arguments are passed `func` when it is invoked. +### `_.delay(func, wait [, arg1, arg2, ...])` +Executes the `func` function after `wait` milliseconds. Additional arguments are passed to `func` when it is invoked. [▲][1] #### Arguments @@ -455,7 +475,7 @@ _.delay(log, 1000, 'logged later'); -### `_.difference(array [, array1, array2, ...])` +### `_.difference(array [, array1, array2, ...])` Produces a new array of `array` values not present in the other arrays using strict equality for comparisons, i.e. `===`. [▲][1] @@ -477,7 +497,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]); -### `_.escape(string)` +### `_.escape(string)` Escapes a string for insertion into HTML, replacing `&`, `<`, `>`, `"`, `'`, and `/` characters. [▲][1] @@ -521,7 +541,7 @@ _.every([true, 1, null, 'yes'], Boolean); -### `_.extend(object [, source1, source2, ..])` +### `_.extend(object [, source1, source2, ..])` Copies enumerable properties from the source objects to the `destination` object. Subsequent sources will overwrite propery assignments of previous sources. [▲][1] @@ -589,7 +609,7 @@ var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); -### `_.first(array [, n, guard])` +### `_.first(array [, n, guard])` Gets the first value of the `array`. Pass `n` to return the first `n` values of the `array`. [▲][1] @@ -612,7 +632,7 @@ _.first([5, 4, 3, 2, 1]); -### `_.flatten(array, shallow)` +### `_.flatten(array, shallow)` Flattens a nested array *(the nesting can be to any depth)*. If `shallow` is truthy, `array` will only be flattened a single level. [▲][1] @@ -663,7 +683,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3}, function(num) { alert(num); }); -### `_.functions(object)` +### `_.functions(object)` Produces a sorted array of the properties, own and inherited, of `object` that have function values. [▲][1] @@ -710,7 +730,7 @@ _.groupBy(['one', 'two', 'three'], 'length'); -### `_.has(object, property)` +### `_.has(object, property)` Checks if the specified object `property` exists and is a direct property, instead of an inherited property. [▲][1] @@ -732,7 +752,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); -### `_.identity(value)` +### `_.identity(value)` This function simply returns the first argument passed to it. Note: It is used throughout Lo-Dash as a default callback. [▲][1] @@ -754,7 +774,7 @@ moe === _.identity(moe); -### `_.indexOf(array, value [, isSorted=false])` +### `_.indexOf(array, value [, isSorted=false])` Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster binary search. [▲][1] @@ -777,7 +797,7 @@ _.indexOf([1, 2, 3], 2); -### `_.initial(array [, n, guard])` +### `_.initial(array [, n, guard])` Gets all but the last value of the `array`. Pass `n` to exclude the last `n` values from the result. [▲][1] @@ -800,7 +820,7 @@ _.initial([5, 4, 3, 2, 1]); -### `_.intersection([array1, array2, ...])` +### `_.intersection([array1, array2, ...])` Computes the intersection of all the passed-in arrays. [▲][1] @@ -821,7 +841,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); -### `_.invoke(array, methodName [, arg1, arg2, ...])` +### `_.invoke(array, methodName [, arg1, arg2, ...])` Calls the method named by `methodName` for each value of the `collection`. Additional arguments will be passed to each invoked method. [▲][1] @@ -844,7 +864,7 @@ _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); -### `_.isArguments(value)` +### `_.isArguments(value)` Checks if a `value` is an `arguments` object. [▲][1] @@ -892,7 +912,7 @@ _.isArray([1, 2, 3]); -### `_.isBoolean(value)` +### `_.isBoolean(value)` Checks if a `value` is a boolean *(`true` or `false`)* value. [▲][1] @@ -913,7 +933,7 @@ _.isBoolean(null); -### `_.isDate(value)` +### `_.isDate(value)` Checks if a `value` is a date. [▲][1] @@ -934,7 +954,7 @@ _.isDate(new Date); -### `_.isElement(value)` +### `_.isElement(value)` Checks if a `value` is a DOM element. [▲][1] @@ -979,7 +999,7 @@ _.isEmpty({}); -### `_.isEqual(a, b [, stack])` +### `_.isEqual(a, b [, stack])` Performs a deep comparison between two values to determine if they are equivalent to each other. [▲][1] @@ -1008,7 +1028,7 @@ _.isEqual(moe, clone); -### `_.isFinite(value)` +### `_.isFinite(value)` Checks if a `value` is a finite number. [▲][1] @@ -1035,7 +1055,7 @@ _.isFinite(Infinity); -### `_.isFunction(value)` +### `_.isFunction(value)` Checks if a `value` is a function. [▲][1] @@ -1056,7 +1076,7 @@ _.isFunction(''.concat); -### `_.isNaN(value)` +### `_.isNaN(value)` Checks if a `value` is `NaN`. Note: this is not the same as native `isNaN`, which will return true for `undefined` and other values. See http://es5.github.com/#x15.1.2.4. [▲][1] @@ -1086,7 +1106,7 @@ _.isNaN(undefined); -### `_.isNull(value)` +### `_.isNull(value)` Checks if a `value` is `null`. [▲][1] @@ -1110,7 +1130,7 @@ _.isNull(undefined); -### `_.isNumber(value)` +### `_.isNumber(value)` Checks if a `value` is a number. [▲][1] @@ -1131,7 +1151,7 @@ _.isNumber(8.4 * 5; -### `_.isObject(value)` +### `_.isObject(value)` Checks if a `value` is an object. [▲][1] @@ -1155,7 +1175,7 @@ _.isObject(1); -### `_.isRegExp(value)` +### `_.isRegExp(value)` Checks if a `value` is a regular expression. [▲][1] @@ -1176,7 +1196,7 @@ _.isRegExp(/moe/); -### `_.isString(value)` +### `_.isString(value)` Checks if a `value` is a string. [▲][1] @@ -1197,7 +1217,7 @@ _.isString('moe'); -### `_.isUndefined(value)` +### `_.isUndefined(value)` Checks if a `value` is `undefined`. [▲][1] @@ -1218,7 +1238,7 @@ _.isUndefined(void 0); -### `_.keys(object)` +### `_.keys(object)` Produces an array of the `object`'s enumerable own property names. [▲][1] @@ -1239,7 +1259,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 }); -### `_.last(array [, n, guard])` +### `_.last(array [, n, guard])` Gets the last value of the `array`. Pass `n` to return the lasy `n` values of the `array`. [▲][1] @@ -1262,7 +1282,7 @@ _.last([5, 4, 3, 2, 1]); -### `_.lastIndexOf(array, value)` +### `_.lastIndexOf(array, value)` Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. [▲][1] @@ -1339,7 +1359,7 @@ _.max(stooges, function(stooge) { return stooge.age; }); -### `_.memoize(func [, resolver])` +### `_.memoize(func [, resolver])` Creates a new function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key. [▲][1] @@ -1385,7 +1405,7 @@ _.min([10, 5, 100, 2, 1000]); -### `_.mixin(object)` +### `_.mixin(object)` Adds functions properties of `object` to the `lodash` function and chainable wrapper. [▲][1] @@ -1412,7 +1432,7 @@ _('larry').capitalize(); -### `_.noConflict()` +### `_.noConflict()` Reverts the '_' variable to its previous value and returns a reference to the `lodash` function. [▲][1] @@ -1429,7 +1449,7 @@ var lodash = _.noConflict(); -### `_.once(func)` +### `_.once(func)` Creates a new function that is restricted to one execution. Repeat calls to the function will return the value of the first call. [▲][1] @@ -1452,7 +1472,7 @@ initialize(); -### `_.pick(object [, prop1, prop2, ..])` +### `_.pick(object [, prop1, prop2, ..])` Creates an object composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. [▲][1] @@ -1502,7 +1522,7 @@ _.pluck(stooges, 'name'); -### `_.range([start=0], end [, step=1])` +### `_.range([start=0], end [, step=1])` Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `stop`. This method is a port of Python's `range()` function. See http://docs.python.org/library/functions.html#range. [▲][1] @@ -1609,7 +1629,7 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); -### `_.rest(array [, n, guard])` +### `_.rest(array [, n, guard])` The opposite of `_.initial`, this method gets all but the first value of the `array`. Pass `n` to exclude the first `n` values from the result. [▲][1] @@ -1632,7 +1652,7 @@ _.rest([5, 4, 3, 2, 1]); -### `_.result(object, property)` +### `_.result(object, property)` Resolves the value of `property` on `object`. If the property is a function it will be invoked and its result returned, else the property value is returned. [▲][1] @@ -1664,12 +1684,12 @@ _.result(object, 'stuff'); -### `_.shuffle(collection)` -Produces a new array of shuffled `collection` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. +### `_.shuffle(array)` +Produces a new array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. [▲][1] #### Arguments -1. `collection` *(Array|Object)*: The collection to shuffle. +1. `array` *(Array)*: The array to shuffle. #### Returns *(Array)*: Returns a new shuffled array. @@ -1685,7 +1705,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]); -### `_.size(collection)` +### `_.size(collection)` Gets the number of values in the `collection`. [▲][1] @@ -1706,7 +1726,7 @@ _.size({ 'one': 1, 'two': 2, 'three': 3 }); -### `_.some(collection, callback [, thisArg])` +### `_.some(collection, callback [, thisArg])` Checks if the `callback` returns truthy for **any** value of a `collection`. The function returns as soon as it finds passing value, and does not iterate over the entire `collection`. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*. [▲][1] @@ -1729,7 +1749,7 @@ _.some([null, 0, 'yes', false]); -### `_.sortBy(collection, callback [, thisArg])` +### `_.sortBy(collection, callback [, thisArg])` Produces a new sorted array, ranked in ascending order by the results of running each value of a `collection` through `callback`. The `callback` is invoked with `3` arguments; for arrays they are *(value, index, array)* and for objects they are *(value, key, object)*. The `callback` argument may also be the name of a property to sort by *(e.g. 'length')*. [▲][1] @@ -1752,8 +1772,8 @@ _.sortBy([1, 2, 3, 4, 5, 6], function(num) { return Math.sin(num); }); -### `_.sortedIndex(array, value [, callback])` -Uses a binary search to determine the smallest index at which the `value` should be inserted into the `collection` in order to maintain the sort order of the `collection`. If `callback` is passed, it will be executed for each value in the `collection` to compute their sort ranking. The `callback` is invoked with `1` argument. +### `_.sortedIndex(array, value [, callback])` +Uses a binary search to determine the smallest index at which the `value` should be inserted into the `collection` in order to maintain the sort order of the `collection`. If `callback` is passed, it will be executed for each value in the `collection` to compute their sort ranking. The `callback` is invoked with `1` argument; *(value)*. [▲][1] #### Arguments @@ -1775,7 +1795,7 @@ _.sortedIndex([10, 20, 30, 40, 50], 35); -### `_.tap(value, interceptor)` +### `_.tap(value, interceptor)` Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The primary purpose of this method is to "tap into" a method chain, in order to performoperations on intermediate results within the chain. [▲][1] @@ -1802,7 +1822,7 @@ _.chain([1,2,3,200]) -### `_.template(text, data, options)` +### `_.template(text, data, options)` A JavaScript micro-templating method, similar to John Resig's implementation. Lo-Dash templating handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code. [▲][1] @@ -1859,8 +1879,8 @@ _.template('<%= data.hasWith %>', { 'hasWith': 'no' }, { 'variable': 'data' }); -### `_.throttle(func, wait)` -Creates a new function that, when invoked, will only call the original function at most once per every `wait` milliseconds. +### `_.throttle(func, wait)` +Creates a new function that, when executed, will only call the original function at most once per every `wait` milliseconds. [▲][1] #### Arguments @@ -1881,8 +1901,8 @@ jQuery(window).on('scroll', throttled); -### `_.times(n, callback [, thisArg])` -Executes the `callback` function `n` times. +### `_.times(n, callback [, thisArg])` +Executes the `callback` function `n` times. The `callback` is invoked with `1` argument; *(index)*. [▲][1] #### Arguments @@ -1900,7 +1920,7 @@ _.times(3, function() { genie.grantWish(); }); -### `_.toArray(collection)` +### `_.toArray(collection)` Converts the `collection`, into an array. Useful for converting the `arguments` object. [▲][1] @@ -1921,7 +1941,7 @@ Converts the `collection`, into an array. Useful for converting the `arguments` -### `_.union([array1, array2, ...])` +### `_.union([array1, array2, ...])` Computes the union of the passed-in arrays. [▲][1] @@ -1942,7 +1962,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); -### `_.uniq(array [, isSorted=false, callback])` +### `_.uniq(array [, isSorted=false, callback])` Produces a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each value of `array` is passed through a transformation `callback` before uniqueness is computed. The `callback` is invoked with `3` arguments; *(value, index, array)*. [▲][1] @@ -1965,7 +1985,7 @@ _.uniq([1, 2, 1, 3, 1, 4]); -### `_.uniqueId([prefix])` +### `_.uniqueId([prefix])` Generates a unique id. If `prefix` is passed, the id will be appended to it. [▲][1] @@ -1986,7 +2006,7 @@ _.uniqueId('contact_'); -### `_.value()` +### `_.value()` Extracts the value from a wrapped chainable object. [▲][1] @@ -2004,7 +2024,7 @@ _([1, 2, 3]).value(); -### `_.values(collection)` +### `_.values(collection)` Produces an array of enumerable own property values of the `collection`. [▲][1] @@ -2025,7 +2045,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 }); -### `_.without(array [, value1, value2, ...])` +### `_.without(array [, value1, value2, ...])` Produces a new array with all occurrences of the values removed using strict equality for comparisons, i.e. `===`. [▲][1] @@ -2047,7 +2067,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); -### `_.wrap(func, wrapper [, arg1, arg2, ...])` +### `_.wrap(func, wrapper [, arg1, arg2, ...])` Create a new function that passes the `func` function to the `wrapper` function as its first argument. Additional arguments are appended to those passed to the `wrapper` function. [▲][1] @@ -2074,7 +2094,7 @@ hello(); -### `_.zip([array1, array2, ...])` +### `_.zip([array1, array2, ...])` Merges together the values of each of the arrays with the value at the corresponding position. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion. [▲][1] @@ -2102,7 +2122,7 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -### `_.templateSettings` +### `_.templateSettings` *(Object)*: By default, Lo-Dash uses ERB-style template delimiters, change the following template settings to use alternative delimiters. [▲][1] @@ -2111,7 +2131,7 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -### `_.templateSettings.escape` +### `_.templateSettings.escape` *(RegExp)*: Used to detect `data` property values to be HTML-escaped. [▲][1] @@ -2120,7 +2140,7 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -### `_.templateSettings.evaluate` +### `_.templateSettings.evaluate` *(RegExp)*: Used to detect code to be evaluated. [▲][1] @@ -2129,7 +2149,7 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -### `_.templateSettings.interpolate` +### `_.templateSettings.interpolate` *(RegExp)*: Used to detect `data` property values to inject. [▲][1] diff --git a/lodash.min.js b/lodash.min.js index 9cb64e481..824f40af1 100644 --- a/lodash.min.js +++ b/lodash.min.js @@ -2,26 +2,26 @@ Lo-Dash 0.1.0 github.com/bestiejs/lodash/blob/master/LICENSE.txt Underscore.js 1.3.3 github.com/documentcloud/underscore/blob/master/LICENSE */ -;(function(r,j){"use strict";var m=!0,o=!1;function M(a){return"[object Arguments]"==h.call(a)}function k(a){return new p(a)}function p(a){this.m=a}function g(){for(var a,b=-1,c={},d={},e={},f=["c","i","f"];++b>1,(c?c(a[d]):a[d])f&&(b=m);++et(g,d))g.push(d),i.push(a[e]);return i}function u(a,b){var c=l.call(arguments,2),d=c.length;return function(){c.length= -d;F.apply(c,arguments);return a.apply(b,c)}}function ga(a,b,c){var d;return function(){var e=arguments,f=this;c&&!d&&a.apply(f,e);ra(d);d=G(function(){d=j;c||a.apply(f,e)},b)}}function T(a,b,c){c||(c=[]);if(a===b)return 0!==a||1/a==1/b;if(a==j||b==j)return a===b;a.o&&(a=a.m);b.o&&(b=b.m);if(a.isEqual&&h.call(a.isEqual)==q)return a.isEqual(b);if(b.isEqual&&h.call(b.isEqual)==q)return b.isEqual(a);var d=h.call(a);if(d!=h.call(b))return o;switch(d){case E:return a==""+b;case H:return a!=+a?b!=+b:0== -a?1/a==1/b:a==+b;case ha:case ia:return+a==+b;case ja:return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return o;for(var e=c.length;e--;)if(c[e]==a)return m;var e=m,f=0;c.push(a);if(d==C){if(f=a.length,e=f==b.length)for(;f--&&(e=f in a==f in b&&T(a[f],b[f],c)););}else{if("constructor"in a!="constructor"in b||a.constructor!=b.constructor)return o;for(var i in a)if(s.call(a,i)&&(f++,!(e=s.call(b,i)&&T(a[i],b[i], -c))))break;if(e){for(i in b)if(s.call(b,i)&&!f--)break;e=!f}}c.pop();return e}function $(a){return a}function ka(a){v(I(a),function(b){var c=k[b]=a[b];k.prototype[b]=function(){var a=[this.m];F.apply(a,arguments);a=c.apply(k,a);return this.o?(new p(a)).chain():a}})}var z={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"};(function(){for(var a in z)z[z[a]]=a})();var U="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(r=global),exports), -sa=0,ta=r._,ua=/\\|'|\r|\n|\t|\u2028|\u2029/g,V=/.^/,qa=/\\(\\|'|r|n|t|u2028|u2029)/g,C="[object Array]",ha="[object Boolean]",ia="[object Date]",q="[object Function]",H="[object Number]",ja="[object RegExp]",E="[object String]",A=Array.prototype,J=Object.prototype,y=A.concat,s=J.hasOwnProperty,F=A.push,l=A.slice,h=J.toString,va=r.isFinite,J=Object.keys,ra=r.clearTimeout,G=r.setTimeout,w={g:"I",f:"if(!f(h[p],p,h))return!B"},W={a:"x",g:"x",k:"for(var D,j=1,w=arguments.length;j=i)i=k,B=h[p]"},D=Array.isArray||function(a){return h.call(a)==C},aa=g({a:"K",h:"b",g:"I",k:"var g=H.call(K);if(g==d||g==E)return!K.length", -f:"return l"}),la=g({a:"h,F",g:"l",f:"if(h[p]===F)return I"}),S=g(n,w),Q=g(n,B),ma=g(n,{f:"if(f(h[p],p,h))return h[p]"}),v=g(n),wa=g(n,{g:"{}",k:"var z,v=H.call(f)==m;if(v&&G)f=e(f,G)",f:"z=v?f(h[p],p,h):h[p][f];(B[z]||(B[z]=[])).push(h[p])"}),Y=g(n,X),na=g(n,x),x=g(n,x,{k:x.k.replace("-","").replace("max","min"),f:x.f.replace(">=","<")}),K=g(X,{a:"h,A",f:{b:"B[p]=h[p][A]",j:"B.push(h[p][A])"}}),Z=g({a:"h,f,a,G",g:"a",k:"var s=arguments.length>2;if(G)f=e(f,G)",c:{b:"if(!s)B=h[++p]"},f:{b:"B=f(B,h[p],p,h)", -j:"B=s?f(B,h[p],p,h):(s=I,h[p])"}}),B=g(n,B,{f:"!"+B.f}),w=g(n,w,{g:"l",f:w.f.replace("!","")}),oa=g(X,{a:"h",f:{b:"B[p]=h[p]",j:"B.push(h[p])"}}),pa=g(W,{f:"if(x[p]==J)"+W.f}),L=g(W),I=g({a:"x",g:"[]",l:o,f:"if(H.call(x[p])==m)B.push(p)",d:"B.sort()"});M(arguments)||(M=function(a){return!(!a||!s.call(a,"callee"))});var O=J||g({a:"x",e:"if(x!==Object(x))throw TypeError()",g:"[]",f:"B.push(p)"});L(k,{VERSION:"0.1.0",templateSettings:{escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g}, -after:function(a,b){return 1>a?b():function(){if(1>--a)return b.apply(this,arguments)}},bind:u,bindAll:function(a){var b=arguments,c=1;1==b.length&&(c=0,b=I(a));for(var d=b.length;ct(e,a[b])&&d.push(a[b]);return d},escape:function(a){return(a+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g, -"'").replace(/\//g,"/")},every:S,extend:L,filter:Q,find:ma,first:P,flatten:da,forEach:v,functions:I,groupBy:wa,has:function(a,b){return s.call(a,b)},identity:$,indexOf:t,initial:function(a,b,c){return l.call(a,0,-(b==j||c?1:b))},intersection:ea,invoke:function(a,b){for(var c=l.call(arguments,2),d=-1,e=a.length,f=h.call(b)==q,i=[];++darguments.length&&(b=a||0,a=0);for(var d=-1,e=Math.max(Math.ceil((b-a)/c),0),f=Array(e);++dd?1:0}),"b")},sortedIndex:ca,tap:function(a,b){b(a);return a},template:function(a,b,c){function d(a){return e.call(this,a,k)}c=pa(c||{},k.templateSettings);a="__p+='"+a.replace(ua,function(a){return"\\"+z[a]}).replace(c.escape||V,function(a,b){return"'+((__t=("+ -N(b)+"))==null?'':_['escape'](__t))+'"}).replace(c.interpolate||V,function(a,b){return"'+((__t=("+N(b)+"))==null?'':__t)+'"}).replace(c.evaluate||V,function(a,b){return"';"+N(b)+";__p+='"})+"';\n";c.variable||(a="with(object||{}){"+a+"}");var a='var __t,__j=Array.prototype.join,__p="";function print(){__p+=__j.call(arguments,"")}'+a+"return __p",e=Function(c.variable||"object","_",a);if(b)return e(b,k);d.source="function("+(c.variable||"object")+"){"+a+"}";return d},throttle:function(a,b){var c,d, -e,f,g,h,k=ga(function(){d=g=o},b);return function(){c=arguments;f=this;h||(h=G(function(){h=j;d&&a.apply(f,c);k()},b));g?d=m:e=a.apply(f,c);k();g=m;return e}},times:function(a,b,c){c&&(b=u(b,c));for(c=0;ct(b,c[a])&&b.push(c[a]);return b},uniq:R,uniqueId:function(a){var b=sa++;return a? -a+b:b},values:oa,without:function(a){for(var b=l.call(arguments,1),c=-1,d=a.length,e=[];++ct(b,a[c])&&e.push(a[c]);return e},wrap:function(a,b){return function(){var c=[a];F.apply(c,arguments);return b.apply(this,c)}},zip:function(){for(var a=-1,b=na(K(arguments,"length")),c=Array(b);++ar(f,b)&&Q(e,function(a){return-1>1,(c?c(a[d]):a[d])f&&(b=m);++er(g,d))g.push(d),h.push(a[e]);return h}function v(a,b){var c=l.call(arguments, +2),d=c.length,e=i.call(a)==p;if(!e)var f=b,b=a;return function(){F.apply(c,arguments);var h=(e?a:b[f]).apply(b,c);c.length=d;return h}}function fa(a,b,c){function d(){h=j;c||a.apply(f,e)}var e,f,h;return function(){var g=c&&!h;e=arguments;f=this;ra(h);h=G(d,b);g&&a.apply(f,e)}}function R(a,b,c){c||(c=[]);if(a===b)return 0!==a||1/a==1/b;if(a==j||b==j)return a===b;a.o&&(a=a.m);b.o&&(b=b.m);if(a.isEqual&&i.call(a.isEqual)==p)return a.isEqual(b);if(b.isEqual&&i.call(b.isEqual)==p)return b.isEqual(a); +var d=i.call(a);if(d!=i.call(b))return o;switch(d){case E:return a==""+b;case H:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case ga:case ha:return+a==+b;case ia:return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return o;for(var e=c.length;e--;)if(c[e]==a)return m;var e=m,f=0;c.push(a);if(d==C){if(f=a.length,e=f==b.length)for(;f--&&(e=f in a==f in b&&R(a[f],b[f],c)););}else{if("constructor"in a!="constructor"in b|| +a.constructor!=b.constructor)return o;for(var h in a)if(t.call(a,h)&&(f++,!(e=t.call(b,h)&&R(a[h],b[h],c))))break;if(e){for(h in b)if(t.call(b,h)&&!f--)break;e=!f}}c.pop();return e}function Y(a){return a}function ja(a){A(I(a),function(b){var c=k[b]=a[b];k.prototype[b]=function(){var a=[this.m];F.apply(a,arguments);a=c.apply(k,a);return this.o?(new q(a)).chain():a}})}var z={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"};(function(){for(var a in z)z[z[a]]=a})();var S="object"== +typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(s=global),exports),sa=0,ta=s._,ua=/\\|'|\r|\n|\t|\u2028|\u2029/g,T=/.^/,qa=/\\(\\|'|r|n|t|u2028|u2029)/g,C="[object Array]",ga="[object Boolean]",ha="[object Date]",p="[object Function]",H="[object Number]",ia="[object RegExp]",E="[object String]",u=Array.prototype,J=Object.prototype,y=u.concat,t=J.hasOwnProperty,F=u.push,l=u.slice,i=J.toString,va=s.isFinite,J=Object.keys,ra=s.clearTimeout,G=s.setTimeout,w={g:"I",f:"if(!f(h[p],p,h))return!B"}, +U={a:"x",g:"x",k:"for(var D,j=1,w=arguments.length;j=i)i=k,B=h[p]"},D=Array.isArray||function(a){return i.call(a)== +C},Z=g({a:"K",h:"b",g:"I",k:"var g=H.call(K);if(g==d||g==E)return!K.length",f:"return l"}),ka=g({a:"h,F",g:"l",f:"if(h[p]===F)return I"}),Q=g(n,w),la=g(n,B),ma=g(n,{f:"if(f(h[p],p,h))return h[p]"}),A=g(n),wa=g(n,{g:"{}",k:"var z,v=H.call(f)==m;if(v&&G)f=e(f,G)",f:"z=v?f(h[p],p,h):h[p][f];(B[z]||(B[z]=[])).push(h[p])"}),W=g(n,V),na=g(n,x),x=g(n,x,{k:x.k.replace("-","").replace("max","min"),f:x.f.replace(">=","<")}),K=g(V,{a:"h,A",f:{b:"B[p]=h[p][A]",j:"B.push(h[p][A])"}}),X=g({a:"h,f,a,G",g:"a",k:"var s=arguments.length>2;if(G)f=e(f,G)", +c:{b:"if(!s)B=h[++p]"},f:{b:"B=f(B,h[p],p,h)",j:"B=s?f(B,h[p],p,h):(s=I,h[p])"}}),B=g(n,B,{f:"!"+B.f}),w=g(n,w,{g:"l",f:w.f.replace("!","")}),oa=g(V,{a:"h",f:{b:"B[p]=h[p]",j:"B.push(h[p])"}}),pa=g(U,{f:"if(x[p]==J)"+U.f}),L=g(U),I=g({a:"x",g:"[]",l:o,f:"if(H.call(x[p])==m)B.push(p)",d:"B.sort()"});M(arguments)||(M=function(a){return!(!a||!t.call(a,"callee"))});var O=J||g({a:"x",e:"if(x!==Object(x))throw TypeError()",g:"[]",f:"B.push(p)"});L(k,{VERSION:"0.1.0",templateSettings:{escape:/<%-([\s\S]+?)%>/g, +evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g},after:function(a,b){return 1>a?b():function(){if(1>--a)return b.apply(this,arguments)}},bind:v,bindAll:function(a){var b=arguments,c=1;1==b.length&&(c=0,b=I(a));for(var d=b.length;cr(e,a[b])&&d.push(a[b]);return d},escape:function(a){return(a+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},every:Q,extend:L,filter:la,find:ma,first:P,flatten:aa,forEach:A,functions:I,groupBy:wa,has:function(a,b){return t.call(a,b)},identity:Y,indexOf:r,initial:function(a,b,c){return l.call(a,0,-(b==j||c?1:b))},intersection:ca,invoke:function(a,b){for(var c=l.call(arguments,2),d=-1,e=a.length,f=i.call(b)==p,h=[];++darguments.length&&(b=a||0,a=0);for(var d=-1,e=Math.max(Math.ceil((b-a)/c),0),f=Array(e);++dd?1:0}),"b")},sortedIndex:ba,tap:function(a,b){b(a);return a},template:function(a,b,c){function d(a){return e.call(this,a,k)}c=pa(c||{},k.templateSettings);a="__p+='"+a.replace(ua,function(a){return"\\"+z[a]}).replace(c.escape||T,function(a, +b){return"'+((__t=("+N(b)+"))==null?'':_['escape'](__t))+'"}).replace(c.interpolate||T,function(a,b){return"'+((__t=("+N(b)+"))==null?'':__t)+'"}).replace(c.evaluate||T,function(a,b){return"';"+N(b)+";__p+='"})+"';\n";c.variable||(a="with(object||{}){"+a+"}");var a='var __t,__j=Array.prototype.join,__p="";function print(){__p+=__j.call(arguments,"")}'+a+"return __p",e=Function(c.variable||"object","_",a);if(b)return e(b,k);d.source="function("+(c.variable||"object")+"){"+a+"}";return d},throttle:function(a, +b){function c(){g=j;e&&a.apply(f,d);i()}var d,e,f,h,g,i=fa(function(){e=h=o},b);return function(){var j;d=arguments;f=this;g||(g=G(c,b));h?e=m:(h=m,j=a.apply(f,d));i();return j}},times:function(a,b,c){c&&(b=v(b,c));for(c=0;cr(b,c[a])&&b.push(c[a]);return b},uniq:ea,uniqueId:function(a){var b= +sa++;return a?a+b:b},values:oa,without:function(a){for(var b=l.call(arguments,1),c=-1,d=a.length,e=[];++cr(b,a[c])&&e.push(a[c]);return e},wrap:function(a,b){return function(){var c=[a];F.apply(c,arguments);return b.apply(this,c)}},zip:function(){for(var a=-1,b=na(K(arguments,"length")),c=Array(b);++a