lodash-rails 1.0.0.rc.2 → 1.0.0.rc.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -18,6 +18,6 @@ Add the necessary library to `app/assets/javascripts/application.js`:
18
18
 
19
19
  ## What's included?
20
20
 
21
- * Lo-Dash 1.0.0-rc.2 (lodash, lodash.min)
21
+ * Lo-Dash 1.0.0-rc.3 (lodash, lodash.min)
22
22
 
23
23
  Copyright Richard Hubers, released under the MIT License.
@@ -1,5 +1,5 @@
1
1
  module LoDash
2
2
  module Rails
3
- VERSION = "1.0.0.rc.2"
3
+ VERSION = "1.0.0.rc.3"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lo-Dash 1.0.0-rc.2 <http://lodash.com>
2
+ * Lo-Dash 1.0.0-rc.3 <http://lodash.com>
3
3
  * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
4
4
  * Based on Underscore.js 1.4.3 <http://underscorejs.org>
5
5
  * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
@@ -116,8 +116,7 @@
116
116
  stringClass = '[object String]';
117
117
 
118
118
  /** Detect various environments */
119
- var isFirefox = !/1/.test(Function('1')),
120
- isIeOpera = !!window.attachEvent,
119
+ var isIeOpera = !!window.attachEvent,
121
120
  isV8 = nativeBind && !/\n|true/.test(nativeBind + isIeOpera);
122
121
 
123
122
  /* Detect if `Function#bind` exists and is inferred to be fast (all but V8) */
@@ -151,20 +150,23 @@
151
150
  arrayRef.splice.call(hasObjectSpliceBug, 0, 1), hasObjectSpliceBug[0]);
152
151
 
153
152
  /** Detect if an `arguments` object's indexes are non-enumerable (IE < 9) */
154
- var noArgsEnum = true;
153
+ var nonEnumArgs = true;
155
154
 
156
155
  (function() {
157
156
  var props = [];
158
157
  function ctor() { this.x = 1; }
159
158
  ctor.prototype = { 'valueOf': 1, 'y': 1 };
160
159
  for (var prop in new ctor) { props.push(prop); }
161
- for (prop in arguments) { noArgsEnum = !prop; }
160
+ for (prop in arguments) { nonEnumArgs = !prop; }
162
161
 
163
162
  hasDontEnumBug = !/valueOf/.test(props);
164
163
  iteratesOwnLast = props[0] != 'x';
165
164
  }(1));
166
165
 
167
- /** Detect if an `arguments` object's [[Class]] is unresolvable (Firefox < 4, IE < 9) */
166
+ /** Detect if `arguments` objects are `Object` objects (all but Opera < 10.5) */
167
+ var argsAreObjects = arguments.constructor == Object;
168
+
169
+ /** Detect if `arguments` objects [[Class]] is unresolvable (Firefox < 4, IE < 9) */
168
170
  var noArgsClass = !isArguments(arguments);
169
171
 
170
172
  /**
@@ -243,7 +245,29 @@
243
245
  /*--------------------------------------------------------------------------*/
244
246
 
245
247
  /**
246
- * The `lodash` function.
248
+ * Creates a `lodash` object, that wraps the given `value`, to enable
249
+ * method chaining.
250
+ *
251
+ * The chainable wrapper functions are:
252
+ * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, `compose`,
253
+ * `concat`, `countBy`, `debounce`, `defaults`, `defer`, `delay`, `difference`,
254
+ * `filter`, `flatten`, `forEach`, `forIn`, `forOwn`, `functions`, `groupBy`,
255
+ * `initial`, `intersection`, `invert`, `invoke`, `keys`, `map`, `max`, `memoize`,
256
+ * `merge`, `min`, `object`, `omit`, `once`, `pairs`, `partial`, `pick`, `pluck`,
257
+ * `push`, `range`, `reject`, `rest`, `reverse`, `shuffle`, `slice`, `sort`,
258
+ * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `union`, `uniq`,
259
+ * `unshift`, `values`, `where`, `without`, `wrap`, and `zip`
260
+ *
261
+ * The non-chainable wrapper functions are:
262
+ * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`, `identity`,
263
+ * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, `isEmpty`,
264
+ * `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, `isObject`,
265
+ * `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, `lastIndexOf`,
266
+ * `mixin`, `noConflict`, `pop`, `random`, `reduce`, `reduceRight`, `result`,
267
+ * `shift`, `size`, `some`, `sortedIndex`, `template`, `unescape`, and `uniqueId`
268
+ *
269
+ * The wrapper functions `first` and `last` return wrapped values when `n` is
270
+ * passed, otherwise they return unwrapped values.
247
271
  *
248
272
  * @name _
249
273
  * @constructor
@@ -313,25 +337,6 @@
313
337
 
314
338
  /*--------------------------------------------------------------------------*/
315
339
 
316
- /**
317
- * Creates a function from the given `args` and `body` strings.
318
- *
319
- * @private
320
- * @param {String} args The comma separated function arguments.
321
- * @param {String} body The function body.
322
- * @returns {Function} The new function.
323
- */
324
- function createFunction(args, body) {
325
- // the newline, in `'\n}'`, is required to avoid errors if `body` ends
326
- // with a single line comment
327
- return window.eval('(function(' + args + ') {' + body + '\n})');
328
- }
329
- // use `eval` to avoid Firefox's unoptimized `Function` constructor
330
- // http://bugzil.la/804933
331
- if (isIeOpera || isV8 || !isFirefox) {
332
- createFunction = Function;
333
- }
334
-
335
340
  /**
336
341
  * The template used to create iterator functions.
337
342
  *
@@ -373,7 +378,7 @@
373
378
 
374
379
  // object iteration:
375
380
  // add support for iterating over `arguments` objects if needed
376
- ' <% } else if (noArgsEnum) { %>\n' +
381
+ ' <% } else if (nonEnumArgs) { %>\n' +
377
382
  ' var length = iteratee.length; index = -1;\n' +
378
383
  ' if (length && isArguments(iteratee)) {\n' +
379
384
  ' while (++index < length) {\n' +
@@ -436,7 +441,7 @@
436
441
  ' }' +
437
442
  ' <% } %>' +
438
443
  ' <% } %>' +
439
- ' <% if (arrayLoop || noArgsEnum) { %>\n}<% } %>\n' +
444
+ ' <% if (arrayLoop || nonEnumArgs) { %>\n}<% } %>\n' +
440
445
 
441
446
  // add code to the bottom of the iteration function
442
447
  '<%= bottom %>;\n' +
@@ -455,9 +460,9 @@
455
460
  };
456
461
 
457
462
  /**
458
- * Reusable iterator options shared by `forEach`, `forIn`, and `forOwn`.
463
+ * Reusable iterator options shared by `each`, `forIn`, and `forOwn`.
459
464
  */
