lodash-rails 1.2.1 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +1,48 @@
1
1
  /**
2
2
  * @license
3
- * Lo-Dash 1.2.1 (Custom Build) lodash.com/license
3
+ * Lo-Dash 1.3.1 (Custom Build) lodash.com/license
4
4
  * Build: `lodash modern -o ./dist/lodash.js`
5
5
  * Underscore.js 1.4.4 underscorejs.org/LICENSE
6
6
  */
7
- ;(function(n){function t(o){function f(n){if(!n||ue.call(n)!=A)return a;var t=n.valueOf,e=typeof t=="function"&&(e=Zt(t))&&Zt(e);return e?n==e||Zt(n)==e:Y(n)}function D(n,t,e){if(!n||!R[typeof n])return n;t=t&&typeof e=="undefined"?t:U.createCallback(t,e);for(var r=-1,u=R[typeof n]?be(n):[],o=u.length;++r<o&&(e=u[r],!(t(n[e],e,n)===a)););return n}function z(n,t,e){var r;if(!n||!R[typeof n])return n;t=t&&typeof e=="undefined"?t:U.createCallback(t,e);for(r in n)if(t(n[r],r,n)===a)break;return n}function P(n,t,e){var r,u=n,a=u;
8
- if(!u)return a;for(var o=arguments,i=0,f=typeof e=="number"?2:o.length;++i<f;)if((u=o[i])&&R[typeof u]){var c=u.length;if(r=-1,me(u))for(;++r<c;)"undefined"==typeof a[r]&&(a[r]=u[r]);else for(var l=-1,p=R[typeof u]?be(u):[],c=p.length;++l<c;)r=p[l],"undefined"==typeof a[r]&&(a[r]=u[r])}return a}function K(n,t,e){var r,u=n,a=u;if(!u)return a;var o=arguments,i=0,f=typeof e=="number"?2:o.length;if(3<f&&"function"==typeof o[f-2])var c=U.createCallback(o[--f-1],o[f--],2);else 2<f&&"function"==typeof o[f-1]&&(c=o[--f]);
9
- for(;++i<f;)if((u=o[i])&&R[typeof u]){var l=u.length;if(r=-1,me(u))for(;++r<l;)a[r]=c?c(a[r],u[r]):u[r];else for(var p=-1,s=R[typeof u]?be(u):[],l=s.length;++p<l;)r=s[p],a[r]=c?c(a[r],u[r]):u[r]}return a}function M(n){var t,e=[];if(!n||!R[typeof n])return e;for(t in n)ne.call(n,t)&&e.push(t);return e}function U(n){return n&&typeof n=="object"&&!me(n)&&ne.call(n,"__wrapped__")?n:new W(n)}function V(n){var t=n.length,e=t>=s;if(e)for(var r={},u=-1;++u<t;){var a=p+n[u];(r[a]||(r[a]=[])).push(n[u])}return function(t){if(e){var u=p+t;
10
- return r[u]&&-1<xt(r[u],t)}return-1<xt(n,t)}}function G(n){return n.charCodeAt(0)}function H(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function J(n,t,e,r){function a(){var r=arguments,l=i?this:t;return o||(n=t[f]),e.length&&(r=r.length?(r=ge.call(r),c?r.concat(e):e.concat(r)):e),this instanceof a?(X.prototype=n.prototype,l=new X,X.prototype=u,r=n.apply(l,r),ot(r)?r:l):n.apply(l,r)}var o=at(n),i=!e,f=t;if(i){var c=r;
11
- e=t}else if(!o){if(!r)throw new Vt;t=n}return a}function L(n){return"\\"+T[n]}function Q(n){return de[n]}function W(n){this.__wrapped__=n}function X(){}function Y(n){var t=a;if(!n||ue.call(n)!=A)return t;var e=n.constructor;return(at(e)?e instanceof e:1)?(z(n,function(n,e){t=e}),t===a||ne.call(n,t)):t}function Z(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Rt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function nt(n){return _e[n]}function tt(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=a),typeof r=="function"){if(r=typeof u=="undefined"?r:U.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
12
- f=n}if(u=ot(f)){var c=ue.call(f);if(!F[c])return f;var l=me(f)}if(!u||!t)return u?l?Z(f):K({},f):f;switch(u=ye[c],c){case I:case N:return new u(+f);case S:case B:return new u(f);case $:return u(f.source,b.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(ne.call(n,"index")&&(f.index=n.index),ne.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?yt:D)(n,function(n,u){f[u]=tt(n,t,r,e,o,i)}),f}function et(n){var t=[];return z(n,function(n,e){at(n)&&t.push(e)
13
- }),t.sort()}function rt(n){for(var t=-1,e=be(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function ut(n,t,e,o,i,f){var c=e===l;if(typeof e=="function"&&!c){e=U.createCallback(e,o,2);var p=e(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return a;if(n==u||t==u)return n===t;if(v=ue.call(n),s=ue.call(t),v==O&&(v=A),s==O&&(s=A),v!=s)return a;switch(v){case I:case N:return+n==+t;
14
- case S:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case $:case B:return n==Ut(t)}if(s=v==E,!s){if(ne.call(n,"__wrapped__")||ne.call(t,"__wrapped__"))return ut(n.__wrapped__||n,t.__wrapped__||t,e,o,i,f);if(v!=A)return a;var v=n.constructor,g=t.constructor;if(v!=g&&(!at(v)||!(v instanceof v&&at(g)&&g instanceof g)))return a}for(i||(i=[]),f||(f=[]),v=i.length;v--;)if(i[v]==n)return f[v]==t;var y=0,p=r;if(i.push(n),f.push(t),s){if(v=n.length,y=t.length,p=y==n.length,!p&&!c)return p;for(;y--;)if(s=v,g=t[y],c)for(;s--&&!(p=ut(n[s],g,e,o,i,f)););else if(!(p=ut(n[y],g,e,o,i,f)))break;
15
- return p}return z(t,function(t,r,u){return ne.call(u,r)?(y++,p=ne.call(n,r)&&ut(n[r],t,e,o,i,f)):void 0}),p&&!c&&z(n,function(n,t,e){return ne.call(e,t)?p=-1<--y:void 0}),p}function at(n){return typeof n=="function"}function ot(n){return n?R[typeof n]:a}function it(n){return typeof n=="number"||ue.call(n)==S}function ft(n){return typeof n=="string"||ue.call(n)==B}function ct(n,t,e){var r=arguments,u=0,a=2;if(!ot(n))return n;if(e===l)var o=r[3],i=r[4],c=r[5];else i=[],c=[],typeof e!="number"&&(a=r.length),3<a&&"function"==typeof r[a-2]?o=U.createCallback(r[--a-1],r[a--],2):2<a&&"function"==typeof r[a-1]&&(o=r[--a]);
16
- for(;++u<a;)(me(r[u])?yt:D)(r[u],function(t,e){var r,u,a=t,p=n[e];if(t&&((u=me(t))||f(t))){for(a=i.length;a--;)if(r=i[a]==t){p=c[a];break}if(!r){var s;o&&(a=o(p,t),s=typeof a!="undefined")&&(p=a),s||(p=u?me(p)?p:[]:f(p)?p:{}),i.push(t),c.push(p),s||(p=ct(p,t,l,o,i,c))}}else o&&(a=o(p,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(p=a);n[e]=p});return n}function lt(n){for(var t=-1,e=be(n),r=e.length,u=Rt(r);++t<r;)u[t]=n[e[t]];return u}function pt(n,t,e){var r=-1,u=n?n.length:0,o=a;return e=(0>e?le(0,u+e):e)||0,typeof u=="number"?o=-1<(ft(n)?n.indexOf(t,e):xt(n,t,e)):D(n,function(n){return++r<e?void 0:!(o=n===t)
17
- }),o}function st(n,t,e){var u=r;t=U.createCallback(t,e),e=-1;var a=n?n.length:0;if(typeof a=="number")for(;++e<a&&(u=!!t(n[e],e,n)););else D(n,function(n,e,r){return u=!!t(n,e,r)});return u}function vt(n,t,e){var r=[];t=U.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var a=n[e];t(a,e,n)&&r.push(a)}else D(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function gt(n,t,e){t=U.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return D(n,function(n,e,r){return t(n,e,r)?(u=n,a):void 0
18
- }),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function yt(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:U.createCallback(t,e),typeof u=="number")for(;++r<u&&t(n[r],r,n)!==a;);else D(n,t);return n}function ht(n,t,e){var r=-1,u=n?n.length:0;if(t=U.createCallback(t,e),typeof u=="number")for(var a=Rt(u);++r<u;)a[r]=t(n[r],r,n);else a=[],D(n,function(n,e,u){a[++r]=t(n,e,u)});return a}function mt(n,t,e){var r=-1/0,u=r;if(!t&&me(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o>u&&(u=o)
19
- }}else t=!t&&ft(n)?G:U.createCallback(t,e),yt(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function bt(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Rt(r);++e<r;)u[e]=n[e][t];return u||ht(n,t)}function dt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=U.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else D(n,function(n,r,o){e=u?(u=a,n):t(e,n,r,o)});return e}function _t(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;
20
- if(typeof u!="number")var i=be(n),u=i.length;return t=U.createCallback(t,r,4),yt(n,function(r,f,c){f=i?i[--u]:--u,e=o?(o=a,n[f]):t(e,n[f],f,c)}),e}function kt(n,t,e){var r;t=U.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else D(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function wt(n){for(var t=-1,e=n?n.length:0,r=Xt.apply(Gt,ge.call(arguments,1)),r=V(r),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u}function jt(n,t,e){if(n){var r=0,a=n.length;
21
- if(typeof t!="number"&&t!=u){var o=-1;for(t=U.createCallback(t,e);++o<a&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[0];return Z(n,0,pe(le(0,r),a))}}function Ct(n,t,e,r){var o=-1,i=n?n.length:0,f=[];for(typeof t!="boolean"&&t!=u&&(r=e,e=t,t=a),e!=u&&(e=U.createCallback(e,r));++o<i;)r=n[o],e&&(r=e(r,o,n)),me(r)?te.apply(f,t?r:Ct(r)):f.push(r);return f}function xt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?le(0,u+e):e||0)-1;else if(e)return r=Et(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;
22
- return-1}function Ot(n,t,e){if(typeof t!="number"&&t!=u){var r=0,a=-1,o=n?n.length:0;for(t=U.createCallback(t,e);++a<o&&t(n[a],a,n);)r++}else r=t==u||e?1:le(0,t);return Z(n,r)}function Et(n,t,e,r){var u=0,a=n?n.length:u;for(e=e?U.createCallback(e,r,1):$t,t=e(t);u<a;)r=u+a>>>1,e(n[r])<t?u=r+1:a=r;return u}function It(n,t,e,r){var o=-1,i=n?n.length:0,f=[],c=f;typeof t!="boolean"&&t!=u&&(r=e,e=t,t=a);var l=!t&&i>=s;if(l)var v={};for(e!=u&&(c=[],e=U.createCallback(e,r));++o<i;){r=n[o];var g=e?e(r,o,n):r;
23
- if(l)var y=p+g,y=v[y]?!(c=v[y]):c=v[y]=[];(t?!o||c[c.length-1]!==g:y||0>xt(c,g))&&((e||l)&&c.push(g),f.push(r))}return f}function Nt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function St(n,t){return he.fastBind||ae&&2<arguments.length?ae.call.apply(ae,arguments):J(n,t,ge.call(arguments,2))}function At(n){var t=ge.call(arguments,1);return re(function(){n.apply(e,t)},1)}function $t(n){return n}function Bt(n){yt(et(n),function(t){var e=U[t]=n[t];U.prototype[t]=function(){var n=this.__wrapped__,t=[n];
24
- return te.apply(t,arguments),t=e.apply(U,t),n&&typeof n=="object"&&n==t?this:new W(t)}})}function Ft(){return this.__wrapped__}o=o?q.defaults(n.Object(),o,q.pick(n,x)):n;var Rt=o.Array,Tt=o.Boolean,qt=o.Date,Dt=o.Function,zt=o.Math,Pt=o.Number,Kt=o.Object,Mt=o.RegExp,Ut=o.String,Vt=o.TypeError,Gt=Rt(),Ht=Kt(),Jt=o._,Lt=Mt("^"+Ut(Ht.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Qt=zt.ceil,Wt=o.clearTimeout,Xt=Gt.concat,Yt=zt.floor,Zt=Lt.test(Zt=Kt.getPrototypeOf)&&Zt,ne=Ht.hasOwnProperty,te=Gt.push,ee=o.setImmediate,re=o.setTimeout,ue=Ht.toString,ae=Lt.test(ae=ue.bind)&&ae,oe=Lt.test(oe=Rt.isArray)&&oe,ie=o.isFinite,fe=o.isNaN,ce=Lt.test(ce=Kt.keys)&&ce,le=zt.max,pe=zt.min,se=o.parseInt,ve=zt.random,ge=Gt.slice,zt=Lt.test(o.attachEvent),zt=ae&&!/\n|true/.test(ae+zt),ye={};
25
- ye[E]=Rt,ye[I]=Tt,ye[N]=qt,ye[A]=Kt,ye[S]=Pt,ye[$]=Mt,ye[B]=Ut;var he=U.support={};he.fastBind=ae&&!zt,U.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:U}},W.prototype=U.prototype;var me=oe,be=ce?function(n){return ot(n)?ce(n):[]}:M,de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_e=rt(de);return zt&&i&&typeof ee=="function"&&(At=St(ee,o)),Tt=8==se(_+"08")?se:function(n,t){return se(ft(n)?n.replace(k,""):n,t||0)},U.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
26
- }},U.assign=K,U.at=function(n){for(var t=-1,e=Xt.apply(Gt,ge.call(arguments,1)),r=e.length,u=Rt(r);++t<r;)u[t]=n[e[t]];return u},U.bind=St,U.bindAll=function(n){for(var t=1<arguments.length?Xt.apply(Gt,ge.call(arguments,1)):et(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=St(n[u],n)}return n},U.bindKey=function(n,t){return J(n,t,ge.call(arguments,2),l)},U.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},U.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];
27
- return t[0]}},U.countBy=function(n,t,e){var r={};return t=U.createCallback(t,e),yt(n,function(n,e,u){e=Ut(t(n,e,u)),ne.call(r,e)?r[e]++:r[e]=1}),r},U.createCallback=function(n,t,e){if(n==u)return $t;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var o=be(n);return function(t){for(var e=o.length,r=a;e--&&(r=ut(t[o[e]],n[o[e]],l)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)
28
- }:function(e,r,u){return n.call(t,e,r,u)}:n},U.debounce=function(n,t,e){function o(){f=p=u,s&&(c=n.apply(l,i))}var i,f,c,l,p,s=r;if(e===r)var v=r,s=a;else e&&R[typeof e]&&(v=e.leading,s="trailing"in e?e.trailing:s);return function(){return i=arguments,l=this,Wt(p),!f&&v?(f=r,c=n.apply(l,i)):p=re(o,t),c}},U.defaults=P,U.defer=At,U.delay=function(n,t){var r=ge.call(arguments,2);return re(function(){n.apply(e,r)},t)},U.difference=wt,U.filter=vt,U.flatten=Ct,U.forEach=yt,U.forIn=z,U.forOwn=D,U.functions=et,U.groupBy=function(n,t,e){var r={};
29
- return t=U.createCallback(t,e),yt(n,function(n,e,u){e=Ut(t(n,e,u)),(ne.call(r,e)?r[e]:r[e]=[]).push(n)}),r},U.initial=function(n,t,e){if(!n)return[];var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=U.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=t==u||e?1:t||r;return Z(n,0,pe(le(0,a-r),a))},U.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=a>=s,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=p+c,l=r[0][l]?!(f=r[0][l]):f=r[0][l]=[];if(l||0>xt(f,c)){o&&f.push(c);
30
- for(var v=e;--v;)if(!(r[v]||(r[v]=V(t[v])))(c))continue n;i.push(c)}}return i},U.invert=rt,U.invoke=function(n,t){var e=ge.call(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Rt(typeof a=="number"?a:0);return yt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},U.keys=be,U.map=ht,U.max=mt,U.memoize=function(n,t){var e={};return function(){var r=p+(t?t.apply(this,arguments):arguments[0]);return ne.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},U.merge=ct,U.min=function(n,t,e){var r=1/0,u=r;
31
- if(!t&&me(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o<u&&(u=o)}}else t=!t&&ft(n)?G:U.createCallback(t,e),yt(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},U.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=U.createCallback(t,e);else var a=Xt.apply(Gt,ge.call(arguments,1));return z(n,function(n,e,o){(r?!t(n,e,o):0>xt(a,e))&&(u[e]=n)}),u},U.once=function(n){var t,e;return function(){return t?e:(t=r,e=n.apply(this,arguments),n=u,e)}},U.pairs=function(n){for(var t=-1,e=be(n),r=e.length,u=Rt(r);++t<r;){var a=e[t];
32
- u[t]=[a,n[a]]}return u},U.partial=function(n){return J(n,ge.call(arguments,1))},U.partialRight=function(n){return J(n,ge.call(arguments,1),u,l)},U.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,a=Xt.apply(Gt,ge.call(arguments,1)),o=ot(n)?a.length:0;++u<o;){var i=a[u];i in n&&(r[i]=n[i])}else t=U.createCallback(t,e),z(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},U.pluck=bt,U.range=function(n,t,e){n=+n||0,e=+e||1,t==u&&(t=n,n=0);var r=-1;t=le(0,Qt((t-n)/e));for(var a=Rt(t);++r<t;)a[r]=n,n+=e;
33
- return a},U.reject=function(n,t,e){return t=U.createCallback(t,e),vt(n,function(n,e,r){return!t(n,e,r)})},U.rest=Ot,U.shuffle=function(n){var t=-1,e=n?n.length:0,r=Rt(typeof e=="number"?e:0);return yt(n,function(n){var e=Yt(ve()*(++t+1));r[t]=r[e],r[e]=n}),r},U.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,a=Rt(typeof u=="number"?u:0);for(t=U.createCallback(t,e),yt(n,function(n,e,u){a[++r]={a:t(n,e,u),b:r,c:n}}),u=a.length,a.sort(H);u--;)a[u]=a[u].c;return a},U.tap=function(n,t){return t(n),n},U.throttle=function(n,t,e){function o(){l=u,v&&(p=new qt,f=n.apply(c,i))
34
- }var i,f,c,l,p=0,s=r,v=r;return e===a?s=a:e&&R[typeof e]&&(s="leading"in e?e.leading:s,v="trailing"in e?e.trailing:v),function(){var e=new qt;!l&&!s&&(p=e);var r=t-(e-p);return i=arguments,c=this,0<r?l||(l=re(o,r)):(Wt(l),l=u,p=e,f=n.apply(c,i)),f}},U.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Rt(n);for(t=U.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},U.toArray=function(n){return n&&typeof n.length=="number"?Z(n):lt(n)},U.union=function(n){return me(n)||(arguments[0]=n?ge.call(n):Gt),It(Xt.apply(Gt,arguments))
35
- },U.uniq=It,U.unzip=function(n){for(var t=-1,e=n?n.length:0,r=e?mt(bt(n,"length")):0,u=Rt(r);++t<e;)for(var a=-1,o=n[t];++a<r;)(u[a]||(u[a]=Rt(e)))[t]=o[a];return u},U.values=lt,U.where=vt,U.without=function(n){return wt(n,ge.call(arguments,1))},U.wrap=function(n,t){return function(){var e=[n];return te.apply(e,arguments),t.apply(this,e)}},U.zip=function(n){for(var t=-1,e=n?mt(bt(arguments,"length")):0,r=Rt(e);++t<e;)r[t]=bt(arguments,t);return r},U.zipObject=Nt,U.collect=ht,U.drop=Ot,U.each=yt,U.extend=K,U.methods=et,U.object=Nt,U.select=vt,U.tail=Ot,U.unique=It,Bt(U),U.clone=tt,U.cloneDeep=function(n,t,e){return tt(n,r,t,e)
36
- },U.contains=pt,U.escape=function(n){return n==u?"":Ut(n).replace(j,Q)},U.every=st,U.find=gt,U.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=U.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},U.findKey=function(n,t,e){var r;return t=U.createCallback(t,e),D(n,function(n,e,u){return t(n,e,u)?(r=e,a):void 0}),r},U.has=function(n,t){return n?ne.call(n,t):a},U.identity=$t,U.indexOf=xt,U.isArguments=function(n){return ue.call(n)==O},U.isArray=me,U.isBoolean=function(n){return n===r||n===a||ue.call(n)==I
37
- },U.isDate=function(n){return n?typeof n=="object"&&ue.call(n)==N:a},U.isElement=function(n){return n?1===n.nodeType:a},U.isEmpty=function(n){var t=r;if(!n)return t;var e=ue.call(n),u=n.length;return e==E||e==B||e==O||e==A&&typeof u=="number"&&at(n.splice)?!u:(D(n,function(){return t=a}),t)},U.isEqual=ut,U.isFinite=function(n){return ie(n)&&!fe(parseFloat(n))},U.isFunction=at,U.isNaN=function(n){return it(n)&&n!=+n},U.isNull=function(n){return n===u},U.isNumber=it,U.isObject=ot,U.isPlainObject=f,U.isRegExp=function(n){return n?typeof n=="object"&&ue.call(n)==$:a
38
- },U.isString=ft,U.isUndefined=function(n){return typeof n=="undefined"},U.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?le(0,r+e):pe(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},U.mixin=Bt,U.noConflict=function(){return o._=Jt,this},U.parseInt=Tt,U.random=function(n,t){return n==u&&t==u&&(t=1),n=+n||0,t==u&&(t=n,n=0),n+Yt(ve()*((+t||0)-n+1))},U.reduce=dt,U.reduceRight=_t,U.result=function(n,t){var r=n?n[t]:e;return at(r)?n[t]():r},U.runInContext=t,U.size=function(n){var t=n?n.length:0;
39
- return typeof t=="number"?t:be(n).length},U.some=kt,U.sortedIndex=Et,U.template=function(n,t,u){var a=U.templateSettings;n||(n=""),u=P({},u,a);var o,i=P({},u.imports,a.imports),a=be(i),i=lt(i),f=0,c=u.interpolate||w,l="__p+='",c=Mt((u.escape||w).source+"|"+c.source+"|"+(c===d?m:w).source+"|"+(u.evaluate||w).source+"|$","g");n.replace(c,function(t,e,u,a,i,c){return u||(u=a),l+=n.slice(f,c).replace(C,L),e&&(l+="'+__e("+e+")+'"),i&&(o=r,l+="';"+i+";__p+='"),u&&(l+="'+((__t=("+u+"))==null?'':__t)+'"),f=c+t.length,t
40
- }),l+="';\n",c=u=u.variable,c||(u="obj",l="with("+u+"){"+l+"}"),l=(o?l.replace(v,""):l).replace(g,"$1").replace(y,"$1;"),l="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var p=Dt(a,"return "+l).apply(e,i)}catch(s){throw s.source=l,s}return t?p(t):(p.source=l,p)},U.unescape=function(n){return n==u?"":Ut(n).replace(h,nt)},U.uniqueId=function(n){var t=++c;return Ut(n==u?"":n)+t
41
- },U.all=st,U.any=kt,U.detect=gt,U.foldl=dt,U.foldr=_t,U.include=pt,U.inject=dt,D(U,function(n,t){U.prototype[t]||(U.prototype[t]=function(){var t=[this.__wrapped__];return te.apply(t,arguments),n.apply(U,t)})}),U.first=jt,U.last=function(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=U.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[a-1];return Z(n,le(0,a-r))}},U.take=jt,U.head=jt,D(U,function(n,t){U.prototype[t]||(U.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);
42
- return t==u||e&&typeof t!="function"?r:new W(r)})}),U.VERSION="1.2.1",U.prototype.toString=function(){return Ut(this.__wrapped__)},U.prototype.value=Ft,U.prototype.valueOf=Ft,yt(["join","pop","shift"],function(n){var t=Gt[n];U.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),yt(["push","reverse","sort","unshift"],function(n){var t=Gt[n];U.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),yt(["concat","slice","splice"],function(n){var t=Gt[n];U.prototype[n]=function(){return new W(t.apply(this.__wrapped__,arguments))
43
- }}),U}var e,r=!0,u=null,a=!1,o=typeof exports=="object"&&exports,i=typeof module=="object"&&module&&module.exports==o&&module,f=typeof global=="object"&&global;(f.global===f||f.window===f)&&(n=f);var c=0,l={},p=+new Date+"",s=200,v=/\b__p\+='';/g,g=/\b(__p\+=)''\+/g,y=/(__e\(.*?\)|\b__t\))\+'';/g,h=/&(?:amp|lt|gt|quot|#39);/g,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,b=/\w*$/,d=/<%=([\s\S]+?)%>/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",k=RegExp("^["+_+"]*0+(?=.$)"),w=/($^)/,j=/[&<>"']/g,C=/['\n\r\t\u2028\u2029\\]/g,x="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),O="[object Arguments]",E="[object Array]",I="[object Boolean]",N="[object Date]",S="[object Number]",A="[object Object]",$="[object RegExp]",B="[object String]",F={"[object Function]":a};
44
- F[O]=F[E]=F[I]=F[N]=F[S]=F[A]=F[$]=F[B]=r;var R={"boolean":a,"function":r,object:r,number:a,string:a,undefined:a},T={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},q=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=q,define(function(){return q})):o&&!o.nodeType?i?(i.exports=q)._=q:o._=q:n._=q})(this);
7
+ ;!function(n){function t(n,t,e){e=(e||0)-1;for(var r=n.length;++e<r;)if(n[e]===t)return e;return-1}function e(n,e){var r=typeof e;if(n=n.k,"boolean"==r||e==h)return n[e];"number"!=r&&"string"!=r&&(r="object");var u="number"==r?e:j+e;return n=n[r]||(n[r]={}),"object"==r?n[u]&&-1<t(n[u],e)?0:-1:n[u]?0:-1}function r(n){var t=this.k,e=typeof n;if("boolean"==e||n==h)t[n]=y;else{"number"!=e&&"string"!=e&&(e="object");var r="number"==e?n:j+n,u=t[e]||(t[e]={});"object"==e?(u[r]||(u[r]=[])).push(n)==this.b.length&&(t[e]=b):u[r]=y
8
+ }}function u(n){return n.charCodeAt(0)}function a(n,t){var e=n.m,r=t.m;if(n=n.l,t=t.l,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function o(n){var t=-1,e=n.length,u=l();u["false"]=u["null"]=u["true"]=u.undefined=b;var a=l();for(a.b=n,a.k=u,a.push=r;++t<e;)a.push(n[t]);return u.object===false?(p(a),h):a}function i(n){return"\\"+Q[n]}function f(){return m.pop()||[]}function l(){return d.pop()||{b:h,k:h,l:h,"false":b,m:0,leading:b,maxWait:0,"null":b,number:h,object:h,push:h,string:h,trailing:b,"true":b,undefined:b,n:h}
9
+ }function c(n){n.length=0,m.length<C&&m.push(n)}function p(n){var t=n.k;t&&p(t),n.b=n.k=n.l=n.object=n.number=n.string=n.n=h,d.length<C&&d.push(n)}function s(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function v(r){function m(n){if(!n||ve.call(n)!=V)return b;var t=n.valueOf,e=typeof t=="function"&&(e=fe(t))&&fe(e);return e?n==e||fe(n)==e:it(n)}function d(n,t,e){if(!n||!L[typeof n])return n;t=t&&typeof e=="undefined"?t:tt.createCallback(t,e);
10
+ for(var r=-1,u=L[typeof n]&&Se(n),a=u?u.length:0;++r<a&&(e=u[r],!(t(n[e],e,n)===false)););return n}function C(n,t,e){var r;if(!n||!L[typeof n])return n;t=t&&typeof e=="undefined"?t:tt.createCallback(t,e);for(r in n)if(t(n[r],r,n)===false)break;return n}function Q(n,t,e){var r,u=n,a=u;if(!u)return a;for(var o=arguments,i=0,f=typeof e=="number"?2:o.length;++i<f;)if((u=o[i])&&L[typeof u])for(var l=-1,c=L[typeof u]&&Se(u),p=c?c.length:0;++l<p;)r=c[l],"undefined"==typeof a[r]&&(a[r]=u[r]);return a}function X(n,t,e){var r,u=n,a=u;
11
+ if(!u)return a;var o=arguments,i=0,f=typeof e=="number"?2:o.length;if(3<f&&"function"==typeof o[f-2])var l=tt.createCallback(o[--f-1],o[f--],2);else 2<f&&"function"==typeof o[f-1]&&(l=o[--f]);for(;++i<f;)if((u=o[i])&&L[typeof u])for(var c=-1,p=L[typeof u]&&Se(u),s=p?p.length:0;++c<s;)r=p[c],a[r]=l?l(a[r],u[r]):u[r];return a}function Z(n){var t,e=[];if(!n||!L[typeof n])return e;for(t in n)le.call(n,t)&&e.push(t);return e}function tt(n){return n&&typeof n=="object"&&!Ee(n)&&le.call(n,"__wrapped__")?n:new et(n)
12
+ }function et(n){this.__wrapped__=n}function rt(n,t,e,r){function u(){var r=arguments,l=o?this:t;return a||(n=t[i]),e.length&&(r=r.length?(r=Ce.call(r),f?r.concat(e):e.concat(r)):e),this instanceof u?(l=gt(n.prototype)?ye(n.prototype):{},r=n.apply(l,r),gt(r)?r:l):n.apply(l,r)}var a=vt(n),o=!e,i=t;if(o){var f=r;e=t}else if(!a){if(!r)throw new Yt;t=n}return u}function ut(n){return Ie[n]}function at(){var n=(n=tt.indexOf)===$t?t:n;return n}function ot(n){return function(t,e,r,u){return typeof e!="boolean"&&e!=h&&(u=r,r=u&&u[e]===t?g:e,e=b),r!=h&&(r=tt.createCallback(r,u)),n(t,e,r,u)
13
+ }}function it(n){var t,e;return n&&ve.call(n)==V&&(t=n.constructor,!vt(t)||t instanceof t)?(C(n,function(n,t){e=t}),e===g||le.call(n,e)):b}function ft(n){return Ae[n]}function lt(n,t,e,r,u,a){var o=n;if(typeof t!="boolean"&&t!=h&&(r=e,e=t,t=b),typeof e=="function"){if(e=typeof r=="undefined"?e:tt.createCallback(e,r,1),o=e(o),typeof o!="undefined")return o;o=n}if(r=gt(o)){var i=ve.call(o);if(!J[i])return o;var l=Ee(o)}if(!r||!t)return r?l?s(o):X({},o):o;switch(r=xe[i],i){case P:case K:return new r(+o);
14
+ case U:case H:return new r(o);case G:return r(o.source,A.exec(o))}i=!u,u||(u=f()),a||(a=f());for(var p=u.length;p--;)if(u[p]==n)return a[p];return o=l?r(o.length):{},l&&(le.call(n,"index")&&(o.index=n.index),le.call(n,"input")&&(o.input=n.input)),u.push(n),a.push(o),(l?wt:d)(n,function(n,r){o[r]=lt(n,t,e,g,u,a)}),i&&(c(u),c(a)),o}function ct(n){var t=[];return C(n,function(n,e){vt(n)&&t.push(e)}),t.sort()}function pt(n){for(var t=-1,e=Se(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function st(n,t,e,r,u,a){var o=e===k;
15
+ if(typeof e=="function"&&!o){e=tt.createCallback(e,r,2);var i=e(n,t);if(typeof i!="undefined")return!!i}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return b;if(n==h||t==h)return n===t;if(p=ve.call(n),l=ve.call(t),p==z&&(p=V),l==z&&(l=V),p!=l)return b;switch(p){case P:case K:return+n==+t;case U:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case G:case H:return n==Xt(t)}if(l=p==W,!l){if(le.call(n,"__wrapped__")||le.call(t,"__wrapped__"))return st(n.__wrapped__||n,t.__wrapped__||t,e,r,u,a);
16
+ if(p!=V)return b;var p=n.constructor,s=t.constructor;if(p!=s&&(!vt(p)||!(p instanceof p&&vt(s)&&s instanceof s)))return b}for(s=!u,u||(u=f()),a||(a=f()),p=u.length;p--;)if(u[p]==n)return a[p]==t;var v=0,i=y;if(u.push(n),a.push(t),l){if(p=n.length,v=t.length,i=v==n.length,!i&&!o)return i;for(;v--;)if(l=p,s=t[v],o)for(;l--&&!(i=st(n[l],s,e,r,u,a)););else if(!(i=st(n[v],s,e,r,u,a)))break;return i}return C(t,function(t,o,f){return le.call(f,o)?(v++,i=le.call(n,o)&&st(n[o],t,e,r,u,a)):void 0}),i&&!o&&C(n,function(n,t,e){return le.call(e,t)?i=-1<--v:void 0
17
+ }),s&&(c(u),c(a)),i}function vt(n){return typeof n=="function"}function gt(n){return!(!n||!L[typeof n])}function yt(n){return typeof n=="number"||ve.call(n)==U}function ht(n){return typeof n=="string"||ve.call(n)==H}function bt(n,t,e){var r=arguments,u=0,a=2;if(!gt(n))return n;if(e===k)var o=r[3],i=r[4],l=r[5];else{var p=y,i=f(),l=f();typeof e!="number"&&(a=r.length),3<a&&"function"==typeof r[a-2]?o=tt.createCallback(r[--a-1],r[a--],2):2<a&&"function"==typeof r[a-1]&&(o=r[--a])}for(;++u<a;)(Ee(r[u])?wt:d)(r[u],function(t,e){var r,u,a=t,f=n[e];
18
+ if(t&&((u=Ee(t))||m(t))){for(a=i.length;a--;)if(r=i[a]==t){f=l[a];break}if(!r){var c;o&&(a=o(f,t),c=typeof a!="undefined")&&(f=a),c||(f=u?Ee(f)?f:[]:m(f)?f:{}),i.push(t),l.push(f),c||(f=bt(f,t,k,o,i,l))}}else o&&(a=o(f,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(f=a);n[e]=f});return p&&(c(i),c(l)),n}function mt(n){for(var t=-1,e=Se(n),r=e.length,u=Mt(r);++t<r;)u[t]=n[e[t]];return u}function dt(n,t,e){var r=-1,u=at(),a=n?n.length:0,o=b;return e=(0>e?_e(0,a+e):e)||0,a&&typeof a=="number"?o=-1<(ht(n)?n.indexOf(t,e):u(n,t,e)):d(n,function(n){return++r<e?void 0:!(o=n===t)
19
+ }),o}function _t(n,t,e){var r=y;t=tt.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&(r=!!t(n[e],e,n)););else d(n,function(n,e,u){return r=!!t(n,e,u)});return r}function kt(n,t,e){var r=[];t=tt.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var a=n[e];t(a,e,n)&&r.push(a)}else d(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function jt(n,t,e){t=tt.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return d(n,function(n,e,r){return t(n,e,r)?(u=n,b):void 0
20
+ }),u}for(;++e<r;){var a=n[e];if(t(a,e,n))return a}}function wt(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:tt.createCallback(t,e),typeof u=="number")for(;++r<u&&t(n[r],r,n)!==false;);else d(n,t);return n}function Ct(n,t,e){var r=-1,u=n?n.length:0;if(t=tt.createCallback(t,e),typeof u=="number")for(var a=Mt(u);++r<u;)a[r]=t(n[r],r,n);else a=[],d(n,function(n,e,u){a[++r]=t(n,e,u)});return a}function xt(n,t,e){var r=-1/0,a=r;if(!t&&Ee(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>a&&(a=i)
21
+ }}else t=!t&&ht(n)?u:tt.createCallback(t,e),wt(n,function(n,e,u){e=t(n,e,u),e>r&&(r=e,a=n)});return a}function Ot(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Mt(r);++e<r;)u[e]=n[e][t];return u||Ct(n,t)}function Et(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=tt.createCallback(t,r,4);var a=-1,o=n.length;if(typeof o=="number")for(u&&(e=n[++a]);++a<o;)e=t(e,n[a],a,n);else d(n,function(n,r,a){e=u?(u=b,n):t(e,n,r,a)});return e}function St(n,t,e,r){var u=n?n.length:0,a=3>arguments.length;
22
+ if(typeof u!="number")var o=Se(n),u=o.length;return t=tt.createCallback(t,r,4),wt(n,function(r,i,f){i=o?o[--u]:--u,e=a?(a=b,n[i]):t(e,n[i],i,f)}),e}function It(n,t,e){var r;t=tt.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else d(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function At(n){var r=-1,u=at(),a=n?n.length:0,i=ae.apply(Zt,Ce.call(arguments,1)),f=[],l=a>=w&&u===t;if(l){var c=o(i);c?(u=e,i=c):l=b}for(;++r<a;)c=n[r],0>u(i,c)&&f.push(c);
23
+ return l&&p(i),f}function Nt(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&t!=h){var a=-1;for(t=tt.createCallback(t,e);++a<u&&t(n[a],a,n);)r++}else if(r=t,r==h||e)return n[0];return s(n,0,ke(_e(0,r),u))}}function $t(n,e,r){if(typeof r=="number"){var u=n?n.length:0;r=0>r?_e(0,u+r):r||0}else if(r)return r=Ft(n,e),n[r]===e?r:-1;return n?t(n,e,r):-1}function Bt(n,t,e){if(typeof t!="number"&&t!=h){var r=0,u=-1,a=n?n.length:0;for(t=tt.createCallback(t,e);++u<a&&t(n[u],u,n);)r++}else r=t==h||e?1:_e(0,t);
24
+ return s(n,r)}function Ft(n,t,e,r){var u=0,a=n?n.length:u;for(e=e?tt.createCallback(e,r,1):Wt,t=e(t);u<a;)r=u+a>>>1,e(n[r])<t?u=r+1:a=r;return u}function Rt(n){for(var t=-1,e=n?xt(Ot(n,"length")):0,r=Mt(0>e?0:e);++t<e;)r[t]=Ot(n,t);return r}function Tt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function qt(n,t){return Oe.fastBind||ge&&2<arguments.length?ge.call.apply(ge,arguments):rt(n,t,Ce.call(arguments,2))}function Dt(n,t,e){function r(){ue(s),ue(v),l=0,s=v=h
25
+ }function u(){var t=g&&(!m||1<l);r(),t&&(p!==false&&(c=new Vt),i=n.apply(f,o))}function a(){r(),(g||p!==t)&&(c=new Vt,i=n.apply(f,o))}var o,i,f,l=0,c=0,p=b,s=h,v=h,g=y;if(t=_e(0,t||0),e===y)var m=y,g=b;else gt(e)&&(m=e.leading,p="maxWait"in e&&_e(t,e.maxWait||0),g="trailing"in e?e.trailing:g);return function(){if(o=arguments,f=this,l++,ue(v),p===false)m&&2>l&&(i=n.apply(f,o));else{var e=new Vt;!s&&!m&&(c=e);var r=p-(e-c);0<r?s||(s=se(a,r)):(ue(s),s=h,c=e,i=n.apply(f,o))}return t!==p&&(v=se(u,t)),i}}function zt(n){var t=Ce.call(arguments,1);
26
+ return se(function(){n.apply(g,t)},1)}function Wt(n){return n}function Pt(n){wt(ct(n),function(t){var e=tt[t]=n[t];tt.prototype[t]=function(){var n=this.__wrapped__,t=[n];return ce.apply(t,arguments),t=e.apply(tt,t),n&&typeof n=="object"&&n===t?this:new et(t)}})}function Kt(){return this.__wrapped__}r=r?nt.defaults(n.Object(),r,nt.pick(n,D)):n;var Mt=r.Array,Ut=r.Boolean,Vt=r.Date,Gt=r.Function,Ht=r.Math,Jt=r.Number,Lt=r.Object,Qt=r.RegExp,Xt=r.String,Yt=r.TypeError,Zt=[],ne=Lt.prototype,te=r._,ee=Qt("^"+Xt(ne.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),re=Ht.ceil,ue=r.clearTimeout,ae=Zt.concat,oe=Ht.floor,ie=Gt.prototype.toString,fe=ee.test(fe=Lt.getPrototypeOf)&&fe,le=ne.hasOwnProperty,ce=Zt.push,pe=r.setImmediate,se=r.setTimeout,ve=ne.toString,ge=ee.test(ge=ve.bind)&&ge,ye=ee.test(ye=Lt.create)&&ye,he=ee.test(he=Mt.isArray)&&he,be=r.isFinite,me=r.isNaN,de=ee.test(de=Lt.keys)&&de,_e=Ht.max,ke=Ht.min,je=r.parseInt,we=Ht.random,Ce=Zt.slice,Ht=ee.test(r.attachEvent),Ht=ge&&!/\n|true/.test(ge+Ht),xe={};
27
+ xe[W]=Mt,xe[P]=Ut,xe[K]=Vt,xe[M]=Gt,xe[V]=Lt,xe[U]=Jt,xe[G]=Qt,xe[H]=Xt,et.prototype=tt.prototype;var Oe=tt.support={};Oe.fastBind=ge&&!Ht,tt.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:tt}};var Ee=he,Se=de?function(n){return gt(n)?de(n):[]}:Z,Ie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ae=pt(Ie),Ut=ot(function $e(n,t,e){for(var r=-1,u=n?n.length:0,a=[];++r<u;){var o=n[r];e&&(o=e(o,r,n)),Ee(o)?ce.apply(a,t?o:$e(o)):a.push(o)
28
+ }return a}),Ne=ot(function(n,r,u){var a=-1,i=at(),l=n?n.length:0,s=[],v=!r&&l>=w&&i===t,g=u||v?f():s;if(v){var y=o(g);y?(i=e,g=y):(v=b,g=u?g:(c(g),s))}for(;++a<l;){var y=n[a],h=u?u(y,a,n):y;(r?!a||g[g.length-1]!==h:0>i(g,h))&&((u||v)&&g.push(h),s.push(y))}return v?(c(g.b),p(g)):u&&c(g),s});return Ht&&Y&&typeof pe=="function"&&(zt=qt(pe,r)),pe=8==je(B+"08")?je:function(n,t){return je(ht(n)?n.replace(F,""):n,t||0)},tt.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
29
+ }},tt.assign=X,tt.at=function(n){for(var t=-1,e=ae.apply(Zt,Ce.call(arguments,1)),r=e.length,u=Mt(r);++t<r;)u[t]=n[e[t]];return u},tt.bind=qt,tt.bindAll=function(n){for(var t=1<arguments.length?ae.apply(Zt,Ce.call(arguments,1)):ct(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=qt(n[u],n)}return n},tt.bindKey=function(n,t){return rt(n,t,Ce.call(arguments,2),k)},tt.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},tt.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];
30
+ return t[0]}},tt.countBy=function(n,t,e){var r={};return t=tt.createCallback(t,e),wt(n,function(n,e,u){e=Xt(t(n,e,u)),le.call(r,e)?r[e]++:r[e]=1}),r},tt.createCallback=function(n,t,e){if(n==h)return Wt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=Se(n);return function(t){for(var e=u.length,r=b;e--&&(r=st(t[u[e]],n[u[e]],k)););return r}}return typeof t=="undefined"||$&&!$.test(ie.call(n))?n:1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)
31
+ }:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}},tt.debounce=Dt,tt.defaults=Q,tt.defer=zt,tt.delay=function(n,t){var e=Ce.call(arguments,2);return se(function(){n.apply(g,e)},t)},tt.difference=At,tt.filter=kt,tt.flatten=Ut,tt.forEach=wt,tt.forIn=C,tt.forOwn=d,tt.functions=ct,tt.groupBy=function(n,t,e){var r={};return t=tt.createCallback(t,e),wt(n,function(n,e,u){e=Xt(t(n,e,u)),(le.call(r,e)?r[e]:r[e]=[]).push(n)}),r},tt.initial=function(n,t,e){if(!n)return[];
32
+ var r=0,u=n.length;if(typeof t!="number"&&t!=h){var a=u;for(t=tt.createCallback(t,e);a--&&t(n[a],a,n);)r++}else r=t==h||e?1:t||r;return s(n,0,ke(_e(0,u-r),u))},tt.intersection=function(n){for(var r=arguments,u=r.length,a=-1,i=f(),l=-1,s=at(),v=n?n.length:0,g=[],y=f();++a<u;){var h=r[a];i[a]=s===t&&(h?h.length:0)>=w&&o(a?r[a]:y)}n:for(;++l<v;){var b=i[0],h=n[l];if(0>(b?e(b,h):s(y,h))){for(a=u,(b||y).push(h);--a;)if(b=i[a],0>(b?e(b,h):s(r[a],h)))continue n;g.push(h)}}for(;u--;)(b=i[u])&&p(b);return c(i),c(y),g
33
+ },tt.invert=pt,tt.invoke=function(n,t){var e=Ce.call(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Mt(typeof a=="number"?a:0);return wt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},tt.keys=Se,tt.map=Ct,tt.max=xt,tt.memoize=function(n,t){function e(){var r=e.cache,u=j+(t?t.apply(this,arguments):arguments[0]);return le.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}return e.cache={},e},tt.merge=bt,tt.min=function(n,t,e){var r=1/0,a=r;if(!t&&Ee(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];
34
+ i<a&&(a=i)}}else t=!t&&ht(n)?u:tt.createCallback(t,e),wt(n,function(n,e,u){e=t(n,e,u),e<r&&(r=e,a=n)});return a},tt.omit=function(n,t,e){var r=at(),u=typeof t=="function",a={};if(u)t=tt.createCallback(t,e);else var o=ae.apply(Zt,Ce.call(arguments,1));return C(n,function(n,e,i){(u?!t(n,e,i):0>r(o,e))&&(a[e]=n)}),a},tt.once=function(n){var t,e;return function(){return t?e:(t=y,e=n.apply(this,arguments),n=h,e)}},tt.pairs=function(n){for(var t=-1,e=Se(n),r=e.length,u=Mt(r);++t<r;){var a=e[t];u[t]=[a,n[a]]
35
+ }return u},tt.partial=function(n){return rt(n,Ce.call(arguments,1))},tt.partialRight=function(n){return rt(n,Ce.call(arguments,1),h,k)},tt.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,a=ae.apply(Zt,Ce.call(arguments,1)),o=gt(n)?a.length:0;++u<o;){var i=a[u];i in n&&(r[i]=n[i])}else t=tt.createCallback(t,e),C(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},tt.pluck=Ot,tt.range=function(n,t,e){n=+n||0,e=+e||1,t==h&&(t=n,n=0);var r=-1;t=_e(0,re((t-n)/e));for(var u=Mt(t);++r<t;)u[r]=n,n+=e;
36
+ return u},tt.reject=function(n,t,e){return t=tt.createCallback(t,e),kt(n,function(n,e,r){return!t(n,e,r)})},tt.rest=Bt,tt.shuffle=function(n){var t=-1,e=n?n.length:0,r=Mt(typeof e=="number"?e:0);return wt(n,function(n){var e=oe(we()*(++t+1));r[t]=r[e],r[e]=n}),r},tt.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=Mt(typeof u=="number"?u:0);for(t=tt.createCallback(t,e),wt(n,function(n,e,u){var a=o[++r]=l();a.l=t(n,e,u),a.m=r,a.n=n}),u=o.length,o.sort(a);u--;)n=o[u],o[u]=n.n,p(n);return o},tt.tap=function(n,t){return t(n),n
37
+ },tt.throttle=function(n,t,e){var r=y,u=y;return e===false?r=b:gt(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),e=l(),e.leading=r,e.maxWait=t,e.trailing=u,n=Dt(n,t,e),p(e),n},tt.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Mt(n);for(t=tt.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},tt.toArray=function(n){return n&&typeof n.length=="number"?s(n):mt(n)},tt.transform=function(n,t,e,r){var u=Ee(n);return t=tt.createCallback(t,r,4),e==h&&(u?e=[]:(r=n&&n.constructor,e=gt(r&&r.prototype)?ye(r&&r.prototype):{})),(u?wt:d)(n,function(n,r,u){return t(e,n,r,u)
38
+ }),e},tt.union=function(n){return Ee(n)||(arguments[0]=n?Ce.call(n):Zt),Ne(ae.apply(Zt,arguments))},tt.uniq=Ne,tt.unzip=Rt,tt.values=mt,tt.where=kt,tt.without=function(n){return At(n,Ce.call(arguments,1))},tt.wrap=function(n,t){return function(){var e=[n];return ce.apply(e,arguments),t.apply(this,e)}},tt.zip=function(n){return n?Rt(arguments):[]},tt.zipObject=Tt,tt.collect=Ct,tt.drop=Bt,tt.each=wt,tt.extend=X,tt.methods=ct,tt.object=Tt,tt.select=kt,tt.tail=Bt,tt.unique=Ne,Pt(tt),tt.chain=tt,tt.prototype.chain=function(){return this
39
+ },tt.clone=lt,tt.cloneDeep=function(n,t,e){return lt(n,y,t,e)},tt.contains=dt,tt.escape=function(n){return n==h?"":Xt(n).replace(T,ut)},tt.every=_t,tt.find=jt,tt.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=tt.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},tt.findKey=function(n,t,e){var r;return t=tt.createCallback(t,e),d(n,function(n,e,u){return t(n,e,u)?(r=e,b):void 0}),r},tt.has=function(n,t){return n?le.call(n,t):b},tt.identity=Wt,tt.indexOf=$t,tt.isArguments=function(n){return ve.call(n)==z
40
+ },tt.isArray=Ee,tt.isBoolean=function(n){return n===y||n===false||ve.call(n)==P},tt.isDate=function(n){return n?typeof n=="object"&&ve.call(n)==K:b},tt.isElement=function(n){return n?1===n.nodeType:b},tt.isEmpty=function(n){var t=y;if(!n)return t;var e=ve.call(n),r=n.length;return e==W||e==H||e==z||e==V&&typeof r=="number"&&vt(n.splice)?!r:(d(n,function(){return t=b}),t)},tt.isEqual=st,tt.isFinite=function(n){return be(n)&&!me(parseFloat(n))},tt.isFunction=vt,tt.isNaN=function(n){return yt(n)&&n!=+n
41
+ },tt.isNull=function(n){return n===h},tt.isNumber=yt,tt.isObject=gt,tt.isPlainObject=m,tt.isRegExp=function(n){return n?typeof n=="object"&&ve.call(n)==G:b},tt.isString=ht,tt.isUndefined=function(n){return typeof n=="undefined"},tt.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?_e(0,r+e):ke(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},tt.mixin=Pt,tt.noConflict=function(){return r._=te,this},tt.parseInt=pe,tt.random=function(n,t){n==h&&t==h&&(t=1),n=+n||0,t==h?(t=n,n=0):t=+t||0;
42
+ var e=we();return n%1||t%1?n+ke(e*(t-n+parseFloat("1e-"+((e+"").length-1))),t):n+oe(e*(t-n+1))},tt.reduce=Et,tt.reduceRight=St,tt.result=function(n,t){var e=n?n[t]:g;return vt(e)?n[t]():e},tt.runInContext=v,tt.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Se(n).length},tt.some=It,tt.sortedIndex=Ft,tt.template=function(n,t,e){var r=tt.templateSettings;n||(n=""),e=Q({},e,r);var u,a=Q({},e.imports,r.imports),r=Se(a),a=mt(a),o=0,f=e.interpolate||R,l="__p+='",f=Qt((e.escape||R).source+"|"+f.source+"|"+(f===N?I:R).source+"|"+(e.evaluate||R).source+"|$","g");
43
+ n.replace(f,function(t,e,r,a,f,c){return r||(r=a),l+=n.slice(o,c).replace(q,i),e&&(l+="'+__e("+e+")+'"),f&&(u=y,l+="';"+f+";__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),o=c+t.length,t}),l+="';\n",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(x,""):l).replace(O,"$1").replace(E,"$1;"),l="function("+e+"){"+(f?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var c=Gt(r,"return "+l).apply(g,a)
44
+ }catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},tt.unescape=function(n){return n==h?"":Xt(n).replace(S,ft)},tt.uniqueId=function(n){var t=++_;return Xt(n==h?"":n)+t},tt.all=_t,tt.any=It,tt.detect=jt,tt.findWhere=jt,tt.foldl=Et,tt.foldr=St,tt.include=dt,tt.inject=Et,d(tt,function(n,t){tt.prototype[t]||(tt.prototype[t]=function(){var t=[this.__wrapped__];return ce.apply(t,arguments),n.apply(tt,t)})}),tt.first=Nt,tt.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&t!=h){var a=u;
45
+ for(t=tt.createCallback(t,e);a--&&t(n[a],a,n);)r++}else if(r=t,r==h||e)return n[u-1];return s(n,_e(0,u-r))}},tt.take=Nt,tt.head=Nt,d(tt,function(n,t){tt.prototype[t]||(tt.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return t==h||e&&typeof t!="function"?r:new et(r)})}),tt.VERSION="1.3.1",tt.prototype.toString=function(){return Xt(this.__wrapped__)},tt.prototype.value=Kt,tt.prototype.valueOf=Kt,wt(["join","pop","shift"],function(n){var t=Zt[n];tt.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)
46
+ }}),wt(["push","reverse","sort","unshift"],function(n){var t=Zt[n];tt.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),wt(["concat","slice","splice"],function(n){var t=Zt[n];tt.prototype[n]=function(){return new et(t.apply(this.__wrapped__,arguments))}}),tt}var g,y=!0,h=null,b=!1,m=[],d=[],_=0,k={},j=+new Date+"",w=75,C=40,x=/\b__p\+='';/g,O=/\b(__p\+=)''\+/g,E=/(__e\(.*?\)|\b__t\))\+'';/g,S=/&(?:amp|lt|gt|quot|#39);/g,I=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,A=/\w*$/,N=/<%=([\s\S]+?)%>/g,$=($=/\bthis\b/)&&$.test(v)&&$,B=" \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",F=RegExp("^["+B+"]*0+(?=.$)"),R=/($^)/,T=/[&<>"']/g,q=/['\n\r\t\u2028\u2029\\]/g,D="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),z="[object Arguments]",W="[object Array]",P="[object Boolean]",K="[object Date]",M="[object Function]",U="[object Number]",V="[object Object]",G="[object RegExp]",H="[object String]",J={};
47
+ J[M]=b,J[z]=J[W]=J[P]=J[K]=J[U]=J[V]=J[G]=J[H]=y;var L={"boolean":b,"function":y,object:y,number:b,string:b,undefined:b},Q={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},X=L[typeof exports]&&exports,Y=L[typeof module]&&module&&module.exports==X&&module,Z=L[typeof global]&&global;!Z||Z.global!==Z&&Z.window!==Z||(n=Z);var nt=v();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=nt, define(function(){return nt})):X&&!X.nodeType?Y?(Y.exports=nt)._=nt:X._=nt:n._=nt
48
+ }(this);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Lo-Dash 1.2.1 (Custom Build) <http://lodash.com/>
3
+ * Lo-Dash 1.3.1 (Custom Build) <http://lodash.com/>
4
4
  * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
