From d7c38aea502ff5149161cbf178b62ae161857fbd Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 9 Jul 2014 00:52:09 -0700 Subject: [PATCH] Rebuild dist. --- dist/lodash.compat.js | 189 +++++++++++++++++----------------- dist/lodash.compat.min.js | 134 ++++++++++++------------ dist/lodash.js | 189 +++++++++++++++++----------------- dist/lodash.min.js | 66 ++++++------ dist/lodash.underscore.js | 136 ++++++++++++------------ dist/lodash.underscore.min.js | 78 +++++++------- 6 files changed, 404 insertions(+), 388 deletions(-) diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index 919217b30..9ea05059e 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -12,6 +12,9 @@ /** Used as a safe reference for `undefined` in pre ES5 environments */ var undefined; + /** Used as the semantic version number */ + var VERSION = '3.0.0-pre'; + /** Used to compose bitmasks for wrapper metadata */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, @@ -21,14 +24,21 @@ PARTIAL_FLAG = 32, PARTIAL_RIGHT_FLAG = 64; - /** Used as the semantic version number */ - var version = '3.0.0-pre'; - /** Used as the property name for wrapper metadata */ - var expando = '__lodash@' + version + '__'; + var EXPANDO = '__lodash@' + VERSION + '__'; /** Used as the TypeError message for "Functions" methods */ - var funcErrorText = 'Expected a function'; + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used as a reference for the max length of an array */ + var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + + /** + * Used as the maximum length of an array-like value. + * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) + * for more details. + */ + var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; /** Used to generate unique IDs */ var idCounter = 0; @@ -287,12 +297,12 @@ /*--------------------------------------------------------------------------*/ /** - * The base implementation of `_.at` without support for strings and - * individual key arguments. + * The base implementation of `_.at` without support for strings and individual + * key arguments. * * @private * @param {Array|Object} collection The collection to iterate over. - * @param {number[]|string[]} [props] The keys of elements to pick. + * @param {number[]|string[]} [props] The property names or indexes of elements to pick. * @returns {Array} Returns the new array of picked elements. */ function baseAt(collection, props) { @@ -630,16 +640,6 @@ /** Used to resolve the decompiled source of functions */ var fnToString = Function.prototype.toString; - /** Used as a reference for the max length of an array */ - var maxArrayLength = Math.pow(2, 32) - 1; - - /** - * Used as the maximum length of an array-like value. - * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) - * for more details. - */ - var maxSafeInteger = Math.pow(2, 53) - 1; - /** Used to restore the original `_` reference in `_.noConflict` */ var oldDash = context._; @@ -693,6 +693,9 @@ nativeParseInt = context.parseInt, nativeRandom = Math.random; + /** Used as the size, in bytes, of each Float64Array element */ + var FLOAT64_BYTES_PER_ELEMENT = Float64Array && Float64Array.BYTES_PER_ELEMENT; + /** Used to lookup a built-in constructor by [[Class]] */ var ctorByClass = {}; ctorByClass[float32Class] = context.Float32Array; @@ -1302,7 +1305,7 @@ if (typeof thisArg == 'undefined') { return func; } - var data = func[expando]; + var data = func[EXPANDO]; if (typeof data == 'undefined') { if (support.funcNames) { data = !func.name; @@ -1645,7 +1648,7 @@ */ function baseEach(collection, iterator) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { return baseForOwn(collection, iterator); } var index = -1, @@ -1670,7 +1673,7 @@ */ function baseEachRight(collection, iterator) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { return baseForOwnRight(collection, iterator); } var iterable = toIterable(collection); @@ -2108,7 +2111,7 @@ length = collection ? collection.length : 0, result = []; - if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { + if (typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) { result.length = length; } baseEach(collection, function(value) { @@ -2214,7 +2217,9 @@ */ function basePartial(func, bitmask, args, thisArg) { if (func) { - var arity = func[expando] ? func[expando][2] : func.length; + var data = func[EXPANDO], + arity = data ? data[2] : func.length; + arity -= args.length; } var isPartial = bitmask & PARTIAL_FLAG; @@ -2734,7 +2739,7 @@ isPartialRight = bitmask & PARTIAL_RIGHT_FLAG; if (!isBindKey && !isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } if (isPartial && !partialArgs.length) { bitmask &= ~PARTIAL_FLAG; @@ -2744,7 +2749,7 @@ bitmask &= ~PARTIAL_RIGHT_FLAG; isPartialRight = partialRightArgs = false; } - var data = !isBindKey && func[expando]; + var data = !isBindKey && func[EXPANDO]; if (data && data !== true) { // shallow clone `data` data = slice(data); @@ -2876,8 +2881,8 @@ // PhantomJS has `ArrayBuffer` and `Uint8Array` but not `Float64Array` cloneBuffer = !(ArrayBuffer && Uint8Array) ? identity : function(buffer) { var byteLength = buffer.byteLength, - floatLength = Float64Array ? floor(byteLength / 8) : 0, - offset = floatLength * 8, + floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0, + offset = floatLength * FLOAT64_BYTES_PER_ELEMENT, result = new ArrayBuffer(byteLength); if (floatLength) { @@ -2902,7 +2907,7 @@ */ var setData = !defineProperty ? identity : function(func, value) { descriptor.value = value; - defineProperty(func, expando, descriptor); + defineProperty(func, EXPANDO, descriptor); descriptor.value = null; return func; }; @@ -2987,7 +2992,7 @@ */ function toIterable(collection) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { return values(collection); } else if (support.unindexedChars && isString(collection)) { return collection.split(''); @@ -4174,34 +4179,34 @@ } /** - * Creates an object composed from arrays of `keys` and `values`. Provide + * Creates an object composed from arrays of property names and values. Provide * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` - * or two arrays, one of `keys` and one of corresponding `values`. + * or two arrays, one of property names and one of corresponding values. * * @static * @memberOf _ * @alias object * @category Array - * @param {Array} keys The array of keys. - * @param {Array} [values=[]] The array of values. + * @param {Array} props The array of property names. + * @param {Array} [vals=[]] The array of property values. * @returns {Object} Returns the new object. * @example * * _.zipObject(['fred', 'barney'], [30, 40]); * // => { 'fred': 30, 'barney': 40 } */ - function zipObject(keys, values) { + function zipObject(props, vals) { var index = -1, - length = keys ? keys.length : 0, + length = props ? props.length : 0, result = {}; - if (!values && length && !isArray(keys[0])) { - values = []; + if (!vals && length && !isArray(props[0])) { + vals = []; } while (++index < length) { - var key = keys[index]; - if (values) { - result[key] = values[index]; + var key = props[index]; + if (vals) { + result[key] = vals[index]; } else if (key) { result[key[0]] = key[1]; } @@ -4341,8 +4346,8 @@ * @memberOf _ * @category Collection * @param {Array|Object|string} collection The collection to iterate over. - * @param {...(number|number[]|string|string[])} [keys] The keys of elements - * to pick, specified as individual keys or arrays of keys. + * @param {...(number|number[]|string|string[])} [props] The property names + * or indexes of elements to pick, specified individually or in arrays. * @returns {Array} Returns the new array of picked elements. * @example * @@ -4355,7 +4360,7 @@ function at(collection) { var length = collection ? collection.length : 0; - if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { + if (typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) { collection = toIterable(collection); } return baseAt(collection, baseFlatten(arguments, false, false, 1)); @@ -4391,7 +4396,7 @@ function contains(collection, target, fromIndex) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { collection = values(collection); length = collection.length; } @@ -5242,11 +5247,11 @@ result = Array(length); while (++index < length) { - var value = collection[index], - rand = baseRandom(0, index); - - result[index] = result[rand]; - result[rand] = value; + var rand = baseRandom(0, index); + if (index != rand) { + result[index] = result[rand]; + } + result[rand] = collection[index]; } return result; } @@ -5273,7 +5278,7 @@ */ function size(collection) { var length = collection ? collection.length : 0; - return (typeof length == 'number' && length > -1 && length <= maxSafeInteger) + return (typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) ? length : keys(collection).length; } @@ -5383,7 +5388,7 @@ multi = iterator && isArray(iterator), result = []; - if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { + if (typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) { result.length = length; } if (!multi) { @@ -5487,7 +5492,7 @@ */ function after(n, func) { if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } n = nativeIsFinite(n = +n) ? n : 0; return function() { @@ -5515,7 +5520,7 @@ function before(n, func) { var result; if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } return function() { if (--n > 0) { @@ -5686,22 +5691,22 @@ function compose() { var funcs = arguments, length = funcs.length, - fromIndex = length - 1; + index = length - 1; if (!length) { return function() {}; } while (length--) { if (!isFunction(funcs[length])) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } } return function() { - var index = fromIndex, - result = funcs[index].apply(this, arguments); + length = index; + var result = funcs[length].apply(this, arguments); - while (index--) { - result = funcs[index].call(this, result); + while (length--) { + result = funcs[length].call(this, result); } return result; }; @@ -5844,7 +5849,7 @@ trailing = true; if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } wait = wait < 0 ? 0 : wait; if (options === true) { @@ -5962,7 +5967,7 @@ */ function defer(func) { if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } var args = slice(arguments, 1); return setTimeout(function() { func.apply(undefined, args); }, 1); @@ -5986,7 +5991,7 @@ */ function delay(func, wait) { if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } var args = slice(arguments, 2); return setTimeout(function() { func.apply(undefined, args); }, wait); @@ -6029,7 +6034,7 @@ */ function memoize(func, resolver) { if (!isFunction(func) || (resolver && !isFunction(resolver))) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var key = resolver ? resolver.apply(this, arguments) : arguments[0]; @@ -6066,7 +6071,7 @@ */ function negate(predicate) { if (!isFunction(predicate)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } return function() { return !predicate.apply(this, arguments); @@ -6193,7 +6198,7 @@ trailing = true; if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } if (options === false) { leading = false; @@ -6884,7 +6889,7 @@ return true; } var length = value.length; - if ((typeof length == 'number' && length > -1 && length <= maxSafeInteger) && + if ((typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) && (isArray(value) || isString(value) || isArguments(value) || (typeof value == 'object' && isFunction(value.splice)))) { return !length; @@ -8181,7 +8186,7 @@ // provide the compiled function's source by its `toString` method or // the `source` property as a convenience for inlining compiled templates result.source = source; - if (result instanceof Error) { + if (isError(result)) { throw result; } return result; @@ -8397,7 +8402,7 @@ * return document.querySelectorAll(selector); * }); * - * if (elements instanceof Error) { + * if (_.isError(elements)) { * elements = []; * } */ @@ -8520,31 +8525,31 @@ */ function matches(source) { var props = keys(source), - propsLength = props.length, - key = props[0], - value = propsLength && source[key]; + length = props.length, + index = length, + modes = Array(length), + vals = Array(length); - // fast path the common case of providing an object with a single - // property containing a primitive value - if (propsLength == 1 && value === value && !isObject(value)) { - return function(object) { - if (object == null) { - return false; - } - // treat `-0` vs. `+0` as not equal - var other = object[key]; - return value === other && (value !== 0 || (1 / value == 1 / other)) && hasOwnProperty.call(object, key); - }; + while (index--) { + var value = source[props[index]], + isDeep = value !== value || (value === 0 && 1 / value < 0) || isObject(value); + + modes[index] = isDeep; + vals[index] = isDeep ? baseClone(value, isDeep) : value; } return function(object) { - var length = propsLength; - if (length && object == null) { - return false; + index = length; + if (object == null) { + return !index; } - while (length--) { - var key = props[length]; - if (!(hasOwnProperty.call(object, key) && - baseIsEqual(source[key], object[key], null, true))) { + while (index--) { + if (modes[index] ? !hasOwnProperty.call(object, props[index]) : vals[index] !== object[props[index]]) { + return false; + } + } + index = length; + while (index--) { + if (modes[index] ? !baseIsEqual(vals[index], object[props[index]], null, true) : !hasOwnProperty.call(object, props[index])) { return false; } } @@ -8924,10 +8929,10 @@ iterator = baseCallback(iterator, thisArg, 1); var index = -1, - result = Array(nativeMin(n, maxArrayLength)); + result = Array(nativeMin(n, MAX_ARRAY_LENGTH)); while (++index < n) { - if (index < maxArrayLength) { + if (index < MAX_ARRAY_LENGTH) { result[index] = iterator(index); } else { iterator(index); @@ -9188,7 +9193,7 @@ * @memberOf _ * @type string */ - lodash.VERSION = version; + lodash.VERSION = VERSION; // add "Chaining" functions to the wrapper lodash.prototype.chain = wrapperChain; diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index af5765df9..b83c8d8f1 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -4,70 +4,70 @@ * Build: `lodash -o ./dist/lodash.compat.js` */ ;(function(){function n(n,t){for(var r=-1,e=t.length,u=Array(e);++rt||typeof n=="undefined")return 1;if(ne||13e||8202r||13r||8202i(t,f)&&c.push(f);return c}function Dt(n,t){var r=n?n.length:0;if(typeof r!="number"||-1>=r||r>Te)return Yt(n,t);for(var e=-1,u=kr(n);++e=r||r>Te)return Gt(n,t);for(var e=kr(n);r--&&false!==t(e[r],r,n););return n -}function qt(n,t){var r=true;return Dt(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Mt(n,t){var r=[];return Dt(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function Zt(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function Kt(n,t,r,e){e=(e||0)-1;for(var u=n.length,o=0,i=[];++e>>1,a=r(n[i]);(e?a<=t:aa(s,h)&&((u||c)&&s.push(h),l.push(p))}return l}function lr(n,t){for(var r=-1,e=t(n),u=e.length,o=be(u);++re)return t;var u=typeof r[2];if("number"!=u&&"string"!=u||!r[3]||r[3][r[2]]!==r[1]||(e=2),3e?au(u+e,0):e||0;else if(e)return e=Rr(n,t),u&&n[e]===t?e:-1;return r(n,t,e)}function Cr(n){return Sr(n,1)}function Sr(n,t,r){var e=-1,u=n?n.length:0;for(t=null==t?0:+t||0,0>t?t=au(u+t,0):t>u&&(t=u),r=typeof r=="undefined"?u:+r||0,0>r?r=au(u+r,0):r>u&&(r=u),u=t>r?0:r-t,r=be(u);++er?au(e+r,0):r||0:0,typeof n=="string"||!xu(n)&&fe(n)?ro&&(o=a)}else t=null==t&&fe(n)?u:M.callback(t,r,3),Dt(n,function(n,r,u){r=t(n,r,u),(r>e||-1/0===r&&r===o)&&(e=r,o=n)});return o}function Zr(n,t){return qr(n,de(t)) -}function Kr(n,t,r,e){return(xu(n)?Et:ir)(n,M.callback(t,e,4),r,3>arguments.length,Dt)}function Vr(n,t,r,e){return(xu(n)?Ct:ir)(n,M.callback(t,e,4),r,3>arguments.length,zt)}function Jr(n){n=kr(n);for(var t=-1,r=n.length,e=be(r);++t=r||r>t?(a&&qe(a),r=p,a=s=p=d,r&&(h=Uu(),f=n.apply(l,i),s||a||(i=l=null))):s=Ge(e,r)}function u(){s&&qe(s),a=s=p=d,(v||g!==t)&&(h=Uu(),f=n.apply(l,i),s||a||(i=l=null))}function o(){if(i=arguments,c=Uu(),l=this,p=v&&(s||!y),false===g)var r=y&&!s;else{a||y||(h=c);var o=g-(c-h),m=0>=o||o>g;m?(a&&(a=qe(a)),h=c,f=n.apply(l,i)):a||(a=Ge(u,o))}return m&&s?s=qe(s):s||t===g||(s=Ge(e,t)),r&&(m=true,f=n.apply(l,i)),!m||s||a||(i=l=null),f}var i,a,f,c,l,s,p,h=0,g=false,v=true; -if(!ue(n))throw new Ie(I);if(t=0>t?0:t,true===r)var y=true,v=false;else oe(r)&&(y=r.leading,g="maxWait"in r&&au(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){s&&qe(s),a&&qe(a),a=s=p=d},o}function Hr(n){if(!ue(n))throw new Ie(I);return function(){return!n.apply(this,arguments)}}function Qr(n){return er(n,x,Sr(arguments,1))}function ne(n){return Ht(n,ce)}function te(n){return n&&typeof n=="object"&&typeof n.length=="number"&&$e.call(n)==Q||false}function re(n){return n&&typeof n=="object"&&1===n.nodeType&&(vu.nodeClass?-1<$e.call(n).indexOf("Element"):h(n))||false -}function ee(n){return n&&typeof n=="object"&&$e.call(n)==et||false}function ue(n){return typeof n=="function"||false}function oe(n){var t=typeof n;return"function"==t||n&&"object"==t||false}function ie(n){var t=typeof n;return"number"==t||n&&"object"==t&&$e.call(n)==ot||false}function ae(n){return oe(n)&&$e.call(n)==at||false}function fe(n){return typeof n=="string"||n&&typeof n=="object"&&$e.call(n)==ft||false}function ce(n){if(null==n)return[];n=ke(n);for(var t,r=n.length,r=typeof r=="number"&&0t||null==n||!ou(t))return r;n=Ee(n);do t%2&&(r+=n),t=Ze(t/2),n+=n;while(t);return r}function he(n,t){return(n=null==n?"":Ee(n))?null==t?n.slice(g(n),v(n)+1):(t=Ee(t),n.slice(o(n,t),i(n,t)+1)):n -}function ge(n){try{return n()}catch(t){return ee(t)?t:we(t)}}function ve(n){return n}function ye(n){var t=Eu(n),r=t.length,e=t[0],u=r&&n[e];return 1!=r||u!==u||oe(u)?function(e){var u=r;if(u&&null==e)return false;for(;u--;){var o=t[u];if(!Ve.call(e,o)||!Qt(n[o],e[o],null,true))return false}return true}:function(n){if(null==n)return false;var t=n[e];return u===t&&(0!==u||1/u==1/t)&&Ve.call(n,e)}}function me(n,t,r){var e=true,u=t&&Ht(t,Eu);t&&(r||u.length)||(null==r&&(r=t),t=n,n=this,u=Ht(t,Eu)),false===r?e=false:oe(r)&&"chain"in r&&(e=r.chain),r=-1; -for(var o=ue(n),i=u?u.length:0;++r--n?t.apply(this,arguments):void 0}},M.assign=Au,M.at=function(t){var r=t?t.length:0;return typeof r=="number"&&-1arguments.length?mr(n,b,null,t):er(n,b|x,Sr(arguments,2),t)},M.bindAll=function(n){for(var t=n,r=1arguments.length?mr(t,b|_,null,n):mr(t,b|_|x,null,n,Sr(arguments,2))},M.callback=function(n,t,r){var e=typeof n,u="function"==e;return u&&typeof t=="undefined"?n:u||null==n?Nt(n,t,r):"object"==e?ye(n):de(n)},M.chain=function(n){return n=M(n),n.__chain__=true,n},M.chunk=function(n,t){var r=0,e=n?n.length:0,u=[];for(t=au(+t||1,1);rt?0:t)},M.dropRight=function(n,t,r){var e=n?n.length:0; -return t=e-((null==t||r?1:t)||0),Sr(n,0,0>t?0:t)},M.dropRightWhile=function(n,t,r){var e=n?n.length:0;for(t=M.callback(t,r,3);e--&&t(n[e],e,n););return Sr(n,0,e+1)},M.dropWhile=function(n,t,r){var e=-1,u=n?n.length:0;for(t=M.callback(t,r,3);++e(p?e(p,f):i(s,f))){for(t=u;--t;){var h=o[t];if(0>(h?e(h,f):i(n[t],f)))continue n}p&&p.push(f),s.push(f)}return s},M.invert=function(n,t){for(var r=-1,e=Eu(n),u=e.length,o={};++rt?0:t)},M.takeRight=function(n,t,r){var e=n?n.length:0;return t=e-((null==t||r?1:t)||0),Sr(n,0>t?0:t)},M.takeRightWhile=function(n,t,r){var e=n?n.length:0;for(t=M.callback(t,r,3);e--&&t(n[e],e,n););return Sr(n,e+1) -},M.takeWhile=function(n,t,r){var e=-1,u=n?n.length:0;for(t=M.callback(t,r,3);++er?0:+r||0,e))-t.length,0<=r&&n.indexOf(t,r)==r},M.escape=function(n){return null==n?"":Ee(n).replace(N,s)},M.escapeRegExp=se,M.every=$r,M.find=Br,M.findIndex=Or,M.findKey=function(n,t,r){return t=M.callback(t,r,3),Zt(n,t,Yt,true)},M.findLast=function(n,t,r){return t=M.callback(t,r,3),Zt(n,t,zt)},M.findLastIndex=function(n,t,r){var e=n?n.length:0; -for(t=M.callback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},M.findLastKey=function(n,t,r){return t=M.callback(t,r,3),Zt(n,t,Gt,true)},M.findWhere=function(n,t){return Br(n,ye(t))},M.first=Er,M.has=function(n,t){return n?Ve.call(n,t):false},M.identity=ve,M.indexOf=Ir,M.isArguments=te,M.isArray=xu,M.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&$e.call(n)==tt||false},M.isDate=function(n){return n&&typeof n=="object"&&$e.call(n)==rt||false},M.isElement=re,M.isEmpty=function(n){if(null==n)return true; -var t=n.length;return typeof t=="number"&&-1r?au(u+r,0):fu(r||0,u-1))+1;else if(r)return u=Ur(n,t)-1,e&&n[u]===t?u:-1;for(;u--;)if(n[u]===t)return u;return-1},M.max=Mr,M.min=function(n,t,r){var e=1/0,o=e,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&xu(n))for(r=-1,i=n.length;++rr?0:+r||0,n.length),n.lastIndexOf(t,r)==r},M.template=function(n,t){var r=M.templateSettings;t=Au({},t,r,Ft),n=Ee(null==n?"":n); -var e,u,o,r=Au({},t.imports,r.imports,Ft),i=Eu(r),a=le(r),f=0,r=t.interpolate||Z,c="__p+='",r=Oe((t.escape||Z).source+"|"+r.source+"|"+(r===$?P:Z).source+"|"+(t.evaluate||Z).source+"|$","g");if(o=o?"/*//# sourceURL="+o+"*/":"",n.replace(r,function(t,r,o,i,a,l){return o||(o=i),c+=n.slice(f,l).replace(J,p),r&&(e=true,c+="'+__e("+r+")+'"),a&&(u=true,c+="';"+a+";\n__p+='"),o&&(c+="'+((__t=("+o+"))==null?'':__t)+'"),f=l+t.length,t}),c+="';",(r=t.variable)||(c="with(obj){"+c+"}"),c=(u?c.replace(R,""):c).replace(U,"$1").replace(F,"$1;"),c="function("+(r||"obj")+"){"+(r?"":"obj||(obj={});")+"var __t,__p=''"+(e?",__e=_.escape":"")+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}",r=ge(function(){return je(i,"return "+c+o).apply(d,a) -}),r.source=c,r instanceof we)throw r;return r},M.trim=he,M.trimLeft=function(n,t){return(n=null==n?"":Ee(n))?null==t?n.slice(g(n)):(t=Ee(t),n.slice(o(n,t))):n},M.trimRight=function(n,t){return(n=null==n?"":Ee(n))?null==t?n.slice(0,v(n)+1):(t=Ee(t),n.slice(0,i(n,t)+1)):n},M.trunc=function(n,t){var r=30,e="...";if(oe(t))var u="separator"in t?t.separator:u,r="length"in t?+t.length||0:r,e="omission"in t?Ee(t.omission):e;else null!=t&&(r=+t||0);if(n=null==n?"":Ee(n),r>=n.length)return n;var o=r-e.length; -if(1>o)return e;if(r=n.slice(0,o),null==u)return r+e;if(ae(u)){if(n.slice(o).search(u)){var i,a,f=n.slice(0,o);for(u.global||(u=Oe(u.source,(B.exec(u)||"")+"g")),u.lastIndex=0;i=u.exec(f);)a=i.index;r=r.slice(0,null==a?o:a)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),-1n.indexOf(";")?n:n.replace(L,y))},M.uniqueId=function(n){var t=++C;return Ee(null==n?"":n)+t},M.all=$r,M.any=Xr,M.detect=Br,M.foldl=Kr,M.foldr=Vr,M.head=Er,M.include=Wr,M.inject=Kr,me(M,function(){var n={}; -return Yt(M,function(t,r){M.prototype[r]||(n[r]=t)}),n}(),false),M.sample=function(n,t,r){n=kr(n);var e=n.length;return null==t||r?0t?0:+t||0,n.length),n)},Yt(M,function(n,t){var r="sample"!=t;M.prototype[t]||(M.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new X(o,u):o})}),M.VERSION=O,M.prototype.chain=function(){return this.__chain__=true,this},M.prototype.toJSON=Tr,M.prototype.toString=function(){return Ee(this.__wrapped__) -},M.prototype.value=Tr,M.prototype.valueOf=Tr,At(["join","pop","shift"],function(n){var t=Ce[n];M.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new X(r,n):r}}),At(["push","reverse","sort","unshift"],function(n){var t=Ce[n];M.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),At(["concat","splice"],function(n){var t=Ce[n];M.prototype[n]=function(){return new X(t.apply(this.__wrapped__,arguments),this.__chain__)}}),vu.spliceObjects||At(["pop","shift","splice"],function(n){var t=Ce[n],r="splice"==n; -M.prototype[n]=function(){var n=this.__chain__,e=this.__wrapped__,u=t.apply(e,arguments);return 0===e.length&&delete e[0],n||r?new X(u,n):u}}),M}var d,b=1,_=2,w=4,j=8,A=16,x=32,k=64,O="3.0.0-pre",E="__lodash@"+O+"__",I="Expected a function",C=0,S=/^[A-Z]+$/,R=/\b__p\+='';/g,U=/\b(__p\+=)''\+/g,F=/(__e\(.*?\)|\b__t\))\+'';/g,L=/&(?:amp|lt|gt|quot|#39|#96);/g,N=/[&<>"'`]/g,T=/<%-([\s\S]+?)%>/g,W=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,P=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,B=/\w*$/,D=/^\s*function[ \n\r\t]+\w/,z=/^0[xX]/,q=/^\[object .+?Constructor\]$/,M=/[\xC0-\xFF]/g,Z=/($^)/,K=/[.*+?^${}()|[\]\/\\]/g,V=/\bthis\b/,J=/['\n\r\u2028\u2029\\]/g,X=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,Y=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",G="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array window WinRTError".split(" "),H="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Q="[object Arguments]",nt="[object Array]",tt="[object Boolean]",rt="[object Date]",et="[object Error]",ut="[object Function]",ot="[object Number]",it="[object Object]",at="[object RegExp]",ft="[object String]",ct="[object ArrayBuffer]",lt="[object Float32Array]",st="[object Float64Array]",pt="[object Int8Array]",ht="[object Int16Array]",gt="[object Int32Array]",vt="[object Uint8Array]",yt="[object Uint8ClampedArray]",mt="[object Uint16Array]",dt="[object Uint32Array]",bt={}; -bt[Q]=bt[nt]=bt[lt]=bt[st]=bt[pt]=bt[ht]=bt[gt]=bt[vt]=bt[yt]=bt[mt]=bt[dt]=true,bt[ct]=bt[tt]=bt[rt]=bt[et]=bt[ut]=bt["[object Map]"]=bt[ot]=bt[it]=bt[at]=bt["[object Set]"]=bt[ft]=bt["[object WeakMap]"]=false;var _t={};_t[Q]=_t[nt]=_t[ct]=_t[tt]=_t[rt]=_t[lt]=_t[st]=_t[pt]=_t[ht]=_t[gt]=_t[ot]=_t[it]=_t[at]=_t[ft]=_t[vt]=_t[yt]=_t[mt]=_t[dt]=true,_t[et]=_t[ut]=_t["[object Map]"]=_t["[object Set]"]=_t["[object WeakMap]"]=false;var wt={leading:false,maxWait:0,trailing:false},jt={configurable:false,enumerable:false,value:null,writable:false},At={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},xt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},kt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"AE","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\xd7":" ","\xf7":" "},Ot={"function":true,object:true},Et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},It=Ot[typeof window]&&window||this,Ct=Ot[typeof exports]&&exports&&!exports.nodeType&&exports,Ot=Ot[typeof module]&&module&&!module.nodeType&&module,St=Ct&&Ot&&typeof global=="object"&&global; -!St||St.global!==St&&St.window!==St&&St.self!==St||(It=St);var St=Ot&&Ot.exports===Ct&&Ct,Rt=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(It._=Rt, define(function(){return Rt})):Ct&&Ot?St?(Ot.exports=Rt)._=Rt:Ct._=Rt:It._=Rt}).call(this); \ No newline at end of file +}function a(n,r){return t(n.a,r.a)||n.b-r.b}function f(n,r){for(var e=-1,u=n.a,o=r.a,i=u.length;++ee||13e||8202r||13r||8202i(t,f)&&c.push(f);return c}function zt(n,t){var r=n?n.length:0;if(typeof r!="number"||-1>=r||r>S)return Ht(n,t);for(var e=-1,u=Or(n);++e=r||r>S)return Qt(n,t);for(var e=Or(n);r--&&false!==t(e[r],r,n););return n +}function Zt(n,t){var r=true;return zt(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Kt(n,t){var r=[];return zt(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function Vt(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function Yt(n,t,r,e){e=(e||0)-1;for(var u=n.length,o=0,i=[];++e>>1,a=r(n[i]);(e?a<=t:aa(s,h)&&((u||c)&&s.push(h),l.push(p))}return l}function pr(n,t){for(var r=-1,e=t(n),u=e.length,o=we(u);++re)return t;var u=typeof r[2];if("number"!=u&&"string"!=u||!r[3]||r[3][r[2]]!==r[1]||(e=2),3e?au(u+e,0):e||0;else if(e)return e=Ur(n,t),u&&n[e]===t?e:-1;return r(n,t,e)}function Rr(n){return Fr(n,1)}function Fr(n,t,r){var e=-1,u=n?n.length:0;for(t=null==t?0:+t||0,0>t?t=au(u+t,0):t>u&&(t=u),r=typeof r=="undefined"?u:+r||0,0>r?r=au(u+r,0):r>u&&(r=u),u=t>r?0:r-t,r=we(u);++er?au(e+r,0):r||0:0,typeof n=="string"||!ku(n)&&le(n)?ro&&(o=a)}else t=null==t&&le(n)?u:K.callback(t,r,3),zt(n,function(n,r,u){r=t(n,r,u),(r>e||-1/0===r&&r===o)&&(e=r,o=n)});return o}function Vr(n,t){return Zr(n,_e(t)) +}function Yr(n,t,r,e){return(ku(n)?Ct:fr)(n,K.callback(t,e,4),r,3>arguments.length,zt)}function Jr(n,t,r,e){return(ku(n)?Rt:fr)(n,K.callback(t,e,4),r,3>arguments.length,qt)}function Xr(n){n=Or(n);for(var t=-1,r=n.length,e=we(r);++t=r||r>t?(a&&ze(a),r=p,a=s=p=d,r&&(h=Uu(),f=n.apply(l,i),s||a||(i=l=null))):s=Ge(e,r)}function u(){s&&ze(s),a=s=p=d,(v||g!==t)&&(h=Uu(),f=n.apply(l,i),s||a||(i=l=null))}function o(){if(i=arguments,c=Uu(),l=this,p=v&&(s||!y),false===g)var r=y&&!s;else{a||y||(h=c);var o=g-(c-h),m=0>=o||o>g;m?(a&&(a=ze(a)),h=c,f=n.apply(l,i)):a||(a=Ge(u,o))}return m&&s?s=ze(s):s||t===g||(s=Ge(e,t)),r&&(m=true,f=n.apply(l,i)),!m||s||a||(i=l=null),f}var i,a,f,c,l,s,p,h=0,g=false,v=true; +if(!ie(n))throw new Se(I);if(t=0>t?0:t,true===r)var y=true,v=false;else ae(r)&&(y=r.leading,g="maxWait"in r&&au(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){s&&ze(s),a&&ze(a),a=s=p=d},o}function ne(n){if(!ie(n))throw new Se(I);return function(){return!n.apply(this,arguments)}}function te(n){return or(n,k,Fr(arguments,1))}function re(n){return nr(n,se)}function ee(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Pe.call(n)==tt||false}function ue(n){return n&&typeof n=="object"&&1===n.nodeType&&(yu.nodeClass?-1t||null==n||!ou(t))return r;n=Ce(n);do t%2&&(r+=n),t=Ze(t/2),n+=n;while(t);return r}function ve(n,t){return(n=null==n?"":Ce(n))?null==t?n.slice(g(n),v(n)+1):(t=Ce(t),n.slice(o(n,t),i(n,t)+1)):n +}function ye(n){try{return n()}catch(t){return oe(t)?t:Ae(t)}}function me(n){return n}function de(n){for(var t=Iu(n),r=t.length,e=r,u=we(r),o=we(r);e--;){var i=n[t[e]],a=i!==i||0===i&&0>1/i||ae(i);u[e]=a,o[e]=a?Pt(i,a):i}return function(n){if(e=r,null==n)return!e;for(;e--;)if(u[e]?!Ve.call(n,t[e]):o[e]!==n[t[e]])return false;for(e=r;e--;)if(u[e]?!tr(o[e],n[t[e]],null,true):!Ve.call(n,t[e]))return false;return true}}function be(n,t,r){var e=true,u=t&&nr(t,Iu);t&&(r||u.length)||(null==r&&(r=t),t=n,n=this,u=nr(t,Iu)),false===r?e=false:ae(r)&&"chain"in r&&(e=r.chain),r=-1; +for(var o=ie(n),i=u?u.length:0;++r--n?t.apply(this,arguments):void 0}},K.assign=xu,K.at=function(t){var r=t?t.length:0;return typeof r=="number"&&-1arguments.length?br(n,_,null,t):or(n,_|k,Fr(arguments,2),t)},K.bindAll=function(n){for(var t=n,r=1arguments.length?br(t,_|w,null,n):br(t,_|w|k,null,n,Fr(arguments,2))},K.callback=function(n,t,r){var e=typeof n,u="function"==e;return u&&typeof t=="undefined"?n:u||null==n?Wt(n,t,r):"object"==e?de(n):_e(n)},K.chain=function(n){return n=K(n),n.__chain__=true,n},K.chunk=function(n,t){var r=0,e=n?n.length:0,u=[];for(t=au(+t||1,1);rt?0:t)},K.dropRight=function(n,t,r){var e=n?n.length:0; +return t=e-((null==t||r?1:t)||0),Fr(n,0,0>t?0:t)},K.dropRightWhile=function(n,t,r){var e=n?n.length:0;for(t=K.callback(t,r,3);e--&&t(n[e],e,n););return Fr(n,0,e+1)},K.dropWhile=function(n,t,r){var e=-1,u=n?n.length:0;for(t=K.callback(t,r,3);++e(p?e(p,f):i(s,f))){for(t=u;--t;){var h=o[t];if(0>(h?e(h,f):i(n[t],f)))continue n}p&&p.push(f),s.push(f)}return s},K.invert=function(n,t){for(var r=-1,e=Iu(n),u=e.length,o={};++rt?0:t)},K.takeRight=function(n,t,r){var e=n?n.length:0;return t=e-((null==t||r?1:t)||0),Fr(n,0>t?0:t)},K.takeRightWhile=function(n,t,r){var e=n?n.length:0;for(t=K.callback(t,r,3);e--&&t(n[e],e,n););return Fr(n,e+1) +},K.takeWhile=function(n,t,r){var e=-1,u=n?n.length:0;for(t=K.callback(t,r,3);++er?0:+r||0,e))-t.length,0<=r&&n.indexOf(t,r)==r},K.escape=function(n){return null==n?"":Ce(n).replace(W,s)},K.escapeRegExp=he,K.every=Br,K.find=Mr,K.findIndex=Ir,K.findKey=function(n,t,r){return t=K.callback(t,r,3),Vt(n,t,Ht,true)},K.findLast=function(n,t,r){return t=K.callback(t,r,3),Vt(n,t,qt)},K.findLastIndex=function(n,t,r){var e=n?n.length:0; +for(t=K.callback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},K.findLastKey=function(n,t,r){return t=K.callback(t,r,3),Vt(n,t,Qt,true)},K.findWhere=function(n,t){return Mr(n,de(t))},K.first=Cr,K.has=function(n,t){return n?Ve.call(n,t):false},K.identity=me,K.indexOf=Sr,K.isArguments=ee,K.isArray=ku,K.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Pe.call(n)==et||false},K.isDate=function(n){return n&&typeof n=="object"&&Pe.call(n)==ut||false},K.isElement=ue,K.isEmpty=function(n){if(null==n)return true; +var t=n.length;return typeof t=="number"&&-1r?au(u+r,0):fu(r||0,u-1))+1;else if(r)return u=Tr(n,t)-1,e&&n[u]===t?u:-1;for(;u--;)if(n[u]===t)return u;return-1},K.max=Kr,K.min=function(n,t,r){var e=1/0,o=e,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&ku(n))for(r=-1,i=n.length;++rr?0:+r||0,n.length),n.lastIndexOf(t,r)==r},K.template=function(n,t){var r=K.templateSettings;t=xu({},t,r,Lt),n=Ce(null==n?"":n); +var e,u,r=xu({},t.imports,r.imports,Lt),o=Iu(r),i=pe(r),a=0,r=t.interpolate||V,f="__p+='",r=Ie((t.escape||V).source+"|"+r.source+"|"+(r===B?D:V).source+"|"+(t.evaluate||V).source+"|$","g");if(n.replace(r,function(t,r,o,i,c,l){return o||(o=i),f+=n.slice(a,l).replace(X,p),r&&(e=true,f+="'+__e("+r+")+'"),c&&(u=true,f+="';"+c+";\n__p+='"),o&&(f+="'+((__t=("+o+"))==null?'':__t)+'"),a=l+t.length,t}),f+="';",(r=t.variable)||(f="with(obj){"+f+"}"),f=(u?f.replace(U,""):f).replace(T,"$1").replace(L,"$1;"),f="function("+(r||"obj")+"){"+(r?"":"obj||(obj={});")+"var __t,__p=''"+(e?",__e=_.escape":"")+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}",r=ye(function(){return xe(o,"return "+f).apply(d,i) +}),r.source=f,oe(r))throw r;return r},K.trim=ve,K.trimLeft=function(n,t){return(n=null==n?"":Ce(n))?null==t?n.slice(g(n)):(t=Ce(t),n.slice(o(n,t))):n},K.trimRight=function(n,t){return(n=null==n?"":Ce(n))?null==t?n.slice(0,v(n)+1):(t=Ce(t),n.slice(0,i(n,t)+1)):n},K.trunc=function(n,t){var r=30,e="...";if(ae(t))var u="separator"in t?t.separator:u,r="length"in t?+t.length||0:r,e="omission"in t?Ce(t.omission):e;else null!=t&&(r=+t||0);if(n=null==n?"":Ce(n),r>=n.length)return n;var o=r-e.length;if(1>o)return e; +if(r=n.slice(0,o),null==u)return r+e;if(ce(u)){if(n.slice(o).search(u)){var i,a,f=n.slice(0,o);for(u.global||(u=Ie(u.source,(M.exec(u)||"")+"g")),u.lastIndex=0;i=u.exec(f);)a=i.index;r=r.slice(0,null==a?o:a)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),-1n.indexOf(";")?n:n.replace(N,y))},K.uniqueId=function(n){var t=++R;return Ce(null==n?"":n)+t},K.all=Br,K.any=Gr,K.detect=Mr,K.foldl=Yr,K.foldr=Jr,K.head=Cr,K.include=$r,K.inject=Yr,be(K,function(){var n={}; +return Ht(K,function(t,r){K.prototype[r]||(n[r]=t)}),n}(),false),K.sample=function(n,t,r){n=Or(n);var e=n.length;return null==t||r?0t?0:+t||0,n.length),n)},Ht(K,function(n,t){var r="sample"!=t;K.prototype[t]||(K.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new G(o,u):o})}),K.VERSION=b,K.prototype.chain=function(){return this.__chain__=true,this},K.prototype.toJSON=Pr,K.prototype.toString=function(){return Ce(this.__wrapped__) +},K.prototype.value=Pr,K.prototype.valueOf=Pr,kt(["join","pop","shift"],function(n){var t=Re[n];K.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new G(r,n):r}}),kt(["push","reverse","sort","unshift"],function(n){var t=Re[n];K.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),kt(["concat","splice"],function(n){var t=Re[n];K.prototype[n]=function(){return new G(t.apply(this.__wrapped__,arguments),this.__chain__)}}),yu.spliceObjects||kt(["pop","shift","splice"],function(n){var t=Re[n],r="splice"==n; +K.prototype[n]=function(){var n=this.__chain__,e=this.__wrapped__,u=t.apply(e,arguments);return 0===e.length&&delete e[0],n||r?new G(u,n):u}}),K}var d,b="3.0.0-pre",_=1,w=2,j=4,A=8,x=16,k=32,E=64,O="__lodash@"+b+"__",I="Expected a function",C=Math.pow(2,32)-1,S=Math.pow(2,53)-1,R=0,F=/^[A-Z]+$/,U=/\b__p\+='';/g,T=/\b(__p\+=)''\+/g,L=/(__e\(.*?\)|\b__t\))\+'';/g,N=/&(?:amp|lt|gt|quot|#39|#96);/g,W=/[&<>"'`]/g,P=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,B=/<%=([\s\S]+?)%>/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,M=/\w*$/,z=/^\s*function[ \n\r\t]+\w/,q=/^0[xX]/,Z=/^\[object .+?Constructor\]$/,K=/[\xC0-\xFF]/g,V=/($^)/,Y=/[.*+?^${}()|[\]\/\\]/g,J=/\bthis\b/,X=/['\n\r\u2028\u2029\\]/g,G=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,H=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",Q="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array window WinRTError".split(" "),nt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),tt="[object Arguments]",rt="[object Array]",et="[object Boolean]",ut="[object Date]",ot="[object Error]",it="[object Function]",at="[object Number]",ft="[object Object]",ct="[object RegExp]",lt="[object String]",st="[object ArrayBuffer]",pt="[object Float32Array]",ht="[object Float64Array]",gt="[object Int8Array]",vt="[object Int16Array]",yt="[object Int32Array]",mt="[object Uint8Array]",dt="[object Uint8ClampedArray]",bt="[object Uint16Array]",_t="[object Uint32Array]",wt={}; +wt[tt]=wt[rt]=wt[pt]=wt[ht]=wt[gt]=wt[vt]=wt[yt]=wt[mt]=wt[dt]=wt[bt]=wt[_t]=true,wt[st]=wt[et]=wt[ut]=wt[ot]=wt[it]=wt["[object Map]"]=wt[at]=wt[ft]=wt[ct]=wt["[object Set]"]=wt[lt]=wt["[object WeakMap]"]=false;var jt={};jt[tt]=jt[rt]=jt[st]=jt[et]=jt[ut]=jt[pt]=jt[ht]=jt[gt]=jt[vt]=jt[yt]=jt[at]=jt[ft]=jt[ct]=jt[lt]=jt[mt]=jt[dt]=jt[bt]=jt[_t]=true,jt[ot]=jt[it]=jt["[object Map]"]=jt["[object Set]"]=jt["[object WeakMap]"]=false;var At={leading:false,maxWait:0,trailing:false},xt={configurable:false,enumerable:false,value:null,writable:false},kt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Et={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ot={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"AE","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\xd7":" ","\xf7":" "},It={"function":true,object:true},Ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},St=It[typeof window]&&window||this,Rt=It[typeof exports]&&exports&&!exports.nodeType&&exports,It=It[typeof module]&&module&&!module.nodeType&&module,Ft=Rt&&It&&typeof global=="object"&&global; +!Ft||Ft.global!==Ft&&Ft.window!==Ft&&Ft.self!==Ft||(St=Ft);var Ft=It&&It.exports===Rt&&Rt,Ut=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(St._=Ut, define(function(){return Ut})):Rt&&It?Ft?(It.exports=Ut)._=Ut:Rt._=Ut:St._=Ut}).call(this); \ No newline at end of file diff --git a/dist/lodash.js b/dist/lodash.js index 0b6820c09..0061afdeb 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -12,6 +12,9 @@ /** Used as a safe reference for `undefined` in pre ES5 environments */ var undefined; + /** Used as the semantic version number */ + var VERSION = '3.0.0-pre'; + /** Used to compose bitmasks for wrapper metadata */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, @@ -21,14 +24,21 @@ PARTIAL_FLAG = 32, PARTIAL_RIGHT_FLAG = 64; - /** Used as the semantic version number */ - var version = '3.0.0-pre'; - /** Used as the property name for wrapper metadata */ - var expando = '__lodash@' + version + '__'; + var EXPANDO = '__lodash@' + VERSION + '__'; /** Used as the TypeError message for "Functions" methods */ - var funcErrorText = 'Expected a function'; + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used as a reference for the max length of an array */ + var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + + /** + * Used as the maximum length of an array-like value. + * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) + * for more details. + */ + var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; /** Used to generate unique IDs */ var idCounter = 0; @@ -281,12 +291,12 @@ /*--------------------------------------------------------------------------*/ /** - * The base implementation of `_.at` without support for strings and - * individual key arguments. + * The base implementation of `_.at` without support for strings and individual + * key arguments. * * @private * @param {Array|Object} collection The collection to iterate over. - * @param {number[]|string[]} [props] The keys of elements to pick. + * @param {number[]|string[]} [props] The property names or indexes of elements to pick. * @returns {Array} Returns the new array of picked elements. */ function baseAt(collection, props) { @@ -610,16 +620,6 @@ /** Used to resolve the decompiled source of functions */ var fnToString = Function.prototype.toString; - /** Used as a reference for the max length of an array */ - var maxArrayLength = Math.pow(2, 32) - 1; - - /** - * Used as the maximum length of an array-like value. - * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) - * for more details. - */ - var maxSafeInteger = Math.pow(2, 53) - 1; - /** Used to restore the original `_` reference in `_.noConflict` */ var oldDash = context._; @@ -673,6 +673,9 @@ nativeParseInt = context.parseInt, nativeRandom = Math.random; + /** Used as the size, in bytes, of each Float64Array element */ + var FLOAT64_BYTES_PER_ELEMENT = Float64Array && Float64Array.BYTES_PER_ELEMENT; + /*--------------------------------------------------------------------------*/ /** @@ -1145,7 +1148,7 @@ if (typeof thisArg == 'undefined') { return func; } - var data = func[expando]; + var data = func[EXPANDO]; if (typeof data == 'undefined') { if (support.funcNames) { data = !func.name; @@ -1484,7 +1487,7 @@ */ function baseEach(collection, iterator) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { return baseForOwn(collection, iterator); } var index = -1, @@ -1509,7 +1512,7 @@ */ function baseEachRight(collection, iterator) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { return baseForOwnRight(collection, iterator); } var iterable = toIterable(collection); @@ -1943,7 +1946,7 @@ length = collection ? collection.length : 0, result = []; - if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { + if (typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) { result.length = length; } baseEach(collection, function(value) { @@ -2049,7 +2052,9 @@ */ function basePartial(func, bitmask, args, thisArg) { if (func) { - var arity = func[expando] ? func[expando][2] : func.length; + var data = func[EXPANDO], + arity = data ? data[2] : func.length; + arity -= args.length; } var isPartial = bitmask & PARTIAL_FLAG; @@ -2569,7 +2574,7 @@ isPartialRight = bitmask & PARTIAL_RIGHT_FLAG; if (!isBindKey && !isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } if (isPartial && !partialArgs.length) { bitmask &= ~PARTIAL_FLAG; @@ -2579,7 +2584,7 @@ bitmask &= ~PARTIAL_RIGHT_FLAG; isPartialRight = partialRightArgs = false; } - var data = !isBindKey && func[expando]; + var data = !isBindKey && func[EXPANDO]; if (data && data !== true) { // shallow clone `data` data = slice(data); @@ -2711,8 +2716,8 @@ // PhantomJS has `ArrayBuffer` and `Uint8Array` but not `Float64Array` cloneBuffer = !(ArrayBuffer && Uint8Array) ? identity : function(buffer) { var byteLength = buffer.byteLength, - floatLength = Float64Array ? floor(byteLength / 8) : 0, - offset = floatLength * 8, + floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0, + offset = floatLength * FLOAT64_BYTES_PER_ELEMENT, result = new ArrayBuffer(byteLength); if (floatLength) { @@ -2737,7 +2742,7 @@ */ var setData = !defineProperty ? identity : function(func, value) { descriptor.value = value; - defineProperty(func, expando, descriptor); + defineProperty(func, EXPANDO, descriptor); descriptor.value = null; return func; }; @@ -2809,7 +2814,7 @@ */ function toIterable(collection) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { return values(collection); } return collection || []; @@ -3994,34 +3999,34 @@ } /** - * Creates an object composed from arrays of `keys` and `values`. Provide + * Creates an object composed from arrays of property names and values. Provide * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` - * or two arrays, one of `keys` and one of corresponding `values`. + * or two arrays, one of property names and one of corresponding values. * * @static * @memberOf _ * @alias object * @category Array - * @param {Array} keys The array of keys. - * @param {Array} [values=[]] The array of values. + * @param {Array} props The array of property names. + * @param {Array} [vals=[]] The array of property values. * @returns {Object} Returns the new object. * @example * * _.zipObject(['fred', 'barney'], [30, 40]); * // => { 'fred': 30, 'barney': 40 } */ - function zipObject(keys, values) { + function zipObject(props, vals) { var index = -1, - length = keys ? keys.length : 0, + length = props ? props.length : 0, result = {}; - if (!values && length && !isArray(keys[0])) { - values = []; + if (!vals && length && !isArray(props[0])) { + vals = []; } while (++index < length) { - var key = keys[index]; - if (values) { - result[key] = values[index]; + var key = props[index]; + if (vals) { + result[key] = vals[index]; } else if (key) { result[key[0]] = key[1]; } @@ -4161,8 +4166,8 @@ * @memberOf _ * @category Collection * @param {Array|Object|string} collection The collection to iterate over. - * @param {...(number|number[]|string|string[])} [keys] The keys of elements - * to pick, specified as individual keys or arrays of keys. + * @param {...(number|number[]|string|string[])} [props] The property names + * or indexes of elements to pick, specified individually or in arrays. * @returns {Array} Returns the new array of picked elements. * @example * @@ -4175,7 +4180,7 @@ function at(collection) { var length = collection ? collection.length : 0; - if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { + if (typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) { collection = toIterable(collection); } return baseAt(collection, baseFlatten(arguments, false, false, 1)); @@ -4211,7 +4216,7 @@ function contains(collection, target, fromIndex) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { collection = values(collection); length = collection.length; } @@ -5062,11 +5067,11 @@ result = Array(length); while (++index < length) { - var value = collection[index], - rand = baseRandom(0, index); - - result[index] = result[rand]; - result[rand] = value; + var rand = baseRandom(0, index); + if (index != rand) { + result[index] = result[rand]; + } + result[rand] = collection[index]; } return result; } @@ -5093,7 +5098,7 @@ */ function size(collection) { var length = collection ? collection.length : 0; - return (typeof length == 'number' && length > -1 && length <= maxSafeInteger) + return (typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) ? length : keys(collection).length; } @@ -5203,7 +5208,7 @@ multi = iterator && isArray(iterator), result = []; - if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { + if (typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) { result.length = length; } if (!multi) { @@ -5307,7 +5312,7 @@ */ function after(n, func) { if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } n = nativeIsFinite(n = +n) ? n : 0; return function() { @@ -5335,7 +5340,7 @@ function before(n, func) { var result; if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } return function() { if (--n > 0) { @@ -5506,22 +5511,22 @@ function compose() { var funcs = arguments, length = funcs.length, - fromIndex = length - 1; + index = length - 1; if (!length) { return function() {}; } while (length--) { if (!isFunction(funcs[length])) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } } return function() { - var index = fromIndex, - result = funcs[index].apply(this, arguments); + length = index; + var result = funcs[length].apply(this, arguments); - while (index--) { - result = funcs[index].call(this, result); + while (length--) { + result = funcs[length].call(this, result); } return result; }; @@ -5664,7 +5669,7 @@ trailing = true; if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } wait = wait < 0 ? 0 : wait; if (options === true) { @@ -5782,7 +5787,7 @@ */ function defer(func) { if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } var args = slice(arguments, 1); return setTimeout(function() { func.apply(undefined, args); }, 1); @@ -5806,7 +5811,7 @@ */ function delay(func, wait) { if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } var args = slice(arguments, 2); return setTimeout(function() { func.apply(undefined, args); }, wait); @@ -5849,7 +5854,7 @@ */ function memoize(func, resolver) { if (!isFunction(func) || (resolver && !isFunction(resolver))) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var key = resolver ? resolver.apply(this, arguments) : arguments[0]; @@ -5886,7 +5891,7 @@ */ function negate(predicate) { if (!isFunction(predicate)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } return function() { return !predicate.apply(this, arguments); @@ -6013,7 +6018,7 @@ trailing = true; if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } if (options === false) { leading = false; @@ -6697,7 +6702,7 @@ return true; } var length = value.length; - if ((typeof length == 'number' && length > -1 && length <= maxSafeInteger) && + if ((typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) && (isArray(value) || isString(value) || isArguments(value) || (typeof value == 'object' && isFunction(value.splice)))) { return !length; @@ -7963,7 +7968,7 @@ // provide the compiled function's source by its `toString` method or // the `source` property as a convenience for inlining compiled templates result.source = source; - if (result instanceof Error) { + if (isError(result)) { throw result; } return result; @@ -8179,7 +8184,7 @@ * return document.querySelectorAll(selector); * }); * - * if (elements instanceof Error) { + * if (_.isError(elements)) { * elements = []; * } */ @@ -8302,31 +8307,31 @@ */ function matches(source) { var props = keys(source), - propsLength = props.length, - key = props[0], - value = propsLength && source[key]; + length = props.length, + index = length, + modes = Array(length), + vals = Array(length); - // fast path the common case of providing an object with a single - // property containing a primitive value - if (propsLength == 1 && value === value && !isObject(value)) { - return function(object) { - if (object == null) { - return false; - } - // treat `-0` vs. `+0` as not equal - var other = object[key]; - return value === other && (value !== 0 || (1 / value == 1 / other)) && hasOwnProperty.call(object, key); - }; + while (index--) { + var value = source[props[index]], + isDeep = value !== value || (value === 0 && 1 / value < 0) || isObject(value); + + modes[index] = isDeep; + vals[index] = isDeep ? baseClone(value, isDeep) : value; } return function(object) { - var length = propsLength; - if (length && object == null) { - return false; + index = length; + if (object == null) { + return !index; } - while (length--) { - var key = props[length]; - if (!(hasOwnProperty.call(object, key) && - baseIsEqual(source[key], object[key], null, true))) { + while (index--) { + if (modes[index] ? !hasOwnProperty.call(object, props[index]) : vals[index] !== object[props[index]]) { + return false; + } + } + index = length; + while (index--) { + if (modes[index] ? !baseIsEqual(vals[index], object[props[index]], null, true) : !hasOwnProperty.call(object, props[index])) { return false; } } @@ -8706,10 +8711,10 @@ iterator = baseCallback(iterator, thisArg, 1); var index = -1, - result = Array(nativeMin(n, maxArrayLength)); + result = Array(nativeMin(n, MAX_ARRAY_LENGTH)); while (++index < n) { - if (index < maxArrayLength) { + if (index < MAX_ARRAY_LENGTH) { result[index] = iterator(index); } else { iterator(index); @@ -8970,7 +8975,7 @@ * @memberOf _ * @type string */ - lodash.VERSION = version; + lodash.VERSION = VERSION; // add "Chaining" functions to the wrapper lodash.prototype.chain = wrapperChain; diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 1ea404e73..407824530 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -7,63 +7,63 @@ }function f(n,r){return t(n.a,r.a)||n.b-r.b}function a(n,r){for(var e=-1,u=n.a,o=r.a,i=u.length;++ee||13e||8202r||13r||8202i(t,a)&&c.push(a);return c}function Dt(n,t){var r=n?n.length:0;if(typeof r!="number"||-1>=r||r>R)return Jt(n,t);for(var e=-1,u=xr(n);++e=r||r>R)return Xt(n,t);for(var e=xr(n);r--&&false!==t(e[r],r,n););return n }function zt(n,t){var r=true;return Dt(n,function(n,e,u){return r=!!t(n,e,u)}),r}function qt(n,t){var r=[];return Dt(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function Pt(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function Zt(n,t,r,e){e=(e||0)-1;for(var u=n.length,o=0,i=[];++e>>1,f=r(n[i]);(e?f<=t:ff(p,h)&&((u||c)&&p.push(h),l.push(s))}return l}function cr(n,t){for(var r=-1,e=t(n),u=e.length,o=me(u);++re)return t;var u=typeof r[2];if("number"!=u&&"string"!=u||!r[3]||r[3][r[2]]!==r[1]||(e=2),3e)return t;var u=typeof r[2];if("number"!=u&&"string"!=u||!r[3]||r[3][r[2]]!==r[1]||(e=2),3e?eu(u+e,0):e||0;else if(e)return e=Sr(n,t),u&&n[e]===t?e:-1;return r(n,t,e)}function Ir(n){return Rr(n,1)}function Rr(n,t,r){var e=-1,u=n?n.length:0;for(t=null==t?0:+t||0,0>t?t=eu(u+t,0):t>u&&(t=u),r=typeof r=="undefined"?u:+r||0,0>r?r=eu(u+r,0):r>u&&(r=u),u=t>r?0:r-t,r=me(u);++er?eu(e+r,0):r||0:0,typeof n=="string"||!bu(n)&&fe(n)?ro&&(o=f)}else t=null==t&&fe(n)?u:Z.callback(t,r,3),Dt(n,function(n,r,u){r=t(n,r,u),(r>e||-1/0===r&&r===o)&&(e=r,o=n) -});return o}function Pr(n,t){return zr(n,de(t))}function Zr(n,t,r,e){return(bu(n)?Et:or)(n,Z.callback(t,e,4),r,3>arguments.length,Dt)}function Kr(n,t,r,e){return(bu(n)?It:or)(n,Z.callback(t,e,4),r,3>arguments.length,Mt)}function Vr(n){n=xr(n);for(var t=-1,r=n.length,e=me(r);++tr?eu(e+r,0):r||0:0,typeof n=="string"||!bu(n)&&fe(n)?ro&&(o=f)}else t=null==t&&fe(n)?u:Z.callback(t,r,3),Dt(n,function(n,r,u){r=t(n,r,u),(r>e||-1/0===r&&r===o)&&(e=r,o=n) +});return o}function Pr(n,t){return zr(n,de(t))}function Zr(n,t,r,e){return(bu(n)?Et:or)(n,Z.callback(t,e,4),r,3>arguments.length,Dt)}function Kr(n,t,r,e){return(bu(n)?It:or)(n,Z.callback(t,e,4),r,3>arguments.length,Mt)}function Vr(n){n=xr(n);for(var t=-1,r=n.length,e=me(r);++t=r||r>t?(f&&Be(f),r=s,f=p=s=d,r&&(h=Ou(),a=n.apply(l,i),p||f||(i=l=null))):p=Ve(e,r)}function u(){p&&Be(p),f=p=s=d,(v||g!==t)&&(h=Ou(),a=n.apply(l,i),p||f||(i=l=null))}function o(){if(i=arguments,c=Ou(),l=this,s=v&&(p||!y),false===g)var r=y&&!p;else{f||y||(h=c);var o=g-(c-h),d=0>=o||o>g;d?(f&&(f=Be(f)),h=c,a=n.apply(l,i)):f||(f=Ve(u,o))}return d&&p?p=Be(p):p||t===g||(p=Ve(e,t)),r&&(d=true,a=n.apply(l,i)),!d||p||f||(i=l=null),a}var i,f,a,c,l,p,s,h=0,g=false,v=true; -if(!ee(n))throw new Oe(O);if(t=0>t?0:t,true===r)var y=true,v=false;else ue(r)&&(y=r.leading,g="maxWait"in r&&eu(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){p&&Be(p),f&&Be(f),f=p=s=d},o}function Gr(n){if(!ee(n))throw new Oe(O);return function(){return!n.apply(this,arguments)}}function Hr(n){return rr(n,x,Rr(arguments,1))}function Qr(n){return Gt(n,ae)}function ne(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ue.call(n)==Q||false}function te(n){return n&&typeof n=="object"&&1===n.nodeType&&-1>>0,e=n.constructor,u=-1,e=e&&n===e.prototype,o=r-1,i=me(r),f=0t||null==n||!tu(t))return r;n=Ee(n);do t%2&&(r+=n),t=Me(t/2),n+=n;while(t);return r}function se(n,t){return(n=null==n?"":Ee(n))?null==t?n.slice(h(n),g(n)+1):(t=Ee(t),n.slice(o(n,t),i(n,t)+1)):n}function he(n){try{return n()}catch(t){return re(t)?t:_e(t)}}function ge(n){return n}function ve(n){var t=ju(n),r=t.length,e=t[0],u=r&&n[e]; -return 1!=r||u!==u||ue(u)?function(e){var u=r;if(u&&null==e)return false;for(;u--;){var o=t[u];if(!qe.call(e,o)||!Ht(n[o],e[o],null,true))return false}return true}:function(n){if(null==n)return false;var t=n[e];return u===t&&(0!==u||1/u==1/t)&&qe.call(n,e)}}function ye(n,t,r){var e=true,u=t&&Gt(t,ju);t&&(r||u.length)||(null==r&&(r=t),t=n,n=this,u=Gt(t,ju)),false===r?e=false:ue(r)&&"chain"in r&&(e=r.chain),r=-1;for(var o=ee(n),i=u?u.length:0;++rt?0:t,true===r)var y=true,v=false;else ue(r)&&(y=r.leading,g="maxWait"in r&&eu(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){p&&Be(p),f&&Be(f),f=p=s=d},o}function Gr(n){if(!ee(n))throw new Oe(O);return function(){return!n.apply(this,arguments)}}function Hr(n){return rr(n,x,Rr(arguments,1))}function Qr(n){return Gt(n,ae)}function ne(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ne.call(n)==Q||false}function te(n){return n&&typeof n=="object"&&1===n.nodeType&&-1>>0,e=n.constructor,u=-1,e=e&&n===e.prototype,o=r-1,i=me(r),f=0t||null==n||!tu(t))return r;n=Ee(n);do t%2&&(r+=n),t=Me(t/2),n+=n;while(t);return r}function se(n,t){return(n=null==n?"":Ee(n))?null==t?n.slice(h(n),g(n)+1):(t=Ee(t),n.slice(o(n,t),i(n,t)+1)):n}function he(n){try{return n()}catch(t){return re(t)?t:_e(t)}}function ge(n){return n}function ve(n){for(var t=ju(n),r=t.length,e=r,u=me(r),o=me(r);e--;){var i=n[t[e]],f=i!==i||0===i&&0>1/i||ue(i); +u[e]=f,o[e]=f?Ut(i,f):i}return function(n){if(e=r,null==n)return!e;for(;e--;)if(u[e]?!qe.call(n,t[e]):o[e]!==n[t[e]])return false;for(e=r;e--;)if(u[e]?!Ht(o[e],n[t[e]],null,true):!qe.call(n,t[e]))return false;return true}}function ye(n,t,r){var e=true,u=t&&Gt(t,ju);t&&(r||u.length)||(null==r&&(r=t),t=n,n=this,u=Gt(t,ju)),false===r?e=false:ue(r)&&"chain"in r&&(e=r.chain),r=-1;for(var o=ee(n),i=u?u.length:0;++r--n?t.apply(this,arguments):void 0}},Z.assign=mu,Z.at=function(t){var r=t?t.length:0;return typeof r=="number"&&-1arguments.length?yr(n,b,null,t):rr(n,b|x,Rr(arguments,2),t)},Z.bindAll=function(n){for(var t=n,r=1arguments.length?yr(t,b|_,null,n):yr(t,b|_|x,null,n,Rr(arguments,2))},Z.callback=function(n,t,r){var e=typeof n,u="function"==e;return u&&typeof t=="undefined"?n:u||null==n?Ut(n,t,r):"object"==e?ve(n):de(n)},Z.chain=function(n){return n=Z(n),n.__chain__=true,n},Z.chunk=function(n,t){var r=0,e=n?n.length:0,u=[];for(t=eu(+t||1,1);rarguments.length?yr(t,b|_,null,n):yr(t,b|_|x,null,n,Rr(arguments,2))},Z.callback=function(n,t,r){var e=typeof n,u="function"==e;return u&&typeof t=="undefined"?n:u||null==n?Nt(n,t,r):"object"==e?ve(n):de(n)},Z.chain=function(n){return n=Z(n),n.__chain__=true,n},Z.chunk=function(n,t){var r=0,e=n?n.length:0,u=[];for(t=eu(+t||1,1);rt?0:t)},Z.dropRight=function(n,t,r){var e=n?n.length:0; -return t=e-((null==t||r?1:t)||0),Rr(n,0,0>t?0:t)},Z.dropRightWhile=function(n,t,r){var e=n?n.length:0;for(t=Z.callback(t,r,3);e--&&t(n[e],e,n););return Rr(n,0,e+1)},Z.dropWhile=function(n,t,r){var e=-1,u=n?n.length:0;for(t=Z.callback(t,r,3);++et?0:t)},Z.dropRightWhile=function(n,t,r){var e=n?n.length:0;for(t=Z.callback(t,r,3);e--&&t(n[e],e,n););return Rr(n,0,e+1)},Z.dropWhile=function(n,t,r){var e=-1,u=n?n.length:0;for(t=Z.callback(t,r,3);++e(s?e(s,a):i(p,a))){for(t=u;--t;){var h=o[t];if(0>(h?e(h,a):i(n[t],a)))continue n}s&&s.push(a),p.push(a)}return p},Z.invert=function(n,t){for(var r=-1,e=ju(n),u=e.length,o={};++rt?0:t)},Z.takeRight=function(n,t,r){var e=n?n.length:0;return t=e-((null==t||r?1:t)||0),Rr(n,0>t?0:t)},Z.takeRightWhile=function(n,t,r){var e=n?n.length:0;for(t=Z.callback(t,r,3);e--&&t(n[e],e,n););return Rr(n,e+1) -},Z.takeWhile=function(n,t,r){var e=-1,u=n?n.length:0;for(t=Z.callback(t,r,3);++er?0:+r||0,e))-t.length,0<=r&&n.indexOf(t,r)==r},Z.escape=function(n){return null==n?"":Ee(n).replace(W,p)},Z.escapeRegExp=le,Z.every=Lr,Z.find=Br,Z.findIndex=kr,Z.findKey=function(n,t,r){return t=Z.callback(t,r,3),Pt(n,t,Jt,true)},Z.findLast=function(n,t,r){return t=Z.callback(t,r,3),Pt(n,t,Mt)},Z.findLastIndex=function(n,t,r){var e=n?n.length:0; -for(t=Z.callback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},Z.findLastKey=function(n,t,r){return t=Z.callback(t,r,3),Pt(n,t,Xt,true)},Z.findWhere=function(n,t){return Br(n,ve(t))},Z.first=Er,Z.has=function(n,t){return n?qe.call(n,t):false},Z.identity=ge,Z.indexOf=Or,Z.isArguments=ne,Z.isArray=bu,Z.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Ue.call(n)==tt||false},Z.isDate=function(n){return n&&typeof n=="object"&&Ue.call(n)==rt||false},Z.isElement=te,Z.isEmpty=function(n){if(null==n)return true; -var t=n.length;return typeof t=="number"&&-1r?0:+r||0,e))-t.length,0<=r&&n.indexOf(t,r)==r},Z.escape=function(n){return null==n?"":Ee(n).replace(W,p)},Z.escapeRegExp=le,Z.every=Lr,Z.find=Br,Z.findIndex=kr,Z.findKey=function(n,t,r){return t=Z.callback(t,r,3),Pt(n,t,Jt,true)},Z.findLast=function(n,t,r){return t=Z.callback(t,r,3),Pt(n,t,Mt)},Z.findLastIndex=function(n,t,r){var e=n?n.length:0; +for(t=Z.callback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},Z.findLastKey=function(n,t,r){return t=Z.callback(t,r,3),Pt(n,t,Xt,true)},Z.findWhere=function(n,t){return Br(n,ve(t))},Z.first=Er,Z.has=function(n,t){return n?qe.call(n,t):false},Z.identity=ge,Z.indexOf=Or,Z.isArguments=ne,Z.isArray=bu,Z.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Ne.call(n)==tt||false},Z.isDate=function(n){return n&&typeof n=="object"&&Ne.call(n)==rt||false},Z.isElement=te,Z.isEmpty=function(n){if(null==n)return true; +var t=n.length;return typeof t=="number"&&-1r?eu(u+r,0):uu(r||0,u-1))+1;else if(r)return u=Cr(n,t)-1,e&&n[u]===t?u:-1;for(;u--;)if(n[u]===t)return u;return-1},Z.max=qr,Z.min=function(n,t,r){var e=1/0,o=e,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&bu(n))for(r=-1,i=n.length;++rr?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Z.template=function(n,t){var r=Z.templateSettings;t=mu({},t,r,Ft),n=Ee(null==n?"":n); -var e,u,o,r=mu({},t.imports,r.imports,Ft),i=ju(r),f=ce(r),a=0,r=t.interpolate||K,c="__p+='",r=ke((t.escape||K).source+"|"+r.source+"|"+(r===B?D:K).source+"|"+(t.evaluate||K).source+"|$","g");if(o=o?"/*//# sourceURL="+o+"*/":"",n.replace(r,function(t,r,o,i,f,l){return o||(o=i),c+=n.slice(a,l).replace(J,s),r&&(e=true,c+="'+__e("+r+")+'"),f&&(u=true,c+="';"+f+";\n__p+='"),o&&(c+="'+((__t=("+o+"))==null?'':__t)+'"),a=l+t.length,t}),c+="';",(r=t.variable)||(c="with(obj){"+c+"}"),c=(u?c.replace(F,""):c).replace(T,"$1").replace(U,"$1;"),c="function("+(r||"obj")+"){"+(r?"":"obj||(obj={});")+"var __t,__p=''"+(e?",__e=_.escape":"")+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}",r=he(function(){return we(i,"return "+c+o).apply(d,f) -}),r.source=c,r instanceof _e)throw r;return r},Z.trim=se,Z.trimLeft=function(n,t){return(n=null==n?"":Ee(n))?null==t?n.slice(h(n)):(t=Ee(t),n.slice(o(n,t))):n},Z.trimRight=function(n,t){return(n=null==n?"":Ee(n))?null==t?n.slice(0,g(n)+1):(t=Ee(t),n.slice(0,i(n,t)+1)):n},Z.trunc=function(n,t){var r=30,e="...";if(ue(t))var u="separator"in t?t.separator:u,r="length"in t?+t.length||0:r,e="omission"in t?Ee(t.omission):e;else null!=t&&(r=+t||0);if(n=null==n?"":Ee(n),r>=n.length)return n;var o=r-e.length; -if(1>o)return e;if(r=n.slice(0,o),null==u)return r+e;if(ie(u)){if(n.slice(o).search(u)){var i,f,a=n.slice(0,o);for(u.global||(u=ke(u.source,(M.exec(u)||"")+"g")),u.lastIndex=0;i=u.exec(a);)f=i.index;r=r.slice(0,null==f?o:f)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),-1n.indexOf(";")?n:n.replace(N,v))},Z.uniqueId=function(n){var t=++S;return Ee(null==n?"":n)+t},Z.all=Lr,Z.any=Yr,Z.detect=Br,Z.foldl=Zr,Z.foldr=Kr,Z.head=Er,Z.include=Wr,Z.inject=Zr,ye(Z,function(){var n={}; -return Jt(Z,function(t,r){Z.prototype[r]||(n[r]=t)}),n}(),false),Z.sample=function(n,t,r){n=xr(n);var e=n.length;return null==t||r?0t?0:+t||0,n.length),n)},Jt(Z,function(n,t){var r="sample"!=t;Z.prototype[t]||(Z.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new X(o,u):o})}),Z.VERSION=m,Z.prototype.chain=function(){return this.__chain__=true,this},Z.prototype.toJSON=Nr,Z.prototype.toString=function(){return Ee(this.__wrapped__) -},Z.prototype.value=Nr,Z.prototype.valueOf=Nr,jt(["join","pop","shift"],function(n){var t=Ie[n];Z.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new X(r,n):r}}),jt(["push","reverse","sort","unshift"],function(n){var t=Ie[n];Z.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),jt(["concat","splice"],function(n){var t=Ie[n];Z.prototype[n]=function(){return new X(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Z}var d,m="3.0.0-pre",b=1,_=2,w=4,j=8,A=16,x=32,k=64,E="__lodash@"+m+"__",O="Expected a function",I=Math.pow(2,32)-1,R=Math.pow(2,53)-1,S=0,C=/^[A-Z]+$/,F=/\b__p\+='';/g,T=/\b(__p\+=)''\+/g,U=/(__e\(.*?\)|\b__t\))\+'';/g,N=/&(?:amp|lt|gt|quot|#39|#96);/g,W=/[&<>"'`]/g,L=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,B=/<%=([\s\S]+?)%>/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,M=/\w*$/,z=/^\s*function[ \n\r\t]+\w/,q=/^0[xX]/,P=/^\[object .+?Constructor\]$/,Z=/[\xC0-\xFF]/g,K=/($^)/,V=/[.*+?^${}()|[\]\/\\]/g,Y=/\bthis\b/,J=/['\n\r\u2028\u2029\\]/g,X=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,G=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",H="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array window WinRTError".split(" "),Q="[object Arguments]",nt="[object Array]",tt="[object Boolean]",rt="[object Date]",et="[object Error]",ut="[object Number]",ot="[object Object]",it="[object RegExp]",ft="[object String]",at="[object ArrayBuffer]",ct="[object Float32Array]",lt="[object Float64Array]",pt="[object Int8Array]",st="[object Int16Array]",ht="[object Int32Array]",gt="[object Uint8Array]",vt="[object Uint8ClampedArray]",yt="[object Uint16Array]",dt="[object Uint32Array]",mt={}; +var e,u,r=mu({},t.imports,r.imports,Ft),o=ju(r),i=ce(r),f=0,r=t.interpolate||K,a="__p+='",r=ke((t.escape||K).source+"|"+r.source+"|"+(r===B?D:K).source+"|"+(t.evaluate||K).source+"|$","g");if(n.replace(r,function(t,r,o,i,c,l){return o||(o=i),a+=n.slice(f,l).replace(J,s),r&&(e=true,a+="'+__e("+r+")+'"),c&&(u=true,a+="';"+c+";\n__p+='"),o&&(a+="'+((__t=("+o+"))==null?'':__t)+'"),f=l+t.length,t}),a+="';",(r=t.variable)||(a="with(obj){"+a+"}"),a=(u?a.replace(F,""):a).replace(T,"$1").replace(N,"$1;"),a="function("+(r||"obj")+"){"+(r?"":"obj||(obj={});")+"var __t,__p=''"+(e?",__e=_.escape":"")+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",r=he(function(){return we(o,"return "+a).apply(d,i) +}),r.source=a,re(r))throw r;return r},Z.trim=se,Z.trimLeft=function(n,t){return(n=null==n?"":Ee(n))?null==t?n.slice(h(n)):(t=Ee(t),n.slice(o(n,t))):n},Z.trimRight=function(n,t){return(n=null==n?"":Ee(n))?null==t?n.slice(0,g(n)+1):(t=Ee(t),n.slice(0,i(n,t)+1)):n},Z.trunc=function(n,t){var r=30,e="...";if(ue(t))var u="separator"in t?t.separator:u,r="length"in t?+t.length||0:r,e="omission"in t?Ee(t.omission):e;else null!=t&&(r=+t||0);if(n=null==n?"":Ee(n),r>=n.length)return n;var o=r-e.length;if(1>o)return e; +if(r=n.slice(0,o),null==u)return r+e;if(ie(u)){if(n.slice(o).search(u)){var i,f,a=n.slice(0,o);for(u.global||(u=ke(u.source,(M.exec(u)||"")+"g")),u.lastIndex=0;i=u.exec(a);)f=i.index;r=r.slice(0,null==f?o:f)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),-1n.indexOf(";")?n:n.replace(U,v))},Z.uniqueId=function(n){var t=++S;return Ee(null==n?"":n)+t},Z.all=Lr,Z.any=Yr,Z.detect=Br,Z.foldl=Zr,Z.foldr=Kr,Z.head=Er,Z.include=Wr,Z.inject=Zr,ye(Z,function(){var n={}; +return Jt(Z,function(t,r){Z.prototype[r]||(n[r]=t)}),n}(),false),Z.sample=function(n,t,r){n=xr(n);var e=n.length;return null==t||r?0t?0:+t||0,n.length),n)},Jt(Z,function(n,t){var r="sample"!=t;Z.prototype[t]||(Z.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new X(o,u):o})}),Z.VERSION=m,Z.prototype.chain=function(){return this.__chain__=true,this},Z.prototype.toJSON=Ur,Z.prototype.toString=function(){return Ee(this.__wrapped__) +},Z.prototype.value=Ur,Z.prototype.valueOf=Ur,jt(["join","pop","shift"],function(n){var t=Ie[n];Z.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new X(r,n):r}}),jt(["push","reverse","sort","unshift"],function(n){var t=Ie[n];Z.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),jt(["concat","splice"],function(n){var t=Ie[n];Z.prototype[n]=function(){return new X(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Z}var d,m="3.0.0-pre",b=1,_=2,w=4,j=8,A=16,x=32,k=64,E="__lodash@"+m+"__",O="Expected a function",I=Math.pow(2,32)-1,R=Math.pow(2,53)-1,S=0,C=/^[A-Z]+$/,F=/\b__p\+='';/g,T=/\b(__p\+=)''\+/g,N=/(__e\(.*?\)|\b__t\))\+'';/g,U=/&(?:amp|lt|gt|quot|#39|#96);/g,W=/[&<>"'`]/g,L=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,B=/<%=([\s\S]+?)%>/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,M=/\w*$/,z=/^\s*function[ \n\r\t]+\w/,q=/^0[xX]/,P=/^\[object .+?Constructor\]$/,Z=/[\xC0-\xFF]/g,K=/($^)/,V=/[.*+?^${}()|[\]\/\\]/g,Y=/\bthis\b/,J=/['\n\r\u2028\u2029\\]/g,X=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,G=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",H="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array window WinRTError".split(" "),Q="[object Arguments]",nt="[object Array]",tt="[object Boolean]",rt="[object Date]",et="[object Error]",ut="[object Number]",ot="[object Object]",it="[object RegExp]",ft="[object String]",at="[object ArrayBuffer]",ct="[object Float32Array]",lt="[object Float64Array]",pt="[object Int8Array]",st="[object Int16Array]",ht="[object Int32Array]",gt="[object Uint8Array]",vt="[object Uint8ClampedArray]",yt="[object Uint16Array]",dt="[object Uint32Array]",mt={}; mt[Q]=mt[nt]=mt[ct]=mt[lt]=mt[pt]=mt[st]=mt[ht]=mt[gt]=mt[vt]=mt[yt]=mt[dt]=true,mt[at]=mt[tt]=mt[rt]=mt[et]=mt["[object Function]"]=mt["[object Map]"]=mt[ut]=mt[ot]=mt[it]=mt["[object Set]"]=mt[ft]=mt["[object WeakMap]"]=false;var bt={};bt[Q]=bt[nt]=bt[at]=bt[tt]=bt[rt]=bt[ct]=bt[lt]=bt[pt]=bt[st]=bt[ht]=bt[ut]=bt[ot]=bt[it]=bt[ft]=bt[gt]=bt[vt]=bt[yt]=bt[dt]=true,bt[et]=bt["[object Function]"]=bt["[object Map]"]=bt["[object Set]"]=bt["[object WeakMap]"]=false;var _t={leading:false,maxWait:0,trailing:false},wt={configurable:false,enumerable:false,value:null,writable:false},jt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},At={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},xt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"AE","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\xd7":" ","\xf7":" "},kt={"function":true,object:true},Et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ot=kt[typeof window]&&window||this,It=kt[typeof exports]&&exports&&!exports.nodeType&&exports,kt=kt[typeof module]&&module&&!module.nodeType&&module,Rt=It&&kt&&typeof global=="object"&&global; !Rt||Rt.global!==Rt&&Rt.window!==Rt&&Rt.self!==Rt||(Ot=Rt);var Rt=kt&&kt.exports===It&&It,St=y();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ot._=St, define(function(){return St})):It&&kt?Rt?(kt.exports=St)._=St:It._=St:Ot._=St}).call(this); \ No newline at end of file diff --git a/dist/lodash.underscore.js b/dist/lodash.underscore.js index b4069c374..ac4be7f44 100644 --- a/dist/lodash.underscore.js +++ b/dist/lodash.underscore.js @@ -12,6 +12,9 @@ /** Used as a safe reference for `undefined` in pre ES5 environments */ var undefined; + /** Used as the semantic version number */ + var VERSION = '3.0.0-pre'; + /** Used to compose bitmasks for wrapper metadata */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, @@ -21,17 +24,24 @@ PARTIAL_FLAG = 32, PARTIAL_RIGHT_FLAG = 64; - /** Used as the semantic version number */ - var version = '3.0.0-pre'; - /** Used as the property name for wrapper metadata */ - var expando = '__lodash@' + version + '__'; + var EXPANDO = '__lodash@' + VERSION + '__'; /** Used by methods to exit iteration */ - var breakIndicator = expando + 'breaker__'; + var breakIndicator = EXPANDO + 'breaker__'; /** Used as the TypeError message for "Functions" methods */ - var funcErrorText = 'Expected a function'; + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used as a reference for the max length of an array */ + var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + + /** + * Used as the maximum length of an array-like value. + * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) + * for more details. + */ + var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; /** Used to generate unique IDs */ var idCounter = 0; @@ -269,16 +279,6 @@ /** Used to resolve the decompiled source of functions */ var fnToString = Function.prototype.toString; - /** Used as a reference for the max length of an array */ - var maxArrayLength = Math.pow(2, 32) - 1; - - /** - * Used as the maximum length of an array-like value. - * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) - * for more details. - */ - var maxSafeInteger = Math.pow(2, 53) - 1; - /** Used to restore the original `_` reference in `_.noConflict` */ var oldDash = root._; @@ -792,7 +792,7 @@ */ function baseEach(collection, iterator) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { return baseForOwn(collection, iterator); } var index = -1, @@ -817,7 +817,7 @@ */ function baseEachRight(collection, iterator) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { return baseForOwnRight(collection, iterator); } var iterable = toIterable(collection); @@ -1182,7 +1182,7 @@ length = collection ? collection.length : 0, result = []; - if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { + if (typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) { result.length = length; } baseEach(collection, function(value) { @@ -1587,7 +1587,7 @@ isPartialRight = bitmask & PARTIAL_RIGHT_FLAG; if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } if (isPartial && !partialArgs.length) { bitmask &= ~PARTIAL_FLAG; @@ -1682,7 +1682,7 @@ */ function toIterable(collection) { var length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { return values(collection); } return collection || []; @@ -2347,34 +2347,34 @@ } /** - * Creates an object composed from arrays of `keys` and `values`. Provide + * Creates an object composed from arrays of property names and values. Provide * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` - * or two arrays, one of `keys` and one of corresponding `values`. + * or two arrays, one of property names and one of corresponding values. * * @static * @memberOf _ * @alias object * @category Array - * @param {Array} keys The array of keys. - * @param {Array} [values=[]] The array of values. + * @param {Array} props The array of property names. + * @param {Array} [vals=[]] The array of property values. * @returns {Object} Returns the new object. * @example * * _.zipObject(['fred', 'barney'], [30, 40]); * // => { 'fred': 30, 'barney': 40 } */ - function zipObject(keys, values) { + function zipObject(props, vals) { var index = -1, - length = keys ? keys.length : 0, + length = props ? props.length : 0, result = {}; - if (!values && length && !isArray(keys[0])) { - values = []; + if (!vals && length && !isArray(props[0])) { + vals = []; } while (++index < length) { - var key = keys[index]; - if (values) { - result[key] = values[index]; + var key = props[index]; + if (vals) { + result[key] = vals[index]; } else if (key) { result[key[0]] = key[1]; } @@ -2520,7 +2520,7 @@ var indexOf = getIndexOf(), length = collection ? collection.length : 0; - if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { + if (!(typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER)) { collection = values(collection); } return indexOf(collection, target) > -1; @@ -3306,11 +3306,11 @@ result = Array(length); while (++index < length) { - var value = collection[index], - rand = baseRandom(0, index); - - result[index] = result[rand]; - result[rand] = value; + var rand = baseRandom(0, index); + if (index != rand) { + result[index] = result[rand]; + } + result[rand] = collection[index]; } return result; } @@ -3337,7 +3337,7 @@ */ function size(collection) { var length = collection ? collection.length : 0; - return (typeof length == 'number' && length > -1 && length <= maxSafeInteger) + return (typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) ? length : keys(collection).length; } @@ -3539,7 +3539,7 @@ */ function after(n, func) { if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } n = nativeIsFinite(n = +n) ? n : 0; return function() { @@ -3567,7 +3567,7 @@ function before(n, func) { var result; if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } return function() { if (--n > 0) { @@ -3697,22 +3697,22 @@ function compose() { var funcs = arguments, length = funcs.length, - fromIndex = length - 1; + index = length - 1; if (!length) { return function() {}; } while (length--) { if (!isFunction(funcs[length])) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } } return function() { - var index = fromIndex, - result = funcs[index].apply(this, arguments); + length = index; + var result = funcs[length].apply(this, arguments); - while (index--) { - result = funcs[index].call(this, result); + while (length--) { + result = funcs[length].call(this, result); } return result; }; @@ -3790,7 +3790,7 @@ trailing = true; if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } wait = wait < 0 ? 0 : wait; if (options === true) { @@ -3908,7 +3908,7 @@ */ function defer(func) { if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } var args = slice(arguments, 1); return setTimeout(function() { func.apply(undefined, args); }, 1); @@ -3932,7 +3932,7 @@ */ function delay(func, wait) { if (!isFunction(func)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } var args = slice(arguments, 2); return setTimeout(function() { func.apply(undefined, args); }, wait); @@ -4010,7 +4010,7 @@ */ function negate(predicate) { if (!isFunction(predicate)) { - throw new TypeError(funcErrorText); + throw new TypeError(FUNC_ERROR_TEXT); } return function() { return !predicate.apply(this, arguments); @@ -4506,7 +4506,7 @@ return true; } var length = value.length; - if ((typeof length == 'number' && length > -1 && length <= maxSafeInteger) && + if ((typeof length == 'number' && length > -1 && length <= MAX_SAFE_INTEGER) && (isArray(value) || isString(value) || isArguments(value))) { return !length; } @@ -5164,7 +5164,7 @@ }); result.source = source; - if (result instanceof Error) { + if (isError(result)) { throw result; } return data ? result(data) : result; @@ -5214,7 +5214,7 @@ * return document.querySelectorAll(selector); * }); * - * if (elements instanceof Error) { + * if (_.isError(elements)) { * elements = []; * } */ @@ -5336,17 +5336,23 @@ * // => { 'name': 'barney', 'age': 36 } */ function matches(source) { - var props = keys(source), - propsLength = props.length; + var keyVals = pairs(source), + length = keyVals.length; return function(object) { - var length = propsLength; - if (length && object == null) { - return false; + var index = length; + if (object == null) { + return !index; } - while (length--) { - var key = props[length]; - if (!(object[key] === source[key] && hasOwnProperty.call(object, key))) { + while (index--) { + var keyVal = keyVals[index]; + if (object[keyVal[0]] !== keyVal[1]) { + return false + } + } + index = length; + while (index--) { + if (!hasOwnProperty.call(object, keyVals[index][0])) { return false } } @@ -5636,10 +5642,10 @@ iterator = baseCallback(iterator, thisArg, 1); var index = -1, - result = Array(nativeMin(n, maxArrayLength)); + result = Array(nativeMin(n, MAX_ARRAY_LENGTH)); while (++index < n) { - if (index < maxArrayLength) { + if (index < MAX_ARRAY_LENGTH) { result[index] = iterator(index); } else { iterator(index); @@ -5813,7 +5819,7 @@ * @memberOf _ * @type string */ - lodash.VERSION = version; + lodash.VERSION = VERSION; // add "Chaining" functions to the wrapper lodash.prototype.chain = wrapperChain; diff --git a/dist/lodash.underscore.min.js b/dist/lodash.underscore.min.js index 60c16ae4b..50faef651 100644 --- a/dist/lodash.underscore.min.js +++ b/dist/lodash.underscore.min.js @@ -3,43 +3,43 @@ * Lo-Dash 3.0.0-pre (Custom Build) lodash.com/license | Underscore.js 1.6.0 underscorejs.org/LICENSE * Build: `lodash underscore -o ./dist/lodash.underscore.js` */ -;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++te||typeof t=="undefined"){t=1;break n}if(te||typeof t=="undefined"){t=1;break n}if(tu(r,i)&&o.push(i)}return o}function b(n,r){var t=n?n.length:0;if(typeof t!="number"||-1>=t||t>at)return x(n,r,$t);for(var e=-1,u=P(n);++e=t||t>at){for(var t=$t(n),e=t.length;e--;){var u=t[e];if(r(n[u],u,n)===Mr)break}return n}for(e=P(n);t--&&r(e[t],t,n)!==Mr;);return n}function d(n,r){var t=true;return b(n,function(n,e,u){return(t=!!r(n,e,u))||Mr}),t}function j(n,r){var t=[];return b(n,function(n,e,u){r(n,e,u)&&t.push(n)}),t}function w(n,r,t){var e;return t(n,function(n,t,u){return r(n,t,u)?(e=n,Mr):void 0}),e}function A(n,r,t,e){e=(e||0)-1;for(var u=n.length,o=0,i=[];++eo(f,c)&&(t&&f.push(c),i.push(a))}return i}function B(n,r){return function(t,e,u){var o=r?r():{};if(e=wr(e,u,3),Bt(t)){u=-1;for(var i=t.length;++ur?0:r)}function G(r,t,e){var u=r?r.length:0;if(typeof e=="number")e=0>e?At(u+e,0):e||0;else if(e)return e=K(r,t),u&&r[e]===t?e:-1;return n(r,t,e)}function H(n,r,t){return J(n,null==r||t?1:0>r?0:r)}function J(n,r,t){var e=-1,u=n?n.length:0;for(r=null==r?0:+r||0,0>r?r=At(u+r,0):r>u&&(r=u),t=typeof t=="undefined"?u:+t||0,0>t?t=At(u+t,0):t>u&&(t=u),u=r>t?0:t-r,t=Array(u);++e>>1;t(n[o])u&&(u=i)}else r=wr(r,t,3),b(n,function(n,t,o){t=r(n,t,o),(t>e||-1/0===t&&t===u)&&(e=t,u=n)});return u}function er(n,r){return rr(n,Er(r))}function ur(n,r,t,e){return(Bt(n)?p:I)(n,wr(r,e,4),t,3>arguments.length,b)}function or(n,r,t,e){return(Bt(n)?s:I)(n,wr(r,e,4),t,3>arguments.length,_)}function ir(n){n=P(n);for(var r=-1,t=n.length,e=Array(t);++r=t||t>r?(f&&clearTimeout(f),t=s,f=p=s=Or,t&&(g=Rt(),a=n.apply(l,i),p||f||(i=l=null))):p=setTimeout(e,t)}function u(){p&&clearTimeout(p),f=p=s=Or,(v||h!==r)&&(g=Rt(),a=n.apply(l,i),p||f||(i=l=null))}function o(){if(i=arguments,c=Rt(),l=this,s=v&&(p||!y),false===h)var t=y&&!p;else{f||y||(g=c);var o=h-(c-g),m=0>=o||o>h;m?(f&&(f=clearTimeout(f)),g=c,a=n.apply(l,i)):f||(f=setTimeout(u,o))}return m&&p?p=clearTimeout(p):p||r===h||(p=setTimeout(e,r)),t&&(m=true,a=n.apply(l,i)),!m||p||f||(i=l=null),a -}var i,f,a,c,l,p,s,g=0,h=false,v=true;if(!vr(n))throw new TypeError(Ir);if(r=0>r?0:r,true===t)var y=true,v=false;else yr(t)&&(y=t.leading,h="maxWait"in t&&At(+t.maxWait||0,r),v="trailing"in t?t.trailing:v);return o.cancel=function(){p&&clearTimeout(p),f&&clearTimeout(f),f=p=s=Or},o}function cr(n){if(!vr(n))throw new TypeError(Ir);return function(){return!n.apply(this,arguments)}}function lr(n){return S(n,Fr,J(arguments,1))}function pr(n){if(null==n)return n;var r=arguments,t=0,e=r.length,u=typeof r[2];for("number"!=u&&"string"!=u||!r[3]||r[3][r[2]]!==r[1]||(e=2);++t"'`]/g,$r=/^\[object .+?Constructor\]$/,Rr=/($^)/,Ur=/[.*+?^${}()|[\]\/\\]/g,Wr=/['\n\r\u2028\u2029\\]/g,Dr="[object Arguments]",zr="[object Boolean]",Cr="[object Date]",Pr="[object Error]",Vr="[object Number]",Gr="[object Object]",Hr="[object RegExp]",Jr="[object String]",Kr={};Kr[Dr]=Kr["[object Array]"]=Kr["[object Float32Array]"]=Kr["[object Float64Array]"]=Kr["[object Int8Array]"]=Kr["[object Int16Array]"]=Kr["[object Int32Array]"]=Kr["[object Uint8Array]"]=Kr["[object Uint8ClampedArray]"]=Kr["[object Uint16Array]"]=Kr["[object Uint32Array]"]=true,Kr["[object ArrayBuffer]"]=Kr[zr]=Kr[Cr]=Kr[Pr]=Kr["[object Function]"]=Kr["[object Map]"]=Kr[Vr]=Kr[Gr]=Kr[Hr]=Kr["[object Set]"]=Kr[Jr]=Kr["[object WeakMap]"]=false; -var Lr={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Qr={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Xr={"function":true,object:true},Yr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Zr=Xr[typeof window]&&window||this,nt=Xr[typeof exports]&&exports&&!exports.nodeType&&exports,rt=Xr[typeof module]&&module&&!module.nodeType&&module,tt=nt&&rt&&typeof global=="object"&&global;!tt||tt.global!==tt&&tt.window!==tt&&tt.self!==tt||(Zr=tt); -var et=rt&&rt.exports===nt&&nt,ut=Array.prototype,ot=Object.prototype,it=Function.prototype.toString,ft=Math.pow(2,32)-1,at=Math.pow(2,53)-1,ct=Zr._,lt=ot.toString,pt=RegExp("^"+(null==lt?"":(lt+"").replace(Ur,"\\$&")).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),st=Math.ceil,gt=Math.floor,ht=ot.hasOwnProperty,vt=ut.push,yt=ot.propertyIsEnumerable,mt=ut.splice,bt=z(bt=Object.create)&&bt,_t=z(_t=Array.isArray)&&_t,dt=Zr.isFinite,jt=Zr.isNaN,wt=z(wt=Object.keys)&&wt,At=Math.max,xt=Math.min,Tt=z(Tt=Date.now)&&Tt,Et=Math.random,Ot={}; -!function(){var n={0:1,length:1};Ot.spliceObjects=(mt.call(n,0,1),!n[0])}(0,0),o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},bt||(v=function(){function n(){}return function(r){if(yr(r)){n.prototype=r;var t=new n;n.prototype=null}return t||Zr.Object()}}());var kt=H,St=V,Ft=B(function(n,r,t){ht.call(n,t)?n[t]++:n[t]=1}),Mt=B(function(n,r,t){ht.call(n,t)?n[t].push(r):n[t]=[r]}),It=B(function(n,r,t){n[t]=r}),Nt=B(function(n,r,t){n[t?0:1].push(r) -},function(){return[[],[]]}),qt=lr(function(n,r){var t;if(!vr(r))throw new TypeError(Ir);return function(){return 0<--n?t=r.apply(this,arguments):r=null,t}},2);hr(arguments)||(hr=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ht.call(n,"callee")&&!yt.call(n,"callee")||false});var Bt=_t||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&"[object Array]"==lt.call(n)||false};vr(/x/)&&(vr=function(n){return typeof n=="function"&&"[object Function]"==lt.call(n)});var $t=wt?function(n){return yr(n)?wt(n):[] -}:C,Rt=Tt||function(){return(new Date).getTime()};i.prototype=o.prototype,o.after=function(n,r){if(!vr(r))throw new TypeError(Ir);return n=dt(n=+n)?n:0,function(){return 1>--n?r.apply(this,arguments):void 0}},o.bind=function(n,r){return 3>arguments.length?W(n,kr,r):S(n,kr|Fr,J(arguments,2),r)},o.bindAll=function(n){for(var r=n,t=1r?0:r) -},o.intersection=function(){for(var n=[],r=-1,t=arguments.length;++ri(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},o.invert=function(n){for(var r=-1,t=$t(n),e=t.length,u={};++ro?0:o>>>0);for(t=wr(t,e,3),b(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].c;return i},o.take=St,o.tap=function(n,r){return r(n),n},o.throttle=function(n,r,t){var e=true,u=true;if(!vr(n))throw new TypeError(Ir);return false===t?e=false:yr(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),ar(n,r,{leading:e,maxWait:r,trailing:u}) -},o.times=function(n,r,t){n=dt(n=+n)&&-1r?0:r))},o.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?At(e+t,0):xt(t||0,e-1))+1);e--;)if(n[e]===r)return e;return-1},o.max=tr,o.min=function(n,r,t){var e=1/0,u=e,o=typeof r;if("number"!=o&&"string"!=o||!t||t[r]!==n||(r=null),null==r&&Bt(n))for(t=-1,o=n.length;++tn.indexOf(";")?n:n.replace(qr,u))},o.uniqueId=function(n){var r=++Nr+"";return n?n+r:r},o.all=X,o.any=fr,o.detect=Z,o.foldl=ur,o.foldr=or,o.head=V,o.include=Q,o.inject=ur,o.sample=function(n,r,t){n=P(n);var e=n.length;return null==r||t?0r?0:+r||0,n.length),n)},Tr(pr({},o)),o.VERSION="3.0.0-pre",o.prototype.chain=function(){return this.__chain__=true,this -},o.prototype.value=function(){return this.__wrapped__},f("pop push reverse shift sort splice unshift".split(" "),function(n){var r=ut[n];o.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Ot.spliceObjects||0!==n.length||delete n[0],this}}),f(["concat","join","slice"],function(n){var r=ut[n];o.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zr._=o, define("underscore",function(){return o -})):nt&&rt?et?(rt.exports=o)._=o:nt._=o:Zr._=o}).call(this); \ No newline at end of file +return false}function h(n,r,t){if(typeof n!="function")return Tr;if(typeof r=="undefined")return n;switch(t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)};case 5:return function(t,e,u,o,i){return n.call(r,t,e,u,o,i)}}return function(){return n.apply(r,arguments)}}function v(n){return mr(n)?dt(n):{}}function y(n){function r(){for(var n=arguments.length,t=n,n=Array(n);t--;)n[t]=arguments[t];if(i){for(var t=n,n=e.length,c=-1,l=Tt(t.length-n,0),p=-1,s=i.length,g=Array(l+s);++pu(r,i)&&o.push(i)}return o}function b(n,r){var t=n?n.length:0;if(typeof t!="number"||-1>=t||t>$r)return x(n,r,Ut);for(var e=-1,u=P(n);++e=t||t>$r){for(var t=Ut(n),e=t.length;e--;){var u=t[e];if(r(n[u],u,n)===Nr)break}return n}for(e=P(n);t--&&r(e[t],t,n)!==Nr;);return n}function d(n,r){var t=true;return b(n,function(n,e,u){return(t=!!r(n,e,u))||Nr}),t}function j(n,r){var t=[];return b(n,function(n,e,u){r(n,e,u)&&t.push(n)}),t}function w(n,r,t){var e;return t(n,function(n,t,u){return r(n,t,u)?(e=n,Nr):void 0}),e}function A(n,r,t,e){e=(e||0)-1;for(var u=n.length,o=0,i=[];++eo(f,c)&&(t&&f.push(c),i.push(a))}return i}function B(n,r){return function(t,e,u){var o=r?r():{};if(e=xr(e,u,3),Rt(t)){u=-1;for(var i=t.length;++ur?0:r)}function G(r,t,e){var u=r?r.length:0;if(typeof e=="number")e=0>e?Tt(u+e,0):e||0;else if(e)return e=K(r,t),u&&r[e]===t?e:-1;return n(r,t,e)}function H(n,r,t){return J(n,null==r||t?1:0>r?0:r)}function J(n,r,t){var e=-1,u=n?n.length:0;for(r=null==r?0:+r||0,0>r?r=Tt(u+r,0):r>u&&(r=u),t=typeof t=="undefined"?u:+t||0,0>t?t=Tt(u+t,0):t>u&&(t=u),u=r>t?0:t-r,t=Array(u);++e>>1;t(n[o])u&&(u=i)}else r=xr(r,t,3),b(n,function(n,t,o){t=r(n,t,o),(t>e||-1/0===t&&t===u)&&(e=t,u=n)});return u}function er(n,r){return rr(n,kr(r))}function ur(n,r,t,e){return(Rt(n)?p:I)(n,xr(r,e,4),t,3>arguments.length,b)}function or(n,r,t,e){return(Rt(n)?s:I)(n,xr(r,e,4),t,3>arguments.length,_)}function ir(n){n=P(n);for(var r=-1,t=n.length,e=Array(t);++r=t||t>r?(f&&clearTimeout(f),t=s,f=p=s=Sr,t&&(g=Wt(),a=n.apply(l,i),p||f||(i=l=null))):p=setTimeout(e,t)}function u(){p&&clearTimeout(p),f=p=s=Sr,(v||h!==r)&&(g=Wt(),a=n.apply(l,i),p||f||(i=l=null))}function o(){if(i=arguments,c=Wt(),l=this,s=v&&(p||!y),false===h)var t=y&&!p;else{f||y||(g=c);var o=h-(c-g),m=0>=o||o>h;m?(f&&(f=clearTimeout(f)),g=c,a=n.apply(l,i)):f||(f=setTimeout(u,o))}return m&&p?p=clearTimeout(p):p||r===h||(p=setTimeout(e,r)),t&&(m=true,a=n.apply(l,i)),!m||p||f||(i=l=null),a +}var i,f,a,c,l,p,s,g=0,h=false,v=true;if(!yr(n))throw new TypeError(qr);if(r=0>r?0:r,true===t)var y=true,v=false;else mr(t)&&(y=t.leading,h="maxWait"in t&&Tt(+t.maxWait||0,r),v="trailing"in t?t.trailing:v);return o.cancel=function(){p&&clearTimeout(p),f&&clearTimeout(f),f=p=s=Sr},o}function cr(n){if(!yr(n))throw new TypeError(qr);return function(){return!n.apply(this,arguments)}}function lr(n){return S(n,Ir,J(arguments,1))}function pr(n){if(null==n)return n;var r=arguments,t=0,e=r.length,u=typeof r[2];for("number"!=u&&"string"!=u||!r[3]||r[3][r[2]]!==r[1]||(e=2);++t"'`]/g,Dr=/^\[object .+?Constructor\]$/,zr=/($^)/,Cr=/[.*+?^${}()|[\]\/\\]/g,Pr=/['\n\r\u2028\u2029\\]/g,Vr="[object Arguments]",Gr="[object Boolean]",Hr="[object Date]",Jr="[object Error]",Kr="[object Number]",Lr="[object Object]",Qr="[object RegExp]",Xr="[object String]",Yr={}; +Yr[Vr]=Yr["[object Array]"]=Yr["[object Float32Array]"]=Yr["[object Float64Array]"]=Yr["[object Int8Array]"]=Yr["[object Int16Array]"]=Yr["[object Int32Array]"]=Yr["[object Uint8Array]"]=Yr["[object Uint8ClampedArray]"]=Yr["[object Uint16Array]"]=Yr["[object Uint32Array]"]=true,Yr["[object ArrayBuffer]"]=Yr[Gr]=Yr[Hr]=Yr[Jr]=Yr["[object Function]"]=Yr["[object Map]"]=Yr[Kr]=Yr[Lr]=Yr[Qr]=Yr["[object Set]"]=Yr[Xr]=Yr["[object WeakMap]"]=false;var Zr={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},nt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},rt={"function":true,object:true},tt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},et=rt[typeof window]&&window||this,ut=rt[typeof exports]&&exports&&!exports.nodeType&&exports,ot=rt[typeof module]&&module&&!module.nodeType&&module,it=ut&&ot&&typeof global=="object"&&global; +!it||it.global!==it&&it.window!==it&&it.self!==it||(et=it);var ft=ot&&ot.exports===ut&&ut,at=Array.prototype,ct=Object.prototype,lt=Function.prototype.toString,pt=et._,st=ct.toString,gt=RegExp("^"+(null==st?"":(st+"").replace(Cr,"\\$&")).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=Math.ceil,vt=Math.floor,yt=ct.hasOwnProperty,mt=at.push,bt=ct.propertyIsEnumerable,_t=at.splice,dt=z(dt=Object.create)&&dt,jt=z(jt=Array.isArray)&&jt,wt=et.isFinite,At=et.isNaN,xt=z(xt=Object.keys)&&xt,Tt=Math.max,Et=Math.min,Ot=z(Ot=Date.now)&&Ot,kt=Math.random,St={}; +!function(){var n={0:1,length:1};St.spliceObjects=(_t.call(n,0,1),!n[0])}(0,0),o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},dt||(v=function(){function n(){}return function(r){if(mr(r)){n.prototype=r;var t=new n;n.prototype=null}return t||et.Object()}}());var Ft=H,Mt=V,It=B(function(n,r,t){yt.call(n,t)?n[t]++:n[t]=1}),Nt=B(function(n,r,t){yt.call(n,t)?n[t].push(r):n[t]=[r]}),qt=B(function(n,r,t){n[t]=r}),Bt=B(function(n,r,t){n[t?0:1].push(r) +},function(){return[[],[]]}),$t=lr(function(n,r){var t;if(!yr(r))throw new TypeError(qr);return function(){return 0<--n?t=r.apply(this,arguments):r=null,t}},2);hr(arguments)||(hr=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&yt.call(n,"callee")&&!bt.call(n,"callee")||false});var Rt=jt||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&"[object Array]"==st.call(n)||false};yr(/x/)&&(yr=function(n){return typeof n=="function"&&"[object Function]"==st.call(n)});var Ut=xt?function(n){return mr(n)?xt(n):[] +}:C,Wt=Ot||function(){return(new Date).getTime()};i.prototype=o.prototype,o.after=function(n,r){if(!yr(r))throw new TypeError(qr);return n=wt(n=+n)?n:0,function(){return 1>--n?r.apply(this,arguments):void 0}},o.bind=function(n,r){return 3>arguments.length?W(n,Fr,r):S(n,Fr|Ir,J(arguments,2),r)},o.bindAll=function(n){for(var r=n,t=1r?0:r) +},o.intersection=function(){for(var n=[],r=-1,t=arguments.length;++ri(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},o.invert=function(n){for(var r=-1,t=Ut(n),e=t.length,u={};++ro?0:o>>>0);for(t=xr(t,e,3),b(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].c;return i},o.take=Mt,o.tap=function(n,r){return r(n),n},o.throttle=function(n,r,t){var e=true,u=true;if(!yr(n))throw new TypeError(funcErrorText);return false===t?e=false:mr(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),ar(n,r,{leading:e,maxWait:r,trailing:u}) +},o.times=function(n,r,t){n=wt(n=+n)&&-1r?0:r))},o.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Tt(e+t,0):Et(t||0,e-1))+1);e--;)if(n[e]===r)return e;return-1},o.max=tr,o.min=function(n,r,t){var e=1/0,u=e,o=typeof r;if("number"!=o&&"string"!=o||!t||t[r]!==n||(r=null),null==r&&Rt(n))for(t=-1,o=n.length;++tn.indexOf(";")?n:n.replace(Ur,u))},o.uniqueId=function(n){var r=++Rr+"";return n?n+r:r},o.all=X,o.any=fr,o.detect=Z,o.foldl=ur,o.foldr=or,o.head=V,o.include=Q,o.inject=ur,o.sample=function(n,r,t){n=P(n);var e=n.length;return null==r||t?0r?0:+r||0,n.length),n)},Or(pr({},o)),o.VERSION="3.0.0-pre",o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.value=function(){return this.__wrapped__ +},f("pop push reverse shift sort splice unshift".split(" "),function(n){var r=at[n];o.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),St.spliceObjects||0!==n.length||delete n[0],this}}),f(["concat","join","slice"],function(n){var r=at[n];o.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(et._=o, define("underscore",function(){return o +})):ut&&ot?ft?(ot.exports=o)._=o:ut._=o:et._=o}).call(this); \ No newline at end of file