460
- var forEachIteratorOptions = {
465
+ var eachIteratorOptions = {
461
466
  'args': 'collection, callback, thisArg',
462
467
  'top': "callback = callback && typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg)",
463
468
  'arrayLoop': 'if (callback(iteratee[index], index, collection) === false) return result',
@@ -611,9 +616,11 @@
611
616
  * @param {Function|String} [func=identity|property] The function called per
612
617
  * iteration or property name to query.
613
618
  * @param {Mixed} [thisArg] The `this` binding of `callback`.
619
+ * @param {Object} [accumulating] Used to indicate that the callback should
620
+ * accept an `accumulator` argument.
614
621
  * @returns {Function} Returns a callback function.
615
622
  */
616
- function createCallback(func, thisArg) {
623
+ function createCallback(func, thisArg, accumulating) {
617
624
  if (!func) {
618
625
  return identity;
619
626
  }
@@ -623,6 +630,11 @@
623
630
  };
624
631
  }
625
632
  if (typeof thisArg != 'undefined') {
633
+ if (accumulating) {
634
+ return function(accumulator, value, index, object) {
635
+ return func.call(thisArg, accumulator, value, index, object);
636
+ };
637
+ }
626
638
  return function(value, index, object) {
627
639
  return func.call(thisArg, value, index, object);
628
640
  };
@@ -651,7 +663,7 @@
651
663
  'hasDontEnumBug': hasDontEnumBug,
652
664
  'isKeysFast': isKeysFast,
653
665
  'objectLoop': '',
654
- 'noArgsEnum': noArgsEnum,
666
+ 'nonEnumArgs': nonEnumArgs,
655
667
  'noCharByIndex': noCharByIndex,
656
668
  'shadowed': shadowed,
657
669
  'top': '',
@@ -668,7 +680,7 @@
668
680
  data.firstArg = /^[^,]+/.exec(args)[0];
669
681
 
670
682
  // create the function factory
671
- var factory = createFunction(
683
+ var factory = Function(
672
684
  'createCallback, hasOwnProperty, isArguments, isString, objectTypes, ' +
673
685
  'nativeKeys, propertyIsEnumerable',
674
686
  'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
@@ -680,6 +692,21 @@
680
692
  );
681
693
  }
682
694
 
695
+ /**
696
+ * A function compiled to iterate `arguments` objects, arrays, objects, and
697
+ * strings consistenly across environments, executing the `callback` for each
698
+ * element in the `collection`. The `callback` is bound to `thisArg` and invoked
699
+ * with three arguments; (value, index|key, collection). Callbacks may exit
700
+ * iteration early by explicitly returning `false`.
701
+ *
702
+ * @private
703
+ * @param {Array|Object|String} collection The collection to iterate over.
704
+ * @param {Function} [callback=identity] The function called per iteration.
705
+ * @param {Mixed} [thisArg] The `this` binding of `callback`.
706
+ * @returns {Array|Object|String} Returns `collection`.
707
+ */
708
+ var each = createIterator(eachIteratorOptions);
709
+
683
710
  /**
684
711
  * Used by `template` to escape characters for inclusion in compiled
685
712
  * string literals.
@@ -839,7 +866,7 @@
839
866
  * });
840
867
  * // => alerts 'name' and 'bark' (order is not guaranteed)
841
868
  */
842
- var forIn = createIterator(forEachIteratorOptions, forOwnIteratorOptions, {
869
+ var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, {
843
870
  'useHas': false
844
871
  });
845
872
 
@@ -863,7 +890,7 @@
863
890
  * });
864
891
  * // => alerts '0', '1', and 'length' (order is not guaranteed)
865
892
  */
866
- var forOwn = createIterator(forEachIteratorOptions, forOwnIteratorOptions);
893
+ var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions);
867
894
 
868
895
  /**
869
896
  * A fallback implementation of `isPlainObject` that checks if a given `value`
@@ -943,14 +970,8 @@
943
970
  /*--------------------------------------------------------------------------*/
944
971
 
945
972
  /**
946
- * Creates a clone of `value`. If `deep` is `true`, all nested objects will
947
- * also be cloned, otherwise they will be assigned by reference. Functions and
948
- * DOM nodes are **not** cloned. The enumerable properties of `arguments` objects
949
- * and objects created by constructors other than `Object` are cloned to plain
950
- * `Object` objects.
951
- *
952
- * Note: Lo-Dash's deep clone functionality is loosely based on the structured clone algorithm.
953
- * See http://www.w3.org/TR/html5/common-dom-interfaces.html#internal-structured-cloning-algorithm.
973
+ * Creates a clone of `value`. If `deep` is `true`, nested objects will also
974
+ * be cloned, otherwise they will be assigned by reference.
954
975
  *
955
976
  * @static
956
977
  * @memberOf _
@@ -971,9 +992,6 @@
971
992
  * { 'name': 'curly', 'age': 60 }
972
993
  * ];
973
994
  *
974
- * _.clone({ 'name': 'moe' });
975
- * // => { 'name': 'moe' }
976
- *
977
995
  * var shallow = _.clone(stooges);
978
996
  * shallow[0] === stooges[0];
979
997
  * // => true
@@ -1052,6 +1070,35 @@
1052
1070
  return result;
1053
1071
  }
1054
1072
 
1073
+ /**
1074
+ * Creates a deep clone of `value`. Functions and DOM nodes are **not** cloned.
1075
+ * The enumerable properties of `arguments` objects and objects created by
1076
+ * constructors other than `Object` are cloned to plain `Object` objects.
1077
+ *
1078
+ * Note: This function is loosely based on the structured clone algorithm.
1079
+ * See http://www.w3.org/TR/html5/common-dom-interfaces.html#internal-structured-cloning-algorithm.
1080
+ *
1081
+ * @static
1082
+ * @memberOf _
1083
+ * @category Objects
1084
+ * @param {Mixed} value The value to deep clone.
1085
+ * @returns {Mixed} Returns the deep cloned `value`.
1086
+ * @example
1087
+ *
1088
+ * var stooges = [
1089
+ * { 'name': 'moe', 'age': 40 },
1090
+ * { 'name': 'larry', 'age': 50 },
1091
+ * { 'name': 'curly', 'age': 60 }
1092
+ * ];
1093
+ *
1094
+ * var deep = _.cloneDeep(stooges);
1095
+ * deep[0] === stooges[0];
1096
+ * // => false
1097
+ */
1098
+ function cloneDeep(value) {
1099
+ return clone(value, true);
1100
+ }
1101
+
1055
1102
  /**
1056
1103
  * Assigns own enumerable properties of source object(s) to the `destination`
1057
1104
  * object for all `destination` properties that resolve to `null`/`undefined`.
@@ -1156,7 +1203,9 @@
1156
1203
  * // => true
1157
1204
  */
1158
1205
  var isArray = nativeIsArray || function(value) {
1159
- return toString.call(value) == arrayClass;
1206
+ // `instanceof` may cause a memory leak in IE 7 if `value` is a host object
1207
+ // http://ajaxian.com/archives/working-aroung-the-instanceof-memory-leak
1208
+ return (argsAreObjects && value instanceof Array) || toString.call(value) == arrayClass;
1160
1209
  };
1161
1210
 
1162
1211
  /**
@@ -1190,7 +1239,7 @@
1190
1239
  * // => true
1191
1240
  */
1192
1241
  function isDate(value) {
1193
- return toString.call(value) == dateClass;
1242
+ return value instanceof Date || toString.call(value) == dateClass;
1194
1243
  }
1195
1244
 
1196
1245
  /**
@@ -1327,8 +1376,8 @@
1327
1376
  return false;
1328
1377
  }
1329
1378
  // in older versions of Opera, `arguments` objects have `Array` constructors
1330
- var ctorA = noArgsClass && isArguments(a) ? Object : a.constructor,
1331
- ctorB = noArgsClass && isArguments(b) ? Object : b.constructor;
1379
+ var ctorA = !argsAreObjects && isArguments(a) ? Object : a.constructor,
1380
+ ctorB = !argsAreObjects && isArguments(b) ? Object : b.constructor;
1332
1381
 
1333
1382
  // non `Object` object instances with different constructors are not equal
1334
1383
  if (ctorA != ctorB && !(
@@ -1448,7 +1497,7 @@
1448
1497
  // fallback for older versions of Chrome and Safari
1449
1498
  if (isFunction(/x/)) {
1450
1499
  isFunction = function(value) {
1451
- return toString.call(value) == funcClass;
1500
+ return value instanceof Function || toString.call(value) == funcClass;
1452
1501
  };
1453
1502
  }
1454
1503
 
@@ -1598,7 +1647,7 @@
1598
1647
  * // => true
1599
1648
  */
1600
1649
  function isRegExp(value) {
1601
- return toString.call(value) == regexpClass;
1650
+ return value instanceof RegExp || toString.call(value) == regexpClass;
1602
1651
  }
1603
1652
 
1604
1653
  /**
@@ -1913,7 +1962,7 @@
1913
1962
  : indexOf(collection, target, fromIndex)
1914
1963
  ) > -1;
1915
1964
  } else {
1916
- forEach(collection, function(value) {
1965
+ each(collection, function(value) {
1917
1966
  if (++index >= fromIndex) {
1918
1967
  return !(result = value === target);
1919
1968
  }
@@ -1951,6 +2000,7 @@
1951
2000
  function countBy(collection, callback, thisArg) {
1952
2001
  var result = {};
1953
2002
  callback = createCallback(callback, thisArg);
2003
+
1954
2004
  forEach(collection, function(value, key, collection) {
1955
2005
  key = callback(value, key, collection);
1956
2006
  (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1);
@@ -1991,7 +2041,7 @@
1991
2041
  }
1992
2042
  }
1993
2043
  } else {
1994
- forEach(collection, function(value, index, collection) {
2044
+ each(collection, function(value, index, collection) {
1995
2045
  return (result = !!callback(value, index, collection));
1996
2046
  });
1997
2047
  }
@@ -2031,7 +2081,7 @@
2031
2081
  }
2032
2082
  }
2033
2083
  } else {
2034
- forEach(collection, function(value, index, collection) {
2084
+ each(collection, function(value, index, collection) {
2035
2085
  if (callback(value, index, collection)) {
2036
2086
  result.push(value);
2037
2087
  }
@@ -2063,6 +2113,7 @@
2063
2113
  function find(collection, callback, thisArg) {
2064
2114
  var result;
2065
2115
  callback = createCallback(callback, thisArg);
2116
+
2066
2117
  forEach(collection, function(value, index, collection) {
2067
2118
  if (callback(value, index, collection)) {
2068
2119
  result = value;
@@ -2094,7 +2145,21 @@
2094
2145
  * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
2095
2146
  * // => alerts each number value (order is not guaranteed)
2096
2147
  */
2097
- var forEach = createIterator(forEachIteratorOptions);
2148
+ function forEach(collection, callback, thisArg) {
2149
+ if (callback && typeof thisArg == 'undefined' && isArray(collection)) {
2150
+ var index = -1,
2151
+ length = collection.length;
2152
+
2153
+ while (++index < length) {
2154
+ if (callback(collection[index], index, collection) === false) {
2155
+ break;
2156
+ }
2157
+ }
2158
+ } else {
2159
+ each(collection, callback, thisArg);
2160
+ }
2161
+ return collection;
2162
+ }
2098
2163
 
2099
2164
  /**
2100
2165
  * Creates an object composed of keys returned from running each element of
@@ -2125,6 +2190,7 @@
2125
2190
  function groupBy(collection, callback, thisArg) {
2126
2191
  var result = {};
2127
2192
  callback = createCallback(callback, thisArg);
2193
+
2128
2194
  forEach(collection, function(value, key, collection) {
2129
2195
  key = callback(value, key, collection);
2130
2196
  (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value);
@@ -2197,7 +2263,7 @@
2197
2263
  result[index] = callback(collection[index], index, collection);
2198
2264
  }
2199
2265
  } else {
2200
- forEach(collection, function(value, key, collection) {
2266
+ each(collection, function(value, key, collection) {
2201
2267
  result[++index] = callback(value, key, collection);
2202
2268
  });
2203
2269
  }
@@ -2239,7 +2305,7 @@
2239
2305
  ? charAtCallback
2240
2306
  : createCallback(callback, thisArg);
2241
2307
 
2242
- forEach(collection, function(value, index, collection) {
2308
+ each(collection, function(value, index, collection) {
2243
2309
  var current = callback(value, index, collection);
2244
2310
  if (current > computed) {
2245
2311
  computed = current;
@@ -2285,7 +2351,7 @@
2285
2351
  ? charAtCallback
2286
2352
  : createCallback(callback, thisArg);
2287
2353
 
2288
- forEach(collection, function(value, index, collection) {
2354
+ each(collection, function(value, index, collection) {
2289
2355
  var current = callback(value, index, collection);
2290
2356
  if (current < computed) {
2291
2357
  computed = current;
@@ -2349,12 +2415,25 @@
2349
2415
  */
2350
2416
  function reduce(collection, callback, accumulator, thisArg) {
2351
2417
  var noaccum = arguments.length < 3;
2352
- callback || (callback = identity);
2353
- forEach(collection, function(value, index, collection) {
2354
- accumulator = noaccum
2355
- ? (noaccum = false, value)
2356
- : callback.call(thisArg, accumulator, value, index, collection)
2357
- });
2418
+ callback = createCallback(callback, thisArg, indicatorObject);
2419
+
2420
+ if (isArray(collection)) {
2421
+ var index = -1,
2422
+ length = collection.length;
2423
+
2424
+ if (noaccum) {
2425
+ accumulator = collection[++index];
2426
+ }
2427
+ while (++index < length) {
2428
+ accumulator = callback(accumulator, collection[index], index, collection);
2429
+ }
2430
+ } else {
2431
+ each(collection, function(value, index, collection) {
2432
+ accumulator = noaccum
2433
+ ? (noaccum = false, value)
2434
+ : callback(accumulator, value, index, collection)
2435
+ });
2436
+ }
2358
2437
  return accumulator;
2359
2438
  }
2360
2439
 
@@ -2387,12 +2466,12 @@
2387
2466
  } else if (noCharByIndex && isString(collection)) {
2388
2467
  iteratee = collection.split('');
2389
2468
  }