5
5
  * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
6
6
  * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
@@ -12,18 +12,6 @@
12
12
  /** Used as a safe reference for `undefined` in pre ES5 environments */
13
13
  var undefined;
14
14
 
15
- /** Detect free variable `exports` */
16
- var freeExports = typeof exports == 'object' && exports;
17
-
18
- /** Detect free variable `module` */
19
- var freeModule = typeof module == 'object' && module && module.exports == freeExports && module;
20
-
21
- /** Detect free variable `global`, from Node.js or Browserified code, and use it as `window` */
22
- var freeGlobal = typeof global == 'object' && global;
23
- if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
24
- window = freeGlobal;
25
- }
26
-
27
15
  /** Used to generate unique IDs */
28
16
  var idCounter = 0;
29
17
 
@@ -34,7 +22,7 @@
34
22
  var keyPrefix = +new Date + '';
35
23
 
36
24
  /** Used as the size when optimizations are enabled for large arrays */
37
- var largeArraySize = 200;
25
+ var largeArraySize = 75;
38
26
 
39
27
  /** Used to match empty string literals in compiled template source */
40
28
  var reEmptyStringLeading = /\b__p \+= '';/g,
@@ -73,6 +61,7 @@
73
61
  arrayClass = '[object Array]',
74
62
  boolClass = '[object Boolean]',
75
63
  dateClass = '[object Date]',
64
+ errorClass = '[object Error]',
76
65
  funcClass = '[object Function]',
77
66
  numberClass = '[object Number]',
78
67
  objectClass = '[object Object]',
@@ -100,18 +89,112 @@
100
89
  '\u2029': 'u2029'
101
90
  };
102
91
 
92
+ /** Detect free variable `exports` */
93
+ var freeExports = objectTypes[typeof exports] && exports;
94
+
95
+ /** Detect free variable `module` */
96
+ var freeModule = objectTypes[typeof module] && module && module.exports == freeExports && module;
97
+
98
+ /** Detect free variable `global`, from Node.js or Browserified code, and use it as `window` */
99
+ var freeGlobal = objectTypes[typeof global] && global;
100
+ if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
101
+ window = freeGlobal;
102
+ }
103
+
103
104
  /*--------------------------------------------------------------------------*/
104
105
 
105
- /** Used for `Array` and `Object` method references */
106
- var arrayRef = Array(),
107
- objectRef = Object();
106
+ /**
107
+ * A basic implementation of `_.indexOf` without support for binary searches
108
+ * or `fromIndex` constraints.
109
+ *
110
+ * @private
111
+ * @param {Array} array The array to search.
112
+ * @param {Mixed} value The value to search for.
113
+ * @param {Number} [fromIndex=0] The index to search from.
114
+ * @returns {Number} Returns the index of the matched value or `-1`.
115
+ */
116
+ function basicIndexOf(array, value, fromIndex) {
117
+ var index = (fromIndex || 0) - 1,
118
+ length = array.length;
119
+
120
+ while (++index < length) {
121
+ if (array[index] === value) {
122
+ return index;
123
+ }
124
+ }
125
+ return -1;
126
+ }
127
+
128
+ /**
129
+ * Used by `sortBy` to compare transformed `collection` values, stable sorting
130
+ * them in ascending order.
131
+ *
132
+ * @private
133
+ * @param {Object} a The object to compare to `b`.
134
+ * @param {Object} b The object to compare to `a`.
135
+ * @returns {Number} Returns the sort order indicator of `1` or `-1`.
136
+ */
137
+ function compareAscending(a, b) {
138
+ var ai = a.index,
139
+ bi = b.index;
140
+
141
+ a = a.criteria;
142
+ b = b.criteria;
143
+
144
+ // ensure a stable sort in V8 and other engines
145
+ // http://code.google.com/p/v8/issues/detail?id=90
146
+ if (a !== b) {
147
+ if (a > b || typeof a == 'undefined') {
148
+ return 1;
149
+ }
150
+ if (a < b || typeof b == 'undefined') {
151
+ return -1;
152
+ }
153
+ }
154
+ return ai < bi ? -1 : 1;
155
+ }
156
+
157
+ /**
158
+ * Used by `template` to escape characters for inclusion in compiled
159
+ * string literals.
160
+ *
161
+ * @private
162
+ * @param {String} match The matched character to escape.
163
+ * @returns {String} Returns the escaped character.
164
+ */
165
+ function escapeStringChar(match) {
166
+ return '\\' + stringEscapes[match];
167
+ }
168
+
169
+ /**
170
+ * A no-operation function.
171
+ *
172
+ * @private
173
+ */
174
+ function noop() {
175
+ // no operation performed
176
+ }
177
+
178
+ /*--------------------------------------------------------------------------*/
179
+
180
+ /**
181
+ * Used for `Array` method references.
182
+ *
183
+ * Normally `Array.prototype` would suffice, however, using an array literal
184
+ * avoids issues in Narwhal.
185
+ */
186
+ var arrayRef = [];
187
+
188
+ /** Used for native method references */
189
+ var objectProto = Object.prototype,
190
+ stringProto = String.prototype;
108
191
 
109
192
  /** Used to restore the original `_` reference in `noConflict` */
110
193
  var oldDash = window._;
111
194
 
112
195
  /** Used to detect if a method is native */
113
196
  var reNative = RegExp('^' +
114
- String(objectRef.valueOf)
197
+ String(objectProto.valueOf)
115
198
  .replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
116
199
  .replace(/valueOf|for [^\]]+/g, '.+?') + '$'
117
200
  );
@@ -121,13 +204,15 @@
121
204
  clearTimeout = window.clearTimeout,
122
205
  concat = arrayRef.concat,
123
206
  floor = Math.floor,
124
- hasOwnProperty = objectRef.hasOwnProperty,
207
+ hasOwnProperty = objectProto.hasOwnProperty,
125
208
  push = arrayRef.push,
209
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
126
210
  setTimeout = window.setTimeout,
127
- toString = objectRef.toString;
211
+ toString = objectProto.toString;
128
212
 
129
213
  /* Native method shortcuts for methods with the same name as other `lodash` methods */
130
214
  var nativeBind = reNative.test(nativeBind = toString.bind) && nativeBind,
215
+ nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
131
216
  nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
132
217
  nativeIsFinite = window.isFinite,
133
218
  nativeIsNaN = window.isNaN,
@@ -162,8 +247,8 @@
162
247
  * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`,
163
248
  * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `push`, `range`,
164
249
  * `reject`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`,
165
- * `tap`, `throttle`, `times`, `toArray`, `union`, `uniq`, `unshift`, `unzip`,
166
- * `values`, `where`, `without`, `wrap`, and `zip`
250
+ * `tap`, `throttle`, `times`, `toArray`, `transform`, `union`, `uniq`, `unshift`,
251
+ * `unzip`, `values`, `where`, `without`, `wrap`, and `zip`
167
252
  *
168
253
  * The non-chainable wrapper functions are:
169
254
  * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`,
@@ -179,6 +264,7 @@
179
264
  *
180
265
  * @name _
181
266
  * @constructor
267
+ * @alias chain
182
268
  * @category Chaining
183
269
  * @param {Mixed} value The value to wrap in a `lodash` instance.
184
270
  * @returns {Object} Returns a `lodash` instance.
@@ -209,6 +295,19 @@
209
295
  : new lodashWrapper(value);
210
296
  }
211
297
 
298
+ /**
299
+ * A fast path for creating `lodash` wrapper objects.
300
+ *
301
+ * @private
302
+ * @param {Mixed} value The value to wrap in a `lodash` instance.
303
+ * @returns {Object} Returns a `lodash` instance.
304
+ */
305
+ function lodashWrapper(value) {
306
+ this.__wrapped__ = value;
307
+ }
308
+ // ensure `new lodashWrapper` is an instance of `lodash`
309
+ lodashWrapper.prototype = lodash.prototype;
310
+
212
311
  /**
213
312
  * An object used to flag environments features.
214
313
  *
@@ -290,47 +389,6 @@
290
389
 
291
390
  /*--------------------------------------------------------------------------*/
292
391
 
293
- /**
294
- * Used by `_.max` and `_.min` as the default `callback` when a given
295
- * `collection` is a string value.
296
- *
297
- * @private
298
- * @param {String} value The character to inspect.
299
- * @returns {Number} Returns the code unit of given character.
300
- */
301
- function charAtCallback(value) {
302
- return value.charCodeAt(0);
303
- }
304
-
305
- /**
306
- * Used by `sortBy` to compare transformed `collection` values, stable sorting
307
- * them in ascending order.
308
- *
309
- * @private
310
- * @param {Object} a The object to compare to `b`.
311
- * @param {Object} b The object to compare to `a`.
312
- * @returns {Number} Returns the sort order indicator of `1` or `-1`.
313
- */
314
- function compareAscending(a, b) {
315
- var ai = a.index,
316
- bi = b.index;
317
-
318
- a = a.criteria;
319
- b = b.criteria;
320
-
321
- // ensure a stable sort in V8 and other engines
322
- // http://code.google.com/p/v8/issues/detail?id=90
323
- if (a !== b) {
324
- if (a > b || typeof a == 'undefined') {
325
- return 1;
326
- }
327
- if (a < b || typeof b == 'undefined') {
328
- return -1;
329
- }
330
- }
331
- return ai < bi ? -1 : 1;
332
- }
333
-
334
392
  /**
335
393
  * Creates a function that, when called, invokes `func` with the `this` binding
336
394
  * of `thisArg` and prepends any `partialArgs` to the arguments passed to the
@@ -377,9 +435,7 @@
377
435
  }
378
436
  if (this instanceof bound) {
379
437
  // ensure `new bound` is an instance of `func`
380
- noop.prototype = func.prototype;
381
- thisBinding = new noop;
382
- noop.prototype = null;
438
+ thisBinding = createObject(func.prototype);
383
439
 
384
440
  // mimic the constructor's `return` behavior
385
441
  // http://es5.github.com/#x13.2.2
@@ -392,15 +448,25 @@
392
448
  }
393
449
 
394
450
  /**
395
- * Used by `template` to escape characters for inclusion in compiled
396
- * string literals.
451
+ * Creates a new object with the specified `prototype`.
397
452
  *
398
453
  * @private
399
- * @param {String} match The matched character to escape.
400
- * @returns {String} Returns the escaped character.
454
+ * @param {Object} prototype The prototype object.
455
+ * @returns {Object} Returns the new object.
401
456
  */
402
- function escapeStringChar(match) {
403
- return '\\' + stringEscapes[match];
457
+ function createObject(prototype) {
458
+ return isObject(prototype) ? nativeCreate(prototype) : {};
459
+ }
460
+ // fallback for browsers without `Object.create`
461
+ if (!nativeCreate) {
462
+ var createObject = function(prototype) {
463
+ if (isObject(prototype)) {
464
+ noop.prototype = prototype;
465
+ var result = new noop;
466
+ noop.prototype = null;
467
+ }
468
+ return result || {};
469
+ };
404
470
  }
405
471
 
406
472
  /**
@@ -415,25 +481,16 @@
415
481
  }
416
482
 
417
483
  /**
418
- * A fast path for creating `lodash` wrapper objects.
484
+ * Gets the appropriate "indexOf" function. If the `_.indexOf` method is
485
+ * customized, this method returns the custom method, otherwise it returns
486
+ * the `basicIndexOf` function.
419
487
  *
420
488
  * @private
421
- * @param {Mixed} value The value to wrap in a `lodash` instance.
422
- * @returns {Object} Returns a `lodash` instance.
489
+ * @returns {Function} Returns the "indexOf" function.
423
490
  */
424
- function lodashWrapper(value) {
425
- this.__wrapped__ = value;
426
- }
427
- // ensure `new lodashWrapper` is an instance of `lodash`
428
- lodashWrapper.prototype = lodash.prototype;
429
-
430
- /**
431
- * A no-operation function.
432
- *
433
- * @private
434
- */
435
- function noop() {
436
- // no operation performed
491
+ function getIndexOf(array, value, fromIndex) {
492
+ var result = (result = lodash.indexOf) === indexOf ? basicIndexOf : result;
493
+ return result;
437
494
  }
438
495
 
439
496
  /**
@@ -507,11 +564,10 @@
507
564
  var shimKeys = function (object) {
508
565
  var index, iterable = object, result = [];
509
566
  if (!iterable) return result;
510
- if (!(objectTypes[typeof object])) return result;
511
-
567
+ if (!(objectTypes[typeof object])) return result;
512
568
  for (index in iterable) {
513
- if (hasOwnProperty.call(iterable, index)) {
514
- result.push(index);
569
+ if (hasOwnProperty.call(iterable, index)) {
570
+ result.push(index);
515
571
  }
516
572
  }
517
573
  return result
@@ -721,7 +777,6 @@
721
777
  var index, iterable = collection, result = iterable;
722
778
  if (!iterable) return result;
723
779
  if (!objectTypes[typeof iterable]) return result;
724
-
725
780
  for (index in iterable) {
726
781
  if (callback(iterable[index], index, collection) === indicatorObject) return result;
727
782
  }
@@ -753,10 +808,9 @@
753
808
  var index, iterable = collection, result = iterable;
754
809
  if (!iterable) return result;
755
810
  if (!objectTypes[typeof iterable]) return result;
756
-
757
811
  for (index in iterable) {
758
- if (hasOwnProperty.call(iterable, index)) {
759
- if (callback(iterable[index], index, collection) === indicatorObject) return result;
812
+ if (hasOwnProperty.call(iterable, index)) {
813
+ if (callback(iterable[index], index, collection) === indicatorObject) return result;
760
814
  }
761
815
  }
762
816
  return result
@@ -1137,7 +1191,7 @@
1137
1191
  // http://es5.github.com/#x8
1138
1192
  // and avoid a V8 bug
1139
1193
  // http://code.google.com/p/v8/issues/detail?id=2291
1140
- return value ? objectTypes[typeof value] : false;
1194
+ return !!(value && objectTypes[typeof value]);
1141
1195
  }
1142
1196
 
1143
1197
  /**
@@ -1222,7 +1276,7 @@
1222
1276
  * // => true
1223
1277
  */
1224
1278
  function isRegExp(value) {
1225
- return value ? (objectTypes[typeof value] && toString.call(value) == regexpClass) : false;
1279
+ return !!(value && objectTypes[typeof value]) && toString.call(value) == regexpClass;
1226
1280
  }
1227
1281
 
1228
1282
  /**
@@ -1286,7 +1340,8 @@
1286
1340
  * // => { 'name': 'moe' }
1287
1341
  */
1288
1342
  function omit(object) {
1289
- var props = concat.apply(arrayRef, nativeSlice.call(arguments, 1)),
1343
+ var indexOf = getIndexOf(),
1344
+ props = concat.apply(arrayRef, nativeSlice.call(arguments, 1)),
1290
1345
  result = {};
1291
1346
 
1292
1347
  forIn(object, function(value, key) {
@@ -1419,9 +1474,10 @@
1419
1474
  * // => true
1420
1475
  */
1421
1476
  function contains(collection, target) {
1422
- var length = collection ? collection.length : 0,
1477
+ var indexOf = getIndexOf(),
1478
+ length = collection ? collection.length : 0,
1423
1479
  result = false;
1424
- if (typeof length == 'number') {
1480
+ if (length && typeof length == 'number') {
1425
1481
  result = indexOf(collection, target) > -1;
1426
1482
  } else {
1427
1483
  forOwn(collection, function(value) {
@@ -1615,7 +1671,7 @@
1615
1671
  *
1616
1672
  * @static
1617
1673
  * @memberOf _
1618
- * @alias detect
1674
+ * @alias detect, findWhere
1619
1675
  * @category Collections
1620
1676
  * @param {Array|Object|String} collection The collection to iterate over.
1621
1677
  * @param {Function|Object|String} [callback=identity] The function called per
@@ -2450,6 +2506,7 @@
2450
2506
  */
2451
2507
  function difference(array) {
2452
2508
  var index = -1,
2509
+ indexOf = getIndexOf(),
2453
2510
  length = array.length,
2454
2511
  flattened = concat.apply(arrayRef, nativeSlice.call(arguments, 1)),
2455
2512
  result = [];
@@ -2623,21 +2680,14 @@
2623
2680
  * // => 2
2624
2681
  */
2625
2682
  function indexOf(array, value, fromIndex) {
2626
- var index = -1,
2627
- length = array ? array.length : 0;
2628
-
2629
2683
  if (typeof fromIndex == 'number') {
2630
- index = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0) - 1;
2684
+ var length = array ? array.length : 0;
2685
+ fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0);
2631
2686
  } else if (fromIndex) {
2632
- index = sortedIndex(array, value);
2687
+ var index = sortedIndex(array, value);
2633
2688
  return array[index] === value ? index : -1;
2634
2689
  }
2635
- while (++index < length) {
2636
- if (array[index] === value) {
2637
- return index;
2638
- }
2639
- }
2640
- return -1;
2690
+ return array ? basicIndexOf(array, value, fromIndex) : -1;
2641
2691
  }
2642
2692
 
2643
2693
  /**
@@ -2734,6 +2784,7 @@
2734
2784
  var args = arguments,
2735
2785
  argsLength = args.length,
2736
2786
  index = -1,
2787
+ indexOf = getIndexOf(),
2737
2788
  length = array ? array.length : 0,
2738
2789
  result = [];
2739
2790
 
@@ -3078,7 +3129,7 @@
3078
3129
  * Creates a duplicate-value-free version of the `array` using strict equality
3079
3130
  * for comparisons, i.e. `===`. If the `array` is already sorted, passing `true`
3080
3131
  * for `isSorted` will run a faster algorithm. If `callback` is passed, each
3081
- * element of `array` is passed through a `callback` before uniqueness is computed.
3132
+ * element of `array` is passed through the `callback` before uniqueness is computed.
3082
3133
  * The `callback` is bound to `thisArg` and invoked with three arguments; (value, index, array).
3083
3134
  *
3084
3135
  * If a property name is passed for `callback`, the created "_.pluck" style
@@ -3107,11 +3158,11 @@
3107
3158
  * _.uniq([1, 1, 2, 2, 3], true);
3108
3159
  * // => [1, 2, 3]
3109
3160
  *
3110
- * _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return Math.floor(num); });
3111
- * // => [1, 2, 3]
3161
+ * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); });
3162
+ * // => ['A', 'b', 'C']
3112
3163
  *
3113
- * _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
3114
- * // => [1, 2, 3]
3164
+ * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math);
3165
+ * // => [1, 2.5, 3]
3115
3166
  *
3116
3167
  * // using "_.pluck" callback shorthand
3117
3168
  * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
@@ -3119,6 +3170,7 @@
3119
3170
  */
3120
3171
  function uniq(array, isSorted, callback, thisArg) {
3121
3172
  var index = -1,
3173
+ indexOf = getIndexOf(),
3122
3174
  length = array ? array.length : 0,
3123
3175
  result = [],
3124
3176
  seen = result;
@@ -3149,6 +3201,31 @@
3149
3201
  return result;
3150
3202
  }
3151
3203
 
3204
+ /**
3205
+ * The inverse of `_.zip`, this method splits groups of elements into arrays
3206
+ * composed of elements from each group at their corresponding indexes.
3207
+ *
3208
+ * @static
3209
+ * @memberOf _
3210
+ * @category Arrays
3211
+ * @param {Array} array The array to process.
3212
+ * @returns {Array} Returns a new array of the composed arrays.
3213
+ * @example
3214
+ *
3215
+ * _.unzip([['moe', 30, true], ['larry', 40, false]]);
3216
+ * // => [['moe', 'larry'], [30, 40], [true, false]];
3217
+ */
3218
+ function unzip(array) {
3219
+ var index = -1,
3220
+ length = array ? max(pluck(array, 'length')) : 0,
3221
+ result = Array(length < 0 ? 0 : length);
3222
+
3223
+ while (++index < length) {
3224
+ result[index] = pluck(array, index);
3225
+ }
3226
+ return result;
3227
+ }
3228
+
3152
3229
  /**
3153
3230
  * Creates an array with all occurrences of the passed values removed using
3154
3231
  * strict equality for comparisons, i.e. `===`.
@@ -3187,7 +3264,7 @@
3187
3264
  function zip(array) {
3188
3265
  var index = -1,
3189
3266
  length = array ? max(pluck(arguments, 'length')) : 0,
3190
- result = Array(length);
3267
+ result = Array(length < 0 ? 0 : length);
3191
3268
 
3192
3269
  while (++index < length) {
3193
3270
  result[index] = pluck(arguments, index);
@@ -3430,27 +3507,27 @@
3430
3507
  return result;
3431
3508
  };
3432
3509
  }
3433
- if (typeof thisArg != 'undefined') {
3434
- if (argCount === 1) {
3435
- return function(value) {
3436
- return func.call(thisArg, value);
3437
- };
3438
- }
3439
- if (argCount === 2) {
3440
- return function(a, b) {
3441
- return func.call(thisArg, a, b);
3442
- };
3443
- }
3444
- if (argCount === 4) {
3445
- return function(accumulator, value, index, collection) {
3446
- return func.call(thisArg, accumulator, value, index, collection);
3447
- };
3448
- }
3449
- return function(value, index, collection) {
3450
- return func.call(thisArg, value, index, collection);
3510
+ if (typeof thisArg == 'undefined') {
3511
+ return func;
3512
+ }
3513
+ if (argCount === 1) {
3514
+ return function(value) {
3515
+ return func.call(thisArg, value);
3451
3516
  };
3452
3517
  }
3453
- return func;
3518
+ if (argCount === 2) {
3519
+ return function(a, b) {
3520
+ return func.call(thisArg, a, b);
3521
+ };
3522
+ }
3523
+ if (argCount === 4) {
3524
+ return function(accumulator, value, index, collection) {
3525
+ return func.call(thisArg, accumulator, value, index, collection);
3526
+ };
3527
+ }
3528
+ return function(value, index, collection) {
3529
+ return func.call(thisArg, value, index, collection);
3530
+ };
3454
3531
  }
3455
3532
 
3456
3533
  /**
@@ -3471,6 +3548,7 @@
3471
3548
  * @param {Number} wait The number of milliseconds to delay.
3472
3549
  * @param {Object} options The options object.
3473
3550
  * [leading=false] A boolean to specify execution on the leading edge of the timeout.
3551
+ * [maxWait] The maximum time `func` is allowed to be delayed before it's called.
3474
3552
  * [trailing=true] A boolean to specify execution on the trailing edge of the timeout.
3475
3553
  * @returns {Function} Returns the new debounced function.
3476
3554
  * @example
@@ -3487,7 +3565,7 @@
3487
3565
  var args,
3488
3566
  result,
3489
3567
  thisArg,
3490
- timeoutId;
3568
+ timeoutId = null;
3491
3569
 
3492
3570
  function delayed() {
3493
3571
  timeoutId = null;
@@ -3557,7 +3635,8 @@
3557
3635
  * passed, it will be used to determine the cache key for storing the result
3558
3636
  * based on the arguments passed to the memoized function. By default, the first
3559
3637
  * argument passed to the memoized function is used as the cache key. The `func`
3560
- * is executed with the `this` binding of the memoized function.
3638
+ * is executed with the `this` binding of the memoized function. The result
3639
+ * cache is exposed as the `cache` property on the memoized function.
3561
3640
  *
3562
3641
  * @static
3563
3642
  * @memberOf _
@@ -3670,8 +3749,8 @@
3670
3749
  var args,
3671
3750
  result,
3672
3751
  thisArg,
3673
- timeoutId,
3674
- lastCalled = 0;
3752
+ lastCalled = 0,
3753
+ timeoutId = null;
3675
3754
 
3676
3755
  function trailingCall() {
3677
3756
  lastCalled = new Date;
@@ -3748,7 +3827,7 @@
3748
3827
  }
3749
3828
 
3750
3829
  /**
3751
- * This function returns the first argument passed to it.
3830
+ * This method returns the first argument passed to it.
3752
3831
  *
3753
3832
  * @static
3754
3833
  * @memberOf _
@@ -3848,8 +3927,13 @@
3848
3927
  if (max == null) {
3849
3928
  max = min;
3850
3929
  min = 0;
3930
+ } else {
3931
+ max = +max || 0;
3851
3932
  }
3852
- return min + floor(nativeRandom() * ((+max || 0) - min + 1));
3933
+ var rand = nativeRandom();
3934
+ return (min % 1 || max % 1)
3935
+ ? min + nativeMin(rand * (max - min + parseFloat('1e-' + ((rand +'').length - 1))), max)
3936
+ : min + floor(rand * (max - min + 1));
3853
3937
  }
3854
3938
 
3855
3939
  /**
@@ -3964,8 +4048,9 @@
3964
4048
  * ');
3965
4049
  */
3966
4050
  function template(text, data, options) {
4051
+ var settings = lodash.templateSettings;
3967
4052
  text || (text = '');
3968
- options = defaults({}, options, lodash.templateSettings);
4053
+ options = defaults({}, options, settings);
3969
4054
 
3970
4055
  var index = 0,
3971
4056
  source = "__p += '",
@@ -4260,6 +4345,9 @@
4260
4345
  lodash.tail = rest;
4261
4346
  lodash.unique = uniq;
4262
4347
 
4348
+ // add Underscore compat
4349
+ lodash.chain = chain;
4350
+
4263
4351
  /*--------------------------------------------------------------------------*/
4264
4352
 
4265
4353
  // add functions that return unwrapped values when chaining
@@ -4268,7 +4356,6 @@
4268
4356
  lodash.escape = escape;
4269
4357
  lodash.every = every;
4270
4358
  lodash.find = find;
4271
- lodash.findWhere = findWhere;
4272
4359
  lodash.has = has;
4273
4360
  lodash.identity = identity;
4274
4361
  lodash.indexOf = indexOf;
@@ -4306,6 +4393,7 @@
4306
4393
  lodash.all = every;
4307
4394
  lodash.any = some;
4308
4395
  lodash.detect = find;
4396
+ lodash.findWhere = findWhere;
4309
4397
  lodash.foldl = reduce;
4310
4398
  lodash.foldr = reduceRight;
4311
4399
  lodash.include = contains;
@@ -4323,8 +4411,6 @@
4323
4411
 
4324
4412
  /*--------------------------------------------------------------------------*/
4325
4413
 
4326
- lodash.chain = chain;
4327
-
4328
4414
  /**
4329
4415
  * The semantic version number.
4330
4416
  *
@@ -4332,7 +4418,7 @@
4332
4418
  * @memberOf _
4333
4419
  * @type String
4334
4420
  */
4335
- lodash.VERSION = '1.2.1';
4421
+ lodash.VERSION = '1.3.1';
4336
4422
 
4337
4423
  // add functions to `lodash.prototype`
4338
4424
  mixin(lodash);