lodash-rails 3.9.3 → 3.10.0
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/lodash/rails/version.rb +1 -1
- data/vendor/assets/javascripts/lodash.compat.js +703 -604
- data/vendor/assets/javascripts/lodash.compat.min.js +98 -98
- data/vendor/assets/javascripts/lodash.js +697 -581
- data/vendor/assets/javascripts/lodash.min.js +95 -94
- metadata +2 -2
@@ -1,102 +1,102 @@
|
|
1
1
|
/**
|
2
2
|
* @license
|
3
|
-
* lodash 3.
|
3
|
+
* lodash 3.10.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
4
4
|
* Build: `lodash compat -o ./lodash.js`
|
5
5
|
*/
|
6
|
-
;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===
|
7
|
-
return r}function i(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function
|
8
|
-
}function
|
9
|
-
this.__chain__=!!t}function
|
10
|
-
return n}function
|
11
|
-
return n!==
|
12
|
-
}function
|
13
|
-
},t)}function ct(n,t){var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=
|
14
|
-
t(n,e,u)&&r.push(n)}),r}function
|
15
|
-
}return o}function
|
16
|
-
break n}if(
|
17
|
-
return
|
18
|
-
if(!
|
19
|
-
}),n}function
|
20
|
-
return r}function Ut(n,t){var r;return
|
21
|
-
r+=+t(n,e,u)||0}),r}function Lt(n,t){var e=-1,u=
|
22
|
-
}function
|
23
|
-
}return
|
24
|
-
for(;++u<e;)
|
25
|
-
for(typeof o=="function"?(o=
|
26
|
-
}var e=
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
r[
|
35
|
-
|
36
|
-
|
37
|
-
r.
|
38
|
-
n
|
39
|
-
return
|
40
|
-
return
|
41
|
-
if(
|
42
|
-
|
43
|
-
return
|
44
|
-
|
45
|
-
n[e]=n[r],n[r]=o}return n.length=t,n}function ae(n,t,r){var e=
|
46
|
-
(
|
47
|
-
return
|
48
|
-
case 1:return n.call(this,r[0],o);case 2:return n.call(this,r[0],r[1],o)}for(u=
|
49
|
-
var t=typeof n;return!!n&&("object"==t||"function"==t)}function
|
50
|
-
}function Oe(n){return
|
51
|
-
r=
|
52
|
-
do t%2&&(r+=n),t=
|
53
|
-
r=t,t=n,n=this)}u||(u=
|
54
|
-
var
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
var
|
59
|
-
|
60
|
-
|
61
|
-
},
|
62
|
-
|
63
|
-
|
64
|
-
}
|
65
|
-
|
66
|
-
|
67
|
-
},
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
Nn.
|
74
|
-
}
|
75
|
-
|
76
|
-
var
|
77
|
-
|
78
|
-
Nn.
|
79
|
-
|
80
|
-
|
81
|
-
},Nn.
|
82
|
-
|
83
|
-
t=
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
return
|
94
|
-
|
95
|
-
e
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
"\
|
101
|
-
"
|
102
|
-
|
6
|
+
;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===w,u=n===n,o=null===t,i=t===w,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(n<t&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function t(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function r(n,t,r){if(t!==t)return p(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(n){return typeof n=="function"||false}function u(n){return null==n?"":n+""}function o(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););
|
7
|
+
return r}function i(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function f(t,r){return n(t.a,r.a)||t.b-r.b}function a(n){return Nn[n]}function c(n){return Tn[n]}function l(n,t,r){return t?n=Bn[n]:r&&(n=Dn[n]),"\\"+n}function s(n){return"\\"+Dn[n]}function p(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function h(n){return!!n&&typeof n=="object"}function _(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n);
|
8
|
+
}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]=P,o[++u]=r);return o}function g(n){for(var t=-1,r=n.length;++t<r&&_(n.charCodeAt(t)););return t}function y(n){for(var t=n.length;t--&&_(n.charCodeAt(t)););return t}function d(n){return Pn[n]}function m(_){function Nn(n){if(h(n)&&!(Wo(n)||n instanceof zn)){if(n instanceof Pn)return n;if(eu.call(n,"__chain__")&&eu.call(n,"__wrapped__"))return qr(n)}return new Pn(n)}function Tn(){}function Pn(n,t,r){this.__wrapped__=n,this.__actions__=r||[],
|
9
|
+
this.__chain__=!!t}function zn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=Cu,this.__views__=[]}function Bn(){this.__data__={}}function Dn(n){var t=n?n.length:0;for(this.data={hash:mu(null),set:new hu};t--;)this.push(n[t])}function Mn(n,t){var r=n.data;return(typeof t=="string"||de(t)?r.set.has(t):r.hash[t])?0:-1}function qn(n,t){var r=-1,e=n.length;for(t||(t=De(e));++r<e;)t[r]=n[r];return t}function Kn(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););
|
10
|
+
return n}function Vn(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Zn(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function Xn(n,t){for(var r=-1,e=n.length,u=De(e);++r<e;)u[r]=t(n[r],r,n);return u}function Hn(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function Qn(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function nt(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;
|
11
|
+
return false}function tt(n,t,r,e){return n!==w&&eu.call(e,r)?n:t}function rt(n,t,r){for(var e=-1,u=Ko(t),o=u.length;++e<o;){var i=u[e],f=n[i],a=r(f,t[i],i,n,t);(a===a?a===f:f!==f)&&(f!==w||i in n)||(n[i]=a)}return n}function et(n,t){return null==t?n:ot(t,Ko(t),n)}function ut(n,t){for(var r=-1,e=null==n,u=!e&&Sr(n),o=u?n.length:0,i=t.length,f=De(i);++r<i;){var a=t[r];f[r]=u?Ur(a,o)?n[a]:w:e?w:n[a]}return f}function ot(n,t,r){r||(r={});for(var e=-1,u=t.length;++e<u;){var o=t[e];r[o]=n[o]}return r}function it(n,t,r){
|
12
|
+
var e=typeof n;return"function"==e?t===w?n:Dt(n,t,r):null==n?Ne:"object"==e?At(n):t===w?Be(n):jt(n,t)}function ft(n,t,r,e,u,o,i){var f;if(r&&(f=u?r(n,e,u):r(n)),f!==w)return f;if(!de(n))return n;if(e=Wo(n)){if(f=Ir(n),!t)return qn(n,f)}else{var a=ou.call(n),c=a==K;if(a!=Z&&a!=z&&(!c||u))return Ln[a]?Er(n,a,t):u?n:{};if(Gn(n))return u?n:{};if(f=Rr(c?{}:n),!t)return et(f,n)}for(o||(o=[]),i||(i=[]),u=o.length;u--;)if(o[u]==n)return i[u];return o.push(n),i.push(f),(e?Kn:gt)(n,function(e,u){f[u]=ft(e,t,r,u,n,o,i);
|
13
|
+
}),f}function at(n,t,r){if(typeof n!="function")throw new Xe(T);return _u(function(){n.apply(w,r)},t)}function ct(n,t){var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=jr(),f=i==r,a=f&&t.length>=F&&mu&&hu?new Dn(t):null,c=t.length;a&&(i=Mn,f=false,t=a);n:for(;++o<e;)if(a=n[o],f&&a===a){for(var l=c;l--;)if(t[l]===a)continue n;u.push(a)}else 0>i(t,a,0)&&u.push(a);return u}function lt(n,t){var r=true;return zu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function st(n,t,r,e){var u=e,o=u;return zu(n,function(n,i,f){
|
14
|
+
i=+t(n,i,f),(r(i,u)||i===e&&i===o)&&(u=i,o=n)}),o}function pt(n,t){var r=[];return zu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ht(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 _t(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++u<o;){var i=n[u];h(i)&&Sr(i)&&(r||Wo(i)||_e(i))?t?_t(i,t,r,e):Hn(e,i):r||(e[e.length]=i)}return e}function vt(n,t){Du(n,t,Ee)}function gt(n,t){return Du(n,t,Ko)}function yt(n,t){return Mu(n,t,Ko)}function dt(n,t){for(var r=-1,e=t.length,u=-1,o=[];++r<e;){
|
15
|
+
var i=t[r];ye(n[i])&&(o[++u]=i)}return o}function mt(n,t,r){if(null!=n){n=Dr(n),r!==w&&r in n&&(t=[r]),r=0;for(var e=t.length;null!=n&&r<e;)n=Dr(n)[t[r++]];return r&&r==e?n:w}}function wt(n,t,r,e,u,o){if(n===t)n=true;else if(null==n||null==t||!de(n)&&!h(t))n=n!==n&&t!==t;else n:{var i=wt,f=Wo(n),a=Wo(t),c=B,l=B;f||(c=ou.call(n),c==z?c=Z:c!=Z&&(f=je(n))),a||(l=ou.call(t),l==z?l=Z:l!=Z&&je(t));var s=c==Z&&!Gn(n),a=l==Z&&!Gn(t),l=c==l;if(!l||f||s){if(!e&&(c=s&&eu.call(n,"__wrapped__"),a=a&&eu.call(t,"__wrapped__"),
|
16
|
+
c||a)){n=i(c?n.value():n,a?t.value():t,r,e,u,o);break n}if(l){for(u||(u=[]),o||(o=[]),c=u.length;c--;)if(u[c]==n){n=o[c]==t;break n}u.push(n),o.push(t),n=(f?mr:xr)(n,t,i,r,e,u,o),u.pop(),o.pop()}else n=false}else n=wr(n,t,c)}return n}function xt(n,t,r){var e=t.length,u=e,o=!r;if(null==n)return!u;for(n=Dr(n);e--;){var i=t[e];if(o&&i[2]?i[1]!==n[i[0]]:!(i[0]in n))return false}for(;++e<u;){var i=t[e],f=i[0],a=n[f],c=i[1];if(o&&i[2]){if(a===w&&!(f in n))return false}else if(i=r?r(a,c,f):w,i===w?!wt(c,a,r,true):!i)return false;
|
17
|
+
}return true}function bt(n,t){var r=-1,e=Sr(n)?De(n.length):[];return zu(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function At(n){var t=kr(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?false:(n=Dr(n),n[r]===e&&(e!==w||r in n))}}return function(n){return xt(n,t)}}function jt(n,t){var r=Wo(n),e=Wr(n)&&t===t&&!de(t),u=n+"";return n=Mr(n),function(o){if(null==o)return false;var i=u;if(o=Dr(o),!(!r&&e||i in o)){if(o=1==n.length?o:mt(o,St(n,0,-1)),null==o)return false;i=Gr(n),o=Dr(o);
|
18
|
+
}return o[i]===t?t!==w||i in o:wt(t,o[i],w,true)}}function kt(n,t,r,e,u){if(!de(n))return n;var o=Sr(t)&&(Wo(t)||je(t)),i=o?w:Ko(t);return Kn(i||t,function(f,a){if(i&&(a=f,f=t[a]),h(f)){e||(e=[]),u||(u=[]);n:{for(var c=a,l=e,s=u,p=l.length,_=t[c];p--;)if(l[p]==_){n[c]=s[p];break n}var p=n[c],v=r?r(p,_,c,n,t):w,g=v===w;g&&(v=_,Sr(_)&&(Wo(_)||je(_))?v=Wo(p)?p:Sr(p)?qn(p):[]:xe(_)||_e(_)?v=_e(p)?Ie(p):xe(p)?p:{}:g=false),l.push(_),s.push(v),g?n[c]=kt(v,_,r,l,s):(v===v?v!==p:p===p)&&(n[c]=v)}}else c=n[a],
|
19
|
+
l=r?r(c,f,a,n,t):w,(s=l===w)&&(l=f),l===w&&(!o||a in n)||!s&&(l===l?l===c:c!==c)||(n[a]=l)}),n}function Ot(n){return function(t){return null==t?w:Dr(t)[n]}}function It(n){var t=n+"";return n=Mr(n),function(r){return mt(r,n,t)}}function Rt(n,t){for(var r=n?t.length:0;r--;){var e=t[r];if(e!=u&&Ur(e)){var u=e;vu.call(n,e,1)}}}function Et(n,t){return n+wu(Ru()*(t-n+1))}function Ct(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function St(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,
|
20
|
+
0>t&&(t=-t>u?0:u+t),r=r===w||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=De(u);++e<u;)r[e]=n[e+t];return r}function Ut(n,t){var r;return zu(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function $t(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function Wt(t,r,e){var u=br(),o=-1;return r=Xn(r,function(n){return u(n)}),t=bt(t,function(n){return{a:Xn(r,function(t){return t(n)}),b:++o,c:n}}),$t(t,function(t,r){var u;n:{for(var o=-1,i=t.a,f=r.a,a=i.length,c=e.length;++o<a;)if(u=n(i[o],f[o])){
|
21
|
+
if(o>=c)break n;o=e[o],u*="asc"===o||true===o?1:-1;break n}u=t.b-r.b}return u})}function Ft(n,t){var r=0;return zu(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function Lt(n,t){var e=-1,u=jr(),o=n.length,i=u==r,f=i&&o>=F,a=f&&mu&&hu?new Dn(void 0):null,c=[];a?(u=Mn,i=false):(f=false,a=t?[]:c);n:for(;++e<o;){var l=n[e],s=t?t(l,e,n):l;if(i&&l===l){for(var p=a.length;p--;)if(a[p]===s)continue n;t&&a.push(s),c.push(l)}else 0>u(a,s,0)&&((t||f)&&a.push(s),c.push(l))}return c}function Nt(n,t){for(var r=-1,e=t.length,u=De(e);++r<e;)u[r]=n[t[r]];
|
22
|
+
return u}function Tt(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););return r?St(n,e?0:o,e?o+1:u):St(n,e?o+1:0,e?u:o)}function Pt(n,t){var r=n;r instanceof zn&&(r=r.value());for(var e=-1,u=t.length;++e<u;)var o=t[e],r=o.func.apply(o.thisArg,Hn([r],o.args));return r}function zt(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=Uu){for(;e<u;){var o=e+u>>>1,i=n[o];(r?i<=t:i<t)&&null!==i?e=o+1:u=o}return u}return Bt(n,t,Ne,r)}function Bt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,a=t===w;u<o;){
|
23
|
+
var c=wu((u+o)/2),l=r(n[c]),s=l!==w,p=l===l;(i?p||e:f?p&&s&&(e||null!=l):a?p&&(e||s):null==l?0:e?l<=t:l<t)?u=c+1:o=c}return ku(o,Su)}function Dt(n,t,r){if(typeof n!="function")return Ne;if(t===w)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)};case 5:return function(r,e,u,o,i){return n.call(t,r,e,u,o,i)}}return function(){return n.apply(t,arguments)}}function Mt(n){var t=new au(n.byteLength);
|
24
|
+
return new gu(t).set(new gu(n)),t}function qt(n,t,r){for(var e=r.length,u=-1,o=ju(n.length-e,0),i=-1,f=t.length,a=De(f+o);++i<f;)a[i]=t[i];for(;++u<e;)a[r[u]]=n[u];for(;o--;)a[i++]=n[u++];return a}function Kt(n,t,r){for(var e=-1,u=r.length,o=-1,i=ju(n.length-u,0),f=-1,a=t.length,c=De(i+a);++o<i;)c[o]=n[o];for(i=o;++f<a;)c[i+f]=t[f];for(;++e<u;)c[i+r[e]]=n[o++];return c}function Vt(n,t){return function(r,e,u){var o=t?t():{};if(e=br(e,u,3),Wo(r)){u=-1;for(var i=r.length;++u<i;){var f=r[u];n(o,f,e(f,u,r),r);
|
25
|
+
}}else zu(r,function(t,r,u){n(o,t,e(t,r,u),u)});return o}}function Zt(n){return pe(function(t,r){var e=-1,u=null==t?0:r.length,o=2<u?r[u-2]:w,i=2<u?r[2]:w,f=1<u?r[u-1]:w;for(typeof o=="function"?(o=Dt(o,f,5),u-=2):(o=typeof f=="function"?f:w,u-=o?1:0),i&&$r(r[0],r[1],i)&&(o=3>u?w:o,u=1);++e<u;)(i=r[e])&&n(t,i,o);return t})}function Yt(n,t){return function(r,e){var u=r?Vu(r):0;if(!Lr(u))return n(r,e);for(var o=t?u:-1,i=Dr(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}function Gt(n){return function(t,r,e){
|
26
|
+
var u=Dr(t);e=e(t);for(var o=e.length,i=n?o:-1;n?i--:++i<o;){var f=e[i];if(false===r(u[f],f,u))break}return t}}function Jt(n,t){function r(){return(this&&this!==Yn&&this instanceof r?e:n).apply(t,arguments)}var e=Ht(n);return r}function Xt(n){return function(t){var r=-1;t=Fe(Ue(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Ht(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);
|
27
|
+
case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Pu(n.prototype),t=n.apply(r,t);return de(t)?t:r}}function Qt(n){function t(r,e,u){return u&&$r(r,e,u)&&(e=w),r=dr(r,n,w,w,w,w,w,e),r.placeholder=t.placeholder,r}return t}function nr(n,t){return pe(function(r){var e=r[0];return null==e?e:(r.push(t),n.apply(w,r))})}function tr(n,t){return function(r,e,u){
|
28
|
+
if(u&&$r(r,e,u)&&(e=w),e=br(e,u,3),1==e.length){u=r=Wo(r)?r:Br(r);for(var o=e,i=-1,f=u.length,a=t,c=a;++i<f;){var l=u[i],s=+o(l);n(s,a)&&(a=s,c=l)}if(u=c,!r.length||u!==t)return u}return st(r,e,n,t)}}function rr(n,r){return function(e,u,o){return u=br(u,o,3),Wo(e)?(u=t(e,u,r),-1<u?e[u]:w):ht(e,u,n)}}function er(n){return function(r,e,u){return r&&r.length?(e=br(e,u,3),t(r,e,n)):-1}}function ur(n){return function(t,r,e){return r=br(r,e,3),ht(t,r,n,true)}}function or(n){return function(){for(var t,r=arguments.length,e=n?r:-1,u=0,o=De(r);n?e--:++e<r;){
|
29
|
+
var i=o[u++]=arguments[e];if(typeof i!="function")throw new Xe(T);!t&&Pn.prototype.thru&&"wrapper"==Ar(i)&&(t=new Pn([],true))}for(e=t?-1:r;++e<r;){var i=o[e],u=Ar(i),f="wrapper"==u?Ku(i):w;t=f&&Fr(f[0])&&f[1]==(E|k|I|C)&&!f[4].length&&1==f[9]?t[Ar(f[0])].apply(t,f[3]):1==i.length&&Fr(i)?t[u]():t.thru(i)}return function(){var n=arguments,e=n[0];if(t&&1==n.length&&Wo(e)&&e.length>=F)return t.plant(e).value();for(var u=0,n=r?o[u].apply(this,n):e;++u<r;)n=o[u].call(this,n);return n}}}function ir(n,t){
|
30
|
+
return function(r,e,u){return typeof e=="function"&&u===w&&Wo(r)?n(r,e):t(r,Dt(e,u,3))}}function fr(n){return function(t,r,e){return(typeof r!="function"||e!==w)&&(r=Dt(r,e,3)),n(t,r,Ee)}}function ar(n){return function(t,r,e){return(typeof r!="function"||e!==w)&&(r=Dt(r,e,3)),n(t,r)}}function cr(n){return function(t,r,e){var u={};return r=br(r,e,3),gt(t,function(t,e,o){o=r(t,e,o),e=n?o:e,t=n?t:o,u[e]=t}),u}}function lr(n){return function(t,r,e){return t=u(t),(n?t:"")+_r(t,r,e)+(n?"":t)}}function sr(n){
|
31
|
+
var t=pe(function(r,e){var u=v(e,t.placeholder);return dr(r,n,w,e,u)});return t}function pr(n,t){return function(r,e,u,o){var i=3>arguments.length;return typeof e=="function"&&o===w&&Wo(r)?n(r,e,u,i):Ct(r,br(e,o,4),u,i,t)}}function hr(n,t,r,e,u,o,i,f,a,c){function l(){for(var m=arguments.length,x=m,j=De(m);x--;)j[x]=arguments[x];if(e&&(j=qt(j,e,u)),o&&(j=Kt(j,o,i)),_||y){var x=l.placeholder,k=v(j,x),m=m-k.length;if(m<c){var O=f?qn(f):w,m=ju(c-m,0),E=_?k:w,k=_?w:k,C=_?j:w,j=_?w:j;return t|=_?I:R,t&=~(_?R:I),
|
32
|
+
g||(t&=~(b|A)),j=[n,t,r,C,E,j,k,O,a,m],O=hr.apply(w,j),Fr(n)&&Zu(O,j),O.placeholder=x,O}}if(x=p?r:this,O=h?x[n]:n,f)for(m=j.length,E=ku(f.length,m),k=qn(j);E--;)C=f[E],j[E]=Ur(C,m)?k[C]:w;return s&&a<j.length&&(j.length=a),this&&this!==Yn&&this instanceof l&&(O=d||Ht(n)),O.apply(x,j)}var s=t&E,p=t&b,h=t&A,_=t&k,g=t&j,y=t&O,d=h?w:Ht(n);return l}function _r(n,t,r){return n=n.length,t=+t,n<t&&bu(t)?(t-=n,r=null==r?" ":r+"",$e(r,du(t/r.length)).slice(0,t)):""}function vr(n,t,r,e){function u(){for(var t=-1,f=arguments.length,a=-1,c=e.length,l=De(c+f);++a<c;)l[a]=e[a];
|
33
|
+
for(;f--;)l[a++]=arguments[++t];return(this&&this!==Yn&&this instanceof u?i:n).apply(o?r:this,l)}var o=t&b,i=Ht(n);return u}function gr(n){var t=Ve[n];return function(n,r){return(r=r===w?0:+r||0)?(r=su(10,r),t(n*r)/r):t(n)}}function yr(n){return function(t,r,e,u){var o=br(e);return null==e&&o===it?zt(t,r,n):Bt(t,r,o(e,u,1),n)}}function dr(n,t,r,e,u,o,i,f){var a=t&A;if(!a&&typeof n!="function")throw new Xe(T);var c=e?e.length:0;if(c||(t&=~(I|R),e=u=w),c-=u?u.length:0,t&R){var l=e,s=u;e=u=w}var p=a?w:Ku(n);
|
34
|
+
return r=[n,t,r,e,u,l,s,o,i,f],p&&(e=r[1],t=p[1],f=e|t,u=t==E&&e==k||t==E&&e==C&&r[7].length<=p[8]||t==(E|C)&&e==k,(f<E||u)&&(t&b&&(r[2]=p[2],f|=e&b?0:j),(e=p[3])&&(u=r[3],r[3]=u?qt(u,e,p[4]):qn(e),r[4]=u?v(r[3],P):qn(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Kt(u,e,p[6]):qn(e),r[6]=u?v(r[5],P):qn(p[6])),(e=p[7])&&(r[7]=qn(e)),t&E&&(r[8]=null==r[8]?p[8]:ku(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=f),t=r[1],f=r[9]),r[9]=null==f?a?0:n.length:ju(f-c,0)||0,(p?qu:Zu)(t==b?Jt(r[0],r[2]):t!=I&&t!=(b|I)||r[4].length?hr.apply(w,r):vr.apply(w,r),r);
|
35
|
+
}function mr(n,t,r,e,u,o,i){var f=-1,a=n.length,c=t.length;if(a!=c&&(!u||c<=a))return false;for(;++f<a;){var l=n[f],c=t[f],s=e?e(u?c:l,u?l:c,f):w;if(s!==w){if(s)continue;return false}if(u){if(!nt(t,function(n){return l===n||r(l,n,e,u,o,i)}))return false}else if(l!==c&&!r(l,c,e,u,o,i))return false}return true}function wr(n,t,r){switch(r){case D:case M:return+n==+t;case q:return n.name==t.name&&n.message==t.message;case V:return n!=+n?t!=+t:n==+t;case Y:case G:return n==t+""}return false}function xr(n,t,r,e,u,o,i){var f=Ko(n),a=f.length,c=Ko(t).length;
|
36
|
+
if(a!=c&&!u)return false;for(c=a;c--;){var l=f[c];if(!(u?l in t:eu.call(t,l)))return false}for(var s=u;++c<a;){var l=f[c],p=n[l],h=t[l],_=e?e(u?h:p,u?p:h,l):w;if(_===w?!r(p,h,e,u,o,i):!_)return false;s||(s="constructor"==l)}return s||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false}function br(n,t,r){var e=Nn.callback||Le,e=e===Le?it:e;return r?e(n,t,r):e}function Ar(n){for(var t=n.name,r=Fu[t],e=r?r.length:0;e--;){
|
37
|
+
var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}function jr(n,t,e){var u=Nn.indexOf||Yr,u=u===Yr?r:u;return n?u(n,t,e):u}function kr(n){n=Ce(n);for(var t=n.length;t--;){var r=n[t][1];n[t][2]=r===r&&!de(r)}return n}function Or(n,t){var r=null==n?w:n[t];return me(r)?r:w}function Ir(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&eu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Rr(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Ye),
|
38
|
+
new n}function Er(n,t,r){var e=n.constructor;switch(t){case J:return Mt(n);case D:case M:return new e(+n);case X:case H:case Q:case nn:case tn:case rn:case en:case un:case on:return e instanceof e&&(e=Lu[t]),t=n.buffer,new e(r?Mt(t):t,n.byteOffset,n.length);case V:case G:return new e(n);case Y:var u=new e(n.source,kn.exec(n));u.lastIndex=n.lastIndex}return u}function Cr(n,t,r){return null==n||Wr(t,n)||(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),t=Gr(t)),t=null==n?n:n[t],null==t?w:t.apply(n,r)}function Sr(n){
|
39
|
+
return null!=n&&Lr(Vu(n))}function Ur(n,t){return n=typeof n=="number"||Rn.test(n)?+n:-1,t=null==t?$u:t,-1<n&&0==n%1&&n<t}function $r(n,t,r){if(!de(r))return false;var e=typeof t;return("number"==e?Sr(r)&&Ur(t,r.length):"string"==e&&t in r)?(t=r[t],n===n?n===t:t!==t):false}function Wr(n,t){var r=typeof n;return"string"==r&&dn.test(n)||"number"==r?true:Wo(n)?false:!yn.test(n)||null!=t&&n in Dr(t)}function Fr(n){var t=Ar(n);return t in zn.prototype?(t=Nn[t],n===t?true:(t=Ku(t),!!t&&n===t[0])):false}function Lr(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=$u;
|
40
|
+
}function Nr(n,t){return n===w?t:Fo(n,t,Nr)}function Tr(n,t){n=Dr(n);for(var r=-1,e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u}function Pr(n,t){var r={};return vt(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function zr(n){for(var t=Ee(n),r=t.length,e=r&&n.length,u=!!e&&Lr(e)&&(Wo(n)||_e(n)||Ae(n)),o=-1,i=[];++o<r;){var f=t[o];(u&&Ur(f,e)||eu.call(n,f))&&i.push(f)}return i}function Br(n){return null==n?[]:Sr(n)?Nn.support.unindexedChars&&Ae(n)?n.split(""):de(n)?n:Ye(n):Se(n)}function Dr(n){
|
41
|
+
if(Nn.support.unindexedChars&&Ae(n)){for(var t=-1,r=n.length,e=Ye(n);++t<r;)e[t]=n.charAt(t);return e}return de(n)?n:Ye(n)}function Mr(n){if(Wo(n))return n;var t=[];return u(n).replace(mn,function(n,r,e,u){t.push(e?u.replace(An,"$1"):r||n)}),t}function qr(n){return n instanceof zn?n.clone():new Pn(n.__wrapped__,n.__chain__,qn(n.__actions__))}function Kr(n,t,r){return n&&n.length?((r?$r(n,t,r):null==t)&&(t=1),St(n,0>t?0:t)):[]}function Vr(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1),
|
42
|
+
t=e-(+t||0),St(n,0,0>t?0:t)):[]}function Zr(n){return n?n[0]:w}function Yr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?ju(u+e,0):e;else if(e)return e=zt(n,t),e<u&&(t===t?t===n[e]:n[e]!==n[e])?e:-1;return r(n,t,e||0)}function Gr(n){var t=n?n.length:0;return t?n[t-1]:w}function Jr(n){return Kr(n,1)}function Xr(n,t,e,u){if(!n||!n.length)return[];null!=t&&typeof t!="boolean"&&(u=e,e=$r(n,t,u)?w:t,t=false);var o=br();if((null!=e||o!==it)&&(e=o(e,u,3)),t&&jr()==r){t=e;var i;e=-1,u=n.length;
|
43
|
+
for(var o=-1,f=[];++e<u;){var a=n[e],c=t?t(a,e,n):a;e&&i===c||(i=c,f[++o]=a)}n=f}else n=Lt(n,e);return n}function Hr(n){if(!n||!n.length)return[];var t=-1,r=0;n=Zn(n,function(n){return Sr(n)?(r=ju(n.length,r),true):void 0});for(var e=De(r);++t<r;)e[t]=Xn(n,Ot(t));return e}function Qr(n,t,r){return n&&n.length?(n=Hr(n),null==t?n:(t=Dt(t,r,4),Xn(n,function(n){return Qn(n,t,w,true)}))):[]}function ne(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Wo(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1]);
|
44
|
+
}return u}function te(n){return n=Nn(n),n.__chain__=true,n}function re(n,t,r){return t.call(r,n)}function ee(n,t,r){var e=Wo(n)?Vn:lt;return r&&$r(n,t,r)&&(t=w),(typeof t!="function"||r!==w)&&(t=br(t,r,3)),e(n,t)}function ue(n,t,r){var e=Wo(n)?Zn:pt;return t=br(t,r,3),e(n,t)}function oe(n,t,r,e){var u=n?Vu(n):0;return Lr(u)||(n=Se(n),u=n.length),r=typeof r!="number"||e&&$r(t,r,e)?0:0>r?ju(u+r,0):r||0,typeof n=="string"||!Wo(n)&&Ae(n)?r<=u&&-1<n.indexOf(t,r):!!u&&-1<jr(n,t,r)}function ie(n,t,r){var e=Wo(n)?Xn:bt;
|
45
|
+
return t=br(t,r,3),e(n,t)}function fe(n,t,r){if(r?$r(n,t,r):null==t){n=Br(n);var e=n.length;return 0<e?n[Et(0,e-1)]:w}r=-1,n=Oe(n);var e=n.length,u=e-1;for(t=ku(0>t?0:+t||0,e);++r<t;){var e=Et(r,u),o=n[e];n[e]=n[r],n[r]=o}return n.length=t,n}function ae(n,t,r){var e=Wo(n)?nt:Ut;return r&&$r(n,t,r)&&(t=w),(typeof t!="function"||r!==w)&&(t=br(t,r,3)),e(n,t)}function ce(n,t){var r;if(typeof t!="function"){if(typeof n!="function")throw new Xe(T);var e=n;n=t,t=e}return function(){return 0<--n&&(r=t.apply(this,arguments)),
|
46
|
+
1>=n&&(t=w),r}}function le(n,t,r){function e(t,r){r&&cu(r),a=p=h=w,t&&(_=wo(),c=n.apply(s,f),p||a||(f=s=w))}function u(){var n=t-(wo()-l);0>=n||n>t?e(h,a):p=_u(u,n)}function o(){e(g,p)}function i(){if(f=arguments,l=wo(),s=this,h=g&&(p||!y),false===v)var r=y&&!p;else{a||y||(_=l);var e=v-(l-_),i=0>=e||e>v;i?(a&&(a=cu(a)),_=l,c=n.apply(s,f)):a||(a=_u(o,e))}return i&&p?p=cu(p):p||t===v||(p=_u(u,t)),r&&(i=true,c=n.apply(s,f)),!i||p||a||(f=s=w),c}var f,a,c,l,s,p,h,_=0,v=false,g=true;if(typeof n!="function")throw new Xe(T);
|
47
|
+
if(t=0>t?0:+t||0,true===r)var y=true,g=false;else de(r)&&(y=!!r.leading,v="maxWait"in r&&ju(+r.maxWait||0,t),g="trailing"in r?!!r.trailing:g);return i.cancel=function(){p&&cu(p),a&&cu(a),_=0,a=p=h=w},i}function se(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Xe(T);return r.cache=new se.Cache,r}function pe(n,t){if(typeof n!="function")throw new Xe(T);return t=ju(t===w?n.length-1:+t||0,0),
|
48
|
+
function(){for(var r=arguments,e=-1,u=ju(r.length-t,0),o=De(u);++e<u;)o[e]=r[t+e];switch(t){case 0:return n.call(this,o);case 1:return n.call(this,r[0],o);case 2:return n.call(this,r[0],r[1],o)}for(u=De(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function he(n,t){return n>t}function _e(n){return h(n)&&Sr(n)&&eu.call(n,"callee")&&!pu.call(n,"callee")}function ve(n,t,r,e){return e=(r=typeof r=="function"?Dt(r,e,3):w)?r(n,t):w,e===w?wt(n,t,r):!!e}function ge(n){return h(n)&&typeof n.message=="string"&&ou.call(n)==q;
|
49
|
+
}function ye(n){return de(n)&&ou.call(n)==K}function de(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function me(n){return null==n?false:ye(n)?fu.test(ru.call(n)):h(n)&&(Gn(n)?fu:In).test(n)}function we(n){return typeof n=="number"||h(n)&&ou.call(n)==V}function xe(n){var t;if(!h(n)||ou.call(n)!=Z||Gn(n)||_e(n)||!(eu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return Nn.support.ownLast?(vt(n,function(n,t,e){return r=eu.call(e,t),false}),false!==r):(vt(n,function(n,t){
|
50
|
+
r=t}),r===w||eu.call(n,r))}function be(n){return de(n)&&ou.call(n)==Y}function Ae(n){return typeof n=="string"||h(n)&&ou.call(n)==G}function je(n){return h(n)&&Lr(n.length)&&!!Fn[ou.call(n)]}function ke(n,t){return n<t}function Oe(n){var t=n?Vu(n):0;return Lr(t)?t?Nn.support.unindexedChars&&Ae(n)?n.split(""):qn(n):[]:Se(n)}function Ie(n){return ot(n,Ee(n))}function Re(n){return dt(n,Ee(n))}function Ee(n){if(null==n)return[];de(n)||(n=Ye(n));for(var t=n.length,r=Nn.support,t=t&&Lr(t)&&(Wo(n)||_e(n)||Ae(n))&&t||0,e=n.constructor,u=-1,e=ye(e)&&e.prototype||nu,o=e===n,i=De(t),f=0<t,a=r.enumErrorProps&&(n===Qe||n instanceof qe),c=r.enumPrototypes&&ye(n);++u<t;)i[u]=u+"";
|
51
|
+
for(var l in n)c&&"prototype"==l||a&&("message"==l||"name"==l)||f&&Ur(l,t)||"constructor"==l&&(o||!eu.call(n,l))||i.push(l);if(r.nonEnumShadows&&n!==nu)for(t=n===tu?G:n===Qe?q:ou.call(n),r=Nu[t]||Nu[Z],t==Z&&(e=nu),t=Wn.length;t--;)l=Wn[t],u=r[l],o&&u||(u?!eu.call(n,l):n[l]===e[l])||i.push(l);return i}function Ce(n){n=Dr(n);for(var t=-1,r=Ko(n),e=r.length,u=De(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u}function Se(n){return Nt(n,Ko(n))}function Ue(n){return(n=u(n))&&n.replace(En,a).replace(bn,"");
|
52
|
+
}function $e(n,t){var r="";if(n=u(n),t=+t,1>t||!n||!bu(t))return r;do t%2&&(r+=n),t=wu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function Fe(n,t,r){return r&&$r(n,t,r)&&(t=w),n=u(n),n.match(t||Un)||[]}function Le(n,t,r){return r&&$r(n,t,r)&&(t=w),h(n)?Te(n):it(n,t)}function Ne(n){return n}function Te(n){return At(ft(n,true))}function Pe(n,t,r){if(null==r){var e=de(t),u=e?Ko(t):w;((u=u&&u.length?dt(t,u):w)?u.length:e)||(u=false,
|
53
|
+
r=t,t=n,n=this)}u||(u=dt(t,Ko(t)));var o=true,e=-1,i=ye(n),f=u.length;false===r?o=false:de(r)&&"chain"in r&&(o=r.chain);for(;++e<f;){r=u[e];var a=t[r];n[r]=a,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;if(o||r){var e=n(this.__wrapped__);return(e.__actions__=qn(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return t.apply(n,Hn([this.value()],arguments))}}(a))}return n}function ze(){}function Be(n){return Wr(n)?Ot(n):It(n)}_=_?Jn.defaults(Yn.Object(),_,Jn.pick(Yn,$n)):Yn;
|
54
|
+
var De=_.Array,Me=_.Date,qe=_.Error,Ke=_.Function,Ve=_.Math,Ze=_.Number,Ye=_.Object,Ge=_.RegExp,Je=_.String,Xe=_.TypeError,He=De.prototype,Qe=qe.prototype,nu=Ye.prototype,tu=Je.prototype,ru=Ke.prototype.toString,eu=nu.hasOwnProperty,uu=0,ou=nu.toString,iu=Yn._,fu=Ge("^"+ru.call(eu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),au=_.ArrayBuffer,cu=_.clearTimeout,lu=_.parseFloat,su=Ve.pow,pu=nu.propertyIsEnumerable,hu=Or(_,"Set"),_u=_.setTimeout,vu=He.splice,gu=_.Uint8Array,yu=Or(_,"WeakMap"),du=Ve.ceil,mu=Or(Ye,"create"),wu=Ve.floor,xu=Or(De,"isArray"),bu=_.isFinite,Au=Or(Ye,"keys"),ju=Ve.max,ku=Ve.min,Ou=Or(Me,"now"),Iu=_.parseInt,Ru=Ve.random,Eu=Ze.NEGATIVE_INFINITY,Cu=Ze.POSITIVE_INFINITY,Su=4294967294,Uu=2147483647,$u=9007199254740991,Wu=yu&&new yu,Fu={},Lu={};
|
55
|
+
Lu[X]=_.Float32Array,Lu[H]=_.Float64Array,Lu[Q]=_.Int8Array,Lu[nn]=_.Int16Array,Lu[tn]=_.Int32Array,Lu[rn]=gu,Lu[en]=_.Uint8ClampedArray,Lu[un]=_.Uint16Array,Lu[on]=_.Uint32Array;var Nu={};Nu[B]=Nu[M]=Nu[V]={constructor:true,toLocaleString:true,toString:true,valueOf:true},Nu[D]=Nu[G]={constructor:true,toString:true,valueOf:true},Nu[q]=Nu[K]=Nu[Y]={constructor:true,toString:true},Nu[Z]={constructor:true},Kn(Wn,function(n){for(var t in Nu)if(eu.call(Nu,t)){var r=Nu[t];r[n]=eu.call(r,n)}});var Tu=Nn.support={};!function(n){
|
56
|
+
function t(){this.x=n}var r={0:n,length:n},e=[];t.prototype={valueOf:n,y:n};for(var u in new t)e.push(u);Tu.enumErrorProps=pu.call(Qe,"message")||pu.call(Qe,"name"),Tu.enumPrototypes=pu.call(t,"prototype"),Tu.nonEnumShadows=!/valueOf/.test(e),Tu.ownLast="x"!=e[0],Tu.spliceObjects=(vu.call(r,0,1),!r[0]),Tu.unindexedChars="xx"!="x"[0]+Ye("x")[0]}(1,0),Nn.templateSettings={escape:_n,evaluate:vn,interpolate:gn,variable:"",imports:{_:Nn}};var Pu=function(){function n(){}return function(t){if(de(t)){n.prototype=t;
|
57
|
+
var r=new n;n.prototype=w}return r||{}}}(),zu=Yt(gt),Bu=Yt(yt,true),Du=Gt(),Mu=Gt(true),qu=Wu?function(n,t){return Wu.set(n,t),n}:Ne,Ku=Wu?function(n){return Wu.get(n)}:ze,Vu=Ot("length"),Zu=function(){var n=0,t=0;return function(r,e){var u=wo(),o=W-(u-t);if(t=u,0<o){if(++n>=$)return r}else n=0;return qu(r,e)}}(),Yu=pe(function(n,t){return h(n)&&Sr(n)?ct(n,_t(t,false,true)):[]}),Gu=er(),Ju=er(true),Xu=pe(function(n){for(var t=n.length,e=t,u=De(l),o=jr(),i=o==r,f=[];e--;){var a=n[e]=Sr(a=n[e])?a:[];u[e]=i&&120<=a.length&&mu&&hu?new Dn(e&&a):null;
|
58
|
+
}var i=n[0],c=-1,l=i?i.length:0,s=u[0];n:for(;++c<l;)if(a=i[c],0>(s?Mn(s,a):o(f,a,0))){for(e=t;--e;){var p=u[e];if(0>(p?Mn(p,a):o(n[e],a,0)))continue n}s&&s.push(a),f.push(a)}return f}),Hu=pe(function(t,r){r=_t(r);var e=ut(t,r);return Rt(t,r.sort(n)),e}),Qu=yr(),no=yr(true),to=pe(function(n){return Lt(_t(n,false,true))}),ro=pe(function(n,t){return Sr(n)?ct(n,t):[]}),eo=pe(Hr),uo=pe(function(n){var t=n.length,r=2<t?n[t-2]:w,e=1<t?n[t-1]:w;return 2<t&&typeof r=="function"?t-=2:(r=1<t&&typeof e=="function"?(--t,
|
59
|
+
e):w,e=w),n.length=t,Qr(n,r,e)}),oo=pe(function(n){return n=_t(n),this.thru(function(t){t=Wo(t)?t:[Dr(t)];for(var r=n,e=-1,u=t.length,o=-1,i=r.length,f=De(u+i);++e<u;)f[e]=t[e];for(;++o<i;)f[e++]=r[o];return f})}),io=pe(function(n,t){return Sr(n)&&(n=Br(n)),ut(n,_t(t))}),fo=Vt(function(n,t,r){eu.call(n,r)?++n[r]:n[r]=1}),ao=rr(zu),co=rr(Bu,true),lo=ir(Kn,zu),so=ir(function(n,t){for(var r=n.length;r--&&false!==t(n[r],r,n););return n},Bu),po=Vt(function(n,t,r){eu.call(n,r)?n[r].push(t):n[r]=[t]}),ho=Vt(function(n,t,r){
|
60
|
+
n[r]=t}),_o=pe(function(n,t,r){var e=-1,u=typeof t=="function",o=Wr(t),i=Sr(n)?De(n.length):[];return zu(n,function(n){var f=u?t:o&&null!=n?n[t]:w;i[++e]=f?f.apply(n,r):Cr(n,t,r)}),i}),vo=Vt(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),go=pr(Qn,zu),yo=pr(function(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r},Bu),mo=pe(function(n,t){if(null==n)return[];var r=t[2];return r&&$r(t[0],t[1],r)&&(t.length=1),Wt(n,_t(t),[])}),wo=Ou||function(){return(new Me).getTime();
|
61
|
+
},xo=pe(function(n,t,r){var e=b;if(r.length)var u=v(r,xo.placeholder),e=e|I;return dr(n,e,t,r,u)}),bo=pe(function(n,t){t=t.length?_t(t):Re(n);for(var r=-1,e=t.length;++r<e;){var u=t[r];n[u]=dr(n[u],b,n)}return n}),Ao=pe(function(n,t,r){var e=b|A;if(r.length)var u=v(r,Ao.placeholder),e=e|I;return dr(t,e,n,r,u)}),jo=Qt(k),ko=Qt(O),Oo=pe(function(n,t){return at(n,1,t)}),Io=pe(function(n,t,r){return at(n,t,r)}),Ro=or(),Eo=or(true),Co=pe(function(n,t){if(t=_t(t),typeof n!="function"||!Vn(t,e))throw new Xe(T);
|
62
|
+
var r=t.length;return pe(function(e){for(var u=ku(e.length,r);u--;)e[u]=t[u](e[u]);return n.apply(this,e)})}),So=sr(I),Uo=sr(R),$o=pe(function(n,t){return dr(n,C,w,w,w,_t(t))}),Wo=xu||function(n){return h(n)&&Lr(n.length)&&ou.call(n)==B},Fo=Zt(kt),Lo=Zt(function(n,t,r){return r?rt(n,t,r):et(n,t)}),No=nr(Lo,function(n,t){return n===w?t:n}),To=nr(Fo,Nr),Po=ur(gt),zo=ur(yt),Bo=fr(Du),Do=fr(Mu),Mo=ar(gt),qo=ar(yt),Ko=Au?function(n){var t=null==n?w:n.constructor;return typeof t=="function"&&t.prototype===n||(typeof n=="function"?Nn.support.enumPrototypes:Sr(n))?zr(n):de(n)?Au(n):[];
|
63
|
+
}:zr,Vo=cr(true),Zo=cr(),Yo=pe(function(n,t){if(null==n)return{};if("function"!=typeof t[0])return t=Xn(_t(t),Je),Tr(n,ct(Ee(n),t));var r=Dt(t[0],t[1],3);return Pr(n,function(n,t,e){return!r(n,t,e)})}),Go=pe(function(n,t){return null==n?{}:"function"==typeof t[0]?Pr(n,Dt(t[0],t[1],3)):Tr(n,_t(t))}),Jo=Xt(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t)}),Xo=Xt(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Ho=lr(),Qo=lr(true),ni=Xt(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();
|
64
|
+
}),ti=Xt(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),ri=pe(function(n,t){try{return n.apply(w,t)}catch(r){return ge(r)?r:new qe(r)}}),ei=pe(function(n,t){return function(r){return Cr(r,n,t)}}),ui=pe(function(n,t){return function(r){return Cr(n,r,t)}}),oi=gr("ceil"),ii=gr("floor"),fi=tr(he,Eu),ai=tr(ke,Cu),ci=gr("round");return Nn.prototype=Tn.prototype,Pn.prototype=Pu(Tn.prototype),Pn.prototype.constructor=Pn,zn.prototype=Pu(Tn.prototype),zn.prototype.constructor=zn,
|
65
|
+
Bn.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]},Bn.prototype.get=function(n){return"__proto__"==n?w:this.__data__[n]},Bn.prototype.has=function(n){return"__proto__"!=n&&eu.call(this.__data__,n)},Bn.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Dn.prototype.push=function(n){var t=this.data;typeof n=="string"||de(n)?t.set.add(n):t.hash[n]=true},se.Cache=Bn,Nn.after=function(n,t){if(typeof t!="function"){if(typeof n!="function")throw new Xe(T);
|
66
|
+
var r=n;n=t,t=r}return n=bu(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},Nn.ary=function(n,t,r){return r&&$r(n,t,r)&&(t=w),t=n&&null==t?n.length:ju(+t||0,0),dr(n,E,w,w,w,w,t)},Nn.assign=Lo,Nn.at=io,Nn.before=ce,Nn.bind=xo,Nn.bindAll=bo,Nn.bindKey=Ao,Nn.callback=Le,Nn.chain=te,Nn.chunk=function(n,t,r){t=(r?$r(n,t,r):null==t)?1:ju(wu(t)||1,1),r=0;for(var e=n?n.length:0,u=-1,o=De(du(e/t));r<e;)o[++u]=St(n,r,r+=t);return o},Nn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){
|
67
|
+
var o=n[t];o&&(u[++e]=o)}return u},Nn.constant=function(n){return function(){return n}},Nn.countBy=fo,Nn.create=function(n,t,r){var e=Pu(n);return r&&$r(n,t,r)&&(t=w),t?et(e,t):e},Nn.curry=jo,Nn.curryRight=ko,Nn.debounce=le,Nn.defaults=No,Nn.defaultsDeep=To,Nn.defer=Oo,Nn.delay=Io,Nn.difference=Yu,Nn.drop=Kr,Nn.dropRight=Vr,Nn.dropRightWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),true,true):[]},Nn.dropWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),true):[]},Nn.fill=function(n,t,r,e){
|
68
|
+
var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&$r(n,t,r)&&(r=0,e=u),u=n.length,r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),e=e===w||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r<u;)n[r++]=t;return n},Nn.filter=ue,Nn.flatten=function(n,t,r){var e=n?n.length:0;return r&&$r(n,t,r)&&(t=false),e?_t(n,t):[]},Nn.flattenDeep=function(n){return n&&n.length?_t(n,true):[]},Nn.flow=Ro,Nn.flowRight=Eo,Nn.forEach=lo,Nn.forEachRight=so,Nn.forIn=Bo,Nn.forInRight=Do,Nn.forOwn=Mo,Nn.forOwnRight=qo,Nn.functions=Re,
|
69
|
+
Nn.groupBy=po,Nn.indexBy=ho,Nn.initial=function(n){return Vr(n,1)},Nn.intersection=Xu,Nn.invert=function(n,t,r){r&&$r(n,t,r)&&(t=w),r=-1;for(var e=Ko(n),u=e.length,o={};++r<u;){var i=e[r],f=n[i];t?eu.call(o,f)?o[f].push(i):o[f]=[i]:o[f]=i}return o},Nn.invoke=_o,Nn.keys=Ko,Nn.keysIn=Ee,Nn.map=ie,Nn.mapKeys=Vo,Nn.mapValues=Zo,Nn.matches=Te,Nn.matchesProperty=function(n,t){return jt(n,ft(t,true))},Nn.memoize=se,Nn.merge=Fo,Nn.method=ei,Nn.methodOf=ui,Nn.mixin=Pe,Nn.modArgs=Co,Nn.negate=function(n){if(typeof n!="function")throw new Xe(T);
|
70
|
+
return function(){return!n.apply(this,arguments)}},Nn.omit=Yo,Nn.once=function(n){return ce(2,n)},Nn.pairs=Ce,Nn.partial=So,Nn.partialRight=Uo,Nn.partition=vo,Nn.pick=Go,Nn.pluck=function(n,t){return ie(n,Be(t))},Nn.property=Be,Nn.propertyOf=function(n){return function(t){return mt(n,Mr(t),t+"")}},Nn.pull=function(){var n=arguments,t=n[0];if(!t||!t.length)return t;for(var r=0,e=jr(),u=n.length;++r<u;)for(var o=0,i=n[r];-1<(o=e(t,i,o));)vu.call(t,o,1);return t},Nn.pullAt=Hu,Nn.range=function(n,t,r){
|
71
|
+
r&&$r(n,t,r)&&(t=r=w),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=ju(du((t-n)/(r||1)),0);for(var u=De(t);++e<t;)u[e]=n,n+=r;return u},Nn.rearg=$o,Nn.reject=function(n,t,r){var e=Wo(n)?Zn:pt;return t=br(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Nn.remove=function(n,t,r){var e=[];if(!n||!n.length)return e;var u=-1,o=[],i=n.length;for(t=br(t,r,3);++u<i;)r=n[u],t(r,u,n)&&(e.push(r),o.push(u));return Rt(n,o),e},Nn.rest=Jr,Nn.restParam=pe,Nn.set=function(n,t,r){if(null==n)return n;
|
72
|
+
var e=t+"";t=null!=n[e]||Wr(t,n)?[e]:Mr(t);for(var e=-1,u=t.length,o=u-1,i=n;null!=i&&++e<u;){var f=t[e];de(i)&&(e==o?i[f]=r:null==i[f]&&(i[f]=Ur(t[e+1])?[]:{})),i=i[f]}return n},Nn.shuffle=function(n){return fe(n,Cu)},Nn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&$r(n,t,r)&&(t=0,r=e),St(n,t,r)):[]},Nn.sortBy=function(n,t,r){if(null==n)return[];r&&$r(n,t,r)&&(t=w);var e=-1;return t=br(t,r,3),n=bt(n,function(n,r,u){return{a:t(n,r,u),b:++e,c:n}}),$t(n,f)},Nn.sortByAll=mo,
|
73
|
+
Nn.sortByOrder=function(n,t,r,e){return null==n?[]:(e&&$r(t,r,e)&&(r=w),Wo(t)||(t=null==t?[]:[t]),Wo(r)||(r=null==r?[]:[r]),Wt(n,t,r))},Nn.spread=function(n){if(typeof n!="function")throw new Xe(T);return function(t){return n.apply(this,t)}},Nn.take=function(n,t,r){return n&&n.length?((r?$r(n,t,r):null==t)&&(t=1),St(n,0,0>t?0:t)):[]},Nn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1),t=e-(+t||0),St(n,0>t?0:t)):[]},Nn.takeRightWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),false,true):[];
|
74
|
+
},Nn.takeWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3)):[]},Nn.tap=function(n,t,r){return t.call(r,n),n},Nn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Xe(T);return false===r?e=false:de(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:+t,trailing:u})},Nn.thru=re,Nn.times=function(n,t,r){if(n=wu(n),1>n||!bu(n))return[];var e=-1,u=De(ku(n,4294967295));for(t=Dt(t,r,1);++e<n;)4294967295>e?u[e]=t(e):t(e);return u},Nn.toArray=Oe,
|
75
|
+
Nn.toPlainObject=Ie,Nn.transform=function(n,t,r,e){var u=Wo(n)||je(n);return t=br(t,e,4),null==r&&(u||de(n)?(e=n.constructor,r=u?Wo(n)?new e:[]:Pu(ye(e)?e.prototype:w)):r={}),(u?Kn:gt)(n,function(n,e,u){return t(r,n,e,u)}),r},Nn.union=to,Nn.uniq=Xr,Nn.unzip=Hr,Nn.unzipWith=Qr,Nn.values=Se,Nn.valuesIn=function(n){return Nt(n,Ee(n))},Nn.where=function(n,t){return ue(n,At(t))},Nn.without=ro,Nn.wrap=function(n,t){return t=null==t?Ne:t,dr(t,I,w,[n],[])},Nn.xor=function(){for(var n=-1,t=arguments.length;++n<t;){
|
76
|
+
var r=arguments[n];if(Sr(r))var e=e?Hn(ct(e,r),ct(r,e)):r}return e?Lt(e):[]},Nn.zip=eo,Nn.zipObject=ne,Nn.zipWith=uo,Nn.backflow=Eo,Nn.collect=ie,Nn.compose=Eo,Nn.each=lo,Nn.eachRight=so,Nn.extend=Lo,Nn.iteratee=Le,Nn.methods=Re,Nn.object=ne,Nn.select=ue,Nn.tail=Jr,Nn.unique=Xr,Pe(Nn,Nn),Nn.add=function(n,t){return(+n||0)+(+t||0)},Nn.attempt=ri,Nn.camelCase=Jo,Nn.capitalize=function(n){return(n=u(n))&&n.charAt(0).toUpperCase()+n.slice(1)},Nn.ceil=oi,Nn.clone=function(n,t,r,e){return t&&typeof t!="boolean"&&$r(n,t,r)?t=false:typeof t=="function"&&(e=r,
|
77
|
+
r=t,t=false),typeof r=="function"?ft(n,t,Dt(r,e,1)):ft(n,t)},Nn.cloneDeep=function(n,t,r){return typeof t=="function"?ft(n,true,Dt(t,r,1)):ft(n,true)},Nn.deburr=Ue,Nn.endsWith=function(n,t,r){n=u(n),t+="";var e=n.length;return r=r===w?e:ku(0>r?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Nn.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,c):n},Nn.escapeRegExp=function(n){return(n=u(n))&&xn.test(n)?n.replace(wn,l):n||"(?:)"},Nn.every=ee,Nn.find=ao,Nn.findIndex=Gu,Nn.findKey=Po,Nn.findLast=co,
|
78
|
+
Nn.findLastIndex=Ju,Nn.findLastKey=zo,Nn.findWhere=function(n,t){return ao(n,At(t))},Nn.first=Zr,Nn.floor=ii,Nn.get=function(n,t,r){return n=null==n?w:mt(n,Mr(t),t+""),n===w?r:n},Nn.gt=he,Nn.gte=function(n,t){return n>=t},Nn.has=function(n,t){if(null==n)return false;var r=eu.call(n,t);if(!r&&!Wr(t)){if(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),null==n)return false;t=Gr(t),r=eu.call(n,t)}return r||Lr(n.length)&&Ur(t,n.length)&&(Wo(n)||_e(n)||Ae(n))},Nn.identity=Ne,Nn.includes=oe,Nn.indexOf=Yr,Nn.inRange=function(n,t,r){
|
79
|
+
return t=+t||0,r===w?(r=t,t=0):r=+r||0,n>=ku(t,r)&&n<ju(t,r)},Nn.isArguments=_e,Nn.isArray=Wo,Nn.isBoolean=function(n){return true===n||false===n||h(n)&&ou.call(n)==D},Nn.isDate=function(n){return h(n)&&ou.call(n)==M},Nn.isElement=function(n){return!!n&&1===n.nodeType&&h(n)&&!xe(n)},Nn.isEmpty=function(n){return null==n?true:Sr(n)&&(Wo(n)||Ae(n)||_e(n)||h(n)&&ye(n.splice))?!n.length:!Ko(n).length},Nn.isEqual=ve,Nn.isError=ge,Nn.isFinite=function(n){return typeof n=="number"&&bu(n)},Nn.isFunction=ye,Nn.isMatch=function(n,t,r,e){
|
80
|
+
return r=typeof r=="function"?Dt(r,e,3):w,xt(n,kr(t),r)},Nn.isNaN=function(n){return we(n)&&n!=+n},Nn.isNative=me,Nn.isNull=function(n){return null===n},Nn.isNumber=we,Nn.isObject=de,Nn.isPlainObject=xe,Nn.isRegExp=be,Nn.isString=Ae,Nn.isTypedArray=je,Nn.isUndefined=function(n){return n===w},Nn.kebabCase=Xo,Nn.last=Gr,Nn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?ju(e+r,0):ku(r||0,e-1))+1;else if(r)return u=zt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;
|
81
|
+
if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Nn.lt=ke,Nn.lte=function(n,t){return n<=t},Nn.max=fi,Nn.min=ai,Nn.noConflict=function(){return Yn._=iu,this},Nn.noop=ze,Nn.now=wo,Nn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return e<t&&bu(t)?(e=(t-e)/2,t=wu(e),e=du(e),r=_r("",e,r),r.slice(0,t)+n+r):n},Nn.padLeft=Ho,Nn.padRight=Qo,Nn.parseInt=function(n,t,r){return(r?$r(n,t,r):null==t)?t=0:t&&(t=+t),n=We(n),Iu(n,t||(On.test(n)?16:10))},Nn.random=function(n,t,r){r&&$r(n,t,r)&&(t=r=w);
|
82
|
+
var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Ru(),ku(n+r*(t-n+lu("1e-"+((r+"").length-1))),t)):Et(n,t)},Nn.reduce=go,Nn.reduceRight=yo,Nn.repeat=$e,Nn.result=function(n,t,r){var e=null==n?w:Dr(n)[t];return e===w&&(null==n||Wr(t,n)||(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),e=null==n?w:Dr(n)[Gr(t)]),e=e===w?r:e),ye(e)?e.call(n):e},Nn.round=ci,Nn.runInContext=m,Nn.size=function(n){
|
83
|
+
var t=n?Vu(n):0;return Lr(t)?t:Ko(n).length},Nn.snakeCase=ni,Nn.some=ae,Nn.sortedIndex=Qu,Nn.sortedLastIndex=no,Nn.startCase=ti,Nn.startsWith=function(n,t,r){return n=u(n),r=null==r?0:ku(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Nn.sum=function(n,t,r){if(r&&$r(n,t,r)&&(t=w),t=br(t,r,3),1==t.length){n=Wo(n)?n:Br(n),r=n.length;for(var e=0;r--;)e+=+t(n[r])||0;n=e}else n=Ft(n,t);return n},Nn.template=function(n,t,r){var e=Nn.templateSettings;r&&$r(n,t,r)&&(t=r=w),n=u(n),t=rt(et({},r||t),e,tt),r=rt(et({},t.imports),e.imports,tt);
|
84
|
+
var o,i,f=Ko(r),a=Nt(r,f),c=0;r=t.interpolate||Cn;var l="__p+='";r=Ge((t.escape||Cn).source+"|"+r.source+"|"+(r===gn?jn:Cn).source+"|"+(t.evaluate||Cn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(Sn,s),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(an,"$1").replace(cn,"$1;"),
|
85
|
+
l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=ri(function(){return Ke(f,p+"return "+l).apply(w,a)}),t.source=l,ge(t))throw t;return t},Nn.trim=We,Nn.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?$r(e,t,r):null==t)?g(n):o(n,t+"")):n},Nn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,t+"")+1):n;
|
86
|
+
},Nn.trunc=function(n,t,r){r&&$r(n,t,r)&&(t=w);var e=S;if(r=U,null!=t)if(de(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(be(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=Ge(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o),
|
87
|
+
-1<o&&(t=t.slice(0,o)));return t+r},Nn.unescape=function(n){return(n=u(n))&&pn.test(n)?n.replace(ln,d):n},Nn.uniqueId=function(n){var t=++uu;return u(n)+t},Nn.words=Fe,Nn.all=ee,Nn.any=ae,Nn.contains=oe,Nn.eq=ve,Nn.detect=ao,Nn.foldl=go,Nn.foldr=yo,Nn.head=Zr,Nn.include=oe,Nn.inject=go,Pe(Nn,function(){var n={};return gt(Nn,function(t,r){Nn.prototype[r]||(n[r]=t)}),n}(),false),Nn.sample=fe,Nn.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return fe(t,n)}):fe(this.value());
|
88
|
+
},Nn.VERSION=x,Kn("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Nn[n].placeholder=Nn}),Kn(["drop","take"],function(n,t){zn.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new zn(this);r=null==r?1:ju(wu(r)||0,0);var u=this.clone();return e?u.__takeCount__=ku(u.__takeCount__,r):u.__views__.push({size:r,type:n+(0>u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Kn(["filter","map","takeWhile"],function(n,t){
|
89
|
+
var r=t+1,e=r!=N;zn.prototype[n]=function(n,t){var u=this.clone();return u.__iteratees__.push({iteratee:br(n,t,1),type:r}),u.__filtered__=u.__filtered__||e,u}}),Kn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Kn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this.__filtered__?new zn(this):this[r](1)}}),Kn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?At:Be;zn.prototype[n]=function(n){
|
90
|
+
return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter(Ne)},zn.prototype.reject=function(n,t){return n=br(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return r.__filtered__&&(0<n||0>t)?new zn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==w&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r)},zn.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},zn.prototype.toArray=function(){return this.take(Cu);
|
91
|
+
},gt(zn.prototype,function(n,t){var r=/^(?:filter|map|reject)|While$/.test(t),e=/^(?:first|last)$/.test(t),u=Nn[e?"take"+("last"==t?"Right":""):t];u&&(Nn.prototype[t]=function(){function t(n){return e&&i?u(n,1)[0]:u.apply(w,Hn([n],o))}var o=e?[1]:arguments,i=this.__chain__,f=this.__wrapped__,a=!!this.__actions__.length,c=f instanceof zn,l=o[0],s=c||Wo(f);return s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false),l={func:re,args:[t],thisArg:w},a=c&&!a,e&&!i?a?(f=f.clone(),f.__actions__.push(l),n.call(f)):u.call(w,this.value())[0]:!e&&s?(f=a?f:new zn(this),
|
92
|
+
f=n.apply(f,o),f.__actions__.push(l),new Pn(f,i)):this.thru(t)})}),Kn("join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?tu:He)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n),u=Tu.spliceObjects||!/^(?:pop|shift|splice)$/.test(n)?t:function(){var n=t.apply(this,arguments);return 0===this.length&&delete this[0],n};Nn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?u.apply(this.value(),n):this[r](function(t){
|
93
|
+
return u.apply(t,n)})}}),gt(zn.prototype,function(n,t){var r=Nn[t];if(r){var e=r.name;(Fu[e]||(Fu[e]=[])).push({name:t,func:r})}}),Fu[hr(w,A).name]=[{name:"wrapper",func:w}],zn.prototype.clone=function(){var n=new zn(this.__wrapped__);return n.__actions__=qn(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=qn(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=qn(this.__views__),n},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);
|
94
|
+
n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=Wo(t),u=0>r,o=e?t.length:0;n=o;for(var i=this.__views__,f=0,a=-1,c=i.length;++a<c;){var l=i[a],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=ku(n,f+s);break;case"takeRight":f=ju(f,n-s)}}if(n={start:f,end:n},i=n.start,f=n.end,n=f-i,i=u?f:i-1,f=this.__iteratees__,a=f.length,c=0,l=ku(n,this.__takeCount__),!e||o<F||o==n&&l==n)return Pt(u&&e?t.reverse():t,this.__actions__);
|
95
|
+
e=[];n:for(;n--&&c<l;){for(i+=r,u=-1,o=t[i];++u<a;){var p=f[u],s=p.type,p=p.iteratee(o);if(s==N)o=p;else if(!p){if(s==L)continue n;break n}}e[c++]=o}return e},Nn.prototype.chain=function(){return te(this)},Nn.prototype.commit=function(){return new Pn(this.value(),this.__chain__)},Nn.prototype.concat=oo,Nn.prototype.plant=function(n){for(var t,r=this;r instanceof Tn;){var e=qr(r);t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Nn.prototype.reverse=function(){function n(n){return r&&0>r.__dir__?n:n.reverse();
|
96
|
+
}var t=this.__wrapped__;if(t instanceof zn){var r=t;return this.__actions__.length&&(r=new zn(this)),r=r.reverse(),r.__actions__.push({func:re,args:[n],thisArg:w}),new Pn(r,this.__chain__)}return this.thru(n)},Nn.prototype.toString=function(){return this.value()+""},Nn.prototype.run=Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return Pt(this.__wrapped__,this.__actions__)},Nn.prototype.collect=Nn.prototype.map,Nn.prototype.head=Nn.prototype.first,Nn.prototype.select=Nn.prototype.filter,
|
97
|
+
Nn.prototype.tail=Nn.prototype.rest,Nn}var w,x="3.10.0",b=1,A=2,j=4,k=8,O=16,I=32,R=64,E=128,C=256,S=30,U="...",$=150,W=16,F=200,L=1,N=2,T="Expected a function",P="__lodash_placeholder__",z="[object Arguments]",B="[object Array]",D="[object Boolean]",M="[object Date]",q="[object Error]",K="[object Function]",V="[object Number]",Z="[object Object]",Y="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nn="[object Int16Array]",tn="[object Int32Array]",rn="[object Uint8Array]",en="[object Uint8ClampedArray]",un="[object Uint16Array]",on="[object Uint32Array]",fn=/\b__p\+='';/g,an=/\b(__p\+=)''\+/g,cn=/(__e\(.*?\)|\b__t\))\+'';/g,ln=/&(?:amp|lt|gt|quot|#39|#96);/g,sn=/[&<>"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,dn=/^\w*$/,mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wn=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,xn=RegExp(wn.source),bn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,On=/^0[xX]/,In=/^\[object .+?Constructor\]$/,Rn=/^\d+$/,En=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Cn=/($^)/,Sn=/['\n\r\u2028\u2029\\]/g,Un=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),$n="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap".split(" "),Wn="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Fn={};
|
98
|
+
Fn[X]=Fn[H]=Fn[Q]=Fn[nn]=Fn[tn]=Fn[rn]=Fn[en]=Fn[un]=Fn[on]=true,Fn[z]=Fn[B]=Fn[J]=Fn[D]=Fn[M]=Fn[q]=Fn[K]=Fn["[object Map]"]=Fn[V]=Fn[Z]=Fn[Y]=Fn["[object Set]"]=Fn[G]=Fn["[object WeakMap]"]=false;var Ln={};Ln[z]=Ln[B]=Ln[J]=Ln[D]=Ln[M]=Ln[X]=Ln[H]=Ln[Q]=Ln[nn]=Ln[tn]=Ln[V]=Ln[Z]=Ln[Y]=Ln[G]=Ln[rn]=Ln[en]=Ln[un]=Ln[on]=true,Ln[q]=Ln[K]=Ln["[object Map]"]=Ln["[object Set]"]=Ln["[object WeakMap]"]=false;var Nn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a",
|
99
|
+
"\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",
|
100
|
+
"\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Tn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Pn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zn={"function":true,object:true},Bn={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Dn={"\\":"\\",
|
101
|
+
"'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,qn=zn[typeof module]&&module&&!module.nodeType&&module,Kn=zn[typeof self]&&self&&self.Object&&self,Vn=zn[typeof window]&&window&&window.Object&&window,Zn=qn&&qn.exports===Mn&&Mn,Yn=Mn&&qn&&typeof global=="object"&&global&&global.Object&&global||Vn!==(this&&this.window)&&Vn||Kn||this,Gn=function(){try{Object({toString:0}+"")}catch(n){return function(){return false}}return function(n){
|
102
|
+
return typeof n.toString!="function"&&typeof(n+"")=="string"}}(),Jn=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Jn, define(function(){return Jn})):Mn&&qn?Zn?(qn.exports=Jn)._=Jn:Mn._=Jn:Yn._=Jn}).call(this);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* @license
|
3
|
-
* lodash 3.
|
3
|
+
* lodash 3.10.0 (Custom Build) <https://lodash.com/>
|
4
4
|
* Build: `lodash modern -o ./lodash.js`
|
5
5
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
6
6
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
var undefined;
|
14
14
|
|
15
15
|
/** Used as the semantic version number. */
|
16
|
-
var VERSION = '3.
|
16
|
+
var VERSION = '3.10.0';
|
17
17
|
|
18
18
|
/** Used to compose bitmasks for wrapper metadata. */
|
19
19
|
var BIND_FLAG = 1,
|
@@ -34,9 +34,11 @@
|
|
34
34
|
var HOT_COUNT = 150,
|
35
35
|
HOT_SPAN = 16;
|
36
36
|
|
37
|
+
/** Used as the size to enable large array optimizations. */
|
38
|
+
var LARGE_ARRAY_SIZE = 200;
|
39
|
+
|
37
40
|
/** Used to indicate the type of lazy iteratees. */
|
38
|
-
var
|
39
|
-
LAZY_FILTER_FLAG = 1,
|
41
|
+
var LAZY_FILTER_FLAG = 1,
|
40
42
|
LAZY_MAP_FLAG = 2;
|
41
43
|
|
42
44
|
/** Used as the `TypeError` message for "Functions" methods. */
|
@@ -93,11 +95,10 @@
|
|
93
95
|
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
|
94
96
|
|
95
97
|
/**
|
96
|
-
* Used to match `RegExp` [
|
97
|
-
*
|
98
|
-
* easier `eval` use and `Function` compilation.
|
98
|
+
* Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns)
|
99
|
+
* and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern).
|
99
100
|
*/
|
100
|
-
var reRegExpChars =
|
101
|
+
var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,
|
101
102
|
reHasRegExpChars = RegExp(reRegExpChars.source);
|
102
103
|
|
103
104
|
/** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
|
@@ -106,7 +107,7 @@
|
|
106
107
|
/** Used to match backslashes in property paths. */
|
107
108
|
var reEscapeChar = /\\(\\)?/g;
|
108
109
|
|
109
|
-
/** Used to match [ES template delimiters](
|
110
|
+
/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
|
110
111
|
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
111
112
|
|
112
113
|
/** Used to match `RegExp` flags from their coerced string values. */
|
@@ -138,25 +139,13 @@
|
|
138
139
|
return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g');
|
139
140
|
}());
|
140
141
|
|
141
|
-
/** Used to detect and test for whitespace. */
|
142
|
-
var whitespace = (
|
143
|
-
// Basic whitespace characters.
|
144
|
-
' \t\x0b\f\xa0\ufeff' +
|
145
|
-
|
146
|
-
// Line terminators.
|
147
|
-
'\n\r\u2028\u2029' +
|
148
|
-
|
149
|
-
// Unicode category "Zs" space separators.
|
150
|
-
'\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'
|
151
|
-
);
|
152
|
-
|
153
142
|
/** Used to assign default `context` object properties. */
|
154
143
|
var contextProps = [
|
155
144
|
'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array',
|
156
145
|
'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number',
|
157
|
-
'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', '
|
158
|
-
'
|
159
|
-
'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap'
|
146
|
+
'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'isFinite',
|
147
|
+
'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array',
|
148
|
+
'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap'
|
160
149
|
];
|
161
150
|
|
162
151
|
/** Used to make template sourceURLs easier to identify. */
|
@@ -192,13 +181,6 @@
|
|
192
181
|
cloneableTags[mapTag] = cloneableTags[setTag] =
|
193
182
|
cloneableTags[weakMapTag] = false;
|
194
183
|
|
195
|
-
/** Used as an internal `_.debounce` options object by `_.throttle`. */
|
196
|
-
var debounceOptions = {
|
197
|
-
'leading': false,
|
198
|
-
'maxWait': 0,
|
199
|
-
'trailing': false
|
200
|
-
};
|
201
|
-
|
202
184
|
/** Used to map latin-1 supplementary letters to basic latin letters. */
|
203
185
|
var deburredLetters = {
|
204
186
|
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
@@ -246,6 +228,15 @@
|
|
246
228
|
'object': true
|
247
229
|
};
|
248
230
|
|
231
|
+
/** Used to escape characters for inclusion in compiled regexes. */
|
232
|
+
var regexpEscapes = {
|
233
|
+
'0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34',
|
234
|
+
'5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39',
|
235
|
+
'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46',
|
236
|
+
'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66',
|
237
|
+
'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78'
|
238
|
+
};
|
239
|
+
|
249
240
|
/** Used to escape characters for inclusion in compiled string literals. */
|
250
241
|
var stringEscapes = {
|
251
242
|
'\\': '\\',
|
@@ -386,9 +377,6 @@
|
|
386
377
|
* @returns {string} Returns the string.
|
387
378
|
*/
|
388
379
|
function baseToString(value) {
|
389
|
-
if (typeof value == 'string') {
|
390
|
-
return value;
|
391
|
-
}
|
392
380
|
return value == null ? '' : (value + '');
|
393
381
|
}
|
394
382
|
|
@@ -430,8 +418,8 @@
|
|
430
418
|
* sort them in ascending order.
|
431
419
|
*
|
432
420
|
* @private
|
433
|
-
* @param {Object} object The object to compare
|
434
|
-
* @param {Object} other The object to compare
|
421
|
+
* @param {Object} object The object to compare.
|
422
|
+
* @param {Object} other The other object to compare.
|
435
423
|
* @returns {number} Returns the sort order indicator for `object`.
|
436
424
|
*/
|
437
425
|
function compareAscending(object, other) {
|
@@ -439,16 +427,16 @@
|
|
439
427
|
}
|
440
428
|
|
441
429
|
/**
|
442
|
-
* Used by `_.sortByOrder` to compare multiple properties of
|
443
|
-
*
|
430
|
+
* Used by `_.sortByOrder` to compare multiple properties of a value to another
|
431
|
+
* and stable sort them.
|
444
432
|
*
|
445
|
-
* If `orders` is unspecified,
|
446
|
-
*
|
447
|
-
*
|
433
|
+
* If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise,
|
434
|
+
* a value is sorted in ascending order if its corresponding order is "asc", and
|
435
|
+
* descending if "desc".
|
448
436
|
*
|
449
437
|
* @private
|
450
|
-
* @param {Object} object The object to compare
|
451
|
-
* @param {Object} other The object to compare
|
438
|
+
* @param {Object} object The object to compare.
|
439
|
+
* @param {Object} other The other object to compare.
|
452
440
|
* @param {boolean[]} orders The order to sort by for each property.
|
453
441
|
* @returns {number} Returns the sort order indicator for `object`.
|
454
442
|
*/
|
@@ -465,7 +453,8 @@
|
|
465
453
|
if (index >= ordersLength) {
|
466
454
|
return result;
|
467
455
|
}
|
468
|
-
|
456
|
+
var order = orders[index];
|
457
|
+
return result * ((order === 'asc' || order === true) ? 1 : -1);
|
469
458
|
}
|
470
459
|
}
|
471
460
|
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
|
@@ -501,8 +490,25 @@
|
|
501
490
|
}
|
502
491
|
|
503
492
|
/**
|
504
|
-
* Used by `_.
|
505
|
-
*
|
493
|
+
* Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes.
|
494
|
+
*
|
495
|
+
* @private
|
496
|
+
* @param {string} chr The matched character to escape.
|
497
|
+
* @param {string} leadingChar The capture group for a leading character.
|
498
|
+
* @param {string} whitespaceChar The capture group for a whitespace character.
|
499
|
+
* @returns {string} Returns the escaped character.
|
500
|
+
*/
|
501
|
+
function escapeRegExpChar(chr, leadingChar, whitespaceChar) {
|
502
|
+
if (leadingChar) {
|
503
|
+
chr = regexpEscapes[chr];
|
504
|
+
} else if (whitespaceChar) {
|
505
|
+
chr = stringEscapes[chr];
|
506
|
+
}
|
507
|
+
return '\\' + chr;
|
508
|
+
}
|
509
|
+
|
510
|
+
/**
|
511
|
+
* Used by `_.template` to escape characters for inclusion in compiled string literals.
|
506
512
|
*
|
507
513
|
* @private
|
508
514
|
* @param {string} chr The matched character to escape.
|
@@ -713,9 +719,6 @@
|
|
713
719
|
objectProto = Object.prototype,
|
714
720
|
stringProto = String.prototype;
|
715
721
|
|
716
|
-
/** Used to detect DOM support. */
|
717
|
-
var document = (document = context.window) ? document.document : null;
|
718
|
-
|
719
722
|
/** Used to resolve the decompiled source of functions. */
|
720
723
|
var fnToString = Function.prototype.toString;
|
721
724
|
|
@@ -726,56 +729,42 @@
|
|
726
729
|
var idCounter = 0;
|
727
730
|
|
728
731
|
/**
|
729
|
-
* Used to resolve the [`toStringTag`](
|
732
|
+
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
730
733
|
* of values.
|
731
734
|
*/
|
732
735
|
var objToString = objectProto.toString;
|
733
736
|
|
734
737
|
/** Used to restore the original `_` reference in `_.noConflict`. */
|
735
|
-
var oldDash =
|
738
|
+
var oldDash = root._;
|
736
739
|
|
737
740
|
/** Used to detect if a method is native. */
|
738
741
|
var reIsNative = RegExp('^' +
|
739
|
-
|
742
|
+
fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
|
740
743
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
741
744
|
);
|
742
745
|
|
743
746
|
/** Native method references. */
|
744
|
-
var ArrayBuffer =
|
745
|
-
bufferSlice = getNative(ArrayBuffer && new ArrayBuffer(0), 'slice'),
|
746
|
-
ceil = Math.ceil,
|
747
|
+
var ArrayBuffer = context.ArrayBuffer,
|
747
748
|
clearTimeout = context.clearTimeout,
|
748
|
-
floor = Math.floor,
|
749
|
-
getPrototypeOf = getNative(Object, 'getPrototypeOf'),
|
750
749
|
parseFloat = context.parseFloat,
|
751
|
-
|
750
|
+
pow = Math.pow,
|
751
|
+
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
752
752
|
Set = getNative(context, 'Set'),
|
753
753
|
setTimeout = context.setTimeout,
|
754
754
|
splice = arrayProto.splice,
|
755
|
-
Uint8Array =
|
755
|
+
Uint8Array = context.Uint8Array,
|
756
756
|
WeakMap = getNative(context, 'WeakMap');
|
757
757
|
|
758
|
-
/** Used to clone array buffers. */
|
759
|
-
var Float64Array = (function() {
|
760
|
-
// Safari 5 errors when using an array buffer to initialize a typed array
|
761
|
-
// where the array buffer's `byteLength` is not a multiple of the typed
|
762
|
-
// array's `BYTES_PER_ELEMENT`.
|
763
|
-
try {
|
764
|
-
var func = getNative(context, 'Float64Array'),
|
765
|
-
result = new func(new ArrayBuffer(10), 0, 1) && func;
|
766
|
-
} catch(e) {}
|
767
|
-
return result || null;
|
768
|
-
}());
|
769
|
-
|
770
758
|
/* Native method references for those with the same name as other `lodash` methods. */
|
771
|
-
var
|
759
|
+
var nativeCeil = Math.ceil,
|
760
|
+
nativeCreate = getNative(Object, 'create'),
|
761
|
+
nativeFloor = Math.floor,
|
772
762
|
nativeIsArray = getNative(Array, 'isArray'),
|
773
763
|
nativeIsFinite = context.isFinite,
|
774
764
|
nativeKeys = getNative(Object, 'keys'),
|
775
765
|
nativeMax = Math.max,
|
776
766
|
nativeMin = Math.min,
|
777
767
|
nativeNow = getNative(Date, 'now'),
|
778
|
-
nativeNumIsFinite = getNative(Number, 'isFinite'),
|
779
768
|
nativeParseInt = context.parseInt,
|
780
769
|
nativeRandom = Math.random;
|
781
770
|
|
@@ -788,11 +777,8 @@
|
|
788
777
|
MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
|
789
778
|
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
|
790
779
|
|
791
|
-
/** Used as the size, in bytes, of each `Float64Array` element. */
|
792
|
-
var FLOAT64_BYTES_PER_ELEMENT = Float64Array ? Float64Array.BYTES_PER_ELEMENT : 0;
|
793
|
-
|
794
780
|
/**
|
795
|
-
* Used as the [maximum length](
|
781
|
+
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
|
796
782
|
* of an array-like value.
|
797
783
|
*/
|
798
784
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
@@ -808,15 +794,16 @@
|
|
808
794
|
/**
|
809
795
|
* Creates a `lodash` object which wraps `value` to enable implicit chaining.
|
810
796
|
* Methods that operate on and return arrays, collections, and functions can
|
811
|
-
* be chained together. Methods that
|
812
|
-
* automatically end the chain returning the unwrapped
|
813
|
-
* may be enabled using `_.chain`. The execution of
|
814
|
-
* that is, execution is deferred until `_#value`
|
815
|
-
* called.
|
797
|
+
* be chained together. Methods that retrieve a single value or may return a
|
798
|
+
* primitive value will automatically end the chain returning the unwrapped
|
799
|
+
* value. Explicit chaining may be enabled using `_.chain`. The execution of
|
800
|
+
* chained methods is lazy, that is, execution is deferred until `_#value`
|
801
|
+
* is implicitly or explicitly called.
|
816
802
|
*
|
817
803
|
* Lazy evaluation allows several methods to support shortcut fusion. Shortcut
|
818
|
-
* fusion is an optimization
|
819
|
-
*
|
804
|
+
* fusion is an optimization strategy which merge iteratee calls; this can help
|
805
|
+
* to avoid the creation of intermediate data structures and greatly reduce the
|
806
|
+
* number of iteratee executions.
|
820
807
|
*
|
821
808
|
* Chaining is supported in custom builds as long as the `_#value` method is
|
822
809
|
* directly or indirectly included in the build.
|
@@ -839,36 +826,37 @@
|
|
839
826
|
* The chainable wrapper methods are:
|
840
827
|
* `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,
|
841
828
|
* `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`,
|
842
|
-
* `countBy`, `create`, `curry`, `debounce`, `defaults`, `
|
843
|
-
* `
|
844
|
-
* `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`,
|
845
|
-
* `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
|
846
|
-
* `groupBy`, `indexBy`, `initial`, `intersection`, `invert`,
|
847
|
-
* `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`,
|
848
|
-
* `memoize`, `merge`, `method`, `methodOf`, `mixin`,
|
849
|
-
* `
|
850
|
-
* `
|
851
|
-
* `
|
852
|
-
* `
|
853
|
-
* `
|
854
|
-
* `
|
855
|
-
* `
|
856
|
-
* `wrap`, `xor`, `zip`, `zipObject`, `zipWith`
|
829
|
+
* `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`,
|
830
|
+
* `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`,
|
831
|
+
* `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`,
|
832
|
+
* `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
|
833
|
+
* `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`,
|
834
|
+
* `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`,
|
835
|
+
* `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`,
|
836
|
+
* `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
|
837
|
+
* `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,
|
838
|
+
* `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`,
|
839
|
+
* `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`,
|
840
|
+
* `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`,
|
841
|
+
* `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`,
|
842
|
+
* `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`,
|
843
|
+
* `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith`
|
857
844
|
*
|
858
845
|
* The wrapper methods that are **not** chainable by default are:
|
859
|
-
* `add`, `attempt`, `camelCase`, `capitalize`, `
|
860
|
-
* `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,
|
861
|
-
* `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`,
|
862
|
-
* `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`,
|
863
|
-
* `
|
864
|
-
* `
|
865
|
-
* `
|
866
|
-
* `
|
867
|
-
* `
|
868
|
-
* `
|
869
|
-
* `
|
870
|
-
* `
|
871
|
-
* `
|
846
|
+
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`,
|
847
|
+
* `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,
|
848
|
+
* `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`,
|
849
|
+
* `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`,
|
850
|
+
* `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
|
851
|
+
* `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`,
|
852
|
+
* `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`,
|
853
|
+
* `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`,
|
854
|
+
* `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`,
|
855
|
+
* `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`,
|
856
|
+
* `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`,
|
857
|
+
* `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`,
|
858
|
+
* `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`,
|
859
|
+
* `unescape`, `uniqueId`, `value`, and `words`
|
872
860
|
*
|
873
861
|
* The wrapper method `sample` will return a wrapped value when `n` is provided,
|
874
862
|
* otherwise an unwrapped value is returned.
|
@@ -943,27 +931,6 @@
|
|
943
931
|
*/
|
944
932
|
var support = lodash.support = {};
|
945
933
|
|
946
|
-
(function(x) {
|
947
|
-
var Ctor = function() { this.x = x; },
|
948
|
-
object = { '0': x, 'length': x },
|
949
|
-
props = [];
|
950
|
-
|
951
|
-
Ctor.prototype = { 'valueOf': x, 'y': x };
|
952
|
-
for (var key in new Ctor) { props.push(key); }
|
953
|
-
|
954
|
-
/**
|
955
|
-
* Detect if the DOM is supported.
|
956
|
-
*
|
957
|
-
* @memberOf _.support
|
958
|
-
* @type boolean
|
959
|
-
*/
|
960
|
-
try {
|
961
|
-
support.dom = document.createDocumentFragment().nodeType === 11;
|
962
|
-
} catch(e) {
|
963
|
-
support.dom = false;
|
964
|
-
}
|
965
|
-
}(1, 0));
|
966
|
-
|
967
934
|
/**
|
968
935
|
* By default, the template delimiters used by lodash are like those in
|
969
936
|
* embedded Ruby (ERB). Change the following template settings to use
|
@@ -1035,13 +1002,12 @@
|
|
1035
1002
|
*/
|
1036
1003
|
function LazyWrapper(value) {
|
1037
1004
|
this.__wrapped__ = value;
|
1038
|
-
this.__actions__ =
|
1005
|
+
this.__actions__ = [];
|
1039
1006
|
this.__dir__ = 1;
|
1040
|
-
this.__dropCount__ = 0;
|
1041
1007
|
this.__filtered__ = false;
|
1042
|
-
this.__iteratees__ =
|
1008
|
+
this.__iteratees__ = [];
|
1043
1009
|
this.__takeCount__ = POSITIVE_INFINITY;
|
1044
|
-
this.__views__ =
|
1010
|
+
this.__views__ = [];
|
1045
1011
|
}
|
1046
1012
|
|
1047
1013
|
/**
|
@@ -1053,17 +1019,13 @@
|
|
1053
1019
|
* @returns {Object} Returns the cloned `LazyWrapper` object.
|
1054
1020
|
*/
|
1055
1021
|
function lazyClone() {
|
1056
|
-
var
|
1057
|
-
|
1058
|
-
views = this.__views__,
|
1059
|
-
result = new LazyWrapper(this.__wrapped__);
|
1060
|
-
|
1061
|
-
result.__actions__ = actions ? arrayCopy(actions) : null;
|
1022
|
+
var result = new LazyWrapper(this.__wrapped__);
|
1023
|
+
result.__actions__ = arrayCopy(this.__actions__);
|
1062
1024
|
result.__dir__ = this.__dir__;
|
1063
1025
|
result.__filtered__ = this.__filtered__;
|
1064
|
-
result.__iteratees__ =
|
1026
|
+
result.__iteratees__ = arrayCopy(this.__iteratees__);
|
1065
1027
|
result.__takeCount__ = this.__takeCount__;
|
1066
|
-
result.__views__ =
|
1028
|
+
result.__views__ = arrayCopy(this.__views__);
|
1067
1029
|
return result;
|
1068
1030
|
}
|
1069
1031
|
|
@@ -1096,22 +1058,25 @@
|
|
1096
1058
|
* @returns {*} Returns the unwrapped value.
|
1097
1059
|
*/
|
1098
1060
|
function lazyValue() {
|
1099
|
-
var array = this.__wrapped__.value()
|
1100
|
-
|
1101
|
-
|
1102
|
-
}
|
1103
|
-
var dir = this.__dir__,
|
1061
|
+
var array = this.__wrapped__.value(),
|
1062
|
+
dir = this.__dir__,
|
1063
|
+
isArr = isArray(array),
|
1104
1064
|
isRight = dir < 0,
|
1105
|
-
|
1065
|
+
arrLength = isArr ? array.length : 0,
|
1066
|
+
view = getView(0, arrLength, this.__views__),
|
1106
1067
|
start = view.start,
|
1107
1068
|
end = view.end,
|
1108
1069
|
length = end - start,
|
1109
1070
|
index = isRight ? end : (start - 1),
|
1110
|
-
takeCount = nativeMin(length, this.__takeCount__),
|
1111
1071
|
iteratees = this.__iteratees__,
|
1112
|
-
iterLength = iteratees
|
1072
|
+
iterLength = iteratees.length,
|
1113
1073
|
resIndex = 0,
|
1114
|
-
|
1074
|
+
takeCount = nativeMin(length, this.__takeCount__);
|
1075
|
+
|
1076
|
+
if (!isArr || arrLength < LARGE_ARRAY_SIZE || (arrLength == length && takeCount == length)) {
|
1077
|
+
return baseWrapperValue((isRight && isArr) ? array.reverse() : array, this.__actions__);
|
1078
|
+
}
|
1079
|
+
var result = [];
|
1115
1080
|
|
1116
1081
|
outer:
|
1117
1082
|
while (length-- && resIndex < takeCount) {
|
@@ -1123,30 +1088,16 @@
|
|
1123
1088
|
while (++iterIndex < iterLength) {
|
1124
1089
|
var data = iteratees[iterIndex],
|
1125
1090
|
iteratee = data.iteratee,
|
1126
|
-
type = data.type
|
1091
|
+
type = data.type,
|
1092
|
+
computed = iteratee(value);
|
1127
1093
|
|
1128
|
-
if (type ==
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
var limit = data.limit;
|
1136
|
-
if (!(data.done = limit > -1 ? (data.count++ >= limit) : !iteratee(value))) {
|
1137
|
-
continue outer;
|
1138
|
-
}
|
1139
|
-
}
|
1140
|
-
} else {
|
1141
|
-
var computed = iteratee(value);
|
1142
|
-
if (type == LAZY_MAP_FLAG) {
|
1143
|
-
value = computed;
|
1144
|
-
} else if (!computed) {
|
1145
|
-
if (type == LAZY_FILTER_FLAG) {
|
1146
|
-
continue outer;
|
1147
|
-
} else {
|
1148
|
-
break outer;
|
1149
|
-
}
|
1094
|
+
if (type == LAZY_MAP_FLAG) {
|
1095
|
+
value = computed;
|
1096
|
+
} else if (!computed) {
|
1097
|
+
if (type == LAZY_FILTER_FLAG) {
|
1098
|
+
continue outer;
|
1099
|
+
} else {
|
1100
|
+
break outer;
|
1150
1101
|
}
|
1151
1102
|
}
|
1152
1103
|
}
|
@@ -1278,6 +1229,30 @@
|
|
1278
1229
|
|
1279
1230
|
/*------------------------------------------------------------------------*/
|
1280
1231
|
|
1232
|
+
/**
|
1233
|
+
* Creates a new array joining `array` with `other`.
|
1234
|
+
*
|
1235
|
+
* @private
|
1236
|
+
* @param {Array} array The array to join.
|
1237
|
+
* @param {Array} other The other array to join.
|
1238
|
+
* @returns {Array} Returns the new concatenated array.
|
1239
|
+
*/
|
1240
|
+
function arrayConcat(array, other) {
|
1241
|
+
var index = -1,
|
1242
|
+
length = array.length,
|
1243
|
+
othIndex = -1,
|
1244
|
+
othLength = other.length,
|
1245
|
+
result = Array(length + othLength);
|
1246
|
+
|
1247
|
+
while (++index < length) {
|
1248
|
+
result[index] = array[index];
|
1249
|
+
}
|
1250
|
+
while (++othIndex < othLength) {
|
1251
|
+
result[index++] = other[othIndex];
|
1252
|
+
}
|
1253
|
+
return result;
|
1254
|
+
}
|
1255
|
+
|
1281
1256
|
/**
|
1282
1257
|
* Copies the values of `source` to `array`.
|
1283
1258
|
*
|
@@ -1433,6 +1408,25 @@
|
|
1433
1408
|
return result;
|
1434
1409
|
}
|
1435
1410
|
|
1411
|
+
/**
|
1412
|
+
* Appends the elements of `values` to `array`.
|
1413
|
+
*
|
1414
|
+
* @private
|
1415
|
+
* @param {Array} array The array to modify.
|
1416
|
+
* @param {Array} values The values to append.
|
1417
|
+
* @returns {Array} Returns `array`.
|
1418
|
+
*/
|
1419
|
+
function arrayPush(array, values) {
|
1420
|
+
var index = -1,
|
1421
|
+
length = values.length,
|
1422
|
+
offset = array.length;
|
1423
|
+
|
1424
|
+
while (++index < length) {
|
1425
|
+
array[offset + index] = values[index];
|
1426
|
+
}
|
1427
|
+
return array;
|
1428
|
+
}
|
1429
|
+
|
1436
1430
|
/**
|
1437
1431
|
* A specialized version of `_.reduce` for arrays without support for callback
|
1438
1432
|
* shorthands and `this` binding.
|
@@ -1504,18 +1498,20 @@
|
|
1504
1498
|
}
|
1505
1499
|
|
1506
1500
|
/**
|
1507
|
-
* A specialized version of `_.sum` for arrays without support for
|
1501
|
+
* A specialized version of `_.sum` for arrays without support for callback
|
1502
|
+
* shorthands and `this` binding..
|
1508
1503
|
*
|
1509
1504
|
* @private
|
1510
1505
|
* @param {Array} array The array to iterate over.
|
1506
|
+
* @param {Function} iteratee The function invoked per iteration.
|
1511
1507
|
* @returns {number} Returns the sum.
|
1512
1508
|
*/
|
1513
|
-
function arraySum(array) {
|
1509
|
+
function arraySum(array, iteratee) {
|
1514
1510
|
var length = array.length,
|
1515
1511
|
result = 0;
|
1516
1512
|
|
1517
1513
|
while (length--) {
|
1518
|
-
result += +array[length] || 0;
|
1514
|
+
result += +iteratee(array[length]) || 0;
|
1519
1515
|
}
|
1520
1516
|
return result;
|
1521
1517
|
}
|
@@ -1719,7 +1715,7 @@
|
|
1719
1715
|
: (object ? value : {});
|
1720
1716
|
}
|
1721
1717
|
}
|
1722
|
-
// Check for circular references and return corresponding clone.
|
1718
|
+
// Check for circular references and return its corresponding clone.
|
1723
1719
|
stackA || (stackA = []);
|
1724
1720
|
stackB || (stackB = []);
|
1725
1721
|
|
@@ -1754,7 +1750,7 @@
|
|
1754
1750
|
if (isObject(prototype)) {
|
1755
1751
|
object.prototype = prototype;
|
1756
1752
|
var result = new object;
|
1757
|
-
object.prototype =
|
1753
|
+
object.prototype = undefined;
|
1758
1754
|
}
|
1759
1755
|
return result || {};
|
1760
1756
|
};
|
@@ -1796,7 +1792,7 @@
|
|
1796
1792
|
var index = -1,
|
1797
1793
|
indexOf = getIndexOf(),
|
1798
1794
|
isCommon = indexOf == baseIndexOf,
|
1799
|
-
cache = (isCommon && values.length >=
|
1795
|
+
cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null,
|
1800
1796
|
valuesLength = values.length;
|
1801
1797
|
|
1802
1798
|
if (cache) {
|
@@ -1972,13 +1968,14 @@
|
|
1972
1968
|
* @param {Array} array The array to flatten.
|
1973
1969
|
* @param {boolean} [isDeep] Specify a deep flatten.
|
1974
1970
|
* @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
|
1971
|
+
* @param {Array} [result=[]] The initial result value.
|
1975
1972
|
* @returns {Array} Returns the new flattened array.
|
1976
1973
|
*/
|
1977
|
-
function baseFlatten(array, isDeep, isStrict) {
|
1974
|
+
function baseFlatten(array, isDeep, isStrict, result) {
|
1975
|
+
result || (result = []);
|
1976
|
+
|
1978
1977
|
var index = -1,
|
1979
|
-
length = array.length
|
1980
|
-
resIndex = -1,
|
1981
|
-
result = [];
|
1978
|
+
length = array.length;
|
1982
1979
|
|
1983
1980
|
while (++index < length) {
|
1984
1981
|
var value = array[index];
|
@@ -1986,16 +1983,12 @@
|
|
1986
1983
|
(isStrict || isArray(value) || isArguments(value))) {
|
1987
1984
|
if (isDeep) {
|
1988
1985
|
// Recursively flatten arrays (susceptible to call stack limits).
|
1989
|
-
|
1990
|
-
}
|
1991
|
-
|
1992
|
-
valLength = value.length;
|
1993
|
-
|
1994
|
-
while (++valIndex < valLength) {
|
1995
|
-
result[++resIndex] = value[valIndex];
|
1986
|
+
baseFlatten(value, isDeep, isStrict, result);
|
1987
|
+
} else {
|
1988
|
+
arrayPush(result, value);
|
1996
1989
|
}
|
1997
1990
|
} else if (!isStrict) {
|
1998
|
-
result[
|
1991
|
+
result[result.length] = value;
|
1999
1992
|
}
|
2000
1993
|
}
|
2001
1994
|
return result;
|
@@ -2350,7 +2343,7 @@
|
|
2350
2343
|
* @private
|
2351
2344
|
* @param {Object} object The destination object.
|
2352
2345
|
* @param {Object} source The source object.
|
2353
|
-
* @param {Function} [customizer] The function to customize
|
2346
|
+
* @param {Function} [customizer] The function to customize merged values.
|
2354
2347
|
* @param {Array} [stackA=[]] Tracks traversed source objects.
|
2355
2348
|
* @param {Array} [stackB=[]] Associates values with source counterparts.
|
2356
2349
|
* @returns {Object} Returns `object`.
|
@@ -2360,7 +2353,7 @@
|
|
2360
2353
|
return object;
|
2361
2354
|
}
|
2362
2355
|
var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),
|
2363
|
-
props = isSrcArr ?
|
2356
|
+
props = isSrcArr ? undefined : keys(source);
|
2364
2357
|
|
2365
2358
|
arrayEach(props || source, function(srcValue, key) {
|
2366
2359
|
if (props) {
|
@@ -2399,7 +2392,7 @@
|
|
2399
2392
|
* @param {Object} source The source object.
|
2400
2393
|
* @param {string} key The key of the value to merge.
|
2401
2394
|
* @param {Function} mergeFunc The function to merge values.
|
2402
|
-
* @param {Function} [customizer] The function to customize
|
2395
|
+
* @param {Function} [customizer] The function to customize merged values.
|
2403
2396
|
* @param {Array} [stackA=[]] Tracks traversed source objects.
|
2404
2397
|
* @param {Array} [stackB=[]] Associates values with source counterparts.
|
2405
2398
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
@@ -2506,7 +2499,7 @@
|
|
2506
2499
|
* @returns {number} Returns the random number.
|
2507
2500
|
*/
|
2508
2501
|
function baseRandom(min, max) {
|
2509
|
-
return min +
|
2502
|
+
return min + nativeFloor(nativeRandom() * (max - min + 1));
|
2510
2503
|
}
|
2511
2504
|
|
2512
2505
|
/**
|
@@ -2672,7 +2665,7 @@
|
|
2672
2665
|
indexOf = getIndexOf(),
|
2673
2666
|
length = array.length,
|
2674
2667
|
isCommon = indexOf == baseIndexOf,
|
2675
|
-
isLarge = isCommon && length >=
|
2668
|
+
isLarge = isCommon && length >= LARGE_ARRAY_SIZE,
|
2676
2669
|
seen = isLarge ? createCache() : null,
|
2677
2670
|
result = [];
|
2678
2671
|
|
@@ -2771,11 +2764,8 @@
|
|
2771
2764
|
length = actions.length;
|
2772
2765
|
|
2773
2766
|
while (++index < length) {
|
2774
|
-
var
|
2775
|
-
|
2776
|
-
|
2777
|
-
push.apply(args, action.args);
|
2778
|
-
result = action.func.apply(action.thisArg, args);
|
2767
|
+
var action = actions[index];
|
2768
|
+
result = action.func.apply(action.thisArg, arrayPush([result], action.args));
|
2779
2769
|
}
|
2780
2770
|
return result;
|
2781
2771
|
}
|
@@ -2834,7 +2824,7 @@
|
|
2834
2824
|
valIsUndef = value === undefined;
|
2835
2825
|
|
2836
2826
|
while (low < high) {
|
2837
|
-
var mid =
|
2827
|
+
var mid = nativeFloor((low + high) / 2),
|
2838
2828
|
computed = iteratee(array[mid]),
|
2839
2829
|
isDef = computed !== undefined,
|
2840
2830
|
isReflexive = computed === computed;
|
@@ -2903,26 +2893,11 @@
|
|
2903
2893
|
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
2904
2894
|
*/
|
2905
2895
|
function bufferClone(buffer) {
|
2906
|
-
|
2907
|
-
|
2908
|
-
if (!bufferSlice) {
|
2909
|
-
// PhantomJS has `ArrayBuffer` and `Uint8Array` but not `Float64Array`.
|
2910
|
-
bufferClone = !(ArrayBuffer && Uint8Array) ? constant(null) : function(buffer) {
|
2911
|
-
var byteLength = buffer.byteLength,
|
2912
|
-
floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0,
|
2913
|
-
offset = floatLength * FLOAT64_BYTES_PER_ELEMENT,
|
2914
|
-
result = new ArrayBuffer(byteLength);
|
2896
|
+
var result = new ArrayBuffer(buffer.byteLength),
|
2897
|
+
view = new Uint8Array(result);
|
2915
2898
|
|
2916
|
-
|
2917
|
-
|
2918
|
-
view.set(new Float64Array(buffer, 0, floatLength));
|
2919
|
-
}
|
2920
|
-
if (byteLength != offset) {
|
2921
|
-
view = new Uint8Array(result, offset);
|
2922
|
-
view.set(new Uint8Array(buffer, offset));
|
2923
|
-
}
|
2924
|
-
return result;
|
2925
|
-
};
|
2899
|
+
view.set(new Uint8Array(buffer));
|
2900
|
+
return result;
|
2926
2901
|
}
|
2927
2902
|
|
2928
2903
|
/**
|
@@ -2941,7 +2916,7 @@
|
|
2941
2916
|
argsLength = nativeMax(args.length - holdersLength, 0),
|
2942
2917
|
leftIndex = -1,
|
2943
2918
|
leftLength = partials.length,
|
2944
|
-
result = Array(
|
2919
|
+
result = Array(leftLength + argsLength);
|
2945
2920
|
|
2946
2921
|
while (++leftIndex < leftLength) {
|
2947
2922
|
result[leftIndex] = partials[leftIndex];
|
@@ -2988,12 +2963,7 @@
|
|
2988
2963
|
}
|
2989
2964
|
|
2990
2965
|
/**
|
2991
|
-
* Creates a
|
2992
|
-
* object composed from the results of running each element in the collection
|
2993
|
-
* through an iteratee.
|
2994
|
-
*
|
2995
|
-
* **Note:** This function is used to create `_.countBy`, `_.groupBy`, `_.indexBy`,
|
2996
|
-
* and `_.partition`.
|
2966
|
+
* Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function.
|
2997
2967
|
*
|
2998
2968
|
* @private
|
2999
2969
|
* @param {Function} setter The function to set keys and values of the accumulator object.
|
@@ -3023,10 +2993,7 @@
|
|
3023
2993
|
}
|
3024
2994
|
|
3025
2995
|
/**
|
3026
|
-
* Creates a
|
3027
|
-
* destination object.
|
3028
|
-
*
|
3029
|
-
* **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`.
|
2996
|
+
* Creates a `_.assign`, `_.defaults`, or `_.merge` function.
|
3030
2997
|
*
|
3031
2998
|
* @private
|
3032
2999
|
* @param {Function} assigner The function to assign values.
|
@@ -3137,9 +3104,9 @@
|
|
3137
3104
|
* @param {Array} [values] The values to cache.
|
3138
3105
|
* @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
|
3139
3106
|
*/
|
3140
|
-
|
3141
|
-
return new SetCache(values);
|
3142
|
-
}
|
3107
|
+
function createCache(values) {
|
3108
|
+
return (nativeCreate && Set) ? new SetCache(values) : null;
|
3109
|
+
}
|
3143
3110
|
|
3144
3111
|
/**
|
3145
3112
|
* Creates a function that produces compound words out of the words in a
|
@@ -3174,7 +3141,7 @@
|
|
3174
3141
|
function createCtorWrapper(Ctor) {
|
3175
3142
|
return function() {
|
3176
3143
|
// Use a `switch` statement to work with class constructors.
|
3177
|
-
// See
|
3144
|
+
// See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
|
3178
3145
|
// for more details.
|
3179
3146
|
var args = arguments;
|
3180
3147
|
switch (args.length) {
|
@@ -3184,6 +3151,8 @@
|
|
3184
3151
|
case 3: return new Ctor(args[0], args[1], args[2]);
|
3185
3152
|
case 4: return new Ctor(args[0], args[1], args[2], args[3]);
|
3186
3153
|
case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
3154
|
+
case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
3155
|
+
case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
3187
3156
|
}
|
3188
3157
|
var thisBinding = baseCreate(Ctor.prototype),
|
3189
3158
|
result = Ctor.apply(thisBinding, args);
|
@@ -3204,15 +3173,34 @@
|
|
3204
3173
|
function createCurry(flag) {
|
3205
3174
|
function curryFunc(func, arity, guard) {
|
3206
3175
|
if (guard && isIterateeCall(func, arity, guard)) {
|
3207
|
-
arity =
|
3176
|
+
arity = undefined;
|
3208
3177
|
}
|
3209
|
-
var result = createWrapper(func, flag,
|
3178
|
+
var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity);
|
3210
3179
|
result.placeholder = curryFunc.placeholder;
|
3211
3180
|
return result;
|
3212
3181
|
}
|
3213
3182
|
return curryFunc;
|
3214
3183
|
}
|
3215
3184
|
|
3185
|
+
/**
|
3186
|
+
* Creates a `_.defaults` or `_.defaultsDeep` function.
|
3187
|
+
*
|
3188
|
+
* @private
|
3189
|
+
* @param {Function} assigner The function to assign values.
|
3190
|
+
* @param {Function} customizer The function to customize assigned values.
|
3191
|
+
* @returns {Function} Returns the new defaults function.
|
3192
|
+
*/
|
3193
|
+
function createDefaults(assigner, customizer) {
|
3194
|
+
return restParam(function(args) {
|
3195
|
+
var object = args[0];
|
3196
|
+
if (object == null) {
|
3197
|
+
return object;
|
3198
|
+
}
|
3199
|
+
args.push(customizer);
|
3200
|
+
return assigner.apply(undefined, args);
|
3201
|
+
});
|
3202
|
+
}
|
3203
|
+
|
3216
3204
|
/**
|
3217
3205
|
* Creates a `_.max` or `_.min` function.
|
3218
3206
|
*
|
@@ -3224,11 +3212,11 @@
|
|
3224
3212
|
function createExtremum(comparator, exValue) {
|
3225
3213
|
return function(collection, iteratee, thisArg) {
|
3226
3214
|
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
3227
|
-
iteratee =
|
3215
|
+
iteratee = undefined;
|
3228
3216
|
}
|
3229
3217
|
iteratee = getCallback(iteratee, thisArg, 3);
|
3230
3218
|
if (iteratee.length == 1) {
|
3231
|
-
collection = toIterable(collection);
|
3219
|
+
collection = isArray(collection) ? collection : toIterable(collection);
|
3232
3220
|
var result = arrayExtremum(collection, iteratee, comparator, exValue);
|
3233
3221
|
if (!(collection.length && result === exValue)) {
|
3234
3222
|
return result;
|
@@ -3309,7 +3297,7 @@
|
|
3309
3297
|
throw new TypeError(FUNC_ERROR_TEXT);
|
3310
3298
|
}
|
3311
3299
|
if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') {
|
3312
|
-
wrapper = new LodashWrapper([]);
|
3300
|
+
wrapper = new LodashWrapper([], true);
|
3313
3301
|
}
|
3314
3302
|
}
|
3315
3303
|
index = wrapper ? -1 : length;
|
@@ -3317,7 +3305,7 @@
|
|
3317
3305
|
func = funcs[index];
|
3318
3306
|
|
3319
3307
|
var funcName = getFuncName(func),
|
3320
|
-
data = funcName == 'wrapper' ? getData(func) :
|
3308
|
+
data = funcName == 'wrapper' ? getData(func) : undefined;
|
3321
3309
|
|
3322
3310
|
if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {
|
3323
3311
|
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
@@ -3326,12 +3314,14 @@
|
|
3326
3314
|
}
|
3327
3315
|
}
|
3328
3316
|
return function() {
|
3329
|
-
var args = arguments
|
3330
|
-
|
3331
|
-
|
3317
|
+
var args = arguments,
|
3318
|
+
value = args[0];
|
3319
|
+
|
3320
|
+
if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
|
3321
|
+
return wrapper.plant(value).value();
|
3332
3322
|
}
|
3333
3323
|
var index = 0,
|
3334
|
-
result = length ? funcs[index].apply(this, args) :
|
3324
|
+
result = length ? funcs[index].apply(this, args) : value;
|
3335
3325
|
|
3336
3326
|
while (++index < length) {
|
3337
3327
|
result = funcs[index].call(this, result);
|
@@ -3435,7 +3425,7 @@
|
|
3435
3425
|
function createPartial(flag) {
|
3436
3426
|
var partialFunc = restParam(function(func, partials) {
|
3437
3427
|
var holders = replaceHolders(partials, partialFunc.placeholder);
|
3438
|
-
return createWrapper(func, flag,
|
3428
|
+
return createWrapper(func, flag, undefined, partials, holders);
|
3439
3429
|
});
|
3440
3430
|
return partialFunc;
|
3441
3431
|
}
|
@@ -3481,7 +3471,7 @@
|
|
3481
3471
|
isCurry = bitmask & CURRY_FLAG,
|
3482
3472
|
isCurryBound = bitmask & CURRY_BOUND_FLAG,
|
3483
3473
|
isCurryRight = bitmask & CURRY_RIGHT_FLAG,
|
3484
|
-
Ctor = isBindKey ?
|
3474
|
+
Ctor = isBindKey ? undefined : createCtorWrapper(func);
|
3485
3475
|
|
3486
3476
|
function wrapper() {
|
3487
3477
|
// Avoid `arguments` object use disqualifying optimizations by
|
@@ -3505,12 +3495,12 @@
|
|
3505
3495
|
|
3506
3496
|
length -= argsHolders.length;
|
3507
3497
|
if (length < arity) {
|
3508
|
-
var newArgPos = argPos ? arrayCopy(argPos) :
|
3498
|
+
var newArgPos = argPos ? arrayCopy(argPos) : undefined,
|
3509
3499
|
newArity = nativeMax(arity - length, 0),
|
3510
|
-
newsHolders = isCurry ? argsHolders :
|
3511
|
-
newHoldersRight = isCurry ?
|
3512
|
-
newPartials = isCurry ? args :
|
3513
|
-
newPartialsRight = isCurry ?
|
3500
|
+
newsHolders = isCurry ? argsHolders : undefined,
|
3501
|
+
newHoldersRight = isCurry ? undefined : argsHolders,
|
3502
|
+
newPartials = isCurry ? args : undefined,
|
3503
|
+
newPartialsRight = isCurry ? undefined : args;
|
3514
3504
|
|
3515
3505
|
bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
|
3516
3506
|
bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
|
@@ -3564,7 +3554,7 @@
|
|
3564
3554
|
}
|
3565
3555
|
var padLength = length - strLength;
|
3566
3556
|
chars = chars == null ? ' ' : (chars + '');
|
3567
|
-
return repeat(chars,
|
3557
|
+
return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength);
|
3568
3558
|
}
|
3569
3559
|
|
3570
3560
|
/**
|
@@ -3590,7 +3580,7 @@
|
|
3590
3580
|
argsLength = arguments.length,
|
3591
3581
|
leftIndex = -1,
|
3592
3582
|
leftLength = partials.length,
|
3593
|
-
args = Array(
|
3583
|
+
args = Array(leftLength + argsLength);
|
3594
3584
|
|
3595
3585
|
while (++leftIndex < leftLength) {
|
3596
3586
|
args[leftIndex] = partials[leftIndex];
|
@@ -3604,6 +3594,25 @@
|
|
3604
3594
|
return wrapper;
|
3605
3595
|
}
|
3606
3596
|
|
3597
|
+
/**
|
3598
|
+
* Creates a `_.ceil`, `_.floor`, or `_.round` function.
|
3599
|
+
*
|
3600
|
+
* @private
|
3601
|
+
* @param {string} methodName The name of the `Math` method to use when rounding.
|
3602
|
+
* @returns {Function} Returns the new round function.
|
3603
|
+
*/
|
3604
|
+
function createRound(methodName) {
|
3605
|
+
var func = Math[methodName];
|
3606
|
+
return function(number, precision) {
|
3607
|
+
precision = precision === undefined ? 0 : (+precision || 0);
|
3608
|
+
if (precision) {
|
3609
|
+
precision = pow(10, precision);
|
3610
|
+
return func(number * precision) / precision;
|
3611
|
+
}
|
3612
|
+
return func(number);
|
3613
|
+
};
|
3614
|
+
}
|
3615
|
+
|
3607
3616
|
/**
|
3608
3617
|
* Creates a `_.sortedIndex` or `_.sortedLastIndex` function.
|
3609
3618
|
*
|
@@ -3653,16 +3662,16 @@
|
|
3653
3662
|
var length = partials ? partials.length : 0;
|
3654
3663
|
if (!length) {
|
3655
3664
|
bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
|
3656
|
-
partials = holders =
|
3665
|
+
partials = holders = undefined;
|
3657
3666
|
}
|
3658
3667
|
length -= (holders ? holders.length : 0);
|
3659
3668
|
if (bitmask & PARTIAL_RIGHT_FLAG) {
|
3660
3669
|
var partialsRight = partials,
|
3661
3670
|
holdersRight = holders;
|
3662
3671
|
|
3663
|
-
partials = holders =
|
3672
|
+
partials = holders = undefined;
|
3664
3673
|
}
|
3665
|
-
var data = isBindKey ?
|
3674
|
+
var data = isBindKey ? undefined : getData(func),
|
3666
3675
|
newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
|
3667
3676
|
|
3668
3677
|
if (data) {
|
@@ -3741,7 +3750,7 @@
|
|
3741
3750
|
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
3742
3751
|
*
|
3743
3752
|
* @private
|
3744
|
-
* @param {Object}
|
3753
|
+
* @param {Object} object The object to compare.
|
3745
3754
|
* @param {Object} other The other object to compare.
|
3746
3755
|
* @param {string} tag The `toStringTag` of the objects to compare.
|
3747
3756
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
@@ -3941,13 +3950,13 @@
|
|
3941
3950
|
* @private
|
3942
3951
|
* @param {number} start The start of the view.
|
3943
3952
|
* @param {number} end The end of the view.
|
3944
|
-
* @param {Array}
|
3953
|
+
* @param {Array} transforms The transformations to apply to the view.
|
3945
3954
|
* @returns {Object} Returns an object containing the `start` and `end`
|
3946
3955
|
* positions of the view.
|
3947
3956
|
*/
|
3948
3957
|
function getView(start, end, transforms) {
|
3949
3958
|
var index = -1,
|
3950
|
-
length = transforms
|
3959
|
+
length = transforms.length;
|
3951
3960
|
|
3952
3961
|
while (++index < length) {
|
3953
3962
|
var data = transforms[index],
|
@@ -4146,7 +4155,7 @@
|
|
4146
4155
|
/**
|
4147
4156
|
* Checks if `value` is a valid array-like length.
|
4148
4157
|
*
|
4149
|
-
* **Note:** This function is based on [`ToLength`](
|
4158
|
+
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
4150
4159
|
*
|
4151
4160
|
* @private
|
4152
4161
|
* @param {*} value The value to check.
|
@@ -4238,6 +4247,18 @@
|
|
4238
4247
|
return data;
|
4239
4248
|
}
|
4240
4249
|
|
4250
|
+
/**
|
4251
|
+
* Used by `_.defaultsDeep` to customize its `_.merge` use.
|
4252
|
+
*
|
4253
|
+
* @private
|
4254
|
+
* @param {*} objectValue The destination object property value.
|
4255
|
+
* @param {*} sourceValue The source object property value.
|
4256
|
+
* @returns {*} Returns the value to assign to the destination object.
|
4257
|
+
*/
|
4258
|
+
function mergeDefaults(objectValue, sourceValue) {
|
4259
|
+
return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults);
|
4260
|
+
}
|
4261
|
+
|
4241
4262
|
/**
|
4242
4263
|
* A specialized version of `_.pick` which picks `object` properties specified
|
4243
4264
|
* by `props`.
|
@@ -4337,38 +4358,6 @@
|
|
4337
4358
|
};
|
4338
4359
|
}());
|
4339
4360
|
|
4340
|
-
/**
|
4341
|
-
* A fallback implementation of `_.isPlainObject` which checks if `value`
|
4342
|
-
* is an object created by the `Object` constructor or has a `[[Prototype]]`
|
4343
|
-
* of `null`.
|
4344
|
-
*
|
4345
|
-
* @private
|
4346
|
-
* @param {*} value The value to check.
|
4347
|
-
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
4348
|
-
*/
|
4349
|
-
function shimIsPlainObject(value) {
|
4350
|
-
var Ctor,
|
4351
|
-
support = lodash.support;
|
4352
|
-
|
4353
|
-
// Exit early for non `Object` objects.
|
4354
|
-
if (!(isObjectLike(value) && objToString.call(value) == objectTag) ||
|
4355
|
-
(!hasOwnProperty.call(value, 'constructor') &&
|
4356
|
-
(Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
|
4357
|
-
return false;
|
4358
|
-
}
|
4359
|
-
// IE < 9 iterates inherited properties before own properties. If the first
|
4360
|
-
// iterated property is an object's own property then there are no inherited
|
4361
|
-
// enumerable properties.
|
4362
|
-
var result;
|
4363
|
-
// In most environments an object's own properties are iterated before
|
4364
|
-
// its inherited properties. If the last iterated property is an object's
|
4365
|
-
// own property then there are no inherited enumerable properties.
|
4366
|
-
baseForIn(value, function(subValue, key) {
|
4367
|
-
result = key;
|
4368
|
-
});
|
4369
|
-
return result === undefined || hasOwnProperty.call(value, result);
|
4370
|
-
}
|
4371
|
-
|
4372
4361
|
/**
|
4373
4362
|
* A fallback implementation of `Object.keys` which creates an array of the
|
4374
4363
|
* own enumerable property names of `object`.
|
@@ -4482,12 +4471,12 @@
|
|
4482
4471
|
if (guard ? isIterateeCall(array, size, guard) : size == null) {
|
4483
4472
|
size = 1;
|
4484
4473
|
} else {
|
4485
|
-
size = nativeMax(
|
4474
|
+
size = nativeMax(nativeFloor(size) || 1, 1);
|
4486
4475
|
}
|
4487
4476
|
var index = 0,
|
4488
4477
|
length = array ? array.length : 0,
|
4489
4478
|
resIndex = -1,
|
4490
|
-
result = Array(
|
4479
|
+
result = Array(nativeCeil(length / size));
|
4491
4480
|
|
4492
4481
|
while (index < length) {
|
4493
4482
|
result[++resIndex] = baseSlice(array, index, (index += size));
|
@@ -4526,7 +4515,7 @@
|
|
4526
4515
|
|
4527
4516
|
/**
|
4528
4517
|
* Creates an array of unique `array` values not included in the other
|
4529
|
-
* provided arrays using [`SameValueZero`](
|
4518
|
+
* provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
4530
4519
|
* for equality comparisons.
|
4531
4520
|
*
|
4532
4521
|
* @static
|
@@ -4541,7 +4530,7 @@
|
|
4541
4530
|
* // => [1, 3]
|
4542
4531
|
*/
|
4543
4532
|
var difference = restParam(function(array, values) {
|
4544
|
-
return isArrayLike(array)
|
4533
|
+
return (isObjectLike(array) && isArrayLike(array))
|
4545
4534
|
? baseDifference(array, baseFlatten(values, false, true))
|
4546
4535
|
: [];
|
4547
4536
|
});
|
@@ -4936,7 +4925,7 @@
|
|
4936
4925
|
|
4937
4926
|
/**
|
4938
4927
|
* Gets the index at which the first occurrence of `value` is found in `array`
|
4939
|
-
* using [`SameValueZero`](
|
4928
|
+
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
4940
4929
|
* for equality comparisons. If `fromIndex` is negative, it is used as the offset
|
4941
4930
|
* from the end of `array`. If `array` is sorted providing `true` for `fromIndex`
|
4942
4931
|
* performs a faster binary search.
|
@@ -4970,10 +4959,9 @@
|
|
4970
4959
|
if (typeof fromIndex == 'number') {
|
4971
4960
|
fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
|
4972
4961
|
} else if (fromIndex) {
|
4973
|
-
var index = binaryIndex(array, value)
|
4974
|
-
|
4975
|
-
|
4976
|
-
if (value === value ? (value === other) : (other !== other)) {
|
4962
|
+
var index = binaryIndex(array, value);
|
4963
|
+
if (index < length &&
|
4964
|
+
(value === value ? (value === array[index]) : (array[index] !== array[index]))) {
|
4977
4965
|
return index;
|
4978
4966
|
}
|
4979
4967
|
return -1;
|
@@ -5000,7 +4988,7 @@
|
|
5000
4988
|
|
5001
4989
|
/**
|
5002
4990
|
* Creates an array of unique values that are included in all of the provided
|
5003
|
-
* arrays using [`SameValueZero`](
|
4991
|
+
* arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
5004
4992
|
* for equality comparisons.
|
5005
4993
|
*
|
5006
4994
|
* @static
|
@@ -5121,7 +5109,7 @@
|
|
5121
5109
|
|
5122
5110
|
/**
|
5123
5111
|
* Removes all provided values from `array` using
|
5124
|
-
* [`SameValueZero`](
|
5112
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
5125
5113
|
* for equality comparisons.
|
5126
5114
|
*
|
5127
5115
|
* **Note:** Unlike `_.without`, this method mutates `array`.
|
@@ -5554,7 +5542,7 @@
|
|
5554
5542
|
|
5555
5543
|
/**
|
5556
5544
|
* Creates an array of unique values, in order, from all of the provided arrays
|
5557
|
-
* using [`SameValueZero`](
|
5545
|
+
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
5558
5546
|
* for equality comparisons.
|
5559
5547
|
*
|
5560
5548
|
* @static
|
@@ -5573,7 +5561,7 @@
|
|
5573
5561
|
|
5574
5562
|
/**
|
5575
5563
|
* Creates a duplicate-free version of an array, using
|
5576
|
-
* [`SameValueZero`](
|
5564
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
5577
5565
|
* for equality comparisons, in which only the first occurence of each element
|
5578
5566
|
* is kept. Providing `true` for `isSorted` performs a faster search algorithm
|
5579
5567
|
* for sorted arrays. If an iteratee function is provided it is invoked for
|
@@ -5627,7 +5615,7 @@
|
|
5627
5615
|
}
|
5628
5616
|
if (isSorted != null && typeof isSorted != 'boolean') {
|
5629
5617
|
thisArg = iteratee;
|
5630
|
-
iteratee = isIterateeCall(array, isSorted, thisArg) ?
|
5618
|
+
iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted;
|
5631
5619
|
isSorted = false;
|
5632
5620
|
}
|
5633
5621
|
var callback = getCallback();
|
@@ -5714,7 +5702,7 @@
|
|
5714
5702
|
|
5715
5703
|
/**
|
5716
5704
|
* Creates an array excluding all provided values using
|
5717
|
-
* [`SameValueZero`](
|
5705
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
5718
5706
|
* for equality comparisons.
|
5719
5707
|
*
|
5720
5708
|
* @static
|
@@ -5756,7 +5744,7 @@
|
|
5756
5744
|
var array = arguments[index];
|
5757
5745
|
if (isArrayLike(array)) {
|
5758
5746
|
var result = result
|
5759
|
-
? baseDifference(result, array)
|
5747
|
+
? arrayPush(baseDifference(result, array), baseDifference(array, result))
|
5760
5748
|
: array;
|
5761
5749
|
}
|
5762
5750
|
}
|
@@ -5978,16 +5966,16 @@
|
|
5978
5966
|
* @example
|
5979
5967
|
*
|
5980
5968
|
* var array = [1, 2];
|
5981
|
-
* var
|
5969
|
+
* var wrapped = _(array).push(3);
|
5982
5970
|
*
|
5983
5971
|
* console.log(array);
|
5984
5972
|
* // => [1, 2]
|
5985
5973
|
*
|
5986
|
-
*
|
5974
|
+
* wrapped = wrapped.commit();
|
5987
5975
|
* console.log(array);
|
5988
5976
|
* // => [1, 2, 3]
|
5989
5977
|
*
|
5990
|
-
*
|
5978
|
+
* wrapped.last();
|
5991
5979
|
* // => 3
|
5992
5980
|
*
|
5993
5981
|
* console.log(array);
|
@@ -5997,6 +5985,33 @@
|
|
5997
5985
|
return new LodashWrapper(this.value(), this.__chain__);
|
5998
5986
|
}
|
5999
5987
|
|
5988
|
+
/**
|
5989
|
+
* Creates a new array joining a wrapped array with any additional arrays
|
5990
|
+
* and/or values.
|
5991
|
+
*
|
5992
|
+
* @name concat
|
5993
|
+
* @memberOf _
|
5994
|
+
* @category Chain
|
5995
|
+
* @param {...*} [values] The values to concatenate.
|
5996
|
+
* @returns {Array} Returns the new concatenated array.
|
5997
|
+
* @example
|
5998
|
+
*
|
5999
|
+
* var array = [1];
|
6000
|
+
* var wrapped = _(array).concat(2, [3], [[4]]);
|
6001
|
+
*
|
6002
|
+
* console.log(wrapped.value());
|
6003
|
+
* // => [1, 2, 3, [4]]
|
6004
|
+
*
|
6005
|
+
* console.log(array);
|
6006
|
+
* // => [1]
|
6007
|
+
*/
|
6008
|
+
var wrapperConcat = restParam(function(values) {
|
6009
|
+
values = baseFlatten(values);
|
6010
|
+
return this.thru(function(array) {
|
6011
|
+
return arrayConcat(isArray(array) ? array : [toObject(array)], values);
|
6012
|
+
});
|
6013
|
+
});
|
6014
|
+
|
6000
6015
|
/**
|
6001
6016
|
* Creates a clone of the chained sequence planting `value` as the wrapped value.
|
6002
6017
|
*
|
@@ -6007,17 +6022,17 @@
|
|
6007
6022
|
* @example
|
6008
6023
|
*
|
6009
6024
|
* var array = [1, 2];
|
6010
|
-
* var
|
6025
|
+
* var wrapped = _(array).map(function(value) {
|
6011
6026
|
* return Math.pow(value, 2);
|
6012
6027
|
* });
|
6013
6028
|
*
|
6014
6029
|
* var other = [3, 4];
|
6015
|
-
* var
|
6030
|
+
* var otherWrapped = wrapped.plant(other);
|
6016
6031
|
*
|
6017
|
-
*
|
6032
|
+
* otherWrapped.value();
|
6018
6033
|
* // => [9, 16]
|
6019
6034
|
*
|
6020
|
-
*
|
6035
|
+
* wrapped.value();
|
6021
6036
|
* // => [1, 4]
|
6022
6037
|
*/
|
6023
6038
|
function wrapperPlant(value) {
|
@@ -6060,15 +6075,20 @@
|
|
6060
6075
|
*/
|
6061
6076
|
function wrapperReverse() {
|
6062
6077
|
var value = this.__wrapped__;
|
6078
|
+
|
6079
|
+
var interceptor = function(value) {
|
6080
|
+
return (wrapped && wrapped.__dir__ < 0) ? value : value.reverse();
|
6081
|
+
};
|
6063
6082
|
if (value instanceof LazyWrapper) {
|
6083
|
+
var wrapped = value;
|
6064
6084
|
if (this.__actions__.length) {
|
6065
|
-
|
6085
|
+
wrapped = new LazyWrapper(this);
|
6066
6086
|
}
|
6067
|
-
|
6087
|
+
wrapped = wrapped.reverse();
|
6088
|
+
wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
|
6089
|
+
return new LodashWrapper(wrapped, this.__chain__);
|
6068
6090
|
}
|
6069
|
-
return this.thru(
|
6070
|
-
return value.reverse();
|
6071
|
-
});
|
6091
|
+
return this.thru(interceptor);
|
6072
6092
|
}
|
6073
6093
|
|
6074
6094
|
/**
|
@@ -6226,7 +6246,7 @@
|
|
6226
6246
|
function every(collection, predicate, thisArg) {
|
6227
6247
|
var func = isArray(collection) ? arrayEvery : baseEvery;
|
6228
6248
|
if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
|
6229
|
-
predicate =
|
6249
|
+
predicate = undefined;
|
6230
6250
|
}
|
6231
6251
|
if (typeof predicate != 'function' || thisArg !== undefined) {
|
6232
6252
|
predicate = getCallback(predicate, thisArg, 3);
|
@@ -6500,7 +6520,7 @@
|
|
6500
6520
|
|
6501
6521
|
/**
|
6502
6522
|
* Checks if `value` is in `collection` using
|
6503
|
-
* [`SameValueZero`](
|
6523
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
6504
6524
|
* for equality comparisons. If `fromIndex` is negative, it is used as the offset
|
6505
6525
|
* from the end of `collection`.
|
6506
6526
|
*
|
@@ -6533,17 +6553,14 @@
|
|
6533
6553
|
collection = values(collection);
|
6534
6554
|
length = collection.length;
|
6535
6555
|
}
|
6536
|
-
if (!length) {
|
6537
|
-
return false;
|
6538
|
-
}
|
6539
6556
|
if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
|
6540
6557
|
fromIndex = 0;
|
6541
6558
|
} else {
|
6542
6559
|
fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
|
6543
6560
|
}
|
6544
6561
|
return (typeof collection == 'string' || !isArray(collection) && isString(collection))
|
6545
|
-
? (fromIndex
|
6546
|
-
: (getIndexOf(collection, target, fromIndex) > -1);
|
6562
|
+
? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1)
|
6563
|
+
: (!!length && getIndexOf(collection, target, fromIndex) > -1);
|
6547
6564
|
}
|
6548
6565
|
|
6549
6566
|
/**
|
@@ -6625,7 +6642,7 @@
|
|
6625
6642
|
result = isArrayLike(collection) ? Array(collection.length) : [];
|
6626
6643
|
|
6627
6644
|
baseEach(collection, function(value) {
|
6628
|
-
var func = isFunc ? path : ((isProp && value != null) ? value[path] :
|
6645
|
+
var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
|
6629
6646
|
result[++index] = func ? func.apply(value, args) : invokePath(value, path, args);
|
6630
6647
|
});
|
6631
6648
|
return result;
|
@@ -6795,7 +6812,8 @@
|
|
6795
6812
|
* `_.reduce`, `_.reduceRight`, and `_.transform`.
|
6796
6813
|
*
|
6797
6814
|
* The guarded methods are:
|
6798
|
-
* `assign`, `defaults`, `includes`, `merge`, `sortByAll`,
|
6815
|
+
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`,
|
6816
|
+
* and `sortByOrder`
|
6799
6817
|
*
|
6800
6818
|
* @static
|
6801
6819
|
* @memberOf _
|
@@ -7025,7 +7043,7 @@
|
|
7025
7043
|
function some(collection, predicate, thisArg) {
|
7026
7044
|
var func = isArray(collection) ? arraySome : baseSome;
|
7027
7045
|
if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
|
7028
|
-
predicate =
|
7046
|
+
predicate = undefined;
|
7029
7047
|
}
|
7030
7048
|
if (typeof predicate != 'function' || thisArg !== undefined) {
|
7031
7049
|
predicate = getCallback(predicate, thisArg, 3);
|
@@ -7086,7 +7104,7 @@
|
|
7086
7104
|
return [];
|
7087
7105
|
}
|
7088
7106
|
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
7089
|
-
iteratee =
|
7107
|
+
iteratee = undefined;
|
7090
7108
|
}
|
7091
7109
|
var index = -1;
|
7092
7110
|
iteratee = getCallback(iteratee, thisArg, 3);
|
@@ -7145,9 +7163,9 @@
|
|
7145
7163
|
|
7146
7164
|
/**
|
7147
7165
|
* This method is like `_.sortByAll` except that it allows specifying the
|
7148
|
-
* sort orders of the iteratees to sort by.
|
7149
|
-
*
|
7150
|
-
*
|
7166
|
+
* sort orders of the iteratees to sort by. If `orders` is unspecified, all
|
7167
|
+
* values are sorted in ascending order. Otherwise, a value is sorted in
|
7168
|
+
* ascending order if its corresponding order is "asc", and descending if "desc".
|
7151
7169
|
*
|
7152
7170
|
* If a property name is provided for an iteratee the created `_.property`
|
7153
7171
|
* style callback returns the property value of the given element.
|
@@ -7161,7 +7179,7 @@
|
|
7161
7179
|
* @category Collection
|
7162
7180
|
* @param {Array|Object|string} collection The collection to iterate over.
|
7163
7181
|
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
|
7164
|
-
* @param {boolean[]} orders The sort orders of `iteratees`.
|
7182
|
+
* @param {boolean[]} [orders] The sort orders of `iteratees`.
|
7165
7183
|
* @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
|
7166
7184
|
* @returns {Array} Returns the new sorted array.
|
7167
7185
|
* @example
|
@@ -7174,7 +7192,7 @@
|
|
7174
7192
|
* ];
|
7175
7193
|
*
|
7176
7194
|
* // sort by `user` in ascending order and by `age` in descending order
|
7177
|
-
* _.map(_.sortByOrder(users, ['user', 'age'], [
|
7195
|
+
* _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values);
|
7178
7196
|
* // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
|
7179
7197
|
*/
|
7180
7198
|
function sortByOrder(collection, iteratees, orders, guard) {
|
@@ -7182,7 +7200,7 @@
|
|
7182
7200
|
return [];
|
7183
7201
|
}
|
7184
7202
|
if (guard && isIterateeCall(iteratees, orders, guard)) {
|
7185
|
-
orders =
|
7203
|
+
orders = undefined;
|
7186
7204
|
}
|
7187
7205
|
if (!isArray(iteratees)) {
|
7188
7206
|
iteratees = iteratees == null ? [] : [iteratees];
|
@@ -7307,10 +7325,10 @@
|
|
7307
7325
|
*/
|
7308
7326
|
function ary(func, n, guard) {
|
7309
7327
|
if (guard && isIterateeCall(func, n, guard)) {
|
7310
|
-
n =
|
7328
|
+
n = undefined;
|
7311
7329
|
}
|
7312
7330
|
n = (func && n == null) ? func.length : nativeMax(+n || 0, 0);
|
7313
|
-
return createWrapper(func, ARY_FLAG,
|
7331
|
+
return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
|
7314
7332
|
}
|
7315
7333
|
|
7316
7334
|
/**
|
@@ -7345,7 +7363,7 @@
|
|
7345
7363
|
result = func.apply(this, arguments);
|
7346
7364
|
}
|
7347
7365
|
if (n <= 1) {
|
7348
|
-
func =
|
7366
|
+
func = undefined;
|
7349
7367
|
}
|
7350
7368
|
return result;
|
7351
7369
|
};
|
@@ -7653,9 +7671,9 @@
|
|
7653
7671
|
var leading = true;
|
7654
7672
|
trailing = false;
|
7655
7673
|
} else if (isObject(options)) {
|
7656
|
-
leading = options.leading;
|
7674
|
+
leading = !!options.leading;
|
7657
7675
|
maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);
|
7658
|
-
trailing = 'trailing' in options ? options.trailing : trailing;
|
7676
|
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
7659
7677
|
}
|
7660
7678
|
|
7661
7679
|
function cancel() {
|
@@ -7665,41 +7683,35 @@
|
|
7665
7683
|
if (maxTimeoutId) {
|
7666
7684
|
clearTimeout(maxTimeoutId);
|
7667
7685
|
}
|
7686
|
+
lastCalled = 0;
|
7668
7687
|
maxTimeoutId = timeoutId = trailingCall = undefined;
|
7669
7688
|
}
|
7670
7689
|
|
7690
|
+
function complete(isCalled, id) {
|
7691
|
+
if (id) {
|
7692
|
+
clearTimeout(id);
|
7693
|
+
}
|
7694
|
+
maxTimeoutId = timeoutId = trailingCall = undefined;
|
7695
|
+
if (isCalled) {
|
7696
|
+
lastCalled = now();
|
7697
|
+
result = func.apply(thisArg, args);
|
7698
|
+
if (!timeoutId && !maxTimeoutId) {
|
7699
|
+
args = thisArg = undefined;
|
7700
|
+
}
|
7701
|
+
}
|
7702
|
+
}
|
7703
|
+
|
7671
7704
|
function delayed() {
|
7672
7705
|
var remaining = wait - (now() - stamp);
|
7673
7706
|
if (remaining <= 0 || remaining > wait) {
|
7674
|
-
|
7675
|
-
clearTimeout(maxTimeoutId);
|
7676
|
-
}
|
7677
|
-
var isCalled = trailingCall;
|
7678
|
-
maxTimeoutId = timeoutId = trailingCall = undefined;
|
7679
|
-
if (isCalled) {
|
7680
|
-
lastCalled = now();
|
7681
|
-
result = func.apply(thisArg, args);
|
7682
|
-
if (!timeoutId && !maxTimeoutId) {
|
7683
|
-
args = thisArg = null;
|
7684
|
-
}
|
7685
|
-
}
|
7707
|
+
complete(trailingCall, maxTimeoutId);
|
7686
7708
|
} else {
|
7687
7709
|
timeoutId = setTimeout(delayed, remaining);
|
7688
7710
|
}
|
7689
7711
|
}
|
7690
7712
|
|
7691
7713
|
function maxDelayed() {
|
7692
|
-
|
7693
|
-
clearTimeout(timeoutId);
|
7694
|
-
}
|
7695
|
-
maxTimeoutId = timeoutId = trailingCall = undefined;
|
7696
|
-
if (trailing || (maxWait !== wait)) {
|
7697
|
-
lastCalled = now();
|
7698
|
-
result = func.apply(thisArg, args);
|
7699
|
-
if (!timeoutId && !maxTimeoutId) {
|
7700
|
-
args = thisArg = null;
|
7701
|
-
}
|
7702
|
-
}
|
7714
|
+
complete(trailing, timeoutId);
|
7703
7715
|
}
|
7704
7716
|
|
7705
7717
|
function debounced() {
|
@@ -7739,7 +7751,7 @@
|
|
7739
7751
|
result = func.apply(thisArg, args);
|
7740
7752
|
}
|
7741
7753
|
if (isCalled && !timeoutId && !maxTimeoutId) {
|
7742
|
-
args = thisArg =
|
7754
|
+
args = thisArg = undefined;
|
7743
7755
|
}
|
7744
7756
|
return result;
|
7745
7757
|
}
|
@@ -7844,7 +7856,7 @@
|
|
7844
7856
|
*
|
7845
7857
|
* **Note:** The cache is exposed as the `cache` property on the memoized
|
7846
7858
|
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
7847
|
-
* constructor with one whose instances implement the [`Map`](
|
7859
|
+
* constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
7848
7860
|
* method interface of `get`, `has`, and `set`.
|
7849
7861
|
*
|
7850
7862
|
* @static
|
@@ -7905,6 +7917,52 @@
|
|
7905
7917
|
return memoized;
|
7906
7918
|
}
|
7907
7919
|
|
7920
|
+
/**
|
7921
|
+
* Creates a function that runs each argument through a corresponding
|
7922
|
+
* transform function.
|
7923
|
+
*
|
7924
|
+
* @static
|
7925
|
+
* @memberOf _
|
7926
|
+
* @category Function
|
7927
|
+
* @param {Function} func The function to wrap.
|
7928
|
+
* @param {...(Function|Function[])} [transforms] The functions to transform
|
7929
|
+
* arguments, specified as individual functions or arrays of functions.
|
7930
|
+
* @returns {Function} Returns the new function.
|
7931
|
+
* @example
|
7932
|
+
*
|
7933
|
+
* function doubled(n) {
|
7934
|
+
* return n * 2;
|
7935
|
+
* }
|
7936
|
+
*
|
7937
|
+
* function square(n) {
|
7938
|
+
* return n * n;
|
7939
|
+
* }
|
7940
|
+
*
|
7941
|
+
* var modded = _.modArgs(function(x, y) {
|
7942
|
+
* return [x, y];
|
7943
|
+
* }, square, doubled);
|
7944
|
+
*
|
7945
|
+
* modded(1, 2);
|
7946
|
+
* // => [1, 4]
|
7947
|
+
*
|
7948
|
+
* modded(5, 10);
|
7949
|
+
* // => [25, 20]
|
7950
|
+
*/
|
7951
|
+
var modArgs = restParam(function(func, transforms) {
|
7952
|
+
transforms = baseFlatten(transforms);
|
7953
|
+
if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) {
|
7954
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
7955
|
+
}
|
7956
|
+
var length = transforms.length;
|
7957
|
+
return restParam(function(args) {
|
7958
|
+
var index = nativeMin(args.length, length);
|
7959
|
+
while (index--) {
|
7960
|
+
args[index] = transforms[index](args[index]);
|
7961
|
+
}
|
7962
|
+
return func.apply(this, args);
|
7963
|
+
});
|
7964
|
+
});
|
7965
|
+
|
7908
7966
|
/**
|
7909
7967
|
* Creates a function that negates the result of the predicate `func`. The
|
7910
7968
|
* `func` predicate is invoked with the `this` binding and arguments of the
|
@@ -8050,7 +8108,7 @@
|
|
8050
8108
|
* // => [3, 6, 9]
|
8051
8109
|
*/
|
8052
8110
|
var rearg = restParam(function(func, indexes) {
|
8053
|
-
return createWrapper(func, REARG_FLAG,
|
8111
|
+
return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes));
|
8054
8112
|
});
|
8055
8113
|
|
8056
8114
|
/**
|
@@ -8196,10 +8254,7 @@
|
|
8196
8254
|
leading = 'leading' in options ? !!options.leading : leading;
|
8197
8255
|
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
8198
8256
|
}
|
8199
|
-
|
8200
|
-
debounceOptions.maxWait = +wait;
|
8201
|
-
debounceOptions.trailing = trailing;
|
8202
|
-
return debounce(func, wait, debounceOptions);
|
8257
|
+
return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });
|
8203
8258
|
}
|
8204
8259
|
|
8205
8260
|
/**
|
@@ -8225,7 +8280,7 @@
|
|
8225
8280
|
*/
|
8226
8281
|
function wrap(value, wrapper) {
|
8227
8282
|
wrapper = wrapper == null ? identity : wrapper;
|
8228
|
-
return createWrapper(wrapper, PARTIAL_FLAG,
|
8283
|
+
return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []);
|
8229
8284
|
}
|
8230
8285
|
|
8231
8286
|
/*------------------------------------------------------------------------*/
|
@@ -8411,7 +8466,8 @@
|
|
8411
8466
|
* // => false
|
8412
8467
|
*/
|
8413
8468
|
function isArguments(value) {
|
8414
|
-
return isObjectLike(value) && isArrayLike(value) &&
|
8469
|
+
return isObjectLike(value) && isArrayLike(value) &&
|
8470
|
+
hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
|
8415
8471
|
}
|
8416
8472
|
|
8417
8473
|
/**
|
@@ -8491,14 +8547,7 @@
|
|
8491
8547
|
* // => false
|
8492
8548
|
*/
|
8493
8549
|
function isElement(value) {
|
8494
|
-
return !!value && value.nodeType === 1 && isObjectLike(value) &&
|
8495
|
-
(objToString.call(value).indexOf('Element') > -1);
|
8496
|
-
}
|
8497
|
-
// Fallback for environments without DOM support.
|
8498
|
-
if (!support.dom) {
|
8499
|
-
isElement = function(value) {
|
8500
|
-
return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
|
8501
|
-
};
|
8550
|
+
return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
|
8502
8551
|
}
|
8503
8552
|
|
8504
8553
|
/**
|
@@ -8613,7 +8662,7 @@
|
|
8613
8662
|
/**
|
8614
8663
|
* Checks if `value` is a finite primitive number.
|
8615
8664
|
*
|
8616
|
-
* **Note:** This method is based on [`Number.isFinite`](
|
8665
|
+
* **Note:** This method is based on [`Number.isFinite`](http://ecma-international.org/ecma-262/6.0/#sec-number.isfinite).
|
8617
8666
|
*
|
8618
8667
|
* @static
|
8619
8668
|
* @memberOf _
|
@@ -8637,9 +8686,9 @@
|
|
8637
8686
|
* _.isFinite(Infinity);
|
8638
8687
|
* // => false
|
8639
8688
|
*/
|
8640
|
-
|
8689
|
+
function isFinite(value) {
|
8641
8690
|
return typeof value == 'number' && nativeIsFinite(value);
|
8642
|
-
}
|
8691
|
+
}
|
8643
8692
|
|
8644
8693
|
/**
|
8645
8694
|
* Checks if `value` is classified as a `Function` object.
|
@@ -8657,12 +8706,12 @@
|
|
8657
8706
|
* _.isFunction(/abc/);
|
8658
8707
|
* // => false
|
8659
8708
|
*/
|
8660
|
-
|
8709
|
+
function isFunction(value) {
|
8661
8710
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
8662
8711
|
// in older versions of Chrome and Safari which return 'function' for regexes
|
8663
8712
|
// and Safari 8 equivalents which return 'object' for typed array constructors.
|
8664
|
-
return objToString.call(value) == funcTag;
|
8665
|
-
}
|
8713
|
+
return isObject(value) && objToString.call(value) == funcTag;
|
8714
|
+
}
|
8666
8715
|
|
8667
8716
|
/**
|
8668
8717
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
@@ -8786,7 +8835,7 @@
|
|
8786
8835
|
if (value == null) {
|
8787
8836
|
return false;
|
8788
8837
|
}
|
8789
|
-
if (
|
8838
|
+
if (isFunction(value)) {
|
8790
8839
|
return reIsNative.test(fnToString.call(value));
|
8791
8840
|
}
|
8792
8841
|
return isObjectLike(value) && reIsHostCtor.test(value);
|
@@ -8868,17 +8917,26 @@
|
|
8868
8917
|
* _.isPlainObject(Object.create(null));
|
8869
8918
|
* // => true
|
8870
8919
|
*/
|
8871
|
-
|
8872
|
-
|
8920
|
+
function isPlainObject(value) {
|
8921
|
+
var Ctor;
|
8922
|
+
|
8923
|
+
// Exit early for non `Object` objects.
|
8924
|
+
if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||
|
8925
|
+
(!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
|
8873
8926
|
return false;
|
8874
8927
|
}
|
8875
|
-
|
8876
|
-
|
8877
|
-
|
8878
|
-
|
8879
|
-
|
8880
|
-
|
8881
|
-
|
8928
|
+
// IE < 9 iterates inherited properties before own properties. If the first
|
8929
|
+
// iterated property is an object's own property then there are no inherited
|
8930
|
+
// enumerable properties.
|
8931
|
+
var result;
|
8932
|
+
// In most environments an object's own properties are iterated before
|
8933
|
+
// its inherited properties. If the last iterated property is an object's
|
8934
|
+
// own property then there are no inherited enumerable properties.
|
8935
|
+
baseForIn(value, function(subValue, key) {
|
8936
|
+
result = key;
|
8937
|
+
});
|
8938
|
+
return result === undefined || hasOwnProperty.call(value, result);
|
8939
|
+
}
|
8882
8940
|
|
8883
8941
|
/**
|
8884
8942
|
* Checks if `value` is classified as a `RegExp` object.
|
@@ -8897,7 +8955,7 @@
|
|
8897
8955
|
* // => false
|
8898
8956
|
*/
|
8899
8957
|
function isRegExp(value) {
|
8900
|
-
return
|
8958
|
+
return isObject(value) && objToString.call(value) == regexpTag;
|
8901
8959
|
}
|
8902
8960
|
|
8903
8961
|
/**
|
@@ -9063,6 +9121,56 @@
|
|
9063
9121
|
|
9064
9122
|
/*------------------------------------------------------------------------*/
|
9065
9123
|
|
9124
|
+
/**
|
9125
|
+
* Recursively merges own enumerable properties of the source object(s), that
|
9126
|
+
* don't resolve to `undefined` into the destination object. Subsequent sources
|
9127
|
+
* overwrite property assignments of previous sources. If `customizer` is
|
9128
|
+
* provided it is invoked to produce the merged values of the destination and
|
9129
|
+
* source properties. If `customizer` returns `undefined` merging is handled
|
9130
|
+
* by the method instead. The `customizer` is bound to `thisArg` and invoked
|
9131
|
+
* with five arguments: (objectValue, sourceValue, key, object, source).
|
9132
|
+
*
|
9133
|
+
* @static
|
9134
|
+
* @memberOf _
|
9135
|
+
* @category Object
|
9136
|
+
* @param {Object} object The destination object.
|
9137
|
+
* @param {...Object} [sources] The source objects.
|
9138
|
+
* @param {Function} [customizer] The function to customize assigned values.
|
9139
|
+
* @param {*} [thisArg] The `this` binding of `customizer`.
|
9140
|
+
* @returns {Object} Returns `object`.
|
9141
|
+
* @example
|
9142
|
+
*
|
9143
|
+
* var users = {
|
9144
|
+
* 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
|
9145
|
+
* };
|
9146
|
+
*
|
9147
|
+
* var ages = {
|
9148
|
+
* 'data': [{ 'age': 36 }, { 'age': 40 }]
|
9149
|
+
* };
|
9150
|
+
*
|
9151
|
+
* _.merge(users, ages);
|
9152
|
+
* // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
|
9153
|
+
*
|
9154
|
+
* // using a customizer callback
|
9155
|
+
* var object = {
|
9156
|
+
* 'fruits': ['apple'],
|
9157
|
+
* 'vegetables': ['beet']
|
9158
|
+
* };
|
9159
|
+
*
|
9160
|
+
* var other = {
|
9161
|
+
* 'fruits': ['banana'],
|
9162
|
+
* 'vegetables': ['carrot']
|
9163
|
+
* };
|
9164
|
+
*
|
9165
|
+
* _.merge(object, other, function(a, b) {
|
9166
|
+
* if (_.isArray(a)) {
|
9167
|
+
* return a.concat(b);
|
9168
|
+
* }
|
9169
|
+
* });
|
9170
|
+
* // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
|
9171
|
+
*/
|
9172
|
+
var merge = createAssigner(baseMerge);
|
9173
|
+
|
9066
9174
|
/**
|
9067
9175
|
* Assigns own enumerable properties of source object(s) to the destination
|
9068
9176
|
* object. Subsequent sources overwrite property assignments of previous sources.
|
@@ -9071,7 +9179,7 @@
|
|
9071
9179
|
* (objectValue, sourceValue, key, object, source).
|
9072
9180
|
*
|
9073
9181
|
* **Note:** This method mutates `object` and is based on
|
9074
|
-
* [`Object.assign`](
|
9182
|
+
* [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign).
|
9075
9183
|
*
|
9076
9184
|
* @static
|
9077
9185
|
* @memberOf _
|
@@ -9138,7 +9246,7 @@
|
|
9138
9246
|
function create(prototype, properties, guard) {
|
9139
9247
|
var result = baseCreate(prototype);
|
9140
9248
|
if (guard && isIterateeCall(prototype, properties, guard)) {
|
9141
|
-
properties =
|
9249
|
+
properties = undefined;
|
9142
9250
|
}
|
9143
9251
|
return properties ? baseAssign(result, properties) : result;
|
9144
9252
|
}
|
@@ -9161,14 +9269,27 @@
|
|
9161
9269
|
* _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
|
9162
9270
|
* // => { 'user': 'barney', 'age': 36 }
|
9163
9271
|
*/
|
9164
|
-
var defaults =
|
9165
|
-
|
9166
|
-
|
9167
|
-
|
9168
|
-
|
9169
|
-
|
9170
|
-
|
9171
|
-
|
9272
|
+
var defaults = createDefaults(assign, assignDefaults);
|
9273
|
+
|
9274
|
+
/**
|
9275
|
+
* This method is like `_.defaults` except that it recursively assigns
|
9276
|
+
* default properties.
|
9277
|
+
*
|
9278
|
+
* **Note:** This method mutates `object`.
|
9279
|
+
*
|
9280
|
+
* @static
|
9281
|
+
* @memberOf _
|
9282
|
+
* @category Object
|
9283
|
+
* @param {Object} object The destination object.
|
9284
|
+
* @param {...Object} [sources] The source objects.
|
9285
|
+
* @returns {Object} Returns `object`.
|
9286
|
+
* @example
|
9287
|
+
*
|
9288
|
+
* _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
|
9289
|
+
* // => { 'user': { 'name': 'barney', 'age': 36 } }
|
9290
|
+
*
|
9291
|
+
*/
|
9292
|
+
var defaultsDeep = createDefaults(merge, mergeDefaults);
|
9172
9293
|
|
9173
9294
|
/**
|
9174
9295
|
* This method is like `_.find` except that it returns the key of the first
|
@@ -9495,7 +9616,7 @@
|
|
9495
9616
|
*/
|
9496
9617
|
function invert(object, multiValue, guard) {
|
9497
9618
|
if (guard && isIterateeCall(object, multiValue, guard)) {
|
9498
|
-
multiValue =
|
9619
|
+
multiValue = undefined;
|
9499
9620
|
}
|
9500
9621
|
var index = -1,
|
9501
9622
|
props = keys(object),
|
@@ -9524,7 +9645,7 @@
|
|
9524
9645
|
* Creates an array of the own enumerable property names of `object`.
|
9525
9646
|
*
|
9526
9647
|
* **Note:** Non-object values are coerced to objects. See the
|
9527
|
-
* [ES spec](
|
9648
|
+
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
9528
9649
|
* for more details.
|
9529
9650
|
*
|
9530
9651
|
* @static
|
@@ -9548,7 +9669,7 @@
|
|
9548
9669
|
* // => ['0', '1']
|
9549
9670
|
*/
|
9550
9671
|
var keys = !nativeKeys ? shimKeys : function(object) {
|
9551
|
-
var Ctor = object == null ?
|
9672
|
+
var Ctor = object == null ? undefined : object.constructor;
|
9552
9673
|
if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
|
9553
9674
|
(typeof object != 'function' && isArrayLike(object))) {
|
9554
9675
|
return shimKeys(object);
|
@@ -9672,56 +9793,6 @@
|
|
9672
9793
|
*/
|
9673
9794
|
var mapValues = createObjectMapper();
|
9674
9795
|
|
9675
|
-
/**
|
9676
|
-
* Recursively merges own enumerable properties of the source object(s), that
|
9677
|
-
* don't resolve to `undefined` into the destination object. Subsequent sources
|
9678
|
-
* overwrite property assignments of previous sources. If `customizer` is
|
9679
|
-
* provided it is invoked to produce the merged values of the destination and
|
9680
|
-
* source properties. If `customizer` returns `undefined` merging is handled
|
9681
|
-
* by the method instead. The `customizer` is bound to `thisArg` and invoked
|
9682
|
-
* with five arguments: (objectValue, sourceValue, key, object, source).
|
9683
|
-
*
|
9684
|
-
* @static
|
9685
|
-
* @memberOf _
|
9686
|
-
* @category Object
|
9687
|
-
* @param {Object} object The destination object.
|
9688
|
-
* @param {...Object} [sources] The source objects.
|
9689
|
-
* @param {Function} [customizer] The function to customize assigned values.
|
9690
|
-
* @param {*} [thisArg] The `this` binding of `customizer`.
|
9691
|
-
* @returns {Object} Returns `object`.
|
9692
|
-
* @example
|
9693
|
-
*
|
9694
|
-
* var users = {
|
9695
|
-
* 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
|
9696
|
-
* };
|
9697
|
-
*
|
9698
|
-
* var ages = {
|
9699
|
-
* 'data': [{ 'age': 36 }, { 'age': 40 }]
|
9700
|
-
* };
|
9701
|
-
*
|
9702
|
-
* _.merge(users, ages);
|
9703
|
-
* // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
|
9704
|
-
*
|
9705
|
-
* // using a customizer callback
|
9706
|
-
* var object = {
|
9707
|
-
* 'fruits': ['apple'],
|
9708
|
-
* 'vegetables': ['beet']
|
9709
|
-
* };
|
9710
|
-
*
|
9711
|
-
* var other = {
|
9712
|
-
* 'fruits': ['banana'],
|
9713
|
-
* 'vegetables': ['carrot']
|
9714
|
-
* };
|
9715
|
-
*
|
9716
|
-
* _.merge(object, other, function(a, b) {
|
9717
|
-
* if (_.isArray(a)) {
|
9718
|
-
* return a.concat(b);
|
9719
|
-
* }
|
9720
|
-
* });
|
9721
|
-
* // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
|
9722
|
-
*/
|
9723
|
-
var merge = createAssigner(baseMerge);
|
9724
|
-
|
9725
9796
|
/**
|
9726
9797
|
* The opposite of `_.pick`; this method creates an object composed of the
|
9727
9798
|
* own and inherited enumerable properties of `object` that are not omitted.
|
@@ -9952,7 +10023,7 @@
|
|
9952
10023
|
if (isArr) {
|
9953
10024
|
accumulator = isArray(object) ? new Ctor : [];
|
9954
10025
|
} else {
|
9955
|
-
accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype :
|
10026
|
+
accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
|
9956
10027
|
}
|
9957
10028
|
} else {
|
9958
10029
|
accumulator = {};
|
@@ -10055,7 +10126,7 @@
|
|
10055
10126
|
*/
|
10056
10127
|
function inRange(value, start, end) {
|
10057
10128
|
start = +start || 0;
|
10058
|
-
if (
|
10129
|
+
if (end === undefined) {
|
10059
10130
|
end = start;
|
10060
10131
|
start = 0;
|
10061
10132
|
} else {
|
@@ -10093,7 +10164,7 @@
|
|
10093
10164
|
*/
|
10094
10165
|
function random(min, max, floating) {
|
10095
10166
|
if (floating && isIterateeCall(min, max, floating)) {
|
10096
|
-
max = floating =
|
10167
|
+
max = floating = undefined;
|
10097
10168
|
}
|
10098
10169
|
var noMin = min == null,
|
10099
10170
|
noMax = max == null;
|
@@ -10280,8 +10351,8 @@
|
|
10280
10351
|
function escapeRegExp(string) {
|
10281
10352
|
string = baseToString(string);
|
10282
10353
|
return (string && reHasRegExpChars.test(string))
|
10283
|
-
? string.replace(reRegExpChars,
|
10284
|
-
: string;
|
10354
|
+
? string.replace(reRegExpChars, escapeRegExpChar)
|
10355
|
+
: (string || '(?:)');
|
10285
10356
|
}
|
10286
10357
|
|
10287
10358
|
/**
|
@@ -10338,8 +10409,8 @@
|
|
10338
10409
|
return string;
|
10339
10410
|
}
|
10340
10411
|
var mid = (length - strLength) / 2,
|
10341
|
-
leftLength =
|
10342
|
-
rightLength =
|
10412
|
+
leftLength = nativeFloor(mid),
|
10413
|
+
rightLength = nativeCeil(mid);
|
10343
10414
|
|
10344
10415
|
chars = createPadding('', rightLength, chars);
|
10345
10416
|
return chars.slice(0, leftLength) + string + chars;
|
@@ -10417,25 +10488,16 @@
|
|
10417
10488
|
* // => [6, 8, 10]
|
10418
10489
|
*/
|
10419
10490
|
function parseInt(string, radix, guard) {
|
10420
|
-
|
10491
|
+
// Firefox < 21 and Opera < 15 follow ES3 for `parseInt`.
|
10492
|
+
// Chrome fails to trim leading <BOM> whitespace characters.
|
10493
|
+
// See https://code.google.com/p/v8/issues/detail?id=3109 for more details.
|
10494
|
+
if (guard ? isIterateeCall(string, radix, guard) : radix == null) {
|
10421
10495
|
radix = 0;
|
10496
|
+
} else if (radix) {
|
10497
|
+
radix = +radix;
|
10422
10498
|
}
|
10423
|
-
|
10424
|
-
|
10425
|
-
// Fallback for environments with pre-ES5 implementations.
|
10426
|
-
if (nativeParseInt(whitespace + '08') != 8) {
|
10427
|
-
parseInt = function(string, radix, guard) {
|
10428
|
-
// Firefox < 21 and Opera < 15 follow ES3 for `parseInt`.
|
10429
|
-
// Chrome fails to trim leading <BOM> whitespace characters.
|
10430
|
-
// See https://code.google.com/p/v8/issues/detail?id=3109 for more details.
|
10431
|
-
if (guard ? isIterateeCall(string, radix, guard) : radix == null) {
|
10432
|
-
radix = 0;
|
10433
|
-
} else if (radix) {
|
10434
|
-
radix = +radix;
|
10435
|
-
}
|
10436
|
-
string = trim(string);
|
10437
|
-
return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
|
10438
|
-
};
|
10499
|
+
string = trim(string);
|
10500
|
+
return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
|
10439
10501
|
}
|
10440
10502
|
|
10441
10503
|
/**
|
@@ -10471,7 +10533,7 @@
|
|
10471
10533
|
if (n % 2) {
|
10472
10534
|
result += string;
|
10473
10535
|
}
|
10474
|
-
n =
|
10536
|
+
n = nativeFloor(n / 2);
|
10475
10537
|
string += string;
|
10476
10538
|
} while (n);
|
10477
10539
|
|
@@ -10656,7 +10718,7 @@
|
|
10656
10718
|
var settings = lodash.templateSettings;
|
10657
10719
|
|
10658
10720
|
if (otherOptions && isIterateeCall(string, options, otherOptions)) {
|
10659
|
-
options = otherOptions =
|
10721
|
+
options = otherOptions = undefined;
|
10660
10722
|
}
|
10661
10723
|
string = baseToString(string);
|
10662
10724
|
options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
|
@@ -10892,7 +10954,7 @@
|
|
10892
10954
|
*/
|
10893
10955
|
function trunc(string, options, guard) {
|
10894
10956
|
if (guard && isIterateeCall(string, options, guard)) {
|
10895
|
-
options =
|
10957
|
+
options = undefined;
|
10896
10958
|
}
|
10897
10959
|
var length = DEFAULT_TRUNC_LENGTH,
|
10898
10960
|
omission = DEFAULT_TRUNC_OMISSION;
|
@@ -10987,7 +11049,7 @@
|
|
10987
11049
|
*/
|
10988
11050
|
function words(string, pattern, guard) {
|
10989
11051
|
if (guard && isIterateeCall(string, pattern, guard)) {
|
10990
|
-
pattern =
|
11052
|
+
pattern = undefined;
|
10991
11053
|
}
|
10992
11054
|
string = baseToString(string);
|
10993
11055
|
return string.match(pattern || reWords) || [];
|
@@ -11063,7 +11125,7 @@
|
|
11063
11125
|
*/
|
11064
11126
|
function callback(func, thisArg, guard) {
|
11065
11127
|
if (guard && isIterateeCall(func, thisArg, guard)) {
|
11066
|
-
thisArg =
|
11128
|
+
thisArg = undefined;
|
11067
11129
|
}
|
11068
11130
|
return isObjectLike(func)
|
11069
11131
|
? matches(func)
|
@@ -11264,8 +11326,8 @@
|
|
11264
11326
|
function mixin(object, source, options) {
|
11265
11327
|
if (options == null) {
|
11266
11328
|
var isObj = isObject(source),
|
11267
|
-
props = isObj ? keys(source) :
|
11268
|
-
methodNames = (props && props.length) ? baseFunctions(source, props) :
|
11329
|
+
props = isObj ? keys(source) : undefined,
|
11330
|
+
methodNames = (props && props.length) ? baseFunctions(source, props) : undefined;
|
11269
11331
|
|
11270
11332
|
if (!(methodNames ? methodNames.length : isObj)) {
|
11271
11333
|
methodNames = false;
|
@@ -11304,9 +11366,7 @@
|
|
11304
11366
|
result.__chain__ = chainAll;
|
11305
11367
|
return result;
|
11306
11368
|
}
|
11307
|
-
|
11308
|
-
push.apply(args, arguments);
|
11309
|
-
return func.apply(object, args);
|
11369
|
+
return func.apply(object, arrayPush([this.value()], arguments));
|
11310
11370
|
};
|
11311
11371
|
}(func));
|
11312
11372
|
}
|
@@ -11327,7 +11387,7 @@
|
|
11327
11387
|
* var lodash = _.noConflict();
|
11328
11388
|
*/
|
11329
11389
|
function noConflict() {
|
11330
|
-
|
11390
|
+
root._ = oldDash;
|
11331
11391
|
return this;
|
11332
11392
|
}
|
11333
11393
|
|
@@ -11436,7 +11496,7 @@
|
|
11436
11496
|
*/
|
11437
11497
|
function range(start, end, step) {
|
11438
11498
|
if (step && isIterateeCall(start, end, step)) {
|
11439
|
-
end = step =
|
11499
|
+
end = step = undefined;
|
11440
11500
|
}
|
11441
11501
|
start = +start || 0;
|
11442
11502
|
step = step == null ? 1 : (+step || 0);
|
@@ -11450,7 +11510,7 @@
|
|
11450
11510
|
// Use `Array(length)` so engines like Chakra and V8 avoid slower modes.
|
11451
11511
|
// See https://youtu.be/XAqIpGU8ZZk#t=17m25s for more details.
|
11452
11512
|
var index = -1,
|
11453
|
-
length = nativeMax(
|
11513
|
+
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
|
11454
11514
|
result = Array(length);
|
11455
11515
|
|
11456
11516
|
while (++index < length) {
|
@@ -11488,7 +11548,7 @@
|
|
11488
11548
|
* // => also invokes `mage.castSpell(n)` three times
|
11489
11549
|
*/
|
11490
11550
|
function times(n, iteratee, thisArg) {
|
11491
|
-
n =
|
11551
|
+
n = nativeFloor(n);
|
11492
11552
|
|
11493
11553
|
// Exit early to avoid a JSC JIT bug in Safari 8
|
11494
11554
|
// where `Array(0)` is treated as `Array(1)`.
|
@@ -11550,6 +11610,50 @@
|
|
11550
11610
|
return (+augend || 0) + (+addend || 0);
|
11551
11611
|
}
|
11552
11612
|
|
11613
|
+
/**
|
11614
|
+
* Calculates `n` rounded up to `precision`.
|
11615
|
+
*
|
11616
|
+
* @static
|
11617
|
+
* @memberOf _
|
11618
|
+
* @category Math
|
11619
|
+
* @param {number} n The number to round up.
|
11620
|
+
* @param {number} [precision=0] The precision to round up to.
|
11621
|
+
* @returns {number} Returns the rounded up number.
|
11622
|
+
* @example
|
11623
|
+
*
|
11624
|
+
* _.ceil(4.006);
|
11625
|
+
* // => 5
|
11626
|
+
*
|
11627
|
+
* _.ceil(6.004, 2);
|
11628
|
+
* // => 6.01
|
11629
|
+
*
|
11630
|
+
* _.ceil(6040, -2);
|
11631
|
+
* // => 6100
|
11632
|
+
*/
|
11633
|
+
var ceil = createRound('ceil');
|
11634
|
+
|
11635
|
+
/**
|
11636
|
+
* Calculates `n` rounded down to `precision`.
|
11637
|
+
*
|
11638
|
+
* @static
|
11639
|
+
* @memberOf _
|
11640
|
+
* @category Math
|
11641
|
+
* @param {number} n The number to round down.
|
11642
|
+
* @param {number} [precision=0] The precision to round down to.
|
11643
|
+
* @returns {number} Returns the rounded down number.
|
11644
|
+
* @example
|
11645
|
+
*
|
11646
|
+
* _.floor(4.006);
|
11647
|
+
* // => 4
|
11648
|
+
*
|
11649
|
+
* _.floor(0.046, 2);
|
11650
|
+
* // => 0.04
|
11651
|
+
*
|
11652
|
+
* _.floor(4060, -2);
|
11653
|
+
* // => 4000
|
11654
|
+
*/
|
11655
|
+
var floor = createRound('floor');
|
11656
|
+
|
11553
11657
|
/**
|
11554
11658
|
* Gets the maximum value of `collection`. If `collection` is empty or falsey
|
11555
11659
|
* `-Infinity` is returned. If an iteratee function is provided it is invoked
|
@@ -11648,6 +11752,28 @@
|
|
11648
11752
|
*/
|
11649
11753
|
var min = createExtremum(lt, POSITIVE_INFINITY);
|
11650
11754
|
|
11755
|
+
/**
|
11756
|
+
* Calculates `n` rounded to `precision`.
|
11757
|
+
*
|
11758
|
+
* @static
|
11759
|
+
* @memberOf _
|
11760
|
+
* @category Math
|
11761
|
+
* @param {number} n The number to round.
|
11762
|
+
* @param {number} [precision=0] The precision to round to.
|
11763
|
+
* @returns {number} Returns the rounded number.
|
11764
|
+
* @example
|
11765
|
+
*
|
11766
|
+
* _.round(4.006);
|
11767
|
+
* // => 4
|
11768
|
+
*
|
11769
|
+
* _.round(4.006, 2);
|
11770
|
+
* // => 4.01
|
11771
|
+
*
|
11772
|
+
* _.round(4060, -2);
|
11773
|
+
* // => 4100
|
11774
|
+
*/
|
11775
|
+
var round = createRound('round');
|
11776
|
+
|
11651
11777
|
/**
|
11652
11778
|
* Gets the sum of the values in `collection`.
|
11653
11779
|
*
|
@@ -11682,17 +11808,11 @@
|
|
11682
11808
|
*/
|
11683
11809
|
function sum(collection, iteratee, thisArg) {
|
11684
11810
|
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
11685
|
-
iteratee =
|
11686
|
-
}
|
11687
|
-
var callback = getCallback(),
|
11688
|
-
noIteratee = iteratee == null;
|
11689
|
-
|
11690
|
-
if (!(noIteratee && callback === baseCallback)) {
|
11691
|
-
noIteratee = false;
|
11692
|
-
iteratee = callback(iteratee, thisArg, 3);
|
11811
|
+
iteratee = undefined;
|
11693
11812
|
}
|
11694
|
-
|
11695
|
-
|
11813
|
+
iteratee = getCallback(iteratee, thisArg, 3);
|
11814
|
+
return iteratee.length == 1
|
11815
|
+
? arraySum(isArray(collection) ? collection : toIterable(collection), iteratee)
|
11696
11816
|
: baseSum(collection, iteratee);
|
11697
11817
|
}
|
11698
11818
|
|
@@ -11739,6 +11859,7 @@
|
|
11739
11859
|
lodash.curryRight = curryRight;
|
11740
11860
|
lodash.debounce = debounce;
|
11741
11861
|
lodash.defaults = defaults;
|
11862
|
+
lodash.defaultsDeep = defaultsDeep;
|
11742
11863
|
lodash.defer = defer;
|
11743
11864
|
lodash.delay = delay;
|
11744
11865
|
lodash.difference = difference;
|
@@ -11777,6 +11898,7 @@
|
|
11777
11898
|
lodash.method = method;
|
11778
11899
|
lodash.methodOf = methodOf;
|
11779
11900
|
lodash.mixin = mixin;
|
11901
|
+
lodash.modArgs = modArgs;
|
11780
11902
|
lodash.negate = negate;
|
11781
11903
|
lodash.omit = omit;
|
11782
11904
|
lodash.once = once;
|
@@ -11852,6 +11974,7 @@
|
|
11852
11974
|
lodash.attempt = attempt;
|
11853
11975
|
lodash.camelCase = camelCase;
|
11854
11976
|
lodash.capitalize = capitalize;
|
11977
|
+
lodash.ceil = ceil;
|
11855
11978
|
lodash.clone = clone;
|
11856
11979
|
lodash.cloneDeep = cloneDeep;
|
11857
11980
|
lodash.deburr = deburr;
|
@@ -11867,6 +11990,7 @@
|
|
11867
11990
|
lodash.findLastKey = findLastKey;
|
11868
11991
|
lodash.findWhere = findWhere;
|
11869
11992
|
lodash.first = first;
|
11993
|
+
lodash.floor = floor;
|
11870
11994
|
lodash.get = get;
|
11871
11995
|
lodash.gt = gt;
|
11872
11996
|
lodash.gte = gte;
|
@@ -11915,6 +12039,7 @@
|
|
11915
12039
|
lodash.reduceRight = reduceRight;
|
11916
12040
|
lodash.repeat = repeat;
|
11917
12041
|
lodash.result = result;
|
12042
|
+
lodash.round = round;
|
11918
12043
|
lodash.runInContext = runInContext;
|
11919
12044
|
lodash.size = size;
|
11920
12045
|
lodash.snakeCase = snakeCase;
|
@@ -11985,48 +12110,20 @@
|
|
11985
12110
|
lodash[methodName].placeholder = lodash;
|
11986
12111
|
});
|
11987
12112
|
|
11988
|
-
// Add `LazyWrapper` methods that accept an `iteratee` value.
|
11989
|
-
arrayEach(['dropWhile', 'filter', 'map', 'takeWhile'], function(methodName, type) {
|
11990
|
-
var isFilter = type != LAZY_MAP_FLAG,
|
11991
|
-
isDropWhile = type == LAZY_DROP_WHILE_FLAG;
|
11992
|
-
|
11993
|
-
LazyWrapper.prototype[methodName] = function(iteratee, thisArg) {
|
11994
|
-
var filtered = this.__filtered__,
|
11995
|
-
result = (filtered && isDropWhile) ? new LazyWrapper(this) : this.clone(),
|
11996
|
-
iteratees = result.__iteratees__ || (result.__iteratees__ = []);
|
11997
|
-
|
11998
|
-
iteratees.push({
|
11999
|
-
'done': false,
|
12000
|
-
'count': 0,
|
12001
|
-
'index': 0,
|
12002
|
-
'iteratee': getCallback(iteratee, thisArg, 1),
|
12003
|
-
'limit': -1,
|
12004
|
-
'type': type
|
12005
|
-
});
|
12006
|
-
|
12007
|
-
result.__filtered__ = filtered || isFilter;
|
12008
|
-
return result;
|
12009
|
-
};
|
12010
|
-
});
|
12011
|
-
|
12012
12113
|
// Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
|
12013
12114
|
arrayEach(['drop', 'take'], function(methodName, index) {
|
12014
|
-
var whileName = methodName + 'While';
|
12015
|
-
|
12016
12115
|
LazyWrapper.prototype[methodName] = function(n) {
|
12017
|
-
var filtered = this.__filtered__
|
12018
|
-
|
12116
|
+
var filtered = this.__filtered__;
|
12117
|
+
if (filtered && !index) {
|
12118
|
+
return new LazyWrapper(this);
|
12119
|
+
}
|
12120
|
+
n = n == null ? 1 : nativeMax(nativeFloor(n) || 0, 0);
|
12019
12121
|
|
12020
|
-
|
12122
|
+
var result = this.clone();
|
12021
12123
|
if (filtered) {
|
12022
|
-
|
12023
|
-
result.__takeCount__ = nativeMin(result.__takeCount__, n);
|
12024
|
-
} else {
|
12025
|
-
last(result.__iteratees__).limit = n;
|
12026
|
-
}
|
12124
|
+
result.__takeCount__ = nativeMin(result.__takeCount__, n);
|
12027
12125
|
} else {
|
12028
|
-
|
12029
|
-
views.push({ 'size': n, 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') });
|
12126
|
+
result.__views__.push({ 'size': n, 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') });
|
12030
12127
|
}
|
12031
12128
|
return result;
|
12032
12129
|
};
|
@@ -12034,9 +12131,18 @@
|
|
12034
12131
|
LazyWrapper.prototype[methodName + 'Right'] = function(n) {
|
12035
12132
|
return this.reverse()[methodName](n).reverse();
|
12036
12133
|
};
|
12134
|
+
});
|
12135
|
+
|
12136
|
+
// Add `LazyWrapper` methods that accept an `iteratee` value.
|
12137
|
+
arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
|
12138
|
+
var type = index + 1,
|
12139
|
+
isFilter = type != LAZY_MAP_FLAG;
|
12037
12140
|
|
12038
|
-
LazyWrapper.prototype[methodName
|
12039
|
-
|
12141
|
+
LazyWrapper.prototype[methodName] = function(iteratee, thisArg) {
|
12142
|
+
var result = this.clone();
|
12143
|
+
result.__iteratees__.push({ 'iteratee': getCallback(iteratee, thisArg, 1), 'type': type });
|
12144
|
+
result.__filtered__ = result.__filtered__ || isFilter;
|
12145
|
+
return result;
|
12040
12146
|
};
|
12041
12147
|
});
|
12042
12148
|
|
@@ -12054,7 +12160,7 @@
|
|
12054
12160
|
var dropName = 'drop' + (index ? '' : 'Right');
|
12055
12161
|
|
12056
12162
|
LazyWrapper.prototype[methodName] = function() {
|
12057
|
-
return this[dropName](1);
|
12163
|
+
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
12058
12164
|
};
|
12059
12165
|
});
|
12060
12166
|
|
@@ -12083,10 +12189,13 @@
|
|
12083
12189
|
start = start == null ? 0 : (+start || 0);
|
12084
12190
|
|
12085
12191
|
var result = this;
|
12192
|
+
if (result.__filtered__ && (start > 0 || end < 0)) {
|
12193
|
+
return new LazyWrapper(result);
|
12194
|
+
}
|
12086
12195
|
if (start < 0) {
|
12087
|
-
result =
|
12196
|
+
result = result.takeRight(-start);
|
12088
12197
|
} else if (start) {
|
12089
|
-
result =
|
12198
|
+
result = result.drop(start);
|
12090
12199
|
}
|
12091
12200
|
if (end !== undefined) {
|
12092
12201
|
end = (+end || 0);
|
@@ -12095,21 +12204,25 @@
|
|
12095
12204
|
return result;
|
12096
12205
|
};
|
12097
12206
|
|
12207
|
+
LazyWrapper.prototype.takeRightWhile = function(predicate, thisArg) {
|
12208
|
+
return this.reverse().takeWhile(predicate, thisArg).reverse();
|
12209
|
+
};
|
12210
|
+
|
12098
12211
|
LazyWrapper.prototype.toArray = function() {
|
12099
|
-
return this.
|
12212
|
+
return this.take(POSITIVE_INFINITY);
|
12100
12213
|
};
|
12101
12214
|
|
12102
12215
|
// Add `LazyWrapper` methods to `lodash.prototype`.
|
12103
12216
|
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
12104
|
-
var
|
12217
|
+
var checkIteratee = /^(?:filter|map|reject)|While$/.test(methodName),
|
12218
|
+
retUnwrapped = /^(?:first|last)$/.test(methodName),
|
12219
|
+
lodashFunc = lodash[retUnwrapped ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName];
|
12220
|
+
|
12105
12221
|
if (!lodashFunc) {
|
12106
12222
|
return;
|
12107
12223
|
}
|
12108
|
-
var checkIteratee = /^(?:filter|map|reject)|While$/.test(methodName),
|
12109
|
-
retUnwrapped = /^(?:first|last)$/.test(methodName);
|
12110
|
-
|
12111
12224
|
lodash.prototype[methodName] = function() {
|
12112
|
-
var args = arguments,
|
12225
|
+
var args = retUnwrapped ? [1] : arguments,
|
12113
12226
|
chainAll = this.__chain__,
|
12114
12227
|
value = this.__wrapped__,
|
12115
12228
|
isHybrid = !!this.__actions__.length,
|
@@ -12118,28 +12231,30 @@
|
|
12118
12231
|
useLazy = isLazy || isArray(value);
|
12119
12232
|
|
12120
12233
|
if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
|
12121
|
-
//
|
12234
|
+
// Avoid lazy use if the iteratee has a "length" value other than `1`.
|
12122
12235
|
isLazy = useLazy = false;
|
12123
12236
|
}
|
12124
|
-
var onlyLazy = isLazy && !isHybrid;
|
12125
|
-
if (retUnwrapped && !chainAll) {
|
12126
|
-
return onlyLazy
|
12127
|
-
? func.call(value)
|
12128
|
-
: lodashFunc.call(lodash, this.value());
|
12129
|
-
}
|
12130
12237
|
var interceptor = function(value) {
|
12131
|
-
|
12132
|
-
|
12133
|
-
|
12238
|
+
return (retUnwrapped && chainAll)
|
12239
|
+
? lodashFunc(value, 1)[0]
|
12240
|
+
: lodashFunc.apply(undefined, arrayPush([value], args));
|
12134
12241
|
};
|
12135
|
-
if (useLazy) {
|
12136
|
-
var wrapper = onlyLazy ? value : new LazyWrapper(this),
|
12137
|
-
result = func.apply(wrapper, args);
|
12138
12242
|
|
12139
|
-
|
12140
|
-
|
12141
|
-
|
12243
|
+
var action = { 'func': thru, 'args': [interceptor], 'thisArg': undefined },
|
12244
|
+
onlyLazy = isLazy && !isHybrid;
|
12245
|
+
|
12246
|
+
if (retUnwrapped && !chainAll) {
|
12247
|
+
if (onlyLazy) {
|
12248
|
+
value = value.clone();
|
12249
|
+
value.__actions__.push(action);
|
12250
|
+
return func.call(value);
|
12142
12251
|
}
|
12252
|
+
return lodashFunc.call(undefined, this.value())[0];
|
12253
|
+
}
|
12254
|
+
if (!retUnwrapped && useLazy) {
|
12255
|
+
value = onlyLazy ? value : new LazyWrapper(this);
|
12256
|
+
var result = func.apply(value, args);
|
12257
|
+
result.__actions__.push(action);
|
12143
12258
|
return new LodashWrapper(result, chainAll);
|
12144
12259
|
}
|
12145
12260
|
return this.thru(interceptor);
|
@@ -12147,7 +12262,7 @@
|
|
12147
12262
|
});
|
12148
12263
|
|
12149
12264
|
// Add `Array` and `String` methods to `lodash.prototype`.
|
12150
|
-
arrayEach(['
|
12265
|
+
arrayEach(['join', 'pop', 'push', 'replace', 'shift', 'sort', 'splice', 'split', 'unshift'], function(methodName) {
|
12151
12266
|
var func = (/^(?:replace|split)$/.test(methodName) ? stringProto : arrayProto)[methodName],
|
12152
12267
|
chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
|
12153
12268
|
retUnwrapped = /^(?:join|pop|replace|shift)$/.test(methodName);
|
@@ -12174,7 +12289,7 @@
|
|
12174
12289
|
}
|
12175
12290
|
});
|
12176
12291
|
|
12177
|
-
realNames[createHybridWrapper(
|
12292
|
+
realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{ 'name': 'wrapper', 'func': undefined }];
|
12178
12293
|
|
12179
12294
|
// Add functions to the lazy wrapper.
|
12180
12295
|
LazyWrapper.prototype.clone = lazyClone;
|
@@ -12184,6 +12299,7 @@
|
|
12184
12299
|
// Add chaining functions to the `lodash` wrapper.
|
12185
12300
|
lodash.prototype.chain = wrapperChain;
|
12186
12301
|
lodash.prototype.commit = wrapperCommit;
|
12302
|
+
lodash.prototype.concat = wrapperConcat;
|
12187
12303
|
lodash.prototype.plant = wrapperPlant;
|
12188
12304
|
lodash.prototype.reverse = wrapperReverse;
|
12189
12305
|
lodash.prototype.toString = wrapperToString;
|