2390
- callback || (callback = identity);
2469
+ callback = createCallback(callback, thisArg, indicatorObject);
2391
2470
  forEach(collection, function(value, index, collection) {
2392
2471
  index = props ? props[--length] : --length;
2393
2472
  accumulator = noaccum
2394
2473
  ? (noaccum = false, iteratee[index])
2395
- : callback.call(thisArg, accumulator, iteratee[index], index, collection);
2474
+ : callback(accumulator, iteratee[index], index, collection);
2396
2475
  });
2397
2476
  return accumulator;
2398
2477
  }
@@ -2506,7 +2585,7 @@
2506
2585
  }
2507
2586
  }
2508
2587
  } else {
2509
- forEach(collection, function(value, index, collection) {
2588
+ each(collection, function(value, index, collection) {
2510
2589
  return !(result = callback(value, index, collection));
2511
2590
  });
2512
2591
  }
@@ -2541,6 +2620,7 @@
2541
2620
  function sortBy(collection, callback, thisArg) {
2542
2621
  var result = [];
2543
2622
  callback = createCallback(callback, thisArg);
2623
+
2544
2624
  forEach(collection, function(value, index, collection) {
2545
2625
  result.push({
2546
2626
  'criteria': callback(value, index, collection),
@@ -2817,8 +2897,8 @@
2817
2897
  * @memberOf _
2818
2898
  * @category Arrays
2819
2899
  * @param {Array} [array1, array2, ...] Arrays to process.
2820
- * @returns {Array} Returns a new array of unique elements, in order, that are
2821
- * present in **all** of the arrays.
2900
+ * @returns {Array} Returns a new array of unique elements that are present
2901
+ * in **all** of the arrays.
2822
2902
  * @example
2823
2903
  *
2824
2904
  * _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
@@ -2827,20 +2907,35 @@
2827
2907
  function intersection(array) {
2828
2908
  var args = arguments,
2829
2909
  argsLength = args.length,
2830
- cache = {},
2831
- result = [];
2910
+ cache = { '0': {} },
2911
+ index = -1,
2912
+ length = array ? array.length : 0,
2913
+ isLarge = length >= 100,
2914
+ result = [],
2915
+ seen = result;
2832
2916
 
2833
- forEach(array, function(value) {
2834
- if (indexOf(result, value) < 0) {
2835
- var length = argsLength;
2836
- while (--length) {
2837
- if (!(cache[length] || (cache[length] = cachedContains(args[length])))(value)) {
2838
- return;
2917
+ outer:
2918
+ while (++index < length) {
2919
+ var value = array[index];
2920
+ if (isLarge) {
2921
+ var key = value + '';
2922
+ var inited = hasOwnProperty.call(cache[0], key)
2923
+ ? !(seen = cache[0][key])
2924
+ : (seen = cache[0][key] = []);
2925
+ }
2926
+ if (inited || indexOf(seen, value) < 0) {
2927
+ if (isLarge) {
2928
+ seen.push(value);
2929
+ }
2930
+ var argsIndex = argsLength;
2931
+ while (--argsIndex) {
2932
+ if (!(cache[argsIndex] || (cache[argsIndex] = cachedContains(args[argsIndex], 0, 100)))(value)) {
2933
+ continue outer;
2839
2934
  }
2840
2935
  }
2841
2936
  result.push(value);
2842
2937
  }
2843
- });
2938
+ }
2844
2939
  return result;
2845
2940
  }
2846
2941
 
@@ -3051,9 +3146,10 @@
3051
3146
  var low = 0,
3052
3147
  high = array ? array.length : low;
3053
3148
 
3054
- // explicitly reference `identity` for better engine inlining
3149
+ // explicitly reference `identity` for better inlining in Firefox
3055
3150
  callback = callback ? createCallback(callback, thisArg) : identity;
3056
3151
  value = callback(value);
3152
+
3057
3153
  while (low < high) {
3058
3154
  var mid = (low + high) >>> 1;
3059
3155
  callback(array[mid]) < value
@@ -3125,7 +3221,7 @@
3125
3221
  isSorted = false;
3126
3222
  }
3127
3223
  // init value cache for large arrays
3128
- var isLarge = !isSorted && length > 74;
3224
+ var isLarge = !isSorted && length >= 75;
3129
3225
  if (isLarge) {
3130
3226
  var cache = {};
3131
3227
  }
@@ -3138,13 +3234,14 @@
3138
3234
  computed = callback ? callback(value, index, array) : value;
3139
3235
 
3140
3236
  if (isLarge) {
3141
- // manually coerce `computed` to a string because `hasOwnProperty`, in
3142
- // some older versions of Firefox, coerces objects incorrectly
3143
- seen = hasOwnProperty.call(cache, computed + '') ? cache[computed] : (cache[computed] = []);
3237
+ var key = computed + '';
3238
+ var inited = hasOwnProperty.call(cache, key)
3239
+ ? !(seen = cache[key])
3240
+ : (seen = cache[key] = []);
3144
3241
  }
3145
3242
  if (isSorted
3146
3243
  ? !index || seen[seen.length - 1] !== computed
3147
- : indexOf(seen, computed) < 0
3244
+ : inited || indexOf(seen, computed) < 0
3148
3245
  ) {
3149
3246
  if (callback || isLarge) {
3150
3247
  seen.push(computed);
@@ -3655,8 +3752,6 @@
3655
3752
  /**
3656
3753
  * This function returns the first argument passed to it.
3657
3754
  *
3658
- * Note: This function is used throughout Lo-Dash as a default callback.
3659
- *
3660
3755
  * @static
3661
3756
  * @memberOf _
3662
3757
  * @category Utilities
@@ -3958,7 +4053,7 @@
3958
4053
  : '';
3959
4054
 
3960
4055
  try {
3961
- result = createFunction('_', 'return ' + source + sourceURL)(lodash);
4056
+ result = Function('_', 'return ' + source + sourceURL)(lodash);
3962
4057
  } catch(e) {
3963
4058
  e.source = source;
3964
4059
  throw e;
@@ -4049,32 +4144,6 @@
4049
4144
 
4050
4145
  /*--------------------------------------------------------------------------*/
4051
4146
 
4052
- /**
4053
- * Wraps the value in a `lodash` wrapper object.
4054
- *
4055
- * @static
4056
- * @memberOf _
4057
- * @category Chaining
4058
- * @param {Mixed} value The value to wrap.
4059
- * @returns {Object} Returns the wrapper object.
4060
- * @example
4061
- *
4062
- * var stooges = [
4063
- * { 'name': 'moe', 'age': 40 },
4064
- * { 'name': 'larry', 'age': 50 },
4065
- * { 'name': 'curly', 'age': 60 }
4066
- * ];
4067
- *
4068
- * var youngest = _.chain(stooges)
4069
- * .sortBy(function(stooge) { return stooge.age; })
4070
- * .map(function(stooge) { return stooge.name + ' is ' + stooge.age; })
4071
- * .first();
4072
- * // => 'moe is 40'
4073
- */
4074
- function chain(value) {
4075
- return new lodash(value);
4076
- }
4077
-
4078
4147
  /**
4079
4148
  * Invokes `interceptor` with the `value` as the first argument, and then
4080
4149
  * returns `value`. The purpose of this method is to "tap into" a method chain,
@@ -4101,28 +4170,6 @@
4101
4170
  return value;
4102
4171
  }
4103
4172
 
4104
- /**
4105
- * This function returns the wrapper object.
4106
- *
4107
- * Note: This function is defined to ensure the existing wrapper object is
4108
- * returned, instead of creating a new wrapper object like the `_.chain`
4109
- * method does.
4110
- *
4111
- * @name chain
4112
- * @deprecated
4113
- * @memberOf _
4114
- * @category Chaining
4115
- * @returns {Mixed} Returns the wrapper object.
4116
- * @example
4117
- *
4118
- * var wrapped = _([1, 2, 3]);
4119
- * wrapped === wrapped.chain();
4120
- * // => true
4121
- */
4122
- function wrapperChain() {
4123
- return this;
4124
- }
4125
-
4126
4173
  /**
4127
4174
  * Produces the `toString` result of the wrapped value.
4128
4175
  *
@@ -4136,7 +4183,7 @@
4136
4183
  * // => '1,2,3'
4137
4184
  */
4138
4185
  function wrapperToString() {
4139
- return String(this.__wrapped__);
4186
+ return this.__wrapped__ + '';
4140
4187
  }
4141
4188
 
4142
4189
  /**
@@ -4159,12 +4206,18 @@
4159
4206
  /*--------------------------------------------------------------------------*/
4160
4207
 
4161
4208
  // add functions that return wrapped values when chaining
4209
+ lodash.after = after;
4162
4210
  lodash.assign = assign;
4211
+ lodash.bind = bind;
4163
4212
  lodash.bindAll = bindAll;
4164
- lodash.chain = chain;
4213
+ lodash.bindKey = bindKey;
4165
4214
  lodash.compact = compact;
4215
+ lodash.compose = compose;
4166
4216
  lodash.countBy = countBy;
4217
+ lodash.debounce = debounce;
4167
4218
  lodash.defaults = defaults;
4219
+ lodash.defer = defer;
4220
+ lodash.delay = delay;
4168
4221
  lodash.difference = difference;
4169
4222
  lodash.filter = filter;
4170
4223
  lodash.flatten = flatten;
@@ -4180,11 +4233,14 @@
4180
4233
  lodash.keys = keys;
4181
4234
  lodash.map = map;
4182
4235
  lodash.max = max;
4236
+ lodash.memoize = memoize;
4183
4237
  lodash.merge = merge;
4184
4238
  lodash.min = min;
4185
4239
  lodash.object = object;
4186
4240
  lodash.omit = omit;
4241
+ lodash.once = once;
4187
4242
  lodash.pairs = pairs;
4243
+ lodash.partial = partial;
4188
4244
  lodash.pick = pick;
4189
4245
  lodash.pluck = pluck;
4190
4246
  lodash.range = range;
@@ -4193,6 +4249,7 @@
4193
4249
  lodash.shuffle = shuffle;
4194
4250
  lodash.sortBy = sortBy;
4195
4251
  lodash.tap = tap;
4252
+ lodash.throttle = throttle;
4196
4253
  lodash.times = times;
4197
4254
  lodash.toArray = toArray;
4198
4255
  lodash.union = union;
@@ -4200,6 +4257,7 @@
4200
4257
  lodash.values = values;
4201
4258
  lodash.where = where;
4202
4259
  lodash.without = without;
4260
+ lodash.wrap = wrap;
4203
4261
  lodash.zip = zip;
4204
4262
 
4205
4263
  // add aliases
@@ -4218,15 +4276,9 @@
4218
4276
  /*--------------------------------------------------------------------------*/
4219
4277
 
4220
4278
  // add functions that return unwrapped values when chaining
4221
- lodash.after = after;
4222
- lodash.bind = bind;
4223
- lodash.bindKey = bindKey;
4224
4279
  lodash.clone = clone;
4225
- lodash.compose = compose;
4280
+ lodash.cloneDeep = cloneDeep;
4226
4281
  lodash.contains = contains;
4227
- lodash.debounce = debounce;
4228
- lodash.defer = defer;
4229
- lodash.delay = delay;
4230
4282
  lodash.escape = escape;
4231
4283
  lodash.every = every;
4232
4284
  lodash.find = find;
@@ -4251,11 +4303,8 @@
4251
4303
  lodash.isString = isString;
4252
4304
  lodash.isUndefined = isUndefined;
4253
4305
  lodash.lastIndexOf = lastIndexOf;
4254
- lodash.memoize = memoize;
4255
4306
  lodash.mixin = mixin;
4256
4307
  lodash.noConflict = noConflict;
4257
- lodash.once = once;
4258
- lodash.partial = partial;
4259
4308
  lodash.random = random;
4260
4309
  lodash.reduce = reduce;
4261
4310
  lodash.reduceRight = reduceRight;
@@ -4264,10 +4313,8 @@
4264
4313
  lodash.some = some;
4265
4314
  lodash.sortedIndex = sortedIndex;
4266
4315
  lodash.template = template;
4267
- lodash.throttle = throttle;
4268
4316
  lodash.unescape = unescape;
4269
4317
  lodash.uniqueId = uniqueId;
4270
- lodash.wrap = wrap;
4271
4318
 
4272
4319
  // add aliases
4273
4320
  lodash.all = every;
@@ -4316,42 +4363,60 @@
4316
4363
  * @memberOf _
4317
4364
  * @type String
4318
4365
  */
4319
- lodash.VERSION = '1.0.0-rc.2';
4366
+ lodash.VERSION = '1.0.0-rc.3';
4320
4367
 
4321
4368
  // add "Chaining" functions to the wrapper
4322
- lodash.prototype.chain = wrapperChain;
4323
4369
  lodash.prototype.toString = wrapperToString;
4324
4370
  lodash.prototype.value = wrapperValueOf;
4325
4371
  lodash.prototype.valueOf = wrapperValueOf;
4326
4372
 
4327
- // add mutator `Array` functions to the wrapper
4328
- forEach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
4373
+ // add `Array` functions that return unwrapped values
4374
+ each(['join', 'pop', 'shift'], function(methodName) {
4329
4375
  var func = arrayRef[methodName];
4330
4376
  lodash.prototype[methodName] = function() {
4331
- var value = this.__wrapped__;
4332
- func.apply(value, arguments);
4377
+ return func.apply(this.__wrapped__, arguments);
4378
+ };
4379
+ });
4333
4380
 
4334
- // avoid array-like object bugs with `Array#shift` and `Array#splice`
4335
- // in Firefox < 10 and IE < 9
4336
- if (hasObjectSpliceBug && value.length === 0) {
4337
- delete value[0];
4338
- }
4381
+ // add `Array` functions that return the wrapped value
4382
+ each(['push', 'reverse', 'sort', 'unshift'], function(methodName) {
4383
+ var func = arrayRef[methodName];
4384
+ lodash.prototype[methodName] = function() {
4385
+ func.apply(this.__wrapped__, arguments);
4339
4386
  return this;
4340
4387
  };
4341
4388
  });
4342
4389
 
4343
- // add accessor `Array` functions to the wrapper
4344
- forEach(['concat', 'join', 'slice'], function(methodName) {
4390
+ // add `Array` functions that return new wrapped values
4391
+ each(['concat', 'slice', 'splice'], function(methodName) {
4345
4392
  var func = arrayRef[methodName];
4346
4393
  lodash.prototype[methodName] = function() {
4347
- var value = this.__wrapped__,
4348
- result = func.apply(value, arguments);
4349
-
4394
+ var result = func.apply(this.__wrapped__, arguments);
4350
4395
  return new lodash(result);
4351
4396
  };
4352
4397
  });
4353
4398
 
4399
+ // avoid array-like object bugs with `Array#shift` and `Array#splice`
4400
+ // in Firefox < 10 and IE < 9
4401
+ if (hasObjectSpliceBug) {
4402
+ each(['pop', 'shift', 'splice'], function(methodName) {
4403
+ var func = arrayRef[methodName],
4404
+ isSplice = methodName == 'splice';
4405
+
4406
+ lodash.prototype[methodName] = function() {
4407
+ var value = this.__wrapped__,
4408
+ result = func.apply(value, arguments);
4409
+
4410
+ if (value.length === 0) {
4411
+ delete value[0];
4412
+ }
4413
+ return isSplice ? new lodash(result) : result;
4414
+ };
4415
+ });
4416
+ }
4417
+
4354
4418
  // add pseudo private property to be used and removed during the build process
4419
+ lodash._each = each;
4355
4420
  lodash._iteratorTemplate = iteratorTemplate;
4356
4421
 
4357
4422
  /*--------------------------------------------------------------------------*/
@@ -1,41 +1,42 @@
1
1
  /*!
2
- Lo-Dash 1.0.0-rc.2 lodash.com/license
2
+ Lo-Dash 1.0.0-rc.3 lodash.com/license
3
3
  Underscore.js 1.4.3 underscorejs.org/LICENSE
4
4
  */
5
- ;(function(e,t){function s(e){if(e&&"object"==typeof e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(t,n){return e.eval("(function("+t+"){"+n+"})")}function u(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||it);if(i)for(var s={},n=t-1;++n<r;){var o=e[n]+"";(Tt.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+"";return Tt.call(s,r)&&-1<W(s[r],n)}return-1<W(e,n,t)}}function a(e){return e.charCodeAt(0)}function f(e,t){var n=e.b,r=t.b,e=e.a,
6
- t=t.a;if(e!==t){if(e>t||"undefined"==typeof e)return 1;if(e<t||"undefined"==typeof t)return-1}return n<r?-1:1}function l(e,t,n){function i(){var a=arguments,f=o?this:t;return s||(e=t[u]),n.length&&(a=a.length?n.concat(g(a)):n),this instanceof i?(m.prototype=e.prototype,f=new m,m.prototype=r,a=e.apply(f,a),k(a)?a:f):e.apply(f,a)}var s=C(e),o=!n,u=t;return o&&(n=t),s||(t=e),i}function c(e,t){return e?"function"!=typeof e?function(t){return t[e]}:"undefined"!=typeof t?function(n,r,i){return e.call(t
7
- ,n,r,i)}:e:K}function h(){for(var e={b:"",c:"",e:Kt,f:Jt,g:"",h:Yt,i:en,j:bt,k:"",l:n},t,r=0;t=arguments[r];r++)for(var i in t)e[i]=t[i];t=e.a,e.d=/^[^,]+/.exec(t)[0],r="var i,l="+e.d+",t="+e.d+";if(!"+e.d+")return t;"+e.k+";",e.b?(r+="var m=l.length;i=-1;if(typeof m=='number'){",e.i&&(r+="if(k(l)){l=l.split('')}"),r+="while(++i<m){"+e.b+"}}else {"):e.h&&(r+="var m=l.length;i=-1;if(m&&j(l)){while(++i<m){i+='';"+e.g+"}}else {"),e.e||(r+="var u=typeof l=='function'&&s.call(l,'prototype');");if(e.f&&
8
- e.l)r+="var q=-1,r=p[typeof l]?n(l):[],m=r.length;while(++q<m){i=r[q];",e.e||(r+="if(!(u&&i=='prototype')){"),r+=e.g+"",e.e||(r+="}");else{r+="for(i in l){";if(!e.e||e.l)r+="if(",e.e||(r+="!(u&&i=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="h.call(l,i)"),r+="){";r+=e.g+";";if(!e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=l.constructor;";for(i=0;7>i;i++)r+="i='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return t"
9
- ,o("e,h,j,k,p,n,s","return function("+t+"){"+r+"}")(c,Tt,b,A,on,_t,Ct)}function p(e){return"\\"+un[e]}function d(e){return dn[e]}function v(e){return"function"!=typeof e.toString&&"string"==typeof (e+"")}function m(){}function g(e,t,n){t||(t=0),"undefined"==typeof n&&(n=e?e.length:0);for(var r=-1,n=n-t||0,i=Array(0>n?0:n);++r<n;)i[r]=e[t+r];return i}function y(e){return vn[e]}function b(e){return kt.call(e)==Bt}function w(e){var t=i;if(!e||"object"!=typeof e||b(e))return t;var n=e.constructor;return!
10
- C(n)&&(!tn||!v(e))||n instanceof n?Qt?(hn(e,function(e,n,r){return t=!Tt.call(r,n),i}),t===i):(hn(e,function(e,n){t=n}),t===i||Tt.call(e,t)):t}function E(e){var t=[];return pn(e,function(e,n){t.push(n)}),t}function S(e,t,n,s,o){if(e==r)return e;n&&(t=i);if(n=k(e)){var u=kt.call(e);if(!rn[u]||tn&&v(e))return e;var a=gn(e)}if(!n||!t)return n?a?g(e):cn({},e):e;n=sn[u];switch(u){case Ft:case It:return new n(+e);case qt:case zt:return new n(e);case Ut:return n(e.source,ct.exec(e))}s||(s=[]),o||(o=[]);
11
- for(u=s.length;u--;)if(s[u]==e)return o[u];var f=a?n(e.length):{};return s.push(e),o.push(f),(a?wn:pn)(e,function(e,n){f[n]=S(e,t,r,s,o)}),a&&(Tt.call(e,"index")&&(f.index=e.index),Tt.call(e,"input")&&(f.input=e.input)),f}function x(e){var t=[];return hn(e,function(e,n){C(e)&&t.push(n)}),t.sort()}function T(e){var t={};return pn(e,function(e,n){t[e]=n}),t}function N(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=kt.call(e),a=kt.call(t);u==Bt&&(u=Rt),a==Bt&&(a=Rt);if(u!=
12
- a)return i;switch(u){case Ft:case It:return+e==+t;case qt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Ut:case zt:return e==t+""}a=u==jt;if(!a){if(e.__wrapped__||t.__wrapped__)return N(e.__wrapped__||e,t.__wrapped__||t);if(u!=Rt||tn&&(v(e)||v(t)))return i;var u=Zt&&b(e)?Object:e.constructor,f=Zt&&b(t)?Object:t.constructor;if(u!=f&&(!C(u)||!(u instanceof u&&C(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var l=n,c=0;s.push(e),o.push(t);if(a){c=e.length
13
- ;if(l=c==t.length)for(;c--&&(l=N(e[c],t[c],s,o)););return l}return hn(e,function(e,n,r){if(Tt.call(r,n))return c++,l=Tt.call(t,n)&&N(e,t[n],s,o)}),l&&hn(t,function(e,t,n){if(Tt.call(n,t))return l=-1<--c}),l}function C(e){return"function"==typeof e}function k(e){return e?on[typeof e]:i}function L(e){return"number"==typeof e||kt.call(e)==qt}function A(e){return"string"==typeof e||kt.call(e)==zt}function O(e,t,n){var i=arguments,s=0,o=2,u=i[3],a=i[4];n!==rt&&(u=[],a=[],"number"!=typeof n&&(o=i.length
14
- ));for(;++s<o;)pn(i[s],function(t,n){var i,s,o;if(t&&((s=gn(t))||yn(t))){for(var f=u.length;f--;)if(i=u[f]==t)break;i?e[n]=a[f]:(u.push(t),a.push(o=(o=e[n],s)?gn(o)?o:[]:yn(o)?o:{}),e[n]=O(o,t,rt,u,a))}else t!=r&&(e[n]=t)});return e}function M(e){var t=[];return pn(e,function(e){t.push(e)}),t}function _(e,t,n){var r=-1,s=e?e.length:0,o=i,n=(0>n?Dt(0,s+n):n)||0;return"number"==typeof s?o=-1<(A(e)?e.indexOf(t,n):W(e,t,n)):wn(e,function(e){if(++r>=n)return!(o=e===t)}),o}function D(e,t,r){var i=n,t=c
15
- (t,r);if(gn(e))for(var r=-1,s=e.length;++r<s&&(i=!!t(e[r],r,e)););else wn(e,function(e,n,r){return i=!!t(e,n,r)});return i}function P(e,t,n){var r=[],t=c(t,n);if(gn(e))for(var n=-1,i=e.length;++n<i;){var s=e[n];t(s,n,e)&&r.push(s)}else wn(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function H(e,t,n){var r,t=c(t,n);return wn(e,function(e,n,s){if(t(e,n,s))return r=e,i}),r}function B(e,t,n){var r=-1,i=e?e.length:0,s=Array("number"==typeof i?i:0),t=c(t,n);if(gn(e))for(;++r<i;)s[r]=t(e[r],r,e);else wn
16
- (e,function(e,n,i){s[++r]=t(e,n,i)});return s}function j(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||!gn(e))t=!t&&A(e)?a:c(t,n),wn(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,o=e)});else for(;++i<s;)e[i]>o&&(o=e[i]);return o}function F(e,t){return B(e,t+"")}function I(e,t,n,r){var s=3>arguments.length;return t||(t=K),wn(e,function(e,o,u){n=s?(s=i,e):t.call(r,n,e,o,u)}),n}function q(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=bn(e),o=a.length;else en&&A(e)&&
17
- (s=e.split(""));return t||(t=K),wn(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 R(e,t,n){var r,t=c(t,n);if(gn(e))for(var n=-1,i=e.length;++n<i&&!(r=t(e[n],n,e)););else wn(e,function(e,n,i){return!(r=t(e,n,i))});return!!r}function U(e,t,n){if(e){var i=e.length;return t==r||n?e[0]:g(e,0,Pt(Dt(0,t),i))}}function z(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];gn(s)?Nt.apply(i,t?s:z(s)):i.push(s)}return i}function W(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof
18
- n)r=(0>n?Dt(0,i+n):n||0)-1;else if(n)return r=V(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function X(e,t,n){return g(e,t==r||n?1:Dt(0,t))}function V(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?c(n,r):K,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function $(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=u;"function"==typeof t&&(r=n,n=t,t=i);var f=!t&&74<o;if(f)var l={};n&&(a=[],n=c(n,r));for(;++s<o;){var r=e[s],h=n?n(r,s,e):r;f&&(a=Tt.call(l,h+"")?l[h]:l[h]=[]);if(t?!s||a[a.length-1
19
- ]!==h:0>W(a,h))(n||f)&&a.push(h),u.push(r)}return u}function J(e,t){return $t||Lt&&2<arguments.length?Lt.call.apply(Lt,arguments):l(e,t,g(arguments,2))}function K(e){return e}function Q(e){wn(x(e),function(t){var n=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return Nt.apply(e,arguments),e=n.apply(s,e),new s(e)}})}function G(){return this.__wrapped__}var n=!0,r=null,i=!1,Y="object"==typeof exports&&exports,Z="object"==typeof global&&global;Z.global===Z&&(e=Z);var et=[],tt=new function(
20
- ){},nt=0,rt=tt,it=30,st=e._,ot=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,ut=/&(?:amp|lt|gt|quot|#x27);/g,at=/\b__p\+='';/g,ft=/\b(__p\+=)''\+/g,lt=/(__e\(.*?\)|\b__t\))\+'';/g,ct=/\w*$/,ht=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,pt=RegExp("^"+(tt.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),dt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,vt=/<%=([\s\S]+?)%>/g,mt=/($^)/,gt=/[&<>"']/g,yt=/['\n\r\t\u2028\u2029\\]/g,bt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf"
21
- .split(" "),wt=Math.ceil,Et=et.concat,St=Math.floor,xt=pt.test(xt=Object.getPrototypeOf)&&xt,Tt=tt.hasOwnProperty,Nt=et.push,Ct=tt.propertyIsEnumerable,kt=tt.toString,Lt=pt.test(Lt=g.bind)&&Lt,At=pt.test(At=Array.isArray)&&At,Ot=e.isFinite,Mt=e.isNaN,_t=pt.test(_t=Object.keys)&&_t,Dt=Math.max,Pt=Math.min,Ht=Math.random,Bt="[object Arguments]",jt="[object Array]",Ft="[object Boolean]",It="[object Date]",qt="[object Number]",Rt="[object Object]",Ut="[object RegExp]",zt="[object String]",Wt=!/1/.test
22
- (Function("1")),Xt=!!e.attachEvent,Vt=Lt&&!/\n|true/.test(Lt+Xt),$t=Lt&&!Vt,Jt=_t&&(Xt||Vt),Kt,Qt,Gt=(Gt={0:1,length:1},et.splice.call(Gt,0,1),Gt[0]),Yt=n;(function(){function e(){this.x=1}var t=[];e.prototype={valueOf:1,y:1};for(var n in new e)t.push(n);for(n in arguments)Yt=!n;Kt=!/valueOf/.test(t),Qt="x"!=t[0]})(1);var Zt=!b(arguments),en="xx"!="x"[0]+Object("x")[0];try{var tn=("[object Object]",kt.call(document)==Rt)}catch(nn){}var rn={"[object Function]":i};rn[Bt]=rn[jt]=rn[Ft]=rn[It]=rn[qt]=
23
- rn[Rt]=rn[Ut]=rn[zt]=n;var sn={};sn[jt]=Array,sn[Ft]=Boolean,sn[It]=Date,sn[Rt]=Object,sn[qt]=Number,sn[Ut]=RegExp,sn[zt]=String;var on={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},un={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:vt,variable:""};if(Xt||Vt||!Wt)o=Function;var an={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){"
24
- ,g:"t[i]=l[i]",c:"}}"},fn={a:"d,c,w",k:"c=c&&typeof w=='undefined'?c:e(c,w)",b:"if(c(l[i],i,d)===false)return t",g:"if(c(l[i],i,d)===false)return t"},ln={b:r},cn=h(an);Zt&&(b=function(e){return e?Tt.call(e,"callee"):i});var hn=h(fn,ln,{l:i}),pn=h(fn,ln),dn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},vn=T(dn),mn=h(an,{g:"if(t[i]==null)"+an.g}),gn=At||function(e){return kt.call(e)==jt};C(/x/)&&(C=function(e){return"[object Function]"==kt.call(e)});var yn=xt?function(e){if(!e||"object"!=typeof
25
- e)return i;var t=e.valueOf,n="function"==typeof t&&(n=xt(t))&&xt(n);return n?e==n||xt(e)==n&&!b(e):w(e)}:w,bn=_t?function(e){return"function"==typeof e&&Ct.call(e,"prototype")?E(e):k(e)?_t(e):[]}:E,wn=h(fn);s.assign=cn,s.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=x(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=J(e[i],e)}return e},s.chain=function(e){return new s(e)},s.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},s.countBy=function(e,t,n
26
- ){var r={},t=c(t,n);return wn(e,function(e,n,i){n=t(e,n,i),Tt.call(r,n)?r[n]++:r[n]=1}),r},s.defaults=mn,s.difference=function(e){for(var t=-1,n=e?e.length:0,r=Et.apply(et,arguments),r=u(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.filter=P,s.flatten=z,s.forEach=wn,s.forIn=hn,s.forOwn=pn,s.functions=x,s.groupBy=function(e,t,n){var r={},t=c(t,n);return wn(e,function(e,n,i){n=t(e,n,i),(Tt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},s.initial=function(e,t,n){if(!e)return[];var i=e.length;return g
27
- (e,0,Pt(Dt(0,i-(t==r||n?1:t||0)),i))},s.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return wn(e,function(e){if(0>W(i,e)){for(var s=n;--s;)if(!(r[s]||(r[s]=u(t[s])))(e))return;i.push(e)}}),i},s.invert=T,s.invoke=function(e,t){var n=g(arguments,2),r="function"==typeof t,i=[];return wn(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.keys=bn,s.map=B,s.max=j,s.merge=O,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!gn(e))t=!t&&A(e)?a:c(t,n),wn(e,function(e,n,i)
28
- {n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},s.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},s.omit=function(e,t,n){var r="function"==typeof t,i={};if(r)t=c(t,n);else var s=Et.apply(et,arguments);return hn(e,function(e,n,o){if(r?!t(e,n,o):0>W(s,n,1))i[n]=e}),i},s.pairs=function(e){var t=[];return pn(e,function(e,n){t.push([n,e])}),t},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=Et.apply
29
- (et,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=c(t,n),hn(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=F,s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=Dt(0,wt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reject=function(e,t,n){return t=c(t,n),P(e,function(e,n,r){return!t(e,n,r)})},s.rest=X,s.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return wn(e,function(e){var r=St(Ht()*(++t+1));n[t]=n[r],n[r]=e}),n},s.sortBy=function(e,
30
- t,n){var r=[],t=c(t,n);wn(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(f);e--;)r[e]=r[e].c;return r},s.tap=function(e,t){return t(e),e},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){return"number"==typeof (e?e.length:0)?en&&A(e)?e.split(""):g(e):M(e)},s.union=function(){return $(Et.apply(et,arguments))},s.uniq=$,s.values=M,s.where=function(e,t){var n=bn(t);return P(e,function(e){for(var r=n.length;r--;){var i=
31
- e[n[r]]===t[n[r]];if(!i)break}return!!i})},s.without=function(e){for(var t=-1,n=e?e.length:0,r=u(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.zip=function(e){for(var t=-1,n=e?j(F(arguments,"length")):0,r=Array(n);++t<n;)r[t]=F(arguments,t);return r},s.collect=B,s.drop=X,s.each=wn,s.extend=cn,s.methods=x,s.select=P,s.tail=X,s.unique=$,Q(s),s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=J,s.bindKey=function(e,t){return l(e,t,g
32
- (arguments,2))},s.clone=S,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=_,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,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},s.defer=function(e){var n=g(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},s.delay=function(e,n){var r=g(arguments,2);return setTimeout
33
- (function(){e.apply(t,r)},n)},s.escape=function(e){return e==r?"":(e+"").replace(gt,d)},s.every=D,s.find=H,s.has=function(e,t){return e?Tt.call(e,t):i},s.identity=K,s.indexOf=W,s.isArguments=b,s.isArray=gn,s.isBoolean=function(e){return e===n||e===i||kt.call(e)==Ft},s.isDate=function(e){return kt.call(e)==It},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=kt.call(e),s=e.length;return r==jt||r==zt||r==Bt||Zt&&b(e)||r==Rt&&"number"==typeof s&&C
34
- (e.splice)?!s:(pn(e,function(){return t=i}),t)},s.isEqual=N,s.isFinite=function(e){return Ot(e)&&!Mt(parseFloat(e))},s.isFunction=C,s.isNaN=function(e){return L(e)&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=L,s.isObject=k,s.isPlainObject=yn,s.isRegExp=function(e){return kt.call(e)==Ut},s.isString=A,s.isUndefined=function(e){return"undefined"==typeof e},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?Dt(0,r+n):Pt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1
35
- },s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Tt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.mixin=Q,s.noConflict=function(){return e._=st,this},s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.partial=function(e){return l(e,g(arguments,1))},s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+St(Ht()*((+t||0)-e+1))},s.reduce=I,s.reduceRight=q,s.result=function(e,
36
- t){var n=e?e[t]:r;return C(n)?e[t]():n},s.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:bn(e).length},s.some=R,s.sortedIndex=V,s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,u=s.templateSettings,a=0,f=n.interpolate||u.interpolate||mt,l="__p+='",c=n.variable||u.variable,h=c;e.replace(RegExp((n.escape||u.escape||mt).source+"|"+f.source+"|"+(f===vt?dt:mt).source+"|"+(n.evaluate||u.evaluate||mt).source+"|$","g"),function(t,n,i,s,o,u){return i||(i=s),l+=e.slice(a,u).replace(yt
37
- ,p),n&&(l+="'+__e("+n+")+'"),o&&(l+="';"+o+";__p+='"),i&&(l+="'+((__t=("+i+"))==null?'':__t)+'"),r||(r=o||ot.test(n||i)),a=u+t.length,t}),l+="';\n",h||(c="obj",r?l="with("+c+"){"+l+"}":(n=RegExp("(\\(\\s*)"+c+"\\."+c+"\\b","g"),l=l.replace(ht,"$&"+c+".").replace(n,"$1__d"))),l=(r?l.replace(at,""):l).replace(ft,"$1").replace(lt,"$1;"),l="function("+c+"){"+(h?"":c+"||("+c+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(h?"":",__d="+
38
- c+"."+c+"||"+c)+";")+l+"return __p}";try{i=o("_","return "+l)(s)}catch(d){throw d.source=l,d}return t?i(t):(i.source=l,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 f=new Date,l=t-(f-a);return i=arguments,o=this,0>=l?(clearTimeout(u),u=r,a=f,s=e.apply(o,i)):u||(u=setTimeout(n,l)),s}},s.unescape=function(e){return e==r?"":(e+"").replace(ut,y)},s.uniqueId=function(e){return(e==r?"":e+"")+ ++nt},s.wrap=function(e,t){return function(){var n=
39
- [e];return Nt.apply(n,arguments),t.apply(this,n)}},s.all=D,s.any=R,s.detect=H,s.foldl=I,s.foldr=q,s.include=_,s.inject=I,pn(s,function(e,t){s.prototype[t]||(s.prototype[t]=function(){var t=[this.__wrapped__];return Nt.apply(t,arguments),e.apply(s,t)})}),s.first=U,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:g(e,Dt(0,i-t))}},s.take=U,s.head=U,pn(s,function(e,t){s.prototype[t]||(s.prototype[t]=function(t,n){var i=e(this.__wrapped__,t,n);return t==r||n?i:new s(i)})}),s.VERSION="1.0.0-rc.2"
40
- ,s.prototype.chain=function(){return this},s.prototype.toString=function(){return""+this.__wrapped__},s.prototype.value=G,s.prototype.valueOf=G,wn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=et[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Gt&&e.length===0&&delete e[0],this}}),wn(["concat","join","slice"],function(e){var t=et[e];s.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return new s(e)}}),typeof define=="function"&&typeof
41
- define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):Y?"object"==typeof module&&module&&module.exports==Y?(module.exports=s)._=s:Y._=s:e._=s})(this);
5
+ ;(function(e,t){function n(e){if(e&&typeof e=="object"&&e.__wrapped__)return e;if(!(this instanceof n))return new n(e);this.__wrapped__=e}function r(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||tt);if(i)for(var s={},n=t-1;++n<r;){var o=e[n]+"";(Et.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+"";return Et.call(s,r)&&-1<R(s[r],n)}return-1<R(e,n,t)}}function i(e){return e.charCodeAt(0)}function s(e,t){var n=e.b,r=t.b,e=e.a,t=t.a;if(e!==t){if(e>t||typeof e=="undefined")return 1;if(
6
+ e<t||typeof t=="undefined")return-1}return n<r?-1:1}function o(e,t,n){function r(){var u=arguments,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(p(u)):n),this instanceof r?(h.prototype=e.prototype,a=new h,h.prototype=null,u=e.apply(a,u),x(u)?u:a):e.apply(a,u)}var i=S(e),s=!n,o=t;return s&&(n=t),i||(t=e),r}function u(e,t,n){return e?typeof e!="function"?function(t){return t[e]}:typeof t!="undefined"?n?function(n,r,i,s){return e.call(t,n,r,i,s)}:function(n,r,i){return e.call(t,n,r,i)
7
+ }:e:V}function a(){for(var e={b:"",c:"",e:Xt,f:Wt,g:"",h:Jt,i:Gt,j:mt,k:"",l:!0},t,n=0;t=arguments[n];n++)for(var r in t)e[r]=t[r];t=e.a,e.d=/^[^,]+/.exec(t)[0],n=Function,r="var i,l="+e.d+",t="+e.d+";if(!"+e.d+")return t;"+e.k+";",e.b?(r+="var m=l.length;i=-1;if(typeof m=='number'){",e.i&&(r+="if(k(l)){l=l.split('')}"),r+="while(++i<m){"+e.b+"}}else {"):e.h&&(r+="var m=l.length;i=-1;if(m&&j(l)){while(++i<m){i+='';"+e.g+"}}else {"),e.e||(r+="var u=typeof l=='function'&&s.call(l,'prototype');");if(
8
+ e.f&&e.l)r+="var q=-1,r=p[typeof l]?n(l):[],m=r.length;while(++q<m){i=r[q];",e.e||(r+="if(!(u&&i=='prototype')){"),r+=e.g+"",e.e||(r+="}");else{r+="for(i in l){";if(!e.e||e.l)r+="if(",e.e||(r+="!(u&&i=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="h.call(l,i)"),r+="){";r+=e.g+";";if(!e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=l.constructor;";for(var i=0;7>i;i++)r+="i='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return t"
9
+ ,n("e,h,j,k,p,n,s","return function("+t+"){"+r+"}")(u,Et,v,N,nn,At,xt)}function f(e){return"\\"+rn[e]}function l(e){return hn[e]}function c(e){return typeof e.toString!="function"&&typeof (e+"")=="string"}function h(){}function p(e,t,n){t||(t=0),typeof n=="undefined"&&(n=e?e.length:0);for(var r=-1,n=n-t||0,i=Array(0>n?0:n);++r<n;)i[r]=e[t+r];return i}function d(e){return pn[e]}function v(e){return Tt.call(e)==Dt}function m(e){var t=!1;if(!e||typeof e!="object"||v(e))return t;var n=e.constructor;return!
10
+ S(n)&&(!Yt||!c(e))||n instanceof n?Vt?(ln(e,function(e,n,r){return t=!Et.call(r,n),!1}),!1===t):(ln(e,function(e,n){t=n}),!1===t||Et.call(e,t)):t}function g(e){var t=[];return cn(e,function(e,n){t.push(n)}),t}function y(e,t,n,r,i){if(null==e)return e;n&&(t=!1);if(n=x(e)){var s=Tt.call(e);if(!en[s]||Yt&&c(e))return e;var o=vn(e)}if(!n||!t)return n?o?p(e):fn({},e):e;n=tn[s];switch(s){case Ht:case Bt:return new n(+e);case jt:case qt:return new n(e);case It:return n(e.source,at.exec(e))}r||(r=[]),i||
11
+ (i=[]);for(s=r.length;s--;)if(r[s]==e)return i[s];var u=o?n(e.length):{};return r.push(e),i.push(u),(o?_:cn)(e,function(e,n){u[n]=y(e,t,null,r,i)}),o&&(Et.call(e,"index")&&(u.index=e.index),Et.call(e,"input")&&(u.input=e.input)),u}function b(e){var t=[];return ln(e,function(e,n){S(e)&&t.push(n)}),t.sort()}function w(e){var t={};return cn(e,function(e,n){t[e]=n}),t}function E(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;var i=Tt.call(e),s=Tt.call(t);i==Dt&&(i=Ft),s==Dt&&
12
+ (s=Ft);if(i!=s)return!1;switch(i){case Ht:case Bt:return+e==+t;case jt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case It:case qt:return e==t+""}s=i==Pt;if(!s){if(e.__wrapped__||t.__wrapped__)return E(e.__wrapped__||e,t.__wrapped__||t);if(i!=Ft||Yt&&(c(e)||c(t)))return!1;var i=!Kt&&v(e)?Object:e.constructor,o=!Kt&&v(t)?Object:t.constructor;if(i!=o&&(!S(i)||!(i instanceof i&&S(o)&&o instanceof o)))return!1}n||(n=[]),r||(r=[]);for(i=n.length;i--;)if(n[i]==e)return r[i]==t;var u=!0,a=0;n.push(e),r.push(
13
+ t);if(s){a=e.length;if(u=a==t.length)for(;a--&&(u=E(e[a],t[a],n,r)););return u}return ln(e,function(e,i,s){if(Et.call(s,i))return a++,u=Et.call(t,i)&&E(e,t[i],n,r)}),u&&ln(t,function(e,t,n){if(Et.call(n,t))return u=-1<--a}),u}function S(e){return typeof e=="function"}function x(e){return e?nn[typeof e]:!1}function T(e){return typeof e=="number"||Tt.call(e)==jt}function N(e){return typeof e=="string"||Tt.call(e)==qt}function C(e,t,n){var r=arguments,i=0,s=2,o=r[3],u=r[4];n!==et&&(o=[],u=[],typeof
14
+ n!="number"&&(s=r.length));for(;++i<s;)cn(r[i],function(t,n){var r,i,s;if(t&&((i=vn(t))||mn(t))){for(var a=o.length;a--;)if(r=o[a]==t)break;r?e[n]=u[a]:(o.push(t),u.push(s=(s=e[n],i)?vn(s)?s:[]:mn(s)?s:{}),e[n]=C(s,t,et,o,u))}else t!=null&&(e[n]=t)});return e}function k(e){var t=[];return cn(e,function(e){t.push(e)}),t}function L(e,t,n){var r=-1,i=e?e.length:0,s=!1,n=(0>n?Ot(0,i+n):n)||0;return typeof i=="number"?s=-1<(N(e)?e.indexOf(t,n):R(e,t,n)):an(e,function(e){if(++r>=n)return!(s=e===t)}),s}
15
+ function A(e,t,n){var r=!0,t=u(t,n);if(vn(e))for(var n=-1,i=e.length;++n<i&&(r=!!t(e[n],n,e)););else an(e,function(e,n,i){return r=!!t(e,n,i)});return r}function O(e,t,n){var r=[],t=u(t,n);if(vn(e))for(var n=-1,i=e.length;++n<i;){var s=e[n];t(s,n,e)&&r.push(s)}else an(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function M(e,t,n){var r,t=u(t,n);return _(e,function(e,n,i){if(t(e,n,i))return r=e,!1}),r}function _(e,t,n){if(t&&typeof n=="undefined"&&vn(e))for(var n=-1,r=e.length;++n<r&&!1!==t(e[
16
+ n],n,e););else an(e,t,n);return e}function D(e,t,n){var r=-1,i=e?e.length:0,s=Array(typeof i=="number"?i:0),t=u(t,n);if(vn(e))for(;++r<i;)s[r]=t(e[r],r,e);else an(e,function(e,n,i){s[++r]=t(e,n,i)});return s}function P(e,t,n){var r=-Infinity,s=-1,o=e?e.length:0,a=r;if(t||!vn(e))t=!t&&N(e)?i:u(t,n),an(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,a=e)});else for(;++s<o;)e[s]>a&&(a=e[s]);return a}function H(e,t){return D(e,t+"")}function B(e,t,n,r){var i=3>arguments.length,t=u(t,r,et);if(vn(e)){var s=-1,o=
17
+ e.length;for(i&&(n=e[++s]);++s<o;)n=t(n,e[s],s,e)}else an(e,function(e,r,s){n=i?(i=!1,e):t(n,e,r,s)});return n}function j(e,t,n,r){var i=e,s=e?e.length:0,o=3>arguments.length;if(typeof s!="number")var a=gn(e),s=a.length;else Gt&&N(e)&&(i=e.split(""));return t=u(t,r,et),_(e,function(e,r,u){r=a?a[--s]:--s,n=o?(o=!1,i[r]):t(n,i[r],r,u)}),n}function F(e,t,n){var r,t=u(t,n);if(vn(e))for(var n=-1,i=e.length;++n<i&&!(r=t(e[n],n,e)););else an(e,function(e,n,i){return!(r=t(e,n,i))});return!!r}function I(e
18
+ ,t,n){if(e){var r=e.length;return null==t||n?e[0]:p(e,0,Mt(Ot(0,t),r))}}function q(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];vn(s)?St.apply(i,t?s:q(s)):i.push(s)}return i}function R(e,t,n){var r=-1,i=e?e.length:0;if(typeof n=="number")r=(0>n?Ot(0,i+n):n||0)-1;else if(n)return r=z(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function U(e,t,n){return p(e,null==t||n?1:Ot(0,t))}function z(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?u(n,r):V,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=
19
+ r+1:s=r;return i}function W(e,t,n,r){var i=-1,s=e?e.length:0,o=[],a=o;typeof t=="function"&&(r=n,n=t,t=!1);var f=!t&&75<=s;if(f)var l={};n&&(a=[],n=u(n,r));for(;++i<s;){var r=e[i],c=n?n(r,i,e):r;if(f)var h=c+"",h=Et.call(l,h)?!(a=l[h]):a=l[h]=[];if(t?!i||a[a.length-1]!==c:h||0>R(a,c))(n||f)&&a.push(c),o.push(r)}return o}function X(e,t){return zt||Nt&&2<arguments.length?Nt.call.apply(Nt,arguments):o(e,t,p(arguments,2))}function V(e){return e}function $(e){_(b(e),function(t){var r=n[t]=e[t];n.prototype
20
+ [t]=function(){var e=[this.__wrapped__];return St.apply(e,arguments),e=r.apply(n,e),new n(e)}})}function J(){return this.__wrapped__}var K=typeof exports=="object"&&exports,Q=typeof global=="object"&&global;Q.global===Q&&(e=Q);var G=[],Y=new function(){},Z=0,et=Y,tt=30,nt=e._,rt=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,it=/&(?:amp|lt|gt|quot|#x27);/g,st=/\b__p\+='';/g,ot=/\b(__p\+=)''\+/g,ut=/(__e\(.*?\)|\b__t\))\+'';/g,at=/\w*$/,ft=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g
21
+ ,lt=RegExp("^"+(Y.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),ct=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,ht=/<%=([\s\S]+?)%>/g,pt=/($^)/,dt=/[&<>"']/g,vt=/['\n\r\t\u2028\u2029\\]/g,mt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),gt=Math.ceil,yt=G.concat,bt=Math.floor,wt=lt.test(wt=Object.getPrototypeOf)&&wt,Et=Y.hasOwnProperty,St=G.push,xt=Y.propertyIsEnumerable,Tt=Y.toString,Nt=lt.test(Nt=
22
+ p.bind)&&Nt,Ct=lt.test(Ct=Array.isArray)&&Ct,kt=e.isFinite,Lt=e.isNaN,At=lt.test(At=Object.keys)&&At,Ot=Math.max,Mt=Math.min,_t=Math.random,Dt="[object Arguments]",Pt="[object Array]",Ht="[object Boolean]",Bt="[object Date]",jt="[object Number]",Ft="[object Object]",It="[object RegExp]",qt="[object String]",Rt=!!e.attachEvent,Ut=Nt&&!/\n|true/.test(Nt+Rt),zt=Nt&&!Ut,Wt=At&&(Rt||Ut),Xt,Vt,$t=($t={0:1,length:1},G.splice.call($t,0,1),$t[0]),Jt=!0;(function(){function e(){this.x=1}var t=[];e.prototype=
23
+ {valueOf:1,y:1};for(var n in new e)t.push(n);for(n in arguments)Jt=!n;Xt=!/valueOf/.test(t),Vt="x"!=t[0]})(1);var Kt=arguments.constructor==Object,Qt=!v(arguments),Gt="xx"!="x"[0]+Object("x")[0];try{var Yt=("[object Object]",Tt.call(document)==Ft)}catch(Zt){}var en={"[object Function]":!1};en[Dt]=en[Pt]=en[Ht]=en[Bt]=en[jt]=en[Ft]=en[It]=en[qt]=!0;var tn={};tn[Pt]=Array,tn[Ht]=Boolean,tn[Bt]=Date,tn[Ft]=Object,tn[jt]=Number,tn[It]=RegExp,tn[qt]=String;var nn={"boolean":!1,"function":!0,object:!0,
24
+ number:!1,string:!1,"undefined":!1},rn={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};n.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:ht,variable:""};var sn={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){",g:"t[i]=l[i]",c:"}}"},on={a:"d,c,w",k:"c=c&&typeof w=='undefined'?c:e(c,w)",b:"if(c(l[i],i,d)===false)return t",g:"if(c(l[i],i,d)===false)return t"},un={b:null},an=a(on),fn=a(sn
25
+ );Qt&&(v=function(e){return e?Et.call(e,"callee"):!1});var ln=a(on,un,{l:!1}),cn=a(on,un),hn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},pn=w(hn),dn=a(sn,{g:"if(t[i]==null)"+sn.g}),vn=Ct||function(e){return Kt&&e instanceof Array||Tt.call(e)==Pt};S(/x/)&&(S=function(e){return e instanceof Function||"[object Function]"==Tt.call(e)});var mn=wt?function(e){if(!e||typeof e!="object")return!1;var t=e.valueOf,n=typeof t=="function"&&(n=wt(t))&&wt(n);return n?e==n||wt(e)==n&&!v(e):m(e)
26
+ }:m,gn=At?function(e){return typeof e=="function"&&xt.call(e,"prototype")?g(e):x(e)?At(e):[]}:g;n.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},n.assign=fn,n.bind=X,n.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=b(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=X(e[i],e)}return e},n.bindKey=function(e,t){return o(e,t,p(arguments,2))},n.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},n.compose=function(
27
+ ){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},n.countBy=function(e,t,n){var r={},t=u(t,n);return _(e,function(e,n,i){n=t(e,n,i),Et.call(r,n)?r[n]++:r[n]=1}),r},n.debounce=function(e,t,n){function r(){u=null,n||(s=e.apply(o,i))}var i,s,o,u;return function(){var a=n&&!u;return i=arguments,o=this,clearTimeout(u),u=setTimeout(r,t),a&&(s=e.apply(o,i)),s}},n.defaults=dn,n.defer=function(e){var n=p(arguments,1);return setTimeout(function(){e
28
+ .apply(t,n)},1)},n.delay=function(e,n){var r=p(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},n.difference=function(e){for(var t=-1,n=e?e.length:0,i=yt.apply(G,arguments),i=r(i,n),s=[];++t<n;){var o=e[t];i(o)||s.push(o)}return s},n.filter=O,n.flatten=q,n.forEach=_,n.forIn=ln,n.forOwn=cn,n.functions=b,n.groupBy=function(e,t,n){var r={},t=u(t,n);return _(e,function(e,n,i){n=t(e,n,i),(Et.call(r,n)?r[n]:r[n]=[]).push(e)}),r},n.initial=function(e,t,n){if(!e)return[];var r=e.length;return p
29
+ (e,0,Mt(Ot(0,r-(null==t||n?1:t||0)),r))},n.intersection=function(e){var t=arguments,n=t.length,i={0:{}},s=-1,o=e?e.length:0,u=100<=o,a=[],f=a;e:for(;++s<o;){var l=e[s];if(u)var c=l+"",c=Et.call(i[0],c)?!(f=i[0][c]):f=i[0][c]=[];if(c||0>R(f,l)){u&&f.push(l);for(var h=n;--h;)if(!(i[h]||(i[h]=r(t[h],0,100)))(l))continue e;a.push(l)}}return a},n.invert=w,n.invoke=function(e,t){var n=p(arguments,2),r=typeof t=="function",i=[];return _(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},n.keys=gn,n.map=D,
30
+ n.max=P,n.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Et.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},n.merge=C,n.min=function(e,t,n){var r=Infinity,s=-1,o=e?e.length:0,a=r;if(t||!vn(e))t=!t&&N(e)?i:u(t,n),an(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,a=e)});else for(;++s<o;)e[s]<a&&(a=e[s]);return a},n.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},n.omit=function(e,t,n){var r=typeof
31
+ t=="function",i={};if(r)t=u(t,n);else var s=yt.apply(G,arguments);return ln(e,function(e,n,o){if(r?!t(e,n,o):0>R(s,n,1))i[n]=e}),i},n.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},n.pairs=function(e){var t=[];return cn(e,function(e,n){t.push([n,e])}),t},n.partial=function(e){return o(e,p(arguments,1))},n.pick=function(e,t,n){var r={};if(typeof t!="function")for(var i=0,s=yt.apply(G,arguments),o=s.length;++i<o;){var a=s[i];a in e&&(r[a]=e[a])}
32
+ else t=u(t,n),ln(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},n.pluck=H,n.range=function(e,t,n){e=+e||0,n=+n||1,null==t&&(t=e,e=0);for(var r=-1,t=Ot(0,gt((t-e)/n)),i=Array(t);++r<t;)i[r]=e,e+=n;return i},n.reject=function(e,t,n){return t=u(t,n),O(e,function(e,n,r){return!t(e,n,r)})},n.rest=U,n.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return _(e,function(e){var r=bt(_t()*(++t+1));n[t]=n[r],n[r]=e}),n},n.sortBy=function(e,t,n){var r=[],t=u(t,n);_(e,function(e,n,i){r.push({a:t(e,n,i),b
33
+ :n,c:e})}),e=r.length;for(r.sort(s);e--;)r[e]=r[e].c;return r},n.tap=function(e,t){return t(e),e},n.throttle=function(e,t){function n(){u=new Date,o=null,i=e.apply(s,r)}var r,i,s,o,u=0;return function(){var a=new Date,f=t-(a-u);return r=arguments,s=this,0>=f?(clearTimeout(o),o=null,u=a,i=e.apply(s,r)):o||(o=setTimeout(n,f)),i}},n.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},n.toArray=function(e){return typeof (e?e.length:0)=="number"?Gt&&N(e)?e.split("")
34
+ :p(e):k(e)},n.union=function(){return W(yt.apply(G,arguments))},n.uniq=W,n.values=k,n.where=function(e,t){var n=gn(t);return O(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},n.without=function(e){for(var t=-1,n=e?e.length:0,i=r(arguments,1,20),s=[];++t<n;){var o=e[t];i(o)||s.push(o)}return s},n.wrap=function(e,t){return function(){var n=[e];return St.apply(n,arguments),t.apply(this,n)}},n.zip=function(e){for(var t=-1,n=e?P(H(arguments,"length")):0,r=Array(
35
+ n);++t<n;)r[t]=H(arguments,t);return r},n.collect=D,n.drop=U,n.each=_,n.extend=fn,n.methods=b,n.select=O,n.tail=U,n.unique=W,$(n),n.clone=y,n.cloneDeep=function(e){return y(e,!0)},n.contains=L,n.escape=function(e){return null==e?"":(e+"").replace(dt,l)},n.every=A,n.find=M,n.has=function(e,t){return e?Et.call(e,t):!1},n.identity=V,n.indexOf=R,n.isArguments=v,n.isArray=vn,n.isBoolean=function(e){return!0===e||!1===e||Tt.call(e)==Ht},n.isDate=function(e){return e instanceof Date||Tt.call(e)==Bt},n.isElement=
36
+ function(e){return e?1===e.nodeType:!1},n.isEmpty=function(e){var t=!0;if(!e)return t;var n=Tt.call(e),r=e.length;return n==Pt||n==qt||n==Dt||Qt&&v(e)||n==Ft&&typeof r=="number"&&S(e.splice)?!r:(cn(e,function(){return t=!1}),t)},n.isEqual=E,n.isFinite=function(e){return kt(e)&&!Lt(parseFloat(e))},n.isFunction=S,n.isNaN=function(e){return T(e)&&e!=+e},n.isNull=function(e){return null===e},n.isNumber=T,n.isObject=x,n.isPlainObject=mn,n.isRegExp=function(e){return e instanceof RegExp||Tt.call(e)==It
37
+ },n.isString=N,n.isUndefined=function(e){return typeof e=="undefined"},n.lastIndexOf=function(e,t,n){var r=e?e.length:0;for(typeof n=="number"&&(r=(0>n?Ot(0,r+n):Mt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},n.mixin=$,n.noConflict=function(){return e._=nt,this},n.random=function(e,t){return null==e&&null==t&&(t=1),e=+e||0,null==t&&(t=e,e=0),e+bt(_t()*((+t||0)-e+1))},n.reduce=B,n.reduceRight=j,n.result=function(e,t){var n=e?e[t]:null;return S(n)?e[t]():n},n.size=function(e){var t=e?e.length:0;
38
+ return typeof t=="number"?t:gn(e).length},n.some=F,n.sortedIndex=z,n.template=function(e,t,r){e||(e=""),r||(r={});var i,s,o=n.templateSettings,u=0,a=r.interpolate||o.interpolate||pt,l="__p+='",c=r.variable||o.variable,h=c;e.replace(RegExp((r.escape||o.escape||pt).source+"|"+a.source+"|"+(a===ht?ct:pt).source+"|"+(r.evaluate||o.evaluate||pt).source+"|$","g"),function(t,n,r,s,o,a){return r||(r=s),l+=e.slice(u,a).replace(vt,f),n&&(l+="'+__e("+n+")+'"),o&&(l+="';"+o+";__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"
39
+ ),i||(i=o||rt.test(n||r)),u=a+t.length,t}),l+="';\n",h||(c="obj",i?l="with("+c+"){"+l+"}":(r=RegExp("(\\(\\s*)"+c+"\\."+c+"\\b","g"),l=l.replace(ft,"$&"+c+".").replace(r,"$1__d"))),l=(i?l.replace(st,""):l).replace(ot,"$1").replace(ut,"$1;"),l="function("+c+"){"+(h?"":c+"||("+c+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(h?"":",__d="+c+"."+c+"||"+c)+";")+l+"return __p}";try{s=Function("_","return "+l)(n)}catch(p){throw p.source=
40
+ l,p}return t?s(t):(s.source=l,s)},n.unescape=function(e){return null==e?"":(e+"").replace(it,d)},n.uniqueId=function(e){return(null==e?"":e+"")+ ++Z},n.all=A,n.any=F,n.detect=M,n.foldl=B,n.foldr=j,n.include=L,n.inject=B,cn(n,function(e,t){n.prototype[t]||(n.prototype[t]=function(){var t=[this.__wrapped__];return St.apply(t,arguments),e.apply(n,t)})}),n.first=I,n.last=function(e,t,n){if(e){var r=e.length;return null==t||n?e[r-1]:p(e,Ot(0,r-t))}},n.take=I,n.head=I,cn(n,function(e,t){n.prototype[t]||
41
+ (n.prototype[t]=function(t,r){var i=e(this.__wrapped__,t,r);return null==t||r?i:new n(i)})}),n.VERSION="1.0.0-rc.3",n.prototype.toString=function(){return this.__wrapped__+""},n.prototype.value=J,n.prototype.valueOf=J,an(["join","pop","shift"],function(e){var t=G[e];n.prototype[e]=function(){return t.apply(this.__wrapped__,arguments)}}),an(["push","reverse","sort","unshift"],function(e){var t=G[e];n.prototype[e]=function(){return t.apply(this.__wrapped__,arguments),this}}),an(["concat","slice","splice"
42
+ ],function(e){var t=G[e];n.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return new n(e)}}),$t&&an(["pop","shift","splice"],function(e){var t=G[e],r="splice"==e;n.prototype[e]=function(){var e=this.__wrapped__,i=t.apply(e,arguments);return 0===e.length&&delete e[0],r?new n(i):i}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=n,define(function(){return n})):K?typeof module=="object"&&module&&module.exports==K?(module.exports=n)._=n:K._=n:e._=n})(this);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lodash-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc.2
4
+ version: 1.0.0.rc.3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-05 00:00:00.000000000 Z
12
+ date: 2012-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties