Compare commits

...

496 Commits

Author SHA1 Message Date
John-David Dalton
40ac55acb6 Bump to v4.13.1. 2016-05-23 08:58:01 -07:00
John-David Dalton
42c639d252 Rebuild lodash and docs. 2016-05-23 08:57:55 -07:00
John-David Dalton
d110b64ee4 Ensure _.find and _.findLast pass the correct key param to predicate. [closes #2367] 2016-05-23 08:47:43 -07:00
John-David Dalton
a2617d810c Add failing tests for #2367. 2016-05-23 08:47:24 -07:00
John-David Dalton
90d07bc04c Simplify isMaskable assignment. 2016-05-22 22:11:15 -07:00
John-David Dalton
013d9db86f Bump to v4.13.0. 2016-05-22 19:30:21 -07:00
John-David Dalton
9d4d725bc7 Rebuild lodash and docs. 2016-05-22 19:30:13 -07:00
John-David Dalton
9881cc9e10 Add fp.unionBy, fp.unionWith, fp.uniqWith, fp.xorBy, and fp.xorWith tests. 2016-05-22 19:28:32 -07:00
John-David Dalton
01474fed0b Add fp.intersectionBy and fp.intersectionWith tests. 2016-05-22 19:06:32 -07:00
John-David Dalton
024e6d8ae8 Add fp.differenceBy and fp.differenceWith tests. 2016-05-22 19:05:54 -07:00
John-David Dalton
607ba653f7 Update doc examples and tests for _.difference, _.intersection, _.union, _.uniq, and _.xor methods. 2016-05-22 19:04:32 -07:00
John-David Dalton
9090c1904f Add _.property shorthand note to _.countBy docs. [ci skip] 2016-05-22 19:04:31 -07:00
John-David Dalton
158b762367 Split up "mutation" and "with" method tests. 2016-05-22 01:08:26 -07:00
John-David Dalton
e8b3b2dc31 Use isEven in _.remove test. 2016-05-22 01:08:26 -07:00
John-David Dalton
5d72eec742 Reorg find tests. 2016-05-22 01:08:26 -07:00
John-David Dalton
6fe020c920 Add fp.findFrom and fp.findLastFrom tests. 2016-05-22 01:08:26 -07:00
John-David Dalton
40c5a6af49 Remove without from skipRearg mapping. [closes #2365] 2016-05-21 14:26:54 -07:00
John-David Dalton
803dce242b Update sortedIndex method doc examples. [ci skip] 2016-05-21 11:57:02 -07:00
John-David Dalton
4ed722ccd8 Prefer array use for doc examples of params that accept arrays. [ci skip] 2016-05-21 11:57:02 -07:00
John-David Dalton
f35d479d5e Update jquery to 2.2.4 and webpack to 1.13.1. 2016-05-20 21:52:55 -07:00
John-David Dalton
f3af61de97 Use stubs in mask functions. 2016-05-20 21:32:03 -07:00
John-David Dalton
077fb89083 Simplify getNative. 2016-05-20 21:32:03 -07:00
John-David Dalton
d4d4390846 Use _.stubFalse in _.isBuffer. 2016-05-20 21:32:03 -07:00
John-David Dalton
33e54546fe Make stub functions hoistable. 2016-05-20 21:31:58 -07:00
John-David Dalton
bf008e0680 Add fp methodRearg mappings for set "with" and "by" methods. [closes #2359] 2016-05-20 10:36:18 -07:00
John-David Dalton
08694bd709 Fix markdown-doctest run. 2016-05-20 09:00:45 -07:00
John-David Dalton
91242440fc Should not ignore empty brackes and dots. 2016-05-20 08:42:03 -07:00
John-David Dalton
68ae6fc212 Ensure round methods don't return NaN for large precision values. 2016-05-20 08:15:24 -07:00
John-David Dalton
14a16c2a7a Remove unnecessary doctrine fixes. 2016-05-19 22:18:51 -07:00
John-David Dalton
9cbb50d3a6 Remove unnecessary defineProperty guards. 2016-05-19 21:36:29 -07:00
John-David Dalton
47635b9978 Assign setTimeout to itself to avoid leak detection. 2016-05-19 21:35:44 -07:00
John-David Dalton
f90c3f2483 Ensure _.pullAll works with the same value for array and values. [closes #2356] 2016-05-19 19:47:20 -07:00
John-David Dalton
5a67ecc142 Use setProperty to mock setTimeout to avoid global leak fails in older browsers. 2016-05-19 16:15:53 -07:00
John-David Dalton
a542f8ab54 Remove clearTimeout use. 2016-05-19 13:52:18 -07:00
John-David Dalton
f32349db7d Skip setTimout mock test in PhantomJS. 2016-05-19 13:39:36 -07:00
John-David Dalton
32f5db3f72 Fix failing _.delay test. 2016-05-19 13:39:36 -07:00
John-David Dalton
670e3983b4 Cleanup _.delay and _.defer tests. 2016-05-19 13:39:35 -07:00
John-David Dalton
e1cc4d8552 Add mock Date.now and setTimeout tests. 2016-05-19 13:39:31 -07:00
John-David Dalton
8422bb37b0 Group clearTimeout and setTimeout. 2016-05-19 08:28:49 -07:00
Arend van Beelen jr
ebf9b64062 Little doc correction for _.endsWith(). (#2355) 2016-05-19 08:01:17 -07:00
John-David Dalton
56b397b506 Simplify _.conforms doc example. [ci skip] 2016-05-18 17:40:12 -07:00
John-David Dalton
de6cc79ac8 Shorten _.defer doc comment. [ci skip] 2016-05-18 17:39:37 -07:00
John-David Dalton
d28395fdb9 Replace toPairs with keys in getMatchData. 2016-05-18 14:51:54 -07:00
John-David Dalton
84b8ee7bda Allow clearTimeout, setTimeout, and Date.now to be mocked. 2016-05-18 13:50:07 -07:00
John-David Dalton
b56c732332 Cleanup fp.findFrom and fp.indexOfFrom tests. 2016-05-18 00:31:25 -07:00
John-David Dalton
041c1b4586 Simplify find tests expected. 2016-05-17 23:23:53 -07:00
John-David Dalton
0edc480d17 Increment package version to enable ci tests. 2016-05-17 13:14:20 -07:00
John-David Dalton
1a3bcb4ebd Add _.findLast tests for fromIndex values. 2016-05-17 00:52:38 -07:00
John-David Dalton
7d8c2a84b7 Cleanup up from fromIndex and length test labels. 2016-05-17 00:52:25 -07:00
John-David Dalton
4faac431c4 Make _.debounce and _.throttle tests align on dummy args. 2016-05-16 18:34:10 -07:00
John-David Dalton
df9ded3282 Fix _.throttle test for system time of 0. 2016-05-16 18:33:36 -07:00
John-David Dalton
1fe8d1679e Add nullish guards to private methods used by lodash-webpack-plugin. 2016-05-16 18:31:33 -07:00
John-David Dalton
708505f2b1 Minor doc note fixes. [ci skip] 2016-05-16 18:31:02 -07:00
John-David Dalton
b2da5ee1a7 Add backticks to error message. [ci skip] 2016-05-16 18:30:12 -07:00
John-David Dalton
315e751f43 Add _.isNative doc note. [ci skip] 2016-05-16 18:29:30 -07:00
John-David Dalton
dc5544223f Use new operator when throwing an error for consistency. 2016-05-16 15:56:03 -07:00
John-David Dalton
c14728d31a More test cleanup. 2016-05-16 13:35:05 -07:00
John-David Dalton
7d4b154866 Use consistent results var name in debounce & throttle tests. 2016-05-16 10:47:27 -07:00
John-David Dalton
b69647a0c3 Add isModularize check for _.throttle test for system time of 0. 2016-05-16 10:37:00 -07:00
John-David Dalton
d054442e2c Cleanup date mocks. 2016-05-16 10:31:20 -07:00
John-David Dalton
e50bf1fb44 Add _.throttle test for a system time of 0. 2016-05-16 08:38:20 -07:00
John-David Dalton
d40b6a75da Test label cleanup for find methods. 2016-05-16 08:17:15 -07:00
John-David Dalton
e124e7fb5f Init lastCallTime as undefined to avoid issues when the sytem time is 0. [closes #2342] 2016-05-16 01:00:26 -07:00
John-David Dalton
7c3a163f9c Add back _.includes test for strings with a fromIndex. 2016-05-15 22:29:32 -07:00
John-David Dalton
03af0791aa Remove dead code from tests. 2016-05-15 21:46:33 -07:00
John-David Dalton
464885a539 Add getValue helper. 2016-05-15 20:57:10 -07:00
John-David Dalton
346579ac7a Add interopRequire test helper. 2016-05-15 15:48:52 -07:00
John-David Dalton
76ed206e9b Make _.isNative throw if core-js is detected. 2016-05-15 15:48:47 -07:00
John-David Dalton
06e7c963ef Combine _.find and _.includes tests for fromIndex. 2016-05-14 23:16:38 -07:00
John-David Dalton
573d902026 Simplify umd and exports. 2016-05-14 13:11:58 -07:00
John-David Dalton
66cdfe5896 Update markdown-doctest to 0.6.0. 2016-05-13 20:04:36 -07:00
John-David Dalton
9afd4659c7 Add fake source key detection. 2016-05-13 20:03:13 -07:00
John-David Dalton
7249217600 Add "findFrom" methods to fp dep mappings. 2016-05-12 22:44:26 -07:00
John-David Dalton
2f20c672e0 Update _.times doc example to not duplicate _.stubTrue. [ci skip] 2016-05-12 16:29:16 -07:00
John-David Dalton
6d02a64c47 Add fromIndex param to _.find and _.findLast. 2016-05-12 16:19:35 -07:00
Jeroen Engels
3d078383cb Add findIndexFrom, findLastIndexFrom, indexOfFrom, & lastIndexOfFrom in FP. 2016-05-12 15:08:05 -07:00
John-David Dalton
64e765bf7a Fix _.stubFalse doc example typo. [ci skip] 2016-05-12 13:57:14 -07:00
John-David Dalton
b5b6125730 Minor space nit. [ci skip] 2016-05-12 13:54:56 -07:00
John-David Dalton
e45984f6b8 Add npm prepublish hook. 2016-05-12 07:59:42 -07:00
John-David Dalton
a95cf1c26c Rename mock to stub. 2016-05-12 07:53:34 -07:00
Greenkeeper
4a19913726 Update markdown-doctest to 0.5.0. 2016-05-12 06:37:23 -07:00
John-David Dalton
52ae769bfa Add default accumulator note to _.transform docs. [ci skip] 2016-05-11 22:11:08 -07:00
John-David Dalton
44d7c3887d Rename test helper prop to resolve. 2016-05-11 00:28:36 -07:00
John-David Dalton
315271996c Cleanup _.constant tests. 2016-05-11 00:28:36 -07:00
John-David Dalton
2357704540 Add _.mockArray, _.mockFalse, _.mockObject, _.mockString, and _.mockTrue. 2016-05-11 00:28:31 -07:00
John-David Dalton
262049f737 Remove extraneous _.toPath examples. [ci skip] 2016-05-10 23:33:27 -07:00
John-David Dalton
04d6e351a6 Add fromIndex param to _.findIndex and _.findLastIndex. 2016-05-10 23:33:21 -07:00
Greenkeeper
9fa86ec712 Update ecstatic to 1.4.1. 2016-05-10 19:09:47 -07:00
John-David Dalton
901e3dcff2 Flip "n" and "index" in _.nth and _.nthArg docs. [ci skip] 2016-05-08 16:50:38 -07:00
John-David Dalton
43fffe3200 Bump to v4.12.0. 2016-05-07 22:02:47 -07:00
John-David Dalton
1123e13072 Rebuild lodash and docs. 2016-05-07 22:02:40 -07:00
John-David Dalton
996636d25b Update lodash dep. 2016-05-07 19:31:52 -07:00
John-David Dalton
8864095bab Update firefox version in sauce. 2016-05-07 19:31:52 -07:00
John-David Dalton
def9f5d84a Fix doc typo for _.toPairsIn. [closes #2314] 2016-05-07 10:07:10 -07:00
John-David Dalton
47d024ae7b Use "index" instead of "nth". [closes #2313] [ci skip] 2016-05-07 06:55:24 -07:00
John-David Dalton
05135ca171 Update chrome version in sauce. 2016-05-06 22:58:22 -07:00
John-David Dalton
ca1f22a7c6 Ensure trailing function sources aren't skipping for _.assign, _.assignIn, _.defaults, & _.merge. [closes #2311] 2016-05-06 21:24:57 -07:00
John-David Dalton
9a461a5e48 Add _.toFinite. 2016-05-04 21:09:28 -07:00
John-David Dalton
73e7bab839 Add tooling section. [ci skip] 2016-05-04 17:17:14 -07:00
John-David Dalton
572060aedc Update fp description. [ci skip] 2016-05-04 17:17:01 -07:00
John-David Dalton
f1b63d41f8 Fix test fails for npm package builds. 2016-05-02 21:34:19 -07:00
John-David Dalton
9ee423edcf Add _.toPairs test for sets. 2016-05-02 21:04:00 -07:00
John-David Dalton
70c8651182 Use consistent b values. 2016-05-02 21:03:13 -07:00
John-David Dalton
2b54f23dad Add more stack tests. 2016-05-02 20:17:41 -07:00
John-David Dalton
67ef2bb008 Cleanup customizer test labels. 2016-05-02 20:17:13 -07:00
John-David Dalton
f2b5e58500 Minor hyphen nit. 2016-05-02 19:42:33 -07:00
John-David Dalton
b8fa0d9b29 Add large stack test to other cache tests. 2016-05-02 19:42:23 -07:00
John-David Dalton
264d68dec9 Add support for sets to _.toPairs methods. 2016-05-02 16:53:17 -07:00
John-David Dalton
71f5264ee1 Cleanup returns tags. [ci skip] 2016-05-02 16:51:59 -07:00
John-David Dalton
ce8a1feb94 Avoid paving modified lodash for coverage runs in travis. 2016-05-02 13:31:03 -07:00
John-David Dalton
05c32044e9 Remove extraneous isArrayLikeObject check from isFlattenable. 2016-05-02 13:08:51 -07:00
John-David Dalton
44927be6e2 Drop version from license header. [ci skip] 2016-05-02 10:52:53 -07:00
John-David Dalton
d1779d6cdd Fix phantomjs test fails. 2016-05-02 10:01:17 -07:00
John-David Dalton
a13d640bcc Test internal caches instead of cache modules. 2016-05-02 08:51:44 -07:00
John-David Dalton
c7d4106f66 Add private tags back to map methods. [ci skip] 2016-05-02 07:15:32 -07:00
John-David Dalton
2e59faad8f Fix module paths. 2016-05-02 00:34:58 -07:00
John-David Dalton
6d70b64b2e Ensure module tests ran for coverage. 2016-05-02 00:00:19 -07:00
John-David Dalton
767f9c6bce Simplify module assignment. 2016-05-01 23:37:13 -07:00
John-David Dalton
edd7c2f0b1 Cleanup travis tests. 2016-05-01 23:24:30 -07:00
John-David Dalton
b9cfd31bd5 Add modular build to coverage tests. 2016-05-01 21:00:58 -07:00
John-David Dalton
6883f99141 Add tests for map caches. 2016-05-01 19:12:03 -07:00
John-David Dalton
c2aee218d2 Add promise case to code removal for coverage run. 2016-05-01 19:11:49 -07:00
Greenkeeper
8e44d73705 Update markdown-doctest to 0.4.0. 2016-05-01 19:10:44 -07:00
Anders D. Johnson
9e30cc4542 Fix docs typo space after sentence in _.merge. 2016-05-01 19:09:18 -07:00
John-David Dalton
963e2c23b0 Upgrade to qunit-extras 2.0. 2016-04-30 11:59:06 -07:00
Jeroen Engels
7ee4bf8d02 Remove duplicate method from FP mapping. 2016-04-30 10:43:42 -07:00
John-David Dalton
c3c6bc9666 Cleanup markdown-doctest-setup. 2016-04-29 11:57:41 -07:00
Nick Johnstone
ef1024bb60 Test documentation with markdown-doctest. 2016-04-29 10:32:43 -07:00
John-David Dalton
6c6e1c2be3 Use array and iteratee. [ci skip] 2016-04-28 22:08:28 -07:00
John-David Dalton
e9a08ba9a9 Use https for Alex's blog. [ci skip] 2016-04-28 21:30:22 -07:00
John-David Dalton
59546b9989 Update conduct link in contributing text. [ci skip] 2016-04-28 21:26:46 -07:00
John-David Dalton
816edcce2e Rename getPlaceholder to getHolder. 2016-04-28 14:55:25 -07:00
Greenkeeper
8accfb3372 Update fs-extra to 0.30.0. 2016-04-28 10:56:16 -07:00
John-David Dalton
da146a9afd Add map doc note to _.toPairs and _.toPairsIn. [ci skip] 2016-04-28 10:56:15 -07:00
John-David Dalton
cbcd5ffdc4 Add node_js v6 to travis. 2016-04-27 08:04:33 -07:00
Clinton Montague
6f600ebeac Add _.flip bitmask value to createWrapper documentation. [ci skip] 2016-04-26 16:58:50 -07:00
John-David Dalton
9aa456f26f Use lodashStable.toArray in more places. 2016-04-25 00:04:33 -07:00
John-David Dalton
dc77d7605d Add _.toArray tests for maps. 2016-04-24 23:56:22 -07:00
John-David Dalton
f7c4410f41 Add support for converting maps to _.toPairs and _.toPairsIn. 2016-04-24 23:56:00 -07:00
John-David Dalton
9fa0ec00b8 Remove unneeded var assignment. 2016-04-23 11:43:15 -07:00
John-David Dalton
0125ff7303 Cleanup fp test labels and args tests. 2016-04-23 11:31:14 -07:00
John-David Dalton
fbc91cf7ae Add iteratee arity hints to forEach methods. [closes #2277] 2016-04-23 11:29:52 -07:00
John-David Dalton
43c26b5d6f Ensure matches methods match arrays with duplicate values. [closes #2270] 2016-04-22 23:02:54 -07:00
John-David Dalton
4e38f70e0e Update cache implementations. 2016-04-22 23:02:46 -07:00
John-David Dalton
e2c86dac63 Ensure fp.update does not convert end of path to an object. [closes #2271] 2016-04-22 08:46:35 -07:00
John-David Dalton
aebc0650f8 Simplify _.concat. 2016-04-22 08:32:19 -07:00
John-David Dalton
44cf971405 Bump to v4.11.2. 2016-04-21 08:29:44 -07:00
John-David Dalton
c0d7418054 Rebuild lodash and docs. 2016-04-21 08:29:44 -07:00
John-David Dalton
a0db54b53f Add tests for _.sortedIndex with nulls and symbols. 2016-04-21 08:29:44 -07:00
John-David Dalton
32b813e42b Ensure sortedIndex methods align with sortBy for symbols. 2016-04-21 06:56:07 -07:00
John-David Dalton
3c144b8601 Ensure _.sortBy moves symbols to the end. 2016-04-21 01:01:00 -07:00
John-David Dalton
076e4e6db5 Add math operator method tests for objects. 2016-04-21 01:00:59 -07:00
John-David Dalton
2ea08ccd36 Add math operator method tests for symbols. 2016-04-21 00:44:56 -07:00
John-David Dalton
fc48518f2b Move toKey from baseProperty to property. 2016-04-20 18:12:16 -07:00
John-David Dalton
594c3b3406 Update @see tags. [ci skip] 2016-04-20 17:25:04 -07:00
John-David Dalton
38edd713e4 Ensure punctuation is not treated as words. [closes #2268] 2016-04-20 16:23:46 -07:00
John-David Dalton
6987d70dc2 Only avoid converting -0 to 0 if comparator is provided. 2016-04-20 16:05:21 -07:00
John-David Dalton
0e4b307585 Update full build kb. [ci skip] 2016-04-20 07:49:45 -07:00
John-David Dalton
c81bbe95c6 Use an anchor title. [ci skip] 2016-04-20 07:49:44 -07:00
John-David Dalton
b21a87b50f Fix createSet feature test for Safari 8. 2016-04-20 07:49:44 -07:00
John-David Dalton
e3566eb1ce Use Set only if it coerces -0 correctly. 2016-04-20 01:24:00 -07:00
John-David Dalton
0429434dbb Ensure -0 is treated as 0. 2016-04-20 00:51:25 -07:00
John-David Dalton
80f35ee713 Add _.uniq tests for -0. 2016-04-20 00:25:31 -07:00
John-David Dalton
224595c837 Move links to the top of the readme. 2016-04-19 23:59:20 -07:00
John-David Dalton
61ace9a24b Remove code of conduct doc. 2016-04-19 23:59:14 -07:00
John-David Dalton
8c630ede7e Cleanup package.json. 2016-04-19 23:07:06 -07:00
John-David Dalton
ca3b583695 Add wrapped values tests. 2016-04-19 17:42:46 -07:00
John-David Dalton
c2cbb06d57 Add _.difference and _.intersection tests for -0. 2016-04-19 16:57:41 -07:00
John-David Dalton
f6bf8d2e6d Cleanup -0 tests. 2016-04-19 12:38:00 -07:00
John-David Dalton
60c89b2754 Add _.invoke test for -0 key. 2016-04-19 12:37:47 -07:00
John-David Dalton
b72fba911d Cleanup wrapper resets and add assert for returning function object values. 2016-04-19 11:26:55 -07:00
John-David Dalton
3930c388e4 Fix Safari 9.0 flaky test fail. 2016-04-19 10:23:03 -07:00
John-David Dalton
ddf5ef0839 Add even more -0 tests. 2016-04-19 08:24:33 -07:00
John-David Dalton
c66947405b Add omit and pick tests for -0 keys. 2016-04-19 00:24:09 -07:00
John-David Dalton
ad27b62343 Add tests for -0 keys. 2016-04-19 00:23:16 -07:00
John-David Dalton
5283b0f407 Use _.startCase. 2016-04-18 22:30:24 -07:00
John-David Dalton
af41f9267a Add test for combining enclosing circle backslash. 2016-04-18 22:03:56 -07:00
John-David Dalton
6e8c984250 Use toKey in more functions. 2016-04-18 21:33:32 -07:00
John-David Dalton
c2e018b2ac Avoid rate limiting by Sauce. 2016-04-18 21:23:09 -07:00
John-David Dalton
a47ce3cf13 Simplify building lodash. 2016-04-18 20:56:58 -07:00
John-David Dalton
ba58f35f37 Add arguments object test for values methods. 2016-04-18 17:48:26 -07:00
Greenkeeper
30fd1693ee Update fs-extra to 0.28.0. 2016-04-18 08:30:33 -07:00
John-David Dalton
161c17ce7f Consolidate returns in trim methods. 2016-04-17 21:55:43 -07:00
John-David Dalton
27dfe542bd Use baseToString in _.truncate. 2016-04-17 07:18:39 -07:00
John-David Dalton
353113f17f Start to add @see tags. [ci skip] 2016-04-16 21:48:22 -07:00
John-David Dalton
762e858c48 Use isSymbol instead of baseToNumber to fix _.toNumber test fails. 2016-04-16 20:45:10 -07:00
John-David Dalton
db49702046 Remove unsafe_comps uglify option to fix minified builds. 2016-04-16 20:16:38 -07:00
John-David Dalton
7239bf791f Comma nit in _.inRange doc. [ci skip] 2016-04-16 18:16:27 -07:00
John-David Dalton
9cb75cae1d Add jsdocs for baseToNumber and baseToString. 2016-04-16 18:00:31 -07:00
John-David Dalton
fdb4cf1208 Use baseToString in more places and refactor isIndex and isKeyable. 2016-04-16 07:32:06 -07:00
John-David Dalton
714cf7b18c Add baseGt, baseLt, baseToNumber, baseToString, and createRelationalOperation. 2016-04-15 07:17:48 -07:00
John-David Dalton
1a1e0e1a6b Ensure _.pullAt sorts indexes greater than 9 correctly. [closes #2254] 2016-04-15 07:17:48 -07:00
John-David Dalton
f6c14ec31f Add jscs "disallowUnusedVariables" rule. 2016-04-15 07:17:48 -07:00
John-David Dalton
da7f413f6f Update jscs to 3.0.1 and fs-extra to 0.27.0. 2016-04-15 07:17:34 -07:00
John-David Dalton
3cf28953a7 Update code of conduct to point to the jQuery Foundation's policy. [ci skip] 2016-04-14 11:11:08 -07:00
John-David Dalton
080b761f7f Update export doc note. [ci skip] 2016-04-14 08:37:19 -07:00
John-David Dalton
7f6ad484ec Bump to v4.11.1. 2016-04-13 22:09:00 -07:00
John-David Dalton
391a930d49 Rebuild lodash and docs. 2016-04-13 22:09:00 -07:00
John-David Dalton
a532773703 Cleanup debounce and throttle tests. 2016-04-13 22:08:55 -07:00
John-David Dalton
49f8aa4289 Fix failing debounce test. 2016-04-13 18:17:07 -07:00
ben robbins
44b9b085c0 Add test for _.debounce with a wait of 0. 2016-04-13 18:16:50 -07:00
John-David Dalton
a447353977 Add pluck fp alias of map. 2016-04-13 14:22:40 -07:00
John-David Dalton
dea6ccbf43 Bump to v4.11.0. 2016-04-13 09:57:13 -07:00
John-David Dalton
0c4d8836e7 Rebuild lodash and docs. 2016-04-13 09:57:03 -07:00
Jeroen Engels
ef67e07732 Fix doc nits for _.nth. [ci skip] 2016-04-13 09:52:37 -07:00
John-David Dalton
7e885a4ddd Add _.words unit test for contractions. 2016-04-13 08:21:17 -07:00
John-David Dalton
a3c1f42708 Add _.nth and _.nthArg tests. 2016-04-13 01:09:12 -07:00
John-David Dalton
d3ef5a3acb Use noop instead of alwaysUndefined. 2016-04-13 01:09:12 -07:00
John-David Dalton
5098d63a22 Update qunit to 1.23.1. 2016-04-12 22:38:49 -07:00
John-David Dalton
4275a73170 Add support for contractions to case methods. 2016-04-12 21:48:52 -07:00
John-David Dalton
78a157d675 Move _.map test order around. 2016-04-12 21:48:52 -07:00
John-David Dalton
97a437e8e6 Return implicit undefined. 2016-04-12 10:02:24 -07:00
John-David Dalton
3c37f290a8 Add unwrapped chain test for nth. 2016-04-12 09:38:22 -07:00
John-David Dalton
dcd5d470e0 Use baseUnary to avoid passing incorrect arity hints to baseIteratee. 2016-04-12 08:27:41 -07:00
John-David Dalton
b424f3b60f Ensure fp.over doesn't cap its iteratee args. 2016-04-12 08:14:04 -07:00
John-David Dalton
201ea9a9f0 Add shorthand tests for sortBy and over methods. 2016-04-11 22:46:38 -07:00
John-David Dalton
2469af6c3f Add _.nth. 2016-04-11 22:46:33 -07:00
John-David Dalton
bfe6e06b5a Ensure _.sortBy works with the matchesProperty shorthand. 2016-04-11 17:38:03 -07:00
John-David Dalton
091b5fbe30 Make _.head avoid accessing array when its length is 0. 2016-04-11 17:34:49 -07:00
John-David Dalton
93168e6018 Use references to String#replace and String#split. 2016-04-11 17:29:22 -07:00
John-David Dalton
16ed081818 Absorb copyObjectWith into copyObject. 2016-04-11 17:28:19 -07:00
John-David Dalton
c38b4b29cf Avoid unnecessary array cloning in createRecurryWrapper and mergeData. 2016-04-11 17:27:04 -07:00
John-David Dalton
a20b88d114 Bump to v4.10.0. 2016-04-10 22:44:04 -07:00
John-David Dalton
87912a3b3f Rebuild lodash and docs. 2016-04-10 22:42:52 -07:00
John-David Dalton
53bde1238c Replace "invoking" with "and invokes". [ci skip] 2016-04-10 22:40:38 -07:00
John-David Dalton
fd365c27e2 Add doc comments to the minify file util. [ci skip] 2016-04-10 22:40:38 -07:00
John-David Dalton
4f43841699 Add doc comments to the common file util. [ci skip] 2016-04-10 22:40:38 -07:00
John-David Dalton
e60e97c03f Ensure _.debounce queues a trailing call after maxWait. [closes #2229] 2016-04-10 20:50:51 -07:00
Greenkeeper
e619f8ca83 Update webpack to 1.12.15. 2016-04-10 20:02:01 -07:00
John-David Dalton
cf2f538167 Add castSlice and rename cast related helpers. 2016-04-09 13:57:45 -07:00
John-David Dalton
17e1a6dbe8 Ensure _.slice handles a limit of 0 in Node 0.10. 2016-04-09 00:53:07 -07:00
John-David Dalton
74f6af8686 Update fp aliases. 2016-04-08 17:59:18 -07:00
John-David Dalton
351236f526 Rearrange regexp vars. 2016-04-08 16:32:15 -07:00
John-David Dalton
51ad056710 Remove redundant param descriptions. [ci skip] 2016-04-08 15:04:07 -07:00
John-David Dalton
6512b7f925 Update "over" method iteratee descriptions. [ci skip] 2016-04-08 15:03:06 -07:00
John-David Dalton
c7264e3f1f Add isIterateeCall check to _.split. 2016-04-08 11:03:18 -07:00
John-David Dalton
349ec35c48 Add flow test for handling an empty array. 2016-04-08 11:03:18 -07:00
John-David Dalton
057dd5b0a8 Minor escapeRegExp test nit. 2016-04-08 11:03:18 -07:00
John-David Dalton
f6ac7cb1a1 Shorten chars string coersion. 2016-04-08 11:03:18 -07:00
John-David Dalton
c1958daf65 Update handling of limit to the current es6 draft. 2016-04-08 11:03:10 -07:00
John-David Dalton
ee73c9b436 Bump to v4.9.0. 2016-04-08 02:07:13 -07:00
John-David Dalton
fac5e727e6 Rebuild lodash and docs. 2016-04-08 02:07:13 -07:00
John-David Dalton
977264f55b Fix split test fails across enviros. 2016-04-08 02:07:13 -07:00
John-David Dalton
e776e679af Ensure _.split works with emojis. 2016-04-08 01:20:49 -07:00
John-David Dalton
23901dfd45 Update docdown. 2016-04-07 21:43:33 -07:00
John-David Dalton
87444e1a45 Add sumBy tests. 2016-04-07 21:43:33 -07:00
John-David Dalton
dc63bc2bd9 Fix dynamic test labels for groups of methods. 2016-04-07 21:43:33 -07:00
John-David Dalton
f4ff4f29b1 Simplify toSource. 2016-04-07 21:43:32 -07:00
John-David Dalton
06412d5f12 Remove Hash use from Uglify options because it breaks it. 2016-04-07 21:43:32 -07:00
John-David Dalton
bbc84903a7 Update istanbul to 0.4.3. 2016-04-07 21:43:32 -07:00
John-David Dalton
e014592ea0 Fix typo in Hash descripton. [ci skip] 2016-04-07 21:43:32 -07:00
John-David Dalton
4305ffde18 Add commas. [ci skip] 2016-04-07 21:43:32 -07:00
John-David Dalton
0588dcb3e9 Add Hash util and split out file helper. 2016-04-07 21:43:27 -07:00
John-David Dalton
58afd8c364 Update debounce article links. [ci skip] 2016-04-06 14:10:56 -07:00
John-David Dalton
e120d63ee2 Add doc note about group ordering of _.groupBy. [ci skip] [closes #2212] 2016-04-06 07:59:05 -07:00
John-David Dalton
d7f43eba6a Make exceptions to fp argument ordering stand out. [ci skip] 2016-04-05 23:53:05 -07:00
John-David Dalton
786a92669e Update chaining note. [ci skip] 2016-04-05 23:53:05 -07:00
John-David Dalton
504aead673 Add placeholders section. [ci skip] 2016-04-05 23:52:49 -07:00
John-David Dalton
8c72ffc583 Add more fp browser usage examples. [ci skip] 2016-04-05 23:50:18 -07:00
John-David Dalton
27d3311b6a Don't spell out two hundred. [ci skip] 2016-04-05 23:50:18 -07:00
John-David Dalton
5e2f113d50 Update vendor/backbone to v1.3.3. 2016-04-05 23:50:18 -07:00
Greenkeeper
55e7b8764e Update jquery to 2.2.3. 2016-04-05 23:50:18 -07:00
John-David Dalton
513c0ae64d Update list of fp methods with spread arguments. [ci skip] 2016-04-05 23:50:17 -07:00
John-David Dalton
f0f6a1e382 Simplify deep path doc examples. [ci skip] 2016-04-05 08:44:14 -07:00
John-David Dalton
6f3fb587e2 Simplify deep property tests. 2016-04-05 08:39:09 -07:00
John-David Dalton
083c5b703a Add _.matchesProperty test for matching undefined values of nested objects. 2016-04-05 08:23:34 -07:00
John-David Dalton
3583c56067 Replace double quotes with ticks. [ci skip] 2016-04-05 08:08:31 -07:00
John-David Dalton
9999199d2b Enable over methods to accept matchesProperty shorthands. 2016-04-05 08:06:44 -07:00
John-David Dalton
c084e358bd Bump to v4.8.2. 2016-04-04 15:48:17 -07:00
John-David Dalton
238d45a2cb Rebuild lodash and docs. 2016-04-04 15:48:17 -07:00
John-David Dalton
21d056c470 Break code comments up to display better in the wiki. [ci skip] 2016-04-04 15:48:16 -07:00
John-David Dalton
0308d4de62 Remove skipFixed methods from fixed arity listings. [ci skip] 2016-04-04 11:47:52 -07:00
John-David Dalton
f2a6f6ce6a Update lodash dev dep. 2016-04-04 11:47:52 -07:00
John-David Dalton
cf5d6b5bc8 Revert #2193. 2016-04-04 11:47:46 -07:00
John-David Dalton
7a6b64b2f6 Bump to v4.8.1. 2016-04-04 11:43:03 -07:00
John-David Dalton
bca11bd21e Rebuild lodash and docs. 2016-04-04 11:42:50 -07:00
John-David Dalton
bf39a31907 Fix typo in _falseOptions.jst. 2016-04-04 08:51:04 -07:00
John-David Dalton
792bfbb604 Bump to v4.8.0. 2016-04-03 23:47:26 -07:00
John-David Dalton
1ef96896d5 Rebuild lodash and docs. 2016-04-03 23:47:26 -07:00
John-David Dalton
2293de07a7 Add _falseOptions module. 2016-04-03 23:47:26 -07:00
John-David Dalton
804ad3d805 Move private key higher. [ci skip] 2016-04-03 22:44:28 -07:00
John-David Dalton
c797f83ca5 Add fp convert test for unconverted methods. 2016-04-03 21:55:30 -07:00
John-David Dalton
a71ac53fa7 Add jsdoc comments to fp/_baseConvert. [ci skip] 2016-04-03 21:55:30 -07:00
John-David Dalton
7165ef6f5e Minor doc tweak to _.rearg. [ci skip] 2016-04-03 21:55:30 -07:00
John-David Dalton
c01e0cd7d1 Simplify references to partial or provided arguments. [ci skip] 2016-04-03 21:55:30 -07:00
John-David Dalton
a5990a4c4e Use thru instead of through in docs. [ci skip] 2016-04-03 21:55:30 -07:00
John-David Dalton
75d196b01b Allow convert to work on methods that aren't converted by default. 2016-04-03 21:55:08 -07:00
John-David Dalton
69ce7cde7d Convert methods not found in aryMethod mapping. 2016-04-02 22:49:17 -07:00
John-David Dalton
6861734010 Add matchesStrictComparable helper. 2016-04-02 14:49:25 -07:00
John-David Dalton
0f75d967d0 Add convert method to modules that pass thru. 2016-04-02 14:19:19 -07:00
John-David Dalton
012bff97e0 Add fp/placeholder module. 2016-04-02 14:19:13 -07:00
John-David Dalton
2b58525816 Update many es5 spec links to es6. [ci skip] 2016-04-02 10:33:13 -07:00
John-David Dalton
579cf00d10 Update _.isNaN doc note with a reference to Number.isNaN. [ci skip] 2016-04-02 08:02:36 -07:00
John-David Dalton
cfd25cec75 Minor Lodash letter case nit in readme. [ci skip] 2016-04-02 08:01:35 -07:00
John-David Dalton
c267c4e06b Excuse Underscore _.chunk test. 2016-04-01 20:56:19 -07:00
John-David Dalton
c4a78445b3 Add _.isNative test for Promise. 2016-04-01 19:17:52 -07:00
John-David Dalton
4c8836a24a Cleanup _.isNative. 2016-04-01 19:06:36 -07:00
John-David Dalton
972624297b Add variation to falsey _.slice test. 2016-04-01 18:18:37 -07:00
John-David Dalton
ebf9904e8a Add toSource helper. 2016-04-01 18:18:37 -07:00
John-David Dalton
64652c263f Update _.map doc note on guarded methods. [ci skip] 2016-04-01 18:18:37 -07:00
John-David Dalton
58f93567fc Make _.sampleSize default n to 1 instead of 0. 2016-04-01 18:18:37 -07:00
John-David Dalton
f599c4817a Make _.chunk default size to 1 instead of 0. 2016-04-01 18:18:36 -07:00
John-David Dalton
930b034da5 Make _.repeat default n to 1 instead of 0. 2016-04-01 18:18:36 -07:00
John-David Dalton
c21174f7f9 Add bizarro test for _.isEmpty. 2016-04-01 18:18:36 -07:00
John-David Dalton
e22be612e2 Remove dataViewCtorString branch of getTag for coverage tests. 2016-04-01 18:18:36 -07:00
Craig Martin
669bc1520e Run scripts synchronous in foreground. 2016-04-01 18:18:27 -07:00
John-David Dalton
b257bb9c9e Allow over, overEvery, and overSome to accept matchesProperty shorthands. [closes #2193] 2016-04-01 09:14:13 -07:00
John-David Dalton
b8096df6d8 Fix leaked var. 2016-04-01 09:13:54 -07:00
greenkeeperio-bot
43d530ead9 Update dojo to 1.11.1. 2016-04-01 09:10:36 -07:00
John-David Dalton
9dbd665d05 Space nit in _.toNumber. [ci skip] 2016-04-01 09:10:36 -07:00
John-David Dalton
3902fd1a67 Ensure has treats nested sparse arrays consistently. 2016-04-01 09:10:35 -07:00
John-David Dalton
642d248f99 Cleanup deep property tests of has methods. 2016-04-01 09:10:35 -07:00
John-David Dalton
8bd9a4d2c3 Ensure _.has returns false for nullish objects. [closes #2190] 2016-04-01 09:10:24 -07:00
John-David Dalton
e96ee69f1c Remove rogue comment delimiter from fp wiki template. [ci skip] 2016-04-01 09:10:24 -07:00
John-David Dalton
5bb899a700 Add array path examples to _.set and _.unset docs. [ci skip] 2016-04-01 09:10:24 -07:00
John-David Dalton
431e0fa2f6 Add line number to error message in web worker. 2016-04-01 09:10:24 -07:00
John-David Dalton
ec92292c38 Wrap funcToString call in _.isNative in a try-catch. 2016-04-01 09:10:24 -07:00
Oskar Segersvärd
45953b2ac1 Set the jsdoc type of apply's args parameter to Array. [ci skip] 2016-04-01 09:10:24 -07:00
John-David Dalton
d9f93d0895 Increment package version to enable ci tests. 2016-04-01 09:10:24 -07:00
John-David Dalton
252ea445ca Bump to v4.7.0. 2016-03-31 00:51:19 -07:00
John-David Dalton
9826d9bd46 Rebuild lodash and docs. 2016-03-31 00:51:19 -07:00
John-David Dalton
b53f178c46 Sort reargs and aliases in fp wiki template. 2016-03-31 00:51:19 -07:00
John-David Dalton
5ad5eb8f5d Add divide and multiply to lodash doc block. [ci skip] 2016-03-31 00:28:04 -07:00
John-David Dalton
7add87739a Add _.concat test for shallow cloning array. 2016-03-30 23:32:21 -07:00
John-David Dalton
2cd12c38e3 Temporarily remove ghooks. 2016-03-30 21:27:19 -07:00
Jordan Eldredge
ad72b5b565 Simplify _.result. 2016-03-30 19:52:46 -07:00
Craig Martin
608e74a111 Ensure all background jobs finish before continuing. 2016-03-30 19:50:23 -07:00
John-David Dalton
c36d0af5cd Avoid a JIT bug in Safari 9 for baseIteratee. 2016-03-30 19:50:13 -07:00
John-David Dalton
55c3299d5c Use getIteratee in more places. 2016-03-30 12:17:28 -07:00
greenkeeperio-bot
7a3dda6105 Update ghooks to 1.1.1. 2016-03-30 08:43:30 -07:00
John-David Dalton
171d9eab78 Use copyArray in concat. 2016-03-30 08:43:30 -07:00
John-David Dalton
ab9d2056da Add bindKey to fp aryMethod mapping. 2016-03-30 08:43:30 -07:00
John-David Dalton
4310329971 Add bind and bindKey to fp skipRearg mapping. 2016-03-30 08:43:30 -07:00
John-David Dalton
d038315f61 Add link to github reactions. [ci skip] 2016-03-30 00:54:28 -07:00
John-David Dalton
c0f91c9169 Minor newline nits. 2016-03-29 22:51:25 -07:00
John-David Dalton
519a02ff34 Update fred ages in doc examples. [ci skip] 2016-03-29 22:33:43 -07:00
John-David Dalton
643ce1da74 Revert createPadding behavior for chars that coerce to empty strings. 2016-03-29 22:23:00 -07:00
greenkeeperio-bot
4c789197f9 Update chalk to 1.1.3 and opt-cli to 1.4.0. 2016-03-29 22:22:12 -07:00
John-David Dalton
277c9bdc7c Make shouldInvoke explicitly return true if it's the first call. 2016-03-29 09:53:35 -07:00
John-David Dalton
455eace9c5 Cleanup _.debounce tests. 2016-03-29 00:28:43 -07:00
John-David Dalton
f263a87983 Update excused Underscore tests. 2016-03-28 22:11:56 -07:00
John-David Dalton
4f92fb7007 Ensure cancel resets lastCallTime and lastInvokeTime. 2016-03-28 21:06:11 -07:00
John-David Dalton
4fd43f7fe7 Minor value consistency nits. 2016-03-28 19:27:55 -07:00
John-David Dalton
3fe2efa311 Ensure _.concat cases wraps nullish array values in an array. 2016-03-28 17:44:13 -07:00
John-David Dalton
a7bf3352df Ensure _.concat casts non-array array values to arrays. 2016-03-28 12:34:09 -07:00
John-David Dalton
2ddd893ca2 Update vendor/underscore. 2016-03-28 09:35:41 -07:00
John-David Dalton
5d92b37550 Add updateWith to lodash sequence doc note. [ci skip] 2016-03-28 09:26:03 -07:00
John-David Dalton
dcec882262 Ensure _.words detects compound words where an all caps word is next to a capitalized word. [closes #2163] 2016-03-28 07:57:37 -07:00
John-David Dalton
de53132692 Add args param doc for _.attempt. [closes #2164] [ci skip] 2016-03-28 07:05:08 -07:00
greenkeeperio-bot
23a7871e2d Update docdown to 0.5.0. 2016-03-27 16:32:20 -07:00
John-David Dalton
792347978a Add shim path back to _.isEmpty. 2016-03-27 13:35:14 -07:00
John-David Dalton
61c740a4eb Move isObjectLike condition up in _.isEmpty. 2016-03-27 13:07:28 -07:00
John-David Dalton
c3a614858b Add support for maps and sets to _.isEmpty. [closes #2159] 2016-03-27 13:04:51 -07:00
John-David Dalton
75727d073b More pad optimizations. 2016-03-27 12:37:09 -07:00
John-David Dalton
b1d7450052 Fix typo in pad test label. 2016-03-27 12:31:14 -07:00
John-David Dalton
60e557b059 Reduce lines creeping over 80 characters in length. 2016-03-27 11:43:44 -07:00
John-David Dalton
071e13363c Add "Array" to predicate types. [ci skip] [closes #2157] 2016-03-27 09:59:48 -07:00
John-David Dalton
acf4651c0e Minor newline nit. [ci skip] 2016-03-27 09:59:37 -07:00
John-David Dalton
9b15dc2017 Fix fail in PhantomJS. 2016-03-27 01:23:58 -07:00
John-David Dalton
f4f0791e0c Fix fail in Node 0.10. 2016-03-27 01:23:58 -07:00
John-David Dalton
654976c826 Add DataView support to getTag. 2016-03-27 01:23:58 -07:00
John-David Dalton
50e86c70bd Add other realm tests for comparing array views with _.isEqual. 2016-03-27 01:23:58 -07:00
Dan Levy
d135b846db Adding support for cloning and comparing DataView. 2016-03-27 01:23:58 -07:00
John-David Dalton
ee2153364d Add bizarro Promise test. 2016-03-27 01:23:58 -07:00
John-David Dalton
6d76cdc1b7 Update snippet removals for coverage runs. 2016-03-27 01:23:52 -07:00
John-David Dalton
259bdb6151 Add realm tests for maps, promises, and sets. 2016-03-26 14:09:36 -07:00
John-David Dalton
12438fa0d7 Ensure _.isEqual compares promises by reference. 2016-03-26 13:59:53 -07:00
John-David Dalton
654df6f7f8 Optimize createPadding for the common case. 2016-03-26 13:21:54 -07:00
John-David Dalton
0dfe176fe6 Make pad methods default to a chars of " " if chars is an empty string. 2016-03-26 12:14:02 -07:00
John-David Dalton
0f3338013e Update sauce browsers. 2016-03-25 19:03:47 -07:00
John-David Dalton
dcc239b070 Add falsey iteratee tests. 2016-03-25 16:36:47 -07:00
John-David Dalton
613488eaf8 Use in instead of relying on behavior. 2016-03-25 15:50:49 -07:00
John-David Dalton
97193b9680 Update vendor/backbone. 2016-03-25 14:14:52 -07:00
greenkeeperio-bot
71c0861675 Update opt-cli to 1.3.0, coveralls to 2.11.9, & qunitjs to 1.23.0. 2016-03-25 14:13:42 -07:00
John-David Dalton
f3b35919ef Add baseMean helper. 2016-03-25 14:13:42 -07:00
Tucker Whitehouse
06316f1d47 Add _.meanBy. 2016-03-24 21:41:41 -07:00
Federico De Giuli
271f64ee3f Make _.isEmpty work as expected on buffers. 2016-03-24 21:41:41 -07:00
Kent C. Dodds
583b03ba5f Add git hook instructions to CONTRIBUTING.md. [ci skip] 2016-03-24 21:41:35 -07:00
John-David Dalton
16e2c06ab4 Remove dead code from baseClone. 2016-03-24 10:54:23 -07:00
John-David Dalton
016de80ce7 Add debounce/throttle test for calling cancel and flush without anything queued. 2016-03-24 10:54:23 -07:00
John-David Dalton
577226bbd0 Add number object tests to number coercion methods. 2016-03-24 10:54:23 -07:00
John-David Dalton
1670800df3 Add test for crawling functions with _.result. 2016-03-24 10:54:23 -07:00
Kent C. Dodds
9674d67693 add opt-in githook to config 2016-03-23 10:18:57 -06:00
John-David Dalton
f65d36b3c1 Make _.result resolve values of functions as it deep crawls over them. 2016-03-23 00:44:36 -07:00
John-David Dalton
8d93455076 Add more options docs. [ci skip] 2016-03-22 22:26:34 -07:00
John-David Dalton
cfe5ea264d Remove parens from default options value doc of _.truncate. [ci skip] 2016-03-22 08:44:23 -07:00
John-David Dalton
9a4e11f6f7 Add chars param fix to postprocess. [ci skip] 2016-03-21 22:11:40 -07:00
John-David Dalton
24cef1a919 Add other realm maps/sets tests for _.size. 2016-03-21 21:00:29 -07:00
John-David Dalton
5fe373f7aa Add support for deep cloning maps and sets. 2016-03-21 21:00:19 -07:00
John-David Dalton
25eb4df563 Add support for maps and sets to _.size. 2016-03-21 20:16:15 -07:00
John-David Dalton
6d587bdf34 Add -0 test for math operator methods. 2016-03-21 20:04:46 -07:00
John-David Dalton
03dd9df78e Remove unneeded assert in indexOf test. 2016-03-21 08:46:23 -07:00
greenkeeperio-bot
96c60bab46 Update dojo to 1.11.0. 2016-03-21 00:44:32 -07:00
John-David Dalton
811341efa1 Add code examples to fp wiki. [ci skip] 2016-03-20 14:18:24 -07:00
John-David Dalton
5f94723d7f Add always fp alias. 2016-03-20 11:53:38 -07:00
John-David Dalton
9d1536799b Add complement fp alias. 2016-03-20 11:43:32 -07:00
John-David Dalton
85057d588c Move "Chaining" section lower. [ci skip] 2016-03-20 11:40:34 -07:00
John-David Dalton
234e693d92 Flip priority of "object" and "collection" in _.isEmpty doc description. [ci skip] 2016-03-20 11:29:22 -07:00
John-David Dalton
51833b91d0 Add invertObj and juxt fp aliases. 2016-03-20 11:23:12 -07:00
John-David Dalton
dfb7a4c078 Don't make without an alias so it can be reverted with convert. 2016-03-20 11:16:18 -07:00
John-David Dalton
04ddaf49f5 Organize aliases. 2016-03-20 11:13:24 -07:00
John-David Dalton
b7a6560d90 Add identical fp alias. 2016-03-20 11:13:06 -07:00
John-David Dalton
7d8531d6ed Add _.divide and _.multiply tests. 2016-03-20 11:03:29 -07:00
John-David Dalton
ab77d9d83a Add more math operation method tests. 2016-03-20 10:16:03 -07:00
John-David Dalton
37454b8f42 Add eq and isEqual to fp skipRearg mapping. 2016-03-20 10:02:46 -07:00
John-David Dalton
ef95f165ff Fix npm build tests. 2016-03-20 01:10:23 -07:00
John-David Dalton
6494a072d2 Fix test fails in Safari. 2016-03-20 01:02:53 -07:00
John-David Dalton
984bcc556e Add fp.isMatchWith test. 2016-03-20 00:26:58 -07:00
John-David Dalton
be77e7366c Remove "with" methods from iterateeAry mapping. 2016-03-19 23:43:11 -07:00
John-David Dalton
01d961bad8 Ensure fp.isEqualWith rearg is (c,a,b). [closes #2131] 2016-03-19 23:40:14 -07:00
John-David Dalton
6eb0cb1565 Add _.divide and _.multiply. 2016-03-19 23:01:40 -07:00
John-David Dalton
b2bff1ad45 Ensure array sequence methods don't error for falsey values. 2016-03-19 22:51:32 -07:00
John-David Dalton
6ed9c005d7 Make fp.invokeArgs and fp.invokeArgsMap arg signature (b,c,a). 2016-03-18 08:29:41 -07:00
John-David Dalton
6ef8693bf0 Update case examples. 2016-03-17 21:11:32 -07:00
John-David Dalton
8c5025f935 Move upperFirst definition lower. 2016-03-17 21:11:32 -07:00
John-David Dalton
9735961090 Ensure _.startCase only uppercases the first character of each word. 2016-03-17 21:11:32 -07:00
greenkeeperio-bot
8d7058e6ad Update fs-extra to 0.26.7, jquery to 2.2.2, & requirejs to 2.2.0. 2016-03-17 21:10:36 -07:00
John-David Dalton
4d89d9a1b7 Add fp.convert to "Convert" section. 2016-03-17 21:10:36 -07:00
John-David Dalton
594f414b1a Move the "Convert" section to the bottom. 2016-03-17 21:10:36 -07:00
John-David Dalton
b61d30da1a Make fp.without an alias of fp.difference. [closes #2122] 2016-03-17 21:10:36 -07:00
John-David Dalton
412e19006b Fix fp aliases for all, any, and anyPass. 2016-03-17 21:10:36 -07:00
Jeroen Engels
b8ebceadaf Add missing param for _.reverse. [ci skip] 2016-03-17 21:10:36 -07:00
John-David Dalton
2b4f271899 Add fp.invokeArgsMap. 2016-03-17 21:10:36 -07:00
John-David Dalton
c83857c42a Minor non- nits. [ci skip] 2016-03-15 08:38:55 -07:00
John-David Dalton
b95d1d6123 Ensure _.mergeWith sources are cloned when customizer returns undefiend. [closes #2111] 2016-03-15 08:32:23 -07:00
John-David Dalton
7d1d7d909a Add fp padChars methods. 2016-03-14 22:17:46 -07:00
John-David Dalton
c89a80357c Cleanup fp convert tests. 2016-03-14 22:16:20 -07:00
John-David Dalton
1bbb24fa0c Add fp.convert. 2016-03-14 10:53:40 -07:00
John-David Dalton
dd0aa991ff Add since tag to _.isArray. [ci skip] 2016-03-13 19:59:50 -07:00
John-David Dalton
6f9b1b1822 Simplify _.method example. [ci skip] 2016-03-13 16:35:52 -07:00
John-David Dalton
65fd579ed2 Add fp.invokeArgs. 2016-03-13 16:34:07 -07:00
John-David Dalton
f3279b7ee1 Wrap fp.getOr test in an IIFE. 2016-03-13 15:30:32 -07:00
John-David Dalton
4d185ae7b5 Add fp.restFrom and fp.spreadFrom. 2016-03-13 15:30:01 -07:00
John-David Dalton
81ee5d76b8 Use "sequence" to descript chaining in more places. [ci skip] 2016-03-13 14:49:28 -07:00
John-David Dalton
8bed7137c7 Add chaining note to fp wiki template. [ci skip] 2016-03-13 14:44:58 -07:00
libreninja
f8bcc5b917 Break before unnecessary string concats in _.repeat. 2016-03-13 12:39:05 -07:00
John-David Dalton
81f8518d15 Simplify assocIndexOf description. [ci skip] 2016-03-12 09:01:06 -08:00
John-David Dalton
f88d27ccda Fix param descriptions for assocDelete, mapSet, and stackSet. [ci skip] 2016-03-11 20:00:08 -08:00
John-David Dalton
40ed92d2af More _.debounce cleanup. 2016-03-11 08:04:39 -08:00
John-David Dalton
c7319d004d Add non-function constructor tests for _.isMap, _.isSet, and _.isWeakMap. 2016-03-10 16:33:29 -08:00
John-David Dalton
51a3c5d4e8 Cleanup _.debounce. 2016-03-10 07:59:31 -08:00
John-David Dalton
ecfa002a05 Update Edge testing in Sauce. 2016-03-09 16:55:34 -08:00
John-David Dalton
62962791b3 Rename debounce helper to invokeFunc to fix builds. 2016-03-08 06:58:39 -08:00
Brandon Wallace
864e14cb20 Refactor debounce to simplify, reduce timers, fix bugs. 2016-03-07 22:24:04 -08:00
John-David Dalton
092f90d2fc Cleanup sorting test results. 2016-03-07 08:11:59 -08:00
John-David Dalton
49b33d667d Add toPairs test for inherited string keyed properties. 2016-03-07 08:04:11 -08:00
John-David Dalton
63b097329c Minor curried label nits. [ci skip] 2016-03-07 07:41:18 -08:00
John-David Dalton
2c3ab276ea Add _.entries and _.entriesIn aliases. 2016-03-06 22:56:48 -08:00
John-David Dalton
c30c43d69e Add more since tags. [ci skip] 2016-03-06 22:12:42 -08:00
John-David Dalton
230c18d5d6 Add fp.flatMapDepth test. 2016-03-06 19:13:43 -08:00
John-David Dalton
c16e64cd36 Remove unneeded flatMap lazy chaining tests. 2016-03-06 19:12:47 -08:00
John-David Dalton
64704e16c1 Add _.flatMapDeep and _.flatMapDepth. 2016-03-06 11:15:04 -08:00
greenkeeperio-bot
b41103ee6b Update glob to 7.0.3. 2016-03-05 18:35:22 -08:00
John-David Dalton
8ac1d54858 Add fast path for numbers in _.toNumber. 2016-03-05 16:56:59 -08:00
John-David Dalton
0a9af2968e Add primitives tests. 2016-03-05 16:54:37 -08:00
John-David Dalton
7eba5a2221 Ensure _.toNumber works with symbol objects without a valueOf method. 2016-03-05 16:16:49 -08:00
John-David Dalton
19a8b3886e Flip assignment order for consistency. [ci skip] 2016-03-05 08:43:42 -08:00
John-David Dalton
03716f62e8 Remove runInContext call in convert. 2016-03-05 08:39:00 -08:00
John-David Dalton
d38000bc33 Minor format nit for baseCastPath. [ci skip] 2016-03-05 08:38:34 -08:00
John-David Dalton
a6c88a173b Ensure _.toPath returns a new array. 2016-03-04 18:02:28 -08:00
John-David Dalton
0bad210dec Add tests for number coercion methods. 2016-03-04 18:00:05 -08:00
John-David Dalton
62cc7574fc Remove dead code branch from baseCastPath. 2016-03-04 10:41:09 -08:00
John-David Dalton
f5a134bcbd Remove unused baseForIn. 2016-03-04 10:37:29 -08:00
John-David Dalton
a7bb6b5383 Add getPrototype helper. 2016-03-04 09:17:00 -08:00
John-David Dalton
e02ce1ea8b Ensure _.toPath works with symbols. 2016-03-04 08:09:39 -08:00
John-David Dalton
760a00b82f Make a distinction between property names and identifiers. [ci skip] 2016-03-04 07:51:12 -08:00
John-David Dalton
e6929e801b Add getAllKeysIn helper. 2016-03-04 07:50:40 -08:00
John-David Dalton
8682da4962 Update V8 bug links. [ci skip] 2016-03-04 07:33:32 -08:00
John-David Dalton
8e6f3e48d0 Ensure getOwnPropertySymbols is passed an object to avoid errors in V8. 2016-03-04 07:33:16 -08:00
John-David Dalton
0589dd6909 Ensure _.omit works with symbols. 2016-03-04 02:03:23 -08:00
John-David Dalton
1b8071d2c4 Replace Dojo Foundation references with jQuery Foundation in contributing.md. [ci skip] 2016-03-04 01:24:43 -08:00
John-David Dalton
4debf155d7 Update and add tests for fp convert method. 2016-03-04 00:55:59 -08:00
John-David Dalton
f6df126c43 Cleanup license urls. 2016-03-03 22:58:41 -08:00
Esa-Matti Suuronen
c406e33fcc Add reconvert method to fp functions. 2016-03-03 22:47:30 -08:00
John-David Dalton
9e11ebb62a Ensure _.isPlainObject returns false for objects with a custom [[Prototype]]. [closes #2085] 2016-03-03 22:46:23 -08:00
John-David Dalton
16ed42b188 Add tests for symbol paths. 2016-03-03 22:42:58 -08:00
John-David Dalton
a19890469e Minor format nit. 2016-03-03 22:42:29 -08:00
John-David Dalton
cc1c1c127e Cleanup path test labels. 2016-03-03 22:41:56 -08:00
John-David Dalton
3c1e95a3c2 Cleanup foo references. 2016-03-03 22:41:22 -08:00
John-David Dalton
d4c0777d2c Minor format nits for Foo test functions. 2016-03-03 20:40:20 -08:00
John-David Dalton
8f00000676 Minor format nit of isIterateeCall. 2016-03-03 20:07:10 -08:00
John-David Dalton
4240f737d1 Add symbol support to baseCastPath, isKey, and toNumber. 2016-03-03 20:04:37 -08:00
John-David Dalton
25121a86bb Specify string keyed properties. [closes #2081] [ci skip] 2016-03-03 18:02:47 -08:00
John-David Dalton
e4b3cde0a4 Memoize stringToPath. 2016-03-03 15:58:23 -08:00
Dave Methvin
cf74ebeb71 Update license to the jQuery Foundation. [ci skip] 2016-03-03 12:03:26 -08:00
Jeroen Engels
d682357189 Add @since to the method jsdocs. [ci skip] 2016-03-03 07:47:26 -08:00
John-David Dalton
ddd4c391a1 Add _.updateWith test for a customizer. 2016-03-02 22:25:51 -08:00
greenkeeperio-bot
930ee1d650 Update jscs to 2.11.0. 2016-03-02 14:15:50 -08:00
John-David Dalton
c5344d5336 Ensure _.has returns false for nested inherited properties. [closes #2073] 2016-03-02 07:54:27 -08:00
John-David Dalton
d59c644a10 Use baseGet in parent and _.result. 2016-03-02 07:47:37 -08:00
John-David Dalton
28171945e9 Use smaller objects for _.assign bench. 2016-03-02 07:39:08 -08:00
John-David Dalton
ddf9354d26 Bump to v4.6.1. 2016-03-01 21:55:32 -08:00
John-David Dalton
5f58b65c04 Rebuild lodash and docs. 2016-03-01 21:55:09 -08:00
John-David Dalton
1ec20c5281 Use propertyIsEnumerable var. 2016-03-01 20:33:17 -08:00
John-David Dalton
3421fab58a Update lodash dev dep. 2016-03-01 19:40:05 -08:00
John-David Dalton
deeaf27b54 Avoid cloning symbols internally. 2016-03-01 19:37:44 -08:00
54 changed files with 16370 additions and 9049 deletions

View File

@@ -1,8 +1,8 @@
# Contributing to Lodash
Contributions are always welcome. Before contributing please read the
[code of conduct](https://github.com/lodash/lodash/blob/master/CODE_OF_CONDUCT.md)
& [search the issue tracker](https://github.com/lodash/lodash/issues); your issue
[code of conduct](https://jquery.org/conduct/) &
[search the issue tracker](https://github.com/lodash/lodash/issues); your issue
may have already been discussed or fixed in `master`. To contribute,
[fork](https://help.github.com/articles/fork-a-repo/) Lodash, commit your changes,
& [send a pull request](https://help.github.com/articles/using-pull-requests/).
@@ -11,9 +11,10 @@ may have already been discussed or fixed in `master`. To contribute,
Feature requests should be submitted in the
[issue tracker](https://github.com/lodash/lodash/issues), with a description of
the expected behavior & use case, where theyll remain closed until sufficient
interest, e.g. :+1:s, has been shown by the community. Before submitting a request,
please search for similar ones in the
the expected behavior & use case, where theyll remain closed until sufficient interest,
[e.g. :+1: reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/),
has been shown by the community. Before submitting a request, please search for
similar ones in the
[closed issues](https://github.com/lodash/lodash/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement).
## Pull Requests
@@ -30,12 +31,12 @@ Run unit tests from the command-line via `npm test`, or open `test/index.html` &
## Contributor License Agreement
Lodash is a member of the [Dojo Foundation](http://dojofoundation.org/).
As such, we request that all contributors sign the Dojo Foundation
[contributor license agreement (CLA)](http://dojofoundation.org/about/claForm).
Lodash is a member of the [jQuery Foundation](https://jquery.org/).
As such, we request that all contributors sign the jQuery Foundation
[contributor license agreement (CLA)](https://contribute.jquery.org/CLA/).
For more information about CLAs, please check out Alex Russells excellent post,
[“Why Do I Need to Sign This?”](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
[“Why Do I Need to Sign This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
## Coding Guidelines
@@ -47,7 +48,7 @@ established in the code.
- **Naming**:<br>
Keep variable & method names concise & descriptive.<br>
Variable names `index`, `collection`, & `callback` are preferable to
Variable names `index`, `array`, & `iteratee` are preferable to
`i`, `arr`, & `fn`.
- **Quotes**:<br>
@@ -61,7 +62,17 @@ established in the code.
functions.
Guidelines are enforced using [JSCS](https://www.npmjs.com/package/jscs):
```bash
$ npm run style
```
## Tips
You can opt-in to a pre-push git hook by adding an `.opt-in` file to the root of
the project containing:
```txt
pre-push
```
With that, when you `git push`, the pre-push git hook will trigger and execute
`npm run validate`.

2
.gitignore vendored
View File

@@ -5,3 +5,5 @@
lodash.compat.min.js
coverage
node_modules
.opt-in
.opt-out

View File

@@ -84,6 +84,7 @@
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingWhitespace": true,
"disallowUnusedVariables": true,
"jsDoc": {
"checkRedundantAccess": true,

View File

@@ -0,0 +1,48 @@
'use strict';
delete global['__core-js_shared__'];
var _ = require('./lodash.js');
function mockQuery() {
return {
'on': function(eventName, callback) {
callback();
}
};
}
mockQuery.each = _.each;
module.exports = {
'babel': false,
'globals': {
'_': _,
// Example mocks.
'asyncSave': _.noop,
'addContactToList': _.noop,
'batchLog': _.noop,
'calculateLayout': _.noop,
'createApplication': _.noop,
'data': { 'user': 'mock'},
'mainText': '',
'renewToken': _.noop,
'sendMail': _.noop,
'updatePosition': _.noop,
// DOM mocks.
'document': { 'body': { 'childNodes': [], 'nodeName': 'BODY' } },
'element': {},
'EventSource': _.noop,
'jQuery': mockQuery,
'window': {},
// Node.js mocks.
'Buffer': Buffer,
'fs': { 'writeFileSync': _.noop },
'path': require('path'),
'process': process,
'setImmediate': setImmediate
}
};

View File

@@ -1,7 +1,7 @@
language: node_js
sudo: false
node_js:
- "5"
- "6"
env:
global:
- BIN="node" ISTANBUL=false OPTION=""
@@ -20,6 +20,8 @@ matrix:
env:
- node_js: "4"
env:
- node_js: "5"
env:
git:
depth: 10
branches:
@@ -41,7 +43,7 @@ before_install:
PATTERN[1]="|\s*if\s*\(enumerate\b[\s\S]+?\};\s*\}|"
PATTERN[2]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|"
PATTERN[3]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|"
PATTERN[4]="|\s*if\s*\(ctorString\b[\s\S]+?\}\s*\}|"
PATTERN[4]="|\bcase\s+(?:dataView|promise|set|map|weakMap)CtorString:.+|g"
PATTERN[5]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|"
PATTERN[6]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|"
PATTERN[7]="|\s*define\([\s\S]+?\);|"
@@ -53,18 +55,25 @@ before_install:
node ./test/remove.js "$PTRN" ./lodash.js
done
fi
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli && mkdir $_/node_modules && cd $_ && ln -s ../../../ ./lodash && cd ../ && npm i && cd ../../"
- "node ./node_modules/lodash-cli/bin/lodash -o ./dist/lodash.js"
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli"
- "mkdir -p ./node_modules/lodash-cli/node_modules/lodash && cd $_ && cp ../../../../lodash.js ./lodash.js && cp ../../../../package.json ./package.json"
- "cd ../../ && npm i && cd ../../"
script:
# Detect code coverage.
- "[ $ISTANBUL == false ] || istanbul cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./lodash.js"
- "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/lcov.info | coveralls) || true"
- "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/coverage.json | codecov) || true"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || cd ./test"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.js"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || $BIN $OPTION ./test.js ../dist/lodash.min.js"
- "[ $SAUCE_LABS == false ] || rm -rf ./node_modules/lodash"
- "[ $SAUCE_LABS == false ] || ($BIN ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./node_modules/lodash && node ./node_modules/lodash-cli/bin/lodash -d -o ./node_modules/lodash/lodash.js)"
- "[ $SAUCE_LABS == false ] || $BIN ./node_modules/lodash-cli/bin/lodash core -o ./dist/lodash.core.js"
# Test in Node.js and PhantomJS.
- "[ $ISTANBUL == true ] || node ./node_modules/lodash-cli/bin/lodash -o ./dist/lodash.js"
- "[ $ISTANBUL == true ] || (node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./ && node ./node_modules/lodash-cli/bin/lodash -d -o ./lodash.js)"
- "[ $ISTANBUL == true ] || [ $SAUCE_LABS == true ] || cd ./test"
- "[ $ISTANBUL == true ] || [ $SAUCE_LABS == true ] || $BIN $OPTION ./test.js ../lodash.js"
- "[ $ISTANBUL == true ] || [ $SAUCE_LABS == true ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || $BIN $OPTION ./test.js ../dist/lodash.min.js"
# Test in Sauce Labs.
- "[ $SAUCE_LABS == false ] || node ./node_modules/lodash-cli/bin/lodash core -o ./dist/lodash.core.js"
- "[ $SAUCE_LABS == false ] || npm run build"
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../dist/lodash.js&noglobals=true\" tags=\"development\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../dist/lodash.min.js&noglobals=true\" tags=\"production\""

View File

@@ -1,74 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [coc@lodash.com](mailto:coc@lodash.com).
The project team will review and investigate all complaints, and will respond in
a way that it deems appropriate to the circumstances. The project team is obligated
to maintain confidentiality with regard to the reporter of an incident. Further
details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

60
LICENSE
View File

@@ -1,23 +1,47 @@
The MIT License (MIT)
Copyright jQuery Foundation and other contributors <https://jquery.org/>
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/lodash/lodash
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The following license applies to all parts of this software except as
documented below:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
Copyright and related rights for sample code are waived via CC0. Sample
code is defined as all source code displayed within the prose of the
documentation.
CC0: http://creativecommons.org/publicdomain/zero/1.0/
====
Files located in the node_modules and vendor directories are externally
maintained libraries used by this software which have their own
licenses; we recommend you read them, as their terms may differ from the
terms above.

View File

@@ -1,6 +1,15 @@
# lodash v4.6.0
# lodash v4.13.1
The [lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
[Site](https://lodash.com/) |
[Docs](https://lodash.com/docs) |
[FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide) |
[Contributing](https://github.com/lodash/lodash/blob/4.13.1/.github/CONTRIBUTING.md) |
[Wiki](https://github.com/lodash/lodash/wiki "Changelog, Roadmap, etc.") |
[Code of Conduct](https://jquery.org/conduct/) |
[Twitter](https://twitter.com/bestiejs) |
[Chat](https://gitter.im/lodash/lodash)
The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
```bash
@@ -9,22 +18,13 @@ $ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js
```
## Community
[![Gitter](https://badges.gitter.im/lodash/lodash.svg)](https://gitter.im/lodash/lodash)
## Documentation
* [API Documentation](https://lodash.com/docs)
* [FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide)
## Download
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.6.0/LICENSE) & supports [modern environments](#support).<br>
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.13.1/LICENSE) & supports [modern environments](#support).<br>
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one thats right for you.
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.6.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.6.0/dist/lodash.core.min.js))
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.6.0/dist/lodash.js) ([~21 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.6.0/dist/lodash.min.js))
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.13.1/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.13.1/dist/lodash.core.min.js))
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.13.1/dist/lodash.js) ([~22 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.13.1/dist/lodash.min.js))
* [CDN copies](https://www.jsdelivr.com/projects/lodash)
## Why Lodash?
@@ -43,10 +43,4 @@ Lodash is available in a [variety of builds](https://lodash.com/custom-builds) &
* [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/browse/keyword/lodash-modularized)
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)
* [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash)
* [lodash/fp](https://github.com/lodash/lodash/tree/4.6.0-npm/fp)
## Further Reading
* [Contributing](https://github.com/lodash/lodash/blob/4.6.0/.github/CONTRIBUTING.md)
* [Release Notes](https://github.com/lodash/lodash/releases/tag/4.0.0)
* [Wiki (Changelog, Roadmap, etc.)](https://github.com/lodash/lodash/wiki)
* [lodash/fp](https://github.com/lodash/lodash/tree/4.13.1-npm/fp)

1308
dist/lodash.core.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,29 +1,28 @@
/**
* @license
* lodash 4.6.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* lodash (Custom Build) /license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash core -o ./dist/lodash.core.js`
*/
;(function(){function n(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function t(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===an?i===i:r(i,c)))var c=i,f=o}return f}function r(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return O(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return vn[n];
}function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function f(n,t){return n=typeof n=="number"||hn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){if(Y(n)&&!Pn(n)){if(n instanceof l)return n;if(An.call(n,"__wrapped__")){var t=new l(n.__wrapped__,n.__chain__);return t.__actions__=N(n.__actions__),t}}return new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===an)||(u=xn[r],
u=(n===u||n!==n&&u!==u)&&!An.call(e,r)),u?t:n}function s(n){return X(n)?Fn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(an,r)},t)}function v(n,t){var r=true;return $n(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return $n(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function _(t,r,e,u){u||(u=[]);for(var o=-1,i=t.length;++o<i;){var c=t[o];r>0&&Y(c)&&L(c)&&(e||Pn(c)||K(c))?r>1?_(c,r-1,e,u):n(u,c):e||(u[u.length]=c);
}return u}function g(n,t){return n&&qn(n,t,en)}function b(n,t){return y(t,function(t){return Q(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!X(n)&&!Y(t)?n!==n&&t!==t:d(n,t,j,r,e,u)}function d(n,t,r,e,u,o){var i=Pn(n),f=Pn(t),a="[object Array]",l="[object Array]";i||(a=kn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=kn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t),l=a==l;o||(o=[]);var s=J(o,function(t){
return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(t=i||isTypedArray(n)?I(n,t,r,e,u,o):$(n,t,a),o.pop(),t):2&u||(i=p&&An.call(n,"__wrapped__"),a=f&&An.call(t,"__wrapped__"),!i&&!a)?l?(t=q(n,t,r,e,u,o),o.pop(),t):false:(t=r(i?n.value():n,a?t.value():t,e,u,o),o.pop(),t))}function m(n){var t=typeof n;return"function"==t?n:null==n?cn:("object"==t?x:E)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function O(n,t){var r=-1,e=L(n)?Array(n.length):[];return $n(n,function(n,u,o){
e[++r]=t(n,u,o)}),e}function x(n){var t=en(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],an,3)))return false}return true}}function A(n,t){return n=Object(n),P(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function E(n){return function(t){return null==t?an:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function N(n){return k(n,0,n.length);
}function S(n,t){var r;return $n(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function T(t,r){return P(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function F(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];An.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==an||i in f)||(f[i]=c)}return r}function R(n){return V(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:an,o=typeof o=="function"?(u--,o):an;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o);
}return t})}function B(n){return function(){var t=arguments,r=s(n.prototype),t=n.apply(r,t);return X(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==wn&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=B(n);return e}function I(n,t,r,e,u,o){var i=-1,c=1&u,f=n.length,a=t.length;if(f!=a&&!(2&u&&a>f))return false;for(a=true;++i<f;){
var l=n[i],p=t[i];if(void 0!==an){a=false;break}if(c){if(!S(t,function(n){return l===n||r(l,n,e,u,o)})){a=false;break}}else if(l!==p&&!r(l,p,e,u,o)){a=false;break}}return a}function $(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""}return false}function q(n,t,r,e,u,o){var i=2&u,c=en(n),f=c.length,a=en(t).length;if(f!=a&&!i)return false;
for(var l=f;l--;){var p=c[l];if(!(i?p in t:An.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==an||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(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)&&(a=false)),a}function z(n){var t=n?n.length:an;if(W(t)&&(Pn(n)||nn(n)||K(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}
function C(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||xn)}function G(n){return n?n[0]:an}function J(n,t){return r(n,m(t),$n)}function M(n,t){return $n(n,typeof t=="function"?t:cn)}function P(n,t,r){return e(n,m(t),r,3>arguments.length,$n)}function U(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Un(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=an),r}}function V(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");
return t=In(t===an?n.length-1:Un(t),0),function(){for(var r=arguments,e=-1,u=In(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function H(n,t){return n>t}function K(n){return Y(n)&&L(n)&&An.call(n,"callee")&&(!Rn.call(n,"callee")||"[object Arguments]"==kn.call(n))}function L(n){return null!=n&&W(zn(n))&&!Q(n)}function Q(n){return n=X(n)?kn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function W(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n;
}function X(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function Y(n){return!!n&&typeof n=="object"}function Z(n){return typeof n=="number"||Y(n)&&"[object Number]"==kn.call(n)}function nn(n){return typeof n=="string"||!Pn(n)&&Y(n)&&"[object String]"==kn.call(n)}function tn(n,t){return t>n}function rn(n){return typeof n=="string"?n:null==n?"":n+""}function en(n){var t=C(n);if(!t&&!L(n))return Dn(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!An.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);
return e}function un(n){for(var t=-1,r=C(n),e=w(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t<u;){var a=e[t];i&&("length"==a||f(a,c))||"constructor"==a&&(r||!An.call(n,a))||o.push(a)}return o}function on(n){return n?u(n,en(n)):[]}function cn(n){return n}function fn(t,r,e){var u=en(r),o=b(r,u);null!=e||X(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=b(r,en(r)));var i=X(e)&&"chain"in e?e.chain:true,c=Q(t);return $n(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){
var e=t(this.__wrapped__);return(e.__actions__=N(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var an,ln=1/0,pn=/[&<>"'`]/g,sn=RegExp(pn.source),hn=/^(?:0|[1-9]\d*)$/,vn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},yn={"function":true,object:true},_n=yn[typeof exports]&&exports&&!exports.nodeType?exports:an,gn=yn[typeof module]&&module&&!module.nodeType?module:an,bn=gn&&gn.exports===_n?_n:an,jn=o(yn[typeof self]&&self),dn=o(yn[typeof window]&&window),mn=o(yn[typeof this]&&this),wn=o(_n&&gn&&typeof global=="object"&&global)||dn!==(mn&&mn.window)&&dn||jn||mn||Function("return this")(),On=Array.prototype,xn=Object.prototype,An=xn.hasOwnProperty,En=0,kn=xn.toString,Nn=wn._,Sn=wn.Reflect,Tn=Sn?Sn.f:an,Fn=Object.create,Rn=xn.propertyIsEnumerable,Bn=wn.isFinite,Dn=Object.keys,In=Math.max,$n=function(n,t){
return function(r,e){if(null==r)return r;if(!L(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(g),qn=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}();Tn&&!Rn.call({valueOf:1},"valueOf")&&(w=function(n){n=Tn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r});var zn=E("length"),Cn=V(function(t,r){return Pn(t)||(t=null==t?[]:[Object(t)]),_(r,1),
n(N(t),on)}),Gn=V(function(n,t,r){return D(n,t,r)}),Jn=V(function(n,t){return h(n,1,t)}),Mn=V(function(n,t,r){return h(n,Vn(t)||0,r)}),Pn=Array.isArray,Un=Number,Vn=Number,Hn=R(function(n,t){F(t,en(t),n)}),Kn=R(function(n,t){F(t,un(t),n)}),Ln=R(function(n,t,r,e){F(t,un(t),n,e)}),Qn=V(function(n){return n.push(an,p),Ln.apply(an,n)}),Wn=V(function(n,t){return null==n?{}:A(n,_(t,1))}),Xn=m;l.prototype=s(a.prototype),l.prototype.constructor=l,a.assignIn=Kn,a.before=U,a.bind=Gn,a.chain=function(n){return n=a(n),
n.__chain__=true,n},a.compact=function(n){return y(n,Boolean)},a.concat=Cn,a.create=function(n,t){var r=s(n);return t?Hn(r,t):r},a.defaults=Qn,a.defer=Jn,a.delay=Mn,a.filter=function(n,t){return y(n,m(t))},a.flatten=function(n){return n&&n.length?_(n,1):[]},a.flattenDeep=function(n){return n&&n.length?_(n,ln):[]},a.iteratee=Xn,a.keys=en,a.map=function(n,t){return O(n,m(t))},a.matches=function(n){return x(Hn({},n))},a.mixin=fn,a.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");
return function(){return!n.apply(this,arguments)}},a.once=function(n){return U(2,n)},a.pick=Wn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===an?e:+r,e?k(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=m(t),O(O(n,function(n,e,u){return{c:n,b:r++,a:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.a;var e=t.a;if(r!==e){var u=null===r,o=r===an,i=r===r,c=null===e,f=e===an,a=e===e;if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b;
}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return L(n)?n.length?N(n):[]:on(n)},a.values=on,a.extend=Kn,fn(a,a),a.clone=function(n){return X(n)?Pn(n)?N(n):F(n,en(n)):n},a.escape=function(n){return(n=rn(n))&&sn.test(n)?n.replace(pn,i):n},a.every=function(n,t,r){return t=r?an:t,v(n,m(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&An.call(n,t)},a.head=G,a.identity=cn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?In(e+r,0):r:0,
r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},a.isArguments=K,a.isArray=Pn,a.isBoolean=function(n){return true===n||false===n||Y(n)&&"[object Boolean]"==kn.call(n)},a.isDate=function(n){return Y(n)&&"[object Date]"==kn.call(n)},a.isEmpty=function(n){if(L(n)&&(Pn(n)||nn(n)||Q(n.splice)||K(n)))return!n.length;for(var t in n)if(An.call(n,t))return false;return true},a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&Bn(n)},a.isFunction=Q,a.isNaN=function(n){
return Z(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=Z,a.isObject=X,a.isRegExp=function(n){return X(n)&&"[object RegExp]"==kn.call(n)},a.isString=nn,a.isUndefined=function(n){return n===an},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:an},a.max=function(n){return n&&n.length?t(n,cn,H):an},a.min=function(n){return n&&n.length?t(n,cn,tn):an},a.noConflict=function(){return wn._===this&&(wn._=Nn),this},a.noop=function(){},a.reduce=P,a.result=function(n,t,r){return t=null==n?an:n[t],
t===an&&(t=r),Q(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=L(n)?n:en(n),n.length)},a.some=function(n,t,r){return t=r?an:t,S(n,m(t))},a.uniqueId=function(n){var t=++En;return rn(n)+t},a.each=M,a.first=G,fn(a,function(){var n={};return g(a,function(t,r){An.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.6.0",$n("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:On)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);
a.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(dn||jn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return a}):_n&&gn?(bn&&((gn.exports=a)._=a),_n._=a):wn._=a}).call(this);
;(function(){function n(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function t(n){return mn(Object(n))}function r(n,t){return n.push.apply(n,t),n}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return x(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return cn[n]}function c(n){return n instanceof f?n:new f(n)}function f(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function a(n,t,r,e){
var u;return(u=n===rn)||(u=hn[r],u=(n===u||n!==n&&u!==u)&&!vn.call(e,r)),u?t:n}function l(n){return L(n)?_n(n):{}}function p(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(rn,r)},t)}function s(n,t){var r=true;return xn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function h(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===rn?i===i:r(i,c)))var c=i,f=o}return f}function v(n,t){var r=[];return xn(n,function(n,e,u){t(n,e,u)&&r.push(n);
}),r}function y(n,t,e,u,o){var i=-1,c=n.length;for(e||(e=z),o||(o=[]);++i<c;){var f=n[i];t>0&&e(f)?t>1?y(f,t-1,e,u,o):r(o,f):u||(o[o.length]=f)}return o}function b(n,r){return n&&En(n,r,t)}function g(n,t){return v(t,function(t){return K(n[t])})}function _(n,t){return n>t}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!L(n)&&!Q(t)?n!==n&&t!==t:d(n,t,j,r,e,u)}function d(n,t,r,e,u,o){var i=Tn(n),c=Tn(t),f="[object Array]",a="[object Array]";i||(f=bn.call(n),f="[object Arguments]"==f?"[object Object]":f),
c||(a=bn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f&&true,c="[object Object]"==a&&true,a=f==a;o||(o=[]);var p=kn(o,function(t){return t[0]===n});return p&&p[1]?p[1]==t:(o.push([n,t]),a&&!l?(r=i?I(n,t,r,e,u,o):q(n,t,f),o.pop(),r):2&u||(i=l&&vn.call(n,"__wrapped__"),f=c&&vn.call(t,"__wrapped__"),!i&&!f)?a?(r=$(n,t,r,e,u,o),o.pop(),r):false:(i=i?n.value():n,t=f?t.value():t,r=r(i,t,e,u,o),o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?nn:(typeof n=="object"?E:w)(n);
}function O(n,t){return t>n}function x(n,t){var r=-1,e=H(n)?Array(n.length):[];return xn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function E(n){var r=t(n);return function(t){var e=r.length;if(null==t)return!e;for(t=Object(t);e--;){var u=r[e];if(!(u in t&&j(n[u],t[u],rn,3)))return false}return true}}function A(n,t){return n=Object(n),M(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function w(n){return function(t){return null==t?rn:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,
0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function N(n){return k(n,0,n.length)}function S(n,t){var r;return xn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function F(n,t){return M(t,function(n,t){return t.func.apply(t.thisArg,r([n],t.args))},n)}function T(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];vn.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==rn||i in f)||(f[i]=c)}return r}function B(n){return U(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:rn,o=n.length>3&&typeof o=="function"?(u--,
o):rn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function R(n){return function(){var t=arguments,r=l(n.prototype),t=n.apply(r,t);return L(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==pn&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=R(n);return e}function I(n,t,r,e,u,o){var i=n.length,c=t.length;
if(i!=c&&!(2&u&&c>i))return false;for(var c=-1,f=true,a=1&u?[]:rn;++c<i;){var l=n[c],p=t[c];if(void 0!==rn){f=false;break}if(a){if(!S(t,function(n,t){return G(a,t)||l!==n&&!r(l,n,e,u,o)?void 0:a.push(t)})){f=false;break}}else if(l!==p&&!r(l,p,e,u,o)){f=false;break}}return f}function q(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+"";
}return false}function $(n,r,e,u,o,i){var c=2&o,f=t(n),a=f.length,l=t(r).length;if(a!=l&&!c)return false;for(var p=a;p--;){var s=f[p];if(!(c?s in r:vn.call(r,s)))return false}for(l=true;++p<a;){var s=f[p],h=n[s],v=r[s];if(void 0!==rn||h!==v&&!e(h,v,u,o,i)){l=false;break}c||(c="constructor"==s)}return l&&!c&&(e=n.constructor,u=r.constructor,e!=u&&"constructor"in n&&"constructor"in r&&!(typeof e=="function"&&e instanceof e&&typeof u=="function"&&u instanceof u)&&(l=false)),l}function z(n){return Tn(n)||V(n)}function C(n){
return n&&n.length?n[0]:rn}function G(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?On(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function J(n,t){return xn(n,m(t))}function M(n,t,r){return e(n,m(t),r,3>arguments.length,xn)}function P(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Bn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=rn),r}}function U(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");
return t=On(t===rn?n.length-1:Bn(t),0),function(){for(var r=arguments,e=-1,u=On(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function V(n){return Q(n)&&H(n)&&vn.call(n,"callee")&&(!jn.call(n,"callee")||"[object Arguments]"==bn.call(n))}function H(n){var t;return(t=null!=n)&&(t=An(n),t=typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t),t&&!K(n)}function K(n){return n=L(n)?bn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n;
}function L(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function Q(n){return!!n&&typeof n=="object"}function W(n){return typeof n=="number"||Q(n)&&"[object Number]"==bn.call(n)}function X(n){return typeof n=="string"||!Tn(n)&&Q(n)&&"[object String]"==bn.call(n)}function Y(n){return typeof n=="string"?n:null==n?"":n+""}function Z(n){return n?u(n,t(n)):[]}function nn(n){return n}function tn(n,e,u){var o=t(e),i=g(e,o);null!=u||L(e)&&(i.length||!o.length)||(u=e,e=n,n=this,i=g(e,t(e)));var c=!(L(u)&&"chain"in u&&!u.chain),f=K(n);
return xn(i,function(t){var u=e[t];n[t]=u,f&&(n.prototype[t]=function(){var t=this.__chain__;if(c||t){var e=n(this.__wrapped__);return(e.__actions__=N(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=t,e}return u.apply(n,r([this.value()],arguments))})}),n}var rn,en=1/0,un=/[&<>"'`]/g,on=RegExp(un.source),cn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},fn=typeof exports=="object"&&exports,an=fn&&typeof module=="object"&&module,ln=o(typeof self=="object"&&self),pn=o(typeof global=="object"&&global)||ln||o(typeof this=="object"&&this)||Function("return this")(),sn=Array.prototype,hn=Object.prototype,vn=hn.hasOwnProperty,yn=0,bn=hn.toString,gn=pn._,_n=Object.create,jn=hn.propertyIsEnumerable,dn=pn.isFinite,mn=Object.keys,On=Math.max;
f.prototype=l(c.prototype),f.prototype.constructor=f;var xn=function(n,t){return function(r,e){if(null==r)return r;if(!H(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(b),En=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),An=w("length"),wn=String,kn=function(n){return function(r,e,u){var o=Object(r);if(e=m(e),!H(r))var i=t(r);return u=n(i||r,function(n,t){
return i&&(t=n,n=o[t]),e(n,t,o)},u),u>-1?r[i?i[u]:u]:rn}}(function(n,t,r){var e=n?n.length:0;if(!e)return-1;r=null==r?0:Bn(r),0>r&&(r=On(e+r,0));n:{for(t=m(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),Nn=U(function(n,t,r){return D(n,t,r)}),Sn=U(function(n,t){return p(n,1,t)}),Fn=U(function(n,t,r){return p(n,Rn(t)||0,r)}),Tn=Array.isArray,Bn=Number,Rn=Number,Dn=B(function(n,r){T(r,t(r),n)}),In=B(function(t,r){T(r,n(r),t)}),qn=B(function(t,r,e,u){T(r,n(r),t,u)}),$n=U(function(n){
return n.push(rn,a),qn.apply(rn,n)}),zn=U(function(n,t){return null==n?{}:A(n,x(y(t,1),wn))});c.assignIn=In,c.before=P,c.bind=Nn,c.chain=function(n){return n=c(n),n.__chain__=true,n},c.compact=function(n){return v(n,Boolean)},c.concat=function(){for(var n=arguments.length,t=Array(n?n-1:0),e=arguments[0],u=n;u--;)t[u-1]=arguments[u];return n?r(Tn(e)?N(e):[e],y(t,1)):[]},c.create=function(n,t){var r=l(n);return t?Dn(r,t):r},c.defaults=$n,c.defer=Sn,c.delay=Fn,c.filter=function(n,t){return v(n,m(t))},
c.flatten=function(n){return n&&n.length?y(n,1):[]},c.flattenDeep=function(n){return n&&n.length?y(n,en):[]},c.iteratee=m,c.keys=t,c.map=function(n,t){return x(n,m(t))},c.matches=function(n){return E(Dn({},n))},c.mixin=tn,c.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},c.once=function(n){return P(2,n)},c.pick=zn,c.slice=function(n,t,r){var e=n?n.length:0;return r=r===rn?e:+r,e?k(n,null==t?0:+t,r):[]},c.sortBy=function(n,t){
var r=0;return t=m(t),x(x(n,function(n,e,u){return{value:n,index:r++,criteria:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==rn,o=null===r,i=r===r,c=e!==rn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&e>r||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),w("value"))},c.tap=function(n,t){return t(n),n},c.thru=function(n,t){return t(n)},c.toArray=function(n){return H(n)?n.length?N(n):[]:Z(n)},c.values=Z,c.extend=In,
tn(c,c),c.clone=function(n){return L(n)?Tn(n)?N(n):T(n,t(n)):n},c.escape=function(n){return(n=Y(n))&&on.test(n)?n.replace(un,i):n},c.every=function(n,t,r){return t=r?rn:t,s(n,m(t))},c.find=kn,c.forEach=J,c.has=function(n,t){return null!=n&&vn.call(n,t)},c.head=C,c.identity=nn,c.indexOf=G,c.isArguments=V,c.isArray=Tn,c.isBoolean=function(n){return true===n||false===n||Q(n)&&"[object Boolean]"==bn.call(n)},c.isDate=function(n){return Q(n)&&"[object Date]"==bn.call(n)},c.isEmpty=function(n){return H(n)&&(Tn(n)||X(n)||K(n.splice)||V(n))?!n.length:!t(n).length;
},c.isEqual=function(n,t){return j(n,t)},c.isFinite=function(n){return typeof n=="number"&&dn(n)},c.isFunction=K,c.isNaN=function(n){return W(n)&&n!=+n},c.isNull=function(n){return null===n},c.isNumber=W,c.isObject=L,c.isRegExp=function(n){return L(n)&&"[object RegExp]"==bn.call(n)},c.isString=X,c.isUndefined=function(n){return n===rn},c.last=function(n){var t=n?n.length:0;return t?n[t-1]:rn},c.max=function(n){return n&&n.length?h(n,nn,_):rn},c.min=function(n){return n&&n.length?h(n,nn,O):rn},c.noConflict=function(){
return pn._===this&&(pn._=gn),this},c.noop=function(){},c.reduce=M,c.result=function(n,t,r){return t=null==n?rn:n[t],t===rn&&(t=r),K(t)?t.call(n):t},c.size=function(n){return null==n?0:(n=H(n)?n:t(n),n.length)},c.some=function(n,t,r){return t=r?rn:t,S(n,m(t))},c.uniqueId=function(n){var t=++yn;return Y(n)+t},c.each=J,c.first=C,tn(c,function(){var n={};return b(c,function(t,r){vn.call(c.prototype,r)||(n[r]=t)}),n}(),{chain:false}),c.VERSION="4.13.1",xn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
var t=(/^(?:replace|split)$/.test(n)?String.prototype:sn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);c.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Tn(u)?u:[],n)}return this[r](function(r){return t.apply(Tn(r)?r:[],n)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=function(){return F(this.__wrapped__,this.__actions__)},(ln||{})._=c,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){
return c}):an?((an.exports=c)._=c,fn._=c):pn._=c}).call(this);

561
dist/lodash.fp.js vendored
View File

@@ -57,9 +57,10 @@ return /******/ (function(modules) { // webpackBootstrap
var baseConvert = __webpack_require__(1);
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last version.
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
*
* @param {Function} lodash The lodash function.
* @param {Function} lodash The lodash function to convert.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
@@ -79,15 +80,100 @@ return /******/ (function(modules) { // webpackBootstrap
var mapping = __webpack_require__(2),
mutateMap = mapping.mutate,
placeholder = {};
fallbackHolder = __webpack_require__(3);
/**
* Creates a function, with an arity of `n`, that invokes `func` with the
* arguments it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} n The arity of the new function.
* @returns {Function} Returns the new function.
*/
function baseArity(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
}
/**
* Creates a function that invokes `func`, with up to `n` arguments, ignoring
* any additional arguments.
*
* @private
* @param {Function} func The function to cap arguments for.
* @param {number} n The arity cap.
* @returns {Function} Returns the new function.
*/
function baseAry(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
: function(a) { return func(a); };
}
/**
* Creates a clone of `array`.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the cloned array.
*/
function cloneArray(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
}
/**
* Creates a function that clones a given object using the assignment `func`.
*
* @private
* @param {Function} func The assignment function.
* @returns {Function} Returns the new cloner function.
*/
function createCloner(func) {
return function(object) {
return func({}, object);
};
}
/**
* Creates a function that wraps `func` and uses `cloner` to clone the first
* argument it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} cloner The function to clone arguments.
* @returns {Function} Returns the new immutable function.
*/
function immutWrap(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
}
/**
* The base implementation of `convert` which accepts a `util` object of methods
* required to perform conversions.
*
* @param {Object} util The util object.
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @param {string} name The name of the function to convert.
* @param {Function} func The function to convert.
* @param {Object} [options] The options object.
* @param {boolean} [options.cap=true] Specify capping iteratee arguments.
* @param {boolean} [options.curry=true] Specify currying.
@@ -119,10 +205,15 @@ return /******/ (function(modules) { // webpackBootstrap
'rearg': 'rearg' in options ? options.rearg : true
};
var forceRearg = ('rearg' in options) && options.rearg;
var forceCurry = ('curry' in options) && options.curry,
forceFixed = ('fixed' in options) && options.fixed,
forceRearg = ('rearg' in options) && options.rearg,
placeholder = isLib ? func : fallbackHolder,
pristine = isLib ? func.runInContext() : undefined;
var helpers = isLib ? func : {
'ary': util.ary,
'assign': util.assign,
'clone': util.clone,
'curry': util.curry,
'forEach': util.forEach,
@@ -136,6 +227,7 @@ return /******/ (function(modules) { // webpackBootstrap
};
var ary = helpers.ary,
assign = helpers.assign,
clone = helpers.clone,
curry = helpers.curry,
each = helpers.forEach,
@@ -148,99 +240,6 @@ return /******/ (function(modules) { // webpackBootstrap
var aryMethodKeys = keys(mapping.aryMethod);
var baseArity = function(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
};
var baseAry = function(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
: function(a) { return func(a); };
};
var cloneArray = function(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
};
var cloneByPath = function(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
result = clone(Object(object)),
nested = result;
while (nested != null && ++index < length) {
var key = path[index],
value = nested[key];
if (value != null) {
nested[key] = clone(Object(value));
}
nested = nested[key];
}
return result;
};
var createCloner = function(func) {
return function(object) {
return func({}, object);
};
};
var immutWrap = function(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
};
var iterateeAry = function(func, n) {
return overArg(func, function(func) {
return typeof func == 'function' ? baseAry(func, n) : func;
});
};
var iterateeRearg = function(func, indexes) {
return overArg(func, function(func) {
var n = indexes.length;
return baseArity(rearg(baseAry(func, n), indexes), n);
});
};
var overArg = function(func, iteratee, retArg) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = iteratee(args[index]);
return func.apply(undefined, args);
};
};
var wrappers = {
'castArray': function(castArray) {
return function() {
@@ -270,25 +269,21 @@ return /******/ (function(modules) { // webpackBootstrap
if (!isFunction(func)) {
return mixin(func, Object(source));
}
var methods = [],
methodNames = [];
var pairs = [];
each(keys(source), function(key) {
var value = source[key];
if (isFunction(value)) {
methodNames.push(key);
methods.push(func.prototype[key]);
if (isFunction(source[key])) {
pairs.push([key, func.prototype[key]]);
}
});
mixin(func, Object(source));
each(methodNames, function(methodName, index) {
var method = methods[index];
if (isFunction(method)) {
func.prototype[methodName] = method;
each(pairs, function(pair) {
var value = pair[1];
if (isFunction(value)) {
func.prototype[pair[0]] = value;
} else {
delete func.prototype[methodName];
delete func.prototype[pair[0]];
}
});
return func;
@@ -301,14 +296,144 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
var wrap = function(name, func) {
name = mapping.aliasToReal[name] || name;
var wrapper = wrappers[name];
if (wrapper) {
return wrapper(func);
/*--------------------------------------------------------------------------*/
/**
* Creates a clone of `object` by `path`.
*
* @private
* @param {Object} object The object to clone.
* @param {Array|string} path The path to clone by.
* @returns {Object} Returns the cloned object.
*/
function cloneByPath(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
lastIndex = length - 1,
result = clone(Object(object)),
nested = result;
while (nested != null && ++index < length) {
var key = path[index],
value = nested[key];
if (value != null) {
nested[path[index]] = clone(index == lastIndex ? value : Object(value));
}
nested = nested[key];
}
var wrapped = func;
if (config.immutable) {
return result;
}
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
*
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function convertLib(options) {
return _.runInContext.convert(options)(undefined);
}
/**
* Create a converter function for `func` of `name`.
*
* @param {string} name The name of the function to convert.
* @param {Function} func The function to convert.
* @returns {Function} Returns the new converter function.
*/
function createConverter(name, func) {
var oldOptions = options;
return function(options) {
var newUtil = isLib ? pristine : helpers,
newFunc = isLib ? pristine[name] : func,
newOptions = assign(assign({}, oldOptions), options);
return baseConvert(newUtil, name, newFunc, newOptions);
};
}
/**
* Creates a function that wraps `func` to invoke its iteratee, with up to `n`
* arguments, ignoring any additional arguments.
*
* @private
* @param {Function} func The function to cap iteratee arguments for.
* @param {number} n The arity cap.
* @returns {Function} Returns the new function.
*/
function iterateeAry(func, n) {
return overArg(func, function(func) {
return typeof func == 'function' ? baseAry(func, n) : func;
});
}
/**
* Creates a function that wraps `func` to invoke its iteratee with arguments
* arranged according to the specified `indexes` where the argument value at
* the first index is provided as the first argument, the argument value at
* the second index is provided as the second argument, and so on.
*
* @private
* @param {Function} func The function to rearrange iteratee arguments for.
* @param {number[]} indexes The arranged argument indexes.
* @returns {Function} Returns the new function.
*/
function iterateeRearg(func, indexes) {
return overArg(func, function(func) {
var n = indexes.length;
return baseArity(rearg(baseAry(func, n), indexes), n);
});
}
/**
* Creates a function that invokes `func` with its first argument passed
* thru `transform`.
*
* @private
* @param {Function} func The function to wrap.
* @param {...Function} transform The functions to transform the first argument.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = transform(args[index]);
return func.apply(undefined, args);
};
}
/**
* Creates a function that wraps `func` and applys the conversions
* rules by `name`.
*
* @private
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @returns {Function} Returns the converted function.
*/
function wrap(name, func) {
name = mapping.aliasToReal[name] || name;
var result,
wrapped = func,
wrapper = wrappers[name];
if (wrapper) {
wrapped = wrapper(func);
}
else if (config.immutable) {
if (mutateMap.array[name]) {
wrapped = immutWrap(func, cloneArray);
}
@@ -319,7 +444,6 @@ return /******/ (function(modules) { // webpackBootstrap
wrapped = immutWrap(func, cloneByPath);
}
}
var result;
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (name == otherName) {
@@ -328,7 +452,7 @@ return /******/ (function(modules) { // webpackBootstrap
spreadStart = mapping.methodSpread[name];
result = wrapped;
if (config.fixed) {
if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
result = spreadStart === undefined
? ary(result, aryKey)
: spread(result, spreadStart);
@@ -343,7 +467,8 @@ return /******/ (function(modules) { // webpackBootstrap
result = iterateeAry(result, aryN);
}
}
if (config.curry && aryKey > 1) {
if (forceCurry || (config.curry && aryKey > 1)) {
forceCurry && console.log(forceCurry, name);
result = curry(result, aryKey);
}
return false;
@@ -353,19 +478,27 @@ return /******/ (function(modules) { // webpackBootstrap
});
result || (result = wrapped);
if (result == func) {
result = forceCurry ? curry(result, 1) : function() {
return func.apply(this, arguments);
};
}
result.convert = createConverter(name, func);
if (mapping.placeholder[name]) {
setPlaceholder = true;
func.placeholder = result.placeholder = placeholder;
result.placeholder = func.placeholder = placeholder;
}
return result;
};
}
/*--------------------------------------------------------------------------*/
if (!isObj) {
return wrap(name, func);
}
var _ = func;
// Iterate over methods for the current ary cap.
// Convert methods by ary cap.
var pairs = [];
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(key) {
@@ -376,15 +509,31 @@ return /******/ (function(modules) { // webpackBootstrap
});
});
// Convert remaining methods.
each(keys(_), function(key) {
var func = _[key];
if (typeof func == 'function') {
var length = pairs.length;
while (length--) {
if (pairs[length][0] == key) {
return;
}
}
func.convert = createConverter(key, func);
pairs.push([key, func]);
}
});
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
each(pairs, function(pair) {
_[pair[0]] = pair[1];
});
_.convert = convertLib;
if (setPlaceholder) {
_.placeholder = placeholder;
}
// Wrap the lodash method and its aliases.
// Assign aliases.
each(keys(_), function(key) {
each(mapping.realToAlias[key] || [], function(alias) {
_[alias] = _[key];
@@ -403,35 +552,49 @@ return /******/ (function(modules) { // webpackBootstrap
/** Used to map aliases to their real names. */
exports.aliasToReal = {
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'all': 'some',
'all': 'every',
'allPass': 'overEvery',
'always': 'constant',
'any': 'some',
'anyPass': 'overSome',
'apply': 'spread',
'assoc': 'set',
'assocPath': 'set',
'complement': 'negate',
'compose': 'flowRight',
'contains': 'includes',
'dissoc': 'unset',
'dissocPath': 'unset',
'each': 'forEach',
'eachRight': 'forEachRight',
'equals': 'isEqual',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
'identical': 'eq',
'init': 'initial',
'mapObj': 'mapValues',
'invertObj': 'invert',
'juxt': 'over',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'paths': 'at',
'pickAll': 'pick',
'pipe': 'flow',
'pluck': 'map',
'prop': 'get',
'propOf': 'propertyOf',
'propEq': 'matchesProperty',
'propOr': 'getOr',
'somePass': 'overSome',
'props': 'at',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
@@ -443,37 +606,43 @@ return /******/ (function(modules) { // webpackBootstrap
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin',
'over', 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext',
'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words'
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindKey',
'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', 'every',
'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
'findLastKey', 'flatMap', 'flattenDepth', 'forEach', 'forEachRight', 'forIn',
'forInRight', 'forOwn', 'forOwnRight', 'get', 'groupBy', 'gt', 'gte', 'has',
'hasIn', 'includes', 'indexOf', 'intersection', 'invertBy', 'invoke', 'invokeMap',
'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map',
'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', 'merge', 'minBy', 'omit',
'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt',
'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'result',
'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex',
'sortedLastIndexOf', 'sortedUniqBy', 'split', 'startsWith', 'subtract', 'sumBy',
'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru',
'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union',
'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip',
'zipObject', 'zipObjectDeep'
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast',
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth',
'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
'zipObjectDeep'
],
'3': [
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'isEqualWith',
'isMatchWith', 'mergeWith', 'orderBy', 'pullAllBy', 'pullAllWith', 'reduce',
'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy',
'transform', 'unionBy', 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace',
'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith', 'updateWith'
@@ -489,29 +658,29 @@ return /******/ (function(modules) { // webpackBootstrap
/** Used to map method names to their iteratee ary. */
exports.iterateeAry = {
'assignWith': 2,
'assignInWith': 2,
'cloneDeepWith': 1,
'cloneWith': 1,
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'findFrom': 1,
'findIndex': 1,
'findIndexFrom': 1,
'findKey': 1,
'findLast': 1,
'findLastFrom': 1,
'findLastIndex': 1,
'findLastIndexFrom': 1,
'findLastKey': 1,
'flatMap': 1,
'flatMapDeep': 1,
'flatMapDepth': 1,
'forEach': 1,
'forEachRight': 1,
'forIn': 1,
'forInRight': 1,
'forOwn': 1,
'forOwnRight': 1,
'isEqualWith': 2,
'isMatchWith': 2,
'map': 1,
'mapKeys': 1,
'mapValues': 1,
@@ -536,22 +705,37 @@ return /******/ (function(modules) { // webpackBootstrap
exports.methodRearg = {
'assignInWith': [1, 2, 0],
'assignWith': [1, 2, 0],
'differenceBy': [1, 2, 0],
'differenceWith': [1, 2, 0],
'getOr': [2, 1, 0],
'intersectionBy': [1, 2, 0],
'intersectionWith': [1, 2, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 0],
'mergeWith': [1, 2, 0],
'padChars': [2, 1, 0],
'padCharsEnd': [2, 1, 0],
'padCharsStart': [2, 1, 0],
'pullAllBy': [2, 1, 0],
'pullAllWith': [2, 1, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'unionBy': [1, 2, 0],
'unionWith': [1, 2, 0],
'updateWith': [3, 1, 2, 0],
'xorBy': [1, 2, 0],
'xorWith': [1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'partial': 1,
'partialRight': 1
'partialRight': 1,
'without': 1
};
/** Used to identify methods which mutate arrays or objects. */
@@ -616,25 +800,56 @@ return /******/ (function(modules) { // webpackBootstrap
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'findFrom': 'find',
'findIndexFrom': 'findIndex',
'findLastFrom': 'findLast',
'findLastIndexFrom': 'findLastIndex',
'getOr': 'get',
'includesFrom': 'includes',
'indexOfFrom': 'indexOf',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'lastIndexOfFrom': 'lastIndexOf',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip `_.rearg`. */
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'runInContext': true
};
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'bind': true,
'bindKey': true,
'concat': true,
'difference': true,
'divide': true,
'eq': true,
'gt': true,
'gte': true,
'isEqual': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'multiply': true,
'overArgs': true,
'partial': true,
'partialRight': true,
'random': true,
@@ -646,6 +861,18 @@ return /******/ (function(modules) { // webpackBootstrap
};
/***/ },
/* 3 */
/***/ function(module, exports) {
/**
* The default argument placeholder value for methods.
*
* @type {Object}
*/
module.exports = {};
/***/ }
/******/ ])
});

31
dist/lodash.fp.min.js vendored
View File

@@ -1,14 +1,17 @@
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function i(t,e){return n(t,t,e)}var n=r(1);"function"==typeof _&&(_=i(_.runInContext())),
t.exports=i},function(t,e,r){function i(t,e,r,u){var s,l="function"==typeof e,p=e===Object(e);if(p&&(u=r,r=e,e=void 0),null==r)throw new TypeError;u||(u={});var c={cap:"cap"in u?u.cap:!0,curry:"curry"in u?u.curry:!0,fixed:"fixed"in u?u.fixed:!0,immutable:"immutable"in u?u.immutable:!0,rearg:"rearg"in u?u.rearg:!0},h="rearg"in u&&u.rearg,f=l?r:{ary:t.ary,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,spread:t.spread,
toPath:t.toPath},d=f.ary,y=f.clone,g=f.curry,m=f.forEach,v=f.isArray,W=f.isFunction,x=f.keys,R=f.rearg,I=f.spread,O=f.toPath,b=x(n.aryMethod),A=function(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}},B=function(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}},E=function(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r},j=function(t,e){e=O(e);for(var r=-1,i=e.length,n=y(Object(t)),a=n;null!=a&&++r<i;){
var o=e[r],u=a[o];null!=u&&(a[o]=y(Object(u))),a=a[o]}return n},k=function(t){return function(e){return t({},e)}},w=function(t,e){return function(){var r=arguments.length;if(!r)return n;for(var i=Array(r);r--;)i[r]=arguments[r];var n=i[0]=e.apply(void 0,i);return t.apply(void 0,i),n}},q=function(t,e){return P(t,function(t){return"function"==typeof t?B(t,e):t})},z=function(t,e){return P(t,function(t){var r=e.length;return A(R(B(t,r),e),r)})},P=function(t,e,r){return function(){var r=arguments.length;
if(!r)return t();for(var i=Array(r);r--;)i[r]=arguments[r];var n=c.rearg?0:r-1;return i[n]=e(i[n]),t.apply(void 0,i)}},M={castArray:function(t){return function(){var e=arguments[0];return v(e)?t(E(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],i=t(e,r),n=i.length;return c.cap&&"number"==typeof r?(r=r>2?r-2:1,n&&r>=n?i:B(i,r)):i}},mixin:function(t){return function(e){var r=this;if(!W(r))return t(r,Object(e));var i=[],n=[];return m(x(e),function(t){
var a=e[t];W(a)&&(n.push(t),i.push(r.prototype[t]))}),t(r,Object(e)),m(n,function(t,e){var n=i[e];W(n)?r.prototype[t]=n:delete r.prototype[t]}),r}},runInContext:function(e){return function(r){return i(t,e(r),u)}}},L=function(t,e){t=n.aliasToReal[t]||t;var r=M[t];if(r)return r(e);var i=e;c.immutable&&(a.array[t]?i=w(e,E):a.object[t]?i=w(e,k(e)):a.set[t]&&(i=w(e,j)));var u;return m(b,function(e){return m(n.aryMethod[e],function(r){if(t==r){var a=!l&&n.iterateeAry[t],o=n.iterateeRearg[t],s=n.methodSpread[t];
return u=i,c.fixed&&(u=void 0===s?d(u,e):I(u,s)),c.rearg&&e>1&&(h||!n.skipRearg[t])&&(u=R(u,n.methodRearg[t]||n.aryRearg[e])),c.cap&&(o?u=z(u,o):a&&(u=q(u,a))),c.curry&&e>1&&(u=g(u,e)),!1}}),!u}),u||(u=i),n.placeholder[t]&&(s=!0,e.placeholder=u.placeholder=o),u};if(!p)return L(e,r);var S=r,C=[];return m(b,function(t){m(n.aryMethod[t],function(t){var e=S[n.remap[t]||t];e&&C.push([t,L(t,e)])})}),m(C,function(t){S[t[0]]=t[1]}),s&&(S.placeholder=o),m(x(S),function(t){m(n.realToAlias[t]||[],function(e){
S[e]=S[t]})}),S}var n=r(2),a=n.mutate,o={};t.exports=i},function(t,e){e.aliasToReal={__:"placeholder",all:"some",allPass:"overEvery",apply:"spread",assoc:"set",assocPath:"set",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",each:"forEach",eachRight:"forEachRight",equals:"isEqual",extend:"assignIn",extendWith:"assignInWith",first:"head",init:"initial",mapObj:"mapValues",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",pickAll:"pick",pipe:"flow",
prop:"get",propOf:"propertyOf",propOr:"getOr",somePass:"overSome",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"],2:["add","after","ary","assign","assignIn","at","before","bind","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","merge","minBy","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","getOr","inRange","intersectionBy","intersectionWith","isEqualWith","isMatchWith","mergeWith","orderBy","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={assignWith:2,assignInWith:2,cloneDeepWith:1,cloneWith:1,
dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findIndex:1,findKey:1,findLast:1,findLastIndex:1,findLastKey:1,flatMap:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,isEqualWith:2,isMatchWith:2,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInWith:[1,2,0],assignWith:[1,2,0],getOr:[2,1,0],isMatchWith:[2,1,0],mergeWith:[1,2,0],pullAllBy:[2,1,0],
pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],updateWith:[3,1,2,0],zipWith:[1,2,0]},e.methodSpread={partial:1,partialRight:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0,merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,
partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,i={};for(var n in r){var a=r[n];t.call(i,a)?i[a].push(n):i[a]=[n]}return i}(),e.remap={curryN:"curry",curryRightN:"curryRight",getOr:"get",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipRearg={add:!0,assign:!0,assignIn:!0,concat:!0,difference:!0,gt:!0,gte:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,
zipObject:!0}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&(_=n(_.runInContext())),
t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){var r=arguments.length;if(!r)return i;for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n),
i}}function u(t,e,r,c){function f(t,e){e=D(e);for(var r=-1,n=e.length,i=n-1,a=w(Object(t)),o=a;null!=o&&++r<n;){var s=e[r],u=o[s];null!=u&&(o[e[r]]=w(r==i?u:Object(u))),o=o[s]}return a}function h(t){return N.runInContext.convert(t)(void 0)}function y(t,e){var r=c;return function(n){var i=I?E:F,a=I?E[t]:e,o=C(C({},r),n);return u(i,t,a,o)}}function m(t,e){return v(t,function(t){return"function"==typeof t?i(t,e):t})}function g(t,e){return v(t,function(t){var r=e.length;return n(z(i(t,r),e),r)})}function v(t,e){
return function(){var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=A.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function x(t,e){t=p.aliasToReal[t]||t;var r,n=e,i=_[t];return i?n=i(e):A.immutable&&(d.array[t]?n=s(e,a):d.object[t]?n=s(e,o(e)):d.set[t]&&(n=s(e,f))),M(T,function(e){return M(p.aryMethod[e],function(i){if(t==i){var a=!I&&p.iterateeAry[t],o=p.iterateeRearg[t],s=p.methodSpread[t];return r=n,!A.fixed||!b&&p.skipFixed[t]||(r=void 0===s?j(r,e):K(r,s)),
A.rearg&&e>1&&(k||!p.skipRearg[t])&&(r=z(r,p.methodRearg[t]||p.aryRearg[e])),A.cap&&(o?r=g(r,o):a&&(r=m(r,a))),(O||A.curry&&e>1)&&(O&&console.log(O,t),r=L(r,e)),!1}}),!r}),r||(r=n),r==e&&(r=O?L(r,1):function(){return e.apply(this,arguments)}),r.convert=y(t,e),p.placeholder[t]&&(W=!0,r.placeholder=e.placeholder=B),r}var W,I="function"==typeof e,R=e===Object(e);if(R&&(c=r,r=e,e=void 0),null==r)throw new TypeError;c||(c={});var A={cap:"cap"in c?c.cap:!0,curry:"curry"in c?c.curry:!0,fixed:"fixed"in c?c.fixed:!0,
immutable:"immutable"in c?c.immutable:!0,rearg:"rearg"in c?c.rearg:!0},O="curry"in c&&c.curry,b="fixed"in c&&c.fixed,k="rearg"in c&&c.rearg,B=I?r:l,E=I?r.runInContext():void 0,F=I?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,spread:t.spread,toPath:t.toPath},j=F.ary,C=F.assign,w=F.clone,L=F.curry,M=F.forEach,q=F.isArray,P=F.isFunction,S=F.keys,z=F.rearg,K=F.spread,D=F.toPath,T=S(p.aryMethod),_={
castArray:function(t){return function(){var e=arguments[0];return q(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return A.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&r>=a?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!P(r))return t(r,Object(e));var n=[];return M(S(e),function(t){P(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),M(n,function(t){var e=t[1];P(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]];
}),r}},runInContext:function(e){return function(r){return u(t,e(r),c)}}};if(!R)return x(e,r);var N=r,V=[];return M(T,function(t){M(p.aryMethod[t],function(t){var e=N[p.remap[t]||t];e&&V.push([t,x(t,e)])})}),M(S(N),function(t){var e=N[t];if("function"==typeof e){for(var r=V.length;r--;)if(V[r][0]==t)return;e.convert=y(t,e),V.push([t,e])}}),M(V,function(t){N[t[0]]=t[1]}),N.convert=h,W&&(N.placeholder=B),M(S(N),function(t){M(p.realToAlias[t]||[],function(e){N[e]=N[t]})}),N}var p=r(2),d=p.mutate,l=r(3);
t.exports=u},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendWith:"assignInWith",first:"head",__:"placeholder",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",equals:"isEqual",identical:"eq",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",
nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"],
2:["add","after","ary","assign","assignIn","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],
4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,
transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInWith:[1,2,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],
zipWith:[1,2,0]},e.methodSpread={invokeArgs:2,invokeArgsMap:2,partial:1,partialRight:1,without:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0,merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};
for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={curryN:"curry",curryRightN:"curryRight",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"
},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0}},function(t,e){t.exports={}}])});

4979
dist/lodash.js vendored

File diff suppressed because it is too large Load Diff

242
dist/lodash.min.js vendored
View File

@@ -1,121 +1,127 @@
/**
* @license
* lodash 4.6.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash -o ./dist/lodash.js`
* lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
*/
;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,o=n.length;++u<o;){var i=n[u];t(e,i,r(i),n)}return e}function u(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););return n}function o(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;
return true}function i(n,t){for(var r=-1,e=n.length,u=0,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[u++]=i)}return o}function f(n,t){return!!n.length&&-1<d(n,t,0)}function c(n,t,r){for(var e=-1,u=n.length;++e<u;)if(r(t,n[e]))return true;return false}function a(n,t){for(var r=-1,e=n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function l(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function s(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 h(n,t,r,e){
var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function p(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function _(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(f===q?i===i:r(i,f)))var f=i,c=o}return c}function g(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 v(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 d(n,t,r){if(t!==t)return C(n,r);--r;for(var e=n.length;++r<e;)if(n[r]===t)return r;
return-1}function y(n,t,r,e){--r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return-1}function b(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function x(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function m(n,t){for(var r,e=-1,u=n.length;++e<u;){var o=t(n[e]);o!==q&&(r=r===q?o:r+o)}return r}function j(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function w(n,t){return a(t,function(t){return[t,n[t]]})}function A(n){return function(t){return n(t)};
}function O(n,t){return a(t,function(t){return n[t]})}function k(n,t){for(var r=-1,e=n.length;++r<e&&-1<d(t,n[r],0););return r}function E(n,t){for(var r=n.length;r--&&-1<d(t,n[r],0););return r}function I(n){return n&&n.Object===Object?n:null}function S(n,t){if(n!==t){var r=null===n,e=n===q,u=n===n,o=null===t,i=t===q,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(t>n&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function R(n){return zn[n]}function W(n){return Mn[n]}function B(n){return"\\"+Fn[n]}function C(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 U(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function z(n,t){return n=typeof n=="number"||bn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function M(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function L(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function $(n,t){for(var r=-1,e=n.length,u=0,o=[];++r<e;){
var i=n[r];(i===t||"__lodash_placeholder__"===i)&&(n[r]="__lodash_placeholder__",o[u++]=r)}return o}function F(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function N(n){if(!n||!In.test(n))return n.length;for(var t=En.lastIndex=0;En.test(n);)t++;return t}function D(n){return Ln[n]}function Z(I){function bn(n){if(we(n)&&!qo(n)&&!(n instanceof On)){if(n instanceof An)return n;if(lu.call(n,"__wrapped__"))return Pr(n)}return new An(n)}function wn(){}function An(n,t){this.__wrapped__=n,
this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=q}function On(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function zn(){}function Mn(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Ln(n){var t=-1,r=n?n.length:0;for(this.__data__=new Mn;++t<r;)this.push(n[t])}function $n(n,t){var r=n.__data__;return $r(t)?(r=r.__data__,"__lodash_hash_undefined__"===(typeof t=="string"?r.string:r.hash)[t]):r.has(t);
}function Fn(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Zn(n,t){var r=Tn(n,t);return 0>r?false:(r==n.length-1?n.pop():Iu.call(n,r,1),true)}function qn(n,t){var r=Tn(n,t);return 0>r?q:n[r][1]}function Tn(n,t){for(var r=n.length;r--;)if(pe(n[r][0],t))return r;return-1}function Kn(n,t,r){var e=Tn(n,t);0>e?n.push([t,r]):n[e][1]=r}function Gn(n,t,r,e){return n===q||pe(n,cu[r])&&!lu.call(e,r)?t:n}function Yn(n,t,r){(r!==q&&!pe(n[t],r)||typeof t=="number"&&r===q&&!(t in n))&&(n[t]=r);
}function Hn(n,t,r){var e=n[t];lu.call(n,t)&&pe(e,r)&&(r!==q||t in n)||(n[t]=r)}function Qn(n,t,r,e){return Qu(n,function(n,u,o){t(e,n,r(n),o)}),e}function Xn(n,t){return n&&tr(t,De(t),n)}function nt(n,t){for(var r=-1,e=null==n,u=t.length,o=Array(u);++r<u;)o[r]=e?q:$e(n,t[r]);return o}function tt(n){return de(n)?n:[]}function rt(n){return typeof n=="function"?n:Ye}function et(n){return qo(n)?n:qr(n)}function ut(n,t,r){return n===n&&(r!==q&&(n=n>r?r:n),t!==q&&(n=t>n?t:n)),n}function ot(n,t,r,e,o,i){
var f;if(r&&(f=o?r(n,e,o,i):r(n)),f!==q)return f;if(!je(n))return n;if(e=qo(n)){if(f=Br(n),!t)return nr(n,f)}else{var c=Rr(n),a="[object Function]"==c||"[object GeneratorFunction]"==c;if(Po(n))return Yt(n,t);if("[object Object]"==c||"[object Arguments]"==c||a&&!o){if(U(n))return o?n:{};if(f=Cr(a?{}:n),!t)return er(n,Xn(f,n))}else{if(!Un[c])return o?n:{};f=Ur(n,c,t)}}return i||(i=new Fn),(o=i.get(n))?o:(i.set(n,f),(e?u:_t)(n,function(e,u){Hn(f,u,ot(e,t,r,u,n,i))}),e?f:er(n,f))}function it(n){var t=De(n),r=t.length;
return function(e){if(null==e)return!r;for(var u=r;u--;){var o=t[u],i=n[o],f=e[o];if(f===q&&!(o in Object(e))||!i(f))return false}return true}}function ft(n){return je(n)?Ou(n):{}}function ct(n,t,r){if(typeof n!="function")throw new iu("Expected a function");return Eu(function(){n.apply(q,r)},t)}function at(n,t,r,e){var u=-1,o=f,i=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=a(t,A(r))),e?(o=c,i=false):t.length>=200&&(o=$n,i=false,t=new Ln(t));n:for(;++u<l;){var p=n[u],_=r?r(p):p;if(i&&_===_){for(var g=h;g--;)if(t[g]===_)continue n;
s.push(p)}else o(t,_,e)||s.push(p)}return s}function lt(n,t){var r=true;return Qu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function st(n,t){var r=[];return Qu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ht(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++u<o;){var i=n[u];t>0&&de(i)&&(r||qo(i)||ge(i))?t>1?ht(i,t-1,r,e):l(e,i):r||(e[e.length]=i)}return e}function pt(n,t){null==n||no(n,t,Ze)}function _t(n,t){return n&&no(n,t,De)}function gt(n,t){return n&&to(n,t,De)}function vt(n,t){return i(t,function(t){
return be(n[t])})}function dt(n,t){t=Lr(t,n)?[t+""]:et(t);for(var r=0,e=t.length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:q}function yt(n,t){return lu.call(n,t)||typeof n=="object"&&t in n&&null===ju(n)}function bt(n,t){return t in Object(n)}function xt(n,t,r){for(var e=r?c:f,u=n[0].length,o=n.length,i=o,l=Array(o),s=1/0,h=[];i--;){var p=n[i];i&&t&&(p=a(p,A(t))),s=zu(p.length,s),l[i]=r||!t&&(120>u||120>p.length)?q:new Ln(i&&p)}var p=n[0],_=-1,g=l[0];n:for(;++_<u&&s>h.length;){var v=p[_],d=t?t(v):v;
if(g?!$n(g,d):!e(h,d,r)){for(i=o;--i;){var y=l[i];if(y?!$n(y,d):!e(n[i],d,r))continue n}g&&g.push(d),h.push(v)}}return h}function mt(n,t,r){var e={};return _t(n,function(n,u,o){t(e,r(n),u,o)}),e}function jt(n,t,e){return Lr(t,n)||(t=et(t),n=Zr(n,t),t=Vr(t)),t=null==n?n:n[t],null==t?q:r(t,n,e)}function wt(n,t,r,e,u){if(n===t)n=true;else if(null==n||null==t||!je(n)&&!we(t))n=n!==n&&t!==t;else n:{var o=qo(n),i=qo(t),f="[object Array]",c="[object Array]";o||(f=Rr(n),f="[object Arguments]"==f?"[object Object]":f),
i||(c=Rr(t),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!U(n),i="[object Object]"==c&&!U(t);if((c=f==c)&&!a)u||(u=new Fn),n=o||Re(n)?wr(n,t,wt,r,e,u):Ar(n,t,f,wt,r,e,u);else{if(!(2&e)&&(o=a&&lu.call(n,"__wrapped__"),f=i&&lu.call(t,"__wrapped__"),o||f)){u||(u=new Fn),n=wt(o?n.value():n,f?t.value():t,r,e,u);break n}if(c)t:if(u||(u=new Fn),o=2&e,f=De(n),i=f.length,c=De(t).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in t:yt(t,l))){n=false;break t}}if(c=u.get(n))n=c==t;else{
c=true,u.set(n,t);for(var s=o;++a<i;){var l=f[a],h=n[l],p=t[l];if(r)var _=o?r(p,h,l,t,n,u):r(h,p,l,n,t,u);if(_===q?h!==p&&!wt(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!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)&&(c=false)),u["delete"](n),n=c}}else n=false;else n=false}}return n}function At(n,t,r,e){var u=r.length,o=u,i=!e;if(null==n)return!o;for(n=Object(n);u--;){var f=r[u];if(i&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false;
}for(;++u<o;){var f=r[u],c=f[0],a=n[c],l=f[1];if(i&&f[2]){if(a===q&&!(c in n))return false}else if(f=new Fn,c=e?e(a,l,c,n,t,f):q,c===q?!wt(l,a,e,3,f):!c)return false}return true}function Ot(n){var t=typeof n;return"function"==t?n:null==n?Ye:"object"==t?qo(n)?St(n[0],n[1]):It(n):nu(n)}function kt(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function Et(n,t){var r=-1,e=ve(n)?Array(n.length):[];return Qu(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function It(n){var t=Er(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[r]===e&&(e!==q||r in Object(n))}}return function(r){return r===n||At(r,n,t)}}function St(n,t){return function(r){var e=$e(r,n);return e===q&&e===t?Ne(r,n):wt(t,e,q,3)}}function Rt(n,t,r,e,o){if(n!==t){var i=qo(t)||Re(t)?q:Ze(t);u(i||t,function(u,f){if(i&&(f=u,u=t[f]),je(u)){o||(o=new Fn);var c=f,a=o,l=n[c],s=t[c],h=a.get(s);if(h)Yn(n,c,h);else{var h=e?e(l,s,c+"",n,t,a):q,p=h===q;p&&(h=s,qo(s)||Re(s)?qo(l)?h=l:de(l)?h=nr(l):(p=false,h=ot(s,!e)):ke(s)||ge(s)?ge(l)?h=Me(l):!je(l)||r&&be(l)?(p=false,
h=ot(s,!e)):h=l:p=false),a.set(s,h),p&&Rt(h,s,r,e,a),a["delete"](s),Yn(n,c,h)}}else c=e?e(n[f],u,f+"",n,t,o):q,c===q&&(c=u),Yn(n,f,c)})}}function Wt(n,t,r){var e=-1;return t=a(t.length?t:Array(1),kr()),n=Et(n,function(n){return{a:a(t,function(t){return t(n)}),b:++e,c:n}}),x(n,function(n,t){var e;n:{e=-1;for(var u=n.a,o=t.a,i=u.length,f=r.length;++e<i;){var c=S(u[e],o[e]);if(c){e=f>e?c*("desc"==r[e]?-1:1):c;break n}}e=n.b-t.b}return e})}function Bt(n,t){return n=Object(n),s(t,function(t,r){return r in n&&(t[r]=n[r]),
t},{})}function Ct(n,t){var r={};return pt(n,function(n,e){t(n,e)&&(r[e]=n)}),r}function Ut(n){return function(t){return null==t?q:t[n]}}function zt(n){return function(t){return dt(t,n)}}function Mt(n,t,r,e){var u=e?y:d,o=-1,i=t.length,f=n;for(r&&(f=a(n,A(r)));++o<i;)for(var c=0,l=t[o],l=r?r(l):l;-1<(c=u(f,l,c,e));)f!==n&&Iu.call(f,c,1),Iu.call(n,c,1);return n}function Lt(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(e==r||u!=o){var o=u;if(z(u))Iu.call(n,u,1);else if(Lr(u,n))delete n[u];else{
var u=et(u),i=Zr(n,u);null!=i&&delete i[Vr(u)]}}}}function $t(n,t){return n+Ru(Lu()*(t-n+1))}function Ft(n,t,r,e){t=Lr(t,n)?[t+""]:et(t);for(var u=-1,o=t.length,i=o-1,f=n;null!=f&&++u<o;){var c=t[u];if(je(f)){var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):q;a===q&&(a=null==l?z(t[u+1])?[]:{}:l)}Hn(f,c,a)}f=f[c]}return n}function Nt(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function Dt(n,t){var r;return Qu(n,function(n,e,u){
return r=t(n,e,u),!r}),!!r}function Zt(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=n[o];(r?t>=i:t>i)&&null!==i?e=o+1:u=o}return u}return qt(n,t,Ye,r)}function qt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,c=t===q;o>u;){var a=Ru((u+o)/2),l=r(n[a]),s=l!==q,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?t>=l:t>l)?u=a+1:o=a}return zu(o,4294967294)}function Pt(n,t){for(var r=0,e=n.length,u=n[0],o=t?t(u):u,i=o,f=1,c=[u];++r<e;)u=n[r],
o=t?t(u):u,pe(o,i)||(i=o,c[f++]=u);return c}function Tt(n,t,r){var e=-1,u=f,o=n.length,i=true,a=[],l=a;if(r)i=false,u=c;else if(o<200)l=t?[]:a;else{if(u=t?null:eo(n))return F(u);i=false,u=$n,l=new Ln}n:for(;++e<o;){var s=n[e],h=t?t(s):s;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function Kt(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););return r?Nt(n,e?0:o,e?o+1:u):Nt(n,e?o+1:0,e?u:o)}function Gt(n,t){
var r=n;return r instanceof On&&(r=r.value()),s(t,function(n,t){return t.func.apply(t.thisArg,l([n],t.args))},r)}function Vt(n,t,r){for(var e=-1,u=n.length;++e<u;)var o=o?l(at(o,n[e],t,r),at(n[e],o,t,r)):n[e];return o&&o.length?Tt(o,t,r):[]}function Jt(n,t,r){for(var e=-1,u=n.length,o=t.length,i={};++e<u;)r(i,n[e],o>e?t[e]:q);return i}function Yt(n,t){if(t)return n.slice();var r=new n.constructor(n.length);return n.copy(r),r}function Ht(n){var t=new n.constructor(n.byteLength);return new bu(t).set(new bu(n)),
t}function Qt(n,t,r,e){var u=-1,o=n.length,i=r.length,f=-1,c=t.length,a=Uu(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<i;)(e||o>u)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Xt(n,t,r,e){var u=-1,o=n.length,i=-1,f=r.length,c=-1,a=t.length,l=Uu(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=n[u++]);return s}function nr(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r<e;)t[r]=n[r];return t}function tr(n,t,r){return rr(n,t,r);
}function rr(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],f=e?e(r[i],n[i],i,r,n):n[i];Hn(r,i,f)}return r}function er(n,t){return tr(n,io(n),t)}function ur(n,t){return function(r,u){var o=qo(r)?e:Qn,i=t?t():{};return o(r,n,kr(u),i)}}function or(n){return he(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:q,i=u>2?r[2]:q,o=typeof o=="function"?(u--,o):q;for(i&&Mr(r[0],r[1],i)&&(o=3>u?q:o,u=1),t=Object(t);++e<u;)(i=r[e])&&n(t,i,e,o);return t})}function ir(n,t){return function(r,e){if(null==r)return r;
if(!ve(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}function fr(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var f=e[n?i:++u];if(false===r(o[f],f,o))break}return t}}function cr(n,t,r){function e(){return(this&&this!==Vn&&this instanceof e?o:n).apply(u?r:this,arguments)}var u=1&t,o=sr(n);return e}function ar(n){return function(t){t=Le(t);var r=In.test(t)?t.match(En):q,e=r?r[0]:t.charAt(0);return t=r?r.slice(1).join(""):t.slice(1),
e[n]()+t}}function lr(n){return function(t){return s(Ve(Ke(t)),n,"")}}function sr(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]);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=ft(n.prototype),t=n.apply(r,t);return je(t)?t:r}}function hr(n,t,e){
function u(){for(var i=arguments.length,f=Array(i),c=i,a=Sr(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:$(f,a),i-=c.length,e>i?xr(n,t,_r,u.placeholder,q,f,c,q,q,e-i):r(this&&this!==Vn&&this instanceof u?o:n,this,f)}var o=sr(n);return u}function pr(n){return he(function(t){t=ht(t,1);var r=t.length,e=r,u=An.prototype.thru;for(n&&t.reverse();e--;){var o=t[e];if(typeof o!="function")throw new iu("Expected a function");if(u&&!i&&"wrapper"==Or(o))var i=new An([],true)}for(e=i?e:r;++e<r;)var o=t[e],u=Or(o),f="wrapper"==u?uo(o):q,i=f&&Fr(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[Or(f[0])].apply(i,f[3]):1==o.length&&Fr(o)?i[u]():i.thru(o);
return function(){var n=arguments,e=n[0];if(i&&1==n.length&&qo(e)&&e.length>=200)return i.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function _r(n,t,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=d,b=Array(d);y--;)b[y]=arguments[y];if(_){var x,m=Sr(l),y=b.length;for(x=0;y--;)b[y]===m&&x++}if(e&&(b=Qt(b,e,u,_)),o&&(b=Xt(b,o,i,_)),d-=x,_&&a>d)return m=$(b,m),xr(n,t,_r,l.placeholder,r,b,m,f,c,a-d);if(m=h?r:this,y=p?m[n]:n,d=b.length,f){x=b.length;
for(var j=zu(f.length,x),w=nr(b);j--;){var A=f[j];b[j]=z(A,x)?w[A]:q}}else g&&d>1&&b.reverse();return s&&d>c&&(b.length=c),this&&this!==Vn&&this instanceof l&&(y=v||sr(y)),y.apply(m,b)}var s=128&t,h=1&t,p=2&t,_=24&t,g=512&t,v=p?q:sr(n);return l}function gr(n,t){return function(r,e){return mt(r,n,t(e))}}function vr(n){return he(function(t){return t=a(ht(t,1),kr()),he(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function dr(n,t,r){return t=Ce(t),n=N(n),t&&t>n?(t-=n,r=r===q?" ":r+"",
n=Ge(r,Su(t/N(r))),In.test(r)?n.match(En).slice(0,t).join(""):n.slice(0,t)):""}function yr(n,t,e,u){function o(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Vn&&this instanceof o?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,i?e:this,s)}var i=1&t,f=sr(n);return o}function br(n){return function(t,r,e){e&&typeof e!="number"&&Mr(t,r,e)&&(r=e=q),t=ze(t),t=t===t?t:0,r===q?(r=t,t=0):r=ze(r)||0,e=e===q?r>t?1:-1:ze(e)||0;var u=-1;r=Uu(Su((r-t)/(e||1)),0);for(var o=Array(r);r--;)o[n?r:++u]=t,
t+=e;return o}}function xr(n,t,r,e,u,o,i,f,c,a){var l=8&t;f=f?nr(f):q;var s=l?i:q;i=l?q:i;var h=l?o:q;return o=l?q:o,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),t=[n,t,u,h,s,o,i,f,c,a],r=r.apply(q,t),Fr(n)&&fo(r,t),r.placeholder=e,r}function mr(n){var t=uu[n];return function(n,r){if(n=ze(n),r=Ce(r)){var e=(Le(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(Le(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function jr(n,t,r,e,u,o,i,f){var c=2&t;if(!c&&typeof n!="function")throw new iu("Expected a function");
var a=e?e.length:0;if(a||(t&=-97,e=u=q),i=i===q?i:Uu(Ce(i),0),f=f===q?f:Ce(f),a-=u?u.length:0,64&t){var l=e,s=u;e=u=q}var h=c?q:uo(n);return o=[n,t,r,e,u,l,s,o,i,f],h&&(r=o[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&h[8]>=o[7].length||384==n&&h[8]>=h[7].length&&8==r,131>t||e)&&(1&n&&(o[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?Qt(e,r,h[4]):nr(r),o[4]=e?$(o[3],"__lodash_placeholder__"):nr(h[4])),(r=h[5])&&(e=o[5],o[5]=e?Xt(e,r,h[6]):nr(r),o[6]=e?$(o[5],"__lodash_placeholder__"):nr(h[6])),(r=h[7])&&(o[7]=nr(r)),
128&n&&(o[8]=null==o[8]?h[8]:zu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=t),n=o[0],t=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:n.length:Uu(o[9]-a,0),!f&&24&t&&(t&=-25),(h?ro:fo)(t&&1!=t?8==t||16==t?hr(n,t,f):32!=t&&33!=t||u.length?_r.apply(q,o):yr(n,t,r,e):cr(n,t,r),o)}function wr(n,t,r,e,u,o){var i=-1,f=2&u,c=1&u,a=n.length,l=t.length;if(!(a==l||f&&l>a))return false;if(l=o.get(n))return l==t;for(l=true,o.set(n,t);++i<a;){var s=n[i],h=t[i];if(e)var _=f?e(h,s,i,t,n,o):e(s,h,i,n,t,o);if(_!==q){
if(_)continue;l=false;break}if(c){if(!p(t,function(n){return s===n||r(s,n,e,u,o)})){l=false;break}}else if(s!==h&&!r(s,h,e,u,o)){l=false;break}}return o["delete"](n),l}function Ar(n,t,r,e,u,o,i){switch(r){case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!e(new bu(n),new bu(t)))break;return true;case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":
return n==t+"";case"[object Map]":var f=L;case"[object Set]":if(f||(f=F),n.size!=t.size&&!(2&o))break;return(r=i.get(n))?r==t:wr(f(n),f(t),e,u,1|o,i.set(n,t));case"[object Symbol]":if(Yu)return Yu.call(n)==Yu.call(t)}return false}function Or(n){for(var t=n.name+"",r=Tu[t],e=lu.call(Tu,t)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}function kr(){var n=bn.iteratee||He,n=n===He?Ot:n;return arguments.length?n(arguments[0],arguments[1]):n}function Er(n){n=qe(n);for(var t=n.length;t--;){
var r=n[t][1];n[t][2]=r===r&&!je(r)}return n}function Ir(n,t){var r=n[t];return Ae(r)?r:q}function Sr(n){return(lu.call(bn,"placeholder")?bn:n).placeholder}function Rr(n){return pu.call(n)}function Wr(n,t,r){if(null==n)return false;var e=r(n,t);return e||Lr(t)||(t=et(t),n=Zr(n,t),null!=n&&(t=Vr(t),e=r(n,t))),r=n?n.length:q,e||!!r&&me(r)&&z(t,r)&&(qo(n)||Ie(n)||ge(n))}function Br(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&lu.call(n,"index")&&(r.index=n.index,r.input=n.input),
r}function Cr(n){return typeof n.constructor!="function"||Nr(n)?{}:ft(ju(n))}function Ur(r,e,u){var o=r.constructor;switch(e){case"[object ArrayBuffer]":return Ht(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e=u?Ht(r.buffer):r.buffer,
new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return s(L(r),n,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,pn.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return s(F(r),t,new r.constructor);case"[object Symbol]":return Yu?Object(Yu.call(r)):{}}}function zr(n){var t=n?n.length:q;return me(t)&&(qo(n)||Ie(n)||ge(n))?j(t,String):null}function Mr(n,t,r){if(!je(r))return false;var e=typeof t;
return("number"==e?ve(r)&&z(t,r.length):"string"==e&&t in r)?pe(r[t],n):false}function Lr(n,t){return typeof n=="number"?true:!qo(n)&&(en.test(n)||!rn.test(n)||null!=t&&n in Object(t))}function $r(n){var t=typeof n;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=n||null==n}function Fr(n){var t=Or(n),r=bn[t];return typeof r=="function"&&t in On.prototype?n===r?true:(t=uo(r),!!t&&n===t[0]):false}function Nr(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||cu)}function Dr(n,t,r,e,u,o){
return je(n)&&je(t)&&Rt(n,t,q,Dr,o.set(t,n)),n}function Zr(n,t){return 1==t.length?n:$e(n,Nt(t,0,-1))}function qr(n){var t=[];return Le(n).replace(un,function(n,r,e,u){t.push(e?u.replace(sn,"$1"):r||n)}),t}function Pr(n){if(n instanceof On)return n.clone();var t=new An(n.__wrapped__,n.__chain__);return t.__actions__=nr(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Tr(n,t,r){var e=n?n.length:0;return e?(t=r||t===q?1:Ce(t),Nt(n,0>t?0:t,e)):[]}function Kr(n,t,r){var e=n?n.length:0;
return e?(t=r||t===q?1:Ce(t),t=e-t,Nt(n,0,0>t?0:t)):[]}function Gr(n){return n?n[0]:q}function Vr(n){var t=n?n.length:0;return t?n[t-1]:q}function Jr(n,t){return n&&n.length&&t&&t.length?Mt(n,t):n}function Yr(n){return n?$u.call(n):n}function Hr(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){return de(n)?(t=Uu(n.length,t),true):void 0}),j(t,function(t){return a(n,Ut(t))})}function Qr(n,t){if(!n||!n.length)return[];var e=Hr(n);return null==t?e:a(e,function(n){return r(t,q,n)})}function Xr(n){
return n=bn(n),n.__chain__=true,n}function ne(n,t){return t(n)}function te(){return this}function re(n,t){return typeof t=="function"&&qo(n)?u(n,t):Qu(n,rt(t))}function ee(n,t){var r;if(typeof t=="function"&&qo(n)){for(r=n.length;r--&&false!==t(n[r],r,n););r=n}else r=Xu(n,rt(t));return r}function ue(n,t){return(qo(n)?a:Et)(n,kr(t,3))}function oe(n,t){var r=-1,e=Be(n),u=e.length,o=u-1;for(t=ut(Ce(t),0,u);++r<t;){var u=$t(r,o),i=e[u];e[u]=e[r],e[r]=i}return e.length=t,e}function ie(n,t,r){return t=r?q:t,
t=n&&null==t?n.length:t,jr(n,128,q,q,q,q,t)}function fe(n,t){var r;if(typeof t!="function")throw new iu("Expected a function");return n=Ce(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=q),r}}function ce(n,t,r){return t=r?q:t,n=jr(n,8,q,q,q,q,q,t),n.placeholder=ce.placeholder,n}function ae(n,t,r){return t=r?q:t,n=jr(n,16,q,q,q,q,q,t),n.placeholder=ae.placeholder,n}function le(n,t,r){function e(){p&&xu(p),a&&xu(a),g=0,c=a=h=p=_=q}function u(t,r){r&&xu(r),a=p=_=q,t&&(g=Uo(),l=n.apply(h,c),
p||a||(c=h=q))}function o(){var n=t-(Uo()-s);0>=n||n>t?u(_,a):p=Eu(o,n)}function i(){u(y,p)}function f(){if(c=arguments,s=Uo(),h=this,_=y&&(p||!v),false===d)var r=v&&!p;else{g||a||v||(g=s);var e=d-(s-g),u=(0>=e||e>d)&&(v||a);u?(a&&(a=xu(a)),g=s,l=n.apply(h,c)):a||(a=Eu(i,e))}return u&&p?p=xu(p):p||t===d||(p=Eu(o,t)),r&&(u=true,l=n.apply(h,c)),!u||p||a||(c=h=q),l}var c,a,l,s,h,p,_,g=0,v=false,d=false,y=true;if(typeof n!="function")throw new iu("Expected a function");return t=ze(t)||0,je(r)&&(v=!!r.leading,d="maxWait"in r&&Uu(ze(r.maxWait)||0,t),
y="trailing"in r?!!r.trailing:y),f.cancel=e,f.flush=function(){return(p&&_||a&&y)&&(l=n.apply(h,c)),e(),l},f}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 iu("Expected a function");return r.cache=new se.Cache,r}function he(n,t){if(typeof n!="function")throw new iu("Expected a function");return t=Uu(t===q?n.length-1:Ce(t),0),function(){for(var e=arguments,u=-1,o=Uu(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];
switch(t){case 0:return n.call(this,i);case 1:return n.call(this,e[0],i);case 2:return n.call(this,e[0],e[1],i)}for(o=Array(t+1),u=-1;++u<t;)o[u]=e[u];return o[t]=i,r(n,this,o)}}function pe(n,t){return n===t||n!==n&&t!==t}function _e(n,t){return n>t}function ge(n){return de(n)&&lu.call(n,"callee")&&(!ku.call(n,"callee")||"[object Arguments]"==pu.call(n))}function ve(n){return null!=n&&me(oo(n))&&!be(n)}function de(n){return we(n)&&ve(n)}function ye(n){return we(n)?"[object Error]"==pu.call(n)||typeof n.message=="string"&&typeof n.name=="string":false;
}function be(n){return n=je(n)?pu.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function xe(n){return typeof n=="number"&&n==Ce(n)}function me(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function je(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function we(n){return!!n&&typeof n=="object"}function Ae(n){return null==n?false:be(n)?gu.test(au.call(n)):we(n)&&(U(n)?gu:dn).test(n)}function Oe(n){return typeof n=="number"||we(n)&&"[object Number]"==pu.call(n);
}function ke(n){return!we(n)||"[object Object]"!=pu.call(n)||U(n)?false:(n=ju(n),null===n?true:(n=n.constructor,typeof n=="function"&&n instanceof n&&au.call(n)==hu))}function Ee(n){return je(n)&&"[object RegExp]"==pu.call(n)}function Ie(n){return typeof n=="string"||!qo(n)&&we(n)&&"[object String]"==pu.call(n)}function Se(n){return typeof n=="symbol"||we(n)&&"[object Symbol]"==pu.call(n)}function Re(n){return we(n)&&me(n.length)&&!!Cn[pu.call(n)]}function We(n,t){return t>n}function Be(n){if(!n)return[];
if(ve(n))return Ie(n)?n.match(En):nr(n);if(Au&&n[Au])return M(n[Au]());var t=Rr(n);return("[object Map]"==t?L:"[object Set]"==t?F:Pe)(n)}function Ce(n){if(!n)return 0===n?n:0;if(n=ze(n),n===P||n===-P)return 1.7976931348623157e308*(0>n?-1:1);var t=n%1;return n===n?t?n-t:n:0}function Ue(n){return n?ut(Ce(n),0,4294967295):0}function ze(n){if(je(n)&&(n=be(n.valueOf)?n.valueOf():n,n=je(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(cn,"");var t=vn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):gn.test(n)?T:+n;
}function Me(n){return tr(n,Ze(n))}function Le(n){if(typeof n=="string")return n;if(null==n)return"";if(Se(n))return Hu?Hu.call(n):"";var t=n+"";return"0"==t&&1/n==-P?"-0":t}function $e(n,t,r){return n=null==n?q:dt(n,t),n===q?r:n}function Fe(n,t){return Wr(n,t,yt)}function Ne(n,t){return Wr(n,t,bt)}function De(n){var t=Nr(n);if(!t&&!ve(n))return Cu(Object(n));var r,e=zr(n),u=!!e,e=e||[],o=e.length;for(r in n)!yt(n,r)||u&&("length"==r||z(r,o))||t&&"constructor"==r||e.push(r);return e}function Ze(n){
for(var t=-1,r=Nr(n),e=kt(n),u=e.length,o=zr(n),i=!!o,o=o||[],f=o.length;++t<u;){var c=e[t];i&&("length"==c||z(c,f))||"constructor"==c&&(r||!lu.call(n,c))||o.push(c)}return o}function qe(n){return w(n,De(n))}function Pe(n){return n?O(n,De(n)):[]}function Te(n){return ai(Le(n).toLowerCase())}function Ke(n){return(n=Le(n))&&n.replace(xn,R).replace(kn,"")}function Ge(n,t){n=Le(n),t=Ce(t);var r="";if(!n||1>t||t>9007199254740991)return r;do t%2&&(r+=n),t=Ru(t/2),n+=n;while(t);return r}function Ve(n,t,r){
return n=Le(n),t=r?q:t,t===q&&(t=Wn.test(n)?Rn:Sn),n.match(t)||[]}function Je(n){return function(){return n}}function Ye(n){return n}function He(n){return Ot(typeof n=="function"?n:ot(n,true))}function Qe(n,t,r){var e=De(t),o=vt(t,e);null!=r||je(t)&&(o.length||!e.length)||(r=t,t=n,n=this,o=vt(t,De(t)));var i=je(r)&&"chain"in r?r.chain:true,f=be(n);return u(o,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=nr(this.__actions__)).push({
func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,l([this.value()],arguments))})}),n}function Xe(){}function nu(n){return Lr(n)?Ut(n):zt(n)}function tu(n){return n&&n.length?m(n,Ye):0}I=I?Jn.defaults({},I,Jn.pick(Vn,Bn)):Vn;var ru=I.Date,eu=I.Error,uu=I.Math,ou=I.RegExp,iu=I.TypeError,fu=I.Array.prototype,cu=I.Object.prototype,au=I.Function.prototype.toString,lu=cu.hasOwnProperty,su=0,hu=au.call(Object),pu=cu.toString,_u=Vn._,gu=ou("^"+au.call(lu).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vu=Pn?I.Buffer:q,du=I.Reflect,yu=I.Symbol,bu=I.Uint8Array,xu=I.clearTimeout,mu=du?du.f:q,ju=Object.getPrototypeOf,wu=Object.getOwnPropertySymbols,Au=typeof(Au=yu&&yu.iterator)=="symbol"?Au:q,Ou=Object.create,ku=cu.propertyIsEnumerable,Eu=I.setTimeout,Iu=fu.splice,Su=uu.ceil,Ru=uu.floor,Wu=I.isFinite,Bu=fu.join,Cu=Object.keys,Uu=uu.max,zu=uu.min,Mu=I.parseInt,Lu=uu.random,$u=fu.reverse,Fu=Ir(I,"Map"),Nu=Ir(I,"Set"),Du=Ir(I,"WeakMap"),Zu=Ir(Object,"create"),qu=Du&&new Du,Pu=!{
valueOf:1}.propertyIsEnumerable("valueOf"),Tu={},Ku=Fu?au.call(Fu):"",Gu=Nu?au.call(Nu):"",Vu=Du?au.call(Du):"",Ju=yu?yu.prototype:q,Yu=Ju?Ju.valueOf:q,Hu=Ju?Ju.toString:q;bn.templateSettings={escape:X,evaluate:nn,interpolate:tn,variable:"",imports:{_:bn}};var Qu=ir(_t),Xu=ir(gt,true),no=fr(),to=fr(true);mu&&!ku.call({valueOf:1},"valueOf")&&(kt=function(n){return M(mu(n))});var ro=qu?function(n,t){return qu.set(n,t),n}:Ye,eo=Nu&&2===new Nu([1,2]).size?function(n){return new Nu(n)}:Xe,uo=qu?function(n){
return qu.get(n)}:Xe,oo=Ut("length"),io=wu||function(){return[]};(Fu&&"[object Map]"!=Rr(new Fu)||Nu&&"[object Set]"!=Rr(new Nu)||Du&&"[object WeakMap]"!=Rr(new Du))&&(Rr=function(n){var t=pu.call(n);if(n="[object Object]"==t?n.constructor:null,n=typeof n=="function"?au.call(n):"")switch(n){case Ku:return"[object Map]";case Gu:return"[object Set]";case Vu:return"[object WeakMap]"}return t});var fo=function(){var n=0,t=0;return function(r,e){var u=Uo(),o=16-(u-t);if(t=u,o>0){if(150<=++n)return r}else n=0;
return ro(r,e)}}(),co=he(function(n,t){qo(n)||(n=null==n?[]:[Object(n)]),t=ht(t,1);for(var r=n,e=t,u=-1,o=r.length,i=-1,f=e.length,c=Array(o+f);++u<o;)c[u]=r[u];for(;++i<f;)c[u++]=e[i];return c}),ao=he(function(n,t){return de(n)?at(n,ht(t,1,true)):[]}),lo=he(function(n,t){var r=Vr(t);return de(r)&&(r=q),de(n)?at(n,ht(t,1,true),kr(r)):[]}),so=he(function(n,t){var r=Vr(t);return de(r)&&(r=q),de(n)?at(n,ht(t,1,true),q,r):[]}),ho=he(function(n){var t=a(n,tt);return t.length&&t[0]===n[0]?xt(t):[]}),po=he(function(n){
var t=Vr(n),r=a(n,tt);return t===Vr(r)?t=q:r.pop(),r.length&&r[0]===n[0]?xt(r,kr(t)):[]}),_o=he(function(n){var t=Vr(n),r=a(n,tt);return t===Vr(r)?t=q:r.pop(),r.length&&r[0]===n[0]?xt(r,q,t):[]}),go=he(Jr),vo=he(function(n,t){t=a(ht(t,1),String);var r=nt(n,t);return Lt(n,t.sort(S)),r}),yo=he(function(n){return Tt(ht(n,1,true))}),bo=he(function(n){var t=Vr(n);return de(t)&&(t=q),Tt(ht(n,1,true),kr(t))}),xo=he(function(n){var t=Vr(n);return de(t)&&(t=q),Tt(ht(n,1,true),q,t)}),mo=he(function(n,t){return de(n)?at(n,t):[];
}),jo=he(function(n){return Vt(i(n,de))}),wo=he(function(n){var t=Vr(n);return de(t)&&(t=q),Vt(i(n,de),kr(t))}),Ao=he(function(n){var t=Vr(n);return de(t)&&(t=q),Vt(i(n,de),q,t)}),Oo=he(Hr),ko=he(function(n){var t=n.length,t=t>1?n[t-1]:q,t=typeof t=="function"?(n.pop(),t):q;return Qr(n,t)}),Eo=he(function(n){function t(t){return nt(t,n)}n=ht(n,1);var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return 1>=r&&!this.__actions__.length&&u instanceof On&&z(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:ne,
args:[t],thisArg:q}),new An(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(q),n})):this.thru(t)}),Io=ur(function(n,t,r){lu.call(n,r)?++n[r]:n[r]=1}),So=ur(function(n,t,r){lu.call(n,r)?n[r].push(t):n[r]=[t]}),Ro=he(function(n,t,e){var u=-1,o=typeof t=="function",i=Lr(t),f=ve(n)?Array(n.length):[];return Qu(n,function(n){var c=o?t:i&&null!=n?n[t]:q;f[++u]=c?r(c,n,e):jt(n,t,e)}),f}),Wo=ur(function(n,t,r){n[r]=t}),Bo=ur(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Co=he(function(n,t){
if(null==n)return[];var r=t.length;return r>1&&Mr(n,t[0],t[1])?t=[]:r>2&&Mr(t[0],t[1],t[2])&&(t.length=1),Wt(n,ht(t,1),[])}),Uo=ru.now,zo=he(function(n,t,r){var e=1;if(r.length)var u=$(r,Sr(zo)),e=32|e;return jr(n,e,t,r,u)}),Mo=he(function(n,t,r){var e=3;if(r.length)var u=$(r,Sr(Mo)),e=32|e;return jr(t,e,n,r,u)}),Lo=he(function(n,t){return ct(n,1,t)}),$o=he(function(n,t,r){return ct(n,ze(t)||0,r)}),Fo=he(function(n,t){t=a(ht(t,1),kr());var e=t.length;return he(function(u){for(var o=-1,i=zu(u.length,e);++o<i;)u[o]=t[o].call(this,u[o]);
return r(n,this,u)})}),No=he(function(n,t){var r=$(t,Sr(No));return jr(n,32,q,t,r)}),Do=he(function(n,t){var r=$(t,Sr(Do));return jr(n,64,q,t,r)}),Zo=he(function(n,t){return jr(n,256,q,q,q,ht(t,1))}),qo=Array.isArray,Po=vu?function(n){return n instanceof vu}:Je(false),To=or(function(n,t){if(Pu||Nr(t)||ve(t))tr(t,De(t),n);else for(var r in t)lu.call(t,r)&&Hn(n,r,t[r])}),Ko=or(function(n,t){if(Pu||Nr(t)||ve(t))tr(t,Ze(t),n);else for(var r in t)Hn(n,r,t[r])}),Go=or(function(n,t,r,e){rr(t,Ze(t),n,e)}),Vo=or(function(n,t,r,e){
rr(t,De(t),n,e)}),Jo=he(function(n,t){return nt(n,ht(t,1))}),Yo=he(function(n){return n.push(q,Gn),r(Go,q,n)}),Ho=he(function(n){return n.push(q,Dr),r(ri,q,n)}),Qo=gr(function(n,t,r){n[t]=r},Je(Ye)),Xo=gr(function(n,t,r){lu.call(n,t)?n[t].push(r):n[t]=[r]},kr),ni=he(jt),ti=or(function(n,t,r){Rt(n,t,r)}),ri=or(function(n,t,r,e){Rt(n,t,r,e)}),ei=he(function(n,t){return null==n?{}:(t=a(ht(t,1),String),Bt(n,at(Ze(n),t)))}),ui=he(function(n,t){return null==n?{}:Bt(n,ht(t,1))}),oi=lr(function(n,t,r){return t=t.toLowerCase(),
n+(r?Te(t):t)}),ii=lr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),fi=lr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),ci=ar("toLowerCase"),ai=ar("toUpperCase"),li=lr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),si=lr(function(n,t,r){return n+(r?" ":"")+Te(t)}),hi=lr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),pi=he(function(n,t){try{return r(n,q,t)}catch(e){return ye(e)?e:new eu(e)}}),_i=he(function(n,t){return u(ht(t,1),function(t){n[t]=zo(n[t],n)}),n}),gi=pr(),vi=pr(true),di=he(function(n,t){
return function(r){return jt(r,n,t)}}),yi=he(function(n,t){return function(r){return jt(n,r,t)}}),bi=vr(a),xi=vr(o),mi=vr(p),ji=br(),wi=br(true),Ai=mr("ceil"),Oi=mr("floor"),ki=mr("round");return bn.prototype=wn.prototype,bn.prototype.constructor=bn,An.prototype=ft(wn.prototype),An.prototype.constructor=An,On.prototype=ft(wn.prototype),On.prototype.constructor=On,zn.prototype=Zu?Zu(null):cu,Mn.prototype.clear=function(){this.__data__={hash:new zn,map:Fu?new Fu:[],string:new zn}},Mn.prototype["delete"]=function(n){
var t=this.__data__;return $r(n)?(t=typeof n=="string"?t.string:t.hash,n=(Zu?t[n]!==q:lu.call(t,n))&&delete t[n]):n=Fu?t.map["delete"](n):Zn(t.map,n),n},Mn.prototype.get=function(n){var t=this.__data__;return $r(n)?(t=typeof n=="string"?t.string:t.hash,Zu?(n=t[n],n="__lodash_hash_undefined__"===n?q:n):n=lu.call(t,n)?t[n]:q):n=Fu?t.map.get(n):qn(t.map,n),n},Mn.prototype.has=function(n){var t=this.__data__;return $r(n)?(t=typeof n=="string"?t.string:t.hash,n=Zu?t[n]!==q:lu.call(t,n)):n=Fu?t.map.has(n):-1<Tn(t.map,n),
n},Mn.prototype.set=function(n,t){var r=this.__data__;return $r(n)?(typeof n=="string"?r.string:r.hash)[n]=Zu&&t===q?"__lodash_hash_undefined__":t:Fu?r.map.set(n,t):Kn(r.map,n,t),this},Ln.prototype.push=function(n){var t=this.__data__;$r(n)?(t=t.__data__,(typeof n=="string"?t.string:t.hash)[n]="__lodash_hash_undefined__"):t.set(n,"__lodash_hash_undefined__")},Fn.prototype.clear=function(){this.__data__={array:[],map:null}},Fn.prototype["delete"]=function(n){var t=this.__data__,r=t.array;return r?Zn(r,n):t.map["delete"](n);
},Fn.prototype.get=function(n){var t=this.__data__,r=t.array;return r?qn(r,n):t.map.get(n)},Fn.prototype.has=function(n){var t=this.__data__,r=t.array;return r?-1<Tn(r,n):t.map.has(n)},Fn.prototype.set=function(n,t){var r=this.__data__,e=r.array;return e&&(199>e.length?Kn(e,n,t):(r.array=null,r.map=new Mn(e))),(r=r.map)&&r.set(n,t),this},se.Cache=Mn,bn.after=function(n,t){if(typeof t!="function")throw new iu("Expected a function");return n=Ce(n),function(){return 1>--n?t.apply(this,arguments):void 0;
}},bn.ary=ie,bn.assign=To,bn.assignIn=Ko,bn.assignInWith=Go,bn.assignWith=Vo,bn.at=Jo,bn.before=fe,bn.bind=zo,bn.bindAll=_i,bn.bindKey=Mo,bn.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return qo(n)?n:[n]},bn.chain=Xr,bn.chunk=function(n,t){t=Uu(Ce(t),0);var r=n?n.length:0;if(!r||1>t)return[];for(var e=0,u=0,o=Array(Su(r/t));r>e;)o[u++]=Nt(n,e,e+=t);return o},bn.compact=function(n){for(var t=-1,r=n?n.length:0,e=0,u=[];++t<r;){var o=n[t];o&&(u[e++]=o)}return u},bn.concat=co,
bn.cond=function(n){var t=n?n.length:0,e=kr();return n=t?a(n,function(n){if("function"!=typeof n[1])throw new iu("Expected a function");return[e(n[0]),n[1]]}):[],he(function(e){for(var u=-1;++u<t;){var o=n[u];if(r(o[0],this,e))return r(o[1],this,e)}})},bn.conforms=function(n){return it(ot(n,true))},bn.constant=Je,bn.countBy=Io,bn.create=function(n,t){var r=ft(n);return t?Xn(r,t):r},bn.curry=ce,bn.curryRight=ae,bn.debounce=le,bn.defaults=Yo,bn.defaultsDeep=Ho,bn.defer=Lo,bn.delay=$o,bn.difference=ao,
bn.differenceBy=lo,bn.differenceWith=so,bn.drop=Tr,bn.dropRight=Kr,bn.dropRightWhile=function(n,t){return n&&n.length?Kt(n,kr(t,3),true,true):[]},bn.dropWhile=function(n,t){return n&&n.length?Kt(n,kr(t,3),true):[]},bn.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&Mr(n,t,r)&&(r=0,e=u),u=n.length,r=Ce(r),0>r&&(r=-r>u?0:u+r),e=e===q||e>u?u:Ce(e),0>e&&(e+=u),e=r>e?0:Ue(e);e>r;)n[r++]=t;return n},bn.filter=function(n,t){return(qo(n)?i:st)(n,kr(t,3))},bn.flatMap=function(n,t){
return ht(ue(n,t),1)},bn.flatten=function(n){return n&&n.length?ht(n,1):[]},bn.flattenDeep=function(n){return n&&n.length?ht(n,P):[]},bn.flattenDepth=function(n,t){return n&&n.length?(t=t===q?1:Ce(t),ht(n,t)):[]},bn.flip=function(n){return jr(n,512)},bn.flow=gi,bn.flowRight=vi,bn.fromPairs=function(n){for(var t=-1,r=n?n.length:0,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e},bn.functions=function(n){return null==n?[]:vt(n,De(n))},bn.functionsIn=function(n){return null==n?[]:vt(n,Ze(n))},bn.groupBy=So,
bn.initial=function(n){return Kr(n,1)},bn.intersection=ho,bn.intersectionBy=po,bn.intersectionWith=_o,bn.invert=Qo,bn.invertBy=Xo,bn.invokeMap=Ro,bn.iteratee=He,bn.keyBy=Wo,bn.keys=De,bn.keysIn=Ze,bn.map=ue,bn.mapKeys=function(n,t){var r={};return t=kr(t,3),_t(n,function(n,e,u){r[t(n,e,u)]=n}),r},bn.mapValues=function(n,t){var r={};return t=kr(t,3),_t(n,function(n,e,u){r[e]=t(n,e,u)}),r},bn.matches=function(n){return It(ot(n,true))},bn.matchesProperty=function(n,t){return St(n,ot(t,true))},bn.memoize=se,
bn.merge=ti,bn.mergeWith=ri,bn.method=di,bn.methodOf=yi,bn.mixin=Qe,bn.negate=function(n){if(typeof n!="function")throw new iu("Expected a function");return function(){return!n.apply(this,arguments)}},bn.nthArg=function(n){return n=Ce(n),function(){return arguments[n]}},bn.omit=ei,bn.omitBy=function(n,t){return t=kr(t),Ct(n,function(n,r){return!t(n,r)})},bn.once=function(n){return fe(2,n)},bn.orderBy=function(n,t,r,e){return null==n?[]:(qo(t)||(t=null==t?[]:[t]),r=e?q:r,qo(r)||(r=null==r?[]:[r]),
Wt(n,t,r))},bn.over=bi,bn.overArgs=Fo,bn.overEvery=xi,bn.overSome=mi,bn.partial=No,bn.partialRight=Do,bn.partition=Bo,bn.pick=ui,bn.pickBy=function(n,t){return null==n?{}:Ct(n,kr(t))},bn.property=nu,bn.propertyOf=function(n){return function(t){return null==n?q:dt(n,t)}},bn.pull=go,bn.pullAll=Jr,bn.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?Mt(n,t,kr(r)):n},bn.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?Mt(n,t,q,r):n},bn.pullAt=vo,bn.range=ji,bn.rangeRight=wi,bn.rearg=Zo,
bn.reject=function(n,t){var r=qo(n)?i:st;return t=kr(t,3),r(n,function(n,r,e){return!t(n,r,e)})},bn.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],o=n.length;for(t=kr(t,3);++e<o;){var i=n[e];t(i,e,n)&&(r.push(i),u.push(e))}return Lt(n,u),r},bn.rest=he,bn.reverse=Yr,bn.sampleSize=oe,bn.set=function(n,t,r){return null==n?n:Ft(n,t,r)},bn.setWith=function(n,t,r,e){return e=typeof e=="function"?e:q,null==n?n:Ft(n,t,r,e)},bn.shuffle=function(n){return oe(n,4294967295)},bn.slice=function(n,t,r){
var e=n?n.length:0;return e?(r&&typeof r!="number"&&Mr(n,t,r)?(t=0,r=e):(t=null==t?0:Ce(t),r=r===q?e:Ce(r)),Nt(n,t,r)):[]},bn.sortBy=Co,bn.sortedUniq=function(n){return n&&n.length?Pt(n):[]},bn.sortedUniqBy=function(n,t){return n&&n.length?Pt(n,kr(t)):[]},bn.split=function(n,t,r){return Le(n).split(t,r)},bn.spread=function(n,t){if(typeof n!="function")throw new iu("Expected a function");return t=t===q?0:Uu(Ce(t),0),he(function(e){var u=e[t];return e=e.slice(0,t),u&&l(e,u),r(n,this,e)})},bn.tail=function(n){
return Tr(n,1)},bn.take=function(n,t,r){return n&&n.length?(t=r||t===q?1:Ce(t),Nt(n,0,0>t?0:t)):[]},bn.takeRight=function(n,t,r){var e=n?n.length:0;return e?(t=r||t===q?1:Ce(t),t=e-t,Nt(n,0>t?0:t,e)):[]},bn.takeRightWhile=function(n,t){return n&&n.length?Kt(n,kr(t,3),false,true):[]},bn.takeWhile=function(n,t){return n&&n.length?Kt(n,kr(t,3)):[]},bn.tap=function(n,t){return t(n),n},bn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new iu("Expected a function");return je(r)&&(e="leading"in r?!!r.leading:e,
u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:t,trailing:u})},bn.thru=ne,bn.toArray=Be,bn.toPairs=qe,bn.toPairsIn=function(n){return w(n,Ze(n))},bn.toPath=function(n){return qo(n)?a(n,String):qr(n)},bn.toPlainObject=Me,bn.transform=function(n,t,r){var e=qo(n)||Re(n);if(t=kr(t,4),null==r)if(e||je(n)){var o=n.constructor;r=e?qo(n)?new o:[]:be(o)?ft(ju(n)):{}}else r={};return(e?u:_t)(n,function(n,e,u){return t(r,n,e,u)}),r},bn.unary=function(n){return ie(n,1)},bn.union=yo,bn.unionBy=bo,
bn.unionWith=xo,bn.uniq=function(n){return n&&n.length?Tt(n):[]},bn.uniqBy=function(n,t){return n&&n.length?Tt(n,kr(t)):[]},bn.uniqWith=function(n,t){return n&&n.length?Tt(n,q,t):[]},bn.unset=function(n,t){var r;if(null==n)r=true;else{r=n;var e=t,e=Lr(e,r)?[e+""]:et(e);r=Zr(r,e),e=Vr(e),r=null!=r&&Fe(r,e)?delete r[e]:true}return r},bn.unzip=Hr,bn.unzipWith=Qr,bn.update=function(n,t,r){return null==n?n:Ft(n,t,rt(r)(dt(n,t)),void 0)},bn.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:q,null!=n&&(n=Ft(n,t,rt(r)(dt(n,t)),e)),
n},bn.values=Pe,bn.valuesIn=function(n){return null==n?[]:O(n,Ze(n))},bn.without=mo,bn.words=Ve,bn.wrap=function(n,t){return t=null==t?Ye:t,No(t,n)},bn.xor=jo,bn.xorBy=wo,bn.xorWith=Ao,bn.zip=Oo,bn.zipObject=function(n,t){return Jt(n||[],t||[],Hn)},bn.zipObjectDeep=function(n,t){return Jt(n||[],t||[],Ft)},bn.zipWith=ko,bn.extend=Ko,bn.extendWith=Go,Qe(bn,bn),bn.add=function(n,t){var r;return n===q&&t===q?0:(n!==q&&(r=n),t!==q&&(r=r===q?t:r+t),r)},bn.attempt=pi,bn.camelCase=oi,bn.capitalize=Te,bn.ceil=Ai,
bn.clamp=function(n,t,r){return r===q&&(r=t,t=q),r!==q&&(r=ze(r),r=r===r?r:0),t!==q&&(t=ze(t),t=t===t?t:0),ut(ze(n),t,r)},bn.clone=function(n){return ot(n)},bn.cloneDeep=function(n){return ot(n,true)},bn.cloneDeepWith=function(n,t){return ot(n,true,t)},bn.cloneWith=function(n,t){return ot(n,false,t)},bn.deburr=Ke,bn.endsWith=function(n,t,r){n=Le(n),t=typeof t=="string"?t:t+"";var e=n.length;return r=r===q?e:ut(Ce(r),0,e),r-=t.length,r>=0&&n.indexOf(t,r)==r},bn.eq=pe,bn.escape=function(n){return(n=Le(n))&&Q.test(n)?n.replace(Y,W):n;
},bn.escapeRegExp=function(n){return(n=Le(n))&&fn.test(n)?n.replace(on,"\\$&"):n},bn.every=function(n,t,r){var e=qo(n)?o:lt;return r&&Mr(n,t,r)&&(t=q),e(n,kr(t,3))},bn.find=function(n,t){if(t=kr(t,3),qo(n)){var r=v(n,t);return r>-1?n[r]:q}return g(n,t,Qu)},bn.findIndex=function(n,t){return n&&n.length?v(n,kr(t,3)):-1},bn.findKey=function(n,t){return g(n,kr(t,3),_t,true)},bn.findLast=function(n,t){if(t=kr(t,3),qo(n)){var r=v(n,t,true);return r>-1?n[r]:q}return g(n,t,Xu)},bn.findLastIndex=function(n,t){
return n&&n.length?v(n,kr(t,3),true):-1},bn.findLastKey=function(n,t){return g(n,kr(t,3),gt,true)},bn.floor=Oi,bn.forEach=re,bn.forEachRight=ee,bn.forIn=function(n,t){return null==n?n:no(n,rt(t),Ze)},bn.forInRight=function(n,t){return null==n?n:to(n,rt(t),Ze)},bn.forOwn=function(n,t){return n&&_t(n,rt(t))},bn.forOwnRight=function(n,t){return n&&gt(n,rt(t))},bn.get=$e,bn.gt=_e,bn.gte=function(n,t){return n>=t},bn.has=Fe,bn.hasIn=Ne,bn.head=Gr,bn.identity=Ye,bn.includes=function(n,t,r,e){return n=ve(n)?n:Pe(n),
r=r&&!e?Ce(r):0,e=n.length,0>r&&(r=Uu(e+r,0)),Ie(n)?e>=r&&-1<n.indexOf(t,r):!!e&&-1<d(n,t,r)},bn.indexOf=function(n,t,r){var e=n?n.length:0;return e?(r=Ce(r),0>r&&(r=Uu(e+r,0)),d(n,t,r)):-1},bn.inRange=function(n,t,r){return t=ze(t)||0,r===q?(r=t,t=0):r=ze(r)||0,n=ze(n),n>=zu(t,r)&&n<Uu(t,r)},bn.invoke=ni,bn.isArguments=ge,bn.isArray=qo,bn.isArrayBuffer=function(n){return we(n)&&"[object ArrayBuffer]"==pu.call(n)},bn.isArrayLike=ve,bn.isArrayLikeObject=de,bn.isBoolean=function(n){return true===n||false===n||we(n)&&"[object Boolean]"==pu.call(n);
},bn.isBuffer=Po,bn.isDate=function(n){return we(n)&&"[object Date]"==pu.call(n)},bn.isElement=function(n){return!!n&&1===n.nodeType&&we(n)&&!ke(n)},bn.isEmpty=function(n){if(ve(n)&&(qo(n)||Ie(n)||be(n.splice)||ge(n)))return!n.length;for(var t in n)if(lu.call(n,t))return false;return true},bn.isEqual=function(n,t){return wt(n,t)},bn.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:q)?r(n,t):q;return e===q?wt(n,t,r):!!e},bn.isError=ye,bn.isFinite=function(n){return typeof n=="number"&&Wu(n)},bn.isFunction=be,
bn.isInteger=xe,bn.isLength=me,bn.isMap=function(n){return we(n)&&"[object Map]"==Rr(n)},bn.isMatch=function(n,t){return n===t||At(n,t,Er(t))},bn.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:q,At(n,t,Er(t),r)},bn.isNaN=function(n){return Oe(n)&&n!=+n},bn.isNative=Ae,bn.isNil=function(n){return null==n},bn.isNull=function(n){return null===n},bn.isNumber=Oe,bn.isObject=je,bn.isObjectLike=we,bn.isPlainObject=ke,bn.isRegExp=Ee,bn.isSafeInteger=function(n){return xe(n)&&n>=-9007199254740991&&9007199254740991>=n;
},bn.isSet=function(n){return we(n)&&"[object Set]"==Rr(n)},bn.isString=Ie,bn.isSymbol=Se,bn.isTypedArray=Re,bn.isUndefined=function(n){return n===q},bn.isWeakMap=function(n){return we(n)&&"[object WeakMap]"==Rr(n)},bn.isWeakSet=function(n){return we(n)&&"[object WeakSet]"==pu.call(n)},bn.join=function(n,t){return n?Bu.call(n,t):""},bn.kebabCase=ii,bn.last=Vr,bn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(r!==q&&(u=Ce(r),u=(0>u?Uu(e+u,0):zu(u,e-1))+1),t!==t)return C(n,u,true);
for(;u--;)if(n[u]===t)return u;return-1},bn.lowerCase=fi,bn.lowerFirst=ci,bn.lt=We,bn.lte=function(n,t){return t>=n},bn.max=function(n){return n&&n.length?_(n,Ye,_e):q},bn.maxBy=function(n,t){return n&&n.length?_(n,kr(t),_e):q},bn.mean=function(n){return tu(n)/(n?n.length:0)},bn.min=function(n){return n&&n.length?_(n,Ye,We):q},bn.minBy=function(n,t){return n&&n.length?_(n,kr(t),We):q},bn.noConflict=function(){return Vn._===this&&(Vn._=_u),this},bn.noop=Xe,bn.now=Uo,bn.pad=function(n,t,r){n=Le(n),
t=Ce(t);var e=N(n);return t&&t>e?(e=(t-e)/2,t=Ru(e),e=Su(e),dr("",t,r)+n+dr("",e,r)):n},bn.padEnd=function(n,t,r){return n=Le(n),n+dr(n,t,r)},bn.padStart=function(n,t,r){return n=Le(n),dr(n,t,r)+n},bn.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),n=Le(n).replace(cn,""),Mu(n,t||(_n.test(n)?16:10))},bn.random=function(n,t,r){if(r&&typeof r!="boolean"&&Mr(n,t,r)&&(t=r=q),r===q&&(typeof t=="boolean"?(r=t,t=q):typeof n=="boolean"&&(r=n,n=q)),n===q&&t===q?(n=0,t=1):(n=ze(n)||0,t===q?(t=n,n=0):t=ze(t)||0),
n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Lu(),zu(n+r*(t-n+Nn("1e-"+((r+"").length-1))),t)):$t(n,t)},bn.reduce=function(n,t,r){var e=qo(n)?s:b,u=3>arguments.length;return e(n,kr(t,4),r,u,Qu)},bn.reduceRight=function(n,t,r){var e=qo(n)?h:b,u=3>arguments.length;return e(n,kr(t,4),r,u,Xu)},bn.repeat=Ge,bn.replace=function(){var n=arguments,t=Le(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},bn.result=function(n,t,r){if(Lr(t,n))e=null==n?q:n[t];else{t=et(t);var e=$e(n,t);n=Zr(n,t)}return e===q&&(e=r),
be(e)?e.call(n):e},bn.round=ki,bn.runInContext=Z,bn.sample=function(n){n=ve(n)?n:Pe(n);var t=n.length;return t>0?n[$t(0,t-1)]:q},bn.size=function(n){if(null==n)return 0;if(ve(n)){var t=n.length;return t&&Ie(n)?N(n):t}return De(n).length},bn.snakeCase=li,bn.some=function(n,t,r){var e=qo(n)?p:Dt;return r&&Mr(n,t,r)&&(t=q),e(n,kr(t,3))},bn.sortedIndex=function(n,t){return Zt(n,t)},bn.sortedIndexBy=function(n,t,r){return qt(n,t,kr(r))},bn.sortedIndexOf=function(n,t){var r=n?n.length:0;if(r){var e=Zt(n,t);
if(r>e&&pe(n[e],t))return e}return-1},bn.sortedLastIndex=function(n,t){return Zt(n,t,true)},bn.sortedLastIndexBy=function(n,t,r){return qt(n,t,kr(r),true)},bn.sortedLastIndexOf=function(n,t){if(n&&n.length){var r=Zt(n,t,true)-1;if(pe(n[r],t))return r}return-1},bn.startCase=si,bn.startsWith=function(n,t,r){return n=Le(n),r=ut(Ce(r),0,n.length),n.lastIndexOf(t,r)==r},bn.subtract=function(n,t){var r;return n===q&&t===q?0:(n!==q&&(r=n),t!==q&&(r=r===q?t:r-t),r)},bn.sum=tu,bn.sumBy=function(n,t){return n&&n.length?m(n,kr(t)):0;
},bn.template=function(n,t,r){var e=bn.templateSettings;r&&Mr(n,t,r)&&(t=q),n=Le(n),t=Go({},t,e,Gn),r=Go({},t.imports,e.imports,Gn);var u,o,i=De(r),f=O(r,i),c=0;r=t.interpolate||mn;var a="__p+='";r=ou((t.escape||mn).source+"|"+r.source+"|"+(r===tn?hn:mn).source+"|"+(t.evaluate||mn).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,i,f,l){return e||(e=i),a+=n.slice(c,l).replace(jn,B),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),
e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(K,""):a).replace(G,"$1").replace(V,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=pi(function(){return Function(i,l+"return "+a).apply(q,f)}),t.source=a,ye(t))throw t;return t},bn.times=function(n,t){if(n=Ce(n),1>n||n>9007199254740991)return[];
var r=4294967295,e=zu(n,4294967295);for(t=rt(t),n-=4294967295,e=j(e,t);++r<n;)t(r);return e},bn.toInteger=Ce,bn.toLength=Ue,bn.toLower=function(n){return Le(n).toLowerCase()},bn.toNumber=ze,bn.toSafeInteger=function(n){return ut(Ce(n),-9007199254740991,9007199254740991)},bn.toString=Le,bn.toUpper=function(n){return Le(n).toUpperCase()},bn.trim=function(n,t,r){return(n=Le(n))?r||t===q?n.replace(cn,""):(t+="")?(n=n.match(En),t=t.match(En),n.slice(k(n,t),E(n,t)+1).join("")):n:n},bn.trimEnd=function(n,t,r){
return(n=Le(n))?r||t===q?n.replace(ln,""):(t+="")?(n=n.match(En),n.slice(0,E(n,t.match(En))+1).join("")):n:n},bn.trimStart=function(n,t,r){return(n=Le(n))?r||t===q?n.replace(an,""):(t+="")?(n=n.match(En),n.slice(k(n,t.match(En))).join("")):n:n},bn.truncate=function(n,t){var r=30,e="...";if(je(t))var u="separator"in t?t.separator:u,r="length"in t?Ce(t.length):r,e="omission"in t?Le(t.omission):e;n=Le(n);var o=n.length;if(In.test(n))var i=n.match(En),o=i.length;if(r>=o)return n;if(o=r-N(e),1>o)return e;
if(r=i?i.slice(0,o).join(""):n.slice(0,o),u===q)return r+e;if(i&&(o+=r.length-o),Ee(u)){if(n.slice(o).search(u)){var f=r;for(u.global||(u=ou(u.source,Le(pn.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===q?o:c)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},bn.unescape=function(n){return(n=Le(n))&&H.test(n)?n.replace(J,D):n},bn.uniqueId=function(n){var t=++su;return Le(n)+t},bn.upperCase=hi,bn.upperFirst=ai,bn.each=re,bn.eachRight=ee,bn.first=Gr,
Qe(bn,function(){var n={};return _t(bn,function(t,r){lu.call(bn.prototype,r)||(n[r]=t)}),n}(),{chain:false}),bn.VERSION="4.6.0",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){bn[n].placeholder=bn}),u(["drop","take"],function(n,t){On.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new On(this);r=r===q?1:Uu(Ce(r),0);var u=this.clone();return e?u.__takeCount__=zu(r,u.__takeCount__):u.__views__.push({size:zu(r,4294967295),type:n+(0>u.__dir__?"Right":"")}),
u},On.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;On.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:kr(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");On.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");On.prototype[n]=function(){return this.__filtered__?new On(this):this[r](1);
}}),On.prototype.compact=function(){return this.filter(Ye)},On.prototype.find=function(n){return this.filter(n).head()},On.prototype.findLast=function(n){return this.reverse().find(n)},On.prototype.invokeMap=he(function(n,t){return typeof n=="function"?new On(this):this.map(function(r){return jt(r,n,t)})}),On.prototype.reject=function(n){return n=kr(n,3),this.filter(function(t){return!n(t)})},On.prototype.slice=function(n,t){n=Ce(n);var r=this;return r.__filtered__&&(n>0||0>t)?new On(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),
t!==q&&(t=Ce(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},On.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},On.prototype.toArray=function(){return this.take(4294967295)},_t(On.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=bn[e?"take"+("last"==t?"Right":""):t],o=e||/^find/.test(t);u&&(bn.prototype[t]=function(){function t(n){return n=u.apply(bn,l([n],f)),e&&h?n[0]:n}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof On,a=f[0],s=c||qo(i);
s&&r&&typeof a=="function"&&1!=a.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new On(this),i=n.apply(i,f),i.__actions__.push({func:ne,args:[t],thisArg:q}),new An(i,h)):a&&c?n.apply(this,f):(i=this.thru(t),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=fu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);bn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){
return t.apply(r,n)})}}),_t(On.prototype,function(n,t){var r=bn[t];if(r){var e=r.name+"";(Tu[e]||(Tu[e]=[])).push({name:t,func:r})}}),Tu[_r(q,2).name]=[{name:"wrapper",func:q}],On.prototype.clone=function(){var n=new On(this.__wrapped__);return n.__actions__=nr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=nr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=nr(this.__views__),n},On.prototype.reverse=function(){if(this.__filtered__){var n=new On(this);
n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},On.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=qo(t),u=0>r,o=e?t.length:0;n=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=zu(n,f+s);break;case"takeRight":f=Uu(f,n-s)}}if(n={start:f,end:n},i=n.start,f=n.end,n=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=zu(n,this.__takeCount__),!e||200>o||o==n&&a==n)return Gt(t,this.__actions__);
e=[];n:for(;n--&&a>c;){for(u+=r,o=-1,l=t[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue n;break n}}e[c++]=l}return e},bn.prototype.at=Eo,bn.prototype.chain=function(){return Xr(this)},bn.prototype.commit=function(){return new An(this.value(),this.__chain__)},bn.prototype.flatMap=function(n){return this.map(n).flatten()},bn.prototype.next=function(){this.__values__===q&&(this.__values__=Be(this.value()));var n=this.__index__>=this.__values__.length,t=n?q:this.__values__[this.__index__++];
return{done:n,value:t}},bn.prototype.plant=function(n){for(var t,r=this;r instanceof wn;){var e=Pr(r);e.__index__=0,e.__values__=q,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},bn.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof On?(this.__actions__.length&&(n=new On(this)),n=n.reverse(),n.__actions__.push({func:ne,args:[Yr],thisArg:q}),new An(n,this.__chain__)):this.thru(Yr)},bn.prototype.toJSON=bn.prototype.valueOf=bn.prototype.value=function(){return Gt(this.__wrapped__,this.__actions__);
},Au&&(bn.prototype[Au]=te),bn}var q,P=1/0,T=NaN,K=/\b__p\+='';/g,G=/\b(__p\+=)''\+/g,V=/(__e\(.*?\)|\b__t\))\+'';/g,J=/&(?:amp|lt|gt|quot|#39|#96);/g,Y=/[&<>"'`]/g,H=RegExp(J.source),Q=RegExp(Y.source),X=/<%-([\s\S]+?)%>/g,nn=/<%([\s\S]+?)%>/g,tn=/<%=([\s\S]+?)%>/g,rn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,en=/^\w*$/,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\\(\\)?/g,hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pn=/\w*$/,_n=/^0x/i,gn=/^[-+]0x[0-9a-f]+$/i,vn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,mn=/($^)/,jn=/['\n\r\u2028\u2029\\]/g,wn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+wn,On="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",kn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),En=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+On+wn,"g"),In=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Sn=/[a-zA-Z0-9]+/g,Rn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|\\d+",An].join("|"),"g"),Wn=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bn="Array Buffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Cn={};
Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false;
var Un={};Un["[object Arguments]"]=Un["[object Array]"]=Un["[object ArrayBuffer]"]=Un["[object Boolean]"]=Un["[object Date]"]=Un["[object Float32Array]"]=Un["[object Float64Array]"]=Un["[object Int8Array]"]=Un["[object Int16Array]"]=Un["[object Int32Array]"]=Un["[object Map]"]=Un["[object Number]"]=Un["[object Object]"]=Un["[object RegExp]"]=Un["[object Set]"]=Un["[object String]"]=Un["[object Symbol]"]=Un["[object Uint8Array]"]=Un["[object Uint8ClampedArray]"]=Un["[object Uint16Array]"]=Un["[object Uint32Array]"]=true,
Un["[object Error]"]=Un["[object Function]"]=Un["[object WeakMap]"]=false;var zn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O",
"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Mn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Ln={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},$n={"function":true,object:true},Fn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"
},Nn=parseFloat,Dn=parseInt,Zn=$n[typeof exports]&&exports&&!exports.nodeType?exports:q,qn=$n[typeof module]&&module&&!module.nodeType?module:q,Pn=qn&&qn.exports===Zn?Zn:q,Tn=I($n[typeof self]&&self),Kn=I($n[typeof window]&&window),Gn=I($n[typeof this]&&this),Vn=I(Zn&&qn&&typeof global=="object"&&global)||Kn!==(Gn&&Gn.window)&&Kn||Tn||Gn||Function("return this")(),Jn=Z();(Kn||Tn||{})._=Jn,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Jn}):Zn&&qn?(Pn&&((qn.exports=Jn)._=Jn),
Zn._=Jn):Vn._=Jn}).call(this);
;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t?t.length:0;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t?t.length:0;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=t?t.length:0;r--&&false!==n(t[r],r,t););
return t}function i(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(!n(t[r],r,t))return false;return true}function f(t,n){for(var r=-1,e=t?t.length:0,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function c(t,n){return!(!t||!t.length)&&-1<d(t,n,0)}function a(t,n,r){for(var e=-1,u=t?t.length:0;++e<u;)if(r(n,t[e]))return true;return false}function l(t,n){for(var r=-1,e=t?t.length:0,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function s(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function h(t,n,r,e){
var u=-1,o=t?t.length:0;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function p(t,n,r,e){var u=t?t.length:0;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function _(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(n(t[r],r,t))return true;return false}function v(t,n,r){var e;return r(t,function(t,r,u){return n(t,r,u)?(e=r,false):void 0}),e}function g(t,n,r,e){var u=t.length;for(r+=e?1:-1;e?r--:++r<u;)if(n(t[r],r,t))return r;return-1}function d(t,n,r){if(n!==n)return M(t,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r;
return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t,n){var r=t?t.length:0;return r?w(t,n)/r:V}function x(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function j(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function w(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==T&&(r=r===T?o:r+o)}return r}function m(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function A(t,n){return l(n,function(n){return[n,t[n]];
})}function O(t){return function(n){return t(n)}}function k(t,n){return l(n,function(n){return t[n]})}function E(t,n){return t.has(n)}function S(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function I(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function R(t){return t&&t.Object===Object?t:null}function W(t){return zt[t]}function B(t){return Ut[t]}function L(t){return"\\"+Dt[t]}function M(t,n,r){var e=t.length;for(n+=r?1:-1;r?n--:++n<e;){var u=t[n];if(u!==u)return n}return-1;
}function C(t){var n=false;if(null!=t&&typeof t.toString!="function")try{n=!!(t+"")}catch(r){}return n}function z(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}function U(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function $(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function F(t){
var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=[t,t]}),r}function N(t){if(!t||!Wt.test(t))return t.length;for(var n=It.lastIndex=0;It.test(t);)n++;return n}function P(t){return $t[t]}function Z(R){function At(t,n){return R.setTimeout.call(Kt,t,n)}function Ot(t){if(Te(t)&&!yi(t)&&!(t instanceof Ut)){if(t instanceof zt)return t;if(Wu.call(t,"__wrapped__"))return ae(t)}return new zt(t)}function kt(){}function zt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,
this.__values__=T}function Ut(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function $t(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Dt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Pt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Zt(t){var n=-1,r=t?t.length:0;
for(this.__data__=new Pt;++n<r;)this.add(t[n])}function qt(t){this.__data__=new Dt(t)}function Vt(t,n,r,e){return t===T||Ce(t,ku[r])&&!Wu.call(e,r)?n:t}function Jt(t,n,r){(r===T||Ce(t[n],r))&&(typeof n!="number"||r!==T||n in t)||(t[n]=r)}function Yt(t,n,r){var e=t[n];Wu.call(t,n)&&Ce(e,r)&&(r!==T||n in t)||(t[n]=r)}function Ht(t,n){for(var r=t.length;r--;)if(Ce(t[r][0],n))return r;return-1}function Qt(t,n,r,e){return Ao(t,function(t,u,o){n(e,t,r(t),o)}),e}function Xt(t,n){return t&&sr(n,iu(n),t)}
function tn(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r<u;)o[r]=e?T:uu(t,n[r]);return o}function nn(t,n,r){return t===t&&(r!==T&&(t=r>=t?t:r),n!==T&&(t=t>=n?t:n)),t}function rn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==T)return c;if(!Ze(t))return t;if(o=yi(t)){if(c=Kr(t),!n)return lr(t,c)}else{var a=qr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(bi(t))return or(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(C(t))return i?t:{};if(c=Gr(l?{}:t),
!n)return hr(t,Xt(c,t))}else{if(!Ct[a])return i?t:{};c=Jr(t,a,rn,n)}}if(f||(f=new qt),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?gn(t,iu,Tr):iu(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),Yt(c,o,rn(u,n,r,e,o,t,f))}),c}function en(t){var n=iu(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===T&&!(o in Object(e))||!i(f))return false}return true}}function un(t){return Ze(t)?Tu(t):{}}function on(t,n,r){if(typeof t!="function")throw new Au("Expected a function");
return At(function(){t.apply(T,r)},n)}function fn(t,n,r,e){var u=-1,o=c,i=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,O(r))),e?(o=a,i=false):n.length>=200&&(o=E,i=false,n=new Zt(n));t:for(;++u<f;){var p=t[u],_=r?r(p):p,p=e||0!==p?p:0;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function cn(t,n){var r=true;return Ao(t,function(t,e,u){return r=!!n(t,e,u)}),r}function an(t,n,r){for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===T?i===i&&!Je(i):r(i,f)))var f=i,c=o;
}return c}function ln(t,n){var r=[];return Ao(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function sn(t,n,r,e,u){var o=-1,i=t.length;for(r||(r=Hr),u||(u=[]);++o<i;){var f=t[o];n>0&&r(f)?n>1?sn(f,n-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function hn(t,n){return t&&ko(t,n,iu)}function pn(t,n){return t&&Eo(t,n,iu)}function _n(t,n){return f(n,function(n){return Fe(t[n])})}function vn(t,n){n=ne(n,t)?[n]:er(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[fe(n[r++])];return r&&r==e?t:T}function gn(t,n,r){
return n=n(t),yi(t)?n:s(n,r(t))}function dn(t,n){return t>n}function yn(t,n){return null!=t&&(Wu.call(t,n)||typeof t=="object"&&n in t&&null===Ju(Object(t)))}function bn(t,n){return null!=t&&n in Object(t)}function xn(t,n,r){for(var e=r?a:c,u=t[0].length,o=t.length,i=o,f=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=l(p,O(n))),s=to(p.length,s),f[i]=!r&&(n||u>=120&&p.length>=120)?new Zt(i&&p):T}var p=t[0],_=-1,v=f[0];t:for(;++_<u&&s>h.length;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;if(v?!E(v,d):!e(h,d,r)){
for(i=o;--i;){var y=f[i];if(y?!E(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function jn(t,n,r){var e={};return hn(t,function(t,u,o){n(e,r(t),u,o)}),e}function wn(t,n,e){return ne(n,t)||(n=er(n),t=ie(t,n),n=ve(n)),n=null==t?t:t[fe(n)],null==n?T:r(n,t,e)}function mn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!Ze(t)&&!Te(n))n=t!==t&&n!==n;else t:{var o=yi(t),i=yi(n),f="[object Array]",c="[object Array]";o||(f=qr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=qr(n),
c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!C(t),i="[object Object]"==c&&!C(n);if((c=f==c)&&!a)u||(u=new qt),n=o||Ye(t)?zr(t,n,mn,r,e,u):Ur(t,n,f,mn,r,e,u);else{if(!(2&e)&&(o=a&&Wu.call(t,"__wrapped__"),f=i&&Wu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new qt),n=mn(t,n,r,e,u);break t}if(c)n:if(u||(u=new qt),o=2&e,f=iu(t),i=f.length,c=iu(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:yn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{
c=true,u.set(t,n);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===T?h!==p&&!mn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u["delete"](t),n=c}}else n=false;else n=false}}return n}function An(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false;
}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===T&&!(c in t))return false}else{if(f=new qt,e)var s=e(a,l,c,t,n,f);if(s===T?!mn(l,a,e,3,f):!s)return false}}return true}function On(t){return!Ze(t)||Iu&&Iu in t?false:(Fe(t)||C(t)?zu:yt).test(ce(t))}function kn(t){return typeof t=="function"?t:null==t?pu:typeof t=="object"?yi(t)?Wn(t[0],t[1]):Rn(t):du(t)}function En(t){t=null==t?t:Object(t);var n,r=[];for(n in t)r.push(n);return r}function Sn(t,n){return n>t}function In(t,n){var r=-1,e=Ue(t)?Array(t.length):[];
return Ao(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function Rn(t){var n=Pr(t);return 1==n.length&&n[0][2]?ue(n[0][0],n[0][1]):function(r){return r===t||An(r,t,n)}}function Wn(t,n){return ne(t)&&n===n&&!Ze(n)?ue(fe(t),n):function(r){var e=uu(r,t);return e===T&&e===n?ou(r,t):mn(n,e,T,3)}}function Bn(t,n,r,e,o){if(t!==n){if(!yi(n)&&!Ye(n))var i=fu(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),Ze(u)){o||(o=new qt);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);if(h)Jt(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):T,p=h===T;p&&(h=s,
yi(s)||Ye(s)?yi(l)?h=l:$e(l)?h=lr(l):(p=false,h=rn(s,true)):Ve(s)||ze(s)?ze(l)?h=ru(l):!Ze(l)||r&&Fe(l)?(p=false,h=rn(s,true)):h=l:p=false),a.set(s,h),p&&Bn(h,s,r,e,a),a["delete"](s),Jt(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):T,c===T&&(c=u),Jt(t,f,c)})}}function Ln(t,n){var r=t.length;return r?(n+=0>n?r:0,Xr(n,r)?t[n]:T):void 0}function Mn(t,n,r){var e=-1;return n=l(n.length?n:[pu],O(Fr())),t=In(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t}}),j(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){
var c=fr(u[e],o[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function Cn(t,n){return t=Object(t),h(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function zn(t,n){for(var r=-1,e=gn(t,fu,Bo),u=e.length,o={};++r<u;){var i=e[r],f=t[i];n(f,i)&&(o[i]=f)}return o}function Un(t){return function(n){return null==n?T:n[t]}}function $n(t){return function(n){return vn(n,t)}}function Dn(t,n,r,e){var u=e?y:d,o=-1,i=n.length,f=t;for(t===n&&(n=lr(n)),r&&(f=l(t,O(r)));++o<i;)for(var c=0,a=n[o],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==t&&Vu.call(f,c,1),
Vu.call(t,c,1);return t}function Fn(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==o){var o=u;if(Xr(u))Vu.call(t,u,1);else if(ne(u,t))delete t[fe(u)];else{var u=er(u),i=ie(t,u);null!=i&&delete i[fe(ve(u))]}}}}function Nn(t,n){return t+Gu(ro()*(n-t+1))}function Pn(t,n){var r="";if(!t||1>n||n>9007199254740991)return r;do n%2&&(r+=t),(n=Gu(n/2))&&(t+=t);while(n);return r}function Zn(t,n,r,e){n=ne(n,t)?[n]:er(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=fe(n[u]);if(Ze(f)){
var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):T;a===T&&(a=null==l?Xr(n[u+1])?[]:{}:l)}Yt(f,c,a)}f=f[c]}return t}function Tn(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e<u;)r[e]=t[e+n];return r}function qn(t,n){var r;return Ao(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function Vn(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=t[o];null!==i&&!Je(i)&&(r?n>=i:n>i)?e=o+1:u=o}return u}
return Kn(t,n,pu,r)}function Kn(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=Je(n),a=n===T;o>u;){var l=Gu((u+o)/2),s=r(t[l]),h=s!==T,p=null===s,_=s===s,v=Je(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?n>=s:n>s)?u=l+1:o=l}return to(o,4294967294)}function Gn(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r],f=n?n(i):i;if(!r||!Ce(f,c)){var c=f;o[u++]=0===i?0:i}}return o}function Jn(t){return typeof t=="number"?t:Je(t)?V:+t}function Yn(t){if(typeof t=="string")return t;
if(Je(t))return mo?mo.call(t):"";var n=t+"";return"0"==n&&1/t==-q?"-0":n}function Hn(t,n,r){var e=-1,u=c,o=t.length,i=true,f=[],l=f;if(r)i=false,u=a;else if(o>=200){if(u=n?null:Io(t))return D(u);i=false,u=E,l=new Zt}else l=n?[]:f;t:for(;++e<o;){var s=t[e],h=n?n(s):s,s=r||0!==s?s:0;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function Qn(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?Tn(t,e?0:o,e?o+1:u):Tn(t,e?o+1:0,e?u:o);
}function Xn(t,n){var r=t;return r instanceof Ut&&(r=r.value()),h(n,function(t,n){return n.func.apply(n.thisArg,s([t],n.args))},r)}function tr(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?s(fn(o,t[e],n,r),fn(t[e],o,n,r)):t[e];return o&&o.length?Hn(o,n,r):[]}function nr(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],o>e?n[e]:T);return i}function rr(t){return $e(t)?t:[]}function er(t){return yi(t)?t:Co(t)}function ur(t,n,r){var e=t.length;return r=r===T?e:r,!n&&r>=e?t:Tn(t,n,r)}function or(t,n){
if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ir(t){var n=new t.constructor(t.byteLength);return new Fu(n).set(new Fu(t)),n}function fr(t,n){if(t!==n){var r=t!==T,e=null===t,u=t===t,o=Je(t),i=n!==T,f=null===n,c=n===n,a=Je(n);if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&n>t||a&&r&&u&&!e&&!o||f&&r&&u||!i&&u||!c)return-1}return 0}function cr(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Xu(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=n[f];
for(;++u<i;)(e||o>u)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function ar(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Xu(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=t[u++]);return s}function lr(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function sr(t,n,r,e){r||(r={});for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):t[i];Yt(r,i,f)}return r}function hr(t,n){return sr(t,Tr(t),n);
}function pr(t,n){return function(r,u){var o=yi(r)?e:Qt,i=n?n():{};return o(r,t,Fr(u),i)}}function _r(t){return Me(function(n,r){var e=-1,u=r.length,o=u>1?r[u-1]:T,i=u>2?r[2]:T,o=t.length>3&&typeof o=="function"?(u--,o):T;for(i&&te(r[0],r[1],i)&&(o=3>u?T:o,u=1),n=Object(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function vr(t,n){return function(r,e){if(null==r)return r;if(!Ue(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function gr(t){return function(n,r,e){
var u=-1,o=Object(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];if(false===r(o[f],f,o))break}return n}}function dr(t,n,r){function e(){return(this&&this!==Kt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=xr(t);return e}function yr(t){return function(n){n=eu(n);var r=Wt.test(n)?n.match(It):T,e=r?r[0]:n.charAt(0);return n=r?ur(r,1).join(""):n.slice(1),e[t]()+n}}function br(t){return function(n){return h(su(lu(n).replace(Et,"")),t,"")}}function xr(t){return function(){var n=arguments;
switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=un(t.prototype),n=t.apply(r,n);return Ze(n)?n:r}}function jr(t,n,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=Dr(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:$(f,a),
i-=c.length,e>i?Br(t,n,Ar,u.placeholder,T,f,c,T,T,e-i):r(this&&this!==Kt&&this instanceof u?o:t,this,f)}var o=xr(t);return u}function wr(t){return function(n,r,e){var u=Object(n);if(r=Fr(r,3),!Ue(n))var o=iu(n);return e=t(o||n,function(t,n){return o&&(n=t,t=u[n]),r(t,n,u)},e),e>-1?n[o?o[e]:e]:T}}function mr(t){return Me(function(n){n=sn(n,1);var r=n.length,e=r,u=zt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new Au("Expected a function");if(u&&!i&&"wrapper"==$r(o))var i=new zt([],true);
}for(e=i?e:r;++e<r;)var o=n[e],u=$r(o),f="wrapper"==u?Ro(o):T,i=f&&re(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[$r(f[0])].apply(i,f[3]):1==o.length&&re(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&yi(e)&&e.length>=200)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function Ar(t,n,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=Array(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=Dr(l),b=y.length;for(x=0;b--;)y[b]===j&&x++;
}if(e&&(y=cr(y,e,u,_)),o&&(y=ar(y,o,i,_)),d-=x,_&&a>d)return j=$(y,j),Br(t,n,Ar,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[t]:t,d=y.length,f){x=y.length;for(var w=to(f.length,x),m=lr(y);w--;){var A=f[w];y[w]=Xr(A,x)?m[A]:T}}else v&&d>1&&y.reverse();return s&&d>c&&(y.length=c),this&&this!==Kt&&this instanceof l&&(b=g||xr(b)),b.apply(j,y)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:xr(t);return l}function Or(t,n){return function(r,e){return jn(r,t,n(e))}}function kr(t){return function(n,r){var e;
if(n===T&&r===T)return 0;if(n!==T&&(e=n),r!==T){if(e===T)return r;typeof n=="string"||typeof r=="string"?(n=Yn(n),r=Yn(r)):(n=Jn(n),r=Jn(r)),e=t(n,r)}return e}}function Er(t){return Me(function(n){return n=1==n.length&&yi(n[0])?l(n[0],O(Fr())):l(sn(n,1,Qr),O(Fr())),Me(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Sr(t,n){n=n===T?" ":Yn(n);var r=n.length;return 2>r?r?Pn(n,t):n:(r=Pn(n,Ku(t/N(n))),Wt.test(n)?ur(r.match(It),0,t).join(""):r.slice(0,t))}function Ir(t,n,e,u){
function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Kt&&this instanceof o?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=xr(t);return o}function Rr(t){return function(n,r,e){e&&typeof e!="number"&&te(n,r,e)&&(r=e=T),n=nu(n),n=n===n?n:0,r===T?(r=n,n=0):r=nu(r)||0,e=e===T?r>n?1:-1:nu(e)||0;var u=-1;r=Xu(Ku((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Wr(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=nu(n),
r=nu(r)),t(n,r)}}function Br(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:T;i=l?T:i;var h=l?o:T;return o=l?T:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(T,n),re(t)&&Mo(r,n),r.placeholder=e,r}function Lr(t){var n=wu[t];return function(t,r){if(t=nu(t),r=to(Xe(r),292)){var e=(eu(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(eu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Mr(t){return function(n){var r=qr(n);return"[object Map]"==r?U(n):"[object Set]"==r?F(n):A(n,t(n));
}}function Cr(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new Au("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Xu(Xe(i),0),f=f===T?f:Xe(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:Ro(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?cr(e,r,h[4]):r,o[4]=e?$(o[3],"__lodash_placeholder__"):h[4]),
(r=h[5])&&(e=o[5],o[5]=e?ar(e,r,h[6]):r,o[6]=e?$(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),128&t&&(o[8]=null==o[8]?h[8]:to(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Xu(o[9]-a,0),!f&&24&n&&(n&=-25),(h?So:Mo)(n&&1!=n?8==n||16==n?jr(t,n,f):32!=n&&33!=n||u.length?Ar.apply(T,o):Ir(t,n,r,e):dr(t,n,r),o)}function zr(t,n,r,e,u,o){var i=2&u,f=t.length,c=n.length;if(f!=c&&!(i&&c>f))return false;if(c=o.get(t))return c==n;
var c=-1,a=true,l=1&u?new Zt:T;for(o.set(t,n);++c<f;){var s=t[c],h=n[c];if(e)var p=i?e(h,s,c,n,t,o):e(s,h,c,t,n,o);if(p!==T){if(p)continue;a=false;break}if(l){if(!_(n,function(t,n){return l.has(n)||s!==t&&!r(s,t,e,u,o)?void 0:l.add(n)})){a=false;break}}else if(s!==h&&!r(s,h,e,u,o)){a=false;break}}return o["delete"](t),a}function Ur(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new Fu(t),new Fu(n)))break;
return true;case"[object Boolean]":case"[object Date]":return+t==+n;case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object Number]":return t!=+t?n!=+n:t==+n;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=U;case"[object Set]":if(f||(f=D),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),zr(f(t),f(n),e,u,o,i));case"[object Symbol]":if(wo)return wo.call(t)==wo.call(n)}return false}function $r(t){for(var n=t.name+"",r=_o[n],e=Wu.call(_o,n)?r.length:0;e--;){
var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function Dr(t){return(Wu.call(Ot,"placeholder")?Ot:t).placeholder}function Fr(){var t=Ot.iteratee||_u,t=t===_u?kn:t;return arguments.length?t(arguments[0],arguments[1]):t}function Nr(t,n){var r=t.__data__,e=typeof n;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==n:null===n)?r[typeof n=="string"?"string":"hash"]:r.map}function Pr(t){for(var n=iu(t),r=n.length;r--;){var e=n[r],u=t[e];n[r]=[e,u,u===u&&!Ze(u)]}return n;
}function Zr(t,n){var r=null==t?T:t[n];return On(r)?r:T}function Tr(t){return Pu(Object(t))}function qr(t){return Mu.call(t)}function Vr(t,n,r){n=ne(n,t)?[n]:er(n);for(var e,u=-1,o=n.length;++u<o;){var i=fe(n[u]);if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&Pe(o)&&Xr(i,o)&&(yi(t)||Ge(t)||ze(t)))}function Kr(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&Wu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Gr(t){return typeof t.constructor!="function"||ee(t)?{}:un(Ju(Object(t)));
}function Jr(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return ir(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]":return e=o?ir(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":
return e=o?ir(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u(U(r),true):U(r),h(e,t,new r.constructor);case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,_t.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=o?u(D(r),true):D(r),h(e,n,new r.constructor);case"[object Symbol]":return wo?Object(wo.call(r)):{}}}function Yr(t){var n=t?t.length:T;return Pe(n)&&(yi(t)||Ge(t)||ze(t))?m(n,String):null;
}function Hr(t){return yi(t)||ze(t)}function Qr(t){return yi(t)&&!(2==t.length&&!Fe(t[0]))}function Xr(t,n){return n=null==n?9007199254740991:n,!!n&&(typeof t=="number"||xt.test(t))&&t>-1&&0==t%1&&n>t}function te(t,n,r){if(!Ze(r))return false;var e=typeof n;return("number"==e?Ue(r)&&Xr(n,r.length):"string"==e&&n in r)?Ce(r[n],t):false}function ne(t,n){if(yi(t))return false;var r=typeof t;return"number"==r||"symbol"==r||"boolean"==r||null==t||Je(t)?true:ut.test(t)||!et.test(t)||null!=n&&t in Object(n)}function re(t){
var n=$r(t),r=Ot[n];return typeof r=="function"&&n in Ut.prototype?t===r?true:(n=Ro(r),!!n&&t===n[0]):false}function ee(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||ku)}function ue(t,n){return function(r){return null==r?false:r[t]===n&&(n!==T||t in Object(r))}}function oe(t,n,r,e,u,o){return Ze(t)&&Ze(n)&&Bn(t,n,T,oe,o.set(n,t)),t}function ie(t,n){return 1==n.length?t:vn(t,Tn(n,0,-1))}function fe(t){if(typeof t=="string"||Je(t))return t;var n=t+"";return"0"==n&&1/t==-q?"-0":n}function ce(t){
if(null!=t){try{return Ru.call(t)}catch(n){}return t+""}return""}function ae(t){if(t instanceof Ut)return t.clone();var n=new zt(t.__wrapped__,t.__chain__);return n.__actions__=lr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function le(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),Tn(t,0>n?0:n,e)):[]}function se(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),n=e-n,Tn(t,0,0>n?0:n)):[]}function he(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:Xe(r),0>r&&(r=Xu(e+r,0)),
g(t,Fr(n,3),r)):-1}function pe(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==T&&(u=Xe(r),u=0>r?Xu(e+u,0):to(u,e-1)),g(t,Fr(n,3),u,true)}function _e(t){return t&&t.length?t[0]:T}function ve(t){var n=t?t.length:0;return n?t[n-1]:T}function ge(t,n){return t&&t.length&&n&&n.length?Dn(t,n):t}function de(t){return t?uo.call(t):t}function ye(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){return $e(t)?(n=Xu(t.length,n),true):void 0}),m(n,function(n){return l(t,Un(n))})}function be(t,n){
if(!t||!t.length)return[];var e=ye(t);return null==n?e:l(e,function(t){return r(n,T,t)})}function xe(t){return t=Ot(t),t.__chain__=true,t}function je(t,n){return n(t)}function we(){return this}function me(t,n){return(yi(t)?u:Ao)(t,Fr(n,3))}function Ae(t,n){return(yi(t)?o:Oo)(t,Fr(n,3))}function Oe(t,n){return(yi(t)?l:In)(t,Fr(n,3))}function ke(t,n,r){var e=-1,u=He(t),o=u.length,i=o-1;for(n=(r?te(t,n,r):n===T)?1:nn(Xe(n),0,o);++e<n;)t=Nn(e,i),r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function Ee(){
return xu.now()}function Se(t,n,r){return n=r?T:n,n=t&&null==n?t.length:n,Cr(t,128,T,T,T,T,n)}function Ie(t,n){var r;if(typeof n!="function")throw new Au("Expected a function");return t=Xe(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=T),r}}function Re(t,n,r){return n=r?T:n,t=Cr(t,8,T,T,T,T,T,n),t.placeholder=Re.placeholder,t}function We(t,n,r){return n=r?T:n,t=Cr(t,16,T,T,T,T,T,n),t.placeholder=We.placeholder,t}function Be(t,n,r){function e(n){var r=c,e=a;return c=a=T,_=n,s=t.apply(e,r);
}function u(t){var r=t-p;return t-=_,p===T||r>=n||0>r||g&&t>=l}function o(){var t=Ee();if(u(t))return i(t);var r;r=t-_,t=n-(t-p),r=g?to(t,l-r):t,h=At(o,r)}function i(t){return h=T,d&&c?e(t):(c=a=T,s)}function f(){var t=Ee(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===T)return _=t=p,h=At(o,n),v?e(t):s;if(g)return h=At(o,n),e(p)}return h===T&&(h=At(o,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Au("Expected a function");return n=nu(n)||0,Ze(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Xu(nu(r.maxWait)||0,n):l,
d="trailing"in r?!!r.trailing:d),f.cancel=function(){_=0,c=p=a=h=T},f.flush=function(){return h===T?s:i(Ee())},f}function Le(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new Au("Expected a function");return r.cache=new(Le.Cache||Pt),r}function Me(t,n){if(typeof t!="function")throw new Au("Expected a function");return n=Xu(n===T?t.length-1:Xe(n),0),function(){
for(var e=arguments,u=-1,o=Xu(e.length-n,0),i=Array(o);++u<o;)i[u]=e[n+u];switch(n){case 0:return t.call(this,i);case 1:return t.call(this,e[0],i);case 2:return t.call(this,e[0],e[1],i)}for(o=Array(n+1),u=-1;++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function Ce(t,n){return t===n||t!==t&&n!==n}function ze(t){return $e(t)&&Wu.call(t,"callee")&&(!qu.call(t,"callee")||"[object Arguments]"==Mu.call(t))}function Ue(t){return null!=t&&Pe(Wo(t))&&!Fe(t)}function $e(t){return Te(t)&&Ue(t)}function De(t){
return Te(t)?"[object Error]"==Mu.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Fe(t){return t=Ze(t)?Mu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function Ne(t){return typeof t=="number"&&t==Xe(t)}function Pe(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t}function Ze(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Te(t){return!!t&&typeof t=="object"}function qe(t){return typeof t=="number"||Te(t)&&"[object Number]"==Mu.call(t);
}function Ve(t){return!Te(t)||"[object Object]"!=Mu.call(t)||C(t)?false:(t=Ju(Object(t)),null===t?true:(t=Wu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&Ru.call(t)==Lu))}function Ke(t){return Ze(t)&&"[object RegExp]"==Mu.call(t)}function Ge(t){return typeof t=="string"||!yi(t)&&Te(t)&&"[object String]"==Mu.call(t)}function Je(t){return typeof t=="symbol"||Te(t)&&"[object Symbol]"==Mu.call(t)}function Ye(t){return Te(t)&&Pe(t.length)&&!!Mt[Mu.call(t)]}function He(t){if(!t)return[];
if(Ue(t))return Ge(t)?t.match(It):lr(t);if(Zu&&t[Zu])return z(t[Zu]());var n=qr(t);return("[object Map]"==n?U:"[object Set]"==n?D:cu)(t)}function Qe(t){return t?(t=nu(t),t===q||t===-q?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function Xe(t){t=Qe(t);var n=t%1;return t===t?n?t-n:t:0}function tu(t){return t?nn(Xe(t),0,4294967295):0}function nu(t){if(typeof t=="number")return t;if(Je(t))return V;if(Ze(t)&&(t=Fe(t.valueOf)?t.valueOf():t,t=Ze(t)?t+"":t),typeof t!="string")return 0===t?t:+t;
t=t.replace(ct,"");var n=dt.test(t);return n||bt.test(t)?Nt(t.slice(2),n?2:8):gt.test(t)?V:+t}function ru(t){return sr(t,fu(t))}function eu(t){return null==t?"":Yn(t)}function uu(t,n,r){return t=null==t?T:vn(t,n),t===T?r:t}function ou(t,n){return null!=t&&Vr(t,n,bn)}function iu(t){var n=ee(t);if(!n&&!Ue(t))return Qu(Object(t));var r,e=Yr(t),u=!!e,e=e||[],o=e.length;for(r in t)!yn(t,r)||u&&("length"==r||Xr(r,o))||n&&"constructor"==r||e.push(r);return e}function fu(t){for(var n=-1,r=ee(t),e=En(t),u=e.length,o=Yr(t),i=!!o,o=o||[],f=o.length;++n<u;){
var c=e[n];i&&("length"==c||Xr(c,f))||"constructor"==c&&(r||!Wu.call(t,c))||o.push(c)}return o}function cu(t){return t?k(t,iu(t)):[]}function au(t){return qi(eu(t).toLowerCase())}function lu(t){return(t=eu(t))&&t.replace(jt,W).replace(St,"")}function su(t,n,r){return t=eu(t),n=r?T:n,n===T&&(n=Bt.test(t)?Rt:st),t.match(n)||[]}function hu(t){return function(){return t}}function pu(t){return t}function _u(t){return kn(typeof t=="function"?t:rn(t,true))}function vu(t,n,r){var e=iu(n),o=_n(n,e);null!=r||Ze(n)&&(o.length||!e.length)||(r=n,
n=t,t=this,o=_n(n,iu(n)));var i=!(Ze(r)&&"chain"in r&&!r.chain),f=Fe(t);return u(o,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=lr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function gu(){}function du(t){return ne(t)?Un(fe(t)):$n(t)}function yu(){return[]}function bu(){return false}R=R?Gt.defaults({},R,Gt.pick(Kt,Lt)):Kt;var xu=R.Date,ju=R.Error,wu=R.Math,mu=R.RegExp,Au=R.TypeError,Ou=R.Array.prototype,ku=R.Object.prototype,Eu=R.String.prototype,Su=R["__core-js_shared__"],Iu=function(){
var t=/[^.]+$/.exec(Su&&Su.keys&&Su.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ru=R.Function.prototype.toString,Wu=ku.hasOwnProperty,Bu=0,Lu=Ru.call(Object),Mu=ku.toString,Cu=Kt._,zu=mu("^"+Ru.call(Wu).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Uu=Tt?R.Buffer:T,$u=R.Reflect,Du=R.Symbol,Fu=R.Uint8Array,Nu=$u?$u.f:T,Pu=Object.getOwnPropertySymbols,Zu=typeof(Zu=Du&&Du.iterator)=="symbol"?Zu:T,Tu=Object.create,qu=ku.propertyIsEnumerable,Vu=Ou.splice,Ku=wu.ceil,Gu=wu.floor,Ju=Object.getPrototypeOf,Yu=R.isFinite,Hu=Ou.join,Qu=Object.keys,Xu=wu.max,to=wu.min,no=R.parseInt,ro=wu.random,eo=Eu.replace,uo=Ou.reverse,oo=Eu.split,io=Zr(R,"DataView"),fo=Zr(R,"Map"),co=Zr(R,"Promise"),ao=Zr(R,"Set"),lo=Zr(R,"WeakMap"),so=Zr(Object,"create"),ho=lo&&new lo,po=!qu.call({
valueOf:1},"valueOf"),_o={},vo=ce(io),go=ce(fo),yo=ce(co),bo=ce(ao),xo=ce(lo),jo=Du?Du.prototype:T,wo=jo?jo.valueOf:T,mo=jo?jo.toString:T;Ot.templateSettings={escape:tt,evaluate:nt,interpolate:rt,variable:"",imports:{_:Ot}},Ot.prototype=kt.prototype,Ot.prototype.constructor=Ot,zt.prototype=un(kt.prototype),zt.prototype.constructor=zt,Ut.prototype=un(kt.prototype),Ut.prototype.constructor=Ut,$t.prototype.clear=function(){this.__data__=so?so(null):{}},$t.prototype["delete"]=function(t){return this.has(t)&&delete this.__data__[t];
},$t.prototype.get=function(t){var n=this.__data__;return so?(t=n[t],"__lodash_hash_undefined__"===t?T:t):Wu.call(n,t)?n[t]:T},$t.prototype.has=function(t){var n=this.__data__;return so?n[t]!==T:Wu.call(n,t)},$t.prototype.set=function(t,n){return this.__data__[t]=so&&n===T?"__lodash_hash_undefined__":n,this},Dt.prototype.clear=function(){this.__data__=[]},Dt.prototype["delete"]=function(t){var n=this.__data__;return t=Ht(n,t),0>t?false:(t==n.length-1?n.pop():Vu.call(n,t,1),true)},Dt.prototype.get=function(t){
var n=this.__data__;return t=Ht(n,t),0>t?T:n[t][1]},Dt.prototype.has=function(t){return-1<Ht(this.__data__,t)},Dt.prototype.set=function(t,n){var r=this.__data__,e=Ht(r,t);return 0>e?r.push([t,n]):r[e][1]=n,this},Pt.prototype.clear=function(){this.__data__={hash:new $t,map:new(fo||Dt),string:new $t}},Pt.prototype["delete"]=function(t){return Nr(this,t)["delete"](t)},Pt.prototype.get=function(t){return Nr(this,t).get(t)},Pt.prototype.has=function(t){return Nr(this,t).has(t)},Pt.prototype.set=function(t,n){
return Nr(this,t).set(t,n),this},Zt.prototype.add=Zt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Zt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.clear=function(){this.__data__=new Dt},qt.prototype["delete"]=function(t){return this.__data__["delete"](t)},qt.prototype.get=function(t){return this.__data__.get(t)},qt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.set=function(t,n){var r=this.__data__;return r instanceof Dt&&200==r.__data__.length&&(r=this.__data__=new Pt(r.__data__)),
r.set(t,n),this};var Ao=vr(hn),Oo=vr(pn,true),ko=gr(),Eo=gr(true);Nu&&!qu.call({valueOf:1},"valueOf")&&(En=function(t){return z(Nu(t))});var So=ho?function(t,n){return ho.set(t,n),t}:pu,Io=ao&&1/D(new ao([,-0]))[1]==q?function(t){return new ao(t)}:gu,Ro=ho?function(t){return ho.get(t)}:gu,Wo=Un("length");Pu||(Tr=yu);var Bo=Pu?function(t){for(var n=[];t;)s(n,Tr(t)),t=Ju(Object(t));return n}:Tr;(io&&"[object DataView]"!=qr(new io(new ArrayBuffer(1)))||fo&&"[object Map]"!=qr(new fo)||co&&"[object Promise]"!=qr(co.resolve())||ao&&"[object Set]"!=qr(new ao)||lo&&"[object WeakMap]"!=qr(new lo))&&(qr=function(t){
var n=Mu.call(t);if(t=(t="[object Object]"==n?t.constructor:T)?ce(t):T)switch(t){case vo:return"[object DataView]";case go:return"[object Map]";case yo:return"[object Promise]";case bo:return"[object Set]";case xo:return"[object WeakMap]"}return n});var Lo=Su?Fe:bu,Mo=function(){var t=0,n=0;return function(r,e){var u=Ee(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return So(r,e)}}(),Co=Le(function(t){var n=[];return eu(t).replace(ot,function(t,r,e,u){n.push(e?u.replace(ht,"$1"):r||t)}),
n}),zo=Me(function(t,n){return $e(t)?fn(t,sn(n,1,$e,true)):[]}),Uo=Me(function(t,n){var r=ve(n);return $e(r)&&(r=T),$e(t)?fn(t,sn(n,1,$e,true),Fr(r)):[]}),$o=Me(function(t,n){var r=ve(n);return $e(r)&&(r=T),$e(t)?fn(t,sn(n,1,$e,true),T,r):[]}),Do=Me(function(t){var n=l(t,rr);return n.length&&n[0]===t[0]?xn(n):[]}),Fo=Me(function(t){var n=ve(t),r=l(t,rr);return n===ve(r)?n=T:r.pop(),r.length&&r[0]===t[0]?xn(r,Fr(n)):[]}),No=Me(function(t){var n=ve(t),r=l(t,rr);return n===ve(r)?n=T:r.pop(),r.length&&r[0]===t[0]?xn(r,T,n):[];
}),Po=Me(ge),Zo=Me(function(t,n){n=sn(n,1);var r=t?t.length:0,e=tn(t,n);return Fn(t,l(n,function(t){return Xr(t,r)?+t:t}).sort(fr)),e}),To=Me(function(t){return Hn(sn(t,1,$e,true))}),qo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),Hn(sn(t,1,$e,true),Fr(n))}),Vo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),Hn(sn(t,1,$e,true),T,n)}),Ko=Me(function(t,n){return $e(t)?fn(t,n):[]}),Go=Me(function(t){return tr(f(t,$e))}),Jo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),tr(f(t,$e),Fr(n))}),Yo=Me(function(t){
var n=ve(t);return $e(n)&&(n=T),tr(f(t,$e),T,n)}),Ho=Me(ye),Qo=Me(function(t){var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return be(t,n)}),Xo=Me(function(t){function n(n){return tn(n,t)}t=sn(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(r>1||this.__actions__.length)&&u instanceof Ut&&Xr(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:je,args:[n],thisArg:T}),new zt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),ti=pr(function(t,n,r){
Wu.call(t,r)?++t[r]:t[r]=1}),ni=wr(he),ri=wr(pe),ei=pr(function(t,n,r){Wu.call(t,r)?t[r].push(n):t[r]=[n]}),ui=Me(function(t,n,e){var u=-1,o=typeof n=="function",i=ne(n),f=Ue(t)?Array(t.length):[];return Ao(t,function(t){var c=o?n:i&&null!=t?t[n]:T;f[++u]=c?r(c,t,e):wn(t,n,e)}),f}),oi=pr(function(t,n,r){t[r]=n}),ii=pr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),fi=Me(function(t,n){if(null==t)return[];var r=n.length;return r>1&&te(t,n[0],n[1])?n=[]:r>2&&te(n[0],n[1],n[2])&&(n=[n[0]]),
n=1==n.length&&yi(n[0])?n[0]:sn(n,1,Qr),Mn(t,n,[])}),ci=Me(function(t,n,r){var e=1;if(r.length)var u=$(r,Dr(ci)),e=32|e;return Cr(t,e,n,r,u)}),ai=Me(function(t,n,r){var e=3;if(r.length)var u=$(r,Dr(ai)),e=32|e;return Cr(n,e,t,r,u)}),li=Me(function(t,n){return on(t,1,n)}),si=Me(function(t,n,r){return on(t,nu(n)||0,r)});Le.Cache=Pt;var hi=Me(function(t,n){n=1==n.length&&yi(n[0])?l(n[0],O(Fr())):l(sn(n,1,Qr),O(Fr()));var e=n.length;return Me(function(u){for(var o=-1,i=to(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);
return r(t,this,u)})}),pi=Me(function(t,n){var r=$(n,Dr(pi));return Cr(t,32,T,n,r)}),_i=Me(function(t,n){var r=$(n,Dr(_i));return Cr(t,64,T,n,r)}),vi=Me(function(t,n){return Cr(t,256,T,T,T,sn(n,1))}),gi=Wr(dn),di=Wr(function(t,n){return t>=n}),yi=Array.isArray,bi=Uu?function(t){return t instanceof Uu}:bu,xi=Wr(Sn),ji=Wr(function(t,n){return n>=t}),wi=_r(function(t,n){if(po||ee(n)||Ue(n))sr(n,iu(n),t);else for(var r in n)Wu.call(n,r)&&Yt(t,r,n[r])}),mi=_r(function(t,n){if(po||ee(n)||Ue(n))sr(n,fu(n),t);else for(var r in n)Yt(t,r,n[r]);
}),Ai=_r(function(t,n,r,e){sr(n,fu(n),t,e)}),Oi=_r(function(t,n,r,e){sr(n,iu(n),t,e)}),ki=Me(function(t,n){return tn(t,sn(n,1))}),Ei=Me(function(t){return t.push(T,Vt),r(Ai,T,t)}),Si=Me(function(t){return t.push(T,oe),r(Li,T,t)}),Ii=Or(function(t,n,r){t[n]=r},hu(pu)),Ri=Or(function(t,n,r){Wu.call(t,n)?t[n].push(r):t[n]=[r]},Fr),Wi=Me(wn),Bi=_r(function(t,n,r){Bn(t,n,r)}),Li=_r(function(t,n,r,e){Bn(t,n,r,e)}),Mi=Me(function(t,n){return null==t?{}:(n=l(sn(n,1),fe),Cn(t,fn(gn(t,fu,Bo),n)))}),Ci=Me(function(t,n){
return null==t?{}:Cn(t,l(sn(n,1),fe))}),zi=Mr(iu),Ui=Mr(fu),$i=br(function(t,n,r){return n=n.toLowerCase(),t+(r?au(n):n)}),Di=br(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),Fi=br(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),Ni=yr("toLowerCase"),Pi=br(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),Zi=br(function(t,n,r){return t+(r?" ":"")+qi(n)}),Ti=br(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),qi=yr("toUpperCase"),Vi=Me(function(t,n){try{return r(t,T,n)}catch(e){
return De(e)?e:new ju(e)}}),Ki=Me(function(t,n){return u(sn(n,1),function(n){n=fe(n),t[n]=ci(t[n],t)}),t}),Gi=mr(),Ji=mr(true),Yi=Me(function(t,n){return function(r){return wn(r,t,n)}}),Hi=Me(function(t,n){return function(r){return wn(t,r,n)}}),Qi=Er(l),Xi=Er(i),tf=Er(_),nf=Rr(),rf=Rr(true),ef=kr(function(t,n){return t+n}),uf=Lr("ceil"),of=kr(function(t,n){return t/n}),ff=Lr("floor"),cf=kr(function(t,n){return t*n}),af=Lr("round"),lf=kr(function(t,n){return t-n});return Ot.after=function(t,n){if(typeof n!="function")throw new Au("Expected a function");
return t=Xe(t),function(){return 1>--t?n.apply(this,arguments):void 0}},Ot.ary=Se,Ot.assign=wi,Ot.assignIn=mi,Ot.assignInWith=Ai,Ot.assignWith=Oi,Ot.at=ki,Ot.before=Ie,Ot.bind=ci,Ot.bindAll=Ki,Ot.bindKey=ai,Ot.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return yi(t)?t:[t]},Ot.chain=xe,Ot.chunk=function(t,n,r){if(n=(r?te(t,n,r):n===T)?1:Xu(Xe(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array(Ku(r/n));r>e;)o[u++]=Tn(t,e,e+=n);return o},Ot.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){
var o=t[n];o&&(u[e++]=o)}return u},Ot.concat=function(){for(var t=arguments.length,n=Array(t?t-1:0),r=arguments[0],e=t;e--;)n[e-1]=arguments[e];return t?s(yi(r)?lr(r):[r],sn(n,1)):[]},Ot.cond=function(t){var n=t?t.length:0,e=Fr();return t=n?l(t,function(t){if("function"!=typeof t[1])throw new Au("Expected a function");return[e(t[0]),t[1]]}):[],Me(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e)}})},Ot.conforms=function(t){return en(rn(t,true))},Ot.constant=hu,Ot.countBy=ti,
Ot.create=function(t,n){var r=un(t);return n?Xt(r,n):r},Ot.curry=Re,Ot.curryRight=We,Ot.debounce=Be,Ot.defaults=Ei,Ot.defaultsDeep=Si,Ot.defer=li,Ot.delay=si,Ot.difference=zo,Ot.differenceBy=Uo,Ot.differenceWith=$o,Ot.drop=le,Ot.dropRight=se,Ot.dropRightWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),true,true):[]},Ot.dropWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),true):[]},Ot.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&te(t,n,r)&&(r=0,e=u),u=t.length,
r=Xe(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Xe(e),0>e&&(e+=u),e=r>e?0:tu(e);e>r;)t[r++]=n;return t},Ot.filter=function(t,n){return(yi(t)?f:ln)(t,Fr(n,3))},Ot.flatMap=function(t,n){return sn(Oe(t,n),1)},Ot.flatMapDeep=function(t,n){return sn(Oe(t,n),q)},Ot.flatMapDepth=function(t,n,r){return r=r===T?1:Xe(r),sn(Oe(t,n),r)},Ot.flatten=function(t){return t&&t.length?sn(t,1):[]},Ot.flattenDeep=function(t){return t&&t.length?sn(t,q):[]},Ot.flattenDepth=function(t,n){return t&&t.length?(n=n===T?1:Xe(n),sn(t,n)):[];
},Ot.flip=function(t){return Cr(t,512)},Ot.flow=Gi,Ot.flowRight=Ji,Ot.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},Ot.functions=function(t){return null==t?[]:_n(t,iu(t))},Ot.functionsIn=function(t){return null==t?[]:_n(t,fu(t))},Ot.groupBy=ei,Ot.initial=function(t){return se(t,1)},Ot.intersection=Do,Ot.intersectionBy=Fo,Ot.intersectionWith=No,Ot.invert=Ii,Ot.invertBy=Ri,Ot.invokeMap=ui,Ot.iteratee=_u,Ot.keyBy=oi,Ot.keys=iu,Ot.keysIn=fu,Ot.map=Oe,
Ot.mapKeys=function(t,n){var r={};return n=Fr(n,3),hn(t,function(t,e,u){r[n(t,e,u)]=t}),r},Ot.mapValues=function(t,n){var r={};return n=Fr(n,3),hn(t,function(t,e,u){r[e]=n(t,e,u)}),r},Ot.matches=function(t){return Rn(rn(t,true))},Ot.matchesProperty=function(t,n){return Wn(t,rn(n,true))},Ot.memoize=Le,Ot.merge=Bi,Ot.mergeWith=Li,Ot.method=Yi,Ot.methodOf=Hi,Ot.mixin=vu,Ot.negate=function(t){if(typeof t!="function")throw new Au("Expected a function");return function(){return!t.apply(this,arguments)}},Ot.nthArg=function(t){
return t=Xe(t),Me(function(n){return Ln(n,t)})},Ot.omit=Mi,Ot.omitBy=function(t,n){return n=Fr(n),zn(t,function(t,r){return!n(t,r)})},Ot.once=function(t){return Ie(2,t)},Ot.orderBy=function(t,n,r,e){return null==t?[]:(yi(n)||(n=null==n?[]:[n]),r=e?T:r,yi(r)||(r=null==r?[]:[r]),Mn(t,n,r))},Ot.over=Qi,Ot.overArgs=hi,Ot.overEvery=Xi,Ot.overSome=tf,Ot.partial=pi,Ot.partialRight=_i,Ot.partition=ii,Ot.pick=Ci,Ot.pickBy=function(t,n){return null==t?{}:zn(t,Fr(n))},Ot.property=du,Ot.propertyOf=function(t){
return function(n){return null==t?T:vn(t,n)}},Ot.pull=Po,Ot.pullAll=ge,Ot.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?Dn(t,n,Fr(r)):t},Ot.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Dn(t,n,T,r):t},Ot.pullAt=Zo,Ot.range=nf,Ot.rangeRight=rf,Ot.rearg=vi,Ot.reject=function(t,n){var r=yi(t)?f:ln;return n=Fr(n,3),r(t,function(t,r,e){return!n(t,r,e)})},Ot.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=Fr(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i),
u.push(e))}return Fn(t,u),r},Ot.rest=Me,Ot.reverse=de,Ot.sampleSize=ke,Ot.set=function(t,n,r){return null==t?t:Zn(t,n,r)},Ot.setWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null==t?t:Zn(t,n,r,e)},Ot.shuffle=function(t){return ke(t,4294967295)},Ot.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&te(t,n,r)?(n=0,r=e):(n=null==n?0:Xe(n),r=r===T?e:Xe(r)),Tn(t,n,r)):[]},Ot.sortBy=fi,Ot.sortedUniq=function(t){return t&&t.length?Gn(t):[]},Ot.sortedUniqBy=function(t,n){
return t&&t.length?Gn(t,Fr(n)):[]},Ot.split=function(t,n,r){return r&&typeof r!="number"&&te(t,n,r)&&(n=r=T),r=r===T?4294967295:r>>>0,r?(t=eu(t))&&(typeof n=="string"||null!=n&&!Ke(n))&&(n=Yn(n),""==n&&Wt.test(t))?ur(t.match(It),0,r):oo.call(t,n,r):[]},Ot.spread=function(t,n){if(typeof t!="function")throw new Au("Expected a function");return n=n===T?0:Xu(Xe(n),0),Me(function(e){var u=e[n];return e=ur(e,0,n),u&&s(e,u),r(t,this,e)})},Ot.tail=function(t){return le(t,1)},Ot.take=function(t,n,r){return t&&t.length?(n=r||n===T?1:Xe(n),
Tn(t,0,0>n?0:n)):[]},Ot.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),n=e-n,Tn(t,0>n?0:n,e)):[]},Ot.takeRightWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),false,true):[]},Ot.takeWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3)):[]},Ot.tap=function(t,n){return n(t),t},Ot.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new Au("Expected a function");return Ze(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Be(t,n,{leading:e,maxWait:n,
trailing:u})},Ot.thru=je,Ot.toArray=He,Ot.toPairs=zi,Ot.toPairsIn=Ui,Ot.toPath=function(t){return yi(t)?l(t,fe):Je(t)?[t]:lr(Co(t))},Ot.toPlainObject=ru,Ot.transform=function(t,n,r){var e=yi(t)||Ye(t);if(n=Fr(n,4),null==r)if(e||Ze(t)){var o=t.constructor;r=e?yi(t)?new o:[]:Fe(o)?un(Ju(Object(t))):{}}else r={};return(e?u:hn)(t,function(t,e,u){return n(r,t,e,u)}),r},Ot.unary=function(t){return Se(t,1)},Ot.union=To,Ot.unionBy=qo,Ot.unionWith=Vo,Ot.uniq=function(t){return t&&t.length?Hn(t):[]},Ot.uniqBy=function(t,n){
return t&&t.length?Hn(t,Fr(n)):[]},Ot.uniqWith=function(t,n){return t&&t.length?Hn(t,T,n):[]},Ot.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=ne(e,r)?[e]:er(e);r=ie(r,e),e=fe(ve(e)),r=!(null!=r&&yn(r,e))||delete r[e]}return r},Ot.unzip=ye,Ot.unzipWith=be,Ot.update=function(t,n,r){return null==t?t:Zn(t,n,(typeof r=="function"?r:pu)(vn(t,n)),void 0)},Ot.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null!=t&&(t=Zn(t,n,(typeof r=="function"?r:pu)(vn(t,n)),e)),t},Ot.values=cu,
Ot.valuesIn=function(t){return null==t?[]:k(t,fu(t))},Ot.without=Ko,Ot.words=su,Ot.wrap=function(t,n){return n=null==n?pu:n,pi(n,t)},Ot.xor=Go,Ot.xorBy=Jo,Ot.xorWith=Yo,Ot.zip=Ho,Ot.zipObject=function(t,n){return nr(t||[],n||[],Yt)},Ot.zipObjectDeep=function(t,n){return nr(t||[],n||[],Zn)},Ot.zipWith=Qo,Ot.entries=zi,Ot.entriesIn=Ui,Ot.extend=mi,Ot.extendWith=Ai,vu(Ot,Ot),Ot.add=ef,Ot.attempt=Vi,Ot.camelCase=$i,Ot.capitalize=au,Ot.ceil=uf,Ot.clamp=function(t,n,r){return r===T&&(r=n,n=T),r!==T&&(r=nu(r),
r=r===r?r:0),n!==T&&(n=nu(n),n=n===n?n:0),nn(nu(t),n,r)},Ot.clone=function(t){return rn(t,false,true)},Ot.cloneDeep=function(t){return rn(t,true,true)},Ot.cloneDeepWith=function(t,n){return rn(t,true,true,n)},Ot.cloneWith=function(t,n){return rn(t,false,true,n)},Ot.deburr=lu,Ot.divide=of,Ot.endsWith=function(t,n,r){t=eu(t),n=Yn(n);var e=t.length;return r=r===T?e:nn(Xe(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},Ot.eq=Ce,Ot.escape=function(t){return(t=eu(t))&&X.test(t)?t.replace(H,B):t},Ot.escapeRegExp=function(t){
return(t=eu(t))&&ft.test(t)?t.replace(it,"\\$&"):t},Ot.every=function(t,n,r){var e=yi(t)?i:cn;return r&&te(t,n,r)&&(n=T),e(t,Fr(n,3))},Ot.find=ni,Ot.findIndex=he,Ot.findKey=function(t,n){return v(t,Fr(n,3),hn)},Ot.findLast=ri,Ot.findLastIndex=pe,Ot.findLastKey=function(t,n){return v(t,Fr(n,3),pn)},Ot.floor=ff,Ot.forEach=me,Ot.forEachRight=Ae,Ot.forIn=function(t,n){return null==t?t:ko(t,Fr(n,3),fu)},Ot.forInRight=function(t,n){return null==t?t:Eo(t,Fr(n,3),fu)},Ot.forOwn=function(t,n){return t&&hn(t,Fr(n,3));
},Ot.forOwnRight=function(t,n){return t&&pn(t,Fr(n,3))},Ot.get=uu,Ot.gt=gi,Ot.gte=di,Ot.has=function(t,n){return null!=t&&Vr(t,n,yn)},Ot.hasIn=ou,Ot.head=_e,Ot.identity=pu,Ot.includes=function(t,n,r,e){return t=Ue(t)?t:cu(t),r=r&&!e?Xe(r):0,e=t.length,0>r&&(r=Xu(e+r,0)),Ge(t)?e>=r&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},Ot.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:Xe(r),0>r&&(r=Xu(e+r,0)),d(t,n,r)):-1},Ot.inRange=function(t,n,r){return n=nu(n)||0,r===T?(r=n,n=0):r=nu(r)||0,t=nu(t),
t>=to(n,r)&&t<Xu(n,r)},Ot.invoke=Wi,Ot.isArguments=ze,Ot.isArray=yi,Ot.isArrayBuffer=function(t){return Te(t)&&"[object ArrayBuffer]"==Mu.call(t)},Ot.isArrayLike=Ue,Ot.isArrayLikeObject=$e,Ot.isBoolean=function(t){return true===t||false===t||Te(t)&&"[object Boolean]"==Mu.call(t)},Ot.isBuffer=bi,Ot.isDate=function(t){return Te(t)&&"[object Date]"==Mu.call(t)},Ot.isElement=function(t){return!!t&&1===t.nodeType&&Te(t)&&!Ve(t)},Ot.isEmpty=function(t){if(Ue(t)&&(yi(t)||Ge(t)||Fe(t.splice)||ze(t)||bi(t)))return!t.length;
if(Te(t)){var n=qr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size}for(var r in t)if(Wu.call(t,r))return false;return!(po&&iu(t).length)},Ot.isEqual=function(t,n){return mn(t,n)},Ot.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:T)?r(t,n):T;return e===T?mn(t,n,r):!!e},Ot.isError=De,Ot.isFinite=function(t){return typeof t=="number"&&Yu(t)},Ot.isFunction=Fe,Ot.isInteger=Ne,Ot.isLength=Pe,Ot.isMap=function(t){return Te(t)&&"[object Map]"==qr(t)},Ot.isMatch=function(t,n){return t===n||An(t,n,Pr(n));
},Ot.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:T,An(t,n,Pr(n),r)},Ot.isNaN=function(t){return qe(t)&&t!=+t},Ot.isNative=function(t){if(Lo(t))throw new ju("This method is not supported with `core-js`. Try https://github.com/es-shims.");return On(t)},Ot.isNil=function(t){return null==t},Ot.isNull=function(t){return null===t},Ot.isNumber=qe,Ot.isObject=Ze,Ot.isObjectLike=Te,Ot.isPlainObject=Ve,Ot.isRegExp=Ke,Ot.isSafeInteger=function(t){return Ne(t)&&t>=-9007199254740991&&9007199254740991>=t;
},Ot.isSet=function(t){return Te(t)&&"[object Set]"==qr(t)},Ot.isString=Ge,Ot.isSymbol=Je,Ot.isTypedArray=Ye,Ot.isUndefined=function(t){return t===T},Ot.isWeakMap=function(t){return Te(t)&&"[object WeakMap]"==qr(t)},Ot.isWeakSet=function(t){return Te(t)&&"[object WeakSet]"==Mu.call(t)},Ot.join=function(t,n){return t?Hu.call(t,n):""},Ot.kebabCase=Di,Ot.last=ve,Ot.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==T&&(u=Xe(r),u=(0>u?Xu(e+u,0):to(u,e-1))+1),n!==n)return M(t,u-1,true);
for(;u--;)if(t[u]===n)return u;return-1},Ot.lowerCase=Fi,Ot.lowerFirst=Ni,Ot.lt=xi,Ot.lte=ji,Ot.max=function(t){return t&&t.length?an(t,pu,dn):T},Ot.maxBy=function(t,n){return t&&t.length?an(t,Fr(n),dn):T},Ot.mean=function(t){return b(t,pu)},Ot.meanBy=function(t,n){return b(t,Fr(n))},Ot.min=function(t){return t&&t.length?an(t,pu,Sn):T},Ot.minBy=function(t,n){return t&&t.length?an(t,Fr(n),Sn):T},Ot.stubArray=yu,Ot.stubFalse=bu,Ot.stubObject=function(){return{}},Ot.stubString=function(){return""},Ot.stubTrue=function(){
return true},Ot.multiply=cf,Ot.nth=function(t,n){return t&&t.length?Ln(t,Xe(n)):T},Ot.noConflict=function(){return Kt._===this&&(Kt._=Cu),this},Ot.noop=gu,Ot.now=Ee,Ot.pad=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return!n||e>=n?t:(n=(n-e)/2,Sr(Gu(n),r)+t+Sr(Ku(n),r))},Ot.padEnd=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return n&&n>e?t+Sr(n-e,r):t},Ot.padStart=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return n&&n>e?Sr(n-e,r)+t:t},Ot.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),
t=eu(t).replace(ct,""),no(t,n||(vt.test(t)?16:10))},Ot.random=function(t,n,r){if(r&&typeof r!="boolean"&&te(t,n,r)&&(n=r=T),r===T&&(typeof n=="boolean"?(r=n,n=T):typeof t=="boolean"&&(r=t,t=T)),t===T&&n===T?(t=0,n=1):(t=nu(t)||0,n===T?(n=t,t=0):n=nu(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=ro(),to(t+r*(n-t+Ft("1e-"+((r+"").length-1))),n)):Nn(t,n)},Ot.reduce=function(t,n,r){var e=yi(t)?h:x,u=3>arguments.length;return e(t,Fr(n,4),r,u,Ao)},Ot.reduceRight=function(t,n,r){var e=yi(t)?p:x,u=3>arguments.length;
return e(t,Fr(n,4),r,u,Oo)},Ot.repeat=function(t,n,r){return n=(r?te(t,n,r):n===T)?1:Xe(n),Pn(eu(t),n)},Ot.replace=function(){var t=arguments,n=eu(t[0]);return 3>t.length?n:eo.call(n,t[1],t[2])},Ot.result=function(t,n,r){n=ne(n,t)?[n]:er(n);var e=-1,u=n.length;for(u||(t=T,u=1);++e<u;){var o=null==t?T:t[fe(n[e])];o===T&&(e=u,o=r),t=Fe(o)?o.call(t):o}return t},Ot.round=af,Ot.runInContext=Z,Ot.sample=function(t){t=Ue(t)?t:cu(t);var n=t.length;return n>0?t[Nn(0,n-1)]:T},Ot.size=function(t){if(null==t)return 0;
if(Ue(t)){var n=t.length;return n&&Ge(t)?N(t):n}return Te(t)&&(n=qr(t),"[object Map]"==n||"[object Set]"==n)?t.size:iu(t).length},Ot.snakeCase=Pi,Ot.some=function(t,n,r){var e=yi(t)?_:qn;return r&&te(t,n,r)&&(n=T),e(t,Fr(n,3))},Ot.sortedIndex=function(t,n){return Vn(t,n)},Ot.sortedIndexBy=function(t,n,r){return Kn(t,n,Fr(r))},Ot.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Vn(t,n);if(r>e&&Ce(t[e],n))return e}return-1},Ot.sortedLastIndex=function(t,n){return Vn(t,n,true)},Ot.sortedLastIndexBy=function(t,n,r){
return Kn(t,n,Fr(r),true)},Ot.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Vn(t,n,true)-1;if(Ce(t[r],n))return r}return-1},Ot.startCase=Zi,Ot.startsWith=function(t,n,r){return t=eu(t),r=nn(Xe(r),0,t.length),t.lastIndexOf(Yn(n),r)==r},Ot.subtract=lf,Ot.sum=function(t){return t&&t.length?w(t,pu):0},Ot.sumBy=function(t,n){return t&&t.length?w(t,Fr(n)):0},Ot.template=function(t,n,r){var e=Ot.templateSettings;r&&te(t,n,r)&&(n=T),t=eu(t),n=Ai({},n,e,Vt),r=Ai({},n.imports,e.imports,Vt);var u,o,i=iu(r),f=k(r,i),c=0;
r=n.interpolate||wt;var a="__p+='";r=mu((n.escape||wt).source+"|"+r.source+"|"+(r===rt?pt:wt).source+"|"+(n.evaluate||wt).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(mt,L),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(K,""):a).replace(G,"$1").replace(J,"$1;"),
a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",n=Vi(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,De(n))throw n;return n},Ot.times=function(t,n){if(t=Xe(t),1>t||t>9007199254740991)return[];var r=4294967295,e=to(t,4294967295);for(n=Fr(n),t-=4294967295,e=m(e,n);++r<t;)n(r);return e},Ot.toFinite=Qe,Ot.toInteger=Xe,Ot.toLength=tu,Ot.toLower=function(t){
return eu(t).toLowerCase()},Ot.toNumber=nu,Ot.toSafeInteger=function(t){return nn(Xe(t),-9007199254740991,9007199254740991)},Ot.toString=eu,Ot.toUpper=function(t){return eu(t).toUpperCase()},Ot.trim=function(t,n,r){return(t=eu(t))&&(r||n===T)?t.replace(ct,""):t&&(n=Yn(n))?(t=t.match(It),n=n.match(It),ur(t,S(t,n),I(t,n)+1).join("")):t},Ot.trimEnd=function(t,n,r){return(t=eu(t))&&(r||n===T)?t.replace(lt,""):t&&(n=Yn(n))?(t=t.match(It),n=I(t,n.match(It))+1,ur(t,0,n).join("")):t},Ot.trimStart=function(t,n,r){
return(t=eu(t))&&(r||n===T)?t.replace(at,""):t&&(n=Yn(n))?(t=t.match(It),n=S(t,n.match(It)),ur(t,n).join("")):t},Ot.truncate=function(t,n){var r=30,e="...";if(Ze(n))var u="separator"in n?n.separator:u,r="length"in n?Xe(n.length):r,e="omission"in n?Yn(n.omission):e;t=eu(t);var o=t.length;if(Wt.test(t))var i=t.match(It),o=i.length;if(r>=o)return t;if(o=r-N(e),1>o)return e;if(r=i?ur(i,0,o).join(""):t.slice(0,o),u===T)return r+e;if(i&&(o+=r.length-o),Ke(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=mu(u.source,eu(_t.exec(u))+"g")),
u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===T?o:c)}}else t.indexOf(Yn(u),o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},Ot.unescape=function(t){return(t=eu(t))&&Q.test(t)?t.replace(Y,P):t},Ot.uniqueId=function(t){var n=++Bu;return eu(t)+n},Ot.upperCase=Ti,Ot.upperFirst=qi,Ot.each=me,Ot.eachRight=Ae,Ot.first=_e,vu(Ot,function(){var t={};return hn(Ot,function(n,r){Wu.call(Ot.prototype,r)||(t[r]=n)}),t}(),{chain:false}),Ot.VERSION="4.13.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){
Ot[t].placeholder=Ot}),u(["drop","take"],function(t,n){Ut.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Ut(this);r=r===T?1:Xu(Xe(r),0);var u=this.clone();return e?u.__takeCount__=to(r,u.__takeCount__):u.__views__.push({size:to(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Ut.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Ut.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({
iteratee:Fr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Ut.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");Ut.prototype[t]=function(){return this.__filtered__?new Ut(this):this[r](1)}}),Ut.prototype.compact=function(){return this.filter(pu)},Ut.prototype.find=function(t){return this.filter(t).head()},Ut.prototype.findLast=function(t){return this.reverse().find(t);
},Ut.prototype.invokeMap=Me(function(t,n){return typeof t=="function"?new Ut(this):this.map(function(r){return wn(r,t,n)})}),Ut.prototype.reject=function(t){return t=Fr(t,3),this.filter(function(n){return!t(n)})},Ut.prototype.slice=function(t,n){t=Xe(t);var r=this;return r.__filtered__&&(t>0||0>n)?new Ut(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==T&&(n=Xe(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Ut.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ut.prototype.toArray=function(){
return this.take(4294967295)},hn(Ut.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=Ot[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(Ot.prototype[n]=function(){function n(t){return t=u.apply(Ot,s([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Ut,a=f[0],l=c||yi(i);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&l?(i=c?i:new Ut(this),
i=t.apply(i,f),i.__actions__.push({func:je,args:[n],thisArg:T}),new zt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Ou[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);Ot.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(yi(u)?u:[],t)}return this[r](function(r){return n.apply(yi(r)?r:[],t)})}}),hn(Ut.prototype,function(t,n){
var r=Ot[n];if(r){var e=r.name+"";(_o[e]||(_o[e]=[])).push({name:n,func:r})}}),_o[Ar(T,2).name]=[{name:"wrapper",func:T}],Ut.prototype.clone=function(){var t=new Ut(this.__wrapped__);return t.__actions__=lr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=lr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=lr(this.__views__),t},Ut.prototype.reverse=function(){if(this.__filtered__){var t=new Ut(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),
t.__dir__*=-1;return t},Ut.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=yi(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=to(t,f+s);break;case"takeRight":f=Xu(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=to(t,this.__takeCount__),!e||200>o||o==t&&a==t)return Xn(n,this.__actions__);e=[];
t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},Ot.prototype.at=Xo,Ot.prototype.chain=function(){return xe(this)},Ot.prototype.commit=function(){return new zt(this.value(),this.__chain__)},Ot.prototype.next=function(){this.__values__===T&&(this.__values__=He(this.value()));var t=this.__index__>=this.__values__.length,n=t?T:this.__values__[this.__index__++];return{done:t,value:n}},Ot.prototype.plant=function(t){
for(var n,r=this;r instanceof kt;){var e=ae(r);e.__index__=0,e.__values__=T,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},Ot.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Ut?(this.__actions__.length&&(t=new Ut(this)),t=t.reverse(),t.__actions__.push({func:je,args:[de],thisArg:T}),new zt(t,this.__chain__)):this.thru(de)},Ot.prototype.toJSON=Ot.prototype.valueOf=Ot.prototype.value=function(){return Xn(this.__wrapped__,this.__actions__)},Zu&&(Ot.prototype[Zu]=we),
Ot}var T,q=1/0,V=NaN,K=/\b__p\+='';/g,G=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,Y=/&(?:amp|lt|gt|quot|#39|#96);/g,H=/[&<>"'`]/g,Q=RegExp(Y.source),X=RegExp(H.source),tt=/<%-([\s\S]+?)%>/g,nt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(it.source),ct=/^\s+|\s+$/g,at=/^\s+/,lt=/\s+$/,st=/[a-zA-Z0-9]+/g,ht=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_t=/\w*$/,vt=/^0x/i,gt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,jt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,At="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Ot="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+At,kt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Et=RegExp("['\u2019]","g"),St=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),It=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kt+At,"g"),Rt=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",Ot].join("|"),"g"),Wt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Bt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Lt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ isFinite parseInt setTimeout".split(" "),Mt={};
Mt["[object Float32Array]"]=Mt["[object Float64Array]"]=Mt["[object Int8Array]"]=Mt["[object Int16Array]"]=Mt["[object Int32Array]"]=Mt["[object Uint8Array]"]=Mt["[object Uint8ClampedArray]"]=Mt["[object Uint16Array]"]=Mt["[object Uint32Array]"]=true,Mt["[object Arguments]"]=Mt["[object Array]"]=Mt["[object ArrayBuffer]"]=Mt["[object Boolean]"]=Mt["[object DataView]"]=Mt["[object Date]"]=Mt["[object Error]"]=Mt["[object Function]"]=Mt["[object Map]"]=Mt["[object Number]"]=Mt["[object Object]"]=Mt["[object RegExp]"]=Mt["[object Set]"]=Mt["[object String]"]=Mt["[object WeakMap]"]=false;
var Ct={};Ct["[object Arguments]"]=Ct["[object Array]"]=Ct["[object ArrayBuffer]"]=Ct["[object DataView]"]=Ct["[object Boolean]"]=Ct["[object Date]"]=Ct["[object Float32Array]"]=Ct["[object Float64Array]"]=Ct["[object Int8Array]"]=Ct["[object Int16Array]"]=Ct["[object Int32Array]"]=Ct["[object Map]"]=Ct["[object Number]"]=Ct["[object Object]"]=Ct["[object RegExp]"]=Ct["[object Set]"]=Ct["[object String]"]=Ct["[object Symbol]"]=Ct["[object Uint8Array]"]=Ct["[object Uint8ClampedArray]"]=Ct["[object Uint16Array]"]=Ct["[object Uint32Array]"]=true,
Ct["[object Error]"]=Ct["[object Function]"]=Ct["[object WeakMap]"]=false;var zt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O",
"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ut={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},$t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ft=parseFloat,Nt=parseInt,Pt=typeof exports=="object"&&exports,Zt=Pt&&typeof module=="object"&&module,Tt=Zt&&Zt.exports===Pt,qt=R(typeof self=="object"&&self),Vt=R(typeof this=="object"&&this),Kt=R(typeof global=="object"&&global)||qt||Vt||Function("return this")(),Gt=Z();
(qt||{})._=Gt,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Gt}):Zt?((Zt.exports=Gt)._=Gt,Pt._=Gt):Kt._=Gt}).call(this);

150
dist/mapping.fp.js vendored
View File

@@ -56,35 +56,49 @@ return /******/ (function(modules) { // webpackBootstrap
/** Used to map aliases to their real names. */
exports.aliasToReal = {
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'all': 'some',
'all': 'every',
'allPass': 'overEvery',
'always': 'constant',
'any': 'some',
'anyPass': 'overSome',
'apply': 'spread',
'assoc': 'set',
'assocPath': 'set',
'complement': 'negate',
'compose': 'flowRight',
'contains': 'includes',
'dissoc': 'unset',
'dissocPath': 'unset',
'each': 'forEach',
'eachRight': 'forEachRight',
'equals': 'isEqual',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
'identical': 'eq',
'init': 'initial',
'mapObj': 'mapValues',
'invertObj': 'invert',
'juxt': 'over',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'paths': 'at',
'pickAll': 'pick',
'pipe': 'flow',
'pluck': 'map',
'prop': 'get',
'propOf': 'propertyOf',
'propEq': 'matchesProperty',
'propOr': 'getOr',
'somePass': 'overSome',
'props': 'at',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
@@ -96,37 +110,43 @@ return /******/ (function(modules) { // webpackBootstrap
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin',
'over', 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext',
'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words'
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindKey',
'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', 'every',
'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
'findLastKey', 'flatMap', 'flattenDepth', 'forEach', 'forEachRight', 'forIn',
'forInRight', 'forOwn', 'forOwnRight', 'get', 'groupBy', 'gt', 'gte', 'has',
'hasIn', 'includes', 'indexOf', 'intersection', 'invertBy', 'invoke', 'invokeMap',
'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map',
'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', 'merge', 'minBy', 'omit',
'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt',
'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'result',
'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex',
'sortedLastIndexOf', 'sortedUniqBy', 'split', 'startsWith', 'subtract', 'sumBy',
'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru',
'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union',
'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip',
'zipObject', 'zipObjectDeep'
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast',
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth',
'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
'zipObjectDeep'
],
'3': [
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'isEqualWith',
'isMatchWith', 'mergeWith', 'orderBy', 'pullAllBy', 'pullAllWith', 'reduce',
'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy',
'transform', 'unionBy', 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace',
'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith', 'updateWith'
@@ -142,29 +162,29 @@ return /******/ (function(modules) { // webpackBootstrap
/** Used to map method names to their iteratee ary. */
exports.iterateeAry = {
'assignWith': 2,
'assignInWith': 2,
'cloneDeepWith': 1,
'cloneWith': 1,
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'findFrom': 1,
'findIndex': 1,
'findIndexFrom': 1,
'findKey': 1,
'findLast': 1,
'findLastFrom': 1,
'findLastIndex': 1,
'findLastIndexFrom': 1,
'findLastKey': 1,
'flatMap': 1,
'flatMapDeep': 1,
'flatMapDepth': 1,
'forEach': 1,
'forEachRight': 1,
'forIn': 1,
'forInRight': 1,
'forOwn': 1,
'forOwnRight': 1,
'isEqualWith': 2,
'isMatchWith': 2,
'map': 1,
'mapKeys': 1,
'mapValues': 1,
@@ -189,22 +209,37 @@ return /******/ (function(modules) { // webpackBootstrap
exports.methodRearg = {
'assignInWith': [1, 2, 0],
'assignWith': [1, 2, 0],
'differenceBy': [1, 2, 0],
'differenceWith': [1, 2, 0],
'getOr': [2, 1, 0],
'intersectionBy': [1, 2, 0],
'intersectionWith': [1, 2, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 0],
'mergeWith': [1, 2, 0],
'padChars': [2, 1, 0],
'padCharsEnd': [2, 1, 0],
'padCharsStart': [2, 1, 0],
'pullAllBy': [2, 1, 0],
'pullAllWith': [2, 1, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'unionBy': [1, 2, 0],
'unionWith': [1, 2, 0],
'updateWith': [3, 1, 2, 0],
'xorBy': [1, 2, 0],
'xorWith': [1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'partial': 1,
'partialRight': 1
'partialRight': 1,
'without': 1
};
/** Used to identify methods which mutate arrays or objects. */
@@ -269,25 +304,56 @@ return /******/ (function(modules) { // webpackBootstrap
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'findFrom': 'find',
'findIndexFrom': 'findIndex',
'findLastFrom': 'findLast',
'findLastIndexFrom': 'findLastIndex',
'getOr': 'get',
'includesFrom': 'includes',
'indexOfFrom': 'indexOf',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'lastIndexOfFrom': 'lastIndexOf',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip `_.rearg`. */
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'runInContext': true
};
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'bind': true,
'bindKey': true,
'concat': true,
'difference': true,
'divide': true,
'eq': true,
'gt': true,
'gte': true,
'isEqual': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'multiply': true,
'overArgs': true,
'partial': true,
'partialRight': true,
'random': true,

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,99 @@
var mapping = require('./_mapping'),
mutateMap = mapping.mutate,
fallbackHolder = {};
fallbackHolder = require('./placeholder');
/**
* Creates a function, with an arity of `n`, that invokes `func` with the
* arguments it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} n The arity of the new function.
* @returns {Function} Returns the new function.
*/
function baseArity(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
}
/**
* Creates a function that invokes `func`, with up to `n` arguments, ignoring
* any additional arguments.
*
* @private
* @param {Function} func The function to cap arguments for.
* @param {number} n The arity cap.
* @returns {Function} Returns the new function.
*/
function baseAry(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
: function(a) { return func(a); };
}
/**
* Creates a clone of `array`.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the cloned array.
*/
function cloneArray(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
}
/**
* Creates a function that clones a given object using the assignment `func`.
*
* @private
* @param {Function} func The assignment function.
* @returns {Function} Returns the new cloner function.
*/
function createCloner(func) {
return function(object) {
return func({}, object);
};
}
/**
* Creates a function that wraps `func` and uses `cloner` to clone the first
* argument it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} cloner The function to clone arguments.
* @returns {Function} Returns the new immutable function.
*/
function immutWrap(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
}
/**
* The base implementation of `convert` which accepts a `util` object of methods
* required to perform conversions.
*
* @param {Object} util The util object.
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @param {string} name The name of the function to convert.
* @param {Function} func The function to convert.
* @param {Object} [options] The options object.
* @param {boolean} [options.cap=true] Specify capping iteratee arguments.
* @param {boolean} [options.curry=true] Specify currying.
@@ -40,11 +125,15 @@ function baseConvert(util, name, func, options) {
'rearg': 'rearg' in options ? options.rearg : true
};
var forceRearg = ('rearg' in options) && options.rearg,
placeholder = isLib ? func : fallbackHolder;
var forceCurry = ('curry' in options) && options.curry,
forceFixed = ('fixed' in options) && options.fixed,
forceRearg = ('rearg' in options) && options.rearg,
placeholder = isLib ? func : fallbackHolder,
pristine = isLib ? func.runInContext() : undefined;
var helpers = isLib ? func : {
'ary': util.ary,
'assign': util.assign,
'clone': util.clone,
'curry': util.curry,
'forEach': util.forEach,
@@ -58,6 +147,7 @@ function baseConvert(util, name, func, options) {
};
var ary = helpers.ary,
assign = helpers.assign,
clone = helpers.clone,
curry = helpers.curry,
each = helpers.forEach,
@@ -70,99 +160,6 @@ function baseConvert(util, name, func, options) {
var aryMethodKeys = keys(mapping.aryMethod);
var baseArity = function(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
};
var baseAry = function(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
: function(a) { return func(a); };
};
var cloneArray = function(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
};
var cloneByPath = function(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
result = clone(Object(object)),
nested = result;
while (nested != null && ++index < length) {
var key = path[index],
value = nested[key];
if (value != null) {
nested[key] = clone(Object(value));
}
nested = nested[key];
}
return result;
};
var createCloner = function(func) {
return function(object) {
return func({}, object);
};
};
var immutWrap = function(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
};
var iterateeAry = function(func, n) {
return overArg(func, function(func) {
return typeof func == 'function' ? baseAry(func, n) : func;
});
};
var iterateeRearg = function(func, indexes) {
return overArg(func, function(func) {
var n = indexes.length;
return baseArity(rearg(baseAry(func, n), indexes), n);
});
};
var overArg = function(func, iteratee, retArg) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = iteratee(args[index]);
return func.apply(undefined, args);
};
};
var wrappers = {
'castArray': function(castArray) {
return function() {
@@ -192,25 +189,21 @@ function baseConvert(util, name, func, options) {
if (!isFunction(func)) {
return mixin(func, Object(source));
}
var methods = [],
methodNames = [];
var pairs = [];
each(keys(source), function(key) {
var value = source[key];
if (isFunction(value)) {
methodNames.push(key);
methods.push(func.prototype[key]);
if (isFunction(source[key])) {
pairs.push([key, func.prototype[key]]);
}
});
mixin(func, Object(source));
each(methodNames, function(methodName, index) {
var method = methods[index];
if (isFunction(method)) {
func.prototype[methodName] = method;
each(pairs, function(pair) {
var value = pair[1];
if (isFunction(value)) {
func.prototype[pair[0]] = value;
} else {
delete func.prototype[methodName];
delete func.prototype[pair[0]];
}
});
return func;
@@ -223,14 +216,144 @@ function baseConvert(util, name, func, options) {
}
};
var wrap = function(name, func) {
name = mapping.aliasToReal[name] || name;
var wrapper = wrappers[name];
if (wrapper) {
return wrapper(func);
/*--------------------------------------------------------------------------*/
/**
* Creates a clone of `object` by `path`.
*
* @private
* @param {Object} object The object to clone.
* @param {Array|string} path The path to clone by.
* @returns {Object} Returns the cloned object.
*/
function cloneByPath(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
lastIndex = length - 1,
result = clone(Object(object)),
nested = result;
while (nested != null && ++index < length) {
var key = path[index],
value = nested[key];
if (value != null) {
nested[path[index]] = clone(index == lastIndex ? value : Object(value));
}
nested = nested[key];
}
var wrapped = func;
if (config.immutable) {
return result;
}
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
*
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function convertLib(options) {
return _.runInContext.convert(options)(undefined);
}
/**
* Create a converter function for `func` of `name`.
*
* @param {string} name The name of the function to convert.
* @param {Function} func The function to convert.
* @returns {Function} Returns the new converter function.
*/
function createConverter(name, func) {
var oldOptions = options;
return function(options) {
var newUtil = isLib ? pristine : helpers,
newFunc = isLib ? pristine[name] : func,
newOptions = assign(assign({}, oldOptions), options);
return baseConvert(newUtil, name, newFunc, newOptions);
};
}
/**
* Creates a function that wraps `func` to invoke its iteratee, with up to `n`
* arguments, ignoring any additional arguments.
*
* @private
* @param {Function} func The function to cap iteratee arguments for.
* @param {number} n The arity cap.
* @returns {Function} Returns the new function.
*/
function iterateeAry(func, n) {
return overArg(func, function(func) {
return typeof func == 'function' ? baseAry(func, n) : func;
});
}
/**
* Creates a function that wraps `func` to invoke its iteratee with arguments
* arranged according to the specified `indexes` where the argument value at
* the first index is provided as the first argument, the argument value at
* the second index is provided as the second argument, and so on.
*
* @private
* @param {Function} func The function to rearrange iteratee arguments for.
* @param {number[]} indexes The arranged argument indexes.
* @returns {Function} Returns the new function.
*/
function iterateeRearg(func, indexes) {
return overArg(func, function(func) {
var n = indexes.length;
return baseArity(rearg(baseAry(func, n), indexes), n);
});
}
/**
* Creates a function that invokes `func` with its first argument passed
* thru `transform`.
*
* @private
* @param {Function} func The function to wrap.
* @param {...Function} transform The functions to transform the first argument.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = transform(args[index]);
return func.apply(undefined, args);
};
}
/**
* Creates a function that wraps `func` and applys the conversions
* rules by `name`.
*
* @private
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @returns {Function} Returns the converted function.
*/
function wrap(name, func) {
name = mapping.aliasToReal[name] || name;
var result,
wrapped = func,
wrapper = wrappers[name];
if (wrapper) {
wrapped = wrapper(func);
}
else if (config.immutable) {
if (mutateMap.array[name]) {
wrapped = immutWrap(func, cloneArray);
}
@@ -241,7 +364,6 @@ function baseConvert(util, name, func, options) {
wrapped = immutWrap(func, cloneByPath);
}
}
var result;
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (name == otherName) {
@@ -250,7 +372,7 @@ function baseConvert(util, name, func, options) {
spreadStart = mapping.methodSpread[name];
result = wrapped;
if (config.fixed) {
if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
result = spreadStart === undefined
? ary(result, aryKey)
: spread(result, spreadStart);
@@ -265,7 +387,8 @@ function baseConvert(util, name, func, options) {
result = iterateeAry(result, aryN);
}
}
if (config.curry && aryKey > 1) {
if (forceCurry || (config.curry && aryKey > 1)) {
forceCurry && console.log(forceCurry, name);
result = curry(result, aryKey);
}
return false;
@@ -275,19 +398,27 @@ function baseConvert(util, name, func, options) {
});
result || (result = wrapped);
if (result == func) {
result = forceCurry ? curry(result, 1) : function() {
return func.apply(this, arguments);
};
}
result.convert = createConverter(name, func);
if (mapping.placeholder[name]) {
setPlaceholder = true;
func.placeholder = result.placeholder = placeholder;
result.placeholder = func.placeholder = placeholder;
}
return result;
};
}
/*--------------------------------------------------------------------------*/
if (!isObj) {
return wrap(name, func);
}
var _ = func;
// Iterate over methods for the current ary cap.
// Convert methods by ary cap.
var pairs = [];
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(key) {
@@ -298,15 +429,31 @@ function baseConvert(util, name, func, options) {
});
});
// Convert remaining methods.
each(keys(_), function(key) {
var func = _[key];
if (typeof func == 'function') {
var length = pairs.length;
while (length--) {
if (pairs[length][0] == key) {
return;
}
}
func.convert = createConverter(key, func);
pairs.push([key, func]);
}
});
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
each(pairs, function(pair) {
_[pair[0]] = pair[1];
});
_.convert = convertLib;
if (setPlaceholder) {
_.placeholder = placeholder;
}
// Wrap the lodash method and its aliases.
// Assign aliases.
each(keys(_), function(key) {
each(mapping.realToAlias[key] || [], function(alias) {
_[alias] = _[key];

View File

@@ -1,9 +1,10 @@
var baseConvert = require('./_baseConvert');
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last version.
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
*
* @param {Function} lodash The lodash function.
* @param {Function} lodash The lodash function to convert.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/

View File

@@ -1,34 +1,48 @@
/** Used to map aliases to their real names. */
exports.aliasToReal = {
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'all': 'some',
'all': 'every',
'allPass': 'overEvery',
'always': 'constant',
'any': 'some',
'anyPass': 'overSome',
'apply': 'spread',
'assoc': 'set',
'assocPath': 'set',
'complement': 'negate',
'compose': 'flowRight',
'contains': 'includes',
'dissoc': 'unset',
'dissocPath': 'unset',
'each': 'forEach',
'eachRight': 'forEachRight',
'equals': 'isEqual',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
'identical': 'eq',
'init': 'initial',
'mapObj': 'mapValues',
'invertObj': 'invert',
'juxt': 'over',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'paths': 'at',
'pickAll': 'pick',
'pipe': 'flow',
'pluck': 'map',
'prop': 'get',
'propOf': 'propertyOf',
'propEq': 'matchesProperty',
'propOr': 'getOr',
'somePass': 'overSome',
'props': 'at',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
@@ -40,37 +54,43 @@ exports.aliasToReal = {
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin',
'over', 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext',
'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words'
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindKey',
'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', 'every',
'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
'findLastKey', 'flatMap', 'flattenDepth', 'forEach', 'forEachRight', 'forIn',
'forInRight', 'forOwn', 'forOwnRight', 'get', 'groupBy', 'gt', 'gte', 'has',
'hasIn', 'includes', 'indexOf', 'intersection', 'invertBy', 'invoke', 'invokeMap',
'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map',
'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', 'merge', 'minBy', 'omit',
'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt',
'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'result',
'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex',
'sortedLastIndexOf', 'sortedUniqBy', 'split', 'startsWith', 'subtract', 'sumBy',
'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru',
'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union',
'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip',
'zipObject', 'zipObjectDeep'
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast',
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth',
'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
'zipObjectDeep'
],
'3': [
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'isEqualWith',
'isMatchWith', 'mergeWith', 'orderBy', 'pullAllBy', 'pullAllWith', 'reduce',
'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy',
'transform', 'unionBy', 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace',
'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith', 'updateWith'
@@ -86,29 +106,29 @@ exports.aryRearg = {
/** Used to map method names to their iteratee ary. */
exports.iterateeAry = {
'assignWith': 2,
'assignInWith': 2,
'cloneDeepWith': 1,
'cloneWith': 1,
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'findFrom': 1,
'findIndex': 1,
'findIndexFrom': 1,
'findKey': 1,
'findLast': 1,
'findLastFrom': 1,
'findLastIndex': 1,
'findLastIndexFrom': 1,
'findLastKey': 1,
'flatMap': 1,
'flatMapDeep': 1,
'flatMapDepth': 1,
'forEach': 1,
'forEachRight': 1,
'forIn': 1,
'forInRight': 1,
'forOwn': 1,
'forOwnRight': 1,
'isEqualWith': 2,
'isMatchWith': 2,
'map': 1,
'mapKeys': 1,
'mapValues': 1,
@@ -133,22 +153,37 @@ exports.iterateeRearg = {
exports.methodRearg = {
'assignInWith': [1, 2, 0],
'assignWith': [1, 2, 0],
'differenceBy': [1, 2, 0],
'differenceWith': [1, 2, 0],
'getOr': [2, 1, 0],
'intersectionBy': [1, 2, 0],
'intersectionWith': [1, 2, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 0],
'mergeWith': [1, 2, 0],
'padChars': [2, 1, 0],
'padCharsEnd': [2, 1, 0],
'padCharsStart': [2, 1, 0],
'pullAllBy': [2, 1, 0],
'pullAllWith': [2, 1, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'unionBy': [1, 2, 0],
'unionWith': [1, 2, 0],
'updateWith': [3, 1, 2, 0],
'xorBy': [1, 2, 0],
'xorWith': [1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'partial': 1,
'partialRight': 1
'partialRight': 1,
'without': 1
};
/** Used to identify methods which mutate arrays or objects. */
@@ -213,25 +248,56 @@ exports.realToAlias = (function() {
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'findFrom': 'find',
'findIndexFrom': 'findIndex',
'findLastFrom': 'findLast',
'findLastIndexFrom': 'findLastIndex',
'getOr': 'get',
'includesFrom': 'includes',
'indexOfFrom': 'indexOf',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'lastIndexOfFrom': 'lastIndexOf',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip `_.rearg`. */
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'runInContext': true
};
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'bind': true,
'bindKey': true,
'concat': true,
'difference': true,
'divide': true,
'eq': true,
'gt': true,
'gte': true,
'isEqual': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'multiply': true,
'overArgs': true,
'partial': true,
'partialRight': true,
'random': true,

6
fp/placeholder.js Normal file
View File

@@ -0,0 +1,6 @@
/**
* The default argument placeholder value for methods.
*
* @type {Object}
*/
module.exports = {};

71
lib/common/file.js Normal file
View File

@@ -0,0 +1,71 @@
'use strict';
var _ = require('lodash'),
fs = require('fs-extra'),
glob = require('glob'),
path = require('path');
var minify = require('../common/minify.js');
/*----------------------------------------------------------------------------*/
/**
* Creates a [fs.copy](https://github.com/jprichardson/node-fs-extra#copy)
* function with `srcPath` and `destPath` partially applied.
*
* @memberOf file
* @param {string} srcPath The path of the file to copy.
* @param {string} destPath The path to copy the file to.
* @returns {Function} Returns the partially applied function.
*/
function copy(srcPath, destPath) {
return _.partial(fs.copy, srcPath, destPath);
}
/**
* Creates an object of compiled template and base name pairs that match `pattern`.
*
* @memberOf file
* @param {string} pattern The glob pattern to be match.
* @returns {Object} Returns the object of compiled templates.
*/
function globTemplate(pattern) {
return _.transform(glob.sync(pattern), function(result, filePath) {
var key = path.basename(filePath, path.extname(filePath));
result[key] = _.template(fs.readFileSync(filePath, 'utf8'));
}, {});
}
/**
* Creates a `minify` function with `srcPath` and `destPath` partially applied.
*
* @memberOf file
* @param {string} srcPath The path of the file to minify.
* @param {string} destPath The path to write the file to.
* @returns {Function} Returns the partially applied function.
*/
function min(srcPath, destPath) {
return _.partial(minify, srcPath, destPath);
}
/**
* Creates a [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)
* function with `filePath` and `data` partially applied.
*
* @memberOf file
* @param {string} destPath The path to write the file to.
* @param {string} data The data to write to the file.
* @returns {Function} Returns the partially applied function.
*/
function write(destPath, data) {
return _.partial(fs.writeFile, destPath, data);
}
/*----------------------------------------------------------------------------*/
module.exports = {
'copy': copy,
'globTemplate': globTemplate,
'min': min,
'write': write
};

9
lib/common/mapping.js Normal file
View File

@@ -0,0 +1,9 @@
'use strict';
var _mapping = require('../../fp/_mapping'),
util = require('./util'),
Hash = util.Hash;
/*----------------------------------------------------------------------------*/
module.exports = new Hash(_mapping);

View File

@@ -8,6 +8,19 @@ var uglifyOptions = require('./uglify.options');
/*----------------------------------------------------------------------------*/
/**
* Asynchronously minifies the file at `srcPath`, writes it to `destPath`, and
* invokes `callback` upon completion. The callback is invoked with one argument:
* (error).
*
* If unspecified, `destPath` is `srcPath` with an extension of `.min.js`. For
* example, a `srcPath` of `path/to/foo.js` would have a `destPath` of `path/to/foo.min.js`.
*
* @param {string} srcPath The path of the file to minify.
* @param {string} [destPath] The path to write the file to.
* @param {Function} callback The function invoked upon completion.
* @param {Object} [option] The UglifyJS options object.
*/
function minify(srcPath, destPath, callback, options) {
if (_.isFunction(destPath)) {
if (_.isObject(callback)) {

View File

@@ -1,8 +1,15 @@
'use strict';
/**
* The UglifyJS options object for
* [compress](https://github.com/mishoo/UglifyJS2#compressor-options),
* [mangle](https://github.com/mishoo/UglifyJS2#mangler-options), and
* [output](https://github.com/mishoo/UglifyJS2#beautifier-options) options.
*/
module.exports = {
'compress': {
'pure_getters': true,
'unsafe': true,
'unsafe_comps': true,
'warnings': false
},
'mangle': {

View File

@@ -1,36 +1,27 @@
'use strict';
var _ = require('lodash'),
fs = require('fs-extra'),
glob = require('glob'),
path = require('path');
var minify = require('../common/minify.js');
var _ = require('lodash');
/*----------------------------------------------------------------------------*/
function copyFile(srcPath, destPath) {
return _.partial(fs.copy, srcPath, destPath);
/**
* Creates a hash object. If a `properties` object is provided, its own
* enumerable properties are assigned to the created object.
*
* @memberOf util
* @param {Object} [properties] The properties to assign to the object.
* @returns {Object} Returns the new hash object.
*/
function Hash(properties) {
return _.transform(properties, function(result, value, key) {
result[key] = (_.isPlainObject(value) && !(value instanceof Hash))
? new Hash(value)
: value;
}, this);
}
function globTemplate(pattern) {
return _.transform(glob.sync(pattern), function(result, filePath) {
var key = path.basename(filePath, path.extname(filePath));
result[key] = _.template(fs.readFileSync(filePath, 'utf8'));
}, {});
}
function minFile(srcPath, destPath) {
return _.partial(minify, srcPath, destPath);
}
function writeFile(filePath, data) {
return _.partial(fs.writeFile, filePath, data);
}
Hash.prototype = Object.create(null);
module.exports = {
'copyFile': copyFile,
'globTemplate': globTemplate,
'minFile': minFile,
'writeFile': writeFile
'Hash': Hash
};

View File

@@ -5,7 +5,7 @@ var _ = require('lodash'),
path = require('path'),
webpack = require('webpack');
var util = require('../common/util');
var file = require('../common/file');
var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist'),
@@ -48,7 +48,7 @@ function build() {
async.series([
_.partial(webpack, mappingConfig),
_.partial(webpack, fpConfig),
util.minFile(path.join(distPath, filename))
file.min(path.join(distPath, filename))
], onComplete);
}

View File

@@ -2,12 +2,13 @@
var _ = require('lodash'),
fs = require('fs-extra'),
path = require('path'),
util = require('../common/util');
path = require('path');
var mapping = require('../../fp/_mapping'),
templatePath = path.join(__dirname, 'template/doc'),
template = util.globTemplate(path.join(templatePath, '*.jst'));
var file = require('../common/file'),
mapping = require('../common/mapping');
var templatePath = path.join(__dirname, 'template/doc'),
template = file.globTemplate(path.join(templatePath, '*.jst'));
var argNames = ['a', 'b', 'c', 'd'];

View File

@@ -5,11 +5,11 @@ var _ = require('lodash'),
glob = require('glob'),
path = require('path');
var util = require('../common/util');
var file = require('../common/file'),
mapping = require('../common/mapping');
var mapping = require('../../fp/_mapping'),
templatePath = path.join(__dirname, 'template/modules'),
template = util.globTemplate(path.join(templatePath, '*.jst'));
var templatePath = path.join(__dirname, 'template/modules'),
template = file.globTemplate(path.join(templatePath, '*.jst'));
var aryMethods = _.union(
mapping.aryMethod[1],
@@ -97,8 +97,7 @@ function build(target) {
_.each([mapping.aliasToReal, mapping.remap], function(data) {
_.forOwn(data, function(realName, alias) {
var modulePath = path.join(target, alias + '.js');
if (!_.startsWith(alias, '_') &&
!_.includes(modulePaths, modulePath)) {
if (!_.includes(modulePaths, modulePath)) {
modulePaths.push(modulePath);
}
});
@@ -106,13 +105,14 @@ function build(target) {
var actions = modulePaths.map(function(modulePath) {
var moduleName = path.basename(modulePath, '.js');
return util.writeFile(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName));
return file.write(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName));
});
actions.unshift(util.copyFile(path.join(__dirname, '../../fp'), fpPath));
actions.push(util.writeFile(path.join(target, 'fp.js'), template.fp()));
actions.push(util.writeFile(path.join(fpPath, 'convert.js'), template.convert()));
actions.push(util.writeFile(path.join(fpPath, '_util.js'), template._util()));
actions.unshift(file.copy(path.join(__dirname, '../../fp'), fpPath));
actions.push(file.write(path.join(fpPath, '_falseOptions.js'), template._falseOptions()));
actions.push(file.write(path.join(fpPath, '_util.js'), template._util()));
actions.push(file.write(path.join(target, 'fp.js'), template.fp()));
actions.push(file.write(path.join(fpPath, 'convert.js'), template.convert()));
async.series(actions, onComplete);
}

View File

@@ -1,7 +1,9 @@
## lodash/fp
The `lodash/fp` module is an instance of `lodash` with its methods wrapped to
produce immutable auto-curried iteratee-first data-last methods.
The `lodash/fp` module promotes a more
[functional programming](https://en.wikipedia.org/wiki/Functional_programming)
(FP) friendly style by exporting an instance of `lodash` with its methods wrapped
to produce immutable auto-curried iteratee-first data-last methods.
## Installation
@@ -9,12 +11,25 @@ In a browser:
```html
<script src='path/to/lodash.js'></script>
<script src='path/to/lodash.fp.js'></script>
<script>
// Loading `lodash.fp.js` converts `_` to its fp variant.
_.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
// → { 'a: 1, 'b': 2 }
// Use `noConflict` to restore the pre-fp variant.
var fp = _.noConflict();
_.defaults({ 'a': 1 }, { 'a': 2, 'b': 2 });
// → { 'a: 1, 'b': 2 }
fp.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
// → { 'a: 1, 'b': 2 }
</script>
```
In Node.js:
```js
// Load the fp build.
var _ = require('lodash/fp');
var fp = require('lodash/fp');
// Load a method category.
var object = require('lodash/fp/object');
@@ -23,12 +38,173 @@ var object = require('lodash/fp/object');
var extend = require('lodash/fp/extend');
```
## Mapping
Immutable auto-curried iteratee-first data-last methods sound great, but what
does that really mean for each method? Below is a breakdown of the mapping used
to convert each method.
#### Capped Iteratee Arguments
Iteratee arguments are capped to avoid gotchas with variadic iteratees.
```js
// The `lodash/map` iteratee receives three arguments:
// (value, index|key, collection)
_.map(['6', '8', '10'], parseInt);
// → [6, NaN, 2]
// The `lodash/fp/map` iteratee is capped at one argument:
// (value)
fp.map(parseInt)(['6', '8', '10']);
// → [6, 8, 10]
```
Methods that cap iteratees to one argument:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %>
Methods that cap iteratees to two arguments:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %>
The iteratee of `mapKeys` is invoked with one argument: (key)
#### Fixed Arity
Methods have fixed arities to support auto-currying.
```js
// `lodash/padStart` accepts an optional `chars` param.
_.padStart('a', 3, '-')
// → '--a'
// `lodash/fp/padStart` does not.
fp.padStart(3)('a');
// → ' a'
fp.padCharsStart('-')(3)('a');
// → '--a'
```
Methods with a fixed arity of one:<br>
<%= toFuncList(_.difference(mapping.aryMethod[1], _.keys(mapping.skipFixed))) %>
Methods with a fixed arity of two:<br>
<%= toFuncList(_.difference(mapping.aryMethod[2], _.keys(mapping.skipFixed))) %>
Methods with a fixed arity of three:<br>
<%= toFuncList(_.difference(mapping.aryMethod[3], _.keys(mapping.skipFixed))) %>
Methods with a fixed arity of four:<br>
<%= toFuncList(_.difference(mapping.aryMethod[4], _.keys(mapping.skipFixed))) %>
#### Rearranged Arguments
Method arguments are rearranged to make composition easier.
```js
// `lodash/filter` is data-first iteratee-last:
// (collection, iteratee)
var compact = _.partial(_.filter, _, Boolean);
compact(['a', null, 'c']);
// → ['a', 'c']
// `lodash/fp/filter` is iteratee-first data-last:
// (iteratee, collection)
var compact = fp.filter(Boolean);
compact(['a', null, 'c']);
// → ['a', 'c']
```
##### Most methods follow these rules
A fixed arity of two has an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[2]) %>
A fixed arity of three has an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[3]) %>
A fixed arity of four has an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[4]) %>
##### Exceptions to the rules
Methods that accept an array of arguments as their second parameter:<br>
<%= toFuncList(_.keys(mapping.methodSpread)) %>
Methods with unchanged argument orders:<br>
<%= toFuncList(_.keys(mapping.skipRearg)) %>
Methods with custom argument orders:<br>
<%= _.map(_.keys(mapping.methodRearg), function(methodName) {
var orders = mapping.methodRearg[methodName];
return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders);
}).join('\n') %>
#### New Methods
Not all variadic methods have corresponding new method variants. Feel free to
[request](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md#feature-requests)
any additions.
Methods created to accommodate Lodashs variadic methods:<br>
<%= toFuncList(_.keys(mapping.remap)) %>
#### Aliases
There are <%= _.size(mapping.aliasToReal) %> method aliases:<br>
<%= _.map(_.keys(mapping.aliasToReal).sort(), function(alias) {
var realName = mapping.aliasToReal[alias];
return ' * `_.' + alias + '` is an alias of `_.' + realName + '`';
}).join('\n') %>
## Placeholders
The placeholder argument, which defaults to `_`, may be used to fill in method
arguments in a different order. Placeholders are filled by the first available
arguments of the curried returned function.
```js
// The equivalent of `2 > 5`.
_.gt(2)(5);
// → false
// The equivalent of `_.gt(5, 2)` or `5 > 2`.
_.gt(_, 2)(5);
// → true
```
## Chaining
The `lodash/fp` module **does not** convert chain sequence methods. See
[Izaak Schroeders article](https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba)
on using functional composition as an alternative to method chaining.
## Convert
Although `lodash/fp` & its method modules come pre-converted, there are times when
you may want to convert another lodash package or create a customized conversion.
Thats when the `convert` module comes in handy.
Although `lodash/fp` & its method modules come pre-converted, there are times
when you may want to customize the conversion. Thats when the `convert` method
comes in handy.
```js
// Every option is `true` by default.
var _fp = fp.convert({
// Specify capping iteratee arguments.
'cap': true,
// Specify currying.
'curry': true,
// Specify fixed arity.
'fixed': true,
// Specify immutable operations.
'immutable': true,
// Specify rearranging arguments.
'rearg': true
});
// The `convert` method is available on each method too.
var mapValuesWithKey = fp.mapValues.convert({ 'cap': false });
// Heres an example of disabling iteratee argument caps to access the `key` param.
mapValuesWithKey(function(value, key) {
return key == 'a' ? -1 : value;
})({ 'a': 1, 'b': 1 });
// => { 'a': -1, 'b': 1 }
```
Manual conversions are also possible with the `convert` module.
```js
var convert = require('lodash/fp/convert');
@@ -45,91 +221,7 @@ var fp = convert({
var fp = convert(lodash.runInContext());
```
Its even customizable.
```js
// Every option is `true` by default.
var filter = convert('filter', _.filter, {
// Specify capping iteratee arguments.
'cap': true,
// Specify currying.
'curry': true,
// Specify fixed arity.
'fixed': true,
// Specify immutable operations.
'immutable': true,
// Specify rearranging arguments.
'rearg': true
});
## Tooling
// Specify `cap` of `false` to create a function that doesnt cap iteratee arguments.
var filter = convert('filter', _.filter, { 'cap': false });
filter(function(value, index) {
return index % 2 == 0;
})(['a', 'b', 'c']);
// => ['a', 'c']
```
## Mapping
Immutable auto-curried iteratee-first data-last methods sound great, but what
does that really mean for each method? Below is a breakdown of the mapping used
to convert each method.
#### Capped Iteratee Arguments
Methods that cap iteratees to one argument:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %>
Methods that cap iteratees to two arguments:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %>
The iteratee of `mapKeys` is invoked with one argument: (key)
#### Fixed Arity
Methods with a fixed arity of one:<br>
<%= toFuncList(mapping.aryMethod[1]) %>
Methods with a fixed arity of two:<br>
<%= toFuncList(mapping.aryMethod[2]) %>
Methods with a fixed arity of three:<br>
<%= toFuncList(mapping.aryMethod[3]) %>
Methods with a fixed arity of four:<br>
<%= toFuncList(mapping.aryMethod[4]) %>
#### Rearranged Arguments
Methods with a fixed arity of two have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[2]) %>
Methods with a fixed arity of three have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[3]) %>
Methods with a fixed arity of four have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[4]) %>
Methods with custom argument orders:<br>
<%= _.map(mapping.methodRearg, function(orders, methodName) {
return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders);
}).join('\n') %>
Methods with unchanged argument orders:<br>
<%= toFuncList(_.keys(mapping.skipRearg)) %>
The methods `partial` & `partialRight` accept an array of arguments to partially
apply as their second parameter.
#### New Methods
Methods created to accommodate Lodashs variadic methods:<br>
<%= toFuncList(_.keys(mapping.remap)) %>
#### Aliases
There are <%= _.size(mapping.aliasToReal) %> method aliases:<br>
<%= _.map(mapping.aliasToReal, function(realName, alias) {
return ' * `_.' + alias + '` is an alias of `_.' + realName + '`';
}).join('\n') %>
Use [eslint-plugin-lodash-fp](https://www.npmjs.com/package/eslint-plugin-lodash-fp)
to help use `lodash/fp` more efficiently.

View File

@@ -0,0 +1,7 @@
module.exports = {
'cap': false,
'curry': false,
'fixed': false,
'immutable': false,
'rearg': false
};

View File

@@ -1,5 +1,6 @@
module.exports = {
'ary': require('../ary'),
'assign': require('../_baseAssign'),
'clone': require('../clone'),
'curry': require('../curry'),
'forEach': require('../_arrayEach'),

View File

@@ -3,7 +3,8 @@ var baseConvert = require('./_baseConvert'),
/**
* Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
* version. If `name` is an object its methods will be converted.
* version with conversion `options` applied. If `name` is an object its methods
* will be converted.
*
* @param {string} name The name of the function to wrap.
* @param {Function} [func] The function to wrap.

View File

@@ -1,2 +1,5 @@
var convert = require('./convert');
module.exports = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
var convert = require('./convert'),
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../<%= name %>');
var convert = require('./convert'),
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,10 +1,9 @@
'use strict';
var _ = require('lodash'),
async = require('async'),
var async = require('async'),
path = require('path');
var util = require('../common/util');
var file = require('../common/file');
var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist'),
@@ -23,8 +22,8 @@ function onComplete(error) {
function build() {
async.series([
util.copyFile(baseLodash, distLodash),
util.minFile(distLodash)
file.copy(baseLodash, distLodash),
file.min(distLodash)
], onComplete);
}

View File

@@ -33,7 +33,7 @@ var config = {
};
function postprocess(string) {
// Fix docdown bug by wrapping symbol property identifiers in brackets.
// Wrap symbol property identifiers in brackets.
return string.replace(/\.(Symbol\.(?:[a-z]+[A-Z]?)+)/g, '[$1]');
}

View File

@@ -4,7 +4,7 @@ var _ = require('lodash'),
async = require('async'),
path = require('path');
var util = require('../common/util');
var file = require('../common/file');
var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist');
@@ -25,7 +25,7 @@ function onComplete(error) {
function build(target) {
var actions = _.map(filePairs, function(pair) {
return util.copyFile(pair[0], path.join(target, pair[1]));
return file.copy(pair[0], path.join(target, pair[1]));
});
async.series(actions, onComplete);

4978
lodash.js

File diff suppressed because it is too large Load Diff

View File

@@ -1,50 +1,55 @@
{
"name": "lodash",
"version": "4.6.0",
"main": "lodash.js",
"version": "4.13.1",
"license": "MIT",
"private": true,
"devDependencies": {
"async": "^1.5.2",
"benchmark": "^2.1.0",
"chalk": "^1.1.1",
"codecov.io": "~0.1.6",
"coveralls": "^2.11.8",
"curl-amd": "~0.8.12",
"docdown": "~0.4.1",
"dojo": "^1.10.4",
"ecstatic": "^1.4.0",
"fs-extra": "~0.26.5",
"glob": "^7.0.0",
"istanbul": "0.4.2",
"jquery": "^2.2.1",
"jscs": "^2.10.1",
"lodash": "4.4.0",
"platform": "^1.3.1",
"qunit-extras": "^1.5.0",
"qunitjs": "~1.22.0",
"request": "^2.69.0",
"requirejs": "^2.1.22",
"sauce-tunnel": "^2.4.0",
"uglify-js": "2.6.2",
"webpack": "^1.12.14"
},
"main": "lodash.js",
"scripts": {
"build": "npm run build:main & npm run build:fp",
"build": "npm run build:main && npm run build:fp",
"build:fp": "node lib/fp/build-dist.js",
"build:fp-modules": "node lib/fp/build-modules.js",
"build:main": "node lib/main/build-dist.js",
"build:main-modules": "node lib/main/build-modules.js",
"doc": "node lib/main/build-doc github",
"doc": "node lib/main/build-doc github && npm run test:doc",
"doc:fp": "node lib/fp/build-doc",
"doc:site": "node lib/main/build-doc site",
"prepublish": "npm run build",
"pretest": "npm run build",
"style": "npm run style:main & npm run style:fp & npm run style:perf & npm run style:test",
"style": "npm run style:main && npm run style:fp && npm run style:perf && npm run style:test",
"style:fp": "jscs fp/*.js lib/**/*.js",
"style:main": "jscs lodash.js",
"style:perf": "jscs perf/*.js perf/**/*.js",
"style:test": "jscs test/*.js test/**/*.js",
"test": "npm run test:main && npm run test:fp",
"test:doc": "markdown-doctest",
"test:fp": "node test/test-fp",
"test:main": "node test/test"
"test:main": "node test/test",
"validate": "npm run style && npm run test"
},
"devDependencies": {
"async": "^1.5.2",
"benchmark": "^2.1.0",
"chalk": "^1.1.3",
"codecov.io": "~0.1.6",
"coveralls": "^2.11.9",
"curl-amd": "~0.8.12",
"docdown": "~0.5.1",
"dojo": "^1.11.1",
"ecstatic": "^1.4.1",
"fs-extra": "~0.30.0",
"glob": "^7.0.3",
"istanbul": "0.4.3",
"jquery": "^2.2.4",
"jscs": "^3.0.1",
"lodash": "4.11.2",
"markdown-doctest": "^0.6.0",
"platform": "^1.3.1",
"qunit-extras": "^2.0.0",
"qunitjs": "~1.23.1",
"request": "^2.69.0",
"requirejs": "^2.2.0",
"sauce-tunnel": "^2.4.0",
"uglify-js": "2.6.2",
"webpack": "^1.13.1"
}
}

View File

@@ -82,12 +82,6 @@
/** Used to queue benchmark suites. */
var suites = [];
/** Used to resolve a value's internal [[Class]]. */
var toString = Object.prototype.toString;
/** Detect if in a browser environment. */
var isBrowser = isHostType(root, 'document') && isHostType(root, 'navigator');
/** Use a single "load" function. */
var load = (typeof require == 'function' && !amd)
? require
@@ -565,11 +559,11 @@
suites.push(
Benchmark.Suite('`_.assign`')
.add(buildName, {
'fn': 'lodashAssign({}, object)',
'fn': 'lodashAssign({}, { "a": 1, "b": 2, "c": 3 })',
'teardown': 'function assign(){}'
})
.add(otherName, {
'fn': '_assign({}, object)',
'fn': '_assign({}, { "a": 1, "b": 2, "c": 3 })',
'teardown': 'function assign(){}'
})
);
@@ -577,11 +571,11 @@
suites.push(
Benchmark.Suite('`_.assign` with multiple sources')
.add(buildName, {
'fn': 'lodashAssign({}, object, object)',
'fn': 'lodashAssign({}, { "a": 1, "b": 2 }, { "c": 3, "d": 4 })',
'teardown': 'function assign(){}'
})
.add(otherName, {
'fn': '_assign({}, object, object)',
'fn': '_assign({}, { "a": 1, "b": 2 }, { "c": 3, "d": 4 })',
'teardown': 'function assign(){}'
})
);

View File

@@ -5,7 +5,10 @@ addEventListener('message', function(e) {
try {
importScripts('../' + e.data);
} catch (e) {
self._ = { 'VERSION': e.message };
var lineNumber = e.lineNumber,
message = (lineNumber == null ? '' : (lineNumber + ': ')) + e.message;
self._ = { 'VERSION': message };
}
postMessage(_.VERSION);
}

View File

@@ -119,6 +119,9 @@
setProperty(Map, 'toString', createToString('Map'));
}
setProperty(window, '_Promise', window.Promise);
setProperty(window, 'Promise', noop);
setProperty(window, '_Set', window.Set);
setProperty(window, 'Set', noop);
@@ -158,6 +161,11 @@
} else {
setProperty(window, 'Map', undefined);
}
if (_Promise) {
Promise = _Promise;
} else {
setProperty(window, 'Promise', undefined);
}
if (_Set) {
Set = _Set;
} else {
@@ -172,6 +180,7 @@
setProperty(window, 'WeakMap', undefined);
}
setProperty(window, '_Map', undefined);
setProperty(window, '_Promise', undefined);
setProperty(window, '_Set', undefined);
setProperty(window, '_Symbol', undefined);
setProperty(window, '_WeakMap', undefined);

View File

@@ -97,17 +97,18 @@ var browserNameMap = {
'googlechrome': 'Chrome',
'iehta': 'Internet Explorer',
'ipad': 'iPad',
'iphone': 'iPhone'
'iphone': 'iPhone',
'microsoftedge': 'Edge'
};
/** List of platforms to load the runner on. */
var platforms = [
['Linux', 'android', '5.1'],
['Windows 10', 'chrome', '48'],
['Windows 10', 'chrome', '47'],
['Windows 10', 'firefox', '44'],
['Windows 10', 'firefox', '43'],
['Windows 10', 'microsoftedge', '20.10240'],
['Windows 10', 'chrome', '50'],
['Windows 10', 'chrome', '49'],
['Windows 10', 'firefox', '46'],
['Windows 10', 'firefox', '45'],
['Windows 10', 'microsoftedge', '13'],
['Windows 10', 'internet explorer', '11'],
['Windows 8', 'internet explorer', '10'],
['Windows 7', 'internet explorer', '9'],
@@ -213,18 +214,7 @@ if (tunneled) {
* @returns {string} Returns the formal browser name.
*/
function browserName(identifier) {
return browserNameMap[identifier] || capitalizeWords(identifier);
}
/**
* Capitalizes the first character of each word in `string`.
*
* @private
* @param {string} string The string to augment.
* @returns {string} Returns the augmented string.
*/
function capitalizeWords(string) {
return _.map(string.split(' '), _.capitalize).join(' ');
return browserNameMap[identifier] || _.startCase(identifier);
}
/**
@@ -450,7 +440,7 @@ function onJobStatus(error, res, body) {
this._pollerId = _.delay(_.bind(this.status, this), this.statusInterval * 1000);
return;
}
var description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + capitalizeWords(platform[0]),
var description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + _.startCase(platform[0]),
errored = !jobResult || !jobResult.passed || reError.test(message) || reError.test(jobStatus),
failures = _.result(jobResult, 'failed'),
label = options.name + ':',
@@ -601,7 +591,7 @@ Job.prototype.restart = function(callback) {
var options = this.options,
platform = options.platforms[0],
description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + capitalizeWords(platform[0]),
description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + _.startCase(platform[0]),
label = options.name + ':';
logInline();
@@ -826,13 +816,16 @@ Tunnel.prototype.start = function(callback) {
* @param {Object} Returns the tunnel instance.
*/
Tunnel.prototype.dequeue = function() {
var jobs = this.jobs,
var count = 0,
jobs = this.jobs,
active = jobs.active,
queue = jobs.queue,
throttled = this.throttled;
while (queue.length && (active.length < throttled)) {
active.push(queue.shift().start());
var job = queue.shift();
active.push(job);
_.delay(_.bind(job.start, job), ++count * 1000);
}
return this;
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,9 @@
QUnit.config.hidepassed = true;
QUnit.config.excused = {
'Arrays': {
'chunk': [
'defaults to empty array (chunk size 0)'
],
'difference': [
'can perform an OO-style difference'
],
@@ -291,6 +294,9 @@
'isMatch': [
'doesnt falsey match constructor on undefined/null'
],
'isSet': [
'Died on test #9'
],
'findKey': [
'called with context'
],
@@ -381,7 +387,6 @@
// Only excuse in Sauce Labs.
if (!ui.isSauceLabs) {
delete QUnit.config.excused.Functions['throttle repeatedly with results'];
delete QUnit.config.excused.Functions['throttle does not trigger trailing call when trailing is set to false'];
delete QUnit.config.excused.Utility.now;
}

View File

@@ -1,4 +1,4 @@
// Backbone.js 1.2.3
// Backbone.js 1.3.3
// (c) 2010-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Backbone may be freely distributed under the MIT license.
@@ -44,7 +44,7 @@
var slice = Array.prototype.slice;
// Current version of the library. Keep in sync with `package.json`.
Backbone.VERSION = '1.2.3';
Backbone.VERSION = '1.3.3';
// For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
// the `$` variable.
@@ -242,7 +242,6 @@
listening.obj.off(name, callback, this);
}
if (_.isEmpty(listeningTo)) this._listeningTo = void 0;
return this;
};
@@ -299,7 +298,7 @@
delete events[name];
}
}
if (_.size(events)) return events;
return events;
};
// Bind an event to only be triggered a single time. After the first time
@@ -309,7 +308,8 @@
Events.once = function(name, callback, context) {
// Map the event into a `{event: once}` object.
var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this));
return this.on(events, void 0, context);
if (typeof name === 'string' && context == null) callback = void 0;
return this.on(events, callback, context);
};
// Inversion-of-control versions of `once`.
@@ -398,7 +398,8 @@
this.attributes = {};
if (options.collection) this.collection = options.collection;
if (options.parse) attrs = this.parse(attrs, options) || {};
attrs = _.defaults({}, attrs, _.result(this, 'defaults'));
var defaults = _.result(this, 'defaults');
attrs = _.defaults(_.extend({}, defaults, attrs), defaults);
this.set(attrs, options);
this.changed = {};
this.initialize.apply(this, arguments);
@@ -714,7 +715,7 @@
// Check if the model is currently in a valid state.
isValid: function(options) {
return this._validate({}, _.defaults({validate: true}, options));
return this._validate({}, _.extend({}, options, {validate: true}));
},
// Run validation against the next complete set of model attributes,
@@ -824,7 +825,7 @@
set: function(models, options) {
if (models == null) return;
options = _.defaults({}, options, setOptions);
options = _.extend({}, setOptions, options);
if (options.parse && !this._isModel(models)) {
models = this.parse(models, options) || [];
}
@@ -834,6 +835,7 @@
var at = options.at;
if (at != null) at = +at;
if (at > this.length) at = this.length;
if (at < 0) at += this.length + 1;
var set = [];
@@ -978,11 +980,13 @@
return slice.apply(this.models, arguments);
},
// Get a model from the set by id.
// Get a model from the set by id, cid, model object with id or cid
// properties, or an attributes object that is transformed through modelId.
get: function(obj) {
if (obj == null) return void 0;
var id = this.modelId(this._isModel(obj) ? obj.attributes : obj);
return this._byId[obj] || this._byId[id] || this._byId[obj.cid];
return this._byId[obj] ||
this._byId[this.modelId(obj.attributes || obj)] ||
obj.cid && this._byId[obj.cid];
},
// Returns `true` if the model is in the collection.
@@ -1913,5 +1917,4 @@
};
return Backbone;
});

View File

@@ -101,11 +101,6 @@
assert.equal(collection2.get(model.clone()), collection2.first());
});
QUnit.test('get with "undefined" id', function(assert) {
var collection = new Backbone.Collection([{id: 1}, {id: 'undefined'}]);
assert.equal(collection.get(1).id, 1);
});
QUnit.test('has', function(assert) {
assert.expect(15);
assert.ok(col.has(a));
@@ -1583,7 +1578,7 @@
});
QUnit.test('_addReference binds all collection events & adds to the lookup hashes', function(assert) {
assert.expect(9);
assert.expect(8);
var calls = {add: 0, remove: 0};
@@ -1603,7 +1598,6 @@
assert.equal(this._byId[model.id], void 0);
assert.equal(this._byId[model.cid], void 0);
assert.equal(model.collection, void 0);
assert.equal(model._events, void 0);
}
});
@@ -1739,13 +1733,14 @@
assert.equal(c2.modelId(m.attributes), void 0);
});
QUnit.test('#3039: adding at index fires with correct at', function(assert) {
assert.expect(3);
var collection = new Backbone.Collection([{at: 0}, {at: 4}]);
QUnit.test('#3039 #3951: adding at index fires with correct at', function(assert) {
assert.expect(4);
var collection = new Backbone.Collection([{val: 0}, {val: 4}]);
collection.on('add', function(model, coll, options) {
assert.equal(model.get('at'), options.index);
assert.equal(model.get('val'), options.index);
});
collection.add([{at: 1}, {at: 2}, {at: 3}], {at: 1});
collection.add([{val: 1}, {val: 2}, {val: 3}], {at: 1});
collection.add({val: 5}, {at: 10});
});
QUnit.test('#3039: index is not sent when at is not specified', function(assert) {
@@ -1903,7 +1898,7 @@
assert.deepEqual(changed.merged, []);
assert.ok(changed.removed.length === 2);
assert.ok(changed.removed.indexOf(model) > -1 && changed.removed.indexOf(model2) > -1);
assert.ok(_.indexOf(changed.removed, model) > -1 && _.indexOf(changed.removed, model2) > -1);
});
collection.remove([model, model2]);
});

View File

@@ -417,6 +417,18 @@
assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
});
QUnit.test('bind a callback with a default context when none supplied', function(assert) {
assert.expect(1);
var obj = _.extend({
assertTrue: function() {
assert.equal(this, obj, '`this` was bound to the callback');
}
}, Backbone.Events);
obj.once('event', obj.assertTrue);
obj.trigger('event');
});
QUnit.test('bind a callback with a supplied context', function(assert) {
assert.expect(1);
var TestClass = function() {
@@ -587,6 +599,19 @@
assert.equal(obj.counter, 3);
});
QUnit.test('bind a callback with a supplied context using once with object notation', function(assert) {
assert.expect(1);
var obj = {counter: 0};
var context = {};
_.extend(obj, Backbone.Events);
obj.once({
a: function() {
assert.strictEqual(this, context, 'defaults `context` to `callback` param');
}
}, context).trigger('a');
});
QUnit.test('once with off only by context', function(assert) {
assert.expect(0);
var context = {};

View File

@@ -34,6 +34,12 @@
assert.equal(model.collection, collection);
});
QUnit.test('Object.prototype properties are overridden by attributes', function(assert) {
assert.expect(1);
var model = new Backbone.Model({hasOwnProperty: true});
assert.equal(model.get('hasOwnProperty'), true);
});
QUnit.test('initialize with attributes and options', function(assert) {
assert.expect(1);
var Model = Backbone.Model.extend({
@@ -57,19 +63,6 @@
assert.equal(model.get('value'), 2);
});
QUnit.test('initialize with defaults', function(assert) {
assert.expect(2);
var Model = Backbone.Model.extend({
defaults: {
firstName: 'Unknown',
lastName: 'Unknown'
}
});
var model = new Model({'firstName': 'John'});
assert.equal(model.get('firstName'), 'John');
assert.equal(model.get('lastName'), 'Unknown');
});
QUnit.test('parse can return null', function(assert) {
assert.expect(1);
var Model = Backbone.Model.extend({
@@ -428,7 +421,7 @@
});
QUnit.test('defaults', function(assert) {
assert.expect(4);
assert.expect(9);
var Defaulted = Backbone.Model.extend({
defaults: {
one: 1,
@@ -438,6 +431,9 @@
var model = new Defaulted({two: undefined});
assert.equal(model.get('one'), 1);
assert.equal(model.get('two'), 2);
model = new Defaulted({two: 3});
assert.equal(model.get('one'), 1);
assert.equal(model.get('two'), 3);
Defaulted = Backbone.Model.extend({
defaults: function() {
return {
@@ -449,6 +445,15 @@
model = new Defaulted({two: undefined});
assert.equal(model.get('one'), 3);
assert.equal(model.get('two'), 4);
Defaulted = Backbone.Model.extend({
defaults: {hasOwnProperty: true}
});
model = new Defaulted();
assert.equal(model.get('hasOwnProperty'), true);
model = new Defaulted({hasOwnProperty: undefined});
assert.equal(model.get('hasOwnProperty'), true);
model = new Defaulted({hasOwnProperty: false});
assert.equal(model.get('hasOwnProperty'), false);
});
QUnit.test('change, hasChanged, changedAttributes, previous, previousAttributes', function(assert) {
@@ -989,8 +994,8 @@
QUnit.test('`previous` for falsey keys', function(assert) {
assert.expect(2);
var model = new Backbone.Model({0: true, '': true});
model.set({0: false, '': false}, {silent: true});
var model = new Backbone.Model({'0': true, '': true});
model.set({'0': false, '': false}, {silent: true});
assert.equal(model.previous(0), true);
assert.equal(model.previous(''), true);
});

View File

@@ -14,6 +14,11 @@
className: 'test-view',
other: 'non-special-option'
});
},
afterEach: function() {
$('#testElement').remove();
$('#test-view').remove();
}
});

View File

@@ -475,9 +475,9 @@
});
QUnit.test('debounce asap', function(assert) {
assert.expect(4);
assert.expect(6);
var done = assert.async();
var a, b;
var a, b, c;
var counter = 0;
var incr = function(){ return ++counter; };
var debouncedIncr = _.debounce(incr, 64, true);
@@ -489,7 +489,13 @@
_.delay(debouncedIncr, 16);
_.delay(debouncedIncr, 32);
_.delay(debouncedIncr, 48);
_.delay(function(){ assert.equal(counter, 1, 'incr was debounced'); done(); }, 128);
_.delay(function(){
assert.equal(counter, 1, 'incr was debounced');
c = debouncedIncr();
assert.equal(c, 2);
assert.equal(counter, 2, 'incr was called again');
done();
}, 128);
});
QUnit.test('debounce asap cancel', function(assert) {

View File

@@ -565,6 +565,14 @@
assert.equal(_.isEqual({a: 0}, {a: -0}), false);
assert.equal(_.isEqual([NaN], [NaN]), true);
assert.equal(_.isEqual({a: NaN}, {a: NaN}), true);
if (typeof Symbol !== 'undefined') {
var symbol = Symbol('x');
assert.strictEqual(_.isEqual(symbol, symbol), true, 'A symbol is equal to itself');
assert.strictEqual(_.isEqual(symbol, Object(symbol)), true, 'Even when wrapped in Object()');
assert.strictEqual(_.isEqual(symbol, null), false, 'Different types are not equal');
}
});
QUnit.test('isEmpty', function(assert) {
@@ -673,6 +681,100 @@
assert.ok(_.isBoolean(false), 'and so is false');
});
QUnit.test('isMap', function(assert) {
assert.ok(!_.isMap('string'), 'a string is not a map');
assert.ok(!_.isMap(2), 'a number is not a map');
assert.ok(!_.isMap({}), 'an object is not a map');
assert.ok(!_.isMap(false), 'a boolean is not a map');
assert.ok(!_.isMap(void 0), 'undefined is not a map');
assert.ok(!_.isMap([1, 2, 3]), 'an array is not a map');
if (typeof Set === 'function') {
assert.ok(!_.isMap(new Set()), 'a set is not a map');
}
if (typeof WeakSet === 'function') {
assert.ok(!_.isMap(new WeakSet()), 'a weakset is not a map');
}
if (typeof WeakMap === 'function') {
assert.ok(!_.isMap(new WeakMap()), 'a weakmap is not a map');
}
if (typeof Map === 'function') {
var keyString = 'a string';
var obj = new Map();
obj.set(keyString, 'value');
assert.ok(_.isMap(obj), 'but a map is');
}
});
QUnit.test('isWeakMap', function(assert) {
assert.ok(!_.isWeakMap('string'), 'a string is not a weakmap');
assert.ok(!_.isWeakMap(2), 'a number is not a weakmap');
assert.ok(!_.isWeakMap({}), 'an object is not a weakmap');
assert.ok(!_.isWeakMap(false), 'a boolean is not a weakmap');
assert.ok(!_.isWeakMap(void 0), 'undefined is not a weakmap');
assert.ok(!_.isWeakMap([1, 2, 3]), 'an array is not a weakmap');
if (typeof Set === 'function') {
assert.ok(!_.isWeakMap(new Set()), 'a set is not a weakmap');
}
if (typeof WeakSet === 'function') {
assert.ok(!_.isWeakMap(new WeakSet()), 'a weakset is not a weakmap');
}
if (typeof Map === 'function') {
assert.ok(!_.isWeakMap(new Map()), 'a map is not a weakmap');
}
if (typeof WeakMap === 'function') {
var keyObj = {}, obj = new WeakMap();
obj.set(keyObj, 'value');
assert.ok(_.isWeakMap(obj), 'but a weakmap is');
}
});
QUnit.test('isSet', function(assert) {
assert.ok(!_.isSet('string'), 'a string is not a set');
assert.ok(!_.isSet(2), 'a number is not a set');
assert.ok(!_.isSet({}), 'an object is not a set');
assert.ok(!_.isSet(false), 'a boolean is not a set');
assert.ok(!_.isSet(void 0), 'undefined is not a set');
assert.ok(!_.isSet([1, 2, 3]), 'an array is not a set');
if (typeof Map === 'function') {
assert.ok(!_.isSet(new Map()), 'a map is not a set');
}
if (typeof WeakMap === 'function') {
assert.ok(!_.isSet(new WeakMap()), 'a weakmap is not a set');
}
if (typeof WeakSet === 'function') {
assert.ok(!_.isSet(new WeakSet()), 'a weakset is not a set');
}
if (typeof Set === 'function') {
var obj = new Set();
obj.add(1).add('string').add(false).add({});
assert.ok(_.isSet(obj), 'but a set is');
}
});
QUnit.test('isWeakSet', function(assert) {
assert.ok(!_.isWeakSet('string'), 'a string is not a weakset');
assert.ok(!_.isWeakSet(2), 'a number is not a weakset');
assert.ok(!_.isWeakSet({}), 'an object is not a weakset');
assert.ok(!_.isWeakSet(false), 'a boolean is not a weakset');
assert.ok(!_.isWeakSet(void 0), 'undefined is not a weakset');
assert.ok(!_.isWeakSet([1, 2, 3]), 'an array is not a weakset');
if (typeof Map === 'function') {
assert.ok(!_.isWeakSet(new Map()), 'a map is not a weakset');
}
if (typeof WeakMap === 'function') {
assert.ok(!_.isWeakSet(new WeakMap()), 'a weakmap is not a weakset');
}
if (typeof Set === 'function') {
assert.ok(!_.isWeakSet(new Set()), 'a set is not a weakset');
}
if (typeof WeakSet === 'function') {
var obj = new WeakSet();
obj.add({x: 1}, {y: 'string'}).add({y: 'string'}).add({z: [1, 2, 3]});
assert.ok(_.isWeakSet(obj), 'but a weakset is');
}
});
QUnit.test('isFunction', function(assert) {
assert.ok(!_.isFunction(void 0), 'undefined vars are not functions');
assert.ok(!_.isFunction([1, 2, 3]), 'arrays are not functions');

View File

@@ -20,6 +20,7 @@
// Save bytes in the minified (but not gzipped) version:
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
// Create quick reference variables for speed access to core prototypes.
var push = ArrayProto.push,
@@ -218,12 +219,8 @@
// Return the first value which passes a truth test. Aliased as `detect`.
_.find = _.detect = function(obj, predicate, context) {
var key;
if (isArrayLike(obj)) {
key = _.findIndex(obj, predicate, context);
} else {
key = _.findKey(obj, predicate, context);
}
var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;
var key = keyFinder(obj, predicate, context);
if (key !== void 0 && key !== -1) return obj[key];
};
@@ -442,7 +439,7 @@
// Keep surrogate pair characters together
return obj.match(reStrSymbol);
}
if (isArrayLike(obj)) return _.map(obj, _.identity);
if (isArrayLike(obj)) return _.map(obj);
return _.values(obj);
};
@@ -494,7 +491,7 @@
// Trim out all falsy values from an array.
_.compact = function(array) {
return _.filter(array, _.identity);
return _.filter(array);
};
// Internal implementation of a recursive `flatten` function.
@@ -859,12 +856,12 @@
};
var debounced = restArgs(function(args) {
var callNow = immediate && !timeout;
if (timeout) clearTimeout(timeout);
if (callNow) {
if (immediate) {
var callNow = !timeout;
timeout = setTimeout(later, wait);
result = func.apply(this, args);
} else if (!immediate) {
if (callNow) result = func.apply(this, args);
} else {
timeout = _.delay(later, wait, this, args);
}
@@ -1195,6 +1192,8 @@
// millisecond representations. Note that invalid dates with millisecond representations
// of `NaN` are not equivalent.
return +a === +b;
case '[object Symbol]':
return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
}
var areArrays = className === '[object Array]';
@@ -1285,8 +1284,8 @@
return type === 'function' || type === 'object' && !!obj;
};
// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.
_.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol'], function(name) {
// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.
_.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) {
_['is' + name] = function(obj) {
return toString.call(obj) === '[object ' + name + ']';
};