Compare commits
1700 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23b00ebaac | ||
|
|
5e29e3f1cb | ||
|
|
0558495760 | ||
|
|
0471dfa2f8 | ||
|
|
7883e6544e | ||
|
|
6da87e4a79 | ||
|
|
bafe4fff93 | ||
|
|
da782398a2 | ||
|
|
4b26b46f6a | ||
|
|
0f1e69a2df | ||
|
|
85f2bd464c | ||
|
|
8a4956b736 | ||
|
|
4a369af4c7 | ||
|
|
9749305ecd | ||
|
|
639178dbdc | ||
|
|
62d038b547 | ||
|
|
9b80e3a33b | ||
|
|
0ea54f0458 | ||
|
|
374c52f71f | ||
|
|
60f63e125a | ||
|
|
7cfa7f3de4 | ||
|
|
92409831c2 | ||
|
|
e04790a628 | ||
|
|
cd7bf40508 | ||
|
|
dc378e9ce7 | ||
|
|
5fcdcec1a8 | ||
|
|
8773704c8b | ||
|
|
291fd1857e | ||
|
|
0aa4aeaddc | ||
|
|
ca81f1b2e8 | ||
|
|
fca3a14410 | ||
|
|
d105e80ed8 | ||
|
|
ce63faa597 | ||
|
|
25c1b63a00 | ||
|
|
548728abba | ||
|
|
2ebdbd565a | ||
|
|
86376616ff | ||
|
|
7c6865f948 | ||
|
|
c2da0070f5 | ||
|
|
bf2a2aed66 | ||
|
|
403ea0a0e1 | ||
|
|
27976cbe1a | ||
|
|
70147396a4 | ||
|
|
d6aed16e7c | ||
|
|
0414bae820 | ||
|
|
620866bc39 | ||
|
|
55f080e33f | ||
|
|
9f2b1b03d7 | ||
|
|
c0a0f3aaf5 | ||
|
|
7726b5c56b | ||
|
|
3daff8ab8a | ||
|
|
428c2097c7 | ||
|
|
7786583ecf | ||
|
|
9b79ea7d30 | ||
|
|
3dc8436362 | ||
|
|
9f1f2a4845 | ||
|
|
40204e8133 | ||
|
|
133b1067c5 | ||
|
|
5c8287203e | ||
|
|
061bbb1914 | ||
|
|
572168ef20 | ||
|
|
1aa27f2da3 | ||
|
|
be76614c90 | ||
|
|
e26d355fb7 | ||
|
|
d8dbcef5dd | ||
|
|
5d6a6590bf | ||
|
|
7dfdfe5b50 | ||
|
|
36fcc460f4 | ||
|
|
24b03d42d6 | ||
|
|
60275d3637 | ||
|
|
9b5b471802 | ||
|
|
1edb96f526 | ||
|
|
f949bdcfe4 | ||
|
|
21a45a940e | ||
|
|
fb61dfd39d | ||
|
|
9b5940505b | ||
|
|
8c07a67fe9 | ||
|
|
0f9687ce62 | ||
|
|
1460e46d1f | ||
|
|
692521c49d | ||
|
|
2f1d8cc196 | ||
|
|
eeabb47fb6 | ||
|
|
e078f584eb | ||
|
|
f86322545a | ||
|
|
720e19a01f | ||
|
|
3560fed86e | ||
|
|
5f8f5a9f85 | ||
|
|
1aae24b831 | ||
|
|
b544b1c3d4 | ||
|
|
f462f87183 | ||
|
|
6ed7ef25b2 | ||
|
|
bc79d09f2d | ||
|
|
5b2becb87f | ||
|
|
cd808fb5a5 | ||
|
|
c8a4e40bcf | ||
|
|
911b6c9679 | ||
|
|
03041f87c3 | ||
|
|
360c53d6ca | ||
|
|
3f1d555c71 | ||
|
|
ae1d72265c | ||
|
|
9570c65d88 | ||
|
|
3e0b04509a | ||
|
|
0884379e0b | ||
|
|
ec16532028 | ||
|
|
c8f13544a8 | ||
|
|
44bfe55413 | ||
|
|
b95c1adc86 | ||
|
|
b3a94c26d9 | ||
|
|
159c7238a8 | ||
|
|
70f40bab1d | ||
|
|
6c1a9dc14b | ||
|
|
816381a6a8 | ||
|
|
dd84bca638 | ||
|
|
a5d2019a39 | ||
|
|
26cee564c9 | ||
|
|
316b8a1375 | ||
|
|
618b25df08 | ||
|
|
8f9c4cd217 | ||
|
|
c6e2e33e87 | ||
|
|
db605ea7ca | ||
|
|
a1507d4844 | ||
|
|
c6340a64fe | ||
|
|
265b440c37 | ||
|
|
ea8e6d978d | ||
|
|
c3f5bc6bfb | ||
|
|
e322f6dbe2 | ||
|
|
83059a013c | ||
|
|
e374392450 | ||
|
|
72d505b2f1 | ||
|
|
a11bff0c7b | ||
|
|
a820ee4c82 | ||
|
|
a18be78bd3 | ||
|
|
83b5806cec | ||
|
|
4d7a1199ea | ||
|
|
d47cac563a | ||
|
|
2969290c63 | ||
|
|
277557cd99 | ||
|
|
21db7d438b | ||
|
|
61ff2da15c | ||
|
|
ad8296a535 | ||
|
|
aec3318f4c | ||
|
|
3297c3a2e2 | ||
|
|
84759de36f | ||
|
|
a562126f2f | ||
|
|
1901134601 | ||
|
|
eecb6986ee | ||
|
|
508cada017 | ||
|
|
2abae2f21a | ||
|
|
82c17dbde2 | ||
|
|
425499b3aa | ||
|
|
96605766bb | ||
|
|
161012b0a7 | ||
|
|
0669a053db | ||
|
|
ab66e77740 | ||
|
|
381cd53551 | ||
|
|
1f0e92a752 | ||
|
|
98b3496717 | ||
|
|
4200e2e4e4 | ||
|
|
e239ae1aba | ||
|
|
2acfc307b7 | ||
|
|
186f1cf714 | ||
|
|
a5cf42b7c8 | ||
|
|
fd7dba8860 | ||
|
|
32d7e365d2 | ||
|
|
1078cc1c91 | ||
|
|
c97fc370cd | ||
|
|
fca8da118e | ||
|
|
dda56405e6 | ||
|
|
f0f23d491c | ||
|
|
44c10d720a | ||
|
|
690e5a7f9c | ||
|
|
e4fdbc3cb4 | ||
|
|
fe2b86ba83 | ||
|
|
8fb9557520 | ||
|
|
25c91b398a | ||
|
|
8a524dd98f | ||
|
|
7371f8927c | ||
|
|
3d4f58d564 | ||
|
|
f0e32c88ec | ||
|
|
5ae3eccaf1 | ||
|
|
093f12254f | ||
|
|
3a8afe2969 | ||
|
|
fff5ae97f2 | ||
|
|
3c626e3ea5 | ||
|
|
26f57141a1 | ||
|
|
419aa9dcba | ||
|
|
3f15456b9c | ||
|
|
f67a2fa865 | ||
|
|
0f6de542bf | ||
|
|
1a529841e0 | ||
|
|
a9bf6a0e3b | ||
|
|
76dcd7d96e | ||
|
|
6aa1361b1a | ||
|
|
f623a4ecef | ||
|
|
aa465a12aa | ||
|
|
81ba623423 | ||
|
|
4f6f6cca0f | ||
|
|
56346f2a52 | ||
|
|
edcd3f5145 | ||
|
|
7acd3d5297 | ||
|
|
1732c16778 | ||
|
|
913d440c61 | ||
|
|
8cdb4d48f2 | ||
|
|
907ac05c00 | ||
|
|
067558529c | ||
|
|
c97e653ba1 | ||
|
|
9a935ba90c | ||
|
|
134ed51517 | ||
|
|
993dd84af9 | ||
|
|
28e3ab73fa | ||
|
|
70a5efa1d6 | ||
|
|
a51a355a53 | ||
|
|
fdd0a33571 | ||
|
|
6547d03b91 | ||
|
|
cc0c2f1b3c | ||
|
|
c80c59c692 | ||
|
|
10de191dd5 | ||
|
|
1626cec089 | ||
|
|
0404776d87 | ||
|
|
4398fca1bd | ||
|
|
e94ca12f9f | ||
|
|
036c2f6a1c | ||
|
|
611304e257 | ||
|
|
cf26447f7c | ||
|
|
e5b8e04dde | ||
|
|
bb201e6ca4 | ||
|
|
bb58d633c0 | ||
|
|
56ff8755d4 | ||
|
|
57fc027f77 | ||
|
|
bdb7c226f1 | ||
|
|
17e32017a7 | ||
|
|
2c772d0f4c | ||
|
|
769ff84a65 | ||
|
|
fd1fbd4843 | ||
|
|
eaa9430e26 | ||
|
|
2e5de88445 | ||
|
|
b4b9910203 | ||
|
|
afeeadd665 | ||
|
|
fcbeb10159 | ||
|
|
65227f601e | ||
|
|
56ae4dcd12 | ||
|
|
2b2c8e6b82 | ||
|
|
49c032315c | ||
|
|
15109f801e | ||
|
|
3de0a16a9d | ||
|
|
bb49b0c16a | ||
|
|
9561414985 | ||
|
|
db7354ab72 | ||
|
|
34396dbbec | ||
|
|
d842a2f62e | ||
|
|
a17c32bed0 | ||
|
|
fab0b91a79 | ||
|
|
88974d552d | ||
|
|
b90a38ce8b | ||
|
|
b3df27c362 | ||
|
|
854ea26ab7 | ||
|
|
e385b3499b | ||
|
|
77d323b38c | ||
|
|
64eeb091b8 | ||
|
|
65f5f8e8e2 | ||
|
|
6b3ee1aaaf | ||
|
|
27ca48c6bb | ||
|
|
2786c776e3 | ||
|
|
23cd5b906b | ||
|
|
0f9d20129d | ||
|
|
4649bd3906 | ||
|
|
3048ac2f6d | ||
|
|
8679377fcf | ||
|
|
db5264af3c | ||
|
|
059fbb9e5d | ||
|
|
01303c1e31 | ||
|
|
a8aaa793a0 | ||
|
|
c5698e82da | ||
|
|
ec12f7a5e7 | ||
|
|
b87fec554f | ||
|
|
740981376d | ||
|
|
8694364aa3 | ||
|
|
f1b1fee6e4 | ||
|
|
915596b23e | ||
|
|
6d65cb77ec | ||
|
|
51e2f8e49b | ||
|
|
0a7fc356b6 | ||
|
|
ff0f05a1c1 | ||
|
|
0ea9362d06 | ||
|
|
9d3932bd82 | ||
|
|
8c787fa7f7 | ||
|
|
2508e71324 | ||
|
|
b2f4f96ef9 | ||
|
|
fdae297fca | ||
|
|
36488fd836 | ||
|
|
ee01c944b4 | ||
|
|
d7f4f392d2 | ||
|
|
1756093618 | ||
|
|
1734c6e6bf | ||
|
|
839f345fa3 | ||
|
|
d69b5385e4 | ||
|
|
eb6b5755e7 | ||
|
|
9c65d9f957 | ||
|
|
cfa187f7d9 | ||
|
|
30d0fbeae6 | ||
|
|
9b21656314 | ||
|
|
b1b06a38af | ||
|
|
d2fffe5b88 | ||
|
|
09d560888e | ||
|
|
fa28326ed6 | ||
|
|
9ea4a6b7b6 | ||
|
|
ffa6fafcc1 | ||
|
|
4be5b80ff6 | ||
|
|
5028b07aaa | ||
|
|
7ce5dcdead | ||
|
|
7d8571b0e1 | ||
|
|
fca2fe2c8a | ||
|
|
75576577e0 | ||
|
|
eafc46f6c4 | ||
|
|
c0c36d3338 | ||
|
|
6a73b0820e | ||
|
|
bcb5eda7d8 | ||
|
|
2c833b5028 | ||
|
|
6821603980 | ||
|
|
8bec45cd58 | ||
|
|
ce0f44fb47 | ||
|
|
c740562dd8 | ||
|
|
63a1c8b63e | ||
|
|
112cdb4842 | ||
|
|
2d5f045c29 | ||
|
|
c43ff29f5d | ||
|
|
4c0e3c4db9 | ||
|
|
7995a57f77 | ||
|
|
0a47378f7f | ||
|
|
8e9a244cdd | ||
|
|
5f1a4ea08d | ||
|
|
034b19d85d | ||
|
|
68cb7ea471 | ||
|
|
d9a3ba0dd1 | ||
|
|
663e1d8336 | ||
|
|
31332f4f53 | ||
|
|
cb7163dd19 | ||
|
|
946029a3f7 | ||
|
|
69cbb6e109 | ||
|
|
6054f6bfe1 | ||
|
|
ae7b9f5fcb | ||
|
|
68dc6b9527 | ||
|
|
292cdfd5a0 | ||
|
|
28e2dee605 | ||
|
|
6d79ab2552 | ||
|
|
da17e424ea | ||
|
|
028c25afd3 | ||
|
|
9c2151dc37 | ||
|
|
9e9bd16b18 | ||
|
|
3f138aec22 | ||
|
|
e9f66e7c89 | ||
|
|
6be64b363c | ||
|
|
51230f21f5 | ||
|
|
e12540ba66 | ||
|
|
a6b1bee2af | ||
|
|
6187cdafe3 | ||
|
|
880f785d04 | ||
|
|
5aedcfd6a7 | ||
|
|
6ff1a2c236 | ||
|
|
317f888383 | ||
|
|
33f1f9abde | ||
|
|
913406b568 | ||
|
|
6a74d102a4 | ||
|
|
e9e36cebcb | ||
|
|
af6bf7a232 | ||
|
|
5720a7a5e3 | ||
|
|
449c946423 | ||
|
|
54a2a0da48 | ||
|
|
e209fedb27 | ||
|
|
12494f3008 | ||
|
|
7f60b46488 | ||
|
|
1c9ecd96d4 | ||
|
|
1f84803b91 | ||
|
|
3f6116f28f | ||
|
|
4ea0eb94d4 | ||
|
|
e222bc631a | ||
|
|
9c07c7fe4f | ||
|
|
35d74e18de | ||
|
|
266be2c25f | ||
|
|
b7cb090144 | ||
|
|
30e257bc2b | ||
|
|
fbd5679fb1 | ||
|
|
9db7234f24 | ||
|
|
220b2dc912 | ||
|
|
83c2420038 | ||
|
|
73913f450b | ||
|
|
bb966e7e6f | ||
|
|
b4adc127a4 | ||
|
|
2bc343b524 | ||
|
|
1f4d6eb0df | ||
|
|
ee936fe1a1 | ||
|
|
f6d9239b37 | ||
|
|
512e5b0240 | ||
|
|
600148f501 | ||
|
|
8791a4f696 | ||
|
|
ef40a8a925 | ||
|
|
2473e87947 | ||
|
|
bbe1dfb53d | ||
|
|
3bc27b1a02 | ||
|
|
ec4c6e140b | ||
|
|
545cc1074c | ||
|
|
9c0f4822bc | ||
|
|
5040ec109b | ||
|
|
25b216d7ef | ||
|
|
e475c847d7 | ||
|
|
e7c55c1ad6 | ||
|
|
cd8fcadd29 | ||
|
|
f78b6b30d9 | ||
|
|
cc6a991464 | ||
|
|
81d487dd89 | ||
|
|
af2795c07f | ||
|
|
178d9fb8d5 | ||
|
|
9bd12eb782 | ||
|
|
ef66650997 | ||
|
|
fcffcdde1b | ||
|
|
7de892ccac | ||
|
|
f90f2e051a | ||
|
|
24f49c8d83 | ||
|
|
a4ebaf15ab | ||
|
|
54a46dccc3 | ||
|
|
9747d5057d | ||
|
|
7f5c97d0be | ||
|
|
1933a76631 | ||
|
|
c20d7f9754 | ||
|
|
6b46dc7e89 | ||
|
|
0c1a26170c | ||
|
|
244ee08d7d | ||
|
|
a3acbca24b | ||
|
|
d77e4ed581 | ||
|
|
b928abb956 | ||
|
|
a46ef8d1a6 | ||
|
|
a5d459749f | ||
|
|
7dfa383968 | ||
|
|
036483d195 | ||
|
|
2c950f74bc | ||
|
|
2c59dcd929 | ||
|
|
658d14f31d | ||
|
|
819f4d2151 | ||
|
|
9b214d75df | ||
|
|
e0891a2d71 | ||
|
|
34a4876761 | ||
|
|
13ead0085d | ||
|
|
9e63270fc5 | ||
|
|
eccab3cd57 | ||
|
|
6446daf1a6 | ||
|
|
821602ef1c | ||
|
|
dc3512de9f | ||
|
|
36e9cb7108 | ||
|
|
42f4531720 | ||
|
|
d1fb379a40 | ||
|
|
e27bdb965c | ||
|
|
54fc6df3da | ||
|
|
9dd8f62c8a | ||
|
|
1db19148e7 | ||
|
|
93a01506e4 | ||
|
|
4767ed790c | ||
|
|
e39211347c | ||
|
|
a8cdbb65fe | ||
|
|
ff74ff4149 | ||
|
|
96e47f3d27 | ||
|
|
be52c181ea | ||
|
|
507f2ec544 | ||
|
|
fe00c628f4 | ||
|
|
e9387d322c | ||
|
|
2e3b135fe9 | ||
|
|
d28cc15be2 | ||
|
|
d15bd23800 | ||
|
|
90fe45c52d | ||
|
|
8f7be71905 | ||
|
|
5d583637c4 | ||
|
|
0efb4285c1 | ||
|
|
6dc543ca18 | ||
|
|
e93e1ddeb9 | ||
|
|
d5459f5996 | ||
|
|
c6420a910d | ||
|
|
f8e67b8e68 | ||
|
|
9ffcd382b4 | ||
|
|
725746badf | ||
|
|
9d5290de91 | ||
|
|
1bb0b58cce | ||
|
|
32f0ebbe61 | ||
|
|
25a1d74627 | ||
|
|
355b2f09bf | ||
|
|
01621f75b6 | ||
|
|
242e8a3bd6 | ||
|
|
010c26e716 | ||
|
|
e7bad10663 | ||
|
|
16242f98ce | ||
|
|
14a447b3d8 | ||
|
|
a2088fa500 | ||
|
|
87af68c092 | ||
|
|
06daad87ca | ||
|
|
0b4b86f6c9 | ||
|
|
10626904af | ||
|
|
90cca8a3eb | ||
|
|
8da0141cac | ||
|
|
39e123aaf4 | ||
|
|
24fd17f072 | ||
|
|
9270cc47b5 | ||
|
|
3721db34ab | ||
|
|
e85ae351c7 | ||
|
|
a56ba245ea | ||
|
|
d162eed4c7 | ||
|
|
43fea34f61 | ||
|
|
f7c960fc0d | ||
|
|
ee1933389a | ||
|
|
fdc9d5f1fd | ||
|
|
bad40b6125 | ||
|
|
d76ce85327 | ||
|
|
d3df072a22 | ||
|
|
4b3009a195 | ||
|
|
b72b0d60cb | ||
|
|
5841e62c66 | ||
|
|
9bd0c01702 | ||
|
|
6d86b3a950 | ||
|
|
5ff9b02c89 | ||
|
|
80934ea232 | ||
|
|
5acfa2bf3a | ||
|
|
4fada52e04 | ||
|
|
e1c8e95e11 | ||
|
|
1dfebad790 | ||
|
|
37ffe63d13 | ||
|
|
cc14c34dc2 | ||
|
|
e0cf4e644b | ||
|
|
aad55fc3db | ||
|
|
ba2b459220 | ||
|
|
086669fbe0 | ||
|
|
4cc3fcb6e8 | ||
|
|
8781053dbe | ||
|
|
bdac8974d8 | ||
|
|
9ae24141a3 | ||
|
|
e773efdc59 | ||
|
|
8f94bd1fbd | ||
|
|
d24d83d52a | ||
|
|
c938017baa | ||
|
|
728eea3ae1 | ||
|
|
88f9c1e539 | ||
|
|
76540c20f3 | ||
|
|
70761cf1d9 | ||
|
|
ace913a97d | ||
|
|
d6e269c7f6 | ||
|
|
ec10550b3a | ||
|
|
86e2374b48 | ||
|
|
d156dacbb9 | ||
|
|
1af5517da0 | ||
|
|
e5d34890a9 | ||
|
|
183b2548cf | ||
|
|
d2de489e3a | ||
|
|
90f8dbd86e | ||
|
|
3508ce19f3 | ||
|
|
00188c9818 | ||
|
|
499232f0e6 | ||
|
|
17471a12d2 | ||
|
|
de4b5eeda7 | ||
|
|
d0a0193707 | ||
|
|
5269a26b69 | ||
|
|
8dc6ad587f | ||
|
|
757339c52d | ||
|
|
6e289339d7 | ||
|
|
3ff0a44a1c | ||
|
|
0562228e9a | ||
|
|
0b6993bb7c | ||
|
|
4a19d90d48 | ||
|
|
038b1bcf7b | ||
|
|
a707c2fe8e | ||
|
|
3bb119f578 | ||
|
|
2a92600fa7 | ||
|
|
e80e1dab4d | ||
|
|
45d59d75ba | ||
|
|
28cd4c3ee9 | ||
|
|
e7c44274b0 | ||
|
|
3b2e0e34ef | ||
|
|
2276df07bd | ||
|
|
758ff03520 | ||
|
|
c3ac172960 | ||
|
|
562b4eb531 | ||
|
|
b1f8e845df | ||
|
|
bda869ea54 | ||
|
|
19cfbf082a | ||
|
|
07078bdd1f | ||
|
|
03657a98e1 | ||
|
|
b3f64abfae | ||
|
|
5d73c8f002 | ||
|
|
ba0882762d | ||
|
|
bb8855b628 | ||
|
|
883d5917f5 | ||
|
|
0275e99fe2 | ||
|
|
5d109077e5 | ||
|
|
540851ab6a | ||
|
|
6b920fa5e6 | ||
|
|
d1498bb9fb | ||
|
|
54eeef173a | ||
|
|
723ddf8cda | ||
|
|
9f12552907 | ||
|
|
a8b6fa413e | ||
|
|
76aae8ce42 | ||
|
|
ad0c287053 | ||
|
|
4a11a3559d | ||
|
|
1faa5a80e4 | ||
|
|
f1d3df1ec0 | ||
|
|
e7c94d3351 | ||
|
|
954f76dcf5 | ||
|
|
43037c0ff9 | ||
|
|
93df901b71 | ||
|
|
e97e645eda | ||
|
|
4a03ba3874 | ||
|
|
7f637e4acc | ||
|
|
8f3eeefafd | ||
|
|
5dc550a0ce | ||
|
|
6fe322da27 | ||
|
|
3cfe7c9a56 | ||
|
|
be7d5917cb | ||
|
|
ca28aa6ebd | ||
|
|
e76360c1b5 | ||
|
|
265ca8ba67 | ||
|
|
b0d942d0ec | ||
|
|
6c25905ae4 | ||
|
|
80a39393fe | ||
|
|
d4aed71abf | ||
|
|
ebb72bb992 | ||
|
|
8ffcd30b4d | ||
|
|
06804c37e2 | ||
|
|
1acca0278c | ||
|
|
639c8d4171 | ||
|
|
d77c9d3fca | ||
|
|
2c7cc2c191 | ||
|
|
d7c74b8004 | ||
|
|
aaa8003418 | ||
|
|
86890b13c6 | ||
|
|
39158b0eb6 | ||
|
|
87f1d55bc2 | ||
|
|
14343b5410 | ||
|
|
ffdac30b3c | ||
|
|
244c8dc391 | ||
|
|
e593344461 | ||
|
|
74c46f6e93 | ||
|
|
bbfd8aa249 | ||
|
|
2705a488ad | ||
|
|
850c253e08 | ||
|
|
80e0e3fcd7 | ||
|
|
2cc2d696f1 | ||
|
|
8a83a6b5be | ||
|
|
002d5338a0 | ||
|
|
743aa472f0 | ||
|
|
ba85d5d351 | ||
|
|
4e2ef908dc | ||
|
|
f5dd05ba8e | ||
|
|
17eda2a4cc | ||
|
|
d219c6e019 | ||
|
|
2dc539747b | ||
|
|
e941de50e8 | ||
|
|
63052257a2 | ||
|
|
ac5d2a714e | ||
|
|
59f78c16b1 | ||
|
|
3f7f8133df | ||
|
|
fef5e1ce2c | ||
|
|
0b97b3864f | ||
|
|
3d1330c85d | ||
|
|
041c0cc322 | ||
|
|
e72712640c | ||
|
|
6830195127 | ||
|
|
f9b5d6644d | ||
|
|
40f9eeda36 | ||
|
|
0fa0b0b1ea | ||
|
|
ff0b23f200 | ||
|
|
5456d4081b | ||
|
|
8948fae780 | ||
|
|
ee4542a699 | ||
|
|
31e4e631f9 | ||
|
|
cbf20b3271 | ||
|
|
a65fd50723 | ||
|
|
63a6aac2d8 | ||
|
|
afde4804c9 | ||
|
|
bc8ec9cd3e | ||
|
|
b63ab18e29 | ||
|
|
e7325f58c3 | ||
|
|
7b35bb8c96 | ||
|
|
e84671ce5d | ||
|
|
b01d50fe05 | ||
|
|
3f163051b1 | ||
|
|
4f1d03e1d4 | ||
|
|
fc39e4a225 | ||
|
|
bf88ad7fc8 | ||
|
|
11ba02067e | ||
|
|
952afa05ce | ||
|
|
3131cc3160 | ||
|
|
792f768479 | ||
|
|
ff312a15dd | ||
|
|
36207c9a98 | ||
|
|
b92105e888 | ||
|
|
35bd7c55d0 | ||
|
|
9f19c302d8 | ||
|
|
87b1ac776f | ||
|
|
41e401b05e | ||
|
|
d88da3589d | ||
|
|
9638c393bb | ||
|
|
9961ddc2a8 | ||
|
|
2d40dfd8d4 | ||
|
|
99c9bdf71d | ||
|
|
4fcd25ec88 | ||
|
|
440218da67 | ||
|
|
fefdb9fc8d | ||
|
|
21a0eff593 | ||
|
|
8825a094ae | ||
|
|
aa49ce5c56 | ||
|
|
1522d3385d | ||
|
|
510c41440a | ||
|
|
aa0c34ba1c | ||
|
|
af87e6ef62 | ||
|
|
30291ce6e6 | ||
|
|
890c2eb564 | ||
|
|
67a269b89c | ||
|
|
4b9ee81a78 | ||
|
|
4343f4d229 | ||
|
|
2162baa6c0 | ||
|
|
7e7f792710 | ||
|
|
1bbd9e24b0 | ||
|
|
6435aaa64f | ||
|
|
999aae0a33 | ||
|
|
ba795639b4 | ||
|
|
4c4b205721 | ||
|
|
b3c550b7c0 | ||
|
|
eb8953e784 | ||
|
|
b88b292d5d | ||
|
|
5f42c3b319 | ||
|
|
5b27ae0371 | ||
|
|
f26b1da1b5 | ||
|
|
7a853e2dcb | ||
|
|
9b22748bd0 | ||
|
|
c1e9dd3373 | ||
|
|
8cbbc47043 | ||
|
|
81b3567133 | ||
|
|
fc6568f390 | ||
|
|
8e30fe2946 | ||
|
|
6c811a3261 | ||
|
|
afbe5aa540 | ||
|
|
324afd2d6c | ||
|
|
58d94ef61e | ||
|
|
39974b0982 | ||
|
|
323d7306e2 | ||
|
|
251e228ce4 | ||
|
|
a99f3f217a | ||
|
|
e2acbee113 | ||
|
|
37b69eddf2 | ||
|
|
f0322e6f2c | ||
|
|
756587d080 | ||
|
|
1ad2c92324 | ||
|
|
e5433adf78 | ||
|
|
ed765f75d8 | ||
|
|
4136f1b377 | ||
|
|
860339b90e | ||
|
|
03254a0c0f | ||
|
|
a76081c979 | ||
|
|
71a207079f | ||
|
|
f6e724c4c5 | ||
|
|
4251b36b25 | ||
|
|
b8f39cbfdf | ||
|
|
088c621862 | ||
|
|
2459a53350 | ||
|
|
7093e9c0d4 | ||
|
|
4bc49978d1 | ||
|
|
96bac9c149 | ||
|
|
8dcc15f4d3 | ||
|
|
8183740c04 | ||
|
|
25e4231d7b | ||
|
|
3ed9e0e905 | ||
|
|
45bec0c440 | ||
|
|
5133e39d45 | ||
|
|
cb3b4e446e | ||
|
|
9829a2f3b4 | ||
|
|
7eadf11145 | ||
|
|
2a2bc44f43 | ||
|
|
9ccfa5cec9 | ||
|
|
02687f3c78 | ||
|
|
7ea7a6cbb1 | ||
|
|
a15a28fe5b | ||
|
|
265dedfae1 | ||
|
|
5ddbb8bc56 | ||
|
|
4101b8e937 | ||
|
|
56b6d50479 | ||
|
|
506f585d78 | ||
|
|
577dfb7220 | ||
|
|
7e4286adde | ||
|
|
1090228628 | ||
|
|
aeea861b73 | ||
|
|
997c43bbdd | ||
|
|
958d4dbd2e | ||
|
|
f2b350eb62 | ||
|
|
a3464780a1 | ||
|
|
fe1eb92196 | ||
|
|
0b2d26ec92 | ||
|
|
8024a25f2b | ||
|
|
d287ecbb34 | ||
|
|
d9c95e7730 | ||
|
|
c3b1af31ce | ||
|
|
465576b5cb | ||
|
|
9ecbcd0075 | ||
|
|
c1f62d72ae | ||
|
|
1b27834c41 | ||
|
|
77804907b6 | ||
|
|
9dfa2609be | ||
|
|
8ffb3ab3c4 | ||
|
|
65e1da34fa | ||
|
|
282110807c | ||
|
|
25e5f43d1c | ||
|
|
ce0441694d | ||
|
|
db29699927 | ||
|
|
9a4e2d7617 | ||
|
|
fbf64585b7 | ||
|
|
6d1c6dfd16 | ||
|
|
e78df4d981 | ||
|
|
a757b4d5dc | ||
|
|
d28036ee91 | ||
|
|
d2ba0d4e7a | ||
|
|
5787436177 | ||
|
|
f5ab24b8d2 | ||
|
|
05c0f32a24 | ||
|
|
7b918f77a9 | ||
|
|
d87929d61c | ||
|
|
a926829c33 | ||
|
|
d58e366c40 | ||
|
|
0fb4f7e1c4 | ||
|
|
6ee606e3e2 | ||
|
|
22d4a7690f | ||
|
|
f3a2f5018a | ||
|
|
d2a7589f7c | ||
|
|
f87b4e04f1 | ||
|
|
b5aa4c1f0c | ||
|
|
0c1eb6d288 | ||
|
|
8a03c5f998 | ||
|
|
60aa50ae45 | ||
|
|
aae6bbbb66 | ||
|
|
5ca903c428 | ||
|
|
e86b07f760 | ||
|
|
d7fea5dc78 | ||
|
|
c1eff5aebb | ||
|
|
f2dc490d6f | ||
|
|
b296e1b340 | ||
|
|
8adb060edb | ||
|
|
c3b984fea7 | ||
|
|
afbb2c338b | ||
|
|
6632241ab5 | ||
|
|
be50df81db | ||
|
|
9763b6e2cf | ||
|
|
812b848daf | ||
|
|
4907a7389f | ||
|
|
17dff36b65 | ||
|
|
904921d8c4 | ||
|
|
ac4c075d32 | ||
|
|
ddde64ece9 | ||
|
|
91c097e88d | ||
|
|
894658a3f5 | ||
|
|
a4454ea5f9 | ||
|
|
8ea8fa3a8a | ||
|
|
7480603295 | ||
|
|
079b749d5d | ||
|
|
4815600e85 | ||
|
|
1c63e2d295 | ||
|
|
cf13eca58c | ||
|
|
3cf4607870 | ||
|
|
23c3ba6ad7 | ||
|
|
17fc3c2317 | ||
|
|
af234cbe54 | ||
|
|
c8517c0ec9 | ||
|
|
20b226454b | ||
|
|
98eccf223a | ||
|
|
0fc2ab4d41 | ||
|
|
641b6efe7f | ||
|
|
4c83435b4b | ||
|
|
9f7319cff4 | ||
|
|
dd9baa1502 | ||
|
|
41b4d0daa1 | ||
|
|
e41b181163 | ||
|
|
288ac115d0 | ||
|
|
6774d46a6f | ||
|
|
607abf89f7 | ||
|
|
27f1e5e2f2 | ||
|
|
a457675ce1 | ||
|
|
82049096e6 | ||
|
|
6c965e0223 | ||
|
|
8b4d952929 | ||
|
|
873cc63f94 | ||
|
|
39fc839ff2 | ||
|
|
4edef4c959 | ||
|
|
1d9ced8037 | ||
|
|
4cb77d1429 | ||
|
|
b52d9d1bdd | ||
|
|
5fe7ca5e70 | ||
|
|
62fb440de2 | ||
|
|
96fbd7c7ba | ||
|
|
c9bec8e636 | ||
|
|
769e03e7f2 | ||
|
|
ab83f2d5e2 | ||
|
|
b60d0cdb17 | ||
|
|
677503dbf1 | ||
|
|
25efa29470 | ||
|
|
21a90f8f8f | ||
|
|
64e8d6ae99 | ||
|
|
16a204335e | ||
|
|
0a53f762fe | ||
|
|
6ba4778c1b | ||
|
|
0404c2266c | ||
|
|
e5e914282f | ||
|
|
9867d4bdc3 | ||
|
|
e4cb7112cf | ||
|
|
2d202e90b7 | ||
|
|
016391e442 | ||
|
|
1eff48a429 | ||
|
|
ce33af6bb5 | ||
|
|
fb9d4303f1 | ||
|
|
4e631c9e8f | ||
|
|
766d67d80d | ||
|
|
e2c2a37221 | ||
|
|
2b23020695 | ||
|
|
8d43c6b1a8 | ||
|
|
7362dd1a7c | ||
|
|
316caf7e8c | ||
|
|
87dc6631ee | ||
|
|
62246d7d43 | ||
|
|
a14be3a42c | ||
|
|
7fdf00d5e9 | ||
|
|
99e02f30fb | ||
|
|
716a5b9b5a | ||
|
|
87f880ca52 | ||
|
|
8ec7b84a78 | ||
|
|
05cf5bc8db | ||
|
|
ac25e21a0c | ||
|
|
cc1e0daaa4 | ||
|
|
f4120a9c8c | ||
|
|
e3b80a5e09 | ||
|
|
ef7cb26b01 | ||
|
|
408a5c168f | ||
|
|
0ad6ac95b2 | ||
|
|
bda4747e9c | ||
|
|
bd8f882c94 | ||
|
|
32b5b5b1c4 | ||
|
|
c1e543c9fe | ||
|
|
3908fa5c57 | ||
|
|
1b347fc185 | ||
|
|
282a5e0b01 | ||
|
|
e9d23cc1ea | ||
|
|
34173fd60f | ||
|
|
d0d3c8ef57 | ||
|
|
11912008dd | ||
|
|
c122007e17 | ||
|
|
69dfa1a175 | ||
|
|
bfea443e55 | ||
|
|
680798c28f | ||
|
|
9f0cc45c45 | ||
|
|
0ac97f467f | ||
|
|
647746ea72 | ||
|
|
7bea30b2e6 | ||
|
|
12bc852c89 | ||
|
|
0d42e84045 | ||
|
|
897b85b607 | ||
|
|
5c55cf0efb | ||
|
|
eccd6463f6 | ||
|
|
4a0897c734 | ||
|
|
c86a16df7f | ||
|
|
2ae0e9d902 | ||
|
|
bba18cd56b | ||
|
|
2f20781e16 | ||
|
|
3bee212876 | ||
|
|
6c8893a550 | ||
|
|
9c52ecc19b | ||
|
|
692c884ca2 | ||
|
|
3ef51d7fae | ||
|
|
73d95de122 | ||
|
|
04a568ac9b | ||
|
|
a45499cf04 | ||
|
|
b847d672ab | ||
|
|
3ffefdf6b5 | ||
|
|
cca4c4be80 | ||
|
|
cb9e044cb3 | ||
|
|
fd25dd83bd | ||
|
|
584bb00cfc | ||
|
|
5b9369d344 | ||
|
|
a64506a0de | ||
|
|
2fc83ef80b | ||
|
|
8bee3ebd65 | ||
|
|
99686fdd73 | ||
|
|
33bc3d6a1e | ||
|
|
90597530a4 | ||
|
|
b2af8da9a2 | ||
|
|
05dbf41fdc | ||
|
|
c56bb56708 | ||
|
|
4def1ea1dc | ||
|
|
0ba05e4de0 | ||
|
|
24fce89155 | ||
|
|
1a3c20f91d | ||
|
|
fe3e78cc1c | ||
|
|
749f49b1a0 | ||
|
|
f14010a09d | ||
|
|
0b48b9c7d4 | ||
|
|
13d62b01d1 | ||
|
|
4e7b71db1d | ||
|
|
069fc1f97b | ||
|
|
8684f75254 | ||
|
|
11cd924ce1 | ||
|
|
e2fd0cfc4e | ||
|
|
5eb3106706 | ||
|
|
1831efbe9d | ||
|
|
38edbadca5 | ||
|
|
6fcd80b979 | ||
|
|
cf5e5dbe55 | ||
|
|
a451861bf1 | ||
|
|
7313dd74a6 | ||
|
|
32b9de05f2 | ||
|
|
c79bed22f8 | ||
|
|
cdeb50132d | ||
|
|
090fb09955 | ||
|
|
54b862bd79 | ||
|
|
e37e1c109a | ||
|
|
939123785b | ||
|
|
221b347bd9 | ||
|
|
af9bf3e852 | ||
|
|
ed8746df77 | ||
|
|
bb187db49d | ||
|
|
081e72b3ea | ||
|
|
6188c38053 | ||
|
|
12b0186f5a | ||
|
|
9bccc9c53c | ||
|
|
351b2b320e | ||
|
|
94258feb09 | ||
|
|
8b0f033a78 | ||
|
|
f58f255fc8 | ||
|
|
e3eabcf648 | ||
|
|
9aa506cbd7 | ||
|
|
d8cff7b90f | ||
|
|
07e7bca9eb | ||
|
|
e1f442be90 | ||
|
|
c5d579e0e3 | ||
|
|
5271c2e08f | ||
|
|
9010a7ddbc | ||
|
|
bb95fb7d07 | ||
|
|
2edb11376d | ||
|
|
e7f5ebf912 | ||
|
|
da9758c2f3 | ||
|
|
3e11d58d73 | ||
|
|
6b35c097d6 | ||
|
|
619ba13265 | ||
|
|
529c5b8abf | ||
|
|
3a5ed6e800 | ||
|
|
52cddc015b | ||
|
|
4a01f4f65f | ||
|
|
f9768cb5a3 | ||
|
|
221e0e550c | ||
|
|
d2d1d42d0f | ||
|
|
faf018a097 | ||
|
|
a2a71a107e | ||
|
|
fc9c937e67 | ||
|
|
b4f2e9b442 | ||
|
|
1672645e73 | ||
|
|
4a42c44101 | ||
|
|
383b1a5769 | ||
|
|
77bac4cf9e | ||
|
|
e2b8e530c9 | ||
|
|
e9f752bd67 | ||
|
|
4b31921eb4 | ||
|
|
3df9fc6225 | ||
|
|
b57fe466ce | ||
|
|
bd4bff3b6b | ||
|
|
9d4618a223 | ||
|
|
93636180df | ||
|
|
fcceaa168f | ||
|
|
2639cc6138 | ||
|
|
4a99c2e928 | ||
|
|
7d5af3df05 | ||
|
|
c88b80d2a0 | ||
|
|
819d4abaa2 | ||
|
|
20630aeb47 | ||
|
|
0c0db3babb | ||
|
|
e7761f7e57 | ||
|
|
064fd497ae | ||
|
|
49c60b6b75 | ||
|
|
ca7f36506c | ||
|
|
155f0a9736 | ||
|
|
25e1eb3ce9 | ||
|
|
f2f980928b | ||
|
|
1d121a97a7 | ||
|
|
211d13da09 | ||
|
|
11343d469e | ||
|
|
d7c8041aa1 | ||
|
|
9587e30af8 | ||
|
|
76fa7affaf | ||
|
|
2971dd8672 | ||
|
|
2a33fe3564 | ||
|
|
46cdf5da70 | ||
|
|
28c801bfd4 | ||
|
|
c22cd40293 | ||
|
|
56bd430983 | ||
|
|
d873890e46 | ||
|
|
d29b8eca3c | ||
|
|
6f258000fe | ||
|
|
255211cd07 | ||
|
|
f6d28a90e3 | ||
|
|
ed66ff88a1 | ||
|
|
82e58f2bf9 | ||
|
|
797a87ca26 | ||
|
|
ec6a709393 | ||
|
|
07cbfdb424 | ||
|
|
3b9bd944fb | ||
|
|
934e585cb3 | ||
|
|
3a68f4cf54 | ||
|
|
bd00fcb875 | ||
|
|
905dd5a70f | ||
|
|
c65250ec39 | ||
|
|
607eec6ff0 | ||
|
|
14fb3bde60 | ||
|
|
6782bc8ca2 | ||
|
|
3db6841305 | ||
|
|
f478fa8029 | ||
|
|
d255f8400f | ||
|
|
a1545c60d6 | ||
|
|
ed48603ab5 | ||
|
|
23a0507439 | ||
|
|
482e013887 | ||
|
|
265727c30f | ||
|
|
4d3f4e096b | ||
|
|
7629bca62d | ||
|
|
2712f17262 | ||
|
|
86a37559ba | ||
|
|
b504a557f4 | ||
|
|
e849b46f6b | ||
|
|
738dc50a6f | ||
|
|
3138523b5b | ||
|
|
537643a4c3 | ||
|
|
04bfe098ed | ||
|
|
c507887bdd | ||
|
|
ee261313ac | ||
|
|
c9c152bc8a | ||
|
|
6c8e19a321 | ||
|
|
218e3b66f2 | ||
|
|
1d3488fa8e | ||
|
|
f4c1682592 | ||
|
|
28ac6623c7 | ||
|
|
16ab179e1d | ||
|
|
a8ff5385dc | ||
|
|
9dc33c6086 | ||
|
|
b17c576705 | ||
|
|
96f8f2891b | ||
|
|
581d73afe0 | ||
|
|
1baefebe8f | ||
|
|
39fb05033f | ||
|
|
c6093c084c | ||
|
|
dfec6d9a6d | ||
|
|
08b1261c75 | ||
|
|
2ad6faae3a | ||
|
|
4eff301db3 | ||
|
|
447e43e8f4 | ||
|
|
7457001275 | ||
|
|
fcabd5e79e | ||
|
|
594002316c | ||
|
|
eccf92ebaf | ||
|
|
ad9ddc5621 | ||
|
|
1825dd916e | ||
|
|
dfcde8171e | ||
|
|
b0361183df | ||
|
|
71fe13b249 | ||
|
|
442f51224d | ||
|
|
974678f500 | ||
|
|
8329409c03 | ||
|
|
06c2ac2724 | ||
|
|
04e9e8f9d8 | ||
|
|
7a3330cb8c | ||
|
|
cae29941ea | ||
|
|
15cf2ad076 | ||
|
|
2f16f6dc23 | ||
|
|
528aebffe4 | ||
|
|
e82b2f0cbe | ||
|
|
73e64f3e4a | ||
|
|
15f5b1f830 | ||
|
|
1b0a77f9a8 | ||
|
|
0f82ae3644 | ||
|
|
de3b01b54b | ||
|
|
c17e3646d5 | ||
|
|
26aed3e89e | ||
|
|
74caea8f8f | ||
|
|
2cf07fa072 | ||
|
|
1181cd2fd7 | ||
|
|
850d55ab45 | ||
|
|
a0c91b8754 | ||
|
|
937bdc05c8 | ||
|
|
453755bfa1 | ||
|
|
400b6fbb61 | ||
|
|
8c4e882fa3 | ||
|
|
84eec23793 | ||
|
|
7dfe69f6a5 | ||
|
|
ada6115073 | ||
|
|
e1643566f9 | ||
|
|
053a9a6317 | ||
|
|
425b976cc0 | ||
|
|
5f5f1b1e09 | ||
|
|
e6f4935c7b | ||
|
|
6452e5976b | ||
|
|
2383dff317 | ||
|
|
de3e5042fb | ||
|
|
0dcc35152c | ||
|
|
8eecfcbfaf | ||
|
|
efa3e60f89 | ||
|
|
782df659bc | ||
|
|
0aa158824f | ||
|
|
da7fb44e5d | ||
|
|
4b59ef802e | ||
|
|
be5789cd56 | ||
|
|
9adf0e5d59 | ||
|
|
e2de22470e | ||
|
|
3b7ab2e553 | ||
|
|
8617dedc46 | ||
|
|
0b8f1a9a58 | ||
|
|
16748c0920 | ||
|
|
01ec585a44 | ||
|
|
b5f2295f37 | ||
|
|
d6ca0199b7 | ||
|
|
2257c5e547 | ||
|
|
b5a3d39799 | ||
|
|
a26c3e9d3c | ||
|
|
98a09532eb | ||
|
|
d736789bbc | ||
|
|
82a6cfc03a | ||
|
|
62e9c7c75a | ||
|
|
eb32bd45e7 | ||
|
|
4b95f07923 | ||
|
|
dea8ad4c49 | ||
|
|
96553b217c | ||
|
|
3f79ed5d91 | ||
|
|
1e4283aad3 | ||
|
|
1dda31a28c | ||
|
|
10c87012be | ||
|
|
bda00bf512 | ||
|
|
c8f871ff2a | ||
|
|
58dc0b1aef | ||
|
|
4cd4d8f31a | ||
|
|
b751fd738d | ||
|
|
f97c6fb94c | ||
|
|
219138ade6 | ||
|
|
9086d189b9 | ||
|
|
d1178defe0 | ||
|
|
691a561a95 | ||
|
|
aaaac93bd0 | ||
|
|
fd790566b2 | ||
|
|
db3b429784 | ||
|
|
40ed3278d4 | ||
|
|
d174b13111 | ||
|
|
1708663b32 | ||
|
|
6fdce4ad0d | ||
|
|
fff8d5f07d | ||
|
|
9c8e1f4706 | ||
|
|
0a1036c78f | ||
|
|
0e881a7972 | ||
|
|
839e52ba30 | ||
|
|
8f7d5dcb4d | ||
|
|
1104b28bc1 | ||
|
|
48521cb1e4 | ||
|
|
17e113dafb | ||
|
|
c33825a904 | ||
|
|
b07ef98c8f | ||
|
|
b3d68893df | ||
|
|
1329599987 | ||
|
|
2adf3f364c | ||
|
|
436ee34a02 | ||
|
|
4a6e17b214 | ||
|
|
6e9cbccde6 | ||
|
|
a0cb8ec124 | ||
|
|
21217dfda3 | ||
|
|
25ba18e570 | ||
|
|
a210377f35 | ||
|
|
07b9ca457f | ||
|
|
5f1372d39c | ||
|
|
01b84c79f0 | ||
|
|
4017443b1e | ||
|
|
fd2a17d244 | ||
|
|
126804f7c3 | ||
|
|
5167bbf59e | ||
|
|
8bcdfa2793 | ||
|
|
2f9cb6a91e | ||
|
|
662be14535 | ||
|
|
d6d065cd61 | ||
|
|
ac7f045708 | ||
|
|
ffe02ad7bf | ||
|
|
db1a87d10c | ||
|
|
4bae41ffd8 | ||
|
|
be36fb979f | ||
|
|
0f66d763e0 | ||
|
|
06f4743f51 | ||
|
|
9cc11b8774 | ||
|
|
de821e55ae | ||
|
|
463b5c6e49 | ||
|
|
65ab5fdb34 | ||
|
|
d2f7a035b3 | ||
|
|
bc0b924283 | ||
|
|
56ad6af5b2 | ||
|
|
c50bb3a5a9 | ||
|
|
d993a62263 | ||
|
|
82bc52b909 | ||
|
|
f31598f916 | ||
|
|
6a9efd8ac6 | ||
|
|
a9dddb6066 | ||
|
|
40cf5c99ef | ||
|
|
42f58cbbb3 | ||
|
|
fd9c780015 | ||
|
|
383b92b207 | ||
|
|
7036ed5e2f | ||
|
|
30666aa111 | ||
|
|
9614d68baa | ||
|
|
c25fb4c743 | ||
|
|
09d5222b1f | ||
|
|
426ca78bf7 | ||
|
|
a77a0945fe | ||
|
|
5311a0f903 | ||
|
|
d421656be8 | ||
|
|
04459eaa50 | ||
|
|
3beda8eea0 | ||
|
|
5e894be06b | ||
|
|
bc8f93b596 | ||
|
|
2fb93bac99 | ||
|
|
d0c94c1aef | ||
|
|
77242bfb95 | ||
|
|
5d2d86bffc | ||
|
|
8492c13e72 | ||
|
|
e4eb5dadda | ||
|
|
8532dc4b75 | ||
|
|
1ca26ce676 | ||
|
|
d8e3e823a7 | ||
|
|
473dd7660b | ||
|
|
5afeed56ef | ||
|
|
b91b04f652 | ||
|
|
25de44a23d | ||
|
|
00cfb95971 | ||
|
|
f4ba0e1191 | ||
|
|
6499643769 | ||
|
|
f85287a444 | ||
|
|
483bc9ad87 | ||
|
|
93b89a93c1 | ||
|
|
10064c046c | ||
|
|
a5aecb9d0e | ||
|
|
de1e889f1d | ||
|
|
16f89b40c3 | ||
|
|
0e387d2cda | ||
|
|
837c15e4f9 | ||
|
|
ae7e353169 | ||
|
|
6c1bbd2344 | ||
|
|
27247e8e56 | ||
|
|
08249d78ea | ||
|
|
827091e522 | ||
|
|
13d901bf8d | ||
|
|
e69bdabc99 | ||
|
|
e8d19265e4 | ||
|
|
49e3a49dc5 | ||
|
|
82a7c01898 | ||
|
|
c0d7dbf639 | ||
|
|
569caa0bf2 | ||
|
|
f88ea1ee7d | ||
|
|
d5a8fa0b97 | ||
|
|
3f8f96edea | ||
|
|
04fb4aff28 | ||
|
|
83c6fb089e | ||
|
|
9d8d17b964 | ||
|
|
39d4842ff5 | ||
|
|
cad8473986 | ||
|
|
5f085ccb52 | ||
|
|
b406246689 | ||
|
|
cbe46afdff | ||
|
|
a59d6dc3c7 | ||
|
|
2afb2dd5fd | ||
|
|
4fc3c969d3 | ||
|
|
1796ce324b | ||
|
|
5e04c7f827 | ||
|
|
20fcede440 | ||
|
|
012c1833f2 | ||
|
|
32e8e03256 | ||
|
|
dca653cb92 | ||
|
|
0805eca979 | ||
|
|
17935a78ff | ||
|
|
e16918ee32 | ||
|
|
78471b4595 | ||
|
|
c30bcdd515 | ||
|
|
ac78c5f4e5 | ||
|
|
57a990ce25 | ||
|
|
24825b42a2 | ||
|
|
4f7323f7fc | ||
|
|
a228be85e2 | ||
|
|
fa565bdbdf | ||
|
|
2dc53223e5 | ||
|
|
958ac72805 | ||
|
|
f7297b84e7 | ||
|
|
9a7d9e7bb8 | ||
|
|
fa9df75cf7 | ||
|
|
e3ec76418b | ||
|
|
102d6d8c84 | ||
|
|
a742b5f3e2 | ||
|
|
a2a3bb291f | ||
|
|
b7c0ac7d67 | ||
|
|
13b1fc6b44 | ||
|
|
3939fcf6e7 | ||
|
|
13abbb81af | ||
|
|
019f0153c8 | ||
|
|
8abc2925e0 | ||
|
|
996c9a032a | ||
|
|
22d3794d22 | ||
|
|
ba948a38e9 | ||
|
|
e8a522c4df | ||
|
|
c60f3da32e | ||
|
|
0c92d3cbb2 | ||
|
|
e4fc8dd6fe | ||
|
|
1a849e2de0 | ||
|
|
ffdd79f86b | ||
|
|
e87e46b1b6 | ||
|
|
3ca81a4ff7 | ||
|
|
5477d3c292 | ||
|
|
08300183b3 | ||
|
|
095c77f22c | ||
|
|
09926e63a3 | ||
|
|
87d70f29a1 | ||
|
|
3a7661b111 | ||
|
|
ec976953cd | ||
|
|
1837562b50 | ||
|
|
f3bec4fc37 | ||
|
|
c2117ef4fd | ||
|
|
910804ecd1 | ||
|
|
ce5ae1dfdd | ||
|
|
2c31411ffb | ||
|
|
84d69fa2a1 | ||
|
|
2aea296d19 | ||
|
|
2b0bffc362 | ||
|
|
83356142c1 | ||
|
|
24dcc6947c | ||
|
|
a7e3136a0b | ||
|
|
71639cfea7 | ||
|
|
8c2d39fb82 | ||
|
|
e060d29337 | ||
|
|
79e9156d2f | ||
|
|
9100db55b0 | ||
|
|
141c10f6fe | ||
|
|
4613ab9dc3 | ||
|
|
061ad41b51 | ||
|
|
3a0007cd18 | ||
|
|
0044917943 | ||
|
|
0337c04278 | ||
|
|
4585acf70b | ||
|
|
2ad9bbae25 | ||
|
|
cf075df7d1 | ||
|
|
11cd9905c4 | ||
|
|
cf462542e9 | ||
|
|
b63f25a1ae | ||
|
|
7de69a21c5 | ||
|
|
21783e4ea0 | ||
|
|
53e5a756d7 | ||
|
|
8c911a2fd0 | ||
|
|
ce440e9f43 | ||
|
|
6465f8d8e6 | ||
|
|
4bdf28059a | ||
|
|
21010c6540 | ||
|
|
a5a6cabac6 | ||
|
|
f460c77f2c | ||
|
|
1c69d9213e | ||
|
|
c02c2d3b2c | ||
|
|
7adf5e763b | ||
|
|
0e4afefc7f | ||
|
|
c7f290f42e | ||
|
|
bb553b8a6a | ||
|
|
21eda2a1a3 | ||
|
|
48c13c990f | ||
|
|
a2665529f6 | ||
|
|
8d35d78eff | ||
|
|
a82a364c22 | ||
|
|
cc150ff9d2 | ||
|
|
feeb38293d | ||
|
|
5b9271ccfe | ||
|
|
e60bbc2fb7 | ||
|
|
387cc184e6 | ||
|
|
a830ddcb43 | ||
|
|
35fea30191 | ||
|
|
24b672b968 | ||
|
|
de6a3c5ab1 | ||
|
|
260ff6de3e | ||
|
|
7cb37411c9 | ||
|
|
e4e41e5ef8 | ||
|
|
985f4aafca | ||
|
|
0c25dd44b3 | ||
|
|
285f0bc6dd | ||
|
|
07a370fd24 | ||
|
|
95f07ea38a | ||
|
|
2890b92b21 | ||
|
|
8b80c5d0b5 | ||
|
|
04425786a1 | ||
|
|
15b14e12e2 | ||
|
|
b328972c4d | ||
|
|
da3156047f | ||
|
|
f9f08ba54f | ||
|
|
b43684262f | ||
|
|
2120f78bd7 | ||
|
|
2d896f22d6 | ||
|
|
9fa0aebfe9 | ||
|
|
2ddc3af5ff | ||
|
|
fd80e096ea | ||
|
|
fab2d69fce | ||
|
|
83d08e3aba | ||
|
|
bfea6bcacf | ||
|
|
feff34b021 | ||
|
|
79fbade92a | ||
|
|
bf508e453e | ||
|
|
47b51c22fa | ||
|
|
ebd16105f2 | ||
|
|
01fb1a5775 | ||
|
|
b8c2a05db9 | ||
|
|
4087dc5fe4 | ||
|
|
408029e6e0 | ||
|
|
23ff403529 | ||
|
|
be4f81f584 | ||
|
|
361c91e610 | ||
|
|
2aa2ea9675 | ||
|
|
e084225edf | ||
|
|
9ce342205b | ||
|
|
0edf50e00e | ||
|
|
1ea19daad9 | ||
|
|
32b302314e | ||
|
|
ee197e02a2 | ||
|
|
7cd6ffec2a | ||
|
|
0077580838 | ||
|
|
4d85a79fd1 | ||
|
|
a35139bb61 | ||
|
|
f72b833724 | ||
|
|
0e16bac6e2 | ||
|
|
e17564b362 | ||
|
|
90b66eddf5 | ||
|
|
2862a5849f | ||
|
|
7e839231ed | ||
|
|
fa56a4bb73 | ||
|
|
dff950748c | ||
|
|
b7374e3f8e | ||
|
|
4244b92b08 | ||
|
|
4f688028ad | ||
|
|
5a9a18501d | ||
|
|
896b8f7cf1 | ||
|
|
95bd1b014f | ||
|
|
dbdf8642bb | ||
|
|
c3cd9007d2 | ||
|
|
8079fb5bc5 | ||
|
|
80d0b5d4ed | ||
|
|
86bd847bf9 | ||
|
|
943004844a | ||
|
|
4ff12e0426 | ||
|
|
0d7bdb6fa8 | ||
|
|
6d488b6a81 | ||
|
|
f1d0263ffa | ||
|
|
24035caadb | ||
|
|
ed89a3e0f8 | ||
|
|
7088ab89f1 | ||
|
|
d4688bd76b | ||
|
|
befe0fccaf | ||
|
|
a192410498 | ||
|
|
d43ede3a11 | ||
|
|
9848ffb77f | ||
|
|
7487497d1f | ||
|
|
be11c848f4 | ||
|
|
9836b274b9 | ||
|
|
a96d14566f | ||
|
|
1c8cd8c168 | ||
|
|
5f5806a98e | ||
|
|
624b045ac0 | ||
|
|
0f8bae950e | ||
|
|
fcede42903 | ||
|
|
5defe7d975 | ||
|
|
7e79903fe8 | ||
|
|
a2fa52504c | ||
|
|
2629f85e73 | ||
|
|
8577816234 | ||
|
|
e58d47a3b2 | ||
|
|
c9c83ee7e6 | ||
|
|
139693dce6 | ||
|
|
f98193d822 | ||
|
|
8052f1ac9d | ||
|
|
4f78a06993 | ||
|
|
6c4b4b392b | ||
|
|
268fe34238 | ||
|
|
cc620205d6 | ||
|
|
f0d7c97b7b | ||
|
|
660a6e9e4c | ||
|
|
3386c2a7a5 | ||
|
|
9530efb4d4 | ||
|
|
4293515b3d | ||
|
|
61105e0679 | ||
|
|
79a289c7e2 | ||
|
|
46781e7614 | ||
|
|
1f3546a9f6 | ||
|
|
0dc88bb412 | ||
|
|
971a26c123 | ||
|
|
0976a3b721 | ||
|
|
d496361555 | ||
|
|
60ed65a73a | ||
|
|
d1407b3bd0 | ||
|
|
5ca2da76df | ||
|
|
2ac887ff74 | ||
|
|
cbdc9c0be1 | ||
|
|
b9bade8d5a | ||
|
|
eb43786641 | ||
|
|
0515db3d7c | ||
|
|
db257778c0 | ||
|
|
3b37d7489f | ||
|
|
329c7e8e05 | ||
|
|
fad9b4fa72 | ||
|
|
c1a81279ed | ||
|
|
8bb35a17d2 | ||
|
|
36415054ea | ||
|
|
3e84cbae69 | ||
|
|
f5f2bf7f46 | ||
|
|
acb6656958 | ||
|
|
9d70d7c27e | ||
|
|
648a6afb25 | ||
|
|
57ae1925b1 | ||
|
|
d49318582f | ||
|
|
83e3f830e6 | ||
|
|
04d4353c0f | ||
|
|
6d217fc097 | ||
|
|
9d7136c63c | ||
|
|
51a679d60a | ||
|
|
7d4d28614a | ||
|
|
c75cfaf692 | ||
|
|
fe6aa8a6fc | ||
|
|
a5fe1eb5fb | ||
|
|
5afd37c92c | ||
|
|
293d0409c6 | ||
|
|
4352f18dd3 | ||
|
|
0ae7fe9df5 | ||
|
|
5048f0422d | ||
|
|
c46a36f8ed | ||
|
|
90e2bd0372 | ||
|
|
10fbc8a04b | ||
|
|
fb818f3775 | ||
|
|
434e23c209 | ||
|
|
fe53bd6475 | ||
|
|
268ce91c65 | ||
|
|
3b4074bfc7 | ||
|
|
6af4652161 | ||
|
|
3717d30188 | ||
|
|
4cf2e83418 | ||
|
|
1228639103 | ||
|
|
e12d67de94 | ||
|
|
10bcb37ca5 | ||
|
|
e973598bff | ||
|
|
3a5129694d | ||
|
|
a1e0fbea8b | ||
|
|
0bf374454e | ||
|
|
5e592fbf29 | ||
|
|
ad4101bc99 | ||
|
|
2d057d92cf | ||
|
|
00d1cc9bf8 | ||
|
|
2c1ec5fe75 | ||
|
|
81b28d005d | ||
|
|
6a90616b99 | ||
|
|
d5be43695a | ||
|
|
0a93b81ae7 | ||
|
|
65f8da1654 | ||
|
|
911014db95 | ||
|
|
313ee13f18 | ||
|
|
addad04c44 | ||
|
|
e3789e5b64 | ||
|
|
410315ce35 | ||
|
|
90998da308 | ||
|
|
6fa5b13e10 | ||
|
|
93067c2d52 | ||
|
|
b2079b7007 | ||
|
|
b643dd074c | ||
|
|
a3932c75e1 | ||
|
|
1cd3b9ec47 | ||
|
|
0c77f42080 | ||
|
|
cea122db38 | ||
|
|
966f9fcd07 | ||
|
|
6ce9df8504 | ||
|
|
2a0b223896 | ||
|
|
c2db180829 | ||
|
|
3223e4ffa5 | ||
|
|
24c9b6e211 | ||
|
|
e5555dd26a | ||
|
|
ee2d0ddf8a | ||
|
|
aef130b396 | ||
|
|
fbdadec5e5 | ||
|
|
a068339079 | ||
|
|
3f07d3ec55 | ||
|
|
62e7da9d8a | ||
|
|
b60d43e5f6 | ||
|
|
a5873a3158 | ||
|
|
3a698eb0ed | ||
|
|
1e2ef542e4 | ||
|
|
94e8af4d93 | ||
|
|
250a0ab5eb | ||
|
|
2da05d88a0 | ||
|
|
7faa849a89 | ||
|
|
c5bceb8fc8 | ||
|
|
1e94b93ce6 | ||
|
|
3f7bccf2e6 | ||
|
|
181b869109 | ||
|
|
2332245be1 | ||
|
|
3c6999f3a4 | ||
|
|
5f2f15b976 | ||
|
|
47dfb5b6b7 | ||
|
|
c410c1293e | ||
|
|
ca1c732f31 | ||
|
|
5e8c373bf4 |
5
.gitattributes
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
* text=auto
|
||||
*.html text eol=lf
|
||||
*.js text eol=lf
|
||||
*.md text eol=lf
|
||||
*.sh text eol=lf
|
||||
12
.gitignore
vendored
@@ -1,4 +1,10 @@
|
||||
*.custom.*
|
||||
.DS_Store
|
||||
dist/
|
||||
node_modules/
|
||||
*.custom.*
|
||||
*.template.*
|
||||
*.map
|
||||
/*.min.*
|
||||
modularize
|
||||
node_modules
|
||||
dist/*.backbone.*
|
||||
dist/*.legacy.*
|
||||
dist/*.mobile.*
|
||||
|
||||
24
.gitmodules
vendored
@@ -1,24 +0,0 @@
|
||||
[submodule "vendor/benchmark.js"]
|
||||
path = vendor/benchmark.js
|
||||
url = git://github.com/bestiejs/benchmark.js.git
|
||||
[submodule "vendor/docdown"]
|
||||
path = vendor/docdown
|
||||
url = git://github.com/jdalton/docdown.git
|
||||
[submodule "vendor/qunit"]
|
||||
path = vendor/qunit
|
||||
url = git://github.com/jquery/qunit.git
|
||||
[submodule "vendor/qunit-clib"]
|
||||
path = vendor/qunit-clib
|
||||
url = git://github.com/jdalton/qunit-clib.git
|
||||
[submodule "vendor/requirejs"]
|
||||
path = vendor/requirejs
|
||||
url = git://github.com/jrburke/requirejs.git
|
||||
[submodule "vendor/uglifyjs"]
|
||||
path = vendor/uglifyjs
|
||||
url = git://github.com/mishoo/UglifyJS.git
|
||||
[submodule "vendor/underscore"]
|
||||
path = vendor/underscore
|
||||
url = git://github.com/documentcloud/underscore.git
|
||||
[submodule "vendor/backbone"]
|
||||
path = vendor/backbone
|
||||
url = git://github.com/documentcloud/backbone.git
|
||||
19
.npmignore
@@ -1,19 +0,0 @@
|
||||
*.custom.*
|
||||
*.min.*
|
||||
.*
|
||||
build.*
|
||||
build/
|
||||
dist/
|
||||
doc/*.php
|
||||
node_modules/
|
||||
perf/*.html
|
||||
perf/*.sh
|
||||
test/*.html
|
||||
test/*.sh
|
||||
vendor/backbone/
|
||||
vendor/closure-compiler/
|
||||
vendor/docdown/
|
||||
vendor/firebug-lite/
|
||||
vendor/requirejs/
|
||||
vendor/uglifyjs/
|
||||
vendor/underscore/
|
||||
57
.travis.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.6"
|
||||
- "0.8"
|
||||
- "0.10"
|
||||
env:
|
||||
global:
|
||||
- BIN="node" BUILD=false MAKE=false OPTION=""
|
||||
matrix:
|
||||
- BUILD="compat"
|
||||
- BUILD="modern"
|
||||
- BUILD="legacy" MAKE=true
|
||||
- BUILD="mobile" MAKE=true
|
||||
- BIN="phantomjs" BUILD="compat"
|
||||
- BIN="phantomjs" BUILD="legacy" MAKE=true
|
||||
- BIN="phantomjs" BUILD="mobile" MAKE=true
|
||||
matrix:
|
||||
include:
|
||||
- node_js: "0.10"
|
||||
env: BIN="istanbul"
|
||||
- node_js: "0.10"
|
||||
env: BIN="narwhal" BUILD="compat"
|
||||
- node_js: "0.10"
|
||||
env: BIN="narwhal" BUILD="legacy" MAKE=true
|
||||
- node_js: "0.10"
|
||||
env: BIN="rhino" BUILD="compat"
|
||||
- node_js: "0.10"
|
||||
env: BIN="rhino" BUILD="legacy" MAKE=true
|
||||
- node_js: "0.10"
|
||||
env: BIN="rhino" BUILD="compat" OPTION="-require"
|
||||
- node_js: "0.10"
|
||||
env: BIN="rhino" BUILD="legacy" MAKE=true OPTION="-require"
|
||||
- node_js: "0.10"
|
||||
env: BIN="ringo" BUILD="compat"
|
||||
- node_js: "0.10"
|
||||
env: BIN="ringo" BUILD="legacy" MAKE=true
|
||||
git:
|
||||
depth: 1
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
before_script:
|
||||
- "[ $BIN == 'istanbul' ] && npm install -g istanbul || true"
|
||||
- "[ $BIN == 'narwhal' ] && wget https://github.com/280north/narwhal/archive/v0.3.2.zip && sudo unzip v0.3.2 -d /opt/ && rm v0.3.2.zip || true"
|
||||
- "[ $BIN == 'narwhal' ] && sudo ln -s /opt/narwhal-0.3.2/bin/narwhal /usr/local/bin/narwhal && sudo chmod +x /usr/local/bin/narwhal || true"
|
||||
- "[ $BIN == 'rhino' ] && sudo mkdir /opt/rhino-1.7R5 && sudo wget -O /opt/rhino-1.7R5/js.jar https://oss.sonatype.org/content/repositories/snapshots/org/mozilla/rhino/1.7R5-SNAPSHOT/rhino-1.7R5-20120629.144839-4.jar || true"
|
||||
- "[ $BIN == 'rhino' ] && echo -e '#!/bin/sh\\njava -jar /opt/rhino-1.7R5/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino || true"
|
||||
- "[ $BIN == 'ringo' ] && wget http://ringojs.org/downloads/ringojs-0.9.zip && sudo unzip ringojs-0.9 -d /opt && rm ringojs-0.9.zip || true"
|
||||
- "[ $BIN == 'ringo' ] && sudo ln -s /opt/ringojs-0.9/bin/ringo /usr/local/bin/ringo && sudo chmod +x /usr/local/bin/ringo || true"
|
||||
script:
|
||||
- "[ $BIN == 'istanbul' ] && $BIN cover ./test/test.js || true"
|
||||
- "[ $MAKE != false ] && git clone --depth=1 --branch=master git://github.com/lodash/lodash-cli.git ./node_modules/lodash-cli || true"
|
||||
- "[ $MAKE != false ] && mkdir ./node_modules/lodash-cli/node_modules && cd ./node_modules/lodash-cli/node_modules/ && ln -s ../../../ ./lodash && cd ../ && npm i . && cd ../../ || true"
|
||||
- "[ $MAKE != false ] && node ./node_modules/lodash-cli/bin/lodash $BUILD -o ./dist/lodash.$BUILD.js || true"
|
||||
- "[ $BUILD != false ] && cd ./test || true"
|
||||
- "[ $BUILD != false ] && $BIN $OPTION ./test.js ../dist/lodash.$BUILD.js || true"
|
||||
- "[ $BUILD != false ] && $BIN $OPTION ./test.js ../dist/lodash.$BUILD.min.js || true"
|
||||
35
CONTRIBUTING.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Contributing to Lo-Dash
|
||||
|
||||
If you’d like to contribute a feature or bug fix, you can [fork](https://help.github.com/articles/fork-a-repo) Lo-Dash, commit your changes, and [send a pull request](https://help.github.com/articles/using-pull-requests).
|
||||
Please make sure to [search the issue tracker](https://github.com/lodash/lodash/issues) first; your issue may have already been discussed or fixed in `master`.
|
||||
|
||||
## Tests
|
||||
|
||||
Include updated unit tests in the `test` directory as part of your pull request.
|
||||
You can run the tests from the command line via `node test/test`, or open `test/index.html` in a web browser.
|
||||
The `test/run-test.sh` script attempts to run the tests in [Rhino](https://developer.mozilla.org/en-US/docs/Rhino), [Narwhal](https://github.com/280north/narwhal), [RingoJS](http://ringojs.org/), [PhantomJS](http://phantomjs.org/), and [Node](http://nodejs.org/), before running them in your default browser.
|
||||
The [Backbone](http://backbonejs.org/) and [Underscore](http://http://underscorejs.org/) test suites are included as well.
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
Lo-Dash is a member of the [Dojo Foundation](http://dojofoundation.org/).
|
||||
As such, we request that all contributors sign the Dojo Foundation [contributor license agreement](http://dojofoundation.org/about/claForm).
|
||||
|
||||
For more information about CLAs, please check out Alex Russell’s excellent post, [“Why Do I Need to Sign This?”](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
|
||||
|
||||
## Coding Guidelines
|
||||
|
||||
In addition to the following guidelines, please follow the conventions already established in the code.
|
||||
|
||||
- **Spacing**:<br>
|
||||
Use two spaces for indentation. No tabs.
|
||||
|
||||
- **Naming**:<br>
|
||||
Keep variable and method names concise and descriptive.<br>
|
||||
Variable names `index`, `collection`, and `callback` are preferable to `i`, `arr`, and `fn`.
|
||||
|
||||
- **Quotes**:<br>
|
||||
Single-quoted strings are preferred to double-quoted strings; however, please use a double-quoted string if the value contains a single-quote character to avoid unnecessary escaping.
|
||||
|
||||
- **Comments**:<br>
|
||||
Please use single-line comments to annotate significant additions, and [JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for new methods.
|
||||
@@ -1,6 +1,6 @@
|
||||
Copyright 2012 John-David Dalton <http://allyoucanleet.com/>
|
||||
Based on Underscore.js 1.3.3, copyright 2009-2012 Jeremy Ashkenas,
|
||||
DocumentCloud Inc. <http://documentcloud.github.com/underscore>
|
||||
Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js 1.5.2, copyright 2009-2013 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
|
||||
|
||||
347
README.md
@@ -1,286 +1,143 @@
|
||||
# Lo-Dash <sup>v0.3.0</sup>
|
||||
|
||||
A drop-in replacement for Underscore.js, from the devs behind [jsPerf.com](http://jsperf.com), that delivers [performance improvements](http://lodash.com/benchmarks), [bug fixes](https://github.com/bestiejs/lodash#closed-underscorejs-issues), and [additional features](https://github.com/bestiejs/lodash#features).
|
||||
|
||||
Lo-Dash’s performance is gained by avoiding slower native methods, instead opting for simplified non-ES5 compliant methods optimized for common usage, and by leveraging function compilation to reduce the number of overall function calls.
|
||||
# Lo-Dash v2.2.0
|
||||
A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features).
|
||||
|
||||
## Download
|
||||
|
||||
* [Development source](https://raw.github.com/bestiejs/lodash/v0.3.0/lodash.js)
|
||||
* [Production source](https://raw.github.com/bestiejs/lodash/v0.3.0/lodash.min.js)
|
||||
* For optimal performance, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need
|
||||
* Modern builds perfect for newer browsers/environments:<br>
|
||||
[Development](https://raw.github.com/lodash/lodash/2.2.0/dist/lodash.js) &
|
||||
[Production](https://raw.github.com/lodash/lodash/2.2.0/dist/lodash.min.js)
|
||||
|
||||
* Compatibility builds for older environment support too:<br>
|
||||
[Development](https://raw.github.com/lodash/lodash/2.2.0/dist/lodash.compat.js) &
|
||||
[Production](https://raw.github.com/lodash/lodash/2.2.0/dist/lodash.compat.min.js)
|
||||
|
||||
* Underscore builds to use as a drop-in replacement:<br>
|
||||
[Development](https://raw.github.com/lodash/lodash/2.2.0/dist/lodash.underscore.js) &
|
||||
[Production](https://raw.github.com/lodash/lodash/2.2.0/dist/lodash.underscore.min.js)
|
||||
|
||||
CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash).<br>
|
||||
For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed.<br>
|
||||
Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method.
|
||||
|
||||
## Dive in
|
||||
|
||||
We’ve got [API docs](http://lodash.com/docs), [benchmarks](http://lodash.com/benchmarks), and [unit tests](http://lodash.com/tests).
|
||||
There’s plenty of [documentation](http://lodash.com/docs), [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).<br>
|
||||
For a list of upcoming features, check out our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap).<br>
|
||||
The full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
|
||||
|
||||
For a list of upcoming features, check out our [roadmap](https://github.com/bestiejs/lodash/wiki/Roadmap).
|
||||
## Features *not* in Underscore
|
||||
|
||||
## Screencasts
|
||||
* AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.)
|
||||
* [_(…)](http://lodash.com/docs#_) supports intuitive chaining
|
||||
* [_.at](http://lodash.com/docs#at) for cherry-picking collection values
|
||||
* [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods
|
||||
* [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects
|
||||
* [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects
|
||||
* [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex`
|
||||
* [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins
|
||||
* [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions
|
||||
* [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control
|
||||
* [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys
|
||||
* [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early
|
||||
* [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties
|
||||
* [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties
|
||||
* [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object`
|
||||
* [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions
|
||||
* [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend)
|
||||
* [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior
|
||||
* [_.partialRight](http://lodash.com/docs#partialRight) for [partial application](http://lodash.com/docs#partial) from the right
|
||||
* [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays
|
||||
* [_.random](http://lodash.com/docs#random) supports returning floating-point numbers
|
||||
* [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking
|
||||
* [_.support](http://lodash.com/docs#support) for flagging environment features
|
||||
* [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6)
|
||||
* [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects
|
||||
* [_.where](http://lodash.com/docs#where) supports deep object comparisons
|
||||
* [_.zip](http://lodash.com/docs#zip) is capable of unzipping values
|
||||
* [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), &
|
||||
[more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks
|
||||
* [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), &
|
||||
[more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings
|
||||
* [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), &
|
||||
[more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands
|
||||
* [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), &
|
||||
[more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight") right-associative methods
|
||||
|
||||
For more information check out these screencasts over Lo-Dash:
|
||||
## Resources
|
||||
|
||||
* [Introducing Lo-Dash](http://dl.dropbox.com/u/513327/allyoucanleet/post/20/file/screencast.mp4)
|
||||
* [Optimizations and custom builds](http://dl.dropbox.com/u/513327/allyoucanleet/post/21/file/screencast.mp4)
|
||||
* Posts
|
||||
- [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/)
|
||||
- [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/)
|
||||
|
||||
## Features
|
||||
|
||||
* AMD loader support (RequireJS, curl.js, etc.)
|
||||
* [_.bind](http://lodash.com/docs#bind) supports *"lazy"* binding
|
||||
* [_.debounce](http://lodash.com/docs#debounce)’ed functions match [_.throttle](http://lodash.com/docs#throttle)’ed functions’ return value behavior
|
||||
* [_.forEach](http://lodash.com/docs#forEach) is chainable
|
||||
* [_.forIn](http://lodash.com/docs#forIn) for iterating over an object’s own and inherited properties
|
||||
* [_.forOwn](http://lodash.com/docs#forOwn) for iterating over an object’s own properties
|
||||
* [_.groupBy](http://lodash.com/docs#groupBy), [_.sortedIndex](http://lodash.com/docs#sortedIndex), and [_.uniq](http://lodash.com/docs#uniq) accept a `thisArg` argument
|
||||
* [_.indexOf](http://lodash.com/docs#indexOf) and [_.lastIndexOf](http://lodash.com/docs#lastIndexOf) accept a `fromIndex` argument
|
||||
* [_.partial](http://lodash.com/docs#partial) for more functional fun
|
||||
* [_.size](http://lodash.com/docs#size) supports returning the `length` of string values
|
||||
* [_.template](http://lodash.com/docs#template) utilizes [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier debugging
|
||||
* Videos
|
||||
- [Introduction](https://vimeo.com/44154599)
|
||||
- [Origins](https://vimeo.com/44154600)
|
||||
- [Optimizations & builds](https://vimeo.com/44154601)
|
||||
- [Native method use](https://vimeo.com/48576012)
|
||||
- [Testing](https://vimeo.com/45865290)
|
||||
- [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk)
|
||||
|
||||
## Support
|
||||
|
||||
Lo-Dash has been tested in at least Chrome 5-19, Firefox 1.5-13, IE 6-9, Opera 9.25-11.64, Safari 3.0.4-5.1.3, Node.js 0.4.8-0.6.18, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC3.
|
||||
Tested in Chrome 5~29, Firefox 2~24, IE 6-10, Opera 9.25~16, Safari 3-6, Node.js 0.6.8-0.10.18, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
|
||||
|
||||
## Custom builds
|
||||
|
||||
Custom builds make it easy to create lightweight versions of Lo-Dash containing only the methods you need.
|
||||
We handle all the method dependency and alias mapping for you.
|
||||
|
||||
Mobile builds, with IE bug fixes and method compilation removed, may be created by using the `mobile` argument.
|
||||
|
||||
~~~ bash
|
||||
node build mobile
|
||||
~~~
|
||||
|
||||
Custom builds may be created in three ways:
|
||||
|
||||
1. Use the `category` argument to pass the categories of methods to include in the build.<br>
|
||||
Valid categories are *"arrays"*, *"chaining"*, *"collections"*, *"functions"*, *"objects"*, and *"utilities"*.
|
||||
~~~ bash
|
||||
node build category=collections,functions
|
||||
node build category="collections, functions"
|
||||
node build mobile category=collections,functions
|
||||
~~~
|
||||
|
||||
2. Use the `include` argument to pass the names of the methods to include in the build.
|
||||
~~~ bash
|
||||
node build include=each,filter,map
|
||||
node build include="each, filter, map"
|
||||
node build mobile include=each,filter,map
|
||||
~~~
|
||||
|
||||
3. Use the `exclude` argument to pass the names of the methods to exclude from the build.
|
||||
~~~ bash
|
||||
node build exclude=union,uniq,zip
|
||||
node build exclude="union, uniq, zip"
|
||||
node build mobile exclude=union,uniq,zip
|
||||
~~~
|
||||
|
||||
Custom builds are saved to `lodash.custom.js` and `lodash.custom.min.js`.
|
||||
|
||||
## Installation and usage
|
||||
## Installation & usage
|
||||
|
||||
In browsers:
|
||||
|
||||
~~~ html
|
||||
```html
|
||||
<script src="lodash.js"></script>
|
||||
~~~
|
||||
```
|
||||
|
||||
Using [npm](http://npmjs.org/):
|
||||
Using [`npm`](http://npmjs.org/):
|
||||
|
||||
~~~ bash
|
||||
npm install lodash
|
||||
~~~
|
||||
```bash
|
||||
npm i --save lodash
|
||||
|
||||
In [Node.js](http://nodejs.org/) and [RingoJS v0.8.0+](http://ringojs.org/):
|
||||
{sudo} npm i -g lodash
|
||||
npm ln lodash
|
||||
```
|
||||
|
||||
~~~ js
|
||||
In [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):
|
||||
|
||||
```js
|
||||
var _ = require('lodash');
|
||||
~~~
|
||||
// or as Underscore
|
||||
var _ = require('lodash/dist/lodash.underscore');
|
||||
```
|
||||
|
||||
In [Narwhal](http://narwhaljs.org/) and [RingoJS v0.7.0-](http://ringojs.org/):
|
||||
|
||||
~~~ js
|
||||
var _ = require('lodash')._;
|
||||
~~~
|
||||
**Notes:**
|
||||
* Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL
|
||||
* If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it
|
||||
* Node.js 0.10.8-0.10.11 [have](https://github.com/joyent/node/issues/5622) [bugs](https://github.com/joyent/node/issues/5688) preventing minified builds
|
||||
|
||||
In [Rhino](http://www.mozilla.org/rhino/):
|
||||
|
||||
~~~ js
|
||||
```js
|
||||
load('lodash.js');
|
||||
~~~
|
||||
```
|
||||
|
||||
In an AMD loader like [RequireJS](http://requirejs.org/):
|
||||
In an AMD loader:
|
||||
|
||||
~~~ js
|
||||
```js
|
||||
require({
|
||||
'paths': {
|
||||
'underscore': 'path/to/lodash'
|
||||
}
|
||||
'packages': [
|
||||
{ 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }
|
||||
]
|
||||
},
|
||||
['underscore'], function(_) {
|
||||
['lodash'], function(_) {
|
||||
console.log(_.VERSION);
|
||||
});
|
||||
~~~
|
||||
|
||||
## Cloning this repo
|
||||
|
||||
To clone this repository including all submodules, using Git 1.6.5 or later:
|
||||
|
||||
~~~ bash
|
||||
git clone --recursive https://github.com/bestiejs/lodash.git
|
||||
cd lodash.js
|
||||
~~~
|
||||
|
||||
For older Git versions, just use:
|
||||
|
||||
~~~ bash
|
||||
git clone https://github.com/bestiejs/lodash.git
|
||||
cd lodash
|
||||
git submodule update --init
|
||||
~~~
|
||||
|
||||
## Closed Underscore.js issues
|
||||
|
||||
* Allow iteration of objects with a `length` property [[#148](https://github.com/documentcloud/underscore/issues/148), [#154](https://github.com/documentcloud/underscore/issues/154), [#252](https://github.com/documentcloud/underscore/issues/252), [#448](https://github.com/documentcloud/underscore/issues/448), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L266-272)]
|
||||
* Ensure array-like objects with invalid `length` properties are treated like regular objects [[test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L237-243), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L533-542), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L661-664)]
|
||||
* Ensure `_(...)` returns passed wrapper instances [[test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L106-109)]
|
||||
* Ensure `_.groupBy` adds values to own, not inherited, properties [[test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L317-324)]
|
||||
* Ensure `_.sortedIndex` supports arrays with high `length` values [[test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L586-595)]
|
||||
* Ensure `_.throttle` works when called in tight loops [[#502](https://github.com/documentcloud/underscore/issues/502), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L629-639)]
|
||||
* Fix Firefox, IE, Opera, and Safari object iteration bugs [[#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L175-187), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L277-302), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L379-390), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L398-400), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L418-438), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L554-556)]
|
||||
* Handle arrays with `undefined` values correctly in IE < 9 [[#601](https://github.com/documentcloud/underscore/issues/601)]
|
||||
* Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L88-94)]
|
||||
* Register as AMD module, but still export to global [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L72-86)]
|
||||
* `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L232-235)]
|
||||
* `_isNaN(new Number(NaN))` should return `true` [[test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L408-410)]
|
||||
* `_.reduceRight` should pass correct callback arguments when iterating objects [[test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L521-531)]
|
||||
* `_.size` should return the `length` of string values [[test](https://github.com/bestiejs/lodash/blob/c07e1567a7a12cff2c5ee6cda81306c8bcf126f0/test/test.js#L550-552)]
|
||||
|
||||
## Optimized methods <sup>(50+)</sup>
|
||||
|
||||
* `_.bind`
|
||||
* `_.bindAll`
|
||||
* `_.clone`
|
||||
* `_.compact`
|
||||
* `_.contains`, `_.include`
|
||||
* `_.defaults`
|
||||
* `_.defer`
|
||||
* `_.difference`
|
||||
* `_.each`
|
||||
* `_.escape`
|
||||
* `_.every`, `_.all`
|
||||
* `_.extend`
|
||||
* `_.filter`, `_.select`
|
||||
* `_.find`, `_.detect`
|
||||
* `_.flatten`
|
||||
* `_.forEach`, `_.each`
|
||||
* `_.functions`, `_.methods`
|
||||
* `_.groupBy`
|
||||
* `_.indexOf`
|
||||
* `_.intersection`
|
||||
* `_.invoke`
|
||||
* `_.isEmpty`
|
||||
* `_.isEqual`
|
||||
* `_.isFinite`
|
||||
* `_.isObject`
|
||||
* `_.isString`
|
||||
* `_.keys`
|
||||
* `_.lastIndexOf`
|
||||
* `_.map`, `_.collect`
|
||||
* `_.max`
|
||||
* `_.memoize`
|
||||
* `_.min`
|
||||
* `_.mixin`
|
||||
* `_.pick`
|
||||
* `_.pluck`
|
||||
* `_.reduce`, `_.foldl`, `_.inject`
|
||||
* `_.reject`
|
||||
* `_.result`
|
||||
* `_.shuffle`
|
||||
* `_.some`, `_.any`
|
||||
* `_.sortBy`
|
||||
* `_.sortedIndex`
|
||||
* `_.template`
|
||||
* `_.throttle`
|
||||
* `_.times`
|
||||
* `_.toArray`
|
||||
* `_.union`
|
||||
* `_.uniq`, `_.unique`
|
||||
* `_.values`
|
||||
* `_.without`
|
||||
* `_.wrap`
|
||||
* `_.zip`
|
||||
* plus all `_(...)` method wrappers
|
||||
|
||||
## Changelog
|
||||
|
||||
### <sup>v0.3.0</sup>
|
||||
|
||||
* Added `category` build option
|
||||
* Added `fromIndex` argument to `_.indexOf` and `_.lastIndexOf`
|
||||
* Added `//@ sourceURL` support to `_.template`
|
||||
* Added `thisArg` argument to `_.sortedIndex` and `_.uniq`
|
||||
* Added `_.forIn` and `_.forOwn` methods
|
||||
* Ensured array-like objects with invalid `length` properties are treated like regular objects
|
||||
* Ensured `_.sortedIndex` supports arrays with high `length` values
|
||||
* Fixed `prototype` property iteration bug in `_.keys` for Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1
|
||||
* Optimized `_.times` and `this` bindings in iterator methods
|
||||
|
||||
### <sup>v0.2.2</sup>
|
||||
|
||||
* Added `mobile` build option
|
||||
* Ensured `_.find` returns `undefined` for unmatched values
|
||||
* Ensured `_.templateSettings.variable` is compatible with Underscore.js
|
||||
* Optimized `_.escape`
|
||||
* Reduced dependencies in `_.find`
|
||||
|
||||
### <sup>v0.2.1</sup>
|
||||
|
||||
* Adjusted the Lo-Dash export order for r.js
|
||||
* Ensured `_.groupBy` values are added to own, not inherited, properties
|
||||
* Made `_.bind` follow ES5 spec to support a popular Backbone.js pattern
|
||||
* Removed the alias `intersect`
|
||||
* Simplified `_.bind`, `_.flatten`, `_.groupBy`, `_.max`, and `_.min`
|
||||
|
||||
### <sup>v0.2.0</sup>
|
||||
|
||||
* Added custom build options
|
||||
* Added default `_.templateSettings.variable` value
|
||||
* Added *"lazy bind"* support to `_.bind`
|
||||
* Added native method overwrite detection to avoid bad native shims
|
||||
* Added support for more AMD build optimizers and aliasing as the *"underscore"* module
|
||||
* Added `thisArg` argument to `_.groupBy`
|
||||
* Added whitespace to compiled strings
|
||||
* Added `_.partial` method
|
||||
* Commented the `iterationFactory` options object
|
||||
* Ensured `_(...)` returns passed wrapper instances
|
||||
* Ensured `_.max` and `_.min` support extremely large arrays
|
||||
* Ensured `_.throttle` works in tight loops
|
||||
* Fixed IE < 9 `[DontEnum]` bug and Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1’s `prototype` property iteration bug
|
||||
* Inlined `_.isFunction` calls.
|
||||
* Made `_.debounce`’ed functions match `_.throttle`’ed functions’ return value behavior
|
||||
* Made `_.escape` no longer translate the *">"* character
|
||||
* Fixed `clearTimeout` typo
|
||||
* Simplified all methods in the *"Arrays"* category
|
||||
* Optimized `_.debounce`, `_.escape`, `_.flatten`, `_.forEach`, `_.groupBy`, `_.intersection`, `_.invoke`, `_.isObject`, `_.max`, `_.min`, `_.pick`, `_.shuffle`, `_.sortedIndex`, `_.template`, `_.throttle`, `_.union`, `_.uniq`
|
||||
|
||||
### <sup>v0.1.0</sup>
|
||||
|
||||
* Initial release
|
||||
|
||||
## BestieJS
|
||||
|
||||
Lo-Dash is part of the BestieJS *"Best in Class"* module collection. This means we promote solid browser/environment support, ES5 precedents, unit testing, and plenty of documentation.
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
* [John-David Dalton](http://allyoucanleet.com/)
|
||||
[](https://twitter.com/jdalton "Follow @jdalton on Twitter")
|
||||
| [](http://twitter.com/jdalton "Follow @jdalton on Twitter") |
|
||||
|---|
|
||||
| [John-David Dalton](http://allyoucanleet.com/) |
|
||||
|
||||
## Contributors
|
||||
|
||||
* [Kit Cambridge](http://kitcambridge.github.com/)
|
||||
[](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter")
|
||||
* [Mathias Bynens](http://mathiasbynens.be/)
|
||||
[](https://twitter.com/mathias "Follow @mathias on Twitter")
|
||||
| [](http://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [](http://twitter.com/mathias "Follow @mathias on Twitter") |
|
||||
|---|---|---|
|
||||
| [Blaine Bublitz](http://iceddev.com/) | [Kit Cambridge](http://kitcambridge.github.io/) | [Mathias Bynens](http://mathiasbynens.be/) |
|
||||
|
||||
23
bower.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"version": "2.2.0",
|
||||
"main": "dist/lodash.compat.js",
|
||||
"ignore": [
|
||||
".*",
|
||||
"*.custom.*",
|
||||
"*.template.*",
|
||||
"*.map",
|
||||
"*.md",
|
||||
"/*.min.*",
|
||||
"/lodash.js",
|
||||
"index.js",
|
||||
"component.json",
|
||||
"package.json",
|
||||
"doc",
|
||||
"modularize",
|
||||
"node_modules",
|
||||
"perf",
|
||||
"test",
|
||||
"vendor"
|
||||
]
|
||||
}
|
||||
526
build.js
@@ -1,526 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
;(function() {
|
||||
'use strict';
|
||||
|
||||
/** The Node filesystem and path modules */
|
||||
var fs = require('fs'),
|
||||
path = require('path');
|
||||
|
||||
/** Load other modules */
|
||||
var lodash = require(path.join(__dirname, 'lodash')),
|
||||
minify = require(path.join(__dirname, 'build', 'minify'));
|
||||
|
||||
/** Flag used to specify a mobile build */
|
||||
var isMobile = process.argv.indexOf('mobile') > -1;
|
||||
|
||||
/** Shortcut used to convert array-like objects to arrays */
|
||||
var slice = [].slice;
|
||||
|
||||
/** The lodash.js source */
|
||||
var source = fs.readFileSync(path.join(__dirname, 'lodash.js'), 'utf8');
|
||||
|
||||
/** Used to associate aliases with their real names */
|
||||
var aliasToRealMap = {
|
||||
'all': 'every',
|
||||
'any': 'some',
|
||||
'collect': 'map',
|
||||
'detect': 'find',
|
||||
'each': 'forEach',
|
||||
'foldl': 'reduce',
|
||||
'foldr': 'reduceRight',
|
||||
'head': 'first',
|
||||
'include': 'contains',
|
||||
'inject': 'reduce',
|
||||
'methods': 'functions',
|
||||
'select': 'filter',
|
||||
'tail': 'rest',
|
||||
'take': 'first',
|
||||
'unique': 'uniq'
|
||||
};
|
||||
|
||||
/** Used to associate real names with their aliases */
|
||||
var realToAliasMap = {
|
||||
'contains': ['include'],
|
||||
'every': ['all'],
|
||||
'filter': ['select'],
|
||||
'find': ['detect'],
|
||||
'first': ['head', 'take'],
|
||||
'forEach': ['each'],
|
||||
'functions': ['methods'],
|
||||
'map': ['collect'],
|
||||
'reduce': ['foldl', 'inject'],
|
||||
'reduceRight': ['foldr'],
|
||||
'rest': ['tail'],
|
||||
'some': ['any'],
|
||||
'uniq': ['unique']
|
||||
};
|
||||
|
||||
/** Used to track function dependencies */
|
||||
var dependencyMap = {
|
||||
'after': [],
|
||||
'bind': [],
|
||||
'bindAll': ['bind'],
|
||||
'chain': ['mixin'],
|
||||
'clone': ['extend', 'isArray'],
|
||||
'compact': [],
|
||||
'compose': [],
|
||||
'contains': ['createIterator'],
|
||||
'createIterator': [],
|
||||
'debounce': [],
|
||||
'defaults': ['createIterator'],
|
||||
'defer': [],
|
||||
'delay': [],
|
||||
'difference': ['indexOf'],
|
||||
'escape': [],
|
||||
'every': ['createIterator', 'identity'],
|
||||
'extend': ['createIterator'],
|
||||
'filter': ['createIterator', 'identity'],
|
||||
'find': ['createIterator'],
|
||||
'first': [],
|
||||
'flatten': ['isArray'],
|
||||
'forEach': ['createIterator'],
|
||||
'forIn': ['createIterator'],
|
||||
'forOwn': ['createIterator'],
|
||||
'functions': ['createIterator'],
|
||||
'groupBy': ['createIterator'],
|
||||
'has': [],
|
||||
'identity': [],
|
||||
'indexOf': ['sortedIndex'],
|
||||
'initial': [],
|
||||
'intersection': ['every', 'indexOf'],
|
||||
'invoke': [],
|
||||
'isArguments': [],
|
||||
'isArray': [],
|
||||
'isBoolean': [],
|
||||
'isDate': [],
|
||||
'isElement': [],
|
||||
'isEmpty': ['createIterator'],
|
||||
'isEqual': [],
|
||||
'isFinite': [],
|
||||
'isFunction': [],
|
||||
'isNaN': [],
|
||||
'isNull': [],
|
||||
'isNumber': [],
|
||||
'isObject': [],
|
||||
'isRegExp': [],
|
||||
'isString': [],
|
||||
'isUndefined': [],
|
||||
'keys': ['createIterator'],
|
||||
'last': [],
|
||||
'lastIndexOf': [],
|
||||
'map': ['createIterator', 'identity'],
|
||||
'max': [],
|
||||
'memoize': [],
|
||||
'min': [],
|
||||
'mixin': ['forEach'],
|
||||
'noConflict': [],
|
||||
'once': [],
|
||||
'partial': [],
|
||||
'pick': [],
|
||||
'pluck': ['createIterator'],
|
||||
'range': [],
|
||||
'reduce': ['createIterator'],
|
||||
'reduceRight': ['keys'],
|
||||
'reject': ['createIterator', 'identity'],
|
||||
'rest': [],
|
||||
'result': [],
|
||||
'shuffle': [],
|
||||
'size': ['keys'],
|
||||
'some': ['createIterator', 'identity'],
|
||||
'sortBy': ['map', 'pluck'],
|
||||
'sortedIndex': ['identity'],
|
||||
'tap': [],
|
||||
'template': ['escape'],
|
||||
'throttle': [],
|
||||
'times': [],
|
||||
'toArray': ['values'],
|
||||
'union': ['indexOf'],
|
||||
'uniq': ['identity', 'indexOf'],
|
||||
'uniqueId': [],
|
||||
'values': ['createIterator'],
|
||||
'without': ['indexOf'],
|
||||
'wrap': [],
|
||||
'zip': ['max', 'pluck']
|
||||
};
|
||||
|
||||
/** Names of all methods */
|
||||
var allMethods = Object.keys(dependencyMap);
|
||||
|
||||
/** Names of methods to filter for the build */
|
||||
var filterMethods = allMethods;
|
||||
|
||||
/** Used to specify whether `filterMethods` is used for exclusion or inclusion */
|
||||
var filterType = process.argv.reduce(function(result, value) {
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
var pair = value.match(/^(category|exclude|include)=(.*)$/);
|
||||
if (!pair) {
|
||||
return result;
|
||||
}
|
||||
|
||||
result = pair[1];
|
||||
filterMethods = pair[2].split(/, */).map(getRealName);
|
||||
|
||||
if (result == 'category') {
|
||||
// resolve method names belonging to each category
|
||||
filterMethods = filterMethods.reduce(function(result, category) {
|
||||
return result.concat(allMethods.filter(function(funcName) {
|
||||
return RegExp('@category ' + category + '\\b', 'i').test(matchFunction(source, funcName));
|
||||
}));
|
||||
}, []);
|
||||
}
|
||||
else {
|
||||
// remove nonexistent method names
|
||||
filterMethods = lodash.intersection(allMethods, filterMethods);
|
||||
}
|
||||
return result;
|
||||
}, '');
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Gets the aliases associated with a given `funcName`.
|
||||
*
|
||||
* @private
|
||||
* @param {String} funcName The name of the function to get aliases for.
|
||||
* @returns {Array} Returns an array of aliases.
|
||||
*/
|
||||
function getAliases(funcName) {
|
||||
return realToAliasMap[funcName] || [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of depenants for a function by the given `funcName`.
|
||||
*
|
||||
* @private
|
||||
* @param {String} funcName The name of the function to query.
|
||||
* @returns {Array} Returns an array of function dependants.
|
||||
*/
|
||||
function getDependants(funcName) {
|
||||
// iterate over `dependencyMap`, adding the names of functions that
|
||||
// have `funcName` as a dependency
|
||||
return lodash.reduce(dependencyMap, function(result, dependencies, otherName) {
|
||||
if (dependencies.indexOf(funcName) > -1) {
|
||||
result.push(otherName);
|
||||
}
|
||||
return result;
|
||||
}, []);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of dependencies for a function of the given `funcName`.
|
||||
*
|
||||
* @private
|
||||
* @param {String} funcName The name of the function to query.
|
||||
* @returns {Array} Returns an array of function dependencies.
|
||||
*/
|
||||
function getDependencies(funcName) {
|
||||
var dependencies = dependencyMap[funcName],
|
||||
result = [];
|
||||
|
||||
if (!dependencies) {
|
||||
return result;
|
||||
}
|
||||
// recursively accumulate the dependencies of the `funcName` function, and
|
||||
// the dependencies of its dependencies, and so on.
|
||||
return dependencies.reduce(function(result, otherName) {
|
||||
result.push.apply(result, getDependencies(otherName).concat(otherName));
|
||||
return result;
|
||||
}, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the real name, not alias, of a given `funcName`.
|
||||
*
|
||||
* @private
|
||||
* @param {String} funcName The name of the function to resolve.
|
||||
* @returns {String} Returns the real name.
|
||||
*/
|
||||
function getRealName(funcName) {
|
||||
return aliasToRealMap[funcName] || funcName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if all functions of the given names have been removed from the `source`.
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to inspect.
|
||||
* @param {String} [funcName1, funcName2, ...] The names of functions to check.
|
||||
* @returns {Boolean} Returns `true` if all functions have been removed, else `false`.
|
||||
*/
|
||||
function isRemoved(source) {
|
||||
return slice.call(arguments, 1).every(function(funcName) {
|
||||
return !matchFunction(source, funcName);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches the `source` for a `funcName` function declaration, expression, or
|
||||
* assignment and returns the matched snippet.
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to inspect.
|
||||
* @param {String} funcName The name of the function to match.
|
||||
* @returns {String} Returns the matched function snippet.
|
||||
*/
|
||||
function matchFunction(source, funcName) {
|
||||
var result = source.match(RegExp(
|
||||
// match multi-line comment block (could be on a single line)
|
||||
'\\n +/\\*[^*]*\\*+(?:[^/][^*]*\\*+)*/\\n' +
|
||||
// begin non-capturing group
|
||||
'(?:' +
|
||||
// match a function declaration
|
||||
'( +)function ' + funcName + '\\b[\\s\\S]+?\\n\\1}|' +
|
||||
// match a variable declaration with `createIterator`
|
||||
' +var ' + funcName + ' *=.*?createIterator\\((?:{|[a-zA-Z])[\\s\\S]+?\\);|' +
|
||||
// match a variable declaration with function expression
|
||||
'( +)var ' + funcName + ' *=.*?function[\\s\\S]+?\\n\\2};' +
|
||||
// end non-capturing group
|
||||
')\\n'
|
||||
));
|
||||
|
||||
return result ? result[0] : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the all references to `refName` from the `createIterator` source.
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
* @param {String} refName The name of the reference to remove.
|
||||
* @returns {String} Returns the modified source.
|
||||
*/
|
||||
function removeFromCreateIterator(source, refName) {
|
||||
var snippet = matchFunction(source, 'createIterator'),
|
||||
modified = snippet.replace(RegExp('\\b' + refName + '\\b,? *', 'g'), '');
|
||||
|
||||
return source.replace(snippet, modified);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the `funcName` function declaration, expression, or assignment and
|
||||
* associated code from the `source`.
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
* @param {String} funcName The name of the function to remove.
|
||||
* @returns {String} Returns the source with the function removed.
|
||||
*/
|
||||
function removeFunction(source, funcName) {
|
||||
var modified,
|
||||
snippet = matchFunction(source, funcName);
|
||||
|
||||
// exit early if function is not found
|
||||
if (!snippet) {
|
||||
return source;
|
||||
}
|
||||
// remove function
|
||||
source = source.replace(matchFunction(source, funcName), '');
|
||||
|
||||
// grab the method assignments snippet
|
||||
snippet = source.match(/lodash\.VERSION *= *[\s\S]+?\/\*-+\*\/\n/)[0];
|
||||
|
||||
// remove assignment and aliases
|
||||
modified = getAliases(funcName).concat(funcName).reduce(function(result, otherName) {
|
||||
return result.replace(RegExp('(?:\\n *//.*\\s*)* *lodash\\.' + otherName + ' *= *.+\\n'), '');
|
||||
}, snippet);
|
||||
|
||||
// replace with the modified snippet
|
||||
source = source.replace(snippet, modified);
|
||||
|
||||
return removeFromCreateIterator(source, funcName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a given variable from the `source`.
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
* @param {String} varName The name of the variable to remove.
|
||||
* @returns {String} Returns the source with the variable removed.
|
||||
*/
|
||||
function removeVar(source, varName) {
|
||||
source = source.replace(RegExp(
|
||||
// begin non-capturing group
|
||||
'(?:' +
|
||||
// match multi-line comment block
|
||||
'(?:\\n +/\\*[^*]*\\*+(?:[^/][^*]*\\*+)*/)?\\n' +
|
||||
// match a variable declaration that's not part of a declaration list
|
||||
'( +)var ' + varName + ' *= *(?:.*?;|(?:Function\\(.+?|.*?[^,])\\n[\\s\\S]+?\\n\\1.+?;)\\n|' +
|
||||
// match a variable in a declaration list
|
||||
'\\n +' + varName + ' *=.*?,' +
|
||||
// end non-capturing group
|
||||
')'
|
||||
), '');
|
||||
|
||||
// remove a varaible at the start of a variable declaration list
|
||||
source = source.replace(RegExp('(var +)' + varName + ' *=.+?,\\s+'), '$1');
|
||||
|
||||
// remove a variable at the end of a variable declaration list
|
||||
source = source.replace(RegExp(',\\s*' + varName + ' *=.*?;'), ';');
|
||||
|
||||
return removeFromCreateIterator(source, varName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes non-syntax critical whitespace from a string.
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
* @returns {String} Returns the source with whitespace removed.
|
||||
*/
|
||||
function removeWhitespace(source) {
|
||||
return source.replace(/\[object |else if|function | in |return\s+[\w']|throw |typeof |var |@ |\\\\n|\\n|\s+/g, function(match) {
|
||||
return match == false || match == '\\n' ? '' : match;
|
||||
});
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// custom build
|
||||
(function() {
|
||||
// exit early if "category", "exclude", or "include" options aren't specified
|
||||
if (!filterType) {
|
||||
return;
|
||||
}
|
||||
if (filterType == 'exclude') {
|
||||
// remove methods that are named in `filterMethods` and their dependants
|
||||
filterMethods.forEach(function(funcName) {
|
||||
getDependants(funcName).concat(funcName).forEach(function(otherName) {
|
||||
source = removeFunction(source, otherName);
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
// add dependencies to `filterMethods`
|
||||
filterMethods = lodash.uniq(filterMethods.reduce(function(result, funcName) {
|
||||
result.push.apply(result, getDependencies(funcName).concat(funcName));
|
||||
return result;
|
||||
}, []));
|
||||
|
||||
// remove methods that aren't named in `filterMethods`
|
||||
lodash.each(dependencyMap, function(dependencies, otherName) {
|
||||
if (filterMethods.indexOf(otherName) < 0) {
|
||||
source = removeFunction(source, otherName);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// remove associated functions, variables and code snippets
|
||||
if (isRemoved(source, 'isArguments')) {
|
||||
// remove `isArguments` if-statement
|
||||
source = source.replace(/(?:\s*\/\/.*)*\s*if *\(!isArguments[^)]+\)[\s\S]+?};?\s*}\n/, '');
|
||||
}
|
||||
if (isRemoved(source, 'mixin')) {
|
||||
// remove `LoDash` constructor
|
||||
source = removeFunction(source, 'LoDash');
|
||||
// remove `LoDash` calls
|
||||
source = source.replace(/(?:new +LoDash(?!\()|(?:new +)?LoDash\([^)]*\));?/g, '');
|
||||
// remove `LoDash.prototype` additions
|
||||
source = source.replace(/(?:\s*\/\/.*)*\s*LoDash.prototype *=[\s\S]+?\/\*-+\*\//, '');
|
||||
}
|
||||
if (isRemoved(source, 'template')) {
|
||||
// remove `templateSettings` assignment
|
||||
source = source.replace(/(?:\n +\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)?\n *lodash\.templateSettings[\s\S]+?};\n/, '');
|
||||
}
|
||||
if (isRemoved(source, 'isArray', 'isEmpty', 'isEqual', 'size')) {
|
||||
source = removeVar(source, 'arrayClass');
|
||||
}
|
||||
if (isRemoved(source, 'bind', 'functions', 'groupBy', 'invoke', 'isEqual', 'isFunction', 'result', 'sortBy', 'toArray')) {
|
||||
source = removeVar(source, 'funcClass');
|
||||
}
|
||||
if (isRemoved(source, 'bind')) {
|
||||
source = removeVar(source, 'nativeBind');
|
||||
}
|
||||
if (isRemoved(source, 'isArray')) {
|
||||
source = removeVar(source, 'nativeIsArray');
|
||||
}
|
||||
if (isRemoved(source, 'keys')) {
|
||||
source = removeVar(source, 'nativeKeys');
|
||||
}
|
||||
if (isRemoved(source, 'clone', 'isObject', 'keys')) {
|
||||
source = removeVar(source, 'objectTypes');
|
||||
source = removeFromCreateIterator(source, 'objectTypes');
|
||||
}
|
||||
if (isRemoved(source, 'bind', 'isArray', 'keys')) {
|
||||
source = removeVar(source, 'reNative');
|
||||
}
|
||||
if (isRemoved(source, 'isEmpty', 'isEqual', 'isString', 'size')) {
|
||||
source = removeVar(source, 'stringClass');
|
||||
}
|
||||
|
||||
// consolidate consecutive horizontal rule comment separators
|
||||
source = source.replace(/(?:\s*\/\*-+\*\/\s*){2,}/g, function(separators) {
|
||||
return separators.match(/^\s*/)[0] + separators.slice(separators.lastIndexOf('/*'));
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
if (isMobile) {
|
||||
// inline functions defined with `createIterator`
|
||||
lodash.functions(lodash).forEach(function(funcName) {
|
||||
// match `funcName` with pseudo private `_` prefixes removed to allow matching `shimKeys`
|
||||
var reFunc = RegExp('(\\bvar ' + funcName.replace(/^_/, '') + ' *= *)createIterator\\(((?:{|[a-zA-Z])[\\s\\S]+?)\\);\\n');
|
||||
|
||||
// skip if not defined with `createIterator`
|
||||
if (!reFunc.test(source)) {
|
||||
return;
|
||||
}
|
||||
// extract and format the function's code
|
||||
var code = (lodash[funcName] + '').replace(/\n(?:.*)/g, function(match) {
|
||||
match = match.slice(1);
|
||||
return (match == '}' ? '\n ' : '\n ') + match;
|
||||
});
|
||||
|
||||
source = source.replace(reFunc, '$1' + code + ';\n');
|
||||
});
|
||||
|
||||
// remove `iteratorTemplate`
|
||||
source = removeVar(source, 'iteratorTemplate');
|
||||
|
||||
// remove JScript [[DontEnum]] fix from `isEqual`
|
||||
source = source.replace(/(?:\s*\/\/.*\n)*( +)if *\(result *&& *hasDontEnumBug[\s\S]+?\n\1}\n/, '\n');
|
||||
|
||||
// remove IE `shift` and `splice` fix
|
||||
source = source.replace(/(?:\s*\/\/.*\n)*( +)if *\(value.length *=== *0[\s\S]+?\n\1}\n/, '\n');
|
||||
}
|
||||
else {
|
||||
// inline `iteratorTemplate` template
|
||||
source = source.replace(/(( +)var iteratorTemplate *= *)([\s\S]+?\n\2.+?);\n/, (function() {
|
||||
// extract `iteratorTemplate` code
|
||||
var code = /^function[^{]+{([\s\S]+?)}$/.exec(lodash._iteratorTemplate)[1];
|
||||
|
||||
code = removeWhitespace(code)
|
||||
// remove unnecessary code
|
||||
.replace(/\|\|\{\}|,__t,__j=Array.prototype.join|function print[^}]+}|\+''/g, '')
|
||||
.replace(/(\{);|;(\})/g, '$1$2')
|
||||
.replace(/\(\(__t=\(([^)]+)\)\)==null\?'':__t\)/g, '$1')
|
||||
// ensure escaped characters are interpreted correctly in the string literal
|
||||
.replace(/\\/g, '\\\\');
|
||||
|
||||
// add `code` to `Function()` as a string literal to avoid strict mode
|
||||
// errors caused by the required with-statement
|
||||
return '$1Function(\'obj\',\n$2 "' + code + '"\n$2);\n';
|
||||
}()));
|
||||
}
|
||||
|
||||
// remove pseudo private properties
|
||||
source = source.replace(/(?:(?:\s*\/\/.*)*\s*lodash\._[^=]+=.+\n)+/g, '\n');
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// begin the minification process
|
||||
if (filterType || isMobile) {
|
||||
fs.writeFileSync(path.join(__dirname, 'lodash.custom.js'), source);
|
||||
minify(source, 'lodash.custom.min', function(result) {
|
||||
fs.writeFileSync(path.join(__dirname, 'lodash.custom.min.js'), result);
|
||||
});
|
||||
}
|
||||
else {
|
||||
minify(source, 'lodash.min', function(result) {
|
||||
fs.writeFileSync(path.join(__dirname, 'lodash.min.js'), result);
|
||||
});
|
||||
}
|
||||
}());
|
||||
341
build/minify.js
@@ -1,341 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
;(function() {
|
||||
'use strict';
|
||||
|
||||
/** The Node filesystem, path, `zlib`, and child process modules */
|
||||
var fs = require('fs'),
|
||||
gzip = require('zlib').gzip,
|
||||
path = require('path'),
|
||||
spawn = require('child_process').spawn;
|
||||
|
||||
/** The directory that is the base of the repository */
|
||||
var basePath = path.join(__dirname, '../');
|
||||
|
||||
/** The directory where the Closure Compiler is located */
|
||||
var closurePath = path.join(basePath, 'vendor', 'closure-compiler', 'compiler.jar');
|
||||
|
||||
/** The distribution directory */
|
||||
var distPath = path.join(basePath, 'dist');
|
||||
|
||||
/** Load other modules */
|
||||
var preprocess = require(path.join(__dirname, 'pre-compile')),
|
||||
postprocess = require(path.join(__dirname, 'post-compile')),
|
||||
uglifyJS = require(path.join(basePath, 'vendor', 'uglifyjs', 'uglify-js'));
|
||||
|
||||
/** Closure Compiler command-line options */
|
||||
var closureOptions = [
|
||||
'--compilation_level=ADVANCED_OPTIMIZATIONS',
|
||||
'--language_in=ECMASCRIPT5_STRICT',
|
||||
'--warning_level=QUIET'
|
||||
];
|
||||
|
||||
/** Reassign `existsSync` for older versions of Node */
|
||||
fs.existsSync || (fs.existsSync = path.existsSync);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The exposed `minify` function minifies a given `source` and invokes the
|
||||
* `onComplete` callback when finished.
|
||||
*
|
||||
* @param {String} source The source to minify.
|
||||
* @param {String} workingName The name to give temporary files creates during the minification process.
|
||||
* @param {Function} onComplete A function called when minification has completed.
|
||||
*/
|
||||
function minify(source, workingName, onComplete) {
|
||||
new Minify(source, workingName, onComplete);
|
||||
}
|
||||
|
||||
/**
|
||||
* The Minify constructor used to keep state of each `minify` invocation.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {String} source The source to minify.
|
||||
* @param {String} workingName The name to give temporary files creates during the minification process.
|
||||
* @param {Function} onComplete A function called when minification has completed.
|
||||
*/
|
||||
function Minify(source, workingName, onComplete) {
|
||||
// create the destination directory if it doesn't exist
|
||||
if (!fs.existsSync(distPath)) {
|
||||
fs.mkdirSync(distPath);
|
||||
}
|
||||
|
||||
this.compiled = {};
|
||||
this.hybrid = {};
|
||||
this.uglified = {};
|
||||
this.onComplete = onComplete;
|
||||
this.source = source = preprocess(source);
|
||||
this.workingName = workingName;
|
||||
|
||||
// begin the minification process
|
||||
closureCompile.call(this, source, onClosureCompile.bind(this));
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Compresses a `source` string using the Closure Compiler. Yields the
|
||||
* minified result, and any exceptions encountered, to a `callback` function.
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The JavaScript source to minify.
|
||||
* @param {String} [message] The message to log.
|
||||
* @param {Function} callback The function to call once the process completes.
|
||||
*/
|
||||
function closureCompile(source, message, callback) {
|
||||
// the standard error stream, standard output stream, and Closure Compiler process
|
||||
var error = '',
|
||||
output = '',
|
||||
compiler = spawn('java', ['-jar', closurePath].concat(closureOptions));
|
||||
|
||||
// juggle arguments
|
||||
if (typeof message == 'function') {
|
||||
callback = message;
|
||||
message = null;
|
||||
}
|
||||
|
||||
console.log(message == null
|
||||
? 'Compressing ' + this.workingName + ' using the Closure Compiler...'
|
||||
: message
|
||||
);
|
||||
|
||||
compiler.stdout.on('data', function(data) {
|
||||
// append the data to the output stream
|
||||
output += data;
|
||||
});
|
||||
|
||||
compiler.stderr.on('data', function(data) {
|
||||
// append the error message to the error stream
|
||||
error += data;
|
||||
});
|
||||
|
||||
compiler.on('exit', function(status) {
|
||||
var exception = null;
|
||||
|
||||
// `status` contains the process exit code
|
||||
if (status) {
|
||||
exception = new Error(error);
|
||||
exception.status = status;
|
||||
}
|
||||
callback(exception, output);
|
||||
});
|
||||
|
||||
// proxy the standard input to the Closure Compiler
|
||||
compiler.stdin.end(source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compresses a `source` string using UglifyJS. Yields the result to a
|
||||
* `callback` function. This function is synchronous; the `callback` is used
|
||||
* for symmetry.
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The JavaScript source to minify.
|
||||
* @param {String} [message] The message to log.
|
||||
* @param {Function} callback The function to call once the process completes.
|
||||
*/
|
||||
function uglify(source, message, callback) {
|
||||
var exception,
|
||||
result,
|
||||
ugly = uglifyJS.uglify;
|
||||
|
||||
// juggle arguments
|
||||
if (typeof message == 'function') {
|
||||
callback = message;
|
||||
message = null;
|
||||
}
|
||||
|
||||
console.log(message == null
|
||||
? 'Compressing ' + this.workingName + ' using UglifyJS...'
|
||||
: message
|
||||
);
|
||||
|
||||
try {
|
||||
result = ugly.gen_code(
|
||||
// enable unsafe transformations
|
||||
ugly.ast_squeeze_more(
|
||||
ugly.ast_squeeze(
|
||||
// munge variable and function names, excluding the special `define`
|
||||
// function exposed by AMD loaders
|
||||
ugly.ast_mangle(uglifyJS.parser.parse(source), {
|
||||
'except': ['define']
|
||||
}
|
||||
))), {
|
||||
'ascii_only': true
|
||||
});
|
||||
} catch(e) {
|
||||
exception = e;
|
||||
}
|
||||
// lines are restricted to 500 characters for consistency with the Closure Compiler
|
||||
callback(exception, result && ugly.split_lines(result, 500));
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The `closureCompile()` callback.
|
||||
*
|
||||
* @private
|
||||
* @param {Object|Undefined} exception The error object.
|
||||
* @param {String} result The resulting minified source.
|
||||
*/
|
||||
function onClosureCompile(exception, result) {
|
||||
if (exception) {
|
||||
throw exception;
|
||||
}
|
||||
// store the post-processed Closure Compiler result and gzip it
|
||||
this.compiled.source = result = postprocess(result);
|
||||
gzip(result, onClosureGzip.bind(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* The Closure Compiler `gzip` callback.
|
||||
*
|
||||
* @private
|
||||
* @param {Object|Undefined} exception The error object.
|
||||
* @param {Buffer} result The resulting gzipped source.
|
||||
*/
|
||||
function onClosureGzip(exception, result) {
|
||||
if (exception) {
|
||||
throw exception;
|
||||
}
|
||||
// store the gzipped result and report the size
|
||||
this.compiled.gzip = result;
|
||||
console.log('Done. Size: %d bytes.', result.length);
|
||||
|
||||
// next, minify the source using only UglifyJS
|
||||
uglify.call(this, this.source, onUglify.bind(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* The `uglify()` callback.
|
||||
*
|
||||
* @private
|
||||
* @param {Object|Undefined} exception The error object.
|
||||
* @param {String} result The resulting minified source.
|
||||
*/
|
||||
function onUglify(exception, result) {
|
||||
if (exception) {
|
||||
throw exception;
|
||||
}
|
||||
// store the post-processed Uglified result and gzip it
|
||||
this.uglified.source = result = postprocess(result);
|
||||
gzip(result, onUglifyGzip.bind(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* The UglifyJS `gzip` callback.
|
||||
*
|
||||
* @private
|
||||
* @param {Object|Undefined} exception The error object.
|
||||
* @param {Buffer} result The resulting gzipped source.
|
||||
*/
|
||||
function onUglifyGzip(exception, result) {
|
||||
if (exception) {
|
||||
throw exception;
|
||||
}
|
||||
var message = 'Compressing ' + this.workingName + ' using hybrid minification...';
|
||||
|
||||
// store the gzipped result and report the size
|
||||
this.uglified.gzip = result;
|
||||
console.log('Done. Size: %d bytes.', result.length);
|
||||
|
||||
// next, minify the Closure Compiler minified source using UglifyJS
|
||||
uglify.call(this, this.compiled.source, message, onHybrid.bind(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* The hybrid `uglify()` callback.
|
||||
*
|
||||
* @private
|
||||
* @param {Object|Undefined} exception The error object.
|
||||
* @param {String} result The resulting minified source.
|
||||
*/
|
||||
function onHybrid(exception, result) {
|
||||
if (exception) {
|
||||
throw exception;
|
||||
}
|
||||
// store the post-processed Uglified result and gzip it
|
||||
this.hybrid.source = result = postprocess(result);
|
||||
gzip(result, onHybridGzip.bind(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* The hybrid `gzip` callback.
|
||||
*
|
||||
* @private
|
||||
* @param {Object|Undefined} exception The error object.
|
||||
* @param {Buffer} result The resulting gzipped source.
|
||||
*/
|
||||
function onHybridGzip(exception, result) {
|
||||
if (exception) {
|
||||
throw exception;
|
||||
}
|
||||
// store the gzipped result and report the size
|
||||
this.hybrid.gzip = result;
|
||||
console.log('Done. Size: %d bytes.', result.length);
|
||||
|
||||
// finish by choosing the smallest compressed file
|
||||
onComplete.call(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* The callback executed after JavaScript source is minified and gzipped.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function onComplete() {
|
||||
var compiled = this.compiled,
|
||||
hybrid = this.hybrid,
|
||||
name = this.workingName,
|
||||
uglified = this.uglified;
|
||||
|
||||
// save the Closure Compiled version to disk
|
||||
fs.writeFileSync(path.join(distPath, name + '.compiler.js'), compiled.source);
|
||||
fs.writeFileSync(path.join(distPath, name + '.compiler.js.gz'), compiled.gzip);
|
||||
|
||||
// save the Uglified version to disk
|
||||
fs.writeFileSync(path.join(distPath, name + '.uglify.js'), uglified.source);
|
||||
fs.writeFileSync(path.join(distPath, name + '.uglify.js.gz'), uglified.gzip);
|
||||
|
||||
// save the hybrid minified version to disk
|
||||
fs.writeFileSync(path.join(distPath, name + '.hybrid.js'), hybrid.source);
|
||||
fs.writeFileSync(path.join(distPath, name + '.hybrid.js.gz'), hybrid.gzip);
|
||||
|
||||
// select the smallest gzipped file and use its minified counterpart as the
|
||||
// official minified release (ties go to Closure Compiler)
|
||||
var min = Math.min(compiled.gzip.length, hybrid.gzip.length, uglified.gzip.length);
|
||||
|
||||
// pass the minified source to the minify instances "onComplete" callback
|
||||
this.onComplete(
|
||||
compiled.gzip.length == min
|
||||
? compiled.source
|
||||
: uglified.gzip.length == min
|
||||
? uglified.source
|
||||
: hybrid.source
|
||||
);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose `minify`
|
||||
if (module != require.main) {
|
||||
module.exports = minify;
|
||||
}
|
||||
else {
|
||||
// read the JavaScript source file from the first argument if the script
|
||||
// was invoked directly (e.g. `node minify.js source.js`) and write to
|
||||
// the same file
|
||||
(function() {
|
||||
var filePath = process.argv[2],
|
||||
dirPath = path.dirname(filePath),
|
||||
source = fs.readFileSync(filePath, 'utf8'),
|
||||
workingName = path.basename(filePath, '.js') + '.min';
|
||||
|
||||
minify(source, workingName, function(result) {
|
||||
fs.writeFileSync(path.join(dirPath, workingName + '.js'), result);
|
||||
});
|
||||
}());
|
||||
}
|
||||
}());
|
||||
@@ -1,67 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
;(function() {
|
||||
'use strict';
|
||||
|
||||
/** The Node filesystem module */
|
||||
var fs = require('fs');
|
||||
|
||||
/** The minimal license/copyright template */
|
||||
var licenseTemplate =
|
||||
'/*!\n' +
|
||||
' Lo-Dash @VERSION lodash.com/license\n' +
|
||||
' Underscore.js 1.3.3 github.com/documentcloud/underscore/blob/master/LICENSE\n' +
|
||||
'*/';
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Post-process a given minified JavaScript `source`, preparing it for
|
||||
* deployment.
|
||||
*
|
||||
* @param {String} source The source to process.
|
||||
* @returns {String} Returns the processed source.
|
||||
*/
|
||||
function postprocess(source) {
|
||||
// exit early if snippet isn't found
|
||||
var snippet = /VERSION\s*[=:]\s*([\'"])(.*?)\1/.exec(source);
|
||||
if (!snippet) {
|
||||
return source;
|
||||
}
|
||||
|
||||
// set the version
|
||||
var license = licenseTemplate.replace('@VERSION', snippet[2]);
|
||||
|
||||
// move vars exposed by Closure Compiler into the IIFE
|
||||
source = source.replace(/^([^(\n]+)\s*(\(function[^)]+\){)/, '$2$1');
|
||||
|
||||
// use double quotes consistently
|
||||
source = source.replace(/'use strict'/, '"use strict"');
|
||||
|
||||
// unescape properties (i.e. foo["bar"] => foo.bar)
|
||||
source = source.replace(/(\w)\["([^."]+)"\]/g, '$1.$2');
|
||||
|
||||
// correct AMD module definition for AMD build optimizers
|
||||
source = source.replace(/("function")==(typeof define)&&\(?("object")==(typeof define\.amd)(&&define\.amd)\)?/, '$2==$1&&$4==$3$5');
|
||||
|
||||
// add license
|
||||
source = license + '\n;' + source;
|
||||
|
||||
// add trailing semicolon
|
||||
return source.replace(/[\s;]*$/, ';');
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose `postprocess`
|
||||
if (module != require.main) {
|
||||
module.exports = postprocess;
|
||||
} else {
|
||||
// read the JavaScript source file from the first argument if the script
|
||||
// was invoked directly (e.g. `node post-compile.js source.js`) and write to
|
||||
// the same file
|
||||
(function() {
|
||||
var source = fs.readFileSync(process.argv[2], 'utf8');
|
||||
fs.writeFileSync(process.argv[2], postprocess(source), 'utf8');
|
||||
}());
|
||||
}
|
||||
}());
|
||||
@@ -1,339 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
;(function() {
|
||||
'use strict';
|
||||
|
||||
/** The Node filesystem module */
|
||||
var fs = require('fs');
|
||||
|
||||
/** Used to minify variables embedded in compiled strings */
|
||||
var compiledVars = [
|
||||
'accumulator',
|
||||
'arrayClass',
|
||||
'callback',
|
||||
'className',
|
||||
'collection',
|
||||
'ctor',
|
||||
'false',
|
||||
'funcClass',
|
||||
'hasOwnProperty',
|
||||
'identity',
|
||||
'index',
|
||||
'iteratorBind',
|
||||
'length',
|
||||
'object',
|
||||
'objectTypes',
|
||||
'noaccum',
|
||||
'property',
|
||||
'result',
|
||||
'skipProto',
|
||||
'source',
|
||||
'sourceIndex',
|
||||
'stringClass',
|
||||
'target',
|
||||
'thisArg',
|
||||
'toString',
|
||||
'true',
|
||||
'undefined',
|
||||
'value'
|
||||
];
|
||||
|
||||
/** Used to minify `compileIterator` option properties */
|
||||
var iteratorOptions = [
|
||||
'args',
|
||||
'array',
|
||||
'arrayBranch',
|
||||
'beforeLoop',
|
||||
'bottom',
|
||||
'exit',
|
||||
'firstArg',
|
||||
'hasExp',
|
||||
'hasDontEnumBug',
|
||||
'inLoop',
|
||||
'init',
|
||||
'iteratedObject',
|
||||
'loopExp',
|
||||
'object',
|
||||
'objectBranch',
|
||||
'shadowed',
|
||||
'top',
|
||||
'useHas'
|
||||
];
|
||||
|
||||
/** Used to minify variables and string values to a single character */
|
||||
var minNames = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
|
||||
|
||||
/** Used to protect the specified properties from getting minified */
|
||||
var propWhitelist = [
|
||||
'_',
|
||||
'_chain',
|
||||
'_wrapped',
|
||||
'after',
|
||||
'all',
|
||||
'amd',
|
||||
'any',
|
||||
'bind',
|
||||
'bindAll',
|
||||
'chain',
|
||||
'clearTimeout',
|
||||
'clone',
|
||||
'collect',
|
||||
'compact',
|
||||
'compose',
|
||||
'contains',
|
||||
'criteria',
|
||||
'debounce',
|
||||
'defaults',
|
||||
'defer',
|
||||
'delay',
|
||||
'detect',
|
||||
'difference',
|
||||
'each',
|
||||
'environment',
|
||||
'escape',
|
||||
'escape',
|
||||
'evaluate',
|
||||
'every',
|
||||
'extend',
|
||||
'filter',
|
||||
'find',
|
||||
'first',
|
||||
'flatten',
|
||||
'foldl',
|
||||
'foldr',
|
||||
'forEach',
|
||||
'forIn',
|
||||
'forOwn',
|
||||
'functions',
|
||||
'groupBy',
|
||||
'has',
|
||||
'head',
|
||||
'identity',
|
||||
'include',
|
||||
'indexOf',
|
||||
'initial',
|
||||
'inject',
|
||||
'interpolate',
|
||||
'intersection',
|
||||
'invoke',
|
||||
'isArguments',
|
||||
'isArray',
|
||||
'isBoolean',
|
||||
'isDate',
|
||||
'isElement',
|
||||
'isEmpty',
|
||||
'isEqual',
|
||||
'isEqual',
|
||||
'isFinite',
|
||||
'isFinite',
|
||||
'isFunction',
|
||||
'isNaN',
|
||||
'isNull',
|
||||
'isNumber',
|
||||
'isObject',
|
||||
'isRegExp',
|
||||
'isString',
|
||||
'isUndefined',
|
||||
'keys',
|
||||
'last',
|
||||
'lastIndexOf',
|
||||
'map',
|
||||
'max',
|
||||
'memoize',
|
||||
'methods',
|
||||
'min',
|
||||
'mixin',
|
||||
'noConflict',
|
||||
'once',
|
||||
'opera',
|
||||
'partial',
|
||||
'pick',
|
||||
'pluck',
|
||||
'range',
|
||||
'reduce',
|
||||
'reduceRight',
|
||||
'reject',
|
||||
'rest',
|
||||
'result',
|
||||
'select',
|
||||
'setTimeout',
|
||||
'shuffle',
|
||||
'size',
|
||||
'some',
|
||||
'sortBy',
|
||||
'sortedIndex',
|
||||
'source',
|
||||
'tail',
|
||||
'take',
|
||||
'tap',
|
||||
'template',
|
||||
'templateSettings',
|
||||
'throttle',
|
||||
'times',
|
||||
'toArray',
|
||||
'union',
|
||||
'uniq',
|
||||
'unique',
|
||||
'uniqueId',
|
||||
'value',
|
||||
'values',
|
||||
'variable',
|
||||
'VERSION',
|
||||
'without',
|
||||
'wrap',
|
||||
'zip'
|
||||
];
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Pre-process a given JavaScript `source`, preparing it for minification.
|
||||
*
|
||||
* @param {String} source The source to process.
|
||||
* @returns {String} Returns the processed source.
|
||||
*/
|
||||
function preprocess(source) {
|
||||
// remove copyright to add later in post-compile.js
|
||||
source = source.replace(/\/\*![\s\S]+?\*\//, '');
|
||||
|
||||
// remove unrecognized JSDoc tags so Closure Compiler won't complain
|
||||
source = source.replace(/@(?:alias|category)\b.*/g, '');
|
||||
|
||||
// add brackets to whitelisted properties so Closure Compiler won't mung them
|
||||
// http://code.google.com/closure/compiler/docs/api-tutorial3.html#export
|
||||
source = source.replace(RegExp('\\.(' + propWhitelist.join('|') + ')\\b', 'g'), "['$1']");
|
||||
|
||||
// remove brackets from `_.escape(__t)` in `tokenizeEscape`
|
||||
source = source.replace("_['escape'](__t)", '_.escape(__t)');
|
||||
|
||||
// remove whitespace from string literals
|
||||
source = source.replace(/'(?:(?=(\\?))\1.)*?'/g, function(string) {
|
||||
// avoids removing the '\n' of the `stringEscapes` object
|
||||
return string.replace(/\[object |else if|function | in |return\s+[\w']|throw |typeof |use strict|var |@ |'\\n'|\\\\n|\\n|\s+/g, function(match) {
|
||||
return match == false || match == '\\n' ? '' : match;
|
||||
});
|
||||
});
|
||||
|
||||
// remove newline from double-quoted string in `_.template`
|
||||
source = source.replace('"\';\\n"', '"\';"');
|
||||
|
||||
// remove debug sourceURL in `_.template`
|
||||
source = source.replace(/\+(?:\s*\/\/.*)*\s*'\/\/@ sourceURL=[^;]+/, '');
|
||||
|
||||
// minify `_.sortBy` internal properties
|
||||
(function() {
|
||||
var properties = ['criteria', 'value'],
|
||||
snippet = (source.match(/( +)function sortBy\b[\s\S]+?\n\1}/) || 0)[0],
|
||||
result = snippet;
|
||||
|
||||
if (snippet) {
|
||||
// minify property strings
|
||||
properties.forEach(function(property, index) {
|
||||
result = result.replace(RegExp("'" + property + "'", 'g'), "'" + minNames[index] + "'");
|
||||
});
|
||||
// replace with modified snippet
|
||||
source = source.replace(snippet, result);
|
||||
}
|
||||
}());
|
||||
|
||||
// minify all compilable snippets
|
||||
var snippets = source.match(
|
||||
RegExp([
|
||||
// match the `iteratorTemplate`
|
||||
'var iteratorTemplate\\b[\\s\\S]+?\\);\\n',
|
||||
// match methods created by `createIterator` calls
|
||||
'createIterator\\((?:{|[a-zA-Z]+)[\\s\\S]+?\\);\\n',
|
||||
// match variables storing `createIterator` options
|
||||
'( +)var [a-zA-Z]+IteratorOptions\\b[\\s\\S]+?\\n\\1}',
|
||||
// match the the `createIterator` function
|
||||
'( +)function createIterator\\b[\\s\\S]+?\\n\\2}'
|
||||
].join('|'), 'g')
|
||||
);
|
||||
|
||||
// exit early if no compilable snippets
|
||||
if (!snippets) {
|
||||
return source;
|
||||
}
|
||||
|
||||
snippets.forEach(function(snippet, index) {
|
||||
var isCreateIterator = /function createIterator\b/.test(snippet),
|
||||
isIteratorTemplate = /var iteratorTemplate\b/.test(snippet),
|
||||
result = snippet;
|
||||
|
||||
|
||||
// add brackets to whitelisted properties so Closure Compiler won't mung them
|
||||
result = result.replace(RegExp('\\.(' + iteratorOptions.join('|') + ')\\b', 'g'), "['$1']");
|
||||
|
||||
if (isCreateIterator) {
|
||||
// add `true` and `false` arguments to be minified
|
||||
result = result
|
||||
.replace(/(Function\(\s*'[\s\S]+?)undefined/, '$1true,false,undefined')
|
||||
.replace(/factory\([^)]+/, '$&,true,false');
|
||||
|
||||
// replace with modified snippet early and clip snippet so other arguments
|
||||
// aren't minified
|
||||
source = source.replace(snippet, result);
|
||||
snippet = result = result.replace(/factory\([\s\S]+$/, '');
|
||||
}
|
||||
|
||||
// minify snippet variables / arguments
|
||||
compiledVars.forEach(function(variable, index) {
|
||||
// ensure properties in compiled strings aren't minified
|
||||
result = result.replace(RegExp('([^.]\\b)' + variable + '\\b(?!\' *[\\]:])', 'g'), '$1' + minNames[index]);
|
||||
|
||||
// correct `typeof x == 'object'`
|
||||
if (variable == 'object') {
|
||||
result = result.replace(RegExp("(typeof [^']+')" + minNames[index] + "'", 'g'), "$1object'");
|
||||
}
|
||||
// correct external boolean literals
|
||||
else if (variable == 'true' || variable == 'false') {
|
||||
result = result
|
||||
.replace(RegExp(': *' + minNames[index] + '([,\\n])', 'g'), ':' + variable + '$1')
|
||||
.replace(RegExp('\\b' + minNames[index] + ';', 'g'), variable + ';');
|
||||
}
|
||||
});
|
||||
|
||||
// minify `createIterator` option property names
|
||||
iteratorOptions.forEach(function(property, index) {
|
||||
if (isIteratorTemplate) {
|
||||
// minify property names as interpolated template variables
|
||||
result = result.replace(RegExp('\\b' + property + '\\b', 'g'), minNames[index]);
|
||||
}
|
||||
else {
|
||||
if (property == 'array' || property == 'object') {
|
||||
// minify "array" and "object" sub property names
|
||||
result = result.replace(RegExp("'" + property + "'( *[\\]:])", 'g'), "'" + minNames[index] + "'$1");
|
||||
}
|
||||
else {
|
||||
// minify property name strings
|
||||
result = result.replace(RegExp("'" + property + "'", 'g'), "'" + minNames[index] + "'");
|
||||
// minify property names in regexps and accessors
|
||||
if (isCreateIterator) {
|
||||
result = result.replace(RegExp('([\\.|/])' + property + '\\b' , 'g'), '$1' + minNames[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// replace with modified snippet
|
||||
source = source.replace(snippet, result);
|
||||
});
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose `preprocess`
|
||||
if (module != require.main) {
|
||||
module.exports = preprocess;
|
||||
}
|
||||
else {
|
||||
// read the JavaScript source file from the first argument if the script
|
||||
// was invoked directly (e.g. `node pre-compile.js source.js`) and write to
|
||||
// the same file
|
||||
(function() {
|
||||
var source = fs.readFileSync(process.argv[2], 'utf8');
|
||||
fs.writeFileSync(process.argv[2], preprocess(source), 'utf8');
|
||||
}());
|
||||
}
|
||||
}());
|
||||
12
component.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"repo": "lodash/lodash",
|
||||
"version": "2.2.0",
|
||||
"description": "A utility library delivering consistency, customization, performance, & extras.",
|
||||
"license": "MIT",
|
||||
"keywords": ["amd", "browser", "client", "customize", "functional", "performance", "server", "speed", "util"],
|
||||
"scripts": [
|
||||
"index.js",
|
||||
"dist/lodash.compat.js"
|
||||
]
|
||||
}
|
||||
6704
dist/lodash.compat.js
vendored
Normal file
56
dist/lodash.compat.min.js
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.2.0 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
*/
|
||||
;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++e<r;)if(n[e]===t)return e;return-1}function t(t,e){var r=typeof e;if(t=t.l,"boolean"==r||null==e)return t[e]?0:-1;"number"!=r&&"string"!=r&&(r="object");var u="number"==r?e:_+e;return t=(t=t[r])&&t[u],"object"==r?t&&-1<n(t,e)?0:-1:t?0:-1}function e(n){var t=this.l,e=typeof n;if("boolean"==e||null==n)t[n]=!0;else{"number"!=e&&"string"!=e&&(e="object");var r="number"==e?n:_+n,t=t[e]||(t[e]={});"object"==e?(t[r]||(t[r]=[])).push(n):t[r]=!0
|
||||
}}function r(n){return n.charCodeAt(0)}function u(n,t){var e=n.m,r=t.m;if(e!==r){if(e>r||typeof e=="undefined")return 1;if(e<r||typeof r=="undefined")return-1}return n.n-t.n}function o(n){var t=-1,r=n.length,u=n[0],o=n[0|r/2],a=n[r-1];if(u&&typeof u=="object"&&o&&typeof o=="object"&&a&&typeof a=="object")return!1;for(u=l(),u["false"]=u["null"]=u["true"]=u.undefined=!1,o=l(),o.k=n,o.l=u,o.push=e;++t<r;)o.push(n[t]);return o}function a(n){return"\\"+Z[n]}function i(){return y.pop()||[]}function l(){return m.pop()||{k:null,l:null,m:null,"false":!1,n:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,o:null}
|
||||
}function f(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function c(){}function p(n){n.length=0,y.length<j&&y.push(n)}function s(n){var t=n.l;t&&s(t),n.k=n.l=n.m=n.object=n.number=n.string=n.o=null,m.length<j&&m.push(n)}function g(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function h(e){function y(n){return n&&typeof n=="object"&&!Je(n)&&de.call(n,"__wrapped__")?n:new m(n)}function m(n,t){this.__chain__=!!t,this.__wrapped__=n
|
||||
}function j(n,t,e,r,u){if(e){var o=e(n);if(typeof o!="undefined")return o}if(!_t(n))return n;var a=ke.call(n);if(!U[a]||!We.nodeClass&&f(n))return n;var l=qe[a];switch(a){case z:case q:return new l(+n);case G:case H:return new l(n);case M:return o=l(n.source,I.exec(n)),o.lastIndex=n.lastIndex,o}if(a=Je(n),t){var c=!r;r||(r=i()),u||(u=i());for(var s=r.length;s--;)if(r[s]==n)return u[s];o=a?l(n.length):{}}else o=a?g(n):er({},n);return a&&(de.call(n,"index")&&(o.index=n.index),de.call(n,"input")&&(o.input=n.input)),t?(r.push(n),u.push(o),(a?tr:or)(n,function(n,a){o[a]=j(n,t,e,r,u)
|
||||
}),c&&(p(r),p(u)),o):o}function Z(n,t,e){if(typeof n!="function")return Ht;if(typeof t=="undefined")return n;var r=n.__bindData__||We.funcNames&&!n.name;if(typeof r=="undefined"){var u=P&&ye.call(n);We.funcNames||!u||A.test(u)||(r=!0),(We.funcNames||!r)&&(r=!We.funcDecomp||P.test(u),Ge(n,r))}if(true!==r&&r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)
|
||||
}}return Gt(n,t)}function tt(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r<u;){var a=n[r];if(a&&typeof a=="object"&&typeof a.length=="number"&&(Je(a)||vt(a))){t||(a=tt(a,t,e));var i=-1,l=a.length,f=o.length;for(o.length+=l;++i<l;)o[f++]=a[i]}else e||o.push(a)}return o}function et(n,t,e,r,u,o){if(e){var a=e(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;if(n===n&&!(n&&Y[typeof n]||t&&Y[typeof t]))return!1;if(null==n||null==t)return n===t;var l=ke.call(n),c=ke.call(t);
|
||||
if(l==L&&(l=J),c==L&&(c=J),l!=c)return!1;switch(l){case z:case q:return+n==+t;case G:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case M:case H:return n==oe(t)}if(c=l==T,!c){if(de.call(n,"__wrapped__")||de.call(t,"__wrapped__"))return et(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(l!=J||!We.nodeClass&&(f(n)||f(t)))return!1;var l=!We.argsObject&&vt(n)?re:n.constructor,s=!We.argsObject&&vt(t)?re:t.constructor;if(l!=s&&!(bt(l)&&l instanceof l&&bt(s)&&s instanceof s))return!1}for(s=!u,u||(u=i()),o||(o=i()),l=u.length;l--;)if(u[l]==n)return o[l]==t;
|
||||
var g=0,a=!0;if(u.push(n),o.push(t),c){if(l=n.length,g=t.length,a=g==n.length,!a&&!r)return a;for(;g--;)if(c=l,s=t[g],r)for(;c--&&!(a=et(n[c],s,e,r,u,o)););else if(!(a=et(n[g],s,e,r,u,o)))break;return a}return ur(t,function(t,i,l){return de.call(l,i)?(g++,a=de.call(n,i)&&et(n[i],t,e,r,u,o)):void 0}),a&&!r&&ur(n,function(n,t,e){return de.call(e,t)?a=-1<--g:void 0}),s&&(p(u),p(o)),a}function ut(n,t,e,r,u){(Je(t)?St:or)(t,function(t,o){var a,i,l=t,f=n[o];if(t&&((i=Je(t))||ar(t))){for(l=r.length;l--;)if(a=r[l]==t){f=u[l];
|
||||
break}if(!a){var c;e&&(l=e(f,t),c=typeof l!="undefined")&&(f=l),c||(f=i?Je(f)?f:[]:ar(f)?f:{}),r.push(t),u.push(f),c||ut(f,t,e,r,u)}}else e&&(l=e(f,t),typeof l=="undefined"&&(l=t)),typeof l!="undefined"&&(f=l);n[o]=f})}function at(e,r,u){var a=-1,l=st(),f=e?e.length:0,c=[],g=!r&&f>=w&&l===n,h=u||g?i():c;if(g){var v=o(h);v?(l=t,h=v):(g=!1,h=u?h:(p(h),c))}for(;++a<f;){var v=e[a],y=u?u(v,a,e):v;(r?!a||h[h.length-1]!==y:0>l(h,y))&&((u||g)&&h.push(y),c.push(v))}return g?(p(h.k),s(h)):u&&p(h),c}function it(n){return function(t,e,r){var u={};
|
||||
if(e=y.createCallback(e,r,3),Je(t)){r=-1;for(var o=t.length;++r<o;){var a=t[r];n(u,a,e(a,r,t),t)}}else tr(t,function(t,r,o){n(u,t,e(t,r,o),o)});return u}}function lt(n,t,e,r,u,o){var a=1&t,i=2&t,l=4&t,f=8&t,c=16&t,p=32&t,s=n;if(!i&&!bt(n))throw new ae;c&&!e.length&&(t&=-17,c=e=!1),p&&!r.length&&(t&=-33,p=r=!1);var g=n&&n.__bindData__;if(g)return!a||1&g[1]||(g[4]=u),!a&&1&g[1]&&(t|=8),!l||4&g[1]||(g[5]=o),c&&_e.apply(g[2]||(g[2]=[]),e),p&&_e.apply(g[3]||(g[3]=[]),r),g[1]|=t,lt.apply(null,g);if(!a||i||l||p||!(We.fastBind||Se&&c))v=function(){var g=arguments,h=a?u:this;
|
||||
return(l||c||p)&&(g=Le.call(g),c&&Ee.apply(g,e),p&&_e.apply(g,r),l&&g.length<o)?(t|=16,lt(n,f?t:-4&t,g,null,u,o)):(i&&(n=h[s]),this instanceof v?(h=ct(n.prototype),g=n.apply(h,g),_t(g)?g:h):n.apply(h,g))};else{if(c){var h=[u];_e.apply(h,e)}var v=c?Se.apply(n,h):Se.call(n,u)}return Ge(v,Le.call(arguments)),v}function ft(){X.h=$,X.b=X.c=X.g=X.i="",X.e="t",X.j=!0;for(var n,t=0;n=arguments[t];t++)for(var e in n)X[e]=n[e];t=X.a,X.d=/^[^,]+/.exec(t)[0],n=ne,t="return function("+t+"){",e=X;var r="var n,t="+e.d+",E="+e.e+";if(!t)return E;"+e.i+";";
|
||||
e.b?(r+="var u=t.length;n=-1;if("+e.b+"){",We.unindexedChars&&(r+="if(s(t)){t=t.split('')}"),r+="while(++n<u){"+e.g+";}}else{"):We.nonEnumArgs&&(r+="var u=t.length;n=-1;if(u&&p(t)){while(++n<u){n+='';"+e.g+";}}else{"),We.enumPrototypes&&(r+="var G=typeof t=='function';"),We.enumErrorProps&&(r+="var F=t===k||t instanceof Error;");var u=[];if(We.enumPrototypes&&u.push('!(G&&n=="prototype")'),We.enumErrorProps&&u.push('!(F&&(n=="message"||n=="name"))'),e.j&&e.f)r+="var C=-1,D=B[typeof t]&&v(t),u=D?D.length:0;while(++C<u){n=D[C];",u.length&&(r+="if("+u.join("&&")+"){"),r+=e.g+";",u.length&&(r+="}"),r+="}";
|
||||
else if(r+="for(n in t){",e.j&&u.push("m.call(t, n)"),u.length&&(r+="if("+u.join("&&")+"){"),r+=e.g+";",u.length&&(r+="}"),r+="}",We.nonEnumShadows){for(r+="if(t!==A){var i=t.constructor,r=t===(i&&i.prototype),f=t===J?I:t===k?j:L.call(t),x=y[f];",k=0;7>k;k++)r+="n='"+e.h[k]+"';if((!(r&&x[n])&&m.call(t,n))",e.j||(r+="||(!x[n]&&t[n]!==A[n])"),r+="){"+e.g+"}";r+="}"}return(e.b||We.nonEnumArgs)&&(r+="}"),r+=e.c+";return E",n("d,j,k,m,o,p,q,s,v,A,B,y,I,J,L",t+r+"}")(Z,K,le,de,b,vt,Je,jt,X.f,fe,Y,Ke,H,ce,ke)
|
||||
}function ct(n){return _t(n)?Ie(n):{}}function pt(n){return Xe[n]}function st(){var t=(t=y.indexOf)===Lt?n:t;return t}function gt(n){var t,e;return!n||ke.call(n)!=J||(t=n.constructor,bt(t)&&!(t instanceof t))||!We.argsClass&&vt(n)||!We.nodeClass&&f(n)?!1:We.ownLast?(ur(n,function(n,t,r){return e=de.call(r,t),!1}),false!==e):(ur(n,function(n,t){e=t}),typeof e=="undefined"||de.call(n,e))}function ht(n){return Ye[n]}function vt(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ke.call(n)==L||!1
|
||||
}function yt(n,t,e){var r=He(n),u=r.length;for(t=Z(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function mt(n){var t=[];return ur(n,function(n,e){bt(n)&&t.push(e)}),t.sort()}function dt(n){for(var t=-1,e=He(n),r=e.length,u={};++t<r;){var o=e[t];u[n[o]]=o}return u}function bt(n){return typeof n=="function"}function _t(n){return!(!n||!Y[typeof n])}function wt(n){return typeof n=="number"||ke.call(n)==G}function jt(n){return typeof n=="string"||ke.call(n)==H}function xt(n){for(var t=-1,e=He(n),r=e.length,u=Xt(r);++t<r;)u[t]=n[e[t]];
|
||||
return u}function Ct(n,t,e){var r=-1,u=st(),o=n?n.length:0,a=!1;return e=(0>e?Pe(0,o+e):e)||0,Je(n)?a=-1<u(n,t,e):typeof o=="number"?a=-1<(jt(n)?n.indexOf(t,e):u(n,t,e)):tr(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function kt(n,t,e){var r=!0;if(t=y.createCallback(t,e,3),Je(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else tr(n,function(n,e,u){return r=!!t(n,e,u)});return r}function Et(n,t,e){var r=[];if(t=y.createCallback(t,e,3),Je(n)){e=-1;for(var u=n.length;++e<u;){var o=n[e];
|
||||
t(o,e,n)&&r.push(o)}}else tr(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function Ot(n,t,e){if(t=y.createCallback(t,e,3),!Je(n)){var r;return tr(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}e=-1;for(var u=n.length;++e<u;){var o=n[e];if(t(o,e,n))return o}}function St(n,t,e){if(t&&typeof e=="undefined"&&Je(n)){e=-1;for(var r=n.length;++e<r&&false!==t(n[e],e,n););}else tr(n,t,e);return n}function It(n,t,e){var r=n,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:Z(t,e,3),Je(n))for(;u--&&false!==t(n[u],u,n););else{if(typeof u!="number")var o=He(n),u=o.length;
|
||||
else We.unindexedChars&&jt(n)&&(r=n.split(""));tr(n,function(n,e,a){return e=o?o[--u]:--u,t(r[e],e,a)})}return n}function At(n,t,e){var r=-1,u=n?n.length:0,o=Xt(typeof u=="number"?u:0);if(t=y.createCallback(t,e,3),Je(n))for(;++r<u;)o[r]=t(n[r],r,n);else tr(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function Nt(n,t,e){var u=-1/0,o=u;if(!t&&Je(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i>o&&(o=i)}}else t=!t&&jt(n)?r:y.createCallback(t,e,3),tr(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o
|
||||
}function Bt(n,t,e,r){var u=3>arguments.length;if(t=Z(t,r,4),Je(n)){var o=-1,a=n.length;for(u&&(e=n[++o]);++o<a;)e=t(e,n[o],o,n)}else tr(n,function(n,r,o){e=u?(u=!1,n):t(e,n,r,o)});return e}function Dt(n,t,e,r){var u=3>arguments.length;return t=Z(t,r,4),It(n,function(n,r,o){e=u?(u=!1,n):t(e,n,r,o)}),e}function Pt(n){var t=-1,e=n?n.length:0,r=Xt(typeof e=="number"?e:0);return St(n,function(n){var e=Vt(++t);r[t]=r[e],r[e]=n}),r}function Rt(n,t,e){var r;if(t=y.createCallback(t,e,3),Je(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else tr(n,function(n,e,u){return!(r=t(n,e,u))
|
||||
});return!!r}function Ft(e){var r=-1,u=st(),a=e?e.length:0,i=tt(arguments,!0,!0,1),l=[],f=a>=w&&u===n;if(f){var c=o(i);c?(u=t,i=c):f=!1}for(;++r<a;)c=e[r],0>u(i,c)&&l.push(c);return f&&s(i),l}function $t(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;for(t=y.createCallback(t,e,3);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[0]:v;return g(n,0,Re(Pe(0,r),u))}function Lt(t,e,r){if(typeof r=="number"){var u=t?t.length:0;r=0>r?Pe(0,u+r):r||0}else if(r)return r=zt(t,e),t[r]===e?r:-1;
|
||||
return n(t,e,r)}function Tt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=y.createCallback(t,e,3);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Pe(0,t);return g(n,r)}function zt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?y.createCallback(e,r,1):Ht,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function qt(n,t,e,r){return typeof t!="boolean"&&null!=t&&(e=(r=e)&&r[t]===n?null:t,t=!1),null!=e&&(e=y.createCallback(e,r,3)),at(n,t,e)}function Kt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,e=n?Nt(cr(n,"length")):0,r=Xt(0>e?0:e);++t<e;)r[t]=cr(n,t);
|
||||
return r}function Wt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var o=n[e];t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Gt(n,t){return 2<arguments.length?lt(n,17,Le.call(arguments,2),null,t):lt(n,1,null,null,t)}function Jt(n,t,e){function r(){c&&he(c),a=c=p=v,(h||g!==t)&&(s=be(),i=n.apply(f,o))}function u(){var e=t-(be()-l);0<e?c=xe(u,e):(a&&he(a),e=p,a=c=p=v,e&&(s=be(),i=n.apply(f,o)))}var o,a,i,l,f,c,p,s=0,g=!1,h=!0;if(!bt(n))throw new ae;if(t=Pe(0,t)||0,true===e)var y=!0,h=!1;else _t(e)&&(y=e.leading,g="maxWait"in e&&(Pe(t,e.maxWait)||0),h="trailing"in e?e.trailing:h);
|
||||
return function(){if(o=arguments,l=be(),f=this,p=h&&(c||!y),false===g)var e=y&&!c;else{a||y||(s=l);var v=g-(l-s);0<v?a||(a=xe(r,v)):(a&&(a=he(a)),s=l,i=n.apply(f,o))}return c||t===g||(c=xe(u,t)),e&&(i=n.apply(f,o)),i}}function Mt(n){if(!bt(n))throw new ae;var t=Le.call(arguments,1);return xe(function(){n.apply(v,t)},1)}function Ht(n){return n}function Ut(n,t){var e=n,r=!t||bt(e);t||(e=m,t=n,n=y),St(mt(t),function(u){var o=n[u]=t[u];r&&(e.prototype[u]=function(){var t=this.__wrapped__,r=[t];return _e.apply(r,arguments),r=o.apply(n,r),t&&typeof t=="object"&&t===r?this:new e(r)
|
||||
})})}function Vt(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=!0)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,r=$e(),e||n%1||t%1?Re(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+ve(r*(t-n+1))}function Qt(){return this.__wrapped__}e=e?ot.defaults(nt.Object(),e,ot.pick(nt,F)):nt;var Xt=e.Array,Yt=e.Boolean,Zt=e.Date,ne=e.Function,te=e.Math,ee=e.Number,re=e.Object,ue=e.RegExp,oe=e.String,ae=e.TypeError,ie=[],le=e.Error.prototype,fe=re.prototype,ce=oe.prototype,pe=e._,se=ue("^"+oe(fe.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),ge=te.ceil,he=e.clearTimeout,ve=te.floor,ye=ne.prototype.toString,me=se.test(me=re.getPrototypeOf)&&me,de=fe.hasOwnProperty,be=se.test(be=Zt.now)&&be||function(){return+new Zt
|
||||
},_e=ie.push,we=fe.propertyIsEnumerable,je=e.setImmediate,xe=e.setTimeout,Ce=ie.splice,ke=fe.toString,Ee=ie.unshift,Oe=function(){try{var n={},t=se.test(t=re.defineProperty)&&t,e=t(n,n,n)&&t}catch(r){}return e}(),Se=se.test(Se=ke.bind)&&Se,Ie=se.test(Ie=re.create)&&Ie,Ae=se.test(Ae=Xt.isArray)&&Ae,Ne=e.isFinite,Be=e.isNaN,De=se.test(De=re.keys)&&De,Pe=te.max,Re=te.min,Fe=e.parseInt,$e=te.random,Le=ie.slice,Te=se.test(e.attachEvent),ze=Se&&!/\n|true/.test(Se+Te),qe={};qe[T]=Xt,qe[z]=Yt,qe[q]=Zt,qe[W]=ne,qe[J]=re,qe[G]=ee,qe[M]=ue,qe[H]=oe;
|
||||
var Ke={};Ke[T]=Ke[q]=Ke[G]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Ke[z]=Ke[H]={constructor:!0,toString:!0,valueOf:!0},Ke[K]=Ke[W]=Ke[M]={constructor:!0,toString:!0},Ke[J]={constructor:!0},function(){for(var n=$.length;n--;){var t,e=$[n];for(t in Ke)de.call(Ke,t)&&!de.call(Ke[t],e)&&(Ke[t][e]=!1)}}(),m.prototype=y.prototype;var We=y.support={};!function(){function n(){this.x=1}var t={0:1,length:1},r=[];n.prototype={valueOf:1};for(var u in new n)r.push(u);for(u in arguments);We.argsClass=ke.call(arguments)==L,We.argsObject=arguments.constructor==re&&!(arguments instanceof Xt),We.enumErrorProps=we.call(le,"message")||we.call(le,"name"),We.enumPrototypes=we.call(n,"prototype"),We.fastBind=Se&&!ze,We.funcDecomp=!se.test(e.p)&&P.test(h),We.funcNames=typeof ne.name=="string",We.nonEnumArgs=0!=u,We.nonEnumShadows=!/valueOf/.test(r),We.ownLast="x"!=r[0],We.spliceObjects=(ie.splice.call(t,0,1),!t[0]),We.unindexedChars="xx"!="x"[0]+re("x")[0];
|
||||
try{We.nodeClass=!(ke.call(document)==J&&!({toString:0}+""))}catch(o){We.nodeClass=!0}}(1),y.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:y}},Ie||(ct=function(n){if(_t(n)){c.prototype=n;var t=new c;c.prototype=null}return t||{}});var Ge=Oe?function(n,t){Q.value=t,Oe(n,"__bindData__",Q)}:c;We.argsClass||(vt=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&de.call(n,"callee")||!1});var Je=Ae||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ke.call(n)==T||!1
|
||||
},Me=ft({a:"z",e:"[]",i:"if(!(B[typeof z]))return E",g:"E.push(n)"}),He=De?function(n){return _t(n)?We.enumPrototypes&&typeof n=="function"||We.nonEnumArgs&&n.length&&vt(n)?Me(n):De(n):[]}:Me,Ue={a:"g,e,K",i:"e=e&&typeof K=='undefined'?e:d(e,K,3)",b:"typeof u=='number'",v:He,g:"if(e(t[n],n,g)===false)return E"},Ve={a:"z,H,l",i:"var a=arguments,b=0,c=typeof l=='number'?2:a.length;while(++b<c){t=a[b];if(t&&B[typeof t]){",v:He,g:"if(typeof E[n]=='undefined')E[n]=t[n]",c:"}}"},Qe={i:"if(!B[typeof t])return E;"+Ue.i,b:!1},Xe={"&":"&","<":"<",">":">",'"':""","'":"'"},Ye=dt(Xe),Ze=ue("("+He(Ye).join("|")+")","g"),nr=ue("["+He(Xe).join("")+"]","g"),tr=ft(Ue),er=ft(Ve,{i:Ve.i.replace(";",";if(c>3&&typeof a[c-2]=='function'){var e=d(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){e=a[--c]}"),g:"E[n]=e?e(E[n],t[n]):t[n]"}),rr=ft(Ve),ur=ft(Ue,Qe,{j:!1}),or=ft(Ue,Qe);
|
||||
bt(/x/)&&(bt=function(n){return typeof n=="function"&&ke.call(n)==W});var ar=me?function(n){if(!n||ke.call(n)!=J||!We.argsClass&&vt(n))return!1;var t=n.valueOf,e=typeof t=="function"&&(e=me(t))&&me(e);return e?n==e||me(n)==e:gt(n)}:gt,ir=it(function(n,t,e){de.call(n,e)?n[e]++:n[e]=1}),lr=it(function(n,t,e){(de.call(n,e)?n[e]:n[e]=[]).push(t)}),fr=it(function(n,t,e){n[e]=t}),cr=At;ze&&rt&&typeof je=="function"&&(Mt=function(n){if(!bt(n))throw new ae;return je.apply(e,arguments)});var pr=8==Fe(x+"08")?Fe:function(n,t){return Fe(jt(n)?n.replace(B,""):n,t||0)
|
||||
};return y.after=function(n,t){if(!bt(t))throw new ae;return function(){return 1>--n?t.apply(this,arguments):void 0}},y.assign=er,y.at=function(n){var t=arguments,e=-1,r=tt(t,!0,!1,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Xt(t);for(We.unindexedChars&&jt(n)&&(n=n.split(""));++e<t;)u[e]=n[r[e]];return u},y.bind=Gt,y.bindAll=function(n){for(var t=1<arguments.length?tt(arguments,!0,!1,1):mt(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=lt(n[u],1,null,null,n)}return n},y.bindKey=function(n,t){return 2<arguments.length?lt(t,19,Le.call(arguments,2),null,n):lt(t,3,null,null,n)
|
||||
},y.chain=function(n){return n=new m(n),n.__chain__=!0,n},y.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},y.compose=function(){for(var n=arguments,t=n.length;t--;)if(!bt(n[t]))throw new ae;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},y.countBy=ir,y.createCallback=function(n,t,e){var r=typeof n;if(null==n||"function"==r)return Z(n,t,e);if("object"!=r)return function(t){return t[n]};var u=He(n),o=u[0],a=n[o];
|
||||
return 1!=u.length||a!==a||_t(a)?function(t){for(var e=u.length,r=!1;e--&&(r=et(t[u[e]],n[u[e]],null,!0)););return r}:function(n){return n=n[o],a===n&&(0!==a||1/a==1/n)}},y.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,lt(n,4,null,null,null,t)},y.debounce=Jt,y.defaults=rr,y.defer=Mt,y.delay=function(n,t){if(!bt(n))throw new ae;var e=Le.call(arguments,2);return xe(function(){n.apply(v,e)},t)},y.difference=Ft,y.filter=Et,y.flatten=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(e=(r=e)&&r[t]===n?null:t,t=!1),null!=e&&(n=At(n,e,r)),tt(n,t)
|
||||
},y.forEach=St,y.forEachRight=It,y.forIn=ur,y.forInRight=function(n,t,e){var r=[];ur(n,function(n,t){r.push(t,n)});var u=r.length;for(t=Z(t,e,3);u--&&false!==t(r[u--],r[u],n););return n},y.forOwn=or,y.forOwnRight=yt,y.functions=mt,y.groupBy=lr,y.indexBy=fr,y.initial=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=y.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return g(n,0,Re(Pe(0,u-r),u))},y.intersection=function(e){for(var r=arguments,u=r.length,a=-1,l=i(),f=-1,c=st(),g=e?e.length:0,h=[],v=i();++a<u;){var y=r[a];
|
||||
l[a]=c===n&&(y?y.length:0)>=w&&o(a?r[a]:v)}n:for(;++f<g;){var m=l[0],y=e[f];if(0>(m?t(m,y):c(v,y))){for(a=u,(m||v).push(y);--a;)if(m=l[a],0>(m?t(m,y):c(r[a],y)))continue n;h.push(y)}}for(;u--;)(m=l[u])&&s(m);return p(l),p(v),h},y.invert=dt,y.invoke=function(n,t){var e=Le.call(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=Xt(typeof o=="number"?o:0);return St(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},y.keys=He,y.map=At,y.max=Nt,y.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):_+arguments[0];
|
||||
return de.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!bt(n))throw new ae;return e.cache={},e},y.merge=function(n){var t=arguments,e=2;if(!_t(n))return n;if("number"!=typeof t[2]&&(e=t.length),3<e&&"function"==typeof t[e-2])var r=Z(t[--e-1],t[e--],2);else 2<e&&"function"==typeof t[e-1]&&(r=t[--e]);for(var t=Le.call(arguments,1,e),u=-1,o=i(),a=i();++u<e;)ut(n,t[u],r,o,a);return p(o),p(a),n},y.min=function(n,t,e){var u=1/0,o=u;if(!t&&Je(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i<o&&(o=i)}}else t=!t&&jt(n)?r:y.createCallback(t,e,3),tr(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)
|
||||
});return o},y.omit=function(n,t,e){var r=st(),u=typeof t=="function",o={};if(u)t=y.createCallback(t,e,3);else var a=tt(arguments,!0,!1,1);return ur(n,function(n,e,i){(u?!t(n,e,i):0>r(a,e))&&(o[e]=n)}),o},y.once=function(n){var t,e;if(!bt(n))throw new ae;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},y.pairs=function(n){for(var t=-1,e=He(n),r=e.length,u=Xt(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u},y.partial=function(n){return lt(n,16,Le.call(arguments,1))},y.partialRight=function(n){return lt(n,32,null,Le.call(arguments,1))
|
||||
},y.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=tt(arguments,!0,!1,1),a=_t(n)?o.length:0;++u<a;){var i=o[u];i in n&&(r[i]=n[i])}else t=y.createCallback(t,e,3),ur(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},y.pluck=cr,y.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,a=t[e];++o<u;)n[o]===a&&(Ce.call(n,o--,1),u--);return n},y.range=function(n,t,e){n=+n||0,e=typeof e=="number"?e:+e||1,null==t&&(t=n,n=0);var r=-1;t=Pe(0,ge((t-n)/(e||1)));
|
||||
for(var u=Xt(t);++r<t;)u[r]=n,n+=e;return u},y.reject=function(n,t,e){return t=y.createCallback(t,e,3),Et(n,function(n,e,r){return!t(n,e,r)})},y.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=y.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),Ce.call(n,r--,1),u--);return o},y.rest=Tt,y.shuffle=Pt,y.sortBy=function(n,t,e){var r=-1,o=n?n.length:0,a=Xt(typeof o=="number"?o:0);for(t=y.createCallback(t,e,3),St(n,function(n,e,u){var o=a[++r]=l();o.m=t(n,e,u),o.n=r,o.o=n}),o=a.length,a.sort(u);o--;)n=a[o],a[o]=n.o,s(n);
|
||||
return a},y.tap=function(n,t){return t(n),n},y.throttle=function(n,t,e){var r=!0,u=!0;if(!bt(n))throw new ae;return false===e?r=!1:_t(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),V.leading=r,V.maxWait=t,V.trailing=u,Jt(n,t,V)},y.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Xt(n);for(t=Z(t,e,1);++r<n;)u[r]=t(r);return u},y.toArray=function(n){return n&&typeof n.length=="number"?We.unindexedChars&&jt(n)?n.split(""):g(n):xt(n)},y.transform=function(n,t,e,r){var u=Je(n);return t=Z(t,r,4),null==e&&(u?e=[]:(r=n&&n.constructor,e=ct(r&&r.prototype))),(u?tr:or)(n,function(n,r,u){return t(e,n,r,u)
|
||||
}),e},y.union=function(){return at(tt(arguments,!0,!0))},y.uniq=qt,y.values=xt,y.where=Et,y.without=function(n){return Ft(n,Le.call(arguments,1))},y.wrap=function(n,t){if(!bt(t))throw new ae;return function(){var e=[n];return _e.apply(e,arguments),t.apply(this,e)}},y.zip=Kt,y.zipObject=Wt,y.collect=At,y.drop=Tt,y.each=St,y.q=It,y.extend=er,y.methods=mt,y.object=Wt,y.select=Et,y.tail=Tt,y.unique=qt,y.unzip=Kt,Ut(y),y.clone=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),j(n,t,typeof e=="function"&&Z(e,r,1))
|
||||
},y.cloneDeep=function(n,t,e){return j(n,!0,typeof t=="function"&&Z(t,e,1))},y.contains=Ct,y.escape=function(n){return null==n?"":oe(n).replace(nr,pt)},y.every=kt,y.find=Ot,y.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=y.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},y.findKey=function(n,t,e){var r;return t=y.createCallback(t,e,3),or(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0}),r},y.findLast=function(n,t,e){var r;return t=y.createCallback(t,e,3),It(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0
|
||||
}),r},y.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=y.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},y.findLastKey=function(n,t,e){var r;return t=y.createCallback(t,e,3),yt(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0}),r},y.has=function(n,t){return n?de.call(n,t):!1},y.identity=Ht,y.indexOf=Lt,y.isArguments=vt,y.isArray=Je,y.isBoolean=function(n){return true===n||false===n||ke.call(n)==z},y.isDate=function(n){return n?typeof n=="object"&&ke.call(n)==q:!1},y.isElement=function(n){return n?1===n.nodeType:!1
|
||||
},y.isEmpty=function(n){var t=!0;if(!n)return t;var e=ke.call(n),r=n.length;return e==T||e==H||(We.argsClass?e==L:vt(n))||e==J&&typeof r=="number"&&bt(n.splice)?!r:(or(n,function(){return t=!1}),t)},y.isEqual=function(n,t,e,r){return et(n,t,typeof e=="function"&&Z(e,r,2))},y.isFinite=function(n){return Ne(n)&&!Be(parseFloat(n))},y.isFunction=bt,y.isNaN=function(n){return wt(n)&&n!=+n},y.isNull=function(n){return null===n},y.isNumber=wt,y.isObject=_t,y.isPlainObject=ar,y.isRegExp=function(n){return n&&Y[typeof n]?ke.call(n)==M:!1
|
||||
},y.isString=jt,y.isUndefined=function(n){return typeof n=="undefined"},y.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Pe(0,r+e):Re(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},y.mixin=Ut,y.noConflict=function(){return e._=pe,this},y.parseInt=pr,y.random=Vt,y.reduce=Bt,y.reduceRight=Dt,y.result=function(n,t){if(n){var e=n[t];return bt(e)?n[t]():e}},y.runInContext=h,y.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:He(n).length},y.some=Rt,y.sortedIndex=zt,y.template=function(n,t,e){var r=y.templateSettings;
|
||||
n||(n=""),e=rr({},e,r);var u,o=rr({},e.imports,r.imports),r=He(o),o=xt(o),i=0,l=e.interpolate||D,f="__p+='",l=ue((e.escape||D).source+"|"+l.source+"|"+(l===N?S:D).source+"|"+(e.evaluate||D).source+"|$","g");n.replace(l,function(t,e,r,o,l,c){return r||(r=o),f+=n.slice(i,c).replace(R,a),e&&(f+="'+__e("+e+")+'"),l&&(u=!0,f+="';"+l+";__p+='"),r&&(f+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t}),f+="';\n",l=e=e.variable,l||(e="obj",f="with("+e+"){"+f+"}"),f=(u?f.replace(C,""):f).replace(E,"$1").replace(O,"$1;"),f="function("+e+"){"+(l?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}";
|
||||
try{var c=ne(r,"return "+f).apply(v,o)}catch(p){throw p.source=f,p}return t?c(t):(c.source=f,c)},y.unescape=function(n){return null==n?"":oe(n).replace(Ze,ht)},y.uniqueId=function(n){var t=++d;return oe(null==n?"":n)+t},y.all=kt,y.any=Rt,y.detect=Ot,y.findWhere=Ot,y.foldl=Bt,y.foldr=Dt,y.include=Ct,y.inject=Bt,or(y,function(n,t){y.prototype[t]||(y.prototype[t]=function(){var t=[this.__wrapped__],e=this.__chain__;return _e.apply(t,arguments),t=n.apply(y,t),e?new m(t,e):t})}),y.first=$t,y.last=function(n,t,e){var r=0,u=n?n.length:0;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=y.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:v;return g(n,Pe(0,u-r))},y.sample=function(n,t,e){var r=n?n.length:0;return typeof r!="number"?n=xt(n):We.unindexedChars&&jt(n)&&(n=n.split("")),null==t||e?n?n[Vt(r-1)]:v:(n=Pt(n),n.length=Re(Pe(0,t),n.length),n)},y.take=$t,y.head=$t,or(y,function(n,t){var e="sample"!==t;y.prototype[t]||(y.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new m(o,u):o
|
||||
})}),y.VERSION="2.2.0",y.prototype.chain=function(){return this.__chain__=!0,this},y.prototype.toString=function(){return oe(this.__wrapped__)},y.prototype.value=Qt,y.prototype.valueOf=Qt,tr(["join","pop","shift"],function(n){var t=ie[n];y.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);return n?new m(e,n):e}}),tr(["push","reverse","sort","unshift"],function(n){var t=ie[n];y.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),tr(["concat","slice","splice"],function(n){var t=ie[n];
|
||||
y.prototype[n]=function(){return new m(t.apply(this.__wrapped__,arguments),this.__chain__)}}),We.spliceObjects||tr(["pop","shift","splice"],function(n){var t=ie[n],e="splice"==n;y.prototype[n]=function(){var n=this.__chain__,r=this.__wrapped__,u=t.apply(r,arguments);return 0===r.length&&delete r[0],n||e?new m(u,n):u}}),y}var v,y=[],m=[],d=0,b={},_=+new Date+"",w=75,j=40,x=" \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",C=/\b__p\+='';/g,E=/\b(__p\+=)''\+/g,O=/(__e\(.*?\)|\b__t\))\+'';/g,S=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,I=/\w*$/,A=/^function[ \n\r\t]+\w/,N=/<%=([\s\S]+?)%>/g,B=RegExp("^["+x+"]*0+(?=.$)"),D=/($^)/,P=/\bthis\b/,R=/['\n\r\t\u2028\u2029\\]/g,F="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),$="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),L="[object Arguments]",T="[object Array]",z="[object Boolean]",q="[object Date]",K="[object Error]",W="[object Function]",G="[object Number]",J="[object Object]",M="[object RegExp]",H="[object String]",U={};
|
||||
U[W]=!1,U[L]=U[T]=U[z]=U[q]=U[G]=U[J]=U[M]=U[H]=!0;var V={leading:!1,maxWait:0,trailing:!1},Q={configurable:!1,enumerable:!1,value:null,writable:!1},X={a:"",b:null,c:"",d:"",e:"",v:null,g:"",h:null,support:null,i:"",j:!1},Y={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Z={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},nt=Y[typeof window]&&window||this,tt=Y[typeof exports]&&exports&&!exports.nodeType&&exports,et=Y[typeof module]&&module&&!module.nodeType&&module,rt=et&&et.exports===tt&&tt,ut=Y[typeof global]&&global;
|
||||
!ut||ut.global!==ut&&ut.window!==ut||(nt=ut);var ot=h();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(nt._=ot, define(function(){return ot})):tt&&et?rt?(et.exports=ot)._=ot:tt._=ot:nt._=ot}).call(this);
|
||||
6332
dist/lodash.js
vendored
Normal file
52
dist/lodash.min.js
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.2.0 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
*/
|
||||
;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++e<r;)if(n[e]===t)return e;return-1}function t(t,e){var r=typeof e;if(t=t.l,"boolean"==r||null==e)return t[e]?0:-1;"number"!=r&&"string"!=r&&(r="object");var u="number"==r?e:b+e;return t=(t=t[r])&&t[u],"object"==r?t&&-1<n(t,e)?0:-1:t?0:-1}function e(n){var t=this.l,e=typeof n;if("boolean"==e||null==n)t[n]=!0;else{"number"!=e&&"string"!=e&&(e="object");var r="number"==e?n:b+n,t=t[e]||(t[e]={});"object"==e?(t[r]||(t[r]=[])).push(n):t[r]=!0
|
||||
}}function r(n){return n.charCodeAt(0)}function u(n,t){var e=n.m,r=t.m;if(e!==r){if(e>r||typeof e=="undefined")return 1;if(e<r||typeof r=="undefined")return-1}return n.n-t.n}function o(n){var t=-1,r=n.length,u=n[0],o=n[0|r/2],a=n[r-1];if(u&&typeof u=="object"&&o&&typeof o=="object"&&a&&typeof a=="object")return!1;for(u=f(),u["false"]=u["null"]=u["true"]=u.undefined=!1,o=f(),o.k=n,o.l=u,o.push=e;++t<r;)o.push(n[t]);return o}function a(n){return"\\"+G[n]}function i(){return g.pop()||[]}function f(){return y.pop()||{k:null,l:null,m:null,"false":!1,n:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,o:null}
|
||||
}function l(){}function c(n){n.length=0,g.length<d&&g.push(n)}function p(n){var t=n.l;t&&p(t),n.k=n.l=n.m=n.object=n.number=n.string=n.o=null,y.length<d&&y.push(n)}function s(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function v(e){function g(n){if(!n||we.call(n)!=z)return!1;var t=n.valueOf,e=typeof t=="function"&&(e=he(t))&&he(e);return e?n==e||he(n)==e:pt(n)}function y(n,t,e){if(!n||!V[typeof n])return n;t=t&&typeof e=="undefined"?t:et(t,e,3);
|
||||
for(var r=-1,u=V[typeof n]&&Pe(n),o=u?u.length:0;++r<o&&(e=u[r],false!==t(n[e],e,n)););return n}function d(n,t,e){var r;if(!n||!V[typeof n])return n;t=t&&typeof e=="undefined"?t:et(t,e,3);for(r in n)if(false===t(n[r],r,n))break;return n}function G(n,t,e){var r,u=n,o=u;if(!u)return o;for(var a=arguments,i=0,f=typeof e=="number"?2:a.length;++i<f;)if((u=a[i])&&V[typeof u])for(var l=-1,c=V[typeof u]&&Pe(u),p=c?c.length:0;++l<p;)r=c[l],"undefined"==typeof o[r]&&(o[r]=u[r]);return o}function J(n,t,e){var r,u=n,o=u;
|
||||
if(!u)return o;var a=arguments,i=0,f=typeof e=="number"?2:a.length;if(3<f&&"function"==typeof a[f-2])var l=et(a[--f-1],a[f--],2);else 2<f&&"function"==typeof a[f-1]&&(l=a[--f]);for(;++i<f;)if((u=a[i])&&V[typeof u])for(var c=-1,p=V[typeof u]&&Pe(u),s=p?p.length:0;++c<s;)r=p[c],o[r]=l?l(o[r],u[r]):u[r];return o}function Q(n){var t,e=[];if(!n||!V[typeof n])return e;for(t in n)ge.call(n,t)&&e.push(t);return e}function Y(n){return n&&typeof n=="object"&&!ze(n)&&ge.call(n,"__wrapped__")?n:new nt(n)}function nt(n,t){this.__chain__=!!t,this.__wrapped__=n
|
||||
}function tt(n,t,e,r,u){if(e){var o=e(n);if(typeof o!="undefined")return o}if(!bt(n))return n;var a=we.call(n);if(!L[a])return n;var f=Te[a];switch(a){case F:case T:return new f(+n);case q:case K:return new f(n);case P:return o=f(n.source,O.exec(n)),o.lastIndex=n.lastIndex,o}if(a=ze(n),t){var l=!r;r||(r=i()),u||(u=i());for(var p=r.length;p--;)if(r[p]==n)return u[p];o=a?f(n.length):{}}else o=a?s(n):J({},n);return a&&(ge.call(n,"index")&&(o.index=n.index),ge.call(n,"input")&&(o.input=n.input)),t?(r.push(n),u.push(o),(a?Ot:y)(n,function(n,a){o[a]=tt(n,t,e,r,u)
|
||||
}),l&&(c(r),c(u)),o):o}function et(n,t,e){if(typeof n!="function")return Vt;if(typeof t=="undefined")return n;var r=n.__bindData__||We.funcNames&&!n.name;if(typeof r=="undefined"){var u=R&&ve.call(n);We.funcNames||!u||I.test(u)||(r=!0),(We.funcNames||!r)&&(r=!We.funcDecomp||R.test(u),qe(n,r))}if(true!==r&&r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)
|
||||
}}return Lt(n,t)}function rt(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r<u;){var a=n[r];if(a&&typeof a=="object"&&typeof a.length=="number"&&(ze(a)||vt(a))){t||(a=rt(a,t,e));var i=-1,f=a.length,l=o.length;for(o.length+=f;++i<f;)o[l++]=a[i]}else e||o.push(a)}return o}function ut(n,t,e,r,u,o){if(e){var a=e(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;if(n===n&&!(n&&V[typeof n]||t&&V[typeof t]))return!1;if(null==n||null==t)return n===t;var f=we.call(n),l=we.call(t);
|
||||
if(f==B&&(f=z),l==B&&(l=z),f!=l)return!1;switch(f){case F:case T:return+n==+t;case q:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case P:case K:return n==ue(t)}if(l=f==$,!l){if(ge.call(n,"__wrapped__")||ge.call(t,"__wrapped__"))return ut(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(f!=z)return!1;var f=n.constructor,p=t.constructor;if(f!=p&&!(mt(f)&&f instanceof f&&mt(p)&&p instanceof p))return!1}for(p=!u,u||(u=i()),o||(o=i()),f=u.length;f--;)if(u[f]==n)return o[f]==t;var s=0,a=!0;if(u.push(n),o.push(t),l){if(f=n.length,s=t.length,a=s==n.length,!a&&!r)return a;
|
||||
for(;s--;)if(l=f,p=t[s],r)for(;l--&&!(a=ut(n[l],p,e,r,u,o)););else if(!(a=ut(n[s],p,e,r,u,o)))break;return a}return d(t,function(t,i,f){return ge.call(f,i)?(s++,a=ge.call(n,i)&&ut(n[i],t,e,r,u,o)):void 0}),a&&!r&&d(n,function(n,t,e){return ge.call(e,t)?a=-1<--s:void 0}),p&&(c(u),c(o)),a}function ot(n,t,e,r,u){(ze(t)?Ot:y)(t,function(t,o){var a,i,f=t,l=n[o];if(t&&((i=ze(t))||g(t))){for(f=r.length;f--;)if(a=r[f]==t){l=u[f];break}if(!a){var c;e&&(f=e(l,t),c=typeof f!="undefined")&&(l=f),c||(l=i?ze(l)?l:[]:g(l)?l:{}),r.push(t),u.push(l),c||ot(l,t,e,r,u)
|
||||
}}else e&&(f=e(l,t),typeof f=="undefined"&&(f=t)),typeof f!="undefined"&&(l=f);n[o]=l})}function at(e,r,u){var a=-1,f=ct(),l=e?e.length:0,s=[],v=!r&&l>=_&&f===n,h=u||v?i():s;if(v){var g=o(h);g?(f=t,h=g):(v=!1,h=u?h:(c(h),s))}for(;++a<l;){var g=e[a],y=u?u(g,a,e):g;(r?!a||h[h.length-1]!==y:0>f(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(c(h.k),p(h)):u&&c(h),s}function it(n){return function(t,e,r){var u={};e=Y.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++r<o;){var a=t[r];
|
||||
n(u,a,e(a,r,t),t)}else y(t,function(t,r,o){n(u,t,e(t,r,o),o)});return u}}function ft(n,t,e,r,u,o){var a=1&t,i=2&t,f=4&t,l=8&t,c=16&t,p=32&t,s=n;if(!i&&!mt(n))throw new oe;c&&!e.length&&(t&=-17,c=e=!1),p&&!r.length&&(t&=-33,p=r=!1);var v=n&&n.__bindData__;if(v)return!a||1&v[1]||(v[4]=u),!a&&1&v[1]&&(t|=8),!f||4&v[1]||(v[5]=o),c&&me.apply(v[2]||(v[2]=[]),e),p&&me.apply(v[3]||(v[3]=[]),r),v[1]|=t,ft.apply(null,v);if(!a||i||f||p||!(We.fastBind||xe&&c))g=function(){var v=arguments,h=a?u:this;return(f||c||p)&&(v=Be.call(v),c&&je.apply(v,e),p&&me.apply(v,r),f&&v.length<o)?(t|=16,ft(n,l?t:-4&t,v,null,u,o)):(i&&(n=h[s]),this instanceof g?(h=bt(n.prototype)?Ce(n.prototype):{},v=n.apply(h,v),bt(v)?v:h):n.apply(h,v))
|
||||
};else{if(c){var h=[u];me.apply(h,e)}var g=c?xe.apply(n,h):xe.call(n,u)}return qe(g,Be.call(arguments)),g}function lt(n){return Ke[n]}function ct(){var t=(t=Y.indexOf)===Tt?n:t;return t}function pt(n){var t,e;return n&&we.call(n)==z&&(t=n.constructor,!mt(t)||t instanceof t)?(d(n,function(n,t){e=t}),typeof e=="undefined"||ge.call(n,e)):!1}function st(n){return Le[n]}function vt(n){return n&&typeof n=="object"&&typeof n.length=="number"&&we.call(n)==B||!1}function ht(n,t,e){var r=Pe(n),u=r.length;for(t=et(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n
|
||||
}function gt(n){var t=[];return d(n,function(n,e){mt(n)&&t.push(e)}),t.sort()}function yt(n){for(var t=-1,e=Pe(n),r=e.length,u={};++t<r;){var o=e[t];u[n[o]]=o}return u}function mt(n){return typeof n=="function"}function bt(n){return!(!n||!V[typeof n])}function _t(n){return typeof n=="number"||we.call(n)==q}function dt(n){return typeof n=="string"||we.call(n)==K}function wt(n){for(var t=-1,e=Pe(n),r=e.length,u=Qt(r);++t<r;)u[t]=n[e[t]];return u}function jt(n,t,e){var r=-1,u=ct(),o=n?n.length:0,a=!1;return e=(0>e?Se(0,o+e):e)||0,ze(n)?a=-1<u(n,t,e):typeof o=="number"?a=-1<(dt(n)?n.indexOf(t,e):u(n,t,e)):y(n,function(n){return++r<e?void 0:!(a=n===t)
|
||||
}),a}function kt(n,t,e){var r=!0;t=Y.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&(r=!!t(n[e],e,n)););else y(n,function(n,e,u){return r=!!t(n,e,u)});return r}function xt(n,t,e){var r=[];t=Y.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}else y(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function Ct(n,t,e){t=Y.createCallback(t,e,3),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return y(n,function(n,e,r){return t(n,e,r)?(u=n,!1):void 0
|
||||
}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function Ot(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:et(t,e,3),typeof u=="number")for(;++r<u&&false!==t(n[r],r,n););else y(n,t);return n}function It(n,t,e){var r=n?n.length:0;if(t=t&&typeof e=="undefined"?t:et(t,e,3),typeof r=="number")for(;r--&&false!==t(n[r],r,n););else{var u=Pe(n),r=u.length;y(n,function(n,e,o){return e=u?u[--r]:--r,t(o[e],e,o)})}return n}function Nt(n,t,e){var r=-1,u=n?n.length:0;if(t=Y.createCallback(t,e,3),typeof u=="number")for(var o=Qt(u);++r<u;)o[r]=t(n[r],r,n);
|
||||
else o=[],y(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function Et(n,t,e){var u=-1/0,o=u;if(!t&&ze(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i>o&&(o=i)}}else t=!t&&dt(n)?r:Y.createCallback(t,e,3),Ot(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function St(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Qt(r);++e<r;)u[e]=n[e][t];return u||Nt(n,t)}function Rt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=et(t,r,4);var o=-1,a=n.length;if(typeof a=="number")for(u&&(e=n[++o]);++o<a;)e=t(e,n[o],o,n);
|
||||
else y(n,function(n,r,o){e=u?(u=!1,n):t(e,n,r,o)});return e}function At(n,t,e,r){var u=3>arguments.length;return t=et(t,r,4),It(n,function(n,r,o){e=u?(u=!1,n):t(e,n,r,o)}),e}function Dt(n){var t=-1,e=n?n.length:0,r=Qt(typeof e=="number"?e:0);return Ot(n,function(n){var e=Ht(++t);r[t]=r[e],r[e]=n}),r}function Bt(n,t,e){var r;t=Y.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else y(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function $t(e){var r=-1,u=ct(),a=e?e.length:0,i=rt(arguments,!0,!0,1),f=[],l=a>=_&&u===n;
|
||||
if(l){var c=o(i);c?(u=t,i=c):l=!1}for(;++r<a;)c=e[r],0>u(i,c)&&f.push(c);return l&&p(i),f}function Ft(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;for(t=Y.createCallback(t,e,3);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[0]:h;return s(n,0,Re(Se(0,r),u))}function Tt(t,e,r){if(typeof r=="number"){var u=t?t.length:0;r=0>r?Se(0,u+r):r||0}else if(r)return r=qt(t,e),t[r]===e?r:-1;return n(t,e,r)}function Wt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;
|
||||
for(t=Y.createCallback(t,e,3);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Se(0,t);return s(n,r)}function qt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?Y.createCallback(e,r,1):Vt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function zt(n,t,e,r){return typeof t!="boolean"&&null!=t&&(e=(r=e)&&r[t]===n?null:t,t=!1),null!=e&&(e=Y.createCallback(e,r,3)),at(n,t,e)}function Pt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,e=n?Et(St(n,"length")):0,r=Qt(0>e?0:e);++t<e;)r[t]=St(n,t);return r}function Kt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var o=n[e];
|
||||
t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Lt(n,t){return 2<arguments.length?ft(n,17,Be.call(arguments,2),null,t):ft(n,1,null,null,t)}function Mt(n,t,e){function r(){c&&pe(c),a=c=p=h,(g||v!==t)&&(s=ye(),i=n.apply(l,o))}function u(){var e=t-(ye()-f);0<e?c=_e(u,e):(a&&pe(a),e=p,a=c=p=h,e&&(s=ye(),i=n.apply(l,o)))}var o,a,i,f,l,c,p,s=0,v=!1,g=!0;if(!mt(n))throw new oe;if(t=Se(0,t)||0,true===e)var y=!0,g=!1;else bt(e)&&(y=e.leading,v="maxWait"in e&&(Se(t,e.maxWait)||0),g="trailing"in e?e.trailing:g);
|
||||
return function(){if(o=arguments,f=ye(),l=this,p=g&&(c||!y),false===v)var e=y&&!c;else{a||y||(s=f);var h=v-(f-s);0<h?a||(a=_e(r,h)):(a&&(a=pe(a)),s=f,i=n.apply(l,o))}return c||t===v||(c=_e(u,t)),e&&(i=n.apply(l,o)),i}}function Ut(n){if(!mt(n))throw new oe;var t=Be.call(arguments,1);return _e(function(){n.apply(h,t)},1)}function Vt(n){return n}function Gt(n,t){var e=n,r=!t||mt(e);t||(e=nt,t=n,n=Y),Ot(gt(t),function(u){var o=n[u]=t[u];r&&(e.prototype[u]=function(){var t=this.__wrapped__,r=[t];return me.apply(r,arguments),r=o.apply(n,r),t&&typeof t=="object"&&t===r?this:new e(r)
|
||||
})})}function Ht(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=!0)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,r=De(),e||n%1||t%1?Re(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+se(r*(t-n+1))}function Jt(){return this.__wrapped__}e=e?Z.defaults(H.Object(),e,Z.pick(H,D)):H;var Qt=e.Array,Xt=e.Boolean,Yt=e.Date,Zt=e.Function,ne=e.Math,te=e.Number,ee=e.Object,re=e.RegExp,ue=e.String,oe=e.TypeError,ae=[],ie=ee.prototype,fe=e._,le=re("^"+ue(ie.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),ce=ne.ceil,pe=e.clearTimeout,se=ne.floor,ve=Zt.prototype.toString,he=le.test(he=ee.getPrototypeOf)&&he,ge=ie.hasOwnProperty,ye=le.test(ye=Yt.now)&&ye||function(){return+new Yt
|
||||
},me=ae.push,be=e.setImmediate,_e=e.setTimeout,de=ae.splice,we=ie.toString,je=ae.unshift,ke=function(){try{var n={},t=le.test(t=ee.defineProperty)&&t,e=t(n,n,n)&&t}catch(r){}return e}(),xe=le.test(xe=we.bind)&&xe,Ce=le.test(Ce=ee.create)&&Ce,Oe=le.test(Oe=Qt.isArray)&&Oe,Ie=e.isFinite,Ne=e.isNaN,Ee=le.test(Ee=ee.keys)&&Ee,Se=ne.max,Re=ne.min,Ae=e.parseInt,De=ne.random,Be=ae.slice,$e=le.test(e.attachEvent),Fe=xe&&!/\n|true/.test(xe+$e),Te={};Te[$]=Qt,Te[F]=Xt,Te[T]=Yt,Te[W]=Zt,Te[z]=ee,Te[q]=te,Te[P]=re,Te[K]=ue,nt.prototype=Y.prototype;
|
||||
var We=Y.support={};We.fastBind=xe&&!Fe,We.funcDecomp=!le.test(e.a)&&R.test(v),We.funcNames=typeof Zt.name=="string",Y.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:Y}};var qe=ke?function(n,t){U.value=t,ke(n,"__bindData__",U)}:l,ze=Oe||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&we.call(n)==$||!1},Pe=Ee?function(n){return bt(n)?Ee(n):[]}:Q,Ke={"&":"&","<":"<",">":">",'"':""","'":"'"},Le=yt(Ke),Me=re("("+Pe(Le).join("|")+")","g"),Ue=re("["+Pe(Ke).join("")+"]","g"),Ve=it(function(n,t,e){ge.call(n,e)?n[e]++:n[e]=1
|
||||
}),Ge=it(function(n,t,e){(ge.call(n,e)?n[e]:n[e]=[]).push(t)}),He=it(function(n,t,e){n[e]=t});Fe&&X&&typeof be=="function"&&(Ut=function(n){if(!mt(n))throw new oe;return be.apply(e,arguments)});var Je=8==Ae(w+"08")?Ae:function(n,t){return Ae(dt(n)?n.replace(E,""):n,t||0)};return Y.after=function(n,t){if(!mt(t))throw new oe;return function(){return 1>--n?t.apply(this,arguments):void 0}},Y.assign=J,Y.at=function(n){for(var t=arguments,e=-1,r=rt(t,!0,!1,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Qt(t);++e<t;)u[e]=n[r[e]];
|
||||
return u},Y.bind=Lt,Y.bindAll=function(n){for(var t=1<arguments.length?rt(arguments,!0,!1,1):gt(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=ft(n[u],1,null,null,n)}return n},Y.bindKey=function(n,t){return 2<arguments.length?ft(t,19,Be.call(arguments,2),null,n):ft(t,3,null,null,n)},Y.chain=function(n){return n=new nt(n),n.__chain__=!0,n},Y.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},Y.compose=function(){for(var n=arguments,t=n.length;t--;)if(!mt(n[t]))throw new oe;
|
||||
return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},Y.countBy=Ve,Y.createCallback=function(n,t,e){var r=typeof n;if(null==n||"function"==r)return et(n,t,e);if("object"!=r)return function(t){return t[n]};var u=Pe(n),o=u[0],a=n[o];return 1!=u.length||a!==a||bt(a)?function(t){for(var e=u.length,r=!1;e--&&(r=ut(t[u[e]],n[u[e]],null,!0)););return r}:function(n){return n=n[o],a===n&&(0!==a||1/a==1/n)}},Y.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,ft(n,4,null,null,null,t)
|
||||
},Y.debounce=Mt,Y.defaults=G,Y.defer=Ut,Y.delay=function(n,t){if(!mt(n))throw new oe;var e=Be.call(arguments,2);return _e(function(){n.apply(h,e)},t)},Y.difference=$t,Y.filter=xt,Y.flatten=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(e=(r=e)&&r[t]===n?null:t,t=!1),null!=e&&(n=Nt(n,e,r)),rt(n,t)},Y.forEach=Ot,Y.forEachRight=It,Y.forIn=d,Y.forInRight=function(n,t,e){var r=[];d(n,function(n,t){r.push(t,n)});var u=r.length;for(t=et(t,e,3);u--&&false!==t(r[u--],r[u],n););return n},Y.forOwn=y,Y.forOwnRight=ht,Y.functions=gt,Y.groupBy=Ge,Y.indexBy=He,Y.initial=function(n,t,e){var r=0,u=n?n.length:0;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=Y.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return s(n,0,Re(Se(0,u-r),u))},Y.intersection=function(e){for(var r=arguments,u=r.length,a=-1,f=i(),l=-1,s=ct(),v=e?e.length:0,h=[],g=i();++a<u;){var y=r[a];f[a]=s===n&&(y?y.length:0)>=_&&o(a?r[a]:g)}n:for(;++l<v;){var m=f[0],y=e[l];if(0>(m?t(m,y):s(g,y))){for(a=u,(m||g).push(y);--a;)if(m=f[a],0>(m?t(m,y):s(r[a],y)))continue n;h.push(y)}}for(;u--;)(m=f[u])&&p(m);return c(f),c(g),h},Y.invert=yt,Y.invoke=function(n,t){var e=Be.call(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=Qt(typeof o=="number"?o:0);
|
||||
return Ot(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},Y.keys=Pe,Y.map=Nt,Y.max=Et,Y.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):b+arguments[0];return ge.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!mt(n))throw new oe;return e.cache={},e},Y.merge=function(n){var t=arguments,e=2;if(!bt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3<e&&"function"==typeof t[e-2])var r=et(t[--e-1],t[e--],2);else 2<e&&"function"==typeof t[e-1]&&(r=t[--e]);for(var t=Be.call(arguments,1,e),u=-1,o=i(),a=i();++u<e;)ot(n,t[u],r,o,a);
|
||||
return c(o),c(a),n},Y.min=function(n,t,e){var u=1/0,o=u;if(!t&&ze(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i<o&&(o=i)}}else t=!t&&dt(n)?r:Y.createCallback(t,e,3),Ot(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)});return o},Y.omit=function(n,t,e){var r=ct(),u=typeof t=="function",o={};if(u)t=Y.createCallback(t,e,3);else var a=rt(arguments,!0,!1,1);return d(n,function(n,e,i){(u?!t(n,e,i):0>r(a,e))&&(o[e]=n)}),o},Y.once=function(n){var t,e;if(!mt(n))throw new oe;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)
|
||||
}},Y.pairs=function(n){for(var t=-1,e=Pe(n),r=e.length,u=Qt(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u},Y.partial=function(n){return ft(n,16,Be.call(arguments,1))},Y.partialRight=function(n){return ft(n,32,null,Be.call(arguments,1))},Y.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=rt(arguments,!0,!1,1),a=bt(n)?o.length:0;++u<a;){var i=o[u];i in n&&(r[i]=n[i])}else t=Y.createCallback(t,e,3),d(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},Y.pluck=St,Y.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,a=t[e];++o<u;)n[o]===a&&(de.call(n,o--,1),u--);
|
||||
return n},Y.range=function(n,t,e){n=+n||0,e=typeof e=="number"?e:+e||1,null==t&&(t=n,n=0);var r=-1;t=Se(0,ce((t-n)/(e||1)));for(var u=Qt(t);++r<t;)u[r]=n,n+=e;return u},Y.reject=function(n,t,e){return t=Y.createCallback(t,e,3),xt(n,function(n,e,r){return!t(n,e,r)})},Y.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=Y.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),de.call(n,r--,1),u--);return o},Y.rest=Wt,Y.shuffle=Dt,Y.sortBy=function(n,t,e){var r=-1,o=n?n.length:0,a=Qt(typeof o=="number"?o:0);
|
||||
for(t=Y.createCallback(t,e,3),Ot(n,function(n,e,u){var o=a[++r]=f();o.m=t(n,e,u),o.n=r,o.o=n}),o=a.length,a.sort(u);o--;)n=a[o],a[o]=n.o,p(n);return a},Y.tap=function(n,t){return t(n),n},Y.throttle=function(n,t,e){var r=!0,u=!0;if(!mt(n))throw new oe;return false===e?r=!1:bt(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),M.leading=r,M.maxWait=t,M.trailing=u,Mt(n,t,M)},Y.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Qt(n);for(t=et(t,e,1);++r<n;)u[r]=t(r);return u},Y.toArray=function(n){return n&&typeof n.length=="number"?s(n):wt(n)
|
||||
},Y.transform=function(n,t,e,r){var u=ze(n);return t=et(t,r,4),null==e&&(u?e=[]:(r=n&&n.constructor,e=bt(r&&r.prototype)?Ce(r&&r.prototype):{})),(u?Ot:y)(n,function(n,r,u){return t(e,n,r,u)}),e},Y.union=function(){return at(rt(arguments,!0,!0))},Y.uniq=zt,Y.values=wt,Y.where=xt,Y.without=function(n){return $t(n,Be.call(arguments,1))},Y.wrap=function(n,t){if(!mt(t))throw new oe;return function(){var e=[n];return me.apply(e,arguments),t.apply(this,e)}},Y.zip=Pt,Y.zipObject=Kt,Y.collect=Nt,Y.drop=Wt,Y.each=Ot,Y.b=It,Y.extend=J,Y.methods=gt,Y.object=Kt,Y.select=xt,Y.tail=Wt,Y.unique=zt,Y.unzip=Pt,Gt(Y),Y.clone=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),tt(n,t,typeof e=="function"&&et(e,r,1))
|
||||
},Y.cloneDeep=function(n,t,e){return tt(n,!0,typeof t=="function"&&et(t,e,1))},Y.contains=jt,Y.escape=function(n){return null==n?"":ue(n).replace(Ue,lt)},Y.every=kt,Y.find=Ct,Y.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=Y.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},Y.findKey=function(n,t,e){var r;return t=Y.createCallback(t,e,3),y(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0}),r},Y.findLast=function(n,t,e){var r;return t=Y.createCallback(t,e,3),It(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0
|
||||
}),r},Y.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=Y.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},Y.findLastKey=function(n,t,e){var r;return t=Y.createCallback(t,e,3),ht(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0}),r},Y.has=function(n,t){return n?ge.call(n,t):!1},Y.identity=Vt,Y.indexOf=Tt,Y.isArguments=vt,Y.isArray=ze,Y.isBoolean=function(n){return true===n||false===n||we.call(n)==F},Y.isDate=function(n){return n?typeof n=="object"&&we.call(n)==T:!1},Y.isElement=function(n){return n?1===n.nodeType:!1
|
||||
},Y.isEmpty=function(n){var t=!0;if(!n)return t;var e=we.call(n),r=n.length;return e==$||e==K||e==B||e==z&&typeof r=="number"&&mt(n.splice)?!r:(y(n,function(){return t=!1}),t)},Y.isEqual=function(n,t,e,r){return ut(n,t,typeof e=="function"&&et(e,r,2))},Y.isFinite=function(n){return Ie(n)&&!Ne(parseFloat(n))},Y.isFunction=mt,Y.isNaN=function(n){return _t(n)&&n!=+n},Y.isNull=function(n){return null===n},Y.isNumber=_t,Y.isObject=bt,Y.isPlainObject=g,Y.isRegExp=function(n){return n?typeof n=="object"&&we.call(n)==P:!1
|
||||
},Y.isString=dt,Y.isUndefined=function(n){return typeof n=="undefined"},Y.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Se(0,r+e):Re(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},Y.mixin=Gt,Y.noConflict=function(){return e._=fe,this},Y.parseInt=Je,Y.random=Ht,Y.reduce=Rt,Y.reduceRight=At,Y.result=function(n,t){if(n){var e=n[t];return mt(e)?n[t]():e}},Y.runInContext=v,Y.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Pe(n).length},Y.some=Bt,Y.sortedIndex=qt,Y.template=function(n,t,e){var r=Y.templateSettings;
|
||||
n||(n=""),e=G({},e,r);var u,o=G({},e.imports,r.imports),r=Pe(o),o=wt(o),i=0,f=e.interpolate||S,l="__p+='",f=re((e.escape||S).source+"|"+f.source+"|"+(f===N?C:S).source+"|"+(e.evaluate||S).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(i,c).replace(A,a),e&&(l+="'+__e("+e+")+'"),f&&(u=!0,l+="';"+f+";__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t}),l+="';\n",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(j,""):l).replace(k,"$1").replace(x,"$1;"),l="function("+e+"){"+(f?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";
|
||||
try{var c=Zt(r,"return "+l).apply(h,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},Y.unescape=function(n){return null==n?"":ue(n).replace(Me,st)},Y.uniqueId=function(n){var t=++m;return ue(null==n?"":n)+t},Y.all=kt,Y.any=Bt,Y.detect=Ct,Y.findWhere=Ct,Y.foldl=Rt,Y.foldr=At,Y.include=jt,Y.inject=Rt,y(Y,function(n,t){Y.prototype[t]||(Y.prototype[t]=function(){var t=[this.__wrapped__],e=this.__chain__;return me.apply(t,arguments),t=n.apply(Y,t),e?new nt(t,e):t})}),Y.first=Ft,Y.last=function(n,t,e){var r=0,u=n?n.length:0;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=Y.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:h;return s(n,Se(0,u-r))},Y.sample=function(n,t,e){var r=n?n.length:0;return typeof r!="number"&&(n=wt(n)),null==t||e?n?n[Ht(r-1)]:h:(n=Dt(n),n.length=Re(Se(0,t),n.length),n)},Y.take=Ft,Y.head=Ft,y(Y,function(n,t){var e="sample"!==t;Y.prototype[t]||(Y.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new nt(o,u):o
|
||||
})}),Y.VERSION="2.2.0",Y.prototype.chain=function(){return this.__chain__=!0,this},Y.prototype.toString=function(){return ue(this.__wrapped__)},Y.prototype.value=Jt,Y.prototype.valueOf=Jt,Ot(["join","pop","shift"],function(n){var t=ae[n];Y.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);return n?new nt(e,n):e}}),Ot(["push","reverse","sort","unshift"],function(n){var t=ae[n];Y.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Ot(["concat","slice","splice"],function(n){var t=ae[n];
|
||||
Y.prototype[n]=function(){return new nt(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Y}var h,g=[],y=[],m=0,b=+new Date+"",_=75,d=40,w=" \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",j=/\b__p\+='';/g,k=/\b(__p\+=)''\+/g,x=/(__e\(.*?\)|\b__t\))\+'';/g,C=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,O=/\w*$/,I=/^function[ \n\r\t]+\w/,N=/<%=([\s\S]+?)%>/g,E=RegExp("^["+w+"]*0+(?=.$)"),S=/($^)/,R=/\bthis\b/,A=/['\n\r\t\u2028\u2029\\]/g,D="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),B="[object Arguments]",$="[object Array]",F="[object Boolean]",T="[object Date]",W="[object Function]",q="[object Number]",z="[object Object]",P="[object RegExp]",K="[object String]",L={};
|
||||
L[W]=!1,L[B]=L[$]=L[F]=L[T]=L[q]=L[z]=L[P]=L[K]=!0;var M={leading:!1,maxWait:0,trailing:!1},U={configurable:!1,enumerable:!1,value:null,writable:!1},V={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},G={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},H=V[typeof window]&&window||this,J=V[typeof exports]&&exports&&!exports.nodeType&&exports,Q=V[typeof module]&&module&&!module.nodeType&&module,X=Q&&Q.exports===J&&J,Y=V[typeof global]&&global;!Y||Y.global!==Y&&Y.window!==Y||(H=Y);
|
||||
var Z=v();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(H._=Z, define(function(){return Z})):J&&Q?X?(Q.exports=Z)._=Z:J._=Z:H._=Z}).call(this);
|
||||
4767
dist/lodash.underscore.js
vendored
Normal file
38
dist/lodash.underscore.min.js
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.2.0 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
||||
*/
|
||||
;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++t<e;)if(n[t]===r)return t;return-1}function r(n,r){var t=n.m,e=r.m;if(t!==e){if(t>e||typeof t=="undefined")return 1;if(t<e||typeof e=="undefined")return-1}return n.n-r.n}function t(n){return"\\"+vr[n]}function e(){}function u(n){return n instanceof u?n:new o(n)}function o(n,r){this.__chain__=!!r,this.__wrapped__=n}function i(n,r,t){if(typeof n!="function")return Q;if(typeof r=="undefined")return n;switch(t){case 1:return function(t){return n.call(r,t)
|
||||
};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return J(n,r)}function f(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(Vr(i)||y(i))){r||(i=f(i,r,t));var a=-1,l=i.length,c=o.length;for(o.length+=l;++a<l;)o[c++]=i[a]}else t||o.push(i)}return o}function a(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(n===n&&!(n&&hr[typeof n]||r&&hr[typeof r]))return!1;
|
||||
if(null==n||null==r)return n===r;var o=Br.call(n),i=Br.call(r);if(o!=i)return!1;switch(o){case fr:case ar:return+n==+r;case lr:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case pr:case sr:return n==r+""}if(i=o==ir,!i){if(Ar.call(n,"__wrapped__")||r instanceof u)return a(n.__wrapped__||n,r.__wrapped__||r,t,e);if(o!=cr)return!1;var o=n.constructor,f=r.constructor;if(o!=f&&!(j(o)&&o instanceof o&&j(f)&&f instanceof f))return!1}for(t||(t=[]),e||(e=[]),o=t.length;o--;)if(t[o]==n)return e[o]==r;var l=!0,c=0;
|
||||
if(t.push(n),e.push(r),i){if(c=r.length,l=c==n.length)for(;c--&&(l=a(n[c],r[c],t,e)););return l}return Xr(r,function(r,u,o){return Ar.call(o,u)?(c++,!(l=Ar.call(n,u)&&a(n[u],r,t,e))&&rr):void 0}),l&&Xr(n,function(n,r,t){return Ar.call(t,r)?!(l=-1<--c)&&rr:void 0}),l}function l(n,r,t){for(var e=-1,u=v(),o=n?n.length:0,i=[],f=t?[]:i;++e<o;){var a=n[e],l=t?t(a,e,n):a;(r?!e||f[f.length-1]!==l:0>u(f,l))&&(t&&f.push(l),i.push(a))}return i}function c(n){return function(r,t,e){var u={};t=K(t,e,3),e=-1;var o=r?r.length:0;
|
||||
if(typeof o=="number")for(;++e<o;){var i=r[e];n(u,i,t(i,e,r),r)}else Yr(r,function(r,e,o){n(u,r,t(r,e,o),o)});return u}}function p(n,r,t,e,u,o){var i=1&r,f=2&r,a=4&r,l=8&r,c=16&r,h=32&r,v=n;if(!f&&!j(n))throw new TypeError;if(c&&!t.length&&(r&=-17,c=t=!1),h&&!e.length&&(r&=-33,h=e=!1),!i||f||a||h||!(Ur.fastBind||Rr&&c))y=function(){var g=arguments,m=i?u:this;return(a||c||h)&&(g=zr.call(g),c&&Nr.apply(g,t),h&&Sr.apply(g,e),a&&g.length<o)?(r|=16,p(n,l?r:-4&r,g,null,u,o)):(f&&(n=m[v]),this instanceof y?(m=s(n.prototype),g=n.apply(m,g),x(g)?g:m):n.apply(m,g))
|
||||
};else{if(c){var g=[u];Sr.apply(g,t)}var y=c?Rr.apply(n,g):Rr.call(n,u)}return y}function s(n){return x(n)?kr(n):{}}function h(n){return Jr[n]}function v(){var r=(r=u.indexOf)===U?n:r;return r}function g(n){return Kr[n]}function y(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Br.call(n)==or||!1}function m(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n}function _(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];
|
||||
if(e)for(var u in e)"undefined"==typeof n[u]&&(n[u]=e[u])}return n}function d(n){var r=[];return Xr(n,function(n,t){j(n)&&r.push(t)}),r.sort()}function b(n){for(var r=-1,t=Hr(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u}function w(n){if(!n)return!0;if(Vr(n)||T(n))return!n.length;for(var r in n)if(Ar.call(n,r))return!1;return!0}function j(n){return typeof n=="function"}function x(n){return!(!n||!hr[typeof n])}function E(n){return typeof n=="number"||Br.call(n)==lr}function T(n){return typeof n=="string"||Br.call(n)==sr
|
||||
}function A(n){for(var r=-1,t=Hr(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function O(n,r){var t=v(),e=n?n.length:0,u=!1;return e&&typeof e=="number"?u=-1<t(n,r):Yr(n,function(n){return(u=n===r)&&rr}),u}function S(n,r,t){var e=!0;r=K(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else Yr(n,function(n,t,u){return!(e=!!r(n,t,u))&&rr});return e}function B(n,r,t){var e=[];r=K(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];
|
||||
r(o,t,n)&&e.push(o)}else Yr(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function N(n,r,t){r=K(r,t,3),t=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return Yr(n,function(n,t,e){return r(n,t,e)?(u=n,rr):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o}}function R(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:i(r,t,3),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==rr;);else Yr(n,r)}function k(n,r){var t=n?n.length:0;if(typeof t=="number")for(;t--&&false!==r(n[t],t,n););else{var e=Hr(n),t=e.length;
|
||||
Yr(n,function(n,u,o){return u=e?e[--t]:--t,false===r(o[u],u,o)&&rr})}}function F(n,r,t){var e=-1,u=n?n.length:0;if(r=K(r,t,3),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],Yr(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function q(n,r,t){var e=-1/0,u=e,o=-1,i=n?n.length:0;if(r||typeof i!="number")r=K(r,t,3),R(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});else for(;++o<i;)t=n[o],t>u&&(u=t);return u}function D(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++t<e;)u[t]=n[t][r];
|
||||
return u||F(n,r)}function M(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=i(r,e,4);var o=-1,f=n.length;if(typeof f=="number")for(u&&(t=n[++o]);++o<f;)t=r(t,n[o],o,n);else Yr(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)});return t}function $(n,r,t,e){var u=3>arguments.length;return r=i(r,e,4),k(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)}),t}function I(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return R(n,function(n){var t=Y(++r);e[r]=e[t],e[t]=n}),e}function W(n,r,t){var e;r=K(r,t,3),t=-1;
|
||||
var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else Yr(n,function(n,t,u){return(e=r(n,t,u))&&rr});return!!e}function z(n,r,t){return t&&w(r)?Z:(t?N:B)(n,r)}function C(n){for(var r=-1,t=v(),e=n.length,u=f(arguments,!0,!0,1),o=[];++r<e;){var i=n[r];0>t(u,i)&&o.push(i)}return o}function P(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=-1;for(r=K(r,t,3);++o<u&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[0]:Z;return zr.call(n,0,Ir($r(0,e),u))}function U(r,t,e){if(typeof e=="number"){var u=r?r.length:0;
|
||||
e=0>e?$r(0,u+e):e||0}else if(e)return e=G(r,t),r[e]===t?e:-1;return n(r,t,e)}function V(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,o=n?n.length:0;for(r=K(r,t,3);++u<o&&r(n[u],u,n);)e++}else e=null==r||t?1:$r(0,r);return zr.call(n,e)}function G(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?K(t,e,1):Q,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function H(n,r,t,e){return typeof r!="boolean"&&null!=r&&(t=(e=t)&&e[r]===n?null:r,r=!1),null!=t&&(t=K(t,e,3)),l(n,r,t)}function J(n,r){return 2<arguments.length?p(n,17,zr.call(arguments,2),null,r):p(n,1,null,null,r)
|
||||
}function K(n,r,t){var e=typeof n;if(null==n||"function"==e)return i(n,r,t);if("object"!=e)return function(r){return r[n]};var u=Hr(n);return function(r){for(var t=u.length,e=!1;t--&&(e=r[u[t]]===n[u[t]]););return e}}function L(n,r,t){var e,u,o,i,f,a,l,c=0,p=!1,s=!0;if(!j(n))throw new TypeError;if(r=$r(0,r)||0,true===t)var h=!0,s=!1;else x(t)&&(h=t.leading,p="maxWait"in t&&($r(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var v=function(){var t=r-(Or()-i);0<t?a=setTimeout(v,t):(u&&clearTimeout(u),t=l,u=a=l=Z,t&&(c=Or(),o=n.apply(f,e)))
|
||||
},g=function(){a&&clearTimeout(a),u=a=l=Z,(s||p!==r)&&(c=Or(),o=n.apply(f,e))};return function(){if(e=arguments,i=Or(),f=this,l=s&&(a||!h),false===p)var t=h&&!a;else{u||h||(c=i);var y=p-(i-c);0<y?u||(u=setTimeout(g,y)):(u&&(u=clearTimeout(u)),c=i,o=n.apply(f,e))}return a||r===p||(a=setTimeout(v,r)),t&&(o=n.apply(f,e)),o}}function Q(n){return n}function X(n){R(d(n),function(r){var t=u[r]=n[r];u.prototype[r]=function(){var n=[this.__wrapped__];return Sr.apply(n,arguments),n=t.apply(u,n),this.__chain__&&(n=new o(n),n.__chain__=!0),n
|
||||
}})}function Y(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Tr(Wr()*(r-n+1))}var Z,nr=0,rr={},tr=+new Date+"",er=/($^)/,ur=/['\n\r\t\u2028\u2029\\]/g,or="[object Arguments]",ir="[object Array]",fr="[object Boolean]",ar="[object Date]",lr="[object Number]",cr="[object Object]",pr="[object RegExp]",sr="[object String]",hr={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},vr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},gr=hr[typeof window]&&window||this,yr=hr[typeof exports]&&exports&&!exports.nodeType&&exports,mr=hr[typeof module]&&module&&!module.nodeType&&module,_r=mr&&mr.exports===yr&&yr,dr=hr[typeof global]&&global;
|
||||
!dr||dr.global!==dr&&dr.window!==dr||(gr=dr);var br=[],wr=Object.prototype,jr=gr._,xr=RegExp("^"+(wr.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Er=Math.ceil,Tr=Math.floor,Ar=wr.hasOwnProperty,Or=xr.test(Or=Date.now)&&Or||function(){return+new Date},Sr=br.push,Br=wr.toString,Nr=br.unshift,Rr=xr.test(Rr=Br.bind)&&Rr,kr=xr.test(kr=Object.create)&&kr,Fr=xr.test(Fr=Array.isArray)&&Fr,qr=gr.isFinite,Dr=gr.isNaN,Mr=xr.test(Mr=Object.keys)&&Mr,$r=Math.max,Ir=Math.min,Wr=Math.random,zr=br.slice,Cr=xr.test(gr.attachEvent),Pr=Rr&&!/\n|true/.test(Rr+Cr);
|
||||
o.prototype=u.prototype;var Ur={};!function(){var n={0:1,length:1};Ur.fastBind=Rr&&!Pr,Ur.spliceObjects=(br.splice.call(n,0,1),!n[0])}(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},kr||(s=function(n){if(x(n)){e.prototype=n;var r=new e;e.prototype=null}return r||{}}),y(arguments)||(y=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ar.call(n,"callee")||!1});var Vr=Fr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Br.call(n)==ir||!1
|
||||
},Gr=function(n){var r,t=[];if(!n||!hr[typeof n])return t;for(r in n)Ar.call(n,r)&&t.push(r);return t},Hr=Mr?function(n){return x(n)?Mr(n):[]}:Gr,Jr={"&":"&","<":"<",">":">",'"':""","'":"'"},Kr=b(Jr),Lr=RegExp("("+Hr(Kr).join("|")+")","g"),Qr=RegExp("["+Hr(Jr).join("")+"]","g"),Xr=function(n,r){var t;if(!n||!hr[typeof n])return n;for(t in n)if(r(n[t],t,n)===rr)break;return n},Yr=function(n,r){var t;if(!n||!hr[typeof n])return n;for(t in n)if(Ar.call(n,t)&&r(n[t],t,n)===rr)break;
|
||||
return n};j(/x/)&&(j=function(n){return typeof n=="function"&&"[object Function]"==Br.call(n)});var Zr=c(function(n,r,t){Ar.call(n,t)?n[t]++:n[t]=1}),nt=c(function(n,r,t){(Ar.call(n,t)?n[t]:n[t]=[]).push(r)}),rt=c(function(n,r,t){n[t]=r});u.after=function(n,r){if(!j(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=J,u.bindAll=function(n){for(var r=1<arguments.length?f(arguments,!0,!1,1):d(n),t=-1,e=r.length;++t<e;){var u=r[t];n[u]=p(n[u],1,null,null,n)}return n
|
||||
},u.chain=function(n){return n=new o(n),n.__chain__=!0,n},u.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e},u.compose=function(){for(var n=arguments,r=n.length;r--;)if(!j(n[r]))throw new TypeError;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},u.countBy=Zr,u.debounce=L,u.defaults=_,u.defer=function(n){if(!j(n))throw new TypeError;var r=zr.call(arguments,1);return setTimeout(function(){n.apply(Z,r)},1)},u.delay=function(n,r){if(!j(n))throw new TypeError;
|
||||
var t=zr.call(arguments,2);return setTimeout(function(){n.apply(Z,t)},r)},u.difference=C,u.filter=B,u.flatten=function(n,r){return f(n,r)},u.forEach=R,u.functions=d,u.groupBy=nt,u.indexBy=rt,u.initial=function(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=u;for(r=K(r,t,3);o--&&r(n[o],o,n);)e++}else e=null==r||t?1:r||e;return zr.call(n,0,Ir($r(0,u-e),u))},u.intersection=function(n){var r=arguments,t=r.length,e=-1,u=v(),o=n?n.length:0,i=[];n:for(;++e<o;){var f=n[e];if(0>u(i,f)){for(var a=t;--a;)if(0>u(r[a],f))continue n;
|
||||
i.push(f)}}return i},u.invert=b,u.invoke=function(n,r){var t=zr.call(arguments,2),e=-1,u=typeof r=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return R(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},u.keys=Hr,u.map=F,u.max=q,u.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):tr+arguments[0];return Ar.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},u.min=function(n,r,t){var e=1/0,u=e,o=-1,i=n?n.length:0;if(r||typeof i!="number")r=K(r,t,3),R(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)
|
||||
});else for(;++o<i;)t=n[o],t<u&&(u=t);return u},u.omit=function(n){var r=v(),t=f(arguments,!0,!1,1),e={};return Xr(n,function(n,u){0>r(t,u)&&(e[u]=n)}),e},u.once=function(n){var r,t;if(!j(n))throw new TypeError;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},u.pairs=function(n){for(var r=-1,t=Hr(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},u.partial=function(n){return p(n,16,zr.call(arguments,1))},u.pick=function(n){for(var r=-1,t=f(arguments,!0,!1,1),e=t.length,u={};++r<e;){var o=t[r];
|
||||
o in n&&(u[o]=n[o])}return u},u.pluck=D,u.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=$r(0,Er((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},u.reject=function(n,r,t){return r=K(r,t,3),B(n,function(n,t,e){return!r(n,t,e)})},u.rest=V,u.shuffle=I,u.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(t=K(t,e,3),R(n,function(n,r,e){i[++u]={m:t(n,r,e),n:u,o:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].o;return i},u.tap=function(n,r){return r(n),n
|
||||
},u.throttle=function(n,r,t){var e=!0,u=!0;if(!j(n))throw new TypeError;return false===t?e=!1:x(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,L(n,r,t)},u.times=function(n,r,t){n=-1<(n=+n)?n:0;var e=-1,u=Array(n);for(r=i(r,t,1);++e<n;)u[e]=r(e);return u},u.toArray=function(n){return Vr(n)?zr.call(n):n&&typeof n.length=="number"?F(n):A(n)},u.union=function(){return l(f(arguments,!0,!0))},u.uniq=H,u.values=A,u.where=z,u.without=function(n){return C(n,zr.call(arguments,1))
|
||||
},u.wrap=function(n,r){if(!j(r))throw new TypeError;return function(){var t=[n];return Sr.apply(t,arguments),r.apply(this,t)}},u.zip=function(){for(var n=-1,r=q(D(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=D(arguments,n);return t},u.collect=F,u.drop=V,u.each=R,u.extend=m,u.methods=d,u.object=function(n,r){for(var t=-1,e=n?n.length:0,u={};++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},u.select=B,u.tail=V,u.unique=H,u.clone=function(n){return x(n)?Vr(n)?zr.call(n):m({},n):n},u.contains=O,u.escape=function(n){return null==n?"":(n+"").replace(Qr,h)
|
||||
},u.every=S,u.find=N,u.has=function(n,r){return n?Ar.call(n,r):!1},u.identity=Q,u.indexOf=U,u.isArguments=y,u.isArray=Vr,u.isBoolean=function(n){return true===n||false===n||Br.call(n)==fr},u.isDate=function(n){return n?typeof n=="object"&&Br.call(n)==ar:!1},u.isElement=function(n){return n?1===n.nodeType:!1},u.isEmpty=w,u.isEqual=function(n,r){return a(n,r)},u.isFinite=function(n){return qr(n)&&!Dr(parseFloat(n))},u.isFunction=j,u.isNaN=function(n){return E(n)&&n!=+n},u.isNull=function(n){return null===n
|
||||
},u.isNumber=E,u.isObject=x,u.isRegExp=function(n){return n&&hr[typeof n]?Br.call(n)==pr:!1},u.isString=T,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?$r(0,e+t):Ir(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},u.mixin=X,u.noConflict=function(){return gr._=jr,this},u.random=Y,u.reduce=M,u.reduceRight=$,u.result=function(n,r){if(n){var t=n[r];return j(t)?n[r]():t}},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Hr(n).length
|
||||
},u.some=W,u.sortedIndex=G,u.template=function(n,r,e){var o=u,i=o.templateSettings;n||(n=""),e=_({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||er).source+"|"+(e.interpolate||er).source+"|"+(e.evaluate||er).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(ur,t),e&&(a+="'+_.escape("+e+")+'"),o&&(a+="';"+o+";__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r}),a+="';\n",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";
|
||||
try{var l=Function("_","return "+a)(o)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+"").replace(Lr,g)},u.uniqueId=function(n){var r=++nr+"";return n?n+r:r},u.all=S,u.any=W,u.detect=N,u.findWhere=function(n,r){return z(n,r,!0)},u.foldl=M,u.foldr=$,u.include=O,u.inject=M,u.first=P,u.last=function(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=u;for(r=K(r,t,3);o--&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[u-1]:Z;
|
||||
return zr.call(n,$r(0,u-e))},u.sample=function(n,r,t){var e=n?n.length:0;return typeof e!="number"&&(n=A(n)),null==r||t?n?n[Y(e-1)]:Z:(n=I(n),n.length=Ir($r(0,r),n.length),n)},u.take=P,u.head=P,X(u),u.VERSION="2.2.0",u.prototype.chain=function(){return this.__chain__=!0,this},u.prototype.value=function(){return this.__wrapped__},R("pop push reverse shift sort splice unshift".split(" "),function(n){var r=br[n];u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Ur.spliceObjects||0!==n.length||delete n[0],this
|
||||
}}),R(["concat","join","slice"],function(n){var r=br[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(gr._=u, define(function(){return u})):yr&&mr?_r?(mr.exports=u)._=u:yr._=u:gr._=u}).call(this);
|
||||
5967
doc/README.md
@@ -20,9 +20,10 @@
|
||||
|
||||
// generate Markdown
|
||||
$markdown = docdown(array(
|
||||
'path' => '../' . $file,
|
||||
'title' => 'Lo-Dash <sup>v0.3.0</sup>',
|
||||
'url' => 'https://github.com/bestiejs/lodash/blob/v0.3.0/lodash.js'
|
||||
'path' => '../' . $file,
|
||||
'title' => 'Lo-Dash <span>v2.2.0</span>',
|
||||
'toc' => 'categories',
|
||||
'url' => 'https://github.com/lodash/lodash/blob/2.2.0/lodash.js'
|
||||
));
|
||||
|
||||
// save to a .md file
|
||||
@@ -32,4 +33,4 @@
|
||||
header('Content-Type: text/plain;charset=utf-8');
|
||||
echo $markdown . PHP_EOL;
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
1
index.js
Executable file
@@ -0,0 +1 @@
|
||||
module.exports = require('./dist/lodash.compat.js');
|
||||
32
lodash.min.js
vendored
@@ -1,32 +0,0 @@
|
||||
/*!
|
||||
Lo-Dash 0.3.0 lodash.com/license
|
||||
Underscore.js 1.3.3 github.com/documentcloud/underscore/blob/master/LICENSE
|
||||
*/
|
||||
;(function(e,t){"use strict";function s(e){return"[object Arguments]"==nt.call(e)}function o(e){return new u(e)}function u(e){if(e&&e._wrapped)return e;this._wrapped=e}function a(){for(var e,t,s,o=-1,u=arguments.length,a={e:"",f:"",k:"",q:"",c:{d:"",m:"++k<m"},o:{d:""}};++o<u;)for(t in e=arguments[o],e)s=(s=e[t])==r?"":s,/d|m|j/.test(t)?("string"==typeof s&&(s={b:s,n:s}),a.c[t]=s.b,a.o[t]=s.n):a[t]=s;e=a.a,t=a.c,s=a.o;var o=/^[^,]+/.exec(e)[0],u=s.m,f=/\S+$/.exec(u||o)[0];a.g=o,a.i=O,a.h="i.call("+
|
||||
f+",k)",a.l=f,a.p=j,a.r=a.r!==i,a.f||(a.f="if(!"+o+")return r");if("n"==o||!t.j)a.c=r;return u||(s.m="k in "+f),Function("b,h,i,j,l,o,v,y,z,g,A",'"use strict";return function('+e+"){"+ft(a)+"}")(z,V,Z,k,h,R,K,nt,n,i)}function f(e,t){return I[t]}function l(e){return"\\"+U[e]}function c(e){return q[e]}function h(e,t){return function(n,r,i){return e.call(t,n,r,i)}}function p(){}function d(e,t){var n=I.length;return I[n]="'+((__t=("+t+"))==null?'':_.escape(__t))+'",F+n}function v(e,t){var n=I.length;
|
||||
return I[n]="'+((__t=("+t+"))==null?'':__t)+'",F+n}function m(e,t){var n=I.length;return I[n]="';"+t+";__p+='",F+n}function g(e,t,n,r){if(!e)return n;var i=e.length,s=3>arguments.length;r&&(t=h(t,r));if(i===i>>>0){for(i&&s&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}var o=Lt(e);for((i=o.length)&&s&&(n=e[o[--i]]);i--;)s=o[i],n=t(n,e[s],s,e);return n}function y(e,n,r){return n==t||r?e[0]:tt.call(e,0,n)}function b(e,t){for(var n,r=-1,i=e.length,s=[];++r<i;)n=e[r],kt(n)?et.apply(s,t?n:b(n)):s.push(n);return s
|
||||
}function w(e,t,n){var r=-1,i=e.length;if(n){if("number"!=typeof n)return r=x(e,t),e[r]===t?r:-1;r=(0>n?Math.max(0,i+n):n)-1}for(;++r<i;)if(e[r]===t)return r;return-1}function E(e,t,n){var r=-Infinity,i=-1,s=e.length,o=r;if(!t){for(;++i<s;)e[i]>o&&(o=e[i]);return o}for(n&&(t=h(t,n));++i<s;)n=t(e[i],i,e),n>r&&(r=n,o=e[i]);return o}function S(e,n,r){return tt.call(e,n==t||r?1:n)}function x(e,t,n,r){var i,s=0,o=e.length;if(n)for(t=n.call(r,t);s<o;)i=s+o>>>1,n.call(r,e[i])<t?s=i+1:o=i;else for(;s<o;)
|
||||
i=s+o>>>1,e[i]<t?s=i+1:o=i;return s}function T(e,t,n,r){var s=-1,o=e.length,u=[],a=[];"function"==typeof t&&(r=n,n=t,t=i);for(n?r&&(n=h(n,r)):n=k;++s<o;)if(r=n(e[s],s,e),t?!s||a[a.length-1]!==r:0>w(a,r))a.push(r),u.push(e[s]);return u}function N(e,t){function n(){var u=arguments,a=t;return s||(e=t[i]),o.length&&(u=u.length?Y.apply(o,u):o),this instanceof n?(p.prototype=e.prototype,a=new p,u=e.apply(a,u),R[typeof u]&&u!==r?u:a):e.apply(a,u)}var i,s=nt.call(e)==V;if(s){if(rt)return rt.call.apply(rt
|
||||
,arguments)}else i=t,t=e;var o=tt.call(arguments,2);return n}function C(e,r,s){s||(s=[]);if(e===r)return 0!==e||1/e==1/r;if(e==t||r==t)return e===r;e._chain&&(e=e._wrapped),r._chain&&(r=r._wrapped);if(e.isEqual&&nt.call(e.isEqual)==V)return e.isEqual(r);if(r.isEqual&&nt.call(r.isEqual)==V)return r.isEqual(e);var o=nt.call(e);if(o!=nt.call(r))return i;switch(o){case K:return e==""+r;case $:return e!=+e?r!=+r:0==e?1/e==1/r:e==+r;case W:case X:return+e==+r;case J:return e.source==r.source&&e.global==
|
||||
r.global&&e.multiline==r.multiline&&e.ignoreCase==r.ignoreCase}if("object"!=typeof e||"object"!=typeof r)return i;for(var u=s.length;u--;)if(s[u]==e)return n;var u=-1,a=n,f=0;s.push(e);if(o==z){if(f=e.length,a=f==r.length)for(;f--&&(a=C(e[f],r[f],s)););}else{if("constructor"in e!="constructor"in r||e.constructor!=r.constructor)return i;for(var l in e)if(Z.call(e,l)&&(f++,!(a=Z.call(r,l)&&C(e[l],r[l],s))))break;if(a){for(l in r)if(Z.call(r,l)&&!(f--))break;a=!f}if(a&&O)for(;7>++u&&(l=j[u],!Z.call(
|
||||
e,l)||!!(a=Z.call(r,l)&&C(e[l],r[l],s))););}return s.pop(),a}function k(e){return e}function L(e){wt(Ct(e),function(t){var r=o[t]=e[t];u.prototype[t]=function(){var e=[this._wrapped];return arguments.length&&et.apply(e,arguments),e=1==e.length?r.call(o,e[0]):r.apply(o,e),this._chain&&(e=new u(e),e._chain=n),e}})}var n=!0,r=null,i=!1,A="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),O=!{valueOf:0}.propertyIsEnumerable("valueOf"),M=0,_=
|
||||
e._,D=RegExp("^"+({}.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),P=/__token__(\d+)/g,H=/[&<"']/g,B=/['\n\r\t\u2028\u2029\\]/g,j="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),F="__token__",I=[],q={"&":"&","<":"<",'"':""","'":"'"},R={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},U={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029"
|
||||
:"u2029"},z="[object Array]",W="[object Boolean]",X="[object Date]",V="[object Function]",$="[object Number]",J="[object RegExp]",K="[object String]",Q=Array.prototype,G=Object.prototype,Y=Q.concat,Z=G.hasOwnProperty,et=Q.push,tt=Q.slice,nt=G.toString,rt=D.test(rt=tt.bind)&&/\n|Opera/.test(rt+nt.call(e.opera))&&rt,it=D.test(it=Array.isArray)&&it,st=e.isFinite,ot=D.test(ot=Object.keys)&&ot,ut=e.clearTimeout,at=e.setTimeout;o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate
|
||||
:/<%=([\s\S]+?)%>/g,variable:"obj"};var ft=Function("obj","var __p;with(obj){__p='var k,r';if(k){__p+='='+k};__p+=';'+f+';'+q+';';if(c){__p+='var m='+g+'.length;k=-1;';if(o){__p+='if(m===m>>>0){'};__p+=''+c['d']+';while('+c['m']+'){'+c['j']+'}';if(o){__p+='}'}}if(o){if(c){__p+='else{'}if(!i){__p+='var s=typeof '+l+'==\\'function\\';'};__p+=''+o['d']+';for('+o['m']+'){';if(i){if(r){__p+='if('+h+'){'};__p+=''+o['j']+';';if(r){__p+='}'}}else{__p+='if(!(s&&k==\\'prototype\\')';if(r){__p+='&&'+h};__p+='){'+o['j']+'}'};__p+='}';if(i){__p+='var f='+l+'.constructor;';for(var k=0;k<7;k++){__p+='k=\\''+p[k]+'\\';if(';if(p[k]=='constructor'){__p+='!(f&&f.prototype==='+l+')&&'};__p+=''+h+'){'+o['j']+'}'}}if(c){__p+='}'}};__p+=''+e+';return r'}return __p"
|
||||
),lt={a:"e,c,x",k:"e",q:"if(!c){c=j}else if(x){c=l(c,x)}",j:"c(e[k],k,e)"},ct={k:"z",j:"if(!c(e[k],k,e))return!r"},ht={a:"n",k:"n",q:"for(var t,u=1,m=arguments.length;u<m;u++){t=arguments[u];"+(O?"if(t){":""),m:"k in t",r:i,j:"n[k]=t[k]",e:(O?"}":"")+"}"},pt={k:"[]",j:"c(e[k],k,e)&&r.push(e[k])"},dt={q:"if(x)c=l(c,x)"},vt={j:{n:lt.j}},mt={k:"",f:"if(!e)return[]",d:{b:"r=Array(m)",n:"r=[]"},j:{b:"r[k]=c(e[k],k,e)",n:"r.push(c(e[k],k,e))"}},gt=a({a:"n",f:"if(!o[typeof n]||n===null)throw TypeError()"
|
||||
,k:"[]",j:"r.push(k)"}),D=a({a:"e,w",k:"g",j:"if(e[k]===w)return z"}),yt=a(lt,ct),G=a(lt,pt),bt=a(lt,dt,{k:"",j:"if(c(e[k],k,e))return e[k]"}),wt=a(lt,dt),Et=a(lt,mt),St=a(mt,{a:"e,q",j:{b:"r[k]=e[k][q]",n:"r.push(e[k][q])"}}),xt=a({a:"e,c,a,x",k:"a",q:"var p=arguments.length<3;if(x)c=l(c,x)",d:{b:"if(p)r=e[++k]"},j:{b:"r=c(r,e[k],k,e)",n:"r=p?(p=g,e[k]):c(r,e[k],k,e)"}}),pt=a(lt,pt,{j:"!"+pt.j}),ct=a(lt,ct,{k:"g",j:ct.j.replace("!","")}),Tt=a(mt,{a:"e",j:{b:"r[k]=e[k]",n:"r.push(e[k])"}}),mt=a(ht
|
||||
,{j:"if(n[k]==A)"+ht.j}),Nt=a(ht),ht=a(lt,dt,vt,{r:i}),lt=a(lt,dt,vt),Ct=a({a:"n",k:"[]",r:i,j:"if(y.call(n[k])==h)r.push(k)",e:"r.sort()"});s(arguments)||(s=function(e){return!!e&&!!Z.call(e,"callee")});var kt=it||function(e){return nt.call(e)==z},it=a({a:"B",k:"z",q:"var d=y.call(B);if(d==b||d==v)return!B.length",j:{n:"return g"}}),Lt=ot?function(e){return"function"==typeof e?gt(e):ot(e)}:gt;o.VERSION="0.3.0",o.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments
|
||||
)}},o.bind=N,o.bindAll=function(e){var t=arguments,n=1;1==t.length&&(n=0,t=Ct(e));for(var r=t.length;n<r;n++)e[t[n]]=N(e[t[n]],e);return e},o.chain=function(e){return e=new u(e),e._chain=n,e},o.clone=function(e){return R[typeof e]&&e!==r?kt(e)?e.slice():Nt({},e):e},o.compact=function(e){for(var t=-1,n=e.length,r=[];++t<n;)e[t]&&r.push(e[t]);return r},o.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},o.contains=D,o.debounce=
|
||||
function(e,n,r){function i(){a=t,r||e.apply(u,s)}var s,o,u,a;return function(){var t=r&&!a;return s=arguments,u=this,ut(a),a=at(i,n),t&&(o=e.apply(u,s)),o}},o.defaults=mt,o.defer=function(e){var n=tt.call(arguments,1);return at(function(){return e.apply(t,n)},1)},o.delay=function(e,n){var r=tt.call(arguments,2);return at(function(){return e.apply(t,r)},n)},o.difference=function(e){for(var t=-1,n=e.length,r=[],i=Y.apply(r,tt.call(arguments,1));++t<n;)0>w(i,e[t])&&r.push(e[t]);return r},o.escape=function(
|
||||
e){return(e+"").replace(H,c)},o.every=yt,o.extend=Nt,o.filter=G,o.find=bt,o.first=y,o.flatten=b,o.forEach=wt,o.forIn=ht,o.forOwn=lt,o.functions=Ct,o.groupBy=function(e,t,n){var r,i=-1,s="function"==typeof t,o=e.length,u={};for(s&&n&&(t=h(t,n));++i<o;)r=e[i],n=s?t(r,i,e):r[t],(Z.call(u,n)?u[n]:u[n]=[]).push(r);return u},o.has=function(e,t){return Z.call(e,t)},o.identity=k,o.indexOf=w,o.initial=function(e,n,r){return tt.call(e,0,-(n==t||r?1:n))},o.intersection=function(e){for(var t,n=-1,r=e.length,
|
||||
i=tt.call(arguments,1),s=[];++n<r;)t=e[n],0>w(s,t)&&yt(i,function(e){return-1<w(e,t)})&&s.push(t);return s},o.invoke=function(e,t){for(var n=tt.call(arguments,2),r=-1,i=e.length,s="function"==typeof t,o=[];++r<i;)o[r]=(s?t:e[r][t]).apply(e[r],n);return o},o.isArguments=s,o.isArray=kt,o.isBoolean=function(e){return e===n||e===i||nt.call(e)==W},o.isDate=function(e){return nt.call(e)==X},o.isElement=function(e){return!!e&&1==e.nodeType},o.isEmpty=it,o.isEqual=C,o.isFinite=function(e){return st(e)&&nt
|
||||
.call(e)==$},o.isFunction=function(e){return nt.call(e)==V},o.isNaN=function(e){return nt.call(e)==$&&e!=+e},o.isNull=function(e){return e===r},o.isNumber=function(e){return nt.call(e)==$},o.isObject=function(e){return R[typeof e]&&e!==r},o.isRegExp=function(e){return nt.call(e)==J},o.isString=function(e){return nt.call(e)==K},o.isUndefined=function(e){return e===t},o.keys=Lt,o.last=function(e,n,r){var i=e.length;return n==t||r?e[i-1]:tt.call(e,-n||i)},o.lastIndexOf=function(e,t,n){var r=e.length
|
||||
;for(n&&"number"==typeof n&&(r=(0>n?Math.max(0,r+n):Math.min(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},o.map=Et,o.max=E,o.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Z.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},o.min=function(e,t,n){var r=Infinity,i=-1,s=e.length,o=r;if(!t){for(;++i<s;)e[i]<o&&(o=e[i]);return o}for(n&&(t=h(t,n));++i<s;)n=t(e[i],i,e),n<r&&(r=n,o=e[i]);return o},o.mixin=L,o.noConflict=function(){return e._=_,this},o.once=
|
||||
function(e){var t,r=i;return function(){return r?t:(r=n,t=e.apply(this,arguments))}},o.partial=function(e){var t=tt.call(arguments,1),n=t.length;return function(){var r;return r=arguments,r.length&&(t.length=n,et.apply(t,r)),r=1==t.length?e.call(this,t[0]):e.apply(this,t),t.length=n,r}},o.pick=function(e){for(var t,n=0,r=Y.apply(Q,arguments),i=r.length,s={};++n<i;)t=r[n],t in e&&(s[t]=e[t]);return s},o.pluck=St,o.range=function(e,t,n){n||(n=1),2>arguments.length&&(t=e||0,e=0);for(var r=-1,i=Math.
|
||||
max(Math.ceil((t-e)/n),0),s=Array(i);++r<i;)s[r]=e,e+=n;return s},o.reduce=xt,o.reduceRight=g,o.reject=pt,o.rest=S,o.result=function(e,t){if(!e)return r;var n=e[t];return nt.call(n)==V?e[t]():n},o.shuffle=function(e){for(var t,n=-1,r=e.length,i=Array(r);++n<r;)t=Math.floor(Math.random()*(n+1)),i[n]=i[t],i[t]=e[n];return i},o.size=function(e){var t=nt.call(e);return t==z||t==K?e.length:Lt(e).length},o.some=ct,o.sortBy=function(e,n,r){if("string"==typeof n)var i=n,n=function(e){return e[i]};else r&&
|
||||
(n=h(n,r));return St(Et(e,function(t,r){return{a:n(t,r,e),b:t}}).sort(function(e,n){var r=e.a,i=n.a;return r===t?1:i===t?-1:r<i?-1:r>i?1:0}),"b")},o.sortedIndex=x,o.tap=function(e,t){return t(e),e},o.template=function(e,t,n){n||(n={});var i;i=o.templateSettings;var s=n.escape,u=n.evaluate,a=n.interpolate,n=n.variable;return s==r&&(s=i.escape),u==r&&(u=i.evaluate),a==r&&(a=i.interpolate),s&&(e=e.replace(s,d)),a&&(e=e.replace(a,v)),u&&(e=e.replace(u,m)),e="__p='"+e.replace(B,l).replace(P,f)+"';",I.
|
||||
length=0,n||(n=i.variable,e="with("+n+"||{}){"+e+"}"),e="function("+n+"){var __p,__t,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+e+"return __p}",i=Function("_","return "+e)(o),t?i(t):(i.source=e,i)},o.throttle=function(e,n){function r(){a=new Date,u=t,e.apply(o,i)}var i,s,o,u,a=0;return function(){var t=new Date,f=n-(t-a);return i=arguments,o=this,0>=f?(a=t,s=e.apply(o,i)):u||(u=at(r,f)),s}},o.times=function(e,t,n){var r=-1;if(n)for(;++r<e;)t.call(n,r);else for(;++r<e;
|
||||
)t(r)},o.toArray=function(e){if(!e)return[];if(nt.call(e.toArray)==V)return e.toArray();var t=e.length;return t===t>>>0?tt.call(e):Tt(e)},o.union=function(){for(var e=-1,t=[],n=Y.apply(t,arguments),r=n.length;++e<r;)0>w(t,n[e])&&t.push(n[e]);return t},o.uniq=T,o.uniqueId=function(e){var t=M++;return e?e+t:t},o.values=Tt,o.without=function(e){for(var t=tt.call(arguments,1),n=-1,r=e.length,i=[];++n<r;)0>w(t,e[n])&&i.push(e[n]);return i},o.wrap=function(e,t){return function(){var n=[e];return arguments
|
||||
.length&&et.apply(n,arguments),t.apply(this,n)}},o.zip=function(){for(var e=-1,t=E(St(arguments,"length")),n=Array(t);++e<t;)n[e]=St(arguments,e);return n},o.all=yt,o.any=ct,o.collect=Et,o.detect=bt,o.each=wt,o.foldl=xt,o.foldr=g,o.head=y,o.include=D,o.inject=xt,o.methods=Ct,o.select=G,o.tail=S,o.take=y,o.unique=T,u.prototype=o.prototype,L(o),u.prototype.chain=function(){return this._chain=n,this},u.prototype.value=function(){return this._wrapped},wt("pop push reverse shift sort splice unshift".split
|
||||
(" "),function(e){var t=Q[e];u.prototype[e]=function(){var e=this._wrapped;return arguments.length?t.apply(e,arguments):t.call(e),e.length===0&&delete e[0],this._chain&&(e=new u(e),e._chain=n),e}}),wt(["concat","join","slice"],function(e){var t=Q[e];u.prototype[e]=function(){var e=this._wrapped,e=arguments.length?t.apply(e,arguments):t.call(e);return this._chain&&(e=new u(e),e._chain=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=o,define(function(){return o})):A?"object"==typeof
|
||||
module&&module&&module.s==A?(module.s=o)._=o:A._=o:e._=o})(this);
|
||||
92
package.json
@@ -1,42 +1,62 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"version": "0.3.0",
|
||||
"description": "A drop-in replacement for Underscore.js that delivers performance improvements, bug fixes, and additional features.",
|
||||
"homepage": "http://lodash.com",
|
||||
"main": "lodash",
|
||||
"keywords": [
|
||||
"browser",
|
||||
"client",
|
||||
"functional",
|
||||
"performance",
|
||||
"server",
|
||||
"speed",
|
||||
"util"
|
||||
"version": "2.2.0",
|
||||
"description": "A utility library delivering consistency, customization, performance, & extras.",
|
||||
"homepage": "http://lodash.com/",
|
||||
"license": "MIT",
|
||||
"main": "dist/lodash.js",
|
||||
"keywords": ["amd", "browser", "client", "customize", "functional", "server", "util"],
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com/)",
|
||||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://lodash.com/license"
|
||||
}
|
||||
"bugs": "https://github.com/lodash/lodash/issues",
|
||||
"repository": { "type": "git", "url": "https://github.com/lodash/lodash.git" },
|
||||
"engines": ["node", "rhino"],
|
||||
"files": [
|
||||
"LICENSE.txt",
|
||||
"lodash.js",
|
||||
"dist/lodash.js",
|
||||
"dist/lodash.min.js",
|
||||
"dist/lodash.compat.js",
|
||||
"dist/lodash.compat.min.js",
|
||||
"dist/lodash.underscore.js",
|
||||
"dist/lodash.underscore.min.js"
|
||||
],
|
||||
"author": {
|
||||
"name": "John-David Dalton",
|
||||
"email": "john@fusejs.com",
|
||||
"web": "http://allyoucanleet.com/"
|
||||
"jam": {
|
||||
"main": "dist/lodash.compat.js",
|
||||
"include": [
|
||||
"LICENSE.txt",
|
||||
"dist/lodash.js",
|
||||
"dist/lodash.min.js",
|
||||
"dist/lodash.compat.js",
|
||||
"dist/lodash.compat.min.js",
|
||||
"dist/lodash.underscore.js",
|
||||
"dist/lodash.underscore.min.js"
|
||||
]
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/bestiejs/lodash/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bestiejs/lodash.git"
|
||||
},
|
||||
"engines": [
|
||||
"node",
|
||||
"rhino"
|
||||
],
|
||||
"directories": {
|
||||
"doc": "./doc",
|
||||
"test": "./test"
|
||||
"volo": {
|
||||
"type": "directory",
|
||||
"ignore": [
|
||||
".*",
|
||||
"*.custom.*",
|
||||
"*.min.*",
|
||||
"*.template.*",
|
||||
"*.map",
|
||||
"*.md",
|
||||
"lodash.js",
|
||||
"index.js",
|
||||
"bower.json",
|
||||
"component.json",
|
||||
"doc",
|
||||
"modularize",
|
||||
"node_modules",
|
||||
"perf",
|
||||
"test",
|
||||
"vendor"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,36 +13,70 @@
|
||||
position: absolute;
|
||||
left: -9999em;
|
||||
}
|
||||
#FirebugUI {
|
||||
top: 2em;
|
||||
}
|
||||
#perf-toolbar {
|
||||
background-color: #EEE;
|
||||
color: #5E740B;
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
font-size: small;
|
||||
padding: 0.5em 0 0.5em 2em;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="perf-toolbar"></div>
|
||||
<script src="../vendor/platform.js/platform.js"></script>
|
||||
<script src="../lodash.js"></script>
|
||||
<script src="../vendor/benchmark.js/benchmark.js"></script>
|
||||
<script src="../vendor/firebug-lite/src/firebug-lite-debug.js"></script>
|
||||
<script src="perf-ui.js"></script>
|
||||
<script>
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
</script>
|
||||
<script>
|
||||
var lodash = _.noConflict();
|
||||
</script>
|
||||
<script src="../vendor/underscore/underscore.js"></script>
|
||||
<script src="../vendor/benchmark.js/benchmark.js"></script>
|
||||
<script src="../vendor/firebug-lite/src/firebug-lite-debug.js"></script>
|
||||
<script>
|
||||
document.write('<script src="' + ui.otherPath + '"><\/script>');
|
||||
</script>
|
||||
<script src="perf.js"></script>
|
||||
<script>
|
||||
(function() {
|
||||
if (!/[?&]nojava=true(?:&|$)/.test(location.search)) {
|
||||
// using innerHTML avoids an alert in some versions of IE6
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = '<applet code=nano archive="../vendor/benchmark.js/nano.jar">';
|
||||
document.body.insertBefore(div.lastChild, document.body.firstChild);
|
||||
var measured,
|
||||
perfNow,
|
||||
begin = new Date;
|
||||
|
||||
function init() {
|
||||
var fbUI = document.getElementById('FirebugUI'),
|
||||
fbDoc = fbUI && (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc,
|
||||
fbCommandLine = fbDoc && fbDoc.getElementById('fbCommandLine');
|
||||
|
||||
if (!fbCommandLine) {
|
||||
return setTimeout(init, 15);
|
||||
}
|
||||
fbUI.style.height = (
|
||||
Math.max(document.documentElement.clientHeight, document.body.clientHeight) -
|
||||
document.getElementById('perf-toolbar').clientHeight
|
||||
) + 'px';
|
||||
|
||||
fbDoc.body.style.height = fbDoc.documentElement.style.height = '100%';
|
||||
setTimeout(run, 15);
|
||||
}
|
||||
|
||||
// is the applet permitted?
|
||||
if (!/[?&]nojava=true(?:&|$)/.test(location.search)) {
|
||||
// is the applet really needed?
|
||||
while (!(measured = new Date - begin)) { }
|
||||
if (measured != 1 && !((perfNow = window.performance) && typeof (perfNow.now || perfNow.webkitNow) == 'function')) {
|
||||
// load applet
|
||||
document.write('<applet code="nano" archive="../vendor/benchmark.js/nano.jar"></applet>');
|
||||
}
|
||||
}
|
||||
window.onload = init;
|
||||
}());
|
||||
|
||||
window.onload = function() {
|
||||
var fbUI = document.getElementById('FirebugUI'),
|
||||
fbDoc = (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc,
|
||||
sibling = document.getElementsByTagName('script')[0],
|
||||
script = document.createElement('script');
|
||||
|
||||
fbUI.style.height = fbDoc.body.style.height = fbDoc.documentElement.style.height = '100%';
|
||||
script.src = 'perf.js?t=' + (+new Date);
|
||||
sibling.parentNode.insertBefore(script, sibling);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
172
perf/perf-ui.js
Normal file
@@ -0,0 +1,172 @@
|
||||
;(function(window) {
|
||||
'use strict';
|
||||
|
||||
/** The base path of the builds */
|
||||
var basePath = '../';
|
||||
|
||||
/** The Lo-Dash build to load */
|
||||
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
|
||||
|
||||
/** The other library to load */
|
||||
var other = (other = /other=([^&]+)/.exec(location.search)) && decodeURIComponent(other[1]);
|
||||
|
||||
/** The `ui` object */
|
||||
var ui = {};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Registers an event listener on an element.
|
||||
*
|
||||
* @private
|
||||
* @param {Element} element The element.
|
||||
* @param {string} eventName The name of the event.
|
||||
* @param {Function} handler The event handler.
|
||||
* @returns {Element} The element.
|
||||
*/
|
||||
function addListener(element, eventName, handler) {
|
||||
if (typeof element.addEventListener != 'undefined') {
|
||||
element.addEventListener(eventName, handler, false);
|
||||
} else if (typeof element.attachEvent != 'undefined') {
|
||||
element.attachEvent('on' + eventName, handler);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose `ui.urlParams` properties
|
||||
ui.urlParams = {
|
||||
'build': build,
|
||||
'other': other
|
||||
};
|
||||
|
||||
// expose Lo-Dash build file path
|
||||
ui.buildPath = (function() {
|
||||
var result;
|
||||
switch (build) {
|
||||
case 'lodash-compat': result = 'dist/lodash.compat.min.js'; break;
|
||||
case 'lodash-legacy': result = 'dist/lodash.legacy.min.js'; break;
|
||||
case 'lodash-mobile': result = 'dist/lodash.mobile.min.js'; break;
|
||||
case 'lodash-underscore': result = 'dist/lodash.underscore.min.js'; break;
|
||||
case 'lodash-custom-dev': result = 'lodash.custom.js'; break;
|
||||
case 'lodash-custom': result = 'lodash.custom.min.js'; break;
|
||||
case 'lodash-modern':
|
||||
case null: result = 'dist/lodash.min.js'; break;
|
||||
default: return build;
|
||||
}
|
||||
return basePath + result;
|
||||
}());
|
||||
|
||||
// expose other library file path
|
||||
ui.otherPath = (function() {
|
||||
var result;
|
||||
switch (other) {
|
||||
case 'lodash-compat': result = 'dist/lodash.compat.min.js'; break;
|
||||
case 'lodash-legacy': result = 'dist/lodash.legacy.min.js'; break;
|
||||
case 'lodash-mobile': result = 'dist/lodash.mobile.min.js'; break;
|
||||
case 'lodash-modern': result = 'dist/lodash.min.js'; break;
|
||||
case 'lodash-underscore': result = 'dist/lodash.underscore.min.js'; break;
|
||||
case 'lodash-custom-dev': result = 'lodash.custom.js'; break;
|
||||
case 'lodash-custom': result = 'lodash.custom.min.js'; break;
|
||||
case 'underscore-dev': result = 'vendor/underscore/underscore.js'; break;
|
||||
case 'underscore':
|
||||
case null: result = 'vendor/underscore/underscore-min.js'; break;
|
||||
default: return other;
|
||||
}
|
||||
return basePath + result;
|
||||
}());
|
||||
|
||||
// initialize controls
|
||||
addListener(window, 'load', function() {
|
||||
function eventHandler(event) {
|
||||
var buildIndex = buildList.selectedIndex,
|
||||
otherIndex = otherList.selectedIndex,
|
||||
search = location.search.replace(/^\?|&?(?:build|other)=[^&]*&?/g, '');
|
||||
|
||||
if (event.stopPropagation) {
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
location.href =
|
||||
location.href.split('?')[0] + '?' +
|
||||
(search ? search + '&' : '') +
|
||||
'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' +
|
||||
'other=' + (otherIndex < 0 ? other : otherList[otherIndex].value);
|
||||
}
|
||||
|
||||
var span1 = document.createElement('span');
|
||||
span1.style.cssText = 'float:right';
|
||||
span1.innerHTML =
|
||||
'<label for="perf-build">Build: </label>' +
|
||||
'<select id="perf-build">' +
|
||||
'<option value="lodash-compat">Lo-Dash (compat)</option>' +
|
||||
'<option value="lodash-legacy">Lo-Dash (legacy)</option>' +
|
||||
'<option value="lodash-mobile">Lo-Dash (mobile)</option>' +
|
||||
'<option value="lodash-modern">Lo-Dash (modern)</option>' +
|
||||
'<option value="lodash-underscore">Lo-Dash (underscore)</option>' +
|
||||
'<option value="lodash-custom-dev">Lo-Dash (custom development)</option>' +
|
||||
'<option value="lodash-custom">Lo-Dash (custom production)</option>' +
|
||||
'</select>';
|
||||
|
||||
var span2 = document.createElement('span');
|
||||
span2.style.cssText = 'float:right';
|
||||
span2.innerHTML =
|
||||
'<label for="perf-other">Other Library: </label>' +
|
||||
'<select id="perf-other">' +
|
||||
'<option value="underscore-dev">Underscore (development)</option>' +
|
||||
'<option value="underscore">Underscore (production)</option>' +
|
||||
'<option value="lodash-compat">Lo-Dash (compat)</option>' +
|
||||
'<option value="lodash-legacy">Lo-Dash (legacy)</option>' +
|
||||
'<option value="lodash-mobile">Lo-Dash (mobile)</option>' +
|
||||
'<option value="lodash-modern">Lo-Dash (modern)</option>' +
|
||||
'<option value="lodash-underscore">Lo-Dash (underscore)</option>' +
|
||||
'<option value="lodash-custom-dev">Lo-Dash (custom development)</option>' +
|
||||
'<option value="lodash-custom">Lo-Dash (custom production)</option>' +
|
||||
'</select>';
|
||||
|
||||
var buildList = span1.lastChild,
|
||||
otherList = span2.lastChild,
|
||||
toolbar = document.getElementById('perf-toolbar');
|
||||
|
||||
toolbar.appendChild(span2);
|
||||
toolbar.appendChild(span1);
|
||||
|
||||
buildList.selectedIndex = (function() {
|
||||
switch (build) {
|
||||
case 'lodash-compat': return 0;
|
||||
case 'lodash-legacy': return 1;
|
||||
case 'lodash-mobile': return 2;
|
||||
case 'lodash-underscore': return 4;
|
||||
case 'lodash-custom-dev': return 5;
|
||||
case 'lodash-custom': return 6;
|
||||
case 'lodash-modern':
|
||||
case null: return 3;
|
||||
}
|
||||
return -1;
|
||||
}());
|
||||
|
||||
otherList.selectedIndex = (function() {
|
||||
switch (other) {
|
||||
case 'underscore-dev': return 0;
|
||||
case 'lodash-compat': return 2;
|
||||
case 'lodash-legacy': return 3;
|
||||
case 'lodash-mobile': return 4;
|
||||
case 'lodash-modern': return 5;
|
||||
case 'lodash-underscore': return 6;
|
||||
case 'lodash-custom-dev': return 7;
|
||||
case 'lodash-custom': return 8;
|
||||
case 'underscore':
|
||||
case null: return 1;
|
||||
}
|
||||
return -1;
|
||||
}());
|
||||
|
||||
addListener(buildList, 'change', eventHandler);
|
||||
addListener(otherList, 'change', eventHandler);
|
||||
});
|
||||
|
||||
// expose `ui`
|
||||
window.ui = ui;
|
||||
|
||||
}(this));
|
||||
2115
perf/perf.js
@@ -1,9 +1,14 @@
|
||||
cd "$(dirname "$0")"
|
||||
for cmd in node narwhal ringo rhino; do
|
||||
echo ""
|
||||
echo "Running performance suite in $cmd..."
|
||||
$cmd perf.js
|
||||
|
||||
echo "Running performance suite in node..."
|
||||
node perf.js ../dist/lodash.js && node perf.js ../dist/lodash.min.js
|
||||
|
||||
for cmd in rhino "rhino -require" narwhal ringo phantomjs; do
|
||||
echo ""
|
||||
echo "Running performance suite in $cmd..."
|
||||
$cmd perf.js ../dist/lodash.compat.js && $cmd perf.js ../dist/lodash.compat.min.js
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Running performance suite in a browser..."
|
||||
open index.html
|
||||
open index.html
|
||||
|
||||
@@ -3,30 +3,39 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Backbone Test Suite</title>
|
||||
<link rel="stylesheet" href="../vendor/backbone/test/vendor/qunit.css">
|
||||
<link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css">
|
||||
<style>
|
||||
body > #qunit-header {
|
||||
display: none;
|
||||
}
|
||||
#jslitmus {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<h1 id="qunit-header"><a href="#">Backbone Speed Suite</a></h1>
|
||||
<h1 id="qunit-header"></h1>
|
||||
<div id="qunit-fixture">
|
||||
<div id='testElement'>
|
||||
<h1>Test</h1>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../vendor/backbone/test/vendor/json2.js"></script>
|
||||
<script src="../vendor/backbone/test/vendor/jquery-1.7.1.js"></script>
|
||||
<script src="../vendor/backbone/test/vendor/qunit.js"></script>
|
||||
<script src="../vendor/backbone/test/vendor/jslitmus.js"></script>
|
||||
<script src="../vendor/json-js/json2.js"></script>
|
||||
<script src="../vendor/jquery/jquery.js"></script>
|
||||
<script src="../vendor/platform.js/platform.js"></script>
|
||||
<script src="../vendor/qunit/qunit/qunit.js"></script>
|
||||
<script src="test-ui.js"></script>
|
||||
<script src="../lodash.js"></script>
|
||||
<script>
|
||||
var lodash = _.noConflict();
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
</script>
|
||||
<script>
|
||||
_.mixin({
|
||||
'debounce': _.debounce || lodash.debounce,
|
||||
'defer': _.defer || lodash.defer
|
||||
});
|
||||
</script>
|
||||
<script src="../vendor/backbone/backbone.js"></script>
|
||||
<script src="../vendor/backbone/test/environment.js"></script>
|
||||
<script src="../vendor/backbone/test/noconflict.js"></script>
|
||||
<script src="../vendor/backbone/test/events.js"></script>
|
||||
<script src="../vendor/backbone/test/model.js"></script>
|
||||
@@ -34,6 +43,5 @@
|
||||
<script src="../vendor/backbone/test/router.js"></script>
|
||||
<script src="../vendor/backbone/test/view.js"></script>
|
||||
<script src="../vendor/backbone/test/sync.js"></script>
|
||||
<script src="../vendor/backbone/test/setdomlibrary.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
173
test/index.html
@@ -4,50 +4,163 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Lo-Dash Test Suite</title>
|
||||
<link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css">
|
||||
<style>
|
||||
#exports {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<script src="../vendor/qunit/qunit/qunit.js"></script>
|
||||
<script src="../vendor/platform.js/platform.js"></script>
|
||||
<script src="test-ui.js"></script>
|
||||
<div id="qunit"></div>
|
||||
<div id="exports"></div>
|
||||
<script>
|
||||
var _2,
|
||||
_3 = Object.keys;
|
||||
// set bad shims
|
||||
Array._isArray = Array.isArray;
|
||||
Array.isArray = function() { return false; };
|
||||
|
||||
Function.prototype._bind = Function.prototype.bind;
|
||||
Function.prototype.bind = function() { return function() {}; };
|
||||
|
||||
Object._defineProperty = Object.defineProperty;
|
||||
Object.defineProperty = function() {};
|
||||
|
||||
Object._keys = Object.keys;
|
||||
Object.keys = function() { return []; };
|
||||
</script>
|
||||
<script src="../lodash.js"></script>
|
||||
<script>
|
||||
var lodashBadKeys = _,
|
||||
_ = 1;
|
||||
|
||||
Object.keys = _3;
|
||||
_3 = void 0;
|
||||
// load Lo-Dash and expose it to the bad `Object.keys` shim
|
||||
document.write('<script src="' + (ui.isModularize ? '../lodash.js' : ui.buildPath) + '"><\/script>');
|
||||
</script>
|
||||
<script src="../lodash.js"></script>
|
||||
<script src="../vendor/requirejs/require.js"></script>
|
||||
<script>
|
||||
if (/[?&]norequire=true(?:&|$)/.test(location.search)) {
|
||||
require = define = null;
|
||||
document.write('<script src="test.js"><\/script>');
|
||||
// store Lo-Dash to test for bad shim detection
|
||||
var lodashBadShim = window._;
|
||||
|
||||
// restore native methods
|
||||
if (Array._isArray) {
|
||||
Array.isArray = Array._isArray;
|
||||
} else {
|
||||
delete Array.isArray;
|
||||
}
|
||||
else {
|
||||
if (Function.prototype._bind) {
|
||||
Function.prototype.bind = Function.prototype._bind;
|
||||
} else {
|
||||
delete Function.prototype.bind;
|
||||
}
|
||||
if (Object._defineProperty) {
|
||||
Object.defineProperty = Object._defineProperty;
|
||||
} else {
|
||||
delete Object.defineProperty;
|
||||
}
|
||||
if (Object._keys) {
|
||||
Object.keys = Object._keys;
|
||||
} else {
|
||||
delete Object.keys;
|
||||
}
|
||||
delete Array._isArray;
|
||||
delete Function.prototype._bind;
|
||||
delete Object._defineProperty;
|
||||
delete Object._keys;
|
||||
|
||||
// load Lo-Dash again to overwrite the existing `_` value
|
||||
document.write('<script src="' + (ui.isModularize ? '../lodash.js' : ui.buildPath) + '"><\/script>');
|
||||
|
||||
// load test.js if not using require.js
|
||||
document.write(ui.urlParams.loader == 'none'
|
||||
? '<script src="test.js"><\/script>'
|
||||
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
||||
);
|
||||
</script>
|
||||
<script>
|
||||
var lodashModule,
|
||||
shimmedModule,
|
||||
underscoreModule;
|
||||
|
||||
(function() {
|
||||
if (window.curl) {
|
||||
curl.config({ 'apiName': 'require' });
|
||||
}
|
||||
if (!window.require) {
|
||||
return;
|
||||
}
|
||||
var reBasename = /[\w.-]+$/,
|
||||
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
|
||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||
locationPath = modulePath.replace(reBasename, ''),
|
||||
moduleMain = modulePath.match(reBasename)[0];
|
||||
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
// load Lo-Dash as a module
|
||||
require({
|
||||
'baseUrl': '../vendor/requirejs/',
|
||||
'baseUrl': './',
|
||||
'urlArgs': 't=' + (+new Date),
|
||||
'paths': {
|
||||
'lodash': '../../lodash',
|
||||
'underscore': './../../lodash'
|
||||
'packages': [
|
||||
{
|
||||
'name': 'lodash',
|
||||
'location': locationPath,
|
||||
'main': moduleMain
|
||||
},
|
||||
{
|
||||
'name': 'shimmed',
|
||||
'location': './abc/../' + locationPath,
|
||||
'main': moduleMain
|
||||
},
|
||||
{
|
||||
'name': 'underscore',
|
||||
'location': './xyz/../' + locationPath,
|
||||
'main': moduleMain
|
||||
},
|
||||
{
|
||||
'name': 'test',
|
||||
'location': basePath + '/test',
|
||||
'main': 'test',
|
||||
'config': {
|
||||
// work around no global being exported
|
||||
'exports': 'QUnit',
|
||||
'loader': 'curl/loader/legacy'
|
||||
}
|
||||
}
|
||||
],
|
||||
'shim': {
|
||||
'shimmed': {
|
||||
'exports': '_'
|
||||
}
|
||||
}
|
||||
},
|
||||
['lodash', 'underscore'], function(lodash, lodashAsUnderscore) {
|
||||
_2 = lodash.noConflict();
|
||||
_2.moduleName = 'lodash';
|
||||
|
||||
_3 = lodashAsUnderscore.noConflict();
|
||||
_3.moduleName = 'underscore';
|
||||
|
||||
require(['test.js']);
|
||||
['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) {
|
||||
if (shimmed && shimmed.noConflict) {
|
||||
shimmedModule = shimmed.noConflict();
|
||||
shimmedModule.moduleName = 'shimmed';
|
||||
}
|
||||
if (underscore && underscore.noConflict) {
|
||||
underscoreModule = underscore.noConflict();
|
||||
underscoreModule.moduleName = 'underscore';
|
||||
}
|
||||
if (lodash && lodash.noConflict) {
|
||||
lodashModule = lodash.noConflict();
|
||||
lodashModule.moduleName = 'lodash';
|
||||
}
|
||||
if (ui.isModularize) {
|
||||
window._ = lodash;
|
||||
}
|
||||
require(['test'], function() {
|
||||
QUnit.start();
|
||||
});
|
||||
});
|
||||
}
|
||||
}());
|
||||
|
||||
// set a more readable browser name
|
||||
window.onload = function() {
|
||||
var timeoutId = setInterval(function() {
|
||||
var ua = document.getElementById('qunit-userAgent');
|
||||
if (ua) {
|
||||
ua.innerHTML = platform;
|
||||
clearInterval(timeoutId);
|
||||
}
|
||||
}, 16);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
15
test/run-test.sh
Executable file → Normal file
@@ -1,9 +1,14 @@
|
||||
cd "$(dirname "$0")"
|
||||
for cmd in rhino ringo narwhal node; do
|
||||
echo ""
|
||||
echo "Testing in $cmd..."
|
||||
$cmd test.js
|
||||
|
||||
for cmd in rhino "rhino -require" narwhal ringo phantomjs; do
|
||||
echo "Testing in $cmd..."
|
||||
$cmd test.js ../dist/lodash.compat.js && $cmd test.js ../dist/lodash.compat.min.js
|
||||
echo ""
|
||||
done
|
||||
|
||||
echo "Testing in node..."
|
||||
node test.js ../dist/lodash.js && node test.js ../dist/lodash.min.js
|
||||
|
||||
echo ""
|
||||
echo "Testing in a browser..."
|
||||
open index.html
|
||||
open index.html
|
||||
|
||||
174
test/test-ui.js
Normal file
@@ -0,0 +1,174 @@
|
||||
;(function(window) {
|
||||
'use strict';
|
||||
|
||||
/** The base path of the builds */
|
||||
var basePath = '../';
|
||||
|
||||
/** The Lo-Dash build to load */
|
||||
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
|
||||
|
||||
/** The module loader to use */
|
||||
var loader = (loader = /loader=([^&]+)/.exec(location.search)) && decodeURIComponent(loader[1]);
|
||||
|
||||
/** The `ui` object */
|
||||
var ui = {};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Registers an event listener on an element.
|
||||
*
|
||||
* @private
|
||||
* @param {Element} element The element.
|
||||
* @param {string} eventName The name of the event.
|
||||
* @param {Function} handler The event handler.
|
||||
* @returns {Element} The element.
|
||||
*/
|
||||
function addListener(element, eventName, handler) {
|
||||
if (typeof element.addEventListener != 'undefined') {
|
||||
element.addEventListener(eventName, handler, false);
|
||||
} else if (typeof element.attachEvent != 'undefined') {
|
||||
element.attachEvent('on' + eventName, handler);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose `ui.urlParams` properties
|
||||
ui.urlParams = {
|
||||
'build': build,
|
||||
'loader': loader
|
||||
};
|
||||
|
||||
// expose Lo-Dash build file path
|
||||
ui.buildPath = (function() {
|
||||
var result;
|
||||
switch (build) {
|
||||
case 'lodash-compat': result = 'dist/lodash.compat.min.js'; break;
|
||||
case 'lodash-modern-dev': result = 'dist/lodash.js'; break;
|
||||
case 'lodash-modern': result = 'dist/lodash.min.js'; break;
|
||||
case 'lodash-legacy': result = 'dist/lodash.legacy.min.js'; break;
|
||||
case 'lodash-mobile': result = 'dist/lodash.mobile.min.js'; break;
|
||||
case 'lodash-underscore': result = 'dist/lodash.underscore.min.js'; break;
|
||||
case 'lodash-custom-dev': result = 'lodash.custom.js'; break;
|
||||
case 'lodash-custom': result = 'lodash.custom.min.js'; break;
|
||||
case 'lodash-compat-dev':
|
||||
case null: result = 'lodash.js'; break;
|
||||
default: return build;
|
||||
}
|
||||
return basePath + result;
|
||||
}());
|
||||
|
||||
// expose module loader file path
|
||||
ui.loaderPath = (function() {
|
||||
var result;
|
||||
switch (loader) {
|
||||
case 'curl': result = 'vendor/curl/dist/curl-kitchen-sink/curl.js'; break;
|
||||
case 'dojo': result = 'vendor/dojo/dojo.js'; break;
|
||||
case 'requirejs':
|
||||
case null: result = 'vendor/requirejs/require.js'; break;
|
||||
default: return loader;
|
||||
}
|
||||
return basePath + result;
|
||||
}());
|
||||
|
||||
// used to indicate testing a modularized build
|
||||
ui.isModularize = /\b(?:commonjs|(index|main)\.js|lodash-(?:amd|node)|modularize)\b/.test([location.pathname, location.search, ui.buildPath]);
|
||||
|
||||
// initialize controls
|
||||
addListener(window, 'load', function() {
|
||||
function eventHandler(event) {
|
||||
var buildIndex = buildList.selectedIndex,
|
||||
loaderIndex = loaderList.selectedIndex,
|
||||
search = location.search.replace(/^\?|&?(?:build|loader)=[^&]*&?/g, '');
|
||||
|
||||
if (event.stopPropagation) {
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
location.href =
|
||||
location.href.split('?')[0] + '?' +
|
||||
(search ? search + '&' : '') +
|
||||
'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' +
|
||||
'loader=' + (loaderIndex < 0 ? loader : loaderList[loaderIndex].value);
|
||||
}
|
||||
|
||||
function init() {
|
||||
var toolbar = document.getElementById('qunit-testrunner-toolbar');
|
||||
if (toolbar) {
|
||||
toolbar.appendChild(span1);
|
||||
toolbar.appendChild(span2);
|
||||
|
||||
buildList.selectedIndex = (function() {
|
||||
switch (build) {
|
||||
case 'lodash-compat': return 1;
|
||||
case 'lodash-modern-dev': return 2;
|
||||
case 'lodash-modern': return 3;
|
||||
case 'lodash-legacy': return 4;
|
||||
case 'lodash-mobile': return 5;
|
||||
case 'lodash-underscore': return 6;
|
||||
case 'lodash-custom-dev': return 7;
|
||||
case 'lodash-custom': return 8;
|
||||
case 'lodash-compat-dev':
|
||||
case null: return 0;
|
||||
}
|
||||
return -1;
|
||||
}());
|
||||
|
||||
loaderList.selectedIndex = (function() {
|
||||
switch (loader) {
|
||||
case 'none': return 0
|
||||
case 'curl': return 1;
|
||||
case 'dojo': return 2;
|
||||
case 'requirejs':
|
||||
case null: return 3;
|
||||
}
|
||||
return -1;
|
||||
}());
|
||||
|
||||
addListener(buildList, 'change', eventHandler);
|
||||
addListener(loaderList, 'change', eventHandler);
|
||||
}
|
||||
else {
|
||||
setTimeout(init, 15);
|
||||
}
|
||||
}
|
||||
|
||||
var span1 = document.createElement('span');
|
||||
span1.style.cssText = 'float:right';
|
||||
span1.innerHTML =
|
||||
'<label for="qunit-build">Build: </label>' +
|
||||
'<select id="qunit-build">' +
|
||||
'<option value="lodash-compat-dev">Lo-Dash (compat development)</option>' +
|
||||
'<option value="lodash-compat">Lo-Dash (compat production)</option>' +
|
||||
'<option value="lodash-modern-dev">Lo-Dash (modern development)</option>' +
|
||||
'<option value="lodash-modern">Lo-Dash (modern production)</option>' +
|
||||
'<option value="lodash-legacy">Lo-Dash (legacy)</option>' +
|
||||
'<option value="lodash-mobile">Lo-Dash (mobile)</option>' +
|
||||
'<option value="lodash-underscore">Lo-Dash (underscore)</option>' +
|
||||
'<option value="lodash-custom-dev">Lo-Dash (custom development)</option>' +
|
||||
'<option value="lodash-custom">Lo-Dash (custom production)</option>' +
|
||||
'</select>';
|
||||
|
||||
var span2 = document.createElement('span');
|
||||
span2.style.cssText = 'float:right';
|
||||
span2.innerHTML =
|
||||
'<label for="qunit-loader">Loader: </label>' +
|
||||
'<select id="qunit-loader">' +
|
||||
'<option value="none">None</option>' +
|
||||
'<option value="curl">Curl</option>' +
|
||||
'<option value="dojo">Dojo</option>' +
|
||||
'<option value="requirejs">RequireJS</option>' +
|
||||
'</select>';
|
||||
|
||||
var buildList = span1.lastChild,
|
||||
loaderList = span2.lastChild;
|
||||
|
||||
init();
|
||||
});
|
||||
|
||||
// expose `ui`
|
||||
window.ui = ui;
|
||||
|
||||
}(this));
|
||||
4664
test/test.js
@@ -3,9 +3,9 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Underscore Test Suite</title>
|
||||
<link rel="stylesheet" href="../vendor/underscore/test/vendor/qunit.css">
|
||||
<link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css">
|
||||
<style>
|
||||
#jslitmus, iframe {
|
||||
iframe {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@@ -17,18 +17,121 @@
|
||||
<div id="id1"></div>
|
||||
<div id="id2"></div>
|
||||
</div>
|
||||
<img id="chart_image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">
|
||||
</div>
|
||||
<script src="../vendor/backbone/test/vendor/json2.js"></script>
|
||||
<script src="../vendor/underscore/test/vendor/jquery.js"></script>
|
||||
<script src="../vendor/underscore/test/vendor/qunit.js"></script>
|
||||
<script src="../vendor/underscore/test/vendor/jslitmus.js"></script>
|
||||
<script src="../lodash.js"></script>
|
||||
<script src="../vendor/underscore/test/collections.js"></script>
|
||||
<script src="../vendor/underscore/test/arrays.js"></script>
|
||||
<script src="../vendor/underscore/test/functions.js"></script>
|
||||
<script src="../vendor/underscore/test/objects.js"></script>
|
||||
<script src="../vendor/underscore/test/utility.js"></script>
|
||||
<script src="../vendor/underscore/test/chaining.js"></script>
|
||||
<script src="../vendor/qunit/qunit/qunit.js"></script>
|
||||
<script src="../vendor/jquery/jquery.js"></script>
|
||||
<script src="../vendor/platform.js/platform.js"></script>
|
||||
<script src="test-ui.js"></script>
|
||||
<script>
|
||||
function init(lodash) {
|
||||
var arrayRef = [],
|
||||
push = arrayRef.push;
|
||||
|
||||
if (!lodash().map()) {
|
||||
return;
|
||||
}
|
||||
lodash.mixin = function(object) {
|
||||
lodash.forEach(lodash.functions(object), function(methodName) {
|
||||
var func = lodash[methodName] = object[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
var args = [this.__wrapped__];
|
||||
push.apply(args, arguments);
|
||||
|
||||
var result = func.apply(lodash, args);
|
||||
if (this.__chain__) {
|
||||
result = new lodash(result);
|
||||
result.__chain__ = true;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
lodash.forEach(['pop', 'shift'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
func.apply(this.__wrapped__, arguments);
|
||||
return this;
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
lodash.mixin(lodash);
|
||||
|
||||
// expose lodash
|
||||
window._ = lodash;
|
||||
}
|
||||
|
||||
// load Lo-Dash again to overwrite the existing `_` value
|
||||
document.write('<script src="' + (ui.isModularize ? '../lodash.js' : ui.buildPath) + '"><\/script>');
|
||||
|
||||
// load test.js if not using require.js
|
||||
document.write(ui.urlParams.loader != 'none'
|
||||
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
||||
: ([
|
||||
'<script src="../vendor/underscore/test/collections.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/arrays.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/functions.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/objects.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/utility.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/chaining.js"><\/script>'
|
||||
].join('\n'))
|
||||
);
|
||||
</script>
|
||||
<script>
|
||||
(function() {
|
||||
if (window.curl) {
|
||||
curl.config({ 'apiName': 'require' });
|
||||
}
|
||||
if (!window.require) {
|
||||
init(_);
|
||||
return;
|
||||
}
|
||||
var reBasename = /[\w.-]+$/,
|
||||
basePath = ('//' + location.host + location.pathname).replace(/\btest\/$/, ''),
|
||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||
locationPath = modulePath.replace(reBasename, ''),
|
||||
moduleMain = modulePath.match(reBasename)[0];
|
||||
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
// load Lo-Dash as a module
|
||||
require({
|
||||
'baseUrl': './',
|
||||
'urlArgs': 't=' + (+new Date),
|
||||
'packages': [
|
||||
{
|
||||
'name': 'lodash',
|
||||
'location': locationPath,
|
||||
'main': moduleMain
|
||||
},
|
||||
{
|
||||
'name': 'test',
|
||||
'location': '../vendor/underscore/test',
|
||||
'config': {
|
||||
// work around no global being exported
|
||||
'exports': 'QUnit',
|
||||
'loader': 'curl/loader/legacy'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
['lodash'], function(lodash) {
|
||||
init(lodash);
|
||||
require([
|
||||
'test/collections',
|
||||
'test/arrays',
|
||||
'test/functions',
|
||||
'test/objects',
|
||||
'test/utility',
|
||||
'test/chaining'
|
||||
], function() {
|
||||
QUnit.start();
|
||||
});
|
||||
});
|
||||
}());
|
||||
</script>
|
||||
<script type="text/html" id="template">
|
||||
<%
|
||||
// a comment
|
||||
@@ -36,4 +139,4 @@
|
||||
<li><%= data %></li>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
6
test/worker.js
Normal file
@@ -0,0 +1,6 @@
|
||||
addEventListener('message', function(e) {
|
||||
if (e.data) {
|
||||
importScripts(e.data);
|
||||
postMessage(_.VERSION);
|
||||
}
|
||||
}, false);
|
||||
1
vendor/backbone
vendored
22
vendor/backbone/LICENSE
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2010-2013 Jeremy Ashkenas, DocumentCloud
|
||||
|
||||
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.
|
||||
1571
vendor/backbone/backbone.js
vendored
Normal file
1100
vendor/backbone/test/collection.js
vendored
Normal file
45
vendor/backbone/test/environment.js
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
(function() {
|
||||
|
||||
var Environment = this.Environment = function(){};
|
||||
|
||||
_.extend(Environment.prototype, {
|
||||
|
||||
ajax: Backbone.ajax,
|
||||
|
||||
sync: Backbone.sync,
|
||||
|
||||
emulateHTTP: Backbone.emulateHTTP,
|
||||
|
||||
emulateJSON: Backbone.emulateJSON,
|
||||
|
||||
setup: function() {
|
||||
var env = this;
|
||||
|
||||
// Capture ajax settings for comparison.
|
||||
Backbone.ajax = function(settings) {
|
||||
env.ajaxSettings = settings;
|
||||
};
|
||||
|
||||
// Capture the arguments to Backbone.sync for comparison.
|
||||
Backbone.sync = function(method, model, options) {
|
||||
env.syncArgs = {
|
||||
method: method,
|
||||
model: model,
|
||||
options: options
|
||||
};
|
||||
env.sync.apply(this, arguments);
|
||||
};
|
||||
},
|
||||
|
||||
teardown: function() {
|
||||
this.syncArgs = null;
|
||||
this.ajaxSettings = null;
|
||||
Backbone.sync = this.sync;
|
||||
Backbone.ajax = this.ajax;
|
||||
Backbone.emulateHTTP = this.emulateHTTP;
|
||||
Backbone.emulateJSON = this.emulateJSON;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
452
vendor/backbone/test/events.js
vendored
Normal file
@@ -0,0 +1,452 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
module("Backbone.Events");
|
||||
|
||||
test("on and trigger", 2, function() {
|
||||
var obj = { counter: 0 };
|
||||
_.extend(obj,Backbone.Events);
|
||||
obj.on('event', function() { obj.counter += 1; });
|
||||
obj.trigger('event');
|
||||
equal(obj.counter,1,'counter should be incremented.');
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
equal(obj.counter, 5, 'counter should be incremented five times.');
|
||||
});
|
||||
|
||||
test("binding and triggering multiple events", 4, function() {
|
||||
var obj = { counter: 0 };
|
||||
_.extend(obj, Backbone.Events);
|
||||
|
||||
obj.on('a b c', function() { obj.counter += 1; });
|
||||
|
||||
obj.trigger('a');
|
||||
equal(obj.counter, 1);
|
||||
|
||||
obj.trigger('a b');
|
||||
equal(obj.counter, 3);
|
||||
|
||||
obj.trigger('c');
|
||||
equal(obj.counter, 4);
|
||||
|
||||
obj.off('a c');
|
||||
obj.trigger('a b c');
|
||||
equal(obj.counter, 5);
|
||||
});
|
||||
|
||||
test("binding and triggering with event maps", function() {
|
||||
var obj = { counter: 0 };
|
||||
_.extend(obj, Backbone.Events);
|
||||
|
||||
var increment = function() {
|
||||
this.counter += 1;
|
||||
};
|
||||
|
||||
obj.on({
|
||||
a: increment,
|
||||
b: increment,
|
||||
c: increment
|
||||
}, obj);
|
||||
|
||||
obj.trigger('a');
|
||||
equal(obj.counter, 1);
|
||||
|
||||
obj.trigger('a b');
|
||||
equal(obj.counter, 3);
|
||||
|
||||
obj.trigger('c');
|
||||
equal(obj.counter, 4);
|
||||
|
||||
obj.off({
|
||||
a: increment,
|
||||
c: increment
|
||||
}, obj);
|
||||
obj.trigger('a b c');
|
||||
equal(obj.counter, 5);
|
||||
});
|
||||
|
||||
test("listenTo and stopListening", 1, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenTo(b, 'all', function(){ ok(true); });
|
||||
b.trigger('anything');
|
||||
a.listenTo(b, 'all', function(){ ok(false); });
|
||||
a.stopListening();
|
||||
b.trigger('anything');
|
||||
});
|
||||
|
||||
test("listenTo and stopListening with event maps", 4, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
var cb = function(){ ok(true); };
|
||||
a.listenTo(b, {event: cb});
|
||||
b.trigger('event');
|
||||
a.listenTo(b, {event2: cb});
|
||||
b.on('event2', cb);
|
||||
a.stopListening(b, {event2: cb});
|
||||
b.trigger('event event2');
|
||||
a.stopListening();
|
||||
b.trigger('event event2');
|
||||
});
|
||||
|
||||
test("stopListening with omitted args", 2, function () {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
var cb = function () { ok(true); };
|
||||
a.listenTo(b, 'event', cb);
|
||||
b.on('event', cb);
|
||||
a.listenTo(b, 'event2', cb);
|
||||
a.stopListening(null, {event: cb});
|
||||
b.trigger('event event2');
|
||||
b.off();
|
||||
a.listenTo(b, 'event event2', cb);
|
||||
a.stopListening(null, 'event');
|
||||
a.stopListening();
|
||||
b.trigger('event2');
|
||||
});
|
||||
|
||||
test("listenToOnce and stopListening", 1, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenToOnce(b, 'all', function() { ok(true); });
|
||||
b.trigger('anything');
|
||||
b.trigger('anything');
|
||||
a.listenToOnce(b, 'all', function() { ok(false); });
|
||||
a.stopListening();
|
||||
b.trigger('anything');
|
||||
});
|
||||
|
||||
test("listenTo, listenToOnce and stopListening", 1, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenToOnce(b, 'all', function() { ok(true); });
|
||||
b.trigger('anything');
|
||||
b.trigger('anything');
|
||||
a.listenTo(b, 'all', function() { ok(false); });
|
||||
a.stopListening();
|
||||
b.trigger('anything');
|
||||
});
|
||||
|
||||
test("listenTo and stopListening with event maps", 1, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenTo(b, {change: function(){ ok(true); }});
|
||||
b.trigger('change');
|
||||
a.listenTo(b, {change: function(){ ok(false); }});
|
||||
a.stopListening();
|
||||
b.trigger('change');
|
||||
});
|
||||
|
||||
test("listenTo yourself", 1, function(){
|
||||
var e = _.extend({}, Backbone.Events);
|
||||
e.listenTo(e, "foo", function(){ ok(true); });
|
||||
e.trigger("foo");
|
||||
});
|
||||
|
||||
test("listenTo yourself cleans yourself up with stopListening", 1, function(){
|
||||
var e = _.extend({}, Backbone.Events);
|
||||
e.listenTo(e, "foo", function(){ ok(true); });
|
||||
e.trigger("foo");
|
||||
e.stopListening();
|
||||
e.trigger("foo");
|
||||
});
|
||||
|
||||
test("listenTo with empty callback doesn't throw an error", 1, function(){
|
||||
var e = _.extend({}, Backbone.Events);
|
||||
e.listenTo(e, "foo", null);
|
||||
e.trigger("foo");
|
||||
ok(true);
|
||||
});
|
||||
|
||||
test("trigger all for each event", 3, function() {
|
||||
var a, b, obj = { counter: 0 };
|
||||
_.extend(obj, Backbone.Events);
|
||||
obj.on('all', function(event) {
|
||||
obj.counter++;
|
||||
if (event == 'a') a = true;
|
||||
if (event == 'b') b = true;
|
||||
})
|
||||
.trigger('a b');
|
||||
ok(a);
|
||||
ok(b);
|
||||
equal(obj.counter, 2);
|
||||
});
|
||||
|
||||
test("on, then unbind all functions", 1, function() {
|
||||
var obj = { counter: 0 };
|
||||
_.extend(obj,Backbone.Events);
|
||||
var callback = function() { obj.counter += 1; };
|
||||
obj.on('event', callback);
|
||||
obj.trigger('event');
|
||||
obj.off('event');
|
||||
obj.trigger('event');
|
||||
equal(obj.counter, 1, 'counter should have only been incremented once.');
|
||||
});
|
||||
|
||||
test("bind two callbacks, unbind only one", 2, function() {
|
||||
var obj = { counterA: 0, counterB: 0 };
|
||||
_.extend(obj,Backbone.Events);
|
||||
var callback = function() { obj.counterA += 1; };
|
||||
obj.on('event', callback);
|
||||
obj.on('event', function() { obj.counterB += 1; });
|
||||
obj.trigger('event');
|
||||
obj.off('event', callback);
|
||||
obj.trigger('event');
|
||||
equal(obj.counterA, 1, 'counterA should have only been incremented once.');
|
||||
equal(obj.counterB, 2, 'counterB should have been incremented twice.');
|
||||
});
|
||||
|
||||
test("unbind a callback in the midst of it firing", 1, function() {
|
||||
var obj = {counter: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
var callback = function() {
|
||||
obj.counter += 1;
|
||||
obj.off('event', callback);
|
||||
};
|
||||
obj.on('event', callback);
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
equal(obj.counter, 1, 'the callback should have been unbound.');
|
||||
});
|
||||
|
||||
test("two binds that unbind themeselves", 2, function() {
|
||||
var obj = { counterA: 0, counterB: 0 };
|
||||
_.extend(obj,Backbone.Events);
|
||||
var incrA = function(){ obj.counterA += 1; obj.off('event', incrA); };
|
||||
var incrB = function(){ obj.counterB += 1; obj.off('event', incrB); };
|
||||
obj.on('event', incrA);
|
||||
obj.on('event', incrB);
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
equal(obj.counterA, 1, 'counterA should have only been incremented once.');
|
||||
equal(obj.counterB, 1, 'counterB should have only been incremented once.');
|
||||
});
|
||||
|
||||
test("bind a callback with a supplied context", 1, function () {
|
||||
var TestClass = function () {
|
||||
return this;
|
||||
};
|
||||
TestClass.prototype.assertTrue = function () {
|
||||
ok(true, '`this` was bound to the callback');
|
||||
};
|
||||
|
||||
var obj = _.extend({},Backbone.Events);
|
||||
obj.on('event', function () { this.assertTrue(); }, (new TestClass));
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
test("nested trigger with unbind", 1, function () {
|
||||
var obj = { counter: 0 };
|
||||
_.extend(obj, Backbone.Events);
|
||||
var incr1 = function(){ obj.counter += 1; obj.off('event', incr1); obj.trigger('event'); };
|
||||
var incr2 = function(){ obj.counter += 1; };
|
||||
obj.on('event', incr1);
|
||||
obj.on('event', incr2);
|
||||
obj.trigger('event');
|
||||
equal(obj.counter, 3, 'counter should have been incremented three times');
|
||||
});
|
||||
|
||||
test("callback list is not altered during trigger", 2, function () {
|
||||
var counter = 0, obj = _.extend({}, Backbone.Events);
|
||||
var incr = function(){ counter++; };
|
||||
obj.on('event', function(){ obj.on('event', incr).on('all', incr); })
|
||||
.trigger('event');
|
||||
equal(counter, 0, 'bind does not alter callback list');
|
||||
obj.off()
|
||||
.on('event', function(){ obj.off('event', incr).off('all', incr); })
|
||||
.on('event', incr)
|
||||
.on('all', incr)
|
||||
.trigger('event');
|
||||
equal(counter, 2, 'unbind does not alter callback list');
|
||||
});
|
||||
|
||||
test("#1282 - 'all' callback list is retrieved after each event.", 1, function() {
|
||||
var counter = 0;
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
var incr = function(){ counter++; };
|
||||
obj.on('x', function() {
|
||||
obj.on('y', incr).on('all', incr);
|
||||
})
|
||||
.trigger('x y');
|
||||
strictEqual(counter, 2);
|
||||
});
|
||||
|
||||
test("if no callback is provided, `on` is a noop", 0, function() {
|
||||
_.extend({}, Backbone.Events).on('test').trigger('test');
|
||||
});
|
||||
|
||||
test("if callback is truthy but not a function, `on` should throw an error just like jQuery", 1, function() {
|
||||
var view = _.extend({}, Backbone.Events).on('test', 'noop');
|
||||
throws(function() {
|
||||
view.trigger('test');
|
||||
});
|
||||
});
|
||||
|
||||
test("remove all events for a specific context", 4, function() {
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.on('x y all', function() { ok(true); });
|
||||
obj.on('x y all', function() { ok(false); }, obj);
|
||||
obj.off(null, null, obj);
|
||||
obj.trigger('x y');
|
||||
});
|
||||
|
||||
test("remove all events for a specific callback", 4, function() {
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
var success = function() { ok(true); };
|
||||
var fail = function() { ok(false); };
|
||||
obj.on('x y all', success);
|
||||
obj.on('x y all', fail);
|
||||
obj.off(null, fail);
|
||||
obj.trigger('x y');
|
||||
});
|
||||
|
||||
test("#1310 - off does not skip consecutive events", 0, function() {
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.on('event', function() { ok(false); }, obj);
|
||||
obj.on('event', function() { ok(false); }, obj);
|
||||
obj.off(null, null, obj);
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
test("once", 2, function() {
|
||||
// Same as the previous test, but we use once rather than having to explicitly unbind
|
||||
var obj = { counterA: 0, counterB: 0 };
|
||||
_.extend(obj, Backbone.Events);
|
||||
var incrA = function(){ obj.counterA += 1; obj.trigger('event'); };
|
||||
var incrB = function(){ obj.counterB += 1; };
|
||||
obj.once('event', incrA);
|
||||
obj.once('event', incrB);
|
||||
obj.trigger('event');
|
||||
equal(obj.counterA, 1, 'counterA should have only been incremented once.');
|
||||
equal(obj.counterB, 1, 'counterB should have only been incremented once.');
|
||||
});
|
||||
|
||||
test("once variant one", 3, function() {
|
||||
var f = function(){ ok(true); };
|
||||
|
||||
var a = _.extend({}, Backbone.Events).once('event', f);
|
||||
var b = _.extend({}, Backbone.Events).on('event', f);
|
||||
|
||||
a.trigger('event');
|
||||
|
||||
b.trigger('event');
|
||||
b.trigger('event');
|
||||
});
|
||||
|
||||
test("once variant two", 3, function() {
|
||||
var f = function(){ ok(true); };
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
|
||||
obj
|
||||
.once('event', f)
|
||||
.on('event', f)
|
||||
.trigger('event')
|
||||
.trigger('event');
|
||||
});
|
||||
|
||||
test("once with off", 0, function() {
|
||||
var f = function(){ ok(true); };
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
|
||||
obj.once('event', f);
|
||||
obj.off('event', f);
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
test("once with event maps", function() {
|
||||
var obj = { counter: 0 };
|
||||
_.extend(obj, Backbone.Events);
|
||||
|
||||
var increment = function() {
|
||||
this.counter += 1;
|
||||
};
|
||||
|
||||
obj.once({
|
||||
a: increment,
|
||||
b: increment,
|
||||
c: increment
|
||||
}, obj);
|
||||
|
||||
obj.trigger('a');
|
||||
equal(obj.counter, 1);
|
||||
|
||||
obj.trigger('a b');
|
||||
equal(obj.counter, 2);
|
||||
|
||||
obj.trigger('c');
|
||||
equal(obj.counter, 3);
|
||||
|
||||
obj.trigger('a b c');
|
||||
equal(obj.counter, 3);
|
||||
});
|
||||
|
||||
test("once with off only by context", 0, function() {
|
||||
var context = {};
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.once('event', function(){ ok(false); }, context);
|
||||
obj.off(null, null, context);
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
test("Backbone object inherits Events", function() {
|
||||
ok(Backbone.on === Backbone.Events.on);
|
||||
});
|
||||
|
||||
asyncTest("once with asynchronous events", 1, function() {
|
||||
var func = _.debounce(function() { ok(true); start(); }, 50);
|
||||
var obj = _.extend({}, Backbone.Events).once('async', func);
|
||||
|
||||
obj.trigger('async');
|
||||
obj.trigger('async');
|
||||
});
|
||||
|
||||
test("once with multiple events.", 2, function() {
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.once('x y', function() { ok(true); });
|
||||
obj.trigger('x y');
|
||||
});
|
||||
|
||||
test("Off during iteration with once.", 2, function() {
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
var f = function(){ this.off('event', f); };
|
||||
obj.on('event', f);
|
||||
obj.once('event', function(){});
|
||||
obj.on('event', function(){ ok(true); });
|
||||
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
test("`once` on `all` should work as expected", 1, function() {
|
||||
Backbone.once('all', function() {
|
||||
ok(true);
|
||||
Backbone.trigger('all');
|
||||
});
|
||||
Backbone.trigger('all');
|
||||
});
|
||||
|
||||
test("once without a callback is a noop", 0, function() {
|
||||
_.extend({}, Backbone.Events).once('event').trigger('event');
|
||||
});
|
||||
|
||||
test("event functions are chainable", function() {
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
var obj2 = _.extend({}, Backbone.Events);
|
||||
var fn = function() {};
|
||||
equal(obj, obj.trigger('noeventssetyet'));
|
||||
equal(obj, obj.off('noeventssetyet'));
|
||||
equal(obj, obj.stopListening('noeventssetyet'));
|
||||
equal(obj, obj.on('a', fn));
|
||||
equal(obj, obj.once('c', fn));
|
||||
equal(obj, obj.trigger('a'));
|
||||
equal(obj, obj.listenTo(obj2, 'a', fn));
|
||||
equal(obj, obj.listenToOnce(obj2, 'b', fn));
|
||||
equal(obj, obj.off('a c'));
|
||||
equal(obj, obj.stopListening(obj2, 'a'));
|
||||
equal(obj, obj.stopListening());
|
||||
});
|
||||
|
||||
});
|
||||
1102
vendor/backbone/test/model.js
vendored
Normal file
12
vendor/backbone/test/noconflict.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
module("Backbone.noConflict");
|
||||
|
||||
test('noConflict', 2, function() {
|
||||
var noconflictBackbone = Backbone.noConflict();
|
||||
equal(window.Backbone, undefined, 'Returned window.Backbone');
|
||||
window.Backbone = noconflictBackbone;
|
||||
equal(window.Backbone, noconflictBackbone, 'Backbone is still pointing to the original Backbone');
|
||||
});
|
||||
|
||||
});
|
||||
612
vendor/backbone/test/router.js
vendored
Normal file
@@ -0,0 +1,612 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
var router = null;
|
||||
var location = null;
|
||||
var lastRoute = null;
|
||||
var lastArgs = [];
|
||||
|
||||
function onRoute(router, route, args) {
|
||||
lastRoute = route;
|
||||
lastArgs = args;
|
||||
}
|
||||
|
||||
var Location = function(href) {
|
||||
this.replace(href);
|
||||
};
|
||||
|
||||
_.extend(Location.prototype, {
|
||||
|
||||
replace: function(href) {
|
||||
_.extend(this, _.pick($('<a></a>', {href: href})[0],
|
||||
'href',
|
||||
'hash',
|
||||
'host',
|
||||
'search',
|
||||
'fragment',
|
||||
'pathname',
|
||||
'protocol'
|
||||
));
|
||||
// In IE, anchor.pathname does not contain a leading slash though
|
||||
// window.location.pathname does.
|
||||
if (!/^\//.test(this.pathname)) this.pathname = '/' + this.pathname;
|
||||
},
|
||||
|
||||
toString: function() {
|
||||
return this.href;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
module("Backbone.Router", {
|
||||
|
||||
setup: function() {
|
||||
location = new Location('http://example.com');
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
router = new Router({testing: 101});
|
||||
Backbone.history.interval = 9;
|
||||
Backbone.history.start({pushState: false});
|
||||
lastRoute = null;
|
||||
lastArgs = [];
|
||||
Backbone.history.on('route', onRoute);
|
||||
},
|
||||
|
||||
teardown: function() {
|
||||
Backbone.history.stop();
|
||||
Backbone.history.off('route', onRoute);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var ExternalObject = {
|
||||
value: 'unset',
|
||||
|
||||
routingFunction: function(value) {
|
||||
this.value = value;
|
||||
}
|
||||
};
|
||||
_.bindAll(ExternalObject);
|
||||
|
||||
var Router = Backbone.Router.extend({
|
||||
|
||||
count: 0,
|
||||
|
||||
routes: {
|
||||
"noCallback": "noCallback",
|
||||
"counter": "counter",
|
||||
"search/:query": "search",
|
||||
"search/:query/p:page": "search",
|
||||
"contacts": "contacts",
|
||||
"contacts/new": "newContact",
|
||||
"contacts/:id": "loadContact",
|
||||
"route-event/:arg": "routeEvent",
|
||||
"optional(/:item)": "optionalItem",
|
||||
"named/optional/(y:z)": "namedOptional",
|
||||
"splat/*args/end": "splat",
|
||||
":repo/compare/*from...*to": "github",
|
||||
"decode/:named/*splat": "decode",
|
||||
"*first/complex-*part/*rest": "complex",
|
||||
":entity?*args": "query",
|
||||
"function/:value": ExternalObject.routingFunction,
|
||||
"*anything": "anything"
|
||||
},
|
||||
|
||||
initialize : function(options) {
|
||||
this.testing = options.testing;
|
||||
this.route('implicit', 'implicit');
|
||||
},
|
||||
|
||||
counter: function() {
|
||||
this.count++;
|
||||
},
|
||||
|
||||
implicit: function() {
|
||||
this.count++;
|
||||
},
|
||||
|
||||
search : function(query, page) {
|
||||
this.query = query;
|
||||
this.page = page;
|
||||
},
|
||||
|
||||
contacts: function(){
|
||||
this.contact = 'index';
|
||||
},
|
||||
|
||||
newContact: function(){
|
||||
this.contact = 'new';
|
||||
},
|
||||
|
||||
loadContact: function(){
|
||||
this.contact = 'load';
|
||||
},
|
||||
|
||||
optionalItem: function(arg){
|
||||
this.arg = arg != void 0 ? arg : null;
|
||||
},
|
||||
|
||||
splat: function(args) {
|
||||
this.args = args;
|
||||
},
|
||||
|
||||
github: function(repo, from, to) {
|
||||
this.repo = repo;
|
||||
this.from = from;
|
||||
this.to = to;
|
||||
},
|
||||
|
||||
complex: function(first, part, rest) {
|
||||
this.first = first;
|
||||
this.part = part;
|
||||
this.rest = rest;
|
||||
},
|
||||
|
||||
query: function(entity, args) {
|
||||
this.entity = entity;
|
||||
this.queryArgs = args;
|
||||
},
|
||||
|
||||
anything: function(whatever) {
|
||||
this.anything = whatever;
|
||||
},
|
||||
|
||||
namedOptional: function(z) {
|
||||
this.z = z;
|
||||
},
|
||||
|
||||
decode: function(named, path) {
|
||||
this.named = named;
|
||||
this.path = path;
|
||||
},
|
||||
|
||||
routeEvent: function(arg) {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
test("initialize", 1, function() {
|
||||
equal(router.testing, 101);
|
||||
});
|
||||
|
||||
test("routes (simple)", 4, function() {
|
||||
location.replace('http://example.com#search/news');
|
||||
Backbone.history.checkUrl();
|
||||
equal(router.query, 'news');
|
||||
equal(router.page, void 0);
|
||||
equal(lastRoute, 'search');
|
||||
equal(lastArgs[0], 'news');
|
||||
});
|
||||
|
||||
test("routes (simple, but unicode)", 4, function() {
|
||||
location.replace('http://example.com#search/тест');
|
||||
Backbone.history.checkUrl();
|
||||
equal(router.query, "тест");
|
||||
equal(router.page, void 0);
|
||||
equal(lastRoute, 'search');
|
||||
equal(lastArgs[0], "тест");
|
||||
});
|
||||
|
||||
test("routes (two part)", 2, function() {
|
||||
location.replace('http://example.com#search/nyc/p10');
|
||||
Backbone.history.checkUrl();
|
||||
equal(router.query, 'nyc');
|
||||
equal(router.page, '10');
|
||||
});
|
||||
|
||||
test("routes via navigate", 2, function() {
|
||||
Backbone.history.navigate('search/manhattan/p20', {trigger: true});
|
||||
equal(router.query, 'manhattan');
|
||||
equal(router.page, '20');
|
||||
});
|
||||
|
||||
test("routes via navigate for backwards-compatibility", 2, function() {
|
||||
Backbone.history.navigate('search/manhattan/p20', true);
|
||||
equal(router.query, 'manhattan');
|
||||
equal(router.page, '20');
|
||||
});
|
||||
|
||||
test("route precedence via navigate", 6, function(){
|
||||
// check both 0.9.x and backwards-compatibility options
|
||||
_.each([ { trigger: true }, true ], function( options ){
|
||||
Backbone.history.navigate('contacts', options);
|
||||
equal(router.contact, 'index');
|
||||
Backbone.history.navigate('contacts/new', options);
|
||||
equal(router.contact, 'new');
|
||||
Backbone.history.navigate('contacts/foo', options);
|
||||
equal(router.contact, 'load');
|
||||
});
|
||||
});
|
||||
|
||||
test("loadUrl is not called for identical routes.", 0, function() {
|
||||
Backbone.history.loadUrl = function(){ ok(false); };
|
||||
location.replace('http://example.com#route');
|
||||
Backbone.history.navigate('route');
|
||||
Backbone.history.navigate('/route');
|
||||
Backbone.history.navigate('/route');
|
||||
});
|
||||
|
||||
test("use implicit callback if none provided", 1, function() {
|
||||
router.count = 0;
|
||||
router.navigate('implicit', {trigger: true});
|
||||
equal(router.count, 1);
|
||||
});
|
||||
|
||||
test("routes via navigate with {replace: true}", 1, function() {
|
||||
location.replace('http://example.com#start_here');
|
||||
Backbone.history.checkUrl();
|
||||
location.replace = function(href) {
|
||||
strictEqual(href, new Location('http://example.com#end_here').href);
|
||||
};
|
||||
Backbone.history.navigate('end_here', {replace: true});
|
||||
});
|
||||
|
||||
test("routes (splats)", 1, function() {
|
||||
location.replace('http://example.com#splat/long-list/of/splatted_99args/end');
|
||||
Backbone.history.checkUrl();
|
||||
equal(router.args, 'long-list/of/splatted_99args');
|
||||
});
|
||||
|
||||
test("routes (github)", 3, function() {
|
||||
location.replace('http://example.com#backbone/compare/1.0...braddunbar:with/slash');
|
||||
Backbone.history.checkUrl();
|
||||
equal(router.repo, 'backbone');
|
||||
equal(router.from, '1.0');
|
||||
equal(router.to, 'braddunbar:with/slash');
|
||||
});
|
||||
|
||||
test("routes (optional)", 2, function() {
|
||||
location.replace('http://example.com#optional');
|
||||
Backbone.history.checkUrl();
|
||||
ok(!router.arg);
|
||||
location.replace('http://example.com#optional/thing');
|
||||
Backbone.history.checkUrl();
|
||||
equal(router.arg, 'thing');
|
||||
});
|
||||
|
||||
test("routes (complex)", 3, function() {
|
||||
location.replace('http://example.com#one/two/three/complex-part/four/five/six/seven');
|
||||
Backbone.history.checkUrl();
|
||||
equal(router.first, 'one/two/three');
|
||||
equal(router.part, 'part');
|
||||
equal(router.rest, 'four/five/six/seven');
|
||||
});
|
||||
|
||||
test("routes (query)", 5, function() {
|
||||
location.replace('http://example.com#mandel?a=b&c=d');
|
||||
Backbone.history.checkUrl();
|
||||
equal(router.entity, 'mandel');
|
||||
equal(router.queryArgs, 'a=b&c=d');
|
||||
equal(lastRoute, 'query');
|
||||
equal(lastArgs[0], 'mandel');
|
||||
equal(lastArgs[1], 'a=b&c=d');
|
||||
});
|
||||
|
||||
test("routes (anything)", 1, function() {
|
||||
location.replace('http://example.com#doesnt-match-a-route');
|
||||
Backbone.history.checkUrl();
|
||||
equal(router.anything, 'doesnt-match-a-route');
|
||||
});
|
||||
|
||||
test("routes (function)", 3, function() {
|
||||
router.on('route', function(name) {
|
||||
ok(name === '');
|
||||
});
|
||||
equal(ExternalObject.value, 'unset');
|
||||
location.replace('http://example.com#function/set');
|
||||
Backbone.history.checkUrl();
|
||||
equal(ExternalObject.value, 'set');
|
||||
});
|
||||
|
||||
test("Decode named parameters, not splats.", 2, function() {
|
||||
location.replace('http://example.com#decode/a%2Fb/c%2Fd/e');
|
||||
Backbone.history.checkUrl();
|
||||
strictEqual(router.named, 'a/b');
|
||||
strictEqual(router.path, 'c/d/e');
|
||||
});
|
||||
|
||||
test("fires event when router doesn't have callback on it", 1, function() {
|
||||
router.on("route:noCallback", function(){ ok(true); });
|
||||
location.replace('http://example.com#noCallback');
|
||||
Backbone.history.checkUrl();
|
||||
});
|
||||
|
||||
test("#933, #908 - leading slash", 2, function() {
|
||||
location.replace('http://example.com/root/foo');
|
||||
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
Backbone.history.start({root: '/root', hashChange: false, silent: true});
|
||||
strictEqual(Backbone.history.getFragment(), 'foo');
|
||||
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
Backbone.history.start({root: '/root/', hashChange: false, silent: true});
|
||||
strictEqual(Backbone.history.getFragment(), 'foo');
|
||||
});
|
||||
|
||||
test("#1003 - History is started before navigate is called", 1, function() {
|
||||
Backbone.history.stop();
|
||||
Backbone.history.navigate = function(){ ok(Backbone.History.started); };
|
||||
Backbone.history.start();
|
||||
// If this is not an old IE navigate will not be called.
|
||||
if (!Backbone.history.iframe) ok(true);
|
||||
});
|
||||
|
||||
test("#967 - Route callback gets passed encoded values.", 3, function() {
|
||||
var route = 'has%2Fslash/complex-has%23hash/has%20space';
|
||||
Backbone.history.navigate(route, {trigger: true});
|
||||
strictEqual(router.first, 'has/slash');
|
||||
strictEqual(router.part, 'has#hash');
|
||||
strictEqual(router.rest, 'has space');
|
||||
});
|
||||
|
||||
test("correctly handles URLs with % (#868)", 3, function() {
|
||||
location.replace('http://example.com#search/fat%3A1.5%25');
|
||||
Backbone.history.checkUrl();
|
||||
location.replace('http://example.com#search/fat');
|
||||
Backbone.history.checkUrl();
|
||||
equal(router.query, 'fat');
|
||||
equal(router.page, void 0);
|
||||
equal(lastRoute, 'search');
|
||||
});
|
||||
|
||||
test("#1185 - Use pathname when hashChange is not wanted.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/path/name#hash');
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
Backbone.history.start({hashChange: false});
|
||||
var fragment = Backbone.history.getFragment();
|
||||
strictEqual(fragment, location.pathname.replace(/^\//, ''));
|
||||
});
|
||||
|
||||
test("#1206 - Strip leading slash before location.assign.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root/');
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
Backbone.history.start({hashChange: false, root: '/root/'});
|
||||
location.assign = function(pathname) {
|
||||
strictEqual(pathname, '/root/fragment');
|
||||
};
|
||||
Backbone.history.navigate('/fragment');
|
||||
});
|
||||
|
||||
test("#1387 - Root fragment without trailing slash.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root');
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
Backbone.history.start({hashChange: false, root: '/root/', silent: true});
|
||||
strictEqual(Backbone.history.getFragment(), '');
|
||||
});
|
||||
|
||||
test("#1366 - History does not prepend root to fragment.", 2, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root/');
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: function(state, title, url) {
|
||||
strictEqual(url, '/root/x');
|
||||
}
|
||||
}
|
||||
});
|
||||
Backbone.history.start({
|
||||
root: '/root/',
|
||||
pushState: true,
|
||||
hashChange: false
|
||||
});
|
||||
Backbone.history.navigate('x');
|
||||
strictEqual(Backbone.history.fragment, 'x');
|
||||
});
|
||||
|
||||
test("Normalize root.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root');
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: function(state, title, url) {
|
||||
strictEqual(url, '/root/fragment');
|
||||
}
|
||||
}
|
||||
});
|
||||
Backbone.history.start({
|
||||
pushState: true,
|
||||
root: '/root',
|
||||
hashChange: false
|
||||
});
|
||||
Backbone.history.navigate('fragment');
|
||||
});
|
||||
|
||||
test("Normalize root.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root#fragment');
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: function(state, title, url) {},
|
||||
replaceState: function(state, title, url) {
|
||||
strictEqual(url, '/root/fragment');
|
||||
}
|
||||
}
|
||||
});
|
||||
Backbone.history.start({
|
||||
pushState: true,
|
||||
root: '/root'
|
||||
});
|
||||
});
|
||||
|
||||
test("Normalize root.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root');
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
Backbone.history.loadUrl = function() { ok(true); };
|
||||
Backbone.history.start({
|
||||
pushState: true,
|
||||
root: '/root'
|
||||
});
|
||||
});
|
||||
|
||||
test("Normalize root - leading slash.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root');
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: function(){},
|
||||
replaceState: function(){}
|
||||
}
|
||||
});
|
||||
Backbone.history.start({root: 'root'});
|
||||
strictEqual(Backbone.history.root, '/root/');
|
||||
});
|
||||
|
||||
test("Transition from hashChange to pushState.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root#x/y');
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: function(){},
|
||||
replaceState: function(state, title, url){
|
||||
strictEqual(url, '/root/x/y');
|
||||
}
|
||||
}
|
||||
});
|
||||
Backbone.history.start({
|
||||
root: 'root',
|
||||
pushState: true
|
||||
});
|
||||
});
|
||||
|
||||
test("#1619: Router: Normalize empty root", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/');
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: function(){},
|
||||
replaceState: function(){}
|
||||
}
|
||||
});
|
||||
Backbone.history.start({root: ''});
|
||||
strictEqual(Backbone.history.root, '/');
|
||||
});
|
||||
|
||||
test("#1619: Router: nagivate with empty root", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/');
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: function(state, title, url) {
|
||||
strictEqual(url, '/fragment');
|
||||
}
|
||||
}
|
||||
});
|
||||
Backbone.history.start({
|
||||
pushState: true,
|
||||
root: '',
|
||||
hashChange: false
|
||||
});
|
||||
Backbone.history.navigate('fragment');
|
||||
});
|
||||
|
||||
test("Transition from pushState to hashChange.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root/x/y?a=b');
|
||||
location.replace = function(url) {
|
||||
strictEqual(url, '/root/?a=b#x/y');
|
||||
};
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: null,
|
||||
replaceState: null
|
||||
}
|
||||
});
|
||||
Backbone.history.start({
|
||||
root: 'root',
|
||||
pushState: true
|
||||
});
|
||||
});
|
||||
|
||||
test("#1695 - hashChange to pushState with search.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root?a=b#x/y');
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: function(){},
|
||||
replaceState: function(state, title, url){
|
||||
strictEqual(url, '/root/x/y?a=b');
|
||||
}
|
||||
}
|
||||
});
|
||||
Backbone.history.start({
|
||||
root: 'root',
|
||||
pushState: true
|
||||
});
|
||||
});
|
||||
|
||||
test("#1746 - Router allows empty route.", 1, function() {
|
||||
var Router = Backbone.Router.extend({
|
||||
routes: {'': 'empty'},
|
||||
empty: function(){},
|
||||
route: function(route){
|
||||
strictEqual(route, '');
|
||||
}
|
||||
});
|
||||
new Router;
|
||||
});
|
||||
|
||||
test("#1794 - Trailing space in fragments.", 1, function() {
|
||||
var history = new Backbone.History;
|
||||
strictEqual(history.getFragment('fragment '), 'fragment');
|
||||
});
|
||||
|
||||
test("#1820 - Leading slash and trailing space.", 1, function() {
|
||||
var history = new Backbone.History;
|
||||
strictEqual(history.getFragment('/fragment '), 'fragment');
|
||||
});
|
||||
|
||||
test("#1980 - Optional parameters.", 2, function() {
|
||||
location.replace('http://example.com#named/optional/y');
|
||||
Backbone.history.checkUrl();
|
||||
strictEqual(router.z, undefined);
|
||||
location.replace('http://example.com#named/optional/y123');
|
||||
Backbone.history.checkUrl();
|
||||
strictEqual(router.z, '123');
|
||||
});
|
||||
|
||||
test("#2062 - Trigger 'route' event on router instance.", 2, function() {
|
||||
router.on('route', function(name, args) {
|
||||
strictEqual(name, 'routeEvent');
|
||||
deepEqual(args, ['x']);
|
||||
});
|
||||
location.replace('http://example.com#route-event/x');
|
||||
Backbone.history.checkUrl();
|
||||
});
|
||||
|
||||
test("#2255 - Extend routes by making routes a function.", 1, function() {
|
||||
var RouterBase = Backbone.Router.extend({
|
||||
routes: function() {
|
||||
return {
|
||||
home: "root",
|
||||
index: "index.html"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
var RouterExtended = RouterBase.extend({
|
||||
routes: function() {
|
||||
var _super = RouterExtended.__super__.routes;
|
||||
return _.extend(_super(),
|
||||
{ show: "show",
|
||||
search: "search" });
|
||||
}
|
||||
});
|
||||
|
||||
var router = new RouterExtended();
|
||||
deepEqual({home: "root", index: "index.html", show: "show", search: "search"}, router.routes);
|
||||
});
|
||||
|
||||
});
|
||||
212
vendor/backbone/test/sync.js
vendored
Normal file
@@ -0,0 +1,212 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
var Library = Backbone.Collection.extend({
|
||||
url : function() { return '/library'; }
|
||||
});
|
||||
var library;
|
||||
|
||||
var attrs = {
|
||||
title : "The Tempest",
|
||||
author : "Bill Shakespeare",
|
||||
length : 123
|
||||
};
|
||||
|
||||
module("Backbone.sync", _.extend(new Environment, {
|
||||
|
||||
setup : function() {
|
||||
Environment.prototype.setup.apply(this, arguments);
|
||||
library = new Library;
|
||||
library.create(attrs, {wait: false});
|
||||
},
|
||||
|
||||
teardown: function() {
|
||||
Environment.prototype.teardown.apply(this, arguments);
|
||||
Backbone.emulateHTTP = false;
|
||||
}
|
||||
|
||||
}));
|
||||
|
||||
test("read", 4, function() {
|
||||
library.fetch();
|
||||
equal(this.ajaxSettings.url, '/library');
|
||||
equal(this.ajaxSettings.type, 'GET');
|
||||
equal(this.ajaxSettings.dataType, 'json');
|
||||
ok(_.isEmpty(this.ajaxSettings.data));
|
||||
});
|
||||
|
||||
test("passing data", 3, function() {
|
||||
library.fetch({data: {a: 'a', one: 1}});
|
||||
equal(this.ajaxSettings.url, '/library');
|
||||
equal(this.ajaxSettings.data.a, 'a');
|
||||
equal(this.ajaxSettings.data.one, 1);
|
||||
});
|
||||
|
||||
test("create", 6, function() {
|
||||
equal(this.ajaxSettings.url, '/library');
|
||||
equal(this.ajaxSettings.type, 'POST');
|
||||
equal(this.ajaxSettings.dataType, 'json');
|
||||
var data = JSON.parse(this.ajaxSettings.data);
|
||||
equal(data.title, 'The Tempest');
|
||||
equal(data.author, 'Bill Shakespeare');
|
||||
equal(data.length, 123);
|
||||
});
|
||||
|
||||
test("update", 7, function() {
|
||||
library.first().save({id: '1-the-tempest', author: 'William Shakespeare'});
|
||||
equal(this.ajaxSettings.url, '/library/1-the-tempest');
|
||||
equal(this.ajaxSettings.type, 'PUT');
|
||||
equal(this.ajaxSettings.dataType, 'json');
|
||||
var data = JSON.parse(this.ajaxSettings.data);
|
||||
equal(data.id, '1-the-tempest');
|
||||
equal(data.title, 'The Tempest');
|
||||
equal(data.author, 'William Shakespeare');
|
||||
equal(data.length, 123);
|
||||
});
|
||||
|
||||
test("update with emulateHTTP and emulateJSON", 7, function() {
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
|
||||
emulateHTTP: true,
|
||||
emulateJSON: true
|
||||
});
|
||||
equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
equal(this.ajaxSettings.type, 'POST');
|
||||
equal(this.ajaxSettings.dataType, 'json');
|
||||
equal(this.ajaxSettings.data._method, 'PUT');
|
||||
var data = JSON.parse(this.ajaxSettings.data.model);
|
||||
equal(data.id, '2-the-tempest');
|
||||
equal(data.author, 'Tim Shakespeare');
|
||||
equal(data.length, 123);
|
||||
});
|
||||
|
||||
test("update with just emulateHTTP", 6, function() {
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
|
||||
emulateHTTP: true
|
||||
});
|
||||
equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
equal(this.ajaxSettings.type, 'POST');
|
||||
equal(this.ajaxSettings.contentType, 'application/json');
|
||||
var data = JSON.parse(this.ajaxSettings.data);
|
||||
equal(data.id, '2-the-tempest');
|
||||
equal(data.author, 'Tim Shakespeare');
|
||||
equal(data.length, 123);
|
||||
});
|
||||
|
||||
test("update with just emulateJSON", 6, function() {
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
|
||||
emulateJSON: true
|
||||
});
|
||||
equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
equal(this.ajaxSettings.type, 'PUT');
|
||||
equal(this.ajaxSettings.contentType, 'application/x-www-form-urlencoded');
|
||||
var data = JSON.parse(this.ajaxSettings.data.model);
|
||||
equal(data.id, '2-the-tempest');
|
||||
equal(data.author, 'Tim Shakespeare');
|
||||
equal(data.length, 123);
|
||||
});
|
||||
|
||||
test("read model", 3, function() {
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
|
||||
library.first().fetch();
|
||||
equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
equal(this.ajaxSettings.type, 'GET');
|
||||
ok(_.isEmpty(this.ajaxSettings.data));
|
||||
});
|
||||
|
||||
test("destroy", 3, function() {
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
|
||||
library.first().destroy({wait: true});
|
||||
equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
equal(this.ajaxSettings.type, 'DELETE');
|
||||
equal(this.ajaxSettings.data, null);
|
||||
});
|
||||
|
||||
test("destroy with emulateHTTP", 3, function() {
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
|
||||
library.first().destroy({
|
||||
emulateHTTP: true,
|
||||
emulateJSON: true
|
||||
});
|
||||
equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
equal(this.ajaxSettings.type, 'POST');
|
||||
equal(JSON.stringify(this.ajaxSettings.data), '{"_method":"DELETE"}');
|
||||
});
|
||||
|
||||
test("urlError", 2, function() {
|
||||
var model = new Backbone.Model();
|
||||
raises(function() {
|
||||
model.fetch();
|
||||
});
|
||||
model.fetch({url: '/one/two'});
|
||||
equal(this.ajaxSettings.url, '/one/two');
|
||||
});
|
||||
|
||||
test("#1052 - `options` is optional.", 0, function() {
|
||||
var model = new Backbone.Model();
|
||||
model.url = '/test';
|
||||
Backbone.sync('create', model);
|
||||
});
|
||||
|
||||
test("Backbone.ajax", 1, function() {
|
||||
Backbone.ajax = function(settings){
|
||||
strictEqual(settings.url, '/test');
|
||||
};
|
||||
var model = new Backbone.Model();
|
||||
model.url = '/test';
|
||||
Backbone.sync('create', model);
|
||||
});
|
||||
|
||||
test("Call provided error callback on error.", 1, function() {
|
||||
var model = new Backbone.Model;
|
||||
model.url = '/test';
|
||||
Backbone.sync('read', model, {
|
||||
error: function() { ok(true); }
|
||||
});
|
||||
this.ajaxSettings.error();
|
||||
});
|
||||
|
||||
test('Use Backbone.emulateHTTP as default.', 2, function() {
|
||||
var model = new Backbone.Model;
|
||||
model.url = '/test';
|
||||
|
||||
Backbone.emulateHTTP = true;
|
||||
model.sync('create', model);
|
||||
strictEqual(this.ajaxSettings.emulateHTTP, true);
|
||||
|
||||
Backbone.emulateHTTP = false;
|
||||
model.sync('create', model);
|
||||
strictEqual(this.ajaxSettings.emulateHTTP, false);
|
||||
});
|
||||
|
||||
test('Use Backbone.emulateJSON as default.', 2, function() {
|
||||
var model = new Backbone.Model;
|
||||
model.url = '/test';
|
||||
|
||||
Backbone.emulateJSON = true;
|
||||
model.sync('create', model);
|
||||
strictEqual(this.ajaxSettings.emulateJSON, true);
|
||||
|
||||
Backbone.emulateJSON = false;
|
||||
model.sync('create', model);
|
||||
strictEqual(this.ajaxSettings.emulateJSON, false);
|
||||
});
|
||||
|
||||
test("#1756 - Call user provided beforeSend function.", 4, function() {
|
||||
Backbone.emulateHTTP = true;
|
||||
var model = new Backbone.Model;
|
||||
model.url = '/test';
|
||||
var xhr = {
|
||||
setRequestHeader: function(header, value) {
|
||||
strictEqual(header, 'X-HTTP-Method-Override');
|
||||
strictEqual(value, 'DELETE');
|
||||
}
|
||||
};
|
||||
model.sync('delete', model, {
|
||||
beforeSend: function(_xhr) {
|
||||
ok(_xhr === xhr);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
strictEqual(this.ajaxSettings.beforeSend(xhr), false);
|
||||
});
|
||||
|
||||
});
|
||||
357
vendor/backbone/test/view.js
vendored
Normal file
@@ -0,0 +1,357 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
var view;
|
||||
|
||||
module("Backbone.View", {
|
||||
|
||||
setup: function() {
|
||||
view = new Backbone.View({
|
||||
id : 'test-view',
|
||||
className : 'test-view',
|
||||
other : 'non-special-option'
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
test("constructor", 6, function() {
|
||||
equal(view.el.id, 'test-view');
|
||||
equal(view.el.className, 'test-view');
|
||||
equal(view.el.other, void 0);
|
||||
equal(view.options.id, 'test-view');
|
||||
equal(view.options.className, 'test-view');
|
||||
equal(view.options.other, 'non-special-option');
|
||||
});
|
||||
|
||||
test("jQuery", 1, function() {
|
||||
var view = new Backbone.View;
|
||||
view.setElement('<p><a><b>test</b></a></p>');
|
||||
strictEqual(view.$('a b').html(), 'test');
|
||||
});
|
||||
|
||||
test("initialize", 1, function() {
|
||||
var View = Backbone.View.extend({
|
||||
initialize: function() {
|
||||
this.one = 1;
|
||||
}
|
||||
});
|
||||
|
||||
strictEqual(new View().one, 1);
|
||||
});
|
||||
|
||||
test("delegateEvents", 6, function() {
|
||||
var counter1 = 0, counter2 = 0;
|
||||
|
||||
var view = new Backbone.View({el: '<p><a id="test"></a></p>'});
|
||||
view.increment = function(){ counter1++; };
|
||||
view.$el.on('click', function(){ counter2++; });
|
||||
|
||||
var events = {'click #test': 'increment'};
|
||||
|
||||
view.delegateEvents(events);
|
||||
view.$('#test').trigger('click');
|
||||
equal(counter1, 1);
|
||||
equal(counter2, 1);
|
||||
|
||||
view.$('#test').trigger('click');
|
||||
equal(counter1, 2);
|
||||
equal(counter2, 2);
|
||||
|
||||
view.delegateEvents(events);
|
||||
view.$('#test').trigger('click');
|
||||
equal(counter1, 3);
|
||||
equal(counter2, 3);
|
||||
});
|
||||
|
||||
test("delegateEvents allows functions for callbacks", 3, function() {
|
||||
var view = new Backbone.View({el: '<p></p>'});
|
||||
view.counter = 0;
|
||||
|
||||
var events = {
|
||||
click: function() {
|
||||
this.counter++;
|
||||
}
|
||||
};
|
||||
|
||||
view.delegateEvents(events);
|
||||
view.$el.trigger('click');
|
||||
equal(view.counter, 1);
|
||||
|
||||
view.$el.trigger('click');
|
||||
equal(view.counter, 2);
|
||||
|
||||
view.delegateEvents(events);
|
||||
view.$el.trigger('click');
|
||||
equal(view.counter, 3);
|
||||
});
|
||||
|
||||
|
||||
test("delegateEvents ignore undefined methods", 0, function() {
|
||||
var view = new Backbone.View({el: '<p></p>'});
|
||||
view.delegateEvents({'click': 'undefinedMethod'});
|
||||
view.$el.trigger('click');
|
||||
});
|
||||
|
||||
test("undelegateEvents", 6, function() {
|
||||
var counter1 = 0, counter2 = 0;
|
||||
|
||||
var view = new Backbone.View({el: '<p><a id="test"></a></p>'});
|
||||
view.increment = function(){ counter1++; };
|
||||
view.$el.on('click', function(){ counter2++; });
|
||||
|
||||
var events = {'click #test': 'increment'};
|
||||
|
||||
view.delegateEvents(events);
|
||||
view.$('#test').trigger('click');
|
||||
equal(counter1, 1);
|
||||
equal(counter2, 1);
|
||||
|
||||
view.undelegateEvents();
|
||||
view.$('#test').trigger('click');
|
||||
equal(counter1, 1);
|
||||
equal(counter2, 2);
|
||||
|
||||
view.delegateEvents(events);
|
||||
view.$('#test').trigger('click');
|
||||
equal(counter1, 2);
|
||||
equal(counter2, 3);
|
||||
});
|
||||
|
||||
test("_ensureElement with DOM node el", 1, function() {
|
||||
var View = Backbone.View.extend({
|
||||
el: document.body
|
||||
});
|
||||
|
||||
equal(new View().el, document.body);
|
||||
});
|
||||
|
||||
test("_ensureElement with string el", 3, function() {
|
||||
var View = Backbone.View.extend({
|
||||
el: "body"
|
||||
});
|
||||
strictEqual(new View().el, document.body);
|
||||
|
||||
View = Backbone.View.extend({
|
||||
el: "#testElement > h1"
|
||||
});
|
||||
strictEqual(new View().el, $("#testElement > h1").get(0));
|
||||
|
||||
View = Backbone.View.extend({
|
||||
el: "#nonexistent"
|
||||
});
|
||||
ok(!new View().el);
|
||||
});
|
||||
|
||||
test("with className and id functions", 2, function() {
|
||||
var View = Backbone.View.extend({
|
||||
className: function() {
|
||||
return 'className';
|
||||
},
|
||||
id: function() {
|
||||
return 'id';
|
||||
}
|
||||
});
|
||||
|
||||
strictEqual(new View().el.className, 'className');
|
||||
strictEqual(new View().el.id, 'id');
|
||||
});
|
||||
|
||||
test("with options function", 3, function() {
|
||||
var View1 = Backbone.View.extend({
|
||||
options: function() {
|
||||
return {
|
||||
title: 'title1',
|
||||
acceptText: 'confirm'
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
var View2 = View1.extend({
|
||||
options: function() {
|
||||
return _.extend(View1.prototype.options.call(this), {
|
||||
title: 'title2',
|
||||
fixed: true
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
strictEqual(new View2().options.title, 'title2');
|
||||
strictEqual(new View2().options.acceptText, 'confirm');
|
||||
strictEqual(new View2().options.fixed, true);
|
||||
});
|
||||
|
||||
test("with attributes", 2, function() {
|
||||
var View = Backbone.View.extend({
|
||||
attributes: {
|
||||
id: 'id',
|
||||
'class': 'class'
|
||||
}
|
||||
});
|
||||
|
||||
strictEqual(new View().el.className, 'class');
|
||||
strictEqual(new View().el.id, 'id');
|
||||
});
|
||||
|
||||
test("with attributes as a function", 1, function() {
|
||||
var View = Backbone.View.extend({
|
||||
attributes: function() {
|
||||
return {'class': 'dynamic'};
|
||||
}
|
||||
});
|
||||
|
||||
strictEqual(new View().el.className, 'dynamic');
|
||||
});
|
||||
|
||||
test("multiple views per element", 3, function() {
|
||||
var count = 0;
|
||||
var $el = $('<p></p>');
|
||||
|
||||
var View = Backbone.View.extend({
|
||||
el: $el,
|
||||
events: {
|
||||
click: function() {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var view1 = new View;
|
||||
$el.trigger("click");
|
||||
equal(1, count);
|
||||
|
||||
var view2 = new View;
|
||||
$el.trigger("click");
|
||||
equal(3, count);
|
||||
|
||||
view1.delegateEvents();
|
||||
$el.trigger("click");
|
||||
equal(5, count);
|
||||
});
|
||||
|
||||
test("custom events, with namespaces", 2, function() {
|
||||
var count = 0;
|
||||
|
||||
var View = Backbone.View.extend({
|
||||
el: $('body'),
|
||||
events: function() {
|
||||
return {"fake$event.namespaced": "run"};
|
||||
},
|
||||
run: function() {
|
||||
count++;
|
||||
}
|
||||
});
|
||||
|
||||
var view = new View;
|
||||
$('body').trigger('fake$event').trigger('fake$event');
|
||||
equal(count, 2);
|
||||
|
||||
$('body').unbind('.namespaced');
|
||||
$('body').trigger('fake$event');
|
||||
equal(count, 2);
|
||||
});
|
||||
|
||||
test("#1048 - setElement uses provided object.", 2, function() {
|
||||
var $el = $('body');
|
||||
|
||||
var view = new Backbone.View({el: $el});
|
||||
ok(view.$el === $el);
|
||||
|
||||
view.setElement($el = $($el));
|
||||
ok(view.$el === $el);
|
||||
});
|
||||
|
||||
test("#986 - Undelegate before changing element.", 1, function() {
|
||||
var button1 = $('<button></button>');
|
||||
var button2 = $('<button></button>');
|
||||
|
||||
var View = Backbone.View.extend({
|
||||
events: {
|
||||
click: function(e) {
|
||||
ok(view.el === e.target);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var view = new View({el: button1});
|
||||
view.setElement(button2);
|
||||
|
||||
button1.trigger('click');
|
||||
button2.trigger('click');
|
||||
});
|
||||
|
||||
test("#1172 - Clone attributes object", 2, function() {
|
||||
var View = Backbone.View.extend({
|
||||
attributes: {foo: 'bar'}
|
||||
});
|
||||
|
||||
var view1 = new View({id: 'foo'});
|
||||
strictEqual(view1.el.id, 'foo');
|
||||
|
||||
var view2 = new View();
|
||||
ok(!view2.el.id);
|
||||
});
|
||||
|
||||
test("#1228 - tagName can be provided as a function", 1, function() {
|
||||
var View = Backbone.View.extend({
|
||||
tagName: function() {
|
||||
return 'p';
|
||||
}
|
||||
});
|
||||
|
||||
ok(new View().$el.is('p'));
|
||||
});
|
||||
|
||||
test("views stopListening", 0, function() {
|
||||
var View = Backbone.View.extend({
|
||||
initialize: function() {
|
||||
this.listenTo(this.model, 'all x', function(){ ok(false); }, this);
|
||||
this.listenTo(this.collection, 'all x', function(){ ok(false); }, this);
|
||||
}
|
||||
});
|
||||
|
||||
var view = new View({
|
||||
model: new Backbone.Model,
|
||||
collection: new Backbone.Collection
|
||||
});
|
||||
|
||||
view.stopListening();
|
||||
view.model.trigger('x');
|
||||
view.collection.trigger('x');
|
||||
});
|
||||
|
||||
test("Provide function for el.", 1, function() {
|
||||
var View = Backbone.View.extend({
|
||||
el: function() {
|
||||
return "<p><a></a></p>";
|
||||
}
|
||||
});
|
||||
|
||||
var view = new View;
|
||||
ok(view.$el.is('p:has(a)'));
|
||||
});
|
||||
|
||||
test("events passed in options", 2, function() {
|
||||
var counter = 0;
|
||||
|
||||
var View = Backbone.View.extend({
|
||||
el: '<p><a id="test"></a></p>',
|
||||
increment: function() {
|
||||
counter++;
|
||||
}
|
||||
});
|
||||
|
||||
var view = new View({events:{'click #test':'increment'}});
|
||||
var view2 = new View({events:function(){
|
||||
return {'click #test':'increment'};
|
||||
}});
|
||||
|
||||
view.$('#test').trigger('click');
|
||||
view2.$('#test').trigger('click');
|
||||
equal(counter, 2);
|
||||
|
||||
view.$('#test').trigger('click');
|
||||
view2.$('#test').trigger('click');
|
||||
equal(counter, 4);
|
||||
});
|
||||
|
||||
});
|
||||
1
vendor/benchmark.js
vendored
22
vendor/benchmark.js/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright 2010-2013 Mathias Bynens <http://mathiasbynens.be/>
|
||||
Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
|
||||
Modified by John-David Dalton <http://allyoucanleet.com/>
|
||||
|
||||
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.
|
||||
2859
vendor/benchmark.js/benchmark.js
vendored
Normal file
BIN
vendor/benchmark.js/nano.jar
vendored
Normal file
24
vendor/curl/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
Open Source Initiative OSI - The MIT License
|
||||
|
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
Copyright (c) 2010-2013 Brian Cavalier and John Hann
|
||||
|
||||
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.
|
||||
48
vendor/curl/dist/curl-kitchen-sink/curl.js
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
(function(){/*
|
||||
MIT License (c) copyright 2010-2013 B Cavalier & J Hann MIT (c) copyright 2010-2013 B Cavalier & J Hann */
|
||||
(function(d){function l(){}function k(b,e){return 0==U.call(b).indexOf("[object "+e)}function n(b){return b&&"/"==b.charAt(b.length-1)?b.substr(0,b.length-1):b}function h(b,e){var m,g,x,P;m=1;g=b;"."==g.charAt(0)&&(x=!0,g=g.replace(V,function(b,e,g,x){g&&m++;return x||""}));if(x){x=e.split("/");P=x.length-m;if(0>P)return b;x.splice(P,m);return x.concat(g||[]).join("/")}return g}function p(b){var e=b.indexOf("!");return{h:b.substr(e+1),e:0<=e&&b.substr(0,e)}}function v(){}function r(b,e){v.prototype=
|
||||
b||Q;var m=new v;v.prototype=Q;for(var g in e)m[g]=e[g];return m}function z(){function b(b,e,m){g.push([b,e,m])}function e(b,e){for(var m,x=0;m=g[x++];)(m=m[b])&&m(e)}var m,g,x;m=this;g=[];x=function(m,f){b=m?function(b){b&&b(f)}:function(b,e){e&&e(f)};x=l;e(m?0:1,f);e=l;g=G};this.j=function(e,g,x){b(e,g,x);return m};this.g=function(b){m.I=b;x(!0,b)};this.d=function(b){m.Aa=b;x(!1,b)};this.G=function(b){e(2,b)}}function y(b){return b instanceof z||b instanceof t}function q(b,e,m,g){y(b)?b.j(e,m,g):
|
||||
e(b)}function w(b,e,m){var g;return function(){0<=--b&&e&&(g=e.apply(G,arguments));0==b&&m&&m(g);return g}}function c(){var b,e;b=[].slice.call(arguments);k(b[0],"Object")&&(e=b.shift(),e=a(e));return new t(b[0],b[1],b[2],e)}function a(b,e,m){var g,x,a;if(b&&(u.V(b),f=u.b(b),"preloads"in b&&(g=new t(b.preloads,G,m,J,!0),u.C(function(){J=g})),a=(a=b.main)&&String(a).split(W)))return x=new z,x.j(e,m),b=a[1]?function(){new t([a[1]],x.g,x.d)}:x.d,new t([a[0]],x.g,b),x}function t(b,e,m,g,x){var s;s=u.k(f,
|
||||
G,[].concat(b),x);this.then=this.j=b=function(b,e){q(s,function(e){b&&b.apply(G,e)},function(b){if(e)e(b);else throw b;});return this};this.next=function(b,e,g){return new t(b,e,g,s)};this.config=a;(e||m)&&b(e,m);u.C(function(){q(x||J,function(){q(g,function(){u.A(s)},m)})})}function A(b){var e,m;e=b.id;e==G&&(K!==G?K={M:"Multiple anonymous defines encountered"}:(e=u.ia())||(K=b));if(e!=G){m=E[e];e in E||(m=u.m(e,f),m=u.J(m.b,e),E[e]=m);if(!y(m))throw Error("duplicate define: "+e);m.na=!1;u.K(m,b)}}
|
||||
function C(){var b=u.fa(arguments);A(b)}var f,B,F,H=d.document,D=H&&(H.head||H.getElementsByTagName("head")[0]),R=D&&D.getElementsByTagName("base")[0]||null,L={},M={},I={},s="addEventListener"in d?{}:{loaded:1,complete:1},Q={},U=Q.toString,G,E={},N={},J=!1,K,T=/^\/|^[^:]+:\/\//,V=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,X=/\/\*[\s\S]*?\*\/|\/\/.*?[\n\r]/g,Y=/require\s*\(\s*(["'])(.*?[^\\])\1\s*\)|[^\\]?(["'])/g,W=/\s*,\s*/,S,u;u={t:function(b,e,m){var g;b=h(b,e);if("."==b.charAt(0))return b;g=p(b);b=(e=
|
||||
g.e)||g.h;b in m.c&&(b=m.c[b].q||b);e&&(0>e.indexOf("/")&&!(e in m.c)&&(b=n(m.T)+"/"+e),b=b+"!"+g.h);return b},k:function(b,e,m,g){function x(e,g){var m,a;m=u.t(e,f.id,b);if(!g)return m;a=p(m);if(!a.e)return m;m=E[a.e];a.h="normalize"in m?m.normalize(a.h,x,f.b)||"":x(a.h);return a.e+"!"+a.h}function a(e,m,s){var c;c=m&&function(b){m.apply(G,b)};if(k(e,"String")){if(c)throw Error("require(id, callback) not allowed");s=x(e,!0);e=E[s];if(!(s in E))throw Error("Module not resolved: "+s);return(s=y(e)&&
|
||||
e.a)||e}q(u.A(u.k(b,f.id,e,g)),c,s)}var f;f=new z;f.id=e||"";f.ja=g;f.L=m;f.b=b;f.s=a;a.toUrl=function(e){return u.m(x(e,!0),b).url};f.t=x;return f},J:function(b,e,m){var g,x,a;g=u.k(b,e,G,m);x=g.g;a=w(1,function(b){g.w=b;try{return u.aa(g)}catch(e){g.d(e)}});g.g=function(b){q(m||J,function(){x(E[g.id]=N[g.url]=a(b))})};g.N=function(b){q(m||J,function(){g.a&&(a(b),g.G(M))})};return g},Z:function(b,e,m,g){return u.k(b,m,G,g)},ha:function(b){return b.s},P:function(b){return b.a||(b.a={})},ga:function(b){var e=
|
||||
b.B;e||(e=b.B={id:b.id,uri:u.Q(b),exports:u.P(b),config:function(){return b.b}},e.a=e.exports);return e},Q:function(b){return b.url||(b.url=u.u(b.s.toUrl(b.id),b.b))},V:function(b){var e,m,g,a,f;e="curl";m="define";g=a=d;if(b&&(f=b.overwriteApi||b.xa,e=b.apiName||b.pa||e,g=b.apiContext||b.oa||g,m=b.defineName||b.ta||m,a=b.defineContext||b.sa||a,B&&k(B,"Function")&&(d.curl=B),B=null,F&&k(F,"Function")&&(d.define=F),F=null,!f)){if(g[e]&&g[e]!=c)throw Error(e+" already exists");if(a[m]&&a[m]!=C)throw Error(m+
|
||||
" already exists");}g[e]=c;a[m]=C},b:function(b){function e(b,e){var m,g,f,c,d;for(d in b){f=b[d];k(f,"String")&&(f={path:b[d]});f.name=f.name||d;c=a;g=p(n(f.name));m=g.h;if(g=g.e)c=s[g],c||(c=s[g]=r(a),c.c=r(a.c),c.f=[]),delete b[d];g=f;var l=e,q=void 0;g.path=n(g.path||g.location||"");l&&(q=g.main||"./main","."==q.charAt(0)||(q="./"+q),g.q=h(q,g.name+"/"));g.b=g.config;g.b&&(g.b=r(a,g.b));g.W=m.split("/").length;m?(c.c[m]=g,c.f.push(m)):c.n=u.U(f.path,a)}}function m(b){var e=b.c;b.S=RegExp("^("+
|
||||
b.f.sort(function(b,g){return e[g].W-e[b].W}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete b.f}var g,a,s,c;"baseUrl"in b&&(b.n=b.baseUrl);"main"in b&&(b.q=b.main);"preloads"in b&&(b.ya=b.preloads);"pluginPath"in b&&(b.T=b.pluginPath);if("dontAddFileExt"in b||b.l)b.l=RegExp(b.dontAddFileExt||b.l);g=f;a=r(g,b);a.c=r(g.c);s=b.plugins||{};a.plugins=r(g.plugins);a.F=r(g.F,b.F);a.D=r(g.D,b.D);a.f=[];e(b.packages,!0);e(b.paths,!1);for(c in s)b=u.t(c+"!","",a),a.plugins[b.substr(0,b.length-1)]=
|
||||
s[c];s=a.plugins;for(c in s)if(s[c]=r(a,s[c]),b=s[c].f)s[c].f=b.concat(a.f),m(s[c]);for(c in g.c)a.c.hasOwnProperty(c)||a.f.push(c);m(a);return a},m:function(b,e){var a,g,c,s;a=e.c;c=T.test(b)?b:b.replace(e.S,function(b){g=a[b]||{};s=g.b;return g.path||""});return{b:s||f,url:u.U(c,e)}},U:function(b,e){var a=e.n;return a&&!T.test(b)?n(a)+"/"+b:b},u:function(b,e){return b+((e||f).l.test(b)?"":".js")},p:function(b,e,a){var g=H.createElement("script");g.onload=g.onreadystatechange=function(a){a=a||d.event;
|
||||
if("load"==a.type||s[g.readyState])delete I[b.id],g.onload=g.onreadystatechange=g.onerror="",e()};g.onerror=function(){a(Error("Syntax or http error: "+b.url))};g.type=b.r||"text/javascript";g.charset="utf-8";g.async=!b.R;g.src=b.url;I[b.id]=g;D.insertBefore(g,R);return g},O:function(b){var e=[],a;("string"==typeof b?b:b.toSource?b.toSource():b.toString()).replace(X,"").replace(Y,function(b,f,c,s){s?a=a==s?G:a:a||e.push(c);return""});return e},fa:function(b){var e,a,g,f,c,s;c=b.length;g=b[c-1];f=
|
||||
k(g,"Function")?g.length:-1;2==c?k(b[0],"Array")?a=b[0]:e=b[0]:3==c&&(e=b[0],a=b[1]);!a&&0<f&&(s=!0,a=["require","exports","module"].slice(0,f).concat(u.O(g)));return{id:e,w:a||[],H:0<=f?g:function(){return g},v:s}},aa:function(b){var e;e=b.H.apply(b.v?b.a:G,b.w);e===G&&b.a&&(e=b.B?b.a=b.B.a:b.a);return e},K:function(b,e){b.H=e.H;b.v=e.v;b.L=e.w;u.A(b)},A:function(b){function e(b,e,a){s[e]=b;a&&k(b,e)}function a(e,g){var f,c,s,m;f=w(1,function(b){c(b);p(b,g)});c=w(1,function(b){k(b,g)});s=u.ca(e,
|
||||
b);(m=y(s)&&s.a)&&c(m);q(s,f,b.d,b.a&&function(b){s.a&&(b==L?c(s.a):b==M&&f(s.a))})}function g(){b.g(s)}var f,c,s,d,h,k,p;s=[];c=b.L;d=c.length;0==c.length&&g();k=w(d,e,function(){b.N&&b.N(s)});p=w(d,e,g);for(f=0;f<d;f++)h=c[f],h in S?(p(S[h](b),f,!0),b.a&&b.G(L)):h?a(h,f):p(G,f,!0);return b},da:function(b){u.Q(b);u.p(b,function(){var e=K;K=G;!1!==b.na&&(!e||e.M?b.d(Error(e&&e.M||"define() missing or duplicated: "+b.url)):u.K(b,e))},b.d);return b},ca:function(b,e){var a,g,s,c,d,h,k,l,n,r,t,B;a=e.t;
|
||||
g=e.ja;s=e.b||f;d=a(b);d in E?h=d:(c=p(d),l=c.h,h=c.e||l,n=u.m(h,s));if(!(d in E))if(B=u.m(l,s).b,c.e)k=h;else if(k=B.moduleLoader||B.wa||B.loader||B.va)l=h,h=k,n=u.m(k,s);h in E?r=E[h]:n.url in N?r=E[h]=N[n.url]:(r=u.J(B,h,g),r.url=u.u(n.url,n.b),E[h]=N[n.url]=r,u.da(r));h==k&&(c.e&&s.plugins[c.e]&&(B=s.plugins[c.e]),t=new z,q(r,function(b){var e,c,s;s=b.dynamic;l="normalize"in b?b.normalize(l,a,r.b)||"":a(l);c=k+"!"+l;e=E[c];if(!(c in E)){e=u.Z(B,c,l,g);s||(E[c]=e);var f=function(b){s||(E[c]=b);
|
||||
e.g(b)};f.resolve=f;f.reject=f.error=e.d;b.load(l,e.s,f,B)}t!=e&&q(e,t.g,t.d,t.G)},t.d));return t||r},ia:function(){var b;if(!k(d.opera,"Opera"))for(var e in I)if("interactive"==I[e].readyState){b=e;break}return b},ea:function(b){var e=0,a,c;for(a=H&&(H.scripts||H.getElementsByTagName("script"));a&&(c=a[e++]);)if(b(c))return c},ba:function(b){var e;(e=u.ea(function(e){if(e=e.getAttribute("data-curl-run"))b.q=e;return e}))&&e.setAttribute("data-curl-run","");return b},C:function(b){setTimeout(b,0)}};
|
||||
S={require:u.ha,exports:u.P,module:u.ga};c.version="0.8.1";c.config=a;C.amd={plugins:!0,jQuery:!0,curl:"0.8.1"};f={n:"",T:"curl/plugin",l:/\?|\.js\b/,F:{},D:{},plugins:{},c:{},S:/$^/};f=u.ba(f);B=d.curl;F=d.define;B&&k(B,"Object")||f.q?(d.curl=G,a(B||f)):u.V();E.curl=c;E["curl/_privileged"]={core:u,cache:E,config:function(){return f},_define:A,_curl:c,Promise:z}})(this.window||"undefined"!=typeof global&&global||this);
|
||||
(function(d,l){function k(){if(!l.body)return!1;C||(C=l.createTextNode(""));try{return l.body.removeChild(l.body.appendChild(C)),C=A,!0}catch(a){return!1}}function n(){var f;f=v[l[p]]&&k();if(!y&&f){y=!0;for(clearTimeout(t);c=a.pop();)c();z&&(l[p]="complete");for(var h;h=r.shift();)h()}return f}function h(){n();y||(t=setTimeout(h,q))}var p="readyState",v={loaded:1,interactive:1,complete:1},r=[],z=l&&"string"!=typeof l[p],y=!1,q=10,w,c,a=[],t,A,C;w="addEventListener"in d?function(a,c){a.addEventListener(c,
|
||||
n,!1);return function(){a.removeEventListener(c,n,!1)}}:function(a,c){a.attachEvent("on"+c,n);return function(){a.detachEvent(c,n)}};l&&!n()&&(a=[w(d,"load"),w(l,"readystatechange"),w(d,"DOMContentLoaded")],t=setTimeout(h,q));define("curl/domReady",function(){function a(c){y?c():r.push(c)}a.then=a;a.amd=!0;return a})})(this,this.document);var O;
|
||||
(function(d,l){define("curl/shim/dojo18",["curl/_privileged"],function(k){function n(a){a.has||(a.has=c);a.on||(a.on=p);a.idle||(a.idle=h);a.async=!0}function h(){for(var a in r)if(r[a]instanceof z)return!1;return!0}function p(){}var v,r,z,y;v=k._curl;r=k.cache;z=k.Promise;y=k.core.k;var q,w,c;q=k.b().ua||{};w=l&&l.createElement("div");c=function(a){return"function"==typeof q[a]?q[a]=q[a](d,l,w):q[a]};c.add=function(a,h,d,k){if(void 0===q[a]||k)q[a]=h;if(d)return c(a)};q["dojo-loader"]=!1;r["dojo/_base/loader"]=
|
||||
0;"undefined"==typeof O&&(n(v),O=v);k.core.k=function(){var a=y.apply(this,arguments);n(a.s);return a};return!0})})("object"==typeof global?global:this.window||this.global,"object"==typeof document&&document);
|
||||
(function(d,l,k){define("curl/plugin/js",["curl/_privileged"],function(d){function h(c,a,h){function l(){f||(p<new Date?h():setTimeout(l,10))}var p,f,r;p=(new Date).valueOf()+(c.ma||3E5);h&&c.a&&setTimeout(l,10);r=d.core.p(c,function(){f=!0;c.a&&(c.I=k(c.a));!c.a||c.I?a(r):h()},function(a){f=!0;h(a)})}function p(c,a){h(c,function(){var h=r.shift();q=0<r.length;h&&p.apply(null,h);a.g(c.I||!0)},function(c){a.d(c)})}var v={},r=[],z=l&&!0==l.createElement("script").async,y,q,w=/\?|\.js\b/;y=d.Promise;
|
||||
return{dynamic:!0,normalize:function(c,a){var h=c.indexOf("!");return 0<=h?a(c.substr(0,h))+c.substr(h):a(c)},load:function(c,a,d,k){function l(a){(d.error||function(a){throw a;})(a)}var f,n,F,H,D;f=0<c.indexOf("!order");n=c.indexOf("!exports=");F=0<n?c.substr(n+9):k.a;H="prefetch"in k?k.prefetch:!0;c=f||0<n?c.substr(0,c.indexOf("!")):c;n=(n=k.dontAddFileExt||k.l)?RegExp(n):w;D=a.toUrl(c);n.test(D)||(D=D.lastIndexOf(".")<=D.lastIndexOf("/")?D+".js":D);D in v?v[D]instanceof y?v[D].j(d,l):d(v[D]):(c=
|
||||
{name:c,url:D,R:f,a:F,ma:k.timeout},v[D]=a=new y,a.j(function(a){v[D]=a;d(a)},l),f&&!z&&q?(r.push([c,a]),H&&(c.r="text/cache",h(c,function(a){a&&a.parentNode.removeChild(a)},function(){}),c.r="")):(q=q||f,p(c,a)))},cramPlugin:"../cram/js"}})})(this,this.document,function(d){try{return eval(d)}catch(l){}});
|
||||
define("curl/plugin/_fetchText",[],function(){var d,l;l=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d=function(){if("undefined"!==typeof XMLHttpRequest)d=function(){return new XMLHttpRequest};else for(var k=d=function(){throw Error("getXhr(): XMLHttpRequest not available");};0<l.length&&d===k;)(function(k){try{new ActiveXObject(k),d=function(){return new ActiveXObject(k)}}catch(h){}})(l.shift());return d()};return function(k,l,h){var p=d();p.open("GET",k,!0);p.onreadystatechange=function(){4===
|
||||
p.readyState&&(400>p.status?l(p.responseText):h(Error("fetchText() failed. status: "+p.statusText)))};p.send(null)}});define("curl/plugin/text",["./_fetchText"],function(d){function l(d){throw d;}return{normalize:function(d,l){return d?l(d.split("!")[0]):d},load:function(k,n,h){d(n.toUrl(k),h,h.error||l)},cramPlugin:"../cram/text"}});
|
||||
define("curl/plugin/async",function(){return{load:function(d,l,k){function n(h){"function"==typeof k.error&&k.error(h)}l([d],function(h){"function"==typeof h.j?h.j(function(d){0==arguments.length&&(d=h);k(d)},n):k(h)},k.error||function(h){throw h;})},analyze:function(d,l,k){k(d)}}});
|
||||
(function(d){function l(){var a;a=f[A]("link");a.rel="stylesheet";a.type="text/css";return a}function k(a,c){a.onload=function(){I.load=I.load||!0;c()}}function n(a,c){a.onerror=function(){I.error=I.error||!0;c()}}function h(a,c,f){D.push({url:a,X:c,$:function(){f(Error(M))}});(a=v())&&p(a)}function p(a){var c,f;c=D.shift();f=a.styleSheet;c?(a.onload=function(){c.X(c.la);p(a)},a.onerror=function(){c.$();p(a)},c.la=f.imports[f.addImport(c.url)]):(a.onload=a.onerror=t,H.push(a))}function v(){var a;
|
||||
a=H.shift();!a&&F.length<R&&(a=f.createElement("style"),F.push(a),B.appendChild(a));return a}function r(a){var c,h,d;if(!a.href||f.readyState&&"complete"!=f.readyState)return!1;c=!1;try{if(h=a.sheet)d=h.cssRules,c=null===d,!c&&d&&(h.insertRule("-curl-css-test {}",0),h.deleteRule(0),c=!0)}catch(k){c="[object Opera]"!=Object.prototype.toString.call(window.opera)&&/security|denied/i.test(k.message)}return c}function z(a,c,f){I.load||(r(a)?f(a.sheet):a.onload==t||!a.onload||C(function(){z(a,c,f)},c))}
|
||||
function y(a,f,h){function d(){a.onload!=t&&a.onload&&(a.onload=a.onerror=t,c(function(){h(a.sheet)}))}k(a,d);z(a,f,d)}function q(a,c){n(a,function(){a.onload!=t&&a.onload&&(a.onload=a.onerror=t,c(Error(M)))})}function w(a,c,f,h){var d;d=l();y(d,h,c);q(d,f);d.href=a;B.appendChild(d)}function c(a){function c(){f.readyState&&"complete"!=f.readyState?C(c,10):a()}c()}function a(a){return a.lastIndexOf(".")<=a.lastIndexOf("/")?a+".css":a}function t(){}var A="createElement",C=d.setTimeout,f=d.document,
|
||||
B;d=f&&f.createStyleSheet&&!(10<=f.documentMode);var F=[],H=[],D=[],R=12,L,M="HTTP or network error.",I={};f&&(B=f.head||f.getElementsByTagName("head")[0],L=d?h:w);define("curl/plugin/css",{normalize:function(a,c){var f,h;if(!a)return a;f=a.split(",");h=[];for(var d=0,k=f.length;d<k;d++)h.push(c(f[d]));return h.join(",")},load:function(c,f,h,d){function k(a){1<n.length&&p.push(a);0==--w&&h(1==n.length?a:p)}function r(a){(h.d||function(a){throw a;})(a)}var p,n,q,w,F;p=[];n=(c||"").split(",");q=d.cssWatchPeriod||
|
||||
50;d=d.cssNoWait;w=n.length;for(F=0;F<n.length;F++){c=n[F];var t;c=a(f.toUrl(c));d?(t=l(),t.href=c,B.appendChild(t),k(t.sheet||t.styleSheet)):L(c,k,r,q)}},cramPlugin:"../cram/css"})})(this);
|
||||
(function(d){var l=d.document,k=/^\/\//,n;l&&(n=l.head||(l.head=l.getElementsByTagName("head")[0]));define("curl/plugin/link",{load:function(d,p,v,r){d=p.toUrl(d);d=d.lastIndexOf(".")<=d.lastIndexOf("/")?d+".css":d;r=d=(r="fixSchemalessUrls"in r?r.fixSchemalessUrls:l.location.protocol)?d.replace(k,r+"//"):d;d=l.createElement("link");d.rel="stylesheet";d.type="text/css";d.href=r;n.appendChild(d);v(d.sheet||d.styleSheet)}})})(this);
|
||||
define("curl/plugin/domReady",["../domReady"],function(d){return{load:function(l,k,n){d(n)}}});(function(d){define("curl/shim/_fetchText",function(){function l(d,h,k){n.za(d,function(d,l){d?k(d):h(l.toString())})}function k(d,k,l){var n;d=p.parse(d,!1,!0);n="";h.get(d,function(d){d.i("data",function(c){n+=c}).i("end",function(){k(n)}).i("error",l)}).i("error",l)}var n,h,p;n=d("fs");h=d("http");p=d("url");var v;v=/^https?:/;return function(d,h,n){v.test(d)?k(d,h,n):l(d,h,n)}})})(O);define.amd.Ca=!0;
|
||||
(function(d,l){define("curl/shim/ssjs",["curl/_privileged","./_fetchText"],function(k,n){function h(a,c,d){try{l(a.url),c()}catch(f){d(f)}}function p(a,c,f){var h;try{h=a.url.replace(/\.js$/,""),d(h),c()}catch(k){f(k)}}function v(a,c,f){var h;a=d("url").parse(a.url,!1,!0);h="";A.get(a,function(a){a.i("data",function(a){h+=a}).i("end",function(){z(h);c()}).i("error",f)}).i("error",f)}function r(a){throw Error("ssjs: unable to load module in current environment: "+a.url);}function z(a){eval(a)}function y(c){return c&&
|
||||
c.replace(a,function(a,c){return c})}var q,w,c,a,t,A,C,f;if("object"!=typeof window||!window.ra&&!window.navigator){q=k.qa;w=k.b();c=/^\w+:\/\//;a=/(^\w+:)?.*$/;"undefined"==typeof XMLHttpRequest&&(q["curl/plugin/_fetchText"]=n);t=(w.o&&":"!=w.o[w.o.length-1]?w.o+":":w.o)||y(w.n)||"http:";if(l)C=f=h;else if(d){C=p;try{A=d("http"),f=v}catch(B){f=r}}else C=f=r;"object"===typeof process&&process.ka&&(k.Y.C=process.ka);k.Y.p=function(a,d,h){/^\/\//.test(a.url)&&(a.url=t+a.url);return c.test(a.url)?f(a,
|
||||
d,h):C(a,d,h)}}})})(O,void 0);
|
||||
(function(d,l,k){define("curl/loader/cjsm11",["../plugin/_fetchText","curl/_privileged"],function(d,h){function p(d,c){p="text"in d?function(a,c){a.text=c}:function(a,c){a.appendChild(l.createTextNode(c))};p(d,c)}function v(d,c,a){a=a?"/*\n////@ sourceURL="+a.replace(/\s/g,"%20")+".js\n*/":"";return"define('"+c+"',['require','exports','module'],function(require,exports,module){"+d+"\n});\n"+a+"\n"}var r,z,y,q;z=(r=l&&(l.head||l.getElementsByTagName("head")[0]))&&r.getElementsByTagName("base")[0]||null;
|
||||
y=h.core.O;q=h.core.u;v.load=function(h,c,a,t){var A,C,f;A=a.error||function(a){throw a;};C=q(c.Ea(h),t);f=!1!==t.injectSourceUrl&&C;d(C,function(d){var n;n=y(d);c(n,function(){d=v(d,h,f);if(t.injectScript){var n=d,q=l.createElement("script");p(q,n);q.charset="utf-8";r.insertBefore(q,z)}else k(d);a(c(h))},A)},A)};v.cramPlugin="../cram/cjsm11";return v})})(this,this.document,function(d){eval(d)});
|
||||
define("curl/plugin/locale",function(){function d(d,h){var k;if(d&&(k=d.locale,"function"==typeof k&&(k=k(d,h)),"string"==typeof k))return k;if("undefined"==typeof window)return!1;k=window.clientInformation||window.navigator;return(k&&(k.language||k.userLanguage)||"").toLowerCase()}function l(d,h){return d.replace(k,(h?"/"+h:"")+"$&")}var k;k=/(\.js)?$/;d.toModuleId=l;d.load=function(k,h,p,v){function r(){var c=Error("Unable to find correct locale for "+k);if(p.error)p.error(c);else throw c;}var z,
|
||||
y;z=d(v,k);y=v.localeToModuleId||l;v=z?y(k,z):k;try{p(h(v))}catch(q){y=z?y(k,!1):k;if(y==v)return r();try{p(h(y))}catch(w){if(!0!==z)return r();h(["i18n!"+k],p,r)}}};return d});
|
||||
define("curl/plugin/i18n",["./locale"],function(d){function l(d,l,h,p,v){d([l],function(d){p(d,h)},v)}return{load:function(k,n,h,p){function v(a,c){w[c]=a;r()}function r(){var d;if(++c==a.length)if(0==w.length)z(Error('No i18n bundles found: "'+k+'", locale "'+q+'"'));else{d=w[0]||{};for(A=1;A<w.length;A++){var f=w[A],l={},n=void 0;for(n in d)l[n]=d[n];if(f)for(n in f)l[n]=f[n];d=l}h(d)}}var z,y,q,w,c,a,t,A;z=h.error;k||z(Error("blank i18n bundle id."));y=p.localeToModuleId||d.Da;q=d(p,k);a=[k];w=
|
||||
[];c=0;if(q&&!1!==p.locale)for(a=a.concat(q.split("-")),t=[],A=1;A<a.length;A++)t[A-1]=a[A],p=y(k,t.join("-")),l(n,p,A,v,r);l(n,k,0,v,r)},cramPlugin:"../cram/i18n"}});
|
||||
(function(d,l,k){define("curl/loader/legacy",["curl/_privileged"],function(n){var h,p,v;h=l&&!0==l.createElement("script").async;p=n.core.p;v=/\?|\.js\b/;return{load:function(l,n,y,q){function w(){B.r="";p(B,c,a)}function c(){var c;if(!(0<--F)){if(A)try{c=A.call(d,l)}catch(f){a(Error("Factory for legacy "+l+" failed: "+f.message))}else try{c=k(t)}catch(h){a(Error("Failed to find exports "+t+" for legacy "+l))}y(c)}}function a(a){(y.error||function(a){throw a;})(a)}var t,A,C,f,B,F;t=q.exports||q.a;
|
||||
A=q.factory||q.factory;if(!t&&!A)throw Error("`exports` or `factory` required for legacy: "+l);C=[].concat(q.requires||q.Ba||[]);q=(q=q.dontAddFileExt||q.l)?RegExp(q):v;f=n.toUrl(l);q.test(f)||(f=f.lastIndexOf(".")<=f.lastIndexOf("/")?f+".js":f);B={url:f,R:!0,r:h||!C.length?"":"text/cache"};C.length?(F=2,n(C,h?c:w,a)):F=1;p(B,c,a)},cramPlugin:"../cram/legacy"}})})(this,this.document,function(d){return(0,eval)(d)});
|
||||
}).call(this);
|
||||
1
vendor/docdown
vendored
20
vendor/docdown/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
||||
|
||||
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.
|
||||
38
vendor/docdown/docdown.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/*!
|
||||
* Docdown v1.0.0-pre
|
||||
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
||||
* Available under MIT license <http://mths.be/mit>
|
||||
*/
|
||||
require(dirname(__FILE__) . '/src/DocDown/MarkdownGenerator.php');
|
||||
|
||||
/**
|
||||
* Generates Markdown from JSDoc entries in a given file.
|
||||
*
|
||||
* @param {Array} [$options=array()] The options array.
|
||||
* @returns {string} The generated Markdown.
|
||||
* @example
|
||||
*
|
||||
* // specify a file path
|
||||
* $markdown = docdown(array(
|
||||
* // path to js file
|
||||
* 'path' => $filepath,
|
||||
* // url used to reference line numbers in code
|
||||
* 'url' => 'https://github.com/username/project/blob/master/my.js'
|
||||
* ));
|
||||
*
|
||||
* // or pass raw js
|
||||
* $markdown = docdown(array(
|
||||
* // raw JavaScript source
|
||||
* 'source' => $rawJS,
|
||||
* // documentation title
|
||||
* 'title' => 'My API Documentation',
|
||||
* // url used to reference line numbers in code
|
||||
* 'url' => 'https://github.com/username/project/blob/master/my.js'
|
||||
* ));
|
||||
*/
|
||||
function docdown( $options = array() ) {
|
||||
$gen = new MarkdownGenerator($options);
|
||||
return $gen->generate();
|
||||
}
|
||||
?>
|
||||
226
vendor/docdown/src/DocDown/Alias.php
vendored
Normal file
@@ -0,0 +1,226 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* A class to represent a JSDoc entry alias.
|
||||
*/
|
||||
class Alias {
|
||||
|
||||
/**
|
||||
* The alias owner.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @type Object
|
||||
*/
|
||||
public $owner;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The Alias constructor.
|
||||
*
|
||||
* @constructor
|
||||
* @param {string} $name The alias name.
|
||||
* @param {Object} $owner The alias owner.
|
||||
*/
|
||||
public function __construct( $name, $owner ) {
|
||||
$this->owner = $owner;
|
||||
$this->_name = $name;
|
||||
$this->_call = $owner->getCall();
|
||||
$this->_category = $owner->getCategory();
|
||||
$this->_desc = $owner->getDesc();
|
||||
$this->_example = $owner->getExample();
|
||||
$this->_isCtor = $owner->isCtor();
|
||||
$this->_isLicense = $owner->isLicense();
|
||||
$this->_isPlugin = $owner->isPlugin();
|
||||
$this->_isPrivate = $owner->isPrivate();
|
||||
$this->_isStatic = $owner->isStatic();
|
||||
$this->_lineNumber = $owner->getLineNumber();
|
||||
$this->_members = $owner->getMembers();
|
||||
$this->_params = $owner->getParams();
|
||||
$this->_returns = $owner->getReturns();
|
||||
$this->_type = $owner->getType();
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Extracts the entry's `alias` objects.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @param {number} $index The index of the array value to return.
|
||||
* @returns {Array|string} The entry's `alias` objects.
|
||||
*/
|
||||
public function getAliases( $index = null ) {
|
||||
$result = array();
|
||||
return $index !== null
|
||||
? @$result[$index]
|
||||
: $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the function call from the owner entry.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {string} The function call.
|
||||
*/
|
||||
public function getCall() {
|
||||
return $this->_call;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the owner entry's `category` data.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {string} The owner entry's `category` data.
|
||||
*/
|
||||
public function getCategory() {
|
||||
return $this->_category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the owner entry's description.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {string} The owner entry's description.
|
||||
*/
|
||||
public function getDesc() {
|
||||
return $this->_desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the owner entry's `example` data.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {string} The owner entry's `example` data.
|
||||
*/
|
||||
public function getExample() {
|
||||
return $this->_example;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the entry is an alias.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {boolean} Returns `true`.
|
||||
*/
|
||||
public function isAlias() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the owner entry is a constructor.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {boolean} Returns `true` if a constructor, else `false`.
|
||||
*/
|
||||
public function isCtor() {
|
||||
return $this->_isCtor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the owner entry is a license.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {boolean} Returns `true` if a license, else `false`.
|
||||
*/
|
||||
public function isLicense() {
|
||||
return $this->_isLicense;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the owner entry *is* assigned to a prototype.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {boolean} Returns `true` if assigned to a prototype, else `false`.
|
||||
*/
|
||||
public function isPlugin() {
|
||||
return $this->_isPlugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the owner entry is private.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {boolean} Returns `true` if private, else `false`.
|
||||
*/
|
||||
public function isPrivate() {
|
||||
return $this->_isPrivate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the owner entry is *not* assigned to a prototype.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {boolean} Returns `true` if not assigned to a prototype, else `false`.
|
||||
*/
|
||||
public function isStatic() {
|
||||
return $this->_isStatic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the owner entry's line number.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {number} The owner entry's line number.
|
||||
*/
|
||||
public function getLineNumber() {
|
||||
return $this->_lineNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the owner entry's `member` data.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @param {number} $index The index of the array value to return.
|
||||
* @returns {Array|string} The owner entry's `member` data.
|
||||
*/
|
||||
public function getMembers( $index = null ) {
|
||||
return $index !== null
|
||||
? @$this->_members[$index]
|
||||
: $this->_members;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the owner entry's `name` data.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {string} The owner entry's `name` data.
|
||||
*/
|
||||
public function getName() {
|
||||
return $this->_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the owner entry's `param` data.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @param {number} $index The index of the array value to return.
|
||||
* @returns {Array} The owner entry's `param` data.
|
||||
*/
|
||||
public function getParams( $index = null ) {
|
||||
return $index !== null
|
||||
? @$this->_params[$index]
|
||||
: $this->_params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the owner entry's `returns` data.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {string} The owner entry's `returns` data.
|
||||
*/
|
||||
public function getReturns() {
|
||||
return $this->_returns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the owner entry's `type` data.
|
||||
*
|
||||
* @memberOf Alias
|
||||
* @returns {string} The owner entry's `type` data.
|
||||
*/
|
||||
public function getType() {
|
||||
return $this->_type;
|
||||
}
|
||||
}
|
||||
?>
|
||||
451
vendor/docdown/src/DocDown/Entry.php
vendored
Normal file
@@ -0,0 +1,451 @@
|
||||
<?php
|
||||
|
||||
require(dirname(__FILE__) . "/Alias.php");
|
||||
|
||||
/**
|
||||
* A class to simplify parsing a single JSDoc entry.
|
||||
*/
|
||||
class Entry {
|
||||
|
||||
/**
|
||||
* The documentation entry.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @type string
|
||||
*/
|
||||
public $entry = '';
|
||||
|
||||
/**
|
||||
* The language highlighter used for code examples.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @type string
|
||||
*/
|
||||
public $lang = '';
|
||||
|
||||
/**
|
||||
* The source code.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @type string
|
||||
*/
|
||||
public $source = '';
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The Entry constructor.
|
||||
*
|
||||
* @constructor
|
||||
* @param {string} $entry The documentation entry to analyse.
|
||||
* @param {string} $source The source code.
|
||||
* @param {string} [$lang ='js'] The language highlighter used for code examples.
|
||||
*/
|
||||
public function __construct( $entry, $source, $lang = 'js' ) {
|
||||
$this->entry = $entry;
|
||||
$this->lang = $lang;
|
||||
$this->source = str_replace(PHP_EOL, "\n", $source);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Extracts the documentation entries from source code.
|
||||
*
|
||||
* @static
|
||||
* @memberOf Entry
|
||||
* @param {string} $source The source code.
|
||||
* @returns {Array} The array of entries.
|
||||
*/
|
||||
public static function getEntries( $source ) {
|
||||
preg_match_all('#/\*\*(?![-!])[\s\S]*?\*/\s*.+#', $source, $result);
|
||||
return array_pop($result);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Checks if the entry is a function reference.
|
||||
*
|
||||
* @private
|
||||
* @memberOf Entry
|
||||
* @returns {boolean} Returns `true` if the entry is a function reference, else `false`.
|
||||
*/
|
||||
private function isFunction() {
|
||||
if (!isset($this->_isFunction)) {
|
||||
$this->_isFunction = !!(
|
||||
$this->isCtor() ||
|
||||
count($this->getParams()) ||
|
||||
count($this->getReturns()) ||
|
||||
preg_match('/\*[\t ]*@function\b/', $this->entry)
|
||||
);
|
||||
}
|
||||
return $this->_isFunction;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Extracts the entry's `alias` objects.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @param {number} $index The index of the array value to return.
|
||||
* @returns {Array|string} The entry's `alias` objects.
|
||||
*/
|
||||
public function getAliases( $index = null ) {
|
||||
if (!isset($this->_aliases)) {
|
||||
preg_match('#\*[\t ]*@alias\s+(.+)#', $this->entry, $result);
|
||||
|
||||
if (count($result)) {
|
||||
$result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]));
|
||||
$result = preg_split('/,\s*/', $result);
|
||||
natsort($result);
|
||||
|
||||
foreach ($result as $resultIndex => $value) {
|
||||
$result[$resultIndex] = new Alias($value, $this);
|
||||
}
|
||||
}
|
||||
$this->_aliases = $result;
|
||||
}
|
||||
return $index !== null
|
||||
? @$this->_aliases[$index]
|
||||
: $this->_aliases;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the function call from the entry.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {string} The function call.
|
||||
*/
|
||||
public function getCall() {
|
||||
if (isset($this->_call)) {
|
||||
return $this->_call;
|
||||
}
|
||||
|
||||
preg_match('#\*/\s*(?:function ([^(]*)|(.*?)(?=[:=,]|return\b))#', $this->entry, $result);
|
||||
if ($result = array_pop($result)) {
|
||||
$result = array_pop(explode('var ', trim(trim(array_pop(explode('.', $result))), "'")));
|
||||
}
|
||||
// resolve name
|
||||
// avoid $this->getName() because it calls $this->getCall()
|
||||
preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $name);
|
||||
if (count($name)) {
|
||||
$name = trim($name[1]);
|
||||
} else {
|
||||
$name = $result;
|
||||
}
|
||||
// compile function call syntax
|
||||
if ($this->isFunction()) {
|
||||
// compose parts
|
||||
$result = array($result);
|
||||
$params = $this->getParams();
|
||||
|
||||
foreach ($params as $param) {
|
||||
// skip params that are properties of other params (e.g. `options.leading`)
|
||||
if (!preg_match('/\w+\.[\w.]+\s*=/', $param[1])) {
|
||||
$result[] = $param[1];
|
||||
}
|
||||
}
|
||||
// format
|
||||
$result = $name .'('. implode(array_slice($result, 1), ', ') .')';
|
||||
}
|
||||
|
||||
$this->_call = $result ? $result : $name;
|
||||
return $this->_call;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the entry's `category` data.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {string} The entry's `category` data.
|
||||
*/
|
||||
public function getCategory() {
|
||||
if (isset($this->_category)) {
|
||||
return $this->_category;
|
||||
}
|
||||
|
||||
preg_match('#\*[\t ]*@category\s+(.+)#', $this->entry, $result);
|
||||
if (count($result)) {
|
||||
$result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]));
|
||||
} else {
|
||||
$result = $this->getType() == 'Function' ? 'Methods' : 'Properties';
|
||||
}
|
||||
$this->_category = $result;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the entry's description.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {string} The entry's description.
|
||||
*/
|
||||
public function getDesc() {
|
||||
if (isset($this->_desc)) {
|
||||
return $this->_desc;
|
||||
}
|
||||
|
||||
preg_match('#/\*\*(?:\s*\*)?([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result);
|
||||
if (count($result)) {
|
||||
$type = $this->getType();
|
||||
$result = preg_replace('/:\n[\t ]*\*[\t ]*/', ":<br>\n", $result[1]);
|
||||
$result = preg_replace('/(?:^|\n)[\t ]*\*\n[\t ]*\*[\t ]*/', "\n\n", $result);
|
||||
$result = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result);
|
||||
$result = trim($result);
|
||||
$result = ($type == 'Function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result;
|
||||
}
|
||||
$this->_desc = $result;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the entry's `example` data.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {string} The entry's `example` data.
|
||||
*/
|
||||
public function getExample() {
|
||||
if (isset($this->_example)) {
|
||||
return $this->_example;
|
||||
}
|
||||
|
||||
preg_match('#\*[\t ]*@example\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result);
|
||||
if (count($result)) {
|
||||
$result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', "\n", $result[1]));
|
||||
$result = '```' . $this->lang . "\n" . $result . "\n```";
|
||||
}
|
||||
$this->_example = $result;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the entry is an alias.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {boolean} Returns `false`.
|
||||
*/
|
||||
public function isAlias() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the entry is a constructor.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {boolean} Returns `true` if a constructor, else `false`.
|
||||
*/
|
||||
public function isCtor() {
|
||||
if (!isset($this->_isCtor)) {
|
||||
$this->_isCtor = !!preg_match('/\*[\t ]*@constructor\b/', $this->entry);
|
||||
}
|
||||
return $this->_isCtor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the entry is a license.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {boolean} Returns `true` if a license, else `false`.
|
||||
*/
|
||||
public function isLicense() {
|
||||
if (!isset($this->_isLicense)) {
|
||||
$this->_isLicense = !!preg_match('/\*[\t ]*@license\b/', $this->entry);
|
||||
}
|
||||
return $this->_isLicense;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the entry *is* assigned to a prototype.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {boolean} Returns `true` if assigned to a prototype, else `false`.
|
||||
*/
|
||||
public function isPlugin() {
|
||||
if (!isset($this->_isPlugin)) {
|
||||
$this->_isPlugin = !$this->isCtor() && !$this->isPrivate() && !$this->isStatic();
|
||||
}
|
||||
return $this->_isPlugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the entry is private.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {boolean} Returns `true` if private, else `false`.
|
||||
*/
|
||||
public function isPrivate() {
|
||||
if (!isset($this->_isPrivate)) {
|
||||
$this->_isPrivate = $this->isLicense() || !!preg_match('/\*[\t ]*@private\b/', $this->entry) || !preg_match('/\*[\t ]*@[a-z]+\b/', $this->entry);
|
||||
}
|
||||
return $this->_isPrivate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the entry is *not* assigned to a prototype.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {boolean} Returns `true` if not assigned to a prototype, else `false`.
|
||||
*/
|
||||
public function isStatic() {
|
||||
if (isset($this->_isStatic)) {
|
||||
return $this->_isStatic;
|
||||
}
|
||||
|
||||
$public = !$this->isPrivate();
|
||||
$result = $public && !!preg_match('/\*[\t ]*@static\b/', $this->entry);
|
||||
|
||||
// set in cases where it isn't explicitly stated
|
||||
if ($public && !$result) {
|
||||
if ($parent = array_pop(preg_split('/[#.]/', $this->getMembers(0)))) {
|
||||
foreach (Entry::getEntries($this->source) as $entry) {
|
||||
$entry = new Entry($entry, $this->source);
|
||||
if ($entry->getName() == $parent) {
|
||||
$result = !$entry->isCtor();
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$result = true;
|
||||
}
|
||||
}
|
||||
$this->_isStatic = $result;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the entry's line number.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {number} The entry's line number.
|
||||
*/
|
||||
public function getLineNumber() {
|
||||
if (!isset($this->_lineNumber)) {
|
||||
preg_match_all('/\n/', substr($this->source, 0, strrpos($this->source, $this->entry) + strlen($this->entry)), $lines);
|
||||
$this->_lineNumber = count(array_pop($lines)) + 1;
|
||||
}
|
||||
return $this->_lineNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the entry's `member` data.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @param {number} $index The index of the array value to return.
|
||||
* @returns {Array|string} The entry's `member` data.
|
||||
*/
|
||||
public function getMembers( $index = null ) {
|
||||
if (!isset($this->_members)) {
|
||||
preg_match('#\*[\t ]*@member(?:Of)?\s+(.+)#', $this->entry, $result);
|
||||
if (count($result)) {
|
||||
$result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]));
|
||||
$result = preg_split('/,\s*/', $result);
|
||||
natsort($result);
|
||||
}
|
||||
$this->_members = $result;
|
||||
}
|
||||
return $index !== null
|
||||
? @$this->_members[$index]
|
||||
: $this->_members;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the entry's `name` data.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {string} The entry's `name` data.
|
||||
*/
|
||||
public function getName() {
|
||||
if (isset($this->_name)) {
|
||||
return $this->_name;
|
||||
}
|
||||
|
||||
preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $result);
|
||||
if (count($result)) {
|
||||
$result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]));
|
||||
} else {
|
||||
$result = array_shift(explode('(', $this->getCall()));
|
||||
}
|
||||
$this->_name = $result;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the entry's `param` data.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @param {number} $index The index of the array value to return.
|
||||
* @returns {Array} The entry's `param` data.
|
||||
*/
|
||||
public function getParams( $index = null ) {
|
||||
if (!isset($this->_params)) {
|
||||
preg_match_all('#\*[\t ]*@param\s+\{\(?([^})]+)\)?\}\s+(\[.+\]|[$\w|]+(?:\[.+\])?)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $matchTuples);
|
||||
$matchTuples = array_filter(array_slice($matchTuples, 1));
|
||||
$result = array();
|
||||
|
||||
if (count($matchTuples)) {
|
||||
foreach ($matchTuples as $tupleKey => $tuple) {
|
||||
foreach ($tuple as $key => $value) {
|
||||
if (!isset($result[$key])) {
|
||||
$result[$key] = array();
|
||||
}
|
||||
$result[$key][] = $tupleKey
|
||||
? trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]*/', ' ', $value))
|
||||
: trim($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->_params = $result;
|
||||
}
|
||||
return $index !== null
|
||||
? @$this->_params[$index]
|
||||
: $this->_params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the entry's `returns` data.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {string} The entry's `returns` data.
|
||||
*/
|
||||
public function getReturns() {
|
||||
if (isset($this->_returns)) {
|
||||
return $this->_returns;
|
||||
}
|
||||
|
||||
preg_match('#\*[\t ]*@returns\s+\{([^}]+)\}\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result);
|
||||
if (count($result)) {
|
||||
$result = array_map('trim', array_slice($result, 1));
|
||||
$result[0] = str_replace('|', ', ', $result[0]);
|
||||
$result[1] = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]);
|
||||
}
|
||||
$this->_returns = $result;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the entry's `type` data.
|
||||
*
|
||||
* @memberOf Entry
|
||||
* @returns {string} The entry's `type` data.
|
||||
*/
|
||||
public function getType() {
|
||||
if (isset($this->_type)) {
|
||||
return $this->_type;
|
||||
}
|
||||
|
||||
preg_match('#\*[\t ]*@type\s(?:\{\(?)?([^)}\n]+)#', $this->entry, $result);
|
||||
if (count($result)) {
|
||||
$result = trim($result[1]);
|
||||
if (preg_match('/^(?:array|function|object|regexp)$/', $result)) {
|
||||
$result = ucfirst($result);
|
||||
}
|
||||
} else {
|
||||
$result = $this->isFunction() ? 'Function' : 'unknown';
|
||||
}
|
||||
$this->_type = $result;
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
?>
|
||||
567
vendor/docdown/src/DocDown/MarkdownGenerator.php
vendored
Normal file
@@ -0,0 +1,567 @@
|
||||
<?php
|
||||
|
||||
require(dirname(__FILE__) . "/Entry.php");
|
||||
|
||||
/**
|
||||
* Generates Markdown from JSDoc entries.
|
||||
*/
|
||||
class MarkdownGenerator {
|
||||
|
||||
/**
|
||||
* The HTML for the close tag.
|
||||
*
|
||||
* @static
|
||||
* @memberOf MarkdownGenerator
|
||||
* @type string
|
||||
*/
|
||||
public $closeTag = "\n<!-- /div -->\n";
|
||||
|
||||
/**
|
||||
* An array of JSDoc entries.
|
||||
*
|
||||
* @memberOf MarkdownGenerator
|
||||
* @type Array
|
||||
*/
|
||||
public $entries = array();
|
||||
|
||||
/**
|
||||
* The HTML for the open tag.
|
||||
*
|
||||
* @static
|
||||
* @memberOf MarkdownGenerator
|
||||
* @type string
|
||||
*/
|
||||
public $openTag = "\n<!-- div -->\n";
|
||||
|
||||
/**
|
||||
* An options array used to configure the generator.
|
||||
*
|
||||
* @memberOf MarkdownGenerator
|
||||
* @type Array
|
||||
*/
|
||||
public $options = array();
|
||||
|
||||
/**
|
||||
* The file's source code.
|
||||
*
|
||||
* @memberOf MarkdownGenerator
|
||||
* @type string
|
||||
*/
|
||||
public $source = '';
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The MarkdownGenerator constructor.
|
||||
*
|
||||
* @constructor
|
||||
* @param {string} $source The source code to parse.
|
||||
* @param {Array} $options The options array.
|
||||
*/
|
||||
public function __construct( $source, $options = array() ) {
|
||||
// juggle arguments
|
||||
if (is_array($source)) {
|
||||
$options = $source;
|
||||
} else {
|
||||
$options['source'] = $source;
|
||||
}
|
||||
if (isset($options['source']) && realpath($options['source'])) {
|
||||
$options['path'] = $options['source'];
|
||||
}
|
||||
if (isset($options['path'])) {
|
||||
preg_match('/(?<=\.)[a-z]+$/', $options['path'], $ext);
|
||||
$options['source'] = file_get_contents($options['path']);
|
||||
$ext = array_pop($ext);
|
||||
|
||||
if (!isset($options['lang']) && $ext) {
|
||||
$options['lang'] = $ext;
|
||||
}
|
||||
if (!isset($options['title'])) {
|
||||
$options['title'] = ucfirst(basename($options['path'])) . ' API documentation';
|
||||
}
|
||||
}
|
||||
if (!isset($options['lang'])) {
|
||||
$options['lang'] = 'js';
|
||||
}
|
||||
if (!isset($options['toc'])) {
|
||||
$options['toc'] = 'properties';
|
||||
}
|
||||
|
||||
$this->options = $options;
|
||||
$this->source = str_replace(PHP_EOL, "\n", $options['source']);
|
||||
$this->entries = Entry::getEntries($this->source);
|
||||
|
||||
foreach ($this->entries as $index => $value) {
|
||||
$this->entries[$index] = new Entry($value, $this->source, $options['lang']);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Performs common string formatting operations.
|
||||
*
|
||||
* @private
|
||||
* @static
|
||||
* @memberOf MarkdownGenerator
|
||||
* @param {string} $string The string to format.
|
||||
* @returns {string} The formatted string.
|
||||
*/
|
||||
private static function format( $string ) {
|
||||
$counter = 0;
|
||||
|
||||
// tokenize inline code snippets
|
||||
preg_match_all('/`[^`]+`/', $string, $tokenized);
|
||||
$tokenized = $tokenized[0];
|
||||
foreach ($tokenized as $snippet) {
|
||||
$string = str_replace($snippet, '__token' . ($counter++) .'__', $string);
|
||||
}
|
||||
|
||||
// italicize parentheses
|
||||
$string = preg_replace('/(^|\s)(\([^)]+\))/', '$1*$2*', $string);
|
||||
|
||||
// mark numbers as inline code
|
||||
$string = preg_replace('/[\t ](-?\d+(?:.\d+)?)(?!\.[^\n])/', ' `$1`', $string);
|
||||
|
||||
// detokenize inline code snippets
|
||||
$counter = 0;
|
||||
foreach ($tokenized as $snippet) {
|
||||
$string = str_replace('__token' . ($counter++) . '__', $snippet, $string);
|
||||
}
|
||||
|
||||
return trim($string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify a string by replacing named tokens with matching assoc. array values.
|
||||
*
|
||||
* @private
|
||||
* @static
|
||||
* @memberOf MarkdownGenerator
|
||||
* @param {string} $string The string to modify.
|
||||
* @param {Array|Object} $object The template object.
|
||||
* @returns {string} The modified string.
|
||||
*/
|
||||
private static function interpolate( $string, $object ) {
|
||||
preg_match_all('/#\{([^}]+)\}/', $string, $tokens);
|
||||
$tokens = array_unique(array_pop($tokens));
|
||||
|
||||
foreach ($tokens as $token) {
|
||||
$pattern = '/#\{' . preg_replace('/([.*+?^${}()|[\]\\\])/', '\\\$1', $token) . '\}/';
|
||||
$replacement = '';
|
||||
|
||||
if (is_object($object)) {
|
||||
preg_match('/\(([^)]+?)\)$/', $token, $args);
|
||||
$args = preg_split('/,\s*/', array_pop($args));
|
||||
$method = 'get' . ucfirst(preg_replace('/\([^)]+?\)$/', '', $token));
|
||||
|
||||
if (method_exists($object, $method)) {
|
||||
$replacement = (string) call_user_func_array(array($object, $method), $args);
|
||||
} else if (isset($object->{$token})) {
|
||||
$replacement = (string) $object->{$token};
|
||||
}
|
||||
} else if (isset($object[$token])) {
|
||||
$replacement = (string) $object[$token];
|
||||
}
|
||||
$string = preg_replace($pattern, trim($replacement), $string);
|
||||
}
|
||||
return MarkdownGenerator::format($string);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Adds the given `$entries` to the `$result` array.
|
||||
*
|
||||
* @private
|
||||
* @memberOf MarkdownGenerator
|
||||
* @param {Array} $result The result array to modify.
|
||||
* @param {Array} $entries The entries to add to the `$result`.
|
||||
*/
|
||||
private function addEntries( &$result, $entries ) {
|
||||
foreach ($entries as $entry) {
|
||||
// skip aliases
|
||||
if ($entry->isAlias()) {
|
||||
continue;
|
||||
}
|
||||
// name and description
|
||||
array_push(
|
||||
$result,
|
||||
$this->openTag,
|
||||
MarkdownGenerator::interpolate("### <a id=\"#{hash}\"></a>`#{member}#{separator}#{call}`\n<a href=\"##{hash}\">#</a> [Ⓢ](#{href} \"View in source\") [Ⓣ][1]\n\n#{desc}", $entry)
|
||||
);
|
||||
|
||||
// @alias
|
||||
if (count($aliases = $entry->getAliases())) {
|
||||
array_push($result, '', '#### Aliases');
|
||||
foreach ($aliases as $index => $alias) {
|
||||
$aliases[$index] = MarkdownGenerator::interpolate('#{member}#{separator}#{name}', $alias);
|
||||
}
|
||||
$result[] = '*' . implode(', ', $aliases) . '*';
|
||||
}
|
||||
// @param
|
||||
if (count($params = $entry->getParams())) {
|
||||
array_push($result, '', '#### Arguments');
|
||||
foreach ($params as $index => $param) {
|
||||
$result[] = MarkdownGenerator::interpolate('#{num}. `#{name}` (#{type}): #{desc}', array(
|
||||
'desc' => $param[2],
|
||||
'name' => $param[1],
|
||||
'num' => $index + 1,
|
||||
'type' => preg_replace('/(?<!\\\)(\*)/', '\\\$1', $param[0])
|
||||
));
|
||||
}
|
||||
}
|
||||
// @returns
|
||||
if (count($returns = $entry->getReturns())) {
|
||||
array_push(
|
||||
$result, '',
|
||||
'#### Returns',
|
||||
MarkdownGenerator::interpolate('(#{type}): #{desc}', array(
|
||||
'desc' => $returns[1],
|
||||
'type' => preg_replace('/(?<!\\\)(\*)/', '\\\$1', $returns[0])
|
||||
))
|
||||
);
|
||||
}
|
||||
// @example
|
||||
if ($example = $entry->getExample()) {
|
||||
array_push($result, '', '#### Example', $example);
|
||||
}
|
||||
array_push($result, "\n* * *", $this->closeTag);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the entry's hash used to navigate the documentation.
|
||||
*
|
||||
* @private
|
||||
* @memberOf MarkdownGenerator
|
||||
* @param {number|Object} $entry The entry object.
|
||||
* @param {string} $member The name of the member.
|
||||
* @returns {string} The url hash.
|
||||
*/
|
||||
private function getHash( $entry, $member = '' ) {
|
||||
$entry = is_numeric($entry) ? $this->entries[$entry] : $entry;
|
||||
$member = !$member ? $entry->getMembers(0) : $member;
|
||||
|
||||
$result = ($member ? $member . ($entry->isPlugin() ? 'prototype' : '') : '') . $entry->getCall();
|
||||
$result = preg_replace('/\(\[|\[\]/', '', $result);
|
||||
$result = preg_replace('/[\t =|\'"{}.()\]]/', '', $result);
|
||||
$result = preg_replace('/[[#,]/', '-', $result);
|
||||
return strtolower($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the entry's url for the specific line number.
|
||||
*
|
||||
* @private
|
||||
* @memberOf MarkdownGenerator
|
||||
* @param {number|Object} $entry The entry object.
|
||||
* @returns {string} The url.
|
||||
*/
|
||||
private function getLineUrl( $entry ) {
|
||||
$entry = is_numeric($entry) ? $this->entries($entry) : $entry;
|
||||
return $this->options['url'] . '#L' . $entry->getLineNumber();
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the character used to separate the entry's name from its member.
|
||||
*
|
||||
* @private
|
||||
* @memberOf MarkdownGenerator
|
||||
* @param {number|Object} $entry The entry object.
|
||||
* @returns {string} The separator.
|
||||
*/
|
||||
private function getSeparator( $entry ) {
|
||||
$entry = is_numeric($entry) ? $this->entries($entry) : $entry;
|
||||
return $entry->isPlugin() ? '.prototype.' : '.';
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Generates Markdown from JSDoc entries.
|
||||
*
|
||||
* @memberOf MarkdownGenerator
|
||||
* @returns {string} The rendered Markdown.
|
||||
*/
|
||||
public function generate() {
|
||||
$api = array();
|
||||
$byCategory = $this->options['toc'] == 'categories';
|
||||
$categories = array();
|
||||
$closeTag = $this->closeTag;
|
||||
$compiling = false;
|
||||
$openTag = $this->openTag;
|
||||
$result = array('# ' . $this->options['title']);
|
||||
$toc = 'toc';
|
||||
|
||||
// initialize $api array
|
||||
foreach ($this->entries as $entry) {
|
||||
// skip invalid or private entries
|
||||
$name = $entry->getName();
|
||||
if (!$name || $entry->isPrivate()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$members = $entry->getMembers();
|
||||
$members = count($members) ? $members : array('');
|
||||
|
||||
foreach ($members as $member) {
|
||||
// create api category arrays
|
||||
if ($member && !isset($api[$member])) {
|
||||
// create temporary entry to be replaced later
|
||||
$api[$member] = new stdClass;
|
||||
$api[$member]->static = array();
|
||||
$api[$member]->plugin = array();
|
||||
}
|
||||
|
||||
// append entry to api member
|
||||
if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' &&
|
||||
!preg_match('/[=:]\s*(?:null|undefined)\s*[,;]?$/', $entry->entry))) {
|
||||
|
||||
// assign the real entry, replacing the temporary entry if it exist
|
||||
$member = ($member ? $member . ($entry->isPlugin() ? '#' : '.') : '') . $name;
|
||||
$entry->static = @$api[$member] ? $api[$member]->static : array();
|
||||
$entry->plugin = @$api[$member] ? $api[$member]->plugin : array();
|
||||
|
||||
$api[$member] = $entry;
|
||||
foreach ($entry->getAliases() as $alias) {
|
||||
$api[$member]->static[] = $alias;
|
||||
}
|
||||
}
|
||||
else if ($entry->isStatic()) {
|
||||
$api[$member]->static[] = $entry;
|
||||
foreach ($entry->getAliases() as $alias) {
|
||||
$api[$member]->static[] = $alias;
|
||||
}
|
||||
}
|
||||
else if (!$entry->isCtor()) {
|
||||
$api[$member]->plugin[] = $entry;
|
||||
foreach ($entry->getAliases() as $alias) {
|
||||
$api[$member]->plugin[] = $alias;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add properties to each entry
|
||||
foreach ($api as $entry) {
|
||||
$entry->hash = $this->getHash($entry);
|
||||
$entry->href = $this->getLineUrl($entry);
|
||||
|
||||
$member = $entry->getMembers(0);
|
||||
$member = ($member ? $member . $this->getSeparator($entry) : '') . $entry->getName();
|
||||
$entry->member = preg_replace('/' . $entry->getName() . '$/', '', $member);
|
||||
|
||||
// add properties to static and plugin sub-entries
|
||||
foreach (array('static', 'plugin') as $kind) {
|
||||
foreach ($entry->{$kind} as $subentry) {
|
||||
$subentry->hash = $this->getHash($subentry);
|
||||
$subentry->href = $this->getLineUrl($subentry);
|
||||
$subentry->member = $member;
|
||||
$subentry->separator = $this->getSeparator($subentry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
// custom sort for root level entries
|
||||
// TODO: see how well it handles deeper namespace traversal
|
||||
function sortCompare($a, $b) {
|
||||
$score = array( 'a' => 0, 'b' => 0);
|
||||
foreach (array( 'a' => $a, 'b' => $b) as $key => $value) {
|
||||
// capitalized properties are last
|
||||
if (preg_match('/[#.][A-Z]/', $value)) {
|
||||
$score[$key] = 0;
|
||||
}
|
||||
// lowercase prototype properties are next to last
|
||||
else if (preg_match('/#[a-z]/', $value)) {
|
||||
$score[$key] = 1;
|
||||
}
|
||||
// lowercase static properties next to first
|
||||
else if (preg_match('/\.[a-z]/', $value)) {
|
||||
$score[$key] = 2;
|
||||
}
|
||||
// root properties are first
|
||||
else if (preg_match('/^[^#.]+$/', $value)) {
|
||||
$score[$key] = 3;
|
||||
}
|
||||
}
|
||||
$score = $score['b'] - $score['a'];
|
||||
return $score ? $score : strcasecmp($a, $b);
|
||||
}
|
||||
|
||||
uksort($api, 'sortCompare');
|
||||
|
||||
// sort static and plugin sub-entries
|
||||
foreach ($api as $entry) {
|
||||
foreach (array('static', 'plugin') as $kind) {
|
||||
$sortBy = array( 'a' => array(), 'b' => array(), 'c' => array() );
|
||||
foreach ($entry->{$kind} as $subentry) {
|
||||
$name = $subentry->getName();
|
||||
// functions w/o ALL-CAPs names are last
|
||||
$sortBy['a'][] = $subentry->getType() == 'Function' && !preg_match('/^[A-Z_]+$/', $name);
|
||||
// ALL-CAPs properties first
|
||||
$sortBy['b'][] = preg_match('/^[A-Z_]+$/', $name);
|
||||
// lowercase alphanumeric sort
|
||||
$sortBy['c'][] = strtolower($name);
|
||||
}
|
||||
array_multisort($sortBy['a'], SORT_ASC, $sortBy['b'], SORT_DESC, $sortBy['c'], SORT_ASC, $entry->{$kind});
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
// add categories
|
||||
foreach ($api as $entry) {
|
||||
$categories[$entry->getCategory()][] = $entry;
|
||||
foreach (array('static', 'plugin') as $kind) {
|
||||
foreach ($entry->{$kind} as $subentry) {
|
||||
$categories[$subentry->getCategory()][] = $subentry;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// sort categories
|
||||
ksort($categories);
|
||||
|
||||
foreach(array('Methods', 'Properties') as $category) {
|
||||
if (isset($categories[$category])) {
|
||||
$entries = $categories[$category];
|
||||
unset($categories[$category]);
|
||||
$categories[$category] = $entries;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
// compile TOC
|
||||
$result[] = $openTag;
|
||||
|
||||
// compile TOC by categories
|
||||
if ($byCategory) {
|
||||
foreach ($categories as $category => $entries) {
|
||||
if ($compiling) {
|
||||
$result[] = $closeTag;
|
||||
} else {
|
||||
$compiling = true;
|
||||
}
|
||||
// assign TOC hash
|
||||
if (count($result) == 2) {
|
||||
$toc = $category;
|
||||
}
|
||||
// add category
|
||||
array_push(
|
||||
$result,
|
||||
$openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $category . '`'
|
||||
);
|
||||
// add entries
|
||||
foreach ($entries as $entry) {
|
||||
$result[] = MarkdownGenerator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
// compile TOC by namespace
|
||||
else {
|
||||
foreach ($api as $entry) {
|
||||
if ($compiling) {
|
||||
$result[] = $closeTag;
|
||||
} else {
|
||||
$compiling = true;
|
||||
}
|
||||
$member = $entry->member . $entry->getName();
|
||||
|
||||
// assign TOC hash
|
||||
if (count($result) == 2) {
|
||||
$toc = $member;
|
||||
}
|
||||
// add root entry
|
||||
array_push(
|
||||
$result,
|
||||
$openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $member . '`',
|
||||
MarkdownGenerator::interpolate('* [`' . $member . '`](##{hash})', $entry)
|
||||
);
|
||||
|
||||
// add static and plugin sub-entries
|
||||
foreach (array('static', 'plugin') as $kind) {
|
||||
if ($kind == 'plugin' && count($entry->plugin)) {
|
||||
array_push(
|
||||
$result,
|
||||
$closeTag,
|
||||
$openTag,
|
||||
'## `' . $member . ($entry->isCtor() ? '.prototype`' : '`')
|
||||
);
|
||||
}
|
||||
foreach ($entry->{$kind} as $subentry) {
|
||||
$subentry->member = $member;
|
||||
$result[] = MarkdownGenerator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $subentry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
array_push($result, $closeTag, $closeTag);
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
// compile content
|
||||
$compiling = false;
|
||||
$result[] = $openTag;
|
||||
|
||||
if ($byCategory) {
|
||||
foreach ($categories as $category => $entries) {
|
||||
if ($compiling) {
|
||||
$result[] = $closeTag;
|
||||
} else {
|
||||
$compiling = true;
|
||||
}
|
||||
if ($category != 'Methods' && $category != 'Properties') {
|
||||
$category = '“' . $category . '” Methods';
|
||||
}
|
||||
array_push($result, $openTag, '## `' . $category . '`');
|
||||
$this->addEntries($result, $entries);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach ($api as $entry) {
|
||||
// skip aliases
|
||||
if ($entry->isAlias()) {
|
||||
continue;
|
||||
}
|
||||
if ($compiling) {
|
||||
$result[] = $closeTag;
|
||||
} else {
|
||||
$compiling = true;
|
||||
}
|
||||
// add root entry name
|
||||
$member = $entry->member . $entry->getName();
|
||||
array_push($result, $openTag, '## `' . $member . '`');
|
||||
|
||||
foreach (array($entry, 'static', 'plugin') as $kind) {
|
||||
$subentries = is_string($kind) ? $entry->{$kind} : array($kind);
|
||||
|
||||
// add sub-entry name
|
||||
if ($kind != 'static' && $entry->getType() != 'Object' &&
|
||||
count($subentries) && $subentries[0] != $kind) {
|
||||
if ($kind == 'plugin') {
|
||||
$result[] = $closeTag;
|
||||
}
|
||||
array_push(
|
||||
$result,
|
||||
$openTag,
|
||||
'## `' . $member . ($kind == 'plugin' ? '.prototype`' : '`')
|
||||
);
|
||||
}
|
||||
$this->addEntries($result, $subentries);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// close tags add TOC link reference
|
||||
array_push($result, $closeTag, $closeTag, '', ' [1]: #' . $toc . ' "Jump back to the TOC."');
|
||||
|
||||
// cleanup whitespace
|
||||
return trim(preg_replace('/[\t ]+\n/', "\n", join($result, "\n")));
|
||||
}
|
||||
}
|
||||
?>
|
||||
195
vendor/dojo/LICENSE
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
Dojo is available under *either* the terms of the modified BSD license *or* the
|
||||
Academic Free License version 2.1. As a recipient of Dojo, you may choose which
|
||||
license to receive this code under (except as noted in per-module LICENSE
|
||||
files). Some modules may not be the copyright of the Dojo Foundation. These
|
||||
modules contain explicit declarations of copyright in both the LICENSE files in
|
||||
the directories in which they reside and in the code itself. No external
|
||||
contributions are allowed under licenses which are fundamentally incompatible
|
||||
with the AFL or BSD licenses that Dojo is distributed under.
|
||||
|
||||
The text of the AFL and BSD licenses is reproduced below.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
The "New" BSD License:
|
||||
**********************
|
||||
|
||||
Copyright (c) 2005-2013, The Dojo Foundation
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the Dojo Foundation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
The Academic Free License, v. 2.1:
|
||||
**********************************
|
||||
|
||||
This Academic Free License (the "License") applies to any original work of
|
||||
authorship (the "Original Work") whose owner (the "Licensor") has placed the
|
||||
following notice immediately following the copyright notice for the Original
|
||||
Work:
|
||||
|
||||
Licensed under the Academic Free License version 2.1
|
||||
|
||||
1) Grant of Copyright License. Licensor hereby grants You a world-wide,
|
||||
royalty-free, non-exclusive, perpetual, sublicenseable license to do the
|
||||
following:
|
||||
|
||||
a) to reproduce the Original Work in copies;
|
||||
|
||||
b) to prepare derivative works ("Derivative Works") based upon the Original
|
||||
Work;
|
||||
|
||||
c) to distribute copies of the Original Work and Derivative Works to the
|
||||
public;
|
||||
|
||||
d) to perform the Original Work publicly; and
|
||||
|
||||
e) to display the Original Work publicly.
|
||||
|
||||
2) Grant of Patent License. Licensor hereby grants You a world-wide,
|
||||
royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
|
||||
claims owned or controlled by the Licensor that are embodied in the Original
|
||||
Work as furnished by the Licensor, to make, use, sell and offer for sale the
|
||||
Original Work and Derivative Works.
|
||||
|
||||
3) Grant of Source Code License. The term "Source Code" means the preferred
|
||||
form of the Original Work for making modifications to it and all available
|
||||
documentation describing how to modify the Original Work. Licensor hereby
|
||||
agrees to provide a machine-readable copy of the Source Code of the Original
|
||||
Work along with each copy of the Original Work that Licensor distributes.
|
||||
Licensor reserves the right to satisfy this obligation by placing a
|
||||
machine-readable copy of the Source Code in an information repository
|
||||
reasonably calculated to permit inexpensive and convenient access by You for as
|
||||
long as Licensor continues to distribute the Original Work, and by publishing
|
||||
the address of that information repository in a notice immediately following
|
||||
the copyright notice that applies to the Original Work.
|
||||
|
||||
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
|
||||
of any contributors to the Original Work, nor any of their trademarks or
|
||||
service marks, may be used to endorse or promote products derived from this
|
||||
Original Work without express prior written permission of the Licensor. Nothing
|
||||
in this License shall be deemed to grant any rights to trademarks, copyrights,
|
||||
patents, trade secrets or any other intellectual property of Licensor except as
|
||||
expressly stated herein. No patent license is granted to make, use, sell or
|
||||
offer to sell embodiments of any patent claims other than the licensed claims
|
||||
defined in Section 2. No right is granted to the trademarks of Licensor even if
|
||||
such marks are included in the Original Work. Nothing in this License shall be
|
||||
interpreted to prohibit Licensor from licensing under different terms from this
|
||||
License any Original Work that Licensor otherwise would have a right to
|
||||
license.
|
||||
|
||||
5) This section intentionally omitted.
|
||||
|
||||
6) Attribution Rights. You must retain, in the Source Code of any Derivative
|
||||
Works that You create, all copyright, patent or trademark notices from the
|
||||
Source Code of the Original Work, as well as any notices of licensing and any
|
||||
descriptive text identified therein as an "Attribution Notice." You must cause
|
||||
the Source Code for any Derivative Works that You create to carry a prominent
|
||||
Attribution Notice reasonably calculated to inform recipients that You have
|
||||
modified the Original Work.
|
||||
|
||||
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
|
||||
the copyright in and to the Original Work and the patent rights granted herein
|
||||
by Licensor are owned by the Licensor or are sublicensed to You under the terms
|
||||
of this License with the permission of the contributor(s) of those copyrights
|
||||
and patent rights. Except as expressly stated in the immediately proceeding
|
||||
sentence, the Original Work is provided under this License on an "AS IS" BASIS
|
||||
and WITHOUT WARRANTY, either express or implied, including, without limitation,
|
||||
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
|
||||
This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
|
||||
license to Original Work is granted hereunder except under this disclaimer.
|
||||
|
||||
8) Limitation of Liability. Under no circumstances and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise, shall the
|
||||
Licensor be liable to any person for any direct, indirect, special, incidental,
|
||||
or consequential damages of any character arising as a result of this License
|
||||
or the use of the Original Work including, without limitation, damages for loss
|
||||
of goodwill, work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses. This limitation of liability shall not
|
||||
apply to liability for death or personal injury resulting from Licensor's
|
||||
negligence to the extent applicable law prohibits such limitation. Some
|
||||
jurisdictions do not allow the exclusion or limitation of incidental or
|
||||
consequential damages, so this exclusion and limitation may not apply to You.
|
||||
|
||||
9) Acceptance and Termination. If You distribute copies of the Original Work or
|
||||
a Derivative Work, You must make a reasonable effort under the circumstances to
|
||||
obtain the express assent of recipients to the terms of this License. Nothing
|
||||
else but this License (or another written agreement between Licensor and You)
|
||||
grants You permission to create Derivative Works based upon the Original Work
|
||||
or to exercise any of the rights granted in Section 1 herein, and any attempt
|
||||
to do so except under the terms of this License (or another written agreement
|
||||
between Licensor and You) is expressly prohibited by U.S. copyright law, the
|
||||
equivalent laws of other countries, and by international treaty. Therefore, by
|
||||
exercising any of the rights granted to You in Section 1 herein, You indicate
|
||||
Your acceptance of this License and all of its terms and conditions.
|
||||
|
||||
10) Termination for Patent Action. This License shall terminate automatically
|
||||
and You may no longer exercise any of the rights granted to You by this License
|
||||
as of the date You commence an action, including a cross-claim or counterclaim,
|
||||
against Licensor or any licensee alleging that the Original Work infringes a
|
||||
patent. This termination provision shall not apply for an action alleging
|
||||
patent infringement by combinations of the Original Work with other software or
|
||||
hardware.
|
||||
|
||||
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
|
||||
License may be brought only in the courts of a jurisdiction wherein the
|
||||
Licensor resides or in which Licensor conducts its primary business, and under
|
||||
the laws of that jurisdiction excluding its conflict-of-law provisions. The
|
||||
application of the United Nations Convention on Contracts for the International
|
||||
Sale of Goods is expressly excluded. Any use of the Original Work outside the
|
||||
scope of this License or after its termination shall be subject to the
|
||||
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
|
||||
seq., the equivalent laws of other countries, and international treaty. This
|
||||
section shall survive the termination of this License.
|
||||
|
||||
12) Attorneys Fees. In any action to enforce the terms of this License or
|
||||
seeking damages relating thereto, the prevailing party shall be entitled to
|
||||
recover its costs and expenses, including, without limitation, reasonable
|
||||
attorneys' fees and costs incurred in connection with such action, including
|
||||
any appeal of such action. This section shall survive the termination of this
|
||||
License.
|
||||
|
||||
13) Miscellaneous. This License represents the complete agreement concerning
|
||||
the subject matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent necessary to
|
||||
make it enforceable.
|
||||
|
||||
14) Definition of "You" in This License. "You" throughout this License, whether
|
||||
in upper or lower case, means an individual or a legal entity exercising rights
|
||||
under, and complying with all of the terms of, this License. For legal
|
||||
entities, "You" includes any entity that controls, is controlled by, or is
|
||||
under common control with you. For purposes of this definition, "control" means
|
||||
(i) the power, direct or indirect, to cause the direction or management of such
|
||||
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
|
||||
(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
|
||||
entity.
|
||||
|
||||
15) Right to Use. You may use the Original Work in all ways not otherwise
|
||||
restricted or conditioned by this License or by law, and Licensor promises not
|
||||
to interfere with or be responsible for such uses by You.
|
||||
|
||||
This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
|
||||
Permission is hereby granted to copy and distribute this license without
|
||||
modification. This license may not be modified without the express written
|
||||
permission of its copyright owner.
|
||||
1997
vendor/dojo/dojo.js
vendored
Normal file
1049
vendor/firebug-lite/changelog.txt
vendored
0
vendor/firebug-lite/license.txt
vendored
Normal file → Executable file
0
vendor/firebug-lite/skin/xp/blank.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
0
vendor/firebug-lite/skin/xp/buttonBg.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
0
vendor/firebug-lite/skin/xp/buttonBgHover.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 171 B |
662
vendor/firebug-lite/skin/xp/debugger.css
vendored
Normal file → Executable file
@@ -1,331 +1,331 @@
|
||||
/* See license.txt for terms of usage */
|
||||
|
||||
.panelNode-script {
|
||||
overflow: hidden;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.scriptTooltip {
|
||||
position: fixed;
|
||||
z-index: 2147483647;
|
||||
padding: 2px 3px;
|
||||
border: 1px solid #CBE087;
|
||||
background: LightYellow;
|
||||
font-family: monospace;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.sourceBox {
|
||||
/* TODO: xxxpedro problem with sourceBox and scrolling elements */
|
||||
/*overflow: scroll; /* see issue 1479 */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sourceRow {
|
||||
white-space: nowrap;
|
||||
-moz-user-select: text;
|
||||
}
|
||||
|
||||
.sourceRow.hovered {
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.sourceLine {
|
||||
-moz-user-select: none;
|
||||
margin-right: 10px;
|
||||
border-right: 1px solid #CCCCCC;
|
||||
padding: 0px 4px 0 20px;
|
||||
background: #EEEEEE no-repeat 2px 0px;
|
||||
color: #888888;
|
||||
white-space: pre;
|
||||
font-family: monospace; /* see issue 2953 */
|
||||
}
|
||||
|
||||
.noteInToolTip { /* below sourceLine, so it overrides it */
|
||||
background-color: #FFD472;
|
||||
}
|
||||
|
||||
.useA11y .sourceBox .sourceViewport:focus .sourceLine {
|
||||
background-color: #FFFFC0;
|
||||
color: navy;
|
||||
border-right: 1px solid black;
|
||||
}
|
||||
|
||||
.useA11y .sourceBox .sourceViewport:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.a11y1emSize {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.useA11y .panelStatusLabel:focus {
|
||||
outline-offset: -2px !important;
|
||||
}
|
||||
|
||||
.sourceBox > .sourceRow > .sourceLine {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sourceLine:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sourceRowText {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.sourceRow[exe_line="true"] {
|
||||
outline: 1px solid #D9D9B6;
|
||||
margin-right: 1px;
|
||||
background-color: lightgoldenrodyellow;
|
||||
}
|
||||
|
||||
.sourceRow[executable="true"] > .sourceLine {
|
||||
content: "-";
|
||||
color: #4AA02C; /* Spring Green */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sourceRow[exe_line="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/exe.png);
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpoint.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][condition="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointCondition.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][disabledBreakpoint="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointDisabled.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][exe_line="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointExe.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][exe_line="true"][disabledBreakpoint="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointDisabledExe.png);
|
||||
}
|
||||
|
||||
.sourceLine.editing {
|
||||
background-image: url(chrome://firebug/skin/breakpoint.png);
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.conditionEditor {
|
||||
z-index: 2147483647;
|
||||
position: absolute;
|
||||
margin-top: 0;
|
||||
left: 2px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.conditionEditorInner {
|
||||
position: relative;
|
||||
top: -26px;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.conditionCaption {
|
||||
margin-bottom: 2px;
|
||||
font-family: Lucida Grande, sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
color: #226679;
|
||||
}
|
||||
|
||||
.conditionInput {
|
||||
width: 100%;
|
||||
border: 1px solid #0096C0;
|
||||
font-family: monospace;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.conditionEditorInner1 {
|
||||
padding-left: 37px;
|
||||
background: url(condBorders.png) repeat-y;
|
||||
}
|
||||
|
||||
.conditionEditorInner2 {
|
||||
padding-right: 25px;
|
||||
background: url(condBorders.png) repeat-y 100% 0;
|
||||
}
|
||||
|
||||
.conditionEditorTop1 {
|
||||
background: url(condCorners.png) no-repeat 100% 0;
|
||||
margin-left: 37px;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.conditionEditorTop2 {
|
||||
position: relative;
|
||||
left: -37px;
|
||||
width: 37px;
|
||||
height: 35px;
|
||||
background: url(condCorners.png) no-repeat;
|
||||
}
|
||||
|
||||
.conditionEditorBottom1 {
|
||||
background: url(condCorners.png) no-repeat 100% 100%;
|
||||
margin-left: 37px;
|
||||
height: 33px;
|
||||
}
|
||||
|
||||
.conditionEditorBottom2 {
|
||||
position: relative; left: -37px;
|
||||
width: 37px;
|
||||
height: 33px;
|
||||
background: url(condCorners.png) no-repeat 0 100%;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.upsideDown {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorInner {
|
||||
top: -8px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorInner1 {
|
||||
padding-left: 33px;
|
||||
background: url(condBordersUps.png) repeat-y;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorInner2 {
|
||||
padding-right: 25px;
|
||||
background: url(condBordersUps.png) repeat-y 100% 0;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorTop1 {
|
||||
background: url(condCornersUps.png) no-repeat 100% 0;
|
||||
margin-left: 33px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorTop2 {
|
||||
position: relative;
|
||||
left: -33px;
|
||||
width: 33px;
|
||||
height: 25px;
|
||||
background: url(condCornersUps.png) no-repeat;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorBottom1 {
|
||||
background: url(condCornersUps.png) no-repeat 100% 100%;
|
||||
margin-left: 33px;
|
||||
height: 43px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorBottom2 {
|
||||
position: relative;
|
||||
left: -33px;
|
||||
width: 33px;
|
||||
height: 43px;
|
||||
background: url(condCornersUps.png) no-repeat 0 100%;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.breakpointsGroupListBox {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.breakpointBlockHead {
|
||||
position: relative;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.breakpointBlockHead > .checkbox {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.breakpointBlockHead > .objectLink-sourceLink {
|
||||
top: 4px;
|
||||
right: 20px;
|
||||
background-color: #FFFFFF; /* issue 3308 */
|
||||
}
|
||||
|
||||
.breakpointBlockHead > .closeButton {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
.breakpointCheckbox {
|
||||
margin-top: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.breakpointName {
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.breakpointRow[aria-checked="false"] > .breakpointBlockHead > *,
|
||||
.breakpointRow[aria-checked="false"] > .breakpointCode {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.breakpointRow[aria-checked="false"] .breakpointCheckbox,
|
||||
.breakpointRow[aria-checked="false"] .objectLink-sourceLink,
|
||||
.breakpointRow[aria-checked="false"] .closeButton,
|
||||
.breakpointRow[aria-checked="false"] .breakpointMutationType {
|
||||
opacity: 1.0 !important;
|
||||
}
|
||||
|
||||
.breakpointCode {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
padding-left: 24px;
|
||||
padding-bottom: 2px;
|
||||
border-bottom: 1px solid #D7D7D7;
|
||||
font-family: monospace;
|
||||
color: DarkGreen;
|
||||
}
|
||||
|
||||
.breakpointCondition {
|
||||
white-space: nowrap;
|
||||
padding-left: 24px;
|
||||
padding-bottom: 2px;
|
||||
border-bottom: 1px solid #D7D7D7;
|
||||
font-family: monospace;
|
||||
color: Gray;
|
||||
}
|
||||
|
||||
.breakpointBlock-breakpoints > .groupHeader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.breakpointBlock-monitors > .breakpointCode {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.breakpointBlock-errorBreakpoints .breakpointCheckbox,
|
||||
.breakpointBlock-monitors .breakpointCheckbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.breakpointHeader {
|
||||
margin: 0 !important;
|
||||
border-top: none !important;
|
||||
}
|
||||
/* See license.txt for terms of usage */
|
||||
|
||||
.panelNode-script {
|
||||
overflow: hidden;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.scriptTooltip {
|
||||
position: fixed;
|
||||
z-index: 2147483647;
|
||||
padding: 2px 3px;
|
||||
border: 1px solid #CBE087;
|
||||
background: LightYellow;
|
||||
font-family: monospace;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.sourceBox {
|
||||
/* TODO: xxxpedro problem with sourceBox and scrolling elements */
|
||||
/*overflow: scroll; /* see issue 1479 */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sourceRow {
|
||||
white-space: nowrap;
|
||||
-moz-user-select: text;
|
||||
}
|
||||
|
||||
.sourceRow.hovered {
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.sourceLine {
|
||||
-moz-user-select: none;
|
||||
margin-right: 10px;
|
||||
border-right: 1px solid #CCCCCC;
|
||||
padding: 0px 4px 0 20px;
|
||||
background: #EEEEEE no-repeat 2px 0px;
|
||||
color: #888888;
|
||||
white-space: pre;
|
||||
font-family: monospace; /* see issue 2953 */
|
||||
}
|
||||
|
||||
.noteInToolTip { /* below sourceLine, so it overrides it */
|
||||
background-color: #FFD472;
|
||||
}
|
||||
|
||||
.useA11y .sourceBox .sourceViewport:focus .sourceLine {
|
||||
background-color: #FFFFC0;
|
||||
color: navy;
|
||||
border-right: 1px solid black;
|
||||
}
|
||||
|
||||
.useA11y .sourceBox .sourceViewport:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.a11y1emSize {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.useA11y .panelStatusLabel:focus {
|
||||
outline-offset: -2px !important;
|
||||
}
|
||||
|
||||
.sourceBox > .sourceRow > .sourceLine {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sourceLine:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sourceRowText {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.sourceRow[exe_line="true"] {
|
||||
outline: 1px solid #D9D9B6;
|
||||
margin-right: 1px;
|
||||
background-color: lightgoldenrodyellow;
|
||||
}
|
||||
|
||||
.sourceRow[executable="true"] > .sourceLine {
|
||||
content: "-";
|
||||
color: #4AA02C; /* Spring Green */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sourceRow[exe_line="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/exe.png);
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpoint.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][condition="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointCondition.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][disabledBreakpoint="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointDisabled.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][exe_line="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointExe.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][exe_line="true"][disabledBreakpoint="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointDisabledExe.png);
|
||||
}
|
||||
|
||||
.sourceLine.editing {
|
||||
background-image: url(chrome://firebug/skin/breakpoint.png);
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.conditionEditor {
|
||||
z-index: 2147483647;
|
||||
position: absolute;
|
||||
margin-top: 0;
|
||||
left: 2px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.conditionEditorInner {
|
||||
position: relative;
|
||||
top: -26px;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.conditionCaption {
|
||||
margin-bottom: 2px;
|
||||
font-family: Lucida Grande, sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
color: #226679;
|
||||
}
|
||||
|
||||
.conditionInput {
|
||||
width: 100%;
|
||||
border: 1px solid #0096C0;
|
||||
font-family: monospace;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.conditionEditorInner1 {
|
||||
padding-left: 37px;
|
||||
background: url(condBorders.png) repeat-y;
|
||||
}
|
||||
|
||||
.conditionEditorInner2 {
|
||||
padding-right: 25px;
|
||||
background: url(condBorders.png) repeat-y 100% 0;
|
||||
}
|
||||
|
||||
.conditionEditorTop1 {
|
||||
background: url(condCorners.png) no-repeat 100% 0;
|
||||
margin-left: 37px;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.conditionEditorTop2 {
|
||||
position: relative;
|
||||
left: -37px;
|
||||
width: 37px;
|
||||
height: 35px;
|
||||
background: url(condCorners.png) no-repeat;
|
||||
}
|
||||
|
||||
.conditionEditorBottom1 {
|
||||
background: url(condCorners.png) no-repeat 100% 100%;
|
||||
margin-left: 37px;
|
||||
height: 33px;
|
||||
}
|
||||
|
||||
.conditionEditorBottom2 {
|
||||
position: relative; left: -37px;
|
||||
width: 37px;
|
||||
height: 33px;
|
||||
background: url(condCorners.png) no-repeat 0 100%;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.upsideDown {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorInner {
|
||||
top: -8px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorInner1 {
|
||||
padding-left: 33px;
|
||||
background: url(condBordersUps.png) repeat-y;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorInner2 {
|
||||
padding-right: 25px;
|
||||
background: url(condBordersUps.png) repeat-y 100% 0;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorTop1 {
|
||||
background: url(condCornersUps.png) no-repeat 100% 0;
|
||||
margin-left: 33px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorTop2 {
|
||||
position: relative;
|
||||
left: -33px;
|
||||
width: 33px;
|
||||
height: 25px;
|
||||
background: url(condCornersUps.png) no-repeat;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorBottom1 {
|
||||
background: url(condCornersUps.png) no-repeat 100% 100%;
|
||||
margin-left: 33px;
|
||||
height: 43px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorBottom2 {
|
||||
position: relative;
|
||||
left: -33px;
|
||||
width: 33px;
|
||||
height: 43px;
|
||||
background: url(condCornersUps.png) no-repeat 0 100%;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.breakpointsGroupListBox {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.breakpointBlockHead {
|
||||
position: relative;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.breakpointBlockHead > .checkbox {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.breakpointBlockHead > .objectLink-sourceLink {
|
||||
top: 4px;
|
||||
right: 20px;
|
||||
background-color: #FFFFFF; /* issue 3308 */
|
||||
}
|
||||
|
||||
.breakpointBlockHead > .closeButton {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
.breakpointCheckbox {
|
||||
margin-top: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.breakpointName {
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.breakpointRow[aria-checked="false"] > .breakpointBlockHead > *,
|
||||
.breakpointRow[aria-checked="false"] > .breakpointCode {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.breakpointRow[aria-checked="false"] .breakpointCheckbox,
|
||||
.breakpointRow[aria-checked="false"] .objectLink-sourceLink,
|
||||
.breakpointRow[aria-checked="false"] .closeButton,
|
||||
.breakpointRow[aria-checked="false"] .breakpointMutationType {
|
||||
opacity: 1.0 !important;
|
||||
}
|
||||
|
||||
.breakpointCode {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
padding-left: 24px;
|
||||
padding-bottom: 2px;
|
||||
border-bottom: 1px solid #D7D7D7;
|
||||
font-family: monospace;
|
||||
color: DarkGreen;
|
||||
}
|
||||
|
||||
.breakpointCondition {
|
||||
white-space: nowrap;
|
||||
padding-left: 24px;
|
||||
padding-bottom: 2px;
|
||||
border-bottom: 1px solid #D7D7D7;
|
||||
font-family: monospace;
|
||||
color: Gray;
|
||||
}
|
||||
|
||||
.breakpointBlock-breakpoints > .groupHeader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.breakpointBlock-monitors > .breakpointCode {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.breakpointBlock-errorBreakpoints .breakpointCheckbox,
|
||||
.breakpointBlock-monitors .breakpointCheckbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.breakpointHeader {
|
||||
margin: 0 !important;
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
0
vendor/firebug-lite/skin/xp/detach.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 655 B |
0
vendor/firebug-lite/skin/xp/detachHover.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 586 B |
0
vendor/firebug-lite/skin/xp/disable.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
0
vendor/firebug-lite/skin/xp/disable.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B |
0
vendor/firebug-lite/skin/xp/disableHover.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
0
vendor/firebug-lite/skin/xp/disableHover.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 512 B |
0
vendor/firebug-lite/skin/xp/down.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 637 B |
0
vendor/firebug-lite/skin/xp/downActive.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B |
0
vendor/firebug-lite/skin/xp/downHover.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
0
vendor/firebug-lite/skin/xp/errorIcon-sm.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 447 B |
0
vendor/firebug-lite/skin/xp/errorIcon.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 365 B |
0
vendor/firebug-lite/skin/xp/errorIcon.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 457 B |
1634
vendor/firebug-lite/skin/xp/firebug-1.3a2.css
vendored
Normal file → Executable file
40
vendor/firebug-lite/skin/xp/firebug.IE6.css
vendored
Normal file → Executable file
@@ -1,20 +1,20 @@
|
||||
/************************************************************************************************/
|
||||
#fbToolbarSearch {
|
||||
background-image: url(search.gif) !important;
|
||||
}
|
||||
/************************************************************************************************/
|
||||
.fbErrors {
|
||||
background-image: url(errorIcon.gif) !important;
|
||||
}
|
||||
/************************************************************************************************/
|
||||
.logRow-info {
|
||||
background-image: url(infoIcon.gif) !important;
|
||||
}
|
||||
|
||||
.logRow-warning {
|
||||
background-image: url(warningIcon.gif) !important;
|
||||
}
|
||||
|
||||
.logRow-error {
|
||||
background-image: url(errorIcon.gif) !important;
|
||||
}
|
||||
/************************************************************************************************/
|
||||
#fbToolbarSearch {
|
||||
background-image: url(search.gif) !important;
|
||||
}
|
||||
/************************************************************************************************/
|
||||
.fbErrors {
|
||||
background-image: url(errorIcon.gif) !important;
|
||||
}
|
||||
/************************************************************************************************/
|
||||
.logRow-info {
|
||||
background-image: url(infoIcon.gif) !important;
|
||||
}
|
||||
|
||||
.logRow-warning {
|
||||
background-image: url(warningIcon.gif) !important;
|
||||
}
|
||||
|
||||
.logRow-error {
|
||||
background-image: url(errorIcon.gif) !important;
|
||||
}
|
||||
|
||||
6294
vendor/firebug-lite/skin/xp/firebug.css
vendored
Normal file → Executable file
428
vendor/firebug-lite/skin/xp/firebug.html
vendored
Normal file → Executable file
@@ -1,215 +1,215 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Firebug Lite</title>
|
||||
<!-- An empty script to avoid FOUC when loading the stylesheet -->
|
||||
<script type="text/javascript"></script>
|
||||
<style type="text/css" media="screen">@import "firebug.css";</style>
|
||||
<style>html,body{margin:0;padding:0;overflow:hidden;}</style>
|
||||
</head>
|
||||
<body class="fbBody">
|
||||
<table id="fbChrome" cellpadding="0" cellspacing="0" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<!-- Interface - Top Area -->
|
||||
<td id="fbTop" colspan="2">
|
||||
|
||||
<!--
|
||||
<div>
|
||||
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
|
||||
<input type="text" id="fbToolbarSearch" />
|
||||
</div>
|
||||
-->
|
||||
|
||||
<!-- Window Buttons -->
|
||||
<div id="fbWindowButtons">
|
||||
<a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page"> </a>
|
||||
<a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window"> </a>
|
||||
<a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug"> </a>
|
||||
</div>
|
||||
|
||||
<!-- Toolbar buttons and Status Bar -->
|
||||
<div id="fbToolbar">
|
||||
<div id="fbToolbarContent">
|
||||
|
||||
<!-- Firebug Button -->
|
||||
<span id="fbToolbarIcon">
|
||||
<a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank"> </a>
|
||||
</span>
|
||||
|
||||
<!--
|
||||
<span id="fbLeftToolbarErrors" class="fbErrors">2 errors</span>
|
||||
-->
|
||||
|
||||
<!-- Toolbar Buttons -->
|
||||
<span id="fbToolbarButtons">
|
||||
<!-- Fixed Toolbar Buttons -->
|
||||
<span id="fbFixedButtons">
|
||||
<a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a>
|
||||
</span>
|
||||
|
||||
<!-- Console Panel Toolbar Buttons -->
|
||||
<span id="fbConsoleButtons" class="fbToolbarButtons">
|
||||
<a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a>
|
||||
</span>
|
||||
|
||||
<!-- HTML Panel Toolbar Buttons -->
|
||||
<!--
|
||||
<span id="fbHTMLButtons" class="fbToolbarButtons">
|
||||
<a id="fbHTML_btEdit" class="fbHover" title="Edit this HTML">Edit</a>
|
||||
</span>
|
||||
-->
|
||||
</span>
|
||||
|
||||
<!-- Status Bar -->
|
||||
<span id="fbStatusBarBox">
|
||||
<span class="fbToolbarSeparator"></span>
|
||||
<!-- HTML Panel Status Bar -->
|
||||
<!--
|
||||
<span id="fbHTMLStatusBar" class="fbStatusBar fbToolbarButtons">
|
||||
</span>
|
||||
-->
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- PanelBars -->
|
||||
<div id="fbPanelBarBox">
|
||||
|
||||
<!-- Main PanelBar -->
|
||||
<div id="fbPanelBar1" class="fbPanelBar">
|
||||
<a id="fbConsoleTab" class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">Console</span>
|
||||
<span class="fbTabMenuTarget"></span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a id="fbHTMLTab" class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">HTML</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">CSS</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">Script</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">DOM</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Side PanelBars -->
|
||||
<div id="fbPanelBar2Box" class="hide">
|
||||
<div id="fbPanelBar2" class="fbPanelBar">
|
||||
<!--
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">Style</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">Layout</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">DOM</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Horizontal Splitter -->
|
||||
<div id="fbHSplitter"> </div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Interface - Main Area -->
|
||||
<tr id="fbContent">
|
||||
|
||||
<!-- Panels -->
|
||||
<td id="fbPanelBox1">
|
||||
<div id="fbPanel1" class="fbFitHeight">
|
||||
<div id="fbConsole" class="fbPanel"></div>
|
||||
<div id="fbHTML" class="fbPanel"></div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Side Panel Box -->
|
||||
<td id="fbPanelBox2" class="hide">
|
||||
|
||||
<!-- VerticalSplitter -->
|
||||
<div id="fbVSplitter" class="fbVSplitter"> </div>
|
||||
|
||||
<!-- Side Panels -->
|
||||
<div id="fbPanel2" class="fbFitHeight">
|
||||
|
||||
<!-- HTML Side Panels -->
|
||||
<div id="fbHTML_Style" class="fbPanel"></div>
|
||||
<div id="fbHTML_Layout" class="fbPanel"></div>
|
||||
<div id="fbHTML_DOM" class="fbPanel"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Large Command Line -->
|
||||
<textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea>
|
||||
|
||||
<!-- Large Command Line Buttons -->
|
||||
<div id="fbLargeCommandButtons">
|
||||
<a id="fbCommand_btRun" class="fbButton fbHover">Run</a>
|
||||
<a id="fbCommand_btClear" class="fbButton fbHover">Clear</a>
|
||||
|
||||
<a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<!-- Interface - Bottom Area -->
|
||||
<tr id="fbBottom" class="hide">
|
||||
|
||||
<!-- Command Line -->
|
||||
<td id="fbCommand" colspan="2">
|
||||
<div id="fbCommandBox">
|
||||
<div id="fbCommandIcon">>>></div>
|
||||
<input id="fbCommandLine" name="fbCommandLine" type="text" />
|
||||
<a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<span id="fbMiniChrome">
|
||||
<span id="fbMiniContent">
|
||||
<span id="fbMiniIcon" title="Open Firebug Lite"></span>
|
||||
<span id="fbMiniErrors" class="fbErrors"><!-- 2 errors --></span>
|
||||
</span>
|
||||
</span>
|
||||
<!--
|
||||
<div id="fbErrorPopup">
|
||||
<div id="fbErrorPopupContent">
|
||||
<div id="fbErrorIndicator" class="fbErrors">2 errors</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</body>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Firebug Lite</title>
|
||||
<!-- An empty script to avoid FOUC when loading the stylesheet -->
|
||||
<script type="text/javascript"></script>
|
||||
<style type="text/css" media="screen">@import "firebug.css";</style>
|
||||
<style>html,body{margin:0;padding:0;overflow:hidden;}</style>
|
||||
</head>
|
||||
<body class="fbBody">
|
||||
<table id="fbChrome" cellpadding="0" cellspacing="0" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<!-- Interface - Top Area -->
|
||||
<td id="fbTop" colspan="2">
|
||||
|
||||
<!--
|
||||
<div>
|
||||
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
|
||||
<input type="text" id="fbToolbarSearch" />
|
||||
</div>
|
||||
-->
|
||||
|
||||
<!-- Window Buttons -->
|
||||
<div id="fbWindowButtons">
|
||||
<a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page"> </a>
|
||||
<a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window"> </a>
|
||||
<a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug"> </a>
|
||||
</div>
|
||||
|
||||
<!-- Toolbar buttons and Status Bar -->
|
||||
<div id="fbToolbar">
|
||||
<div id="fbToolbarContent">
|
||||
|
||||
<!-- Firebug Button -->
|
||||
<span id="fbToolbarIcon">
|
||||
<a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank"> </a>
|
||||
</span>
|
||||
|
||||
<!--
|
||||
<span id="fbLeftToolbarErrors" class="fbErrors">2 errors</span>
|
||||
-->
|
||||
|
||||
<!-- Toolbar Buttons -->
|
||||
<span id="fbToolbarButtons">
|
||||
<!-- Fixed Toolbar Buttons -->
|
||||
<span id="fbFixedButtons">
|
||||
<a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a>
|
||||
</span>
|
||||
|
||||
<!-- Console Panel Toolbar Buttons -->
|
||||
<span id="fbConsoleButtons" class="fbToolbarButtons">
|
||||
<a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a>
|
||||
</span>
|
||||
|
||||
<!-- HTML Panel Toolbar Buttons -->
|
||||
<!--
|
||||
<span id="fbHTMLButtons" class="fbToolbarButtons">
|
||||
<a id="fbHTML_btEdit" class="fbHover" title="Edit this HTML">Edit</a>
|
||||
</span>
|
||||
-->
|
||||
</span>
|
||||
|
||||
<!-- Status Bar -->
|
||||
<span id="fbStatusBarBox">
|
||||
<span class="fbToolbarSeparator"></span>
|
||||
<!-- HTML Panel Status Bar -->
|
||||
<!--
|
||||
<span id="fbHTMLStatusBar" class="fbStatusBar fbToolbarButtons">
|
||||
</span>
|
||||
-->
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- PanelBars -->
|
||||
<div id="fbPanelBarBox">
|
||||
|
||||
<!-- Main PanelBar -->
|
||||
<div id="fbPanelBar1" class="fbPanelBar">
|
||||
<a id="fbConsoleTab" class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">Console</span>
|
||||
<span class="fbTabMenuTarget"></span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a id="fbHTMLTab" class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">HTML</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">CSS</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">Script</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">DOM</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Side PanelBars -->
|
||||
<div id="fbPanelBar2Box" class="hide">
|
||||
<div id="fbPanelBar2" class="fbPanelBar">
|
||||
<!--
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">Style</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">Layout</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">DOM</span>
|
||||
<span class="fbTabR"></span>
|
||||
</a>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Horizontal Splitter -->
|
||||
<div id="fbHSplitter"> </div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Interface - Main Area -->
|
||||
<tr id="fbContent">
|
||||
|
||||
<!-- Panels -->
|
||||
<td id="fbPanelBox1">
|
||||
<div id="fbPanel1" class="fbFitHeight">
|
||||
<div id="fbConsole" class="fbPanel"></div>
|
||||
<div id="fbHTML" class="fbPanel"></div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Side Panel Box -->
|
||||
<td id="fbPanelBox2" class="hide">
|
||||
|
||||
<!-- VerticalSplitter -->
|
||||
<div id="fbVSplitter" class="fbVSplitter"> </div>
|
||||
|
||||
<!-- Side Panels -->
|
||||
<div id="fbPanel2" class="fbFitHeight">
|
||||
|
||||
<!-- HTML Side Panels -->
|
||||
<div id="fbHTML_Style" class="fbPanel"></div>
|
||||
<div id="fbHTML_Layout" class="fbPanel"></div>
|
||||
<div id="fbHTML_DOM" class="fbPanel"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Large Command Line -->
|
||||
<textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea>
|
||||
|
||||
<!-- Large Command Line Buttons -->
|
||||
<div id="fbLargeCommandButtons">
|
||||
<a id="fbCommand_btRun" class="fbButton fbHover">Run</a>
|
||||
<a id="fbCommand_btClear" class="fbButton fbHover">Clear</a>
|
||||
|
||||
<a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<!-- Interface - Bottom Area -->
|
||||
<tr id="fbBottom" class="hide">
|
||||
|
||||
<!-- Command Line -->
|
||||
<td id="fbCommand" colspan="2">
|
||||
<div id="fbCommandBox">
|
||||
<div id="fbCommandIcon">>>></div>
|
||||
<input id="fbCommandLine" name="fbCommandLine" type="text" />
|
||||
<a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<span id="fbMiniChrome">
|
||||
<span id="fbMiniContent">
|
||||
<span id="fbMiniIcon" title="Open Firebug Lite"></span>
|
||||
<span id="fbMiniErrors" class="fbErrors"><!-- 2 errors --></span>
|
||||
</span>
|
||||
</span>
|
||||
<!--
|
||||
<div id="fbErrorPopup">
|
||||
<div id="fbErrorPopupContent">
|
||||
<div id="fbErrorIndicator" class="fbErrors">2 errors</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
0
vendor/firebug-lite/skin/xp/firebug.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
0
vendor/firebug-lite/skin/xp/group.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
542
vendor/firebug-lite/skin/xp/html.css
vendored
Normal file → Executable file
@@ -1,272 +1,272 @@
|
||||
/* See license.txt for terms of usage */
|
||||
|
||||
.panelNode-html {
|
||||
-moz-box-sizing: padding-box;
|
||||
padding: 4px 0 0 2px;
|
||||
}
|
||||
|
||||
.nodeBox {
|
||||
position: relative;
|
||||
font-family: Monaco, monospace;
|
||||
padding-left: 13px;
|
||||
-moz-user-select: -moz-none;
|
||||
}
|
||||
.nodeBox.search-selection {
|
||||
-moz-user-select: text;
|
||||
}
|
||||
.twisty {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.nodeChildBox {
|
||||
margin-left: 12px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nodeLabel,
|
||||
.nodeCloseLabel {
|
||||
margin: -2px 2px 0 2px;
|
||||
border: 2px solid transparent;
|
||||
-moz-border-radius: 3px;
|
||||
padding: 0 2px;
|
||||
color: #000088;
|
||||
}
|
||||
|
||||
.nodeCloseLabel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nodeTag {
|
||||
cursor: pointer;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.nodeValue {
|
||||
color: #FF0000;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.nodeText,
|
||||
.nodeComment {
|
||||
margin: 0 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.nodeText {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.nodeWhiteSpace {
|
||||
border: 1px solid LightGray;
|
||||
white-space: pre; /* otherwise the border will be collapsed around zero pixels */
|
||||
margin-left: 1px;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
|
||||
.nodeWhiteSpace_Space {
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.nodeTextEntity {
|
||||
border: 1px solid gray;
|
||||
white-space: pre; /* otherwise the border will be collapsed around zero pixels */
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
.nodeComment {
|
||||
color: DarkGreen;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeBox.highlightOpen > .nodeLabel {
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
.nodeBox.highlightOpen > .nodeCloseLabel,
|
||||
.nodeBox.highlightOpen > .nodeChildBox,
|
||||
.nodeBox.open > .nodeCloseLabel,
|
||||
.nodeBox.open > .nodeChildBox {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.selected > .nodeLabel {
|
||||
border-color: Highlight;
|
||||
background-color: Highlight;
|
||||
color: HighlightText !important;
|
||||
}
|
||||
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeBox.highlighted > .nodeLabel {
|
||||
border-color: Highlight !important;
|
||||
background-color: cyan !important;
|
||||
color: #000000 !important;
|
||||
}
|
||||
|
||||
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag,
|
||||
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
|
||||
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText {
|
||||
color: #000000 !important;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.nodeHidden .nodeCloseLabel,
|
||||
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText,
|
||||
.nodeBox.nodeHidden .nodeText {
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag,
|
||||
.nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag {
|
||||
color: #5F82D9;
|
||||
}
|
||||
|
||||
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue {
|
||||
color: #D86060;
|
||||
}
|
||||
|
||||
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
|
||||
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
|
||||
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText {
|
||||
color: SkyBlue !important;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeBox.mutated > .nodeLabel,
|
||||
.nodeAttr.mutated,
|
||||
.nodeValue.mutated,
|
||||
.nodeText.mutated,
|
||||
.nodeBox.mutated > .nodeText {
|
||||
background-color: #EFFF79;
|
||||
color: #FF0000 !important;
|
||||
}
|
||||
|
||||
.nodeBox.selected.mutated > .nodeLabel,
|
||||
.nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated {
|
||||
background-color: #EFFF79;
|
||||
border-color: #EFFF79;
|
||||
color: #FF0000 !important;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.logRow-dirxml {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.soloElement > .nodeBox {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.useA11y .nodeLabel.focused {
|
||||
outline: 2px solid #FF9933;
|
||||
-moz-outline-radius: 3px;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.useA11y .nodeLabelBox:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.breakpointCode .twisty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.breakpointCode .nodeBox.containerNodeBox,
|
||||
.breakpointCode .nodeLabel {
|
||||
padding-left: 0px;
|
||||
margin-left: 0px;
|
||||
font-family: Monaco, monospace !important;
|
||||
}
|
||||
|
||||
.breakpointCode .nodeTag,
|
||||
.breakpointCode .nodeAttr,
|
||||
.breakpointCode .nodeText,
|
||||
.breakpointCode .nodeValue,
|
||||
.breakpointCode .nodeLabel {
|
||||
color: DarkGreen !important;
|
||||
}
|
||||
|
||||
.breakpointMutationType {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 20px;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
|
||||
|
||||
|
||||
/************************************************************************************************/
|
||||
/* Twisties */
|
||||
|
||||
.twisty,
|
||||
.logRow-errorMessage > .hasTwisty > .errorTitle,
|
||||
.logRow-log > .objectBox-array.hasTwisty,
|
||||
.logRow-spy .spyHead .spyTitle,
|
||||
.logGroup > .logRow,
|
||||
.memberRow.hasChildren > .memberLabelCell > .memberLabel,
|
||||
.hasHeaders .netHrefLabel,
|
||||
.netPageRow > .netCol > .netPageTitle {
|
||||
background-image: url(twistyClosed.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 2px 2px;
|
||||
min-height: 12px;
|
||||
}
|
||||
|
||||
.logRow-errorMessage > .hasTwisty.opened > .errorTitle,
|
||||
.logRow-log > .objectBox-array.hasTwisty.opened,
|
||||
.logRow-spy.opened .spyHead .spyTitle,
|
||||
.logGroup.opened > .logRow,
|
||||
.memberRow.hasChildren.opened > .memberLabelCell > .memberLabel,
|
||||
.nodeBox.highlightOpen > .nodeLabel > .twisty,
|
||||
.nodeBox.open > .nodeLabel > .twisty,
|
||||
.netRow.opened > .netCol > .netHrefLabel,
|
||||
.netPageRow.opened > .netCol > .netPageTitle {
|
||||
background-image: url(twistyOpen.png);
|
||||
}
|
||||
|
||||
.twisty {
|
||||
background-position: 4px 4px;
|
||||
/* See license.txt for terms of usage */
|
||||
|
||||
.panelNode-html {
|
||||
-moz-box-sizing: padding-box;
|
||||
padding: 4px 0 0 2px;
|
||||
}
|
||||
|
||||
.nodeBox {
|
||||
position: relative;
|
||||
font-family: Monaco, monospace;
|
||||
padding-left: 13px;
|
||||
-moz-user-select: -moz-none;
|
||||
}
|
||||
.nodeBox.search-selection {
|
||||
-moz-user-select: text;
|
||||
}
|
||||
.twisty {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.nodeChildBox {
|
||||
margin-left: 12px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nodeLabel,
|
||||
.nodeCloseLabel {
|
||||
margin: -2px 2px 0 2px;
|
||||
border: 2px solid transparent;
|
||||
-moz-border-radius: 3px;
|
||||
padding: 0 2px;
|
||||
color: #000088;
|
||||
}
|
||||
|
||||
.nodeCloseLabel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nodeTag {
|
||||
cursor: pointer;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.nodeValue {
|
||||
color: #FF0000;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.nodeText,
|
||||
.nodeComment {
|
||||
margin: 0 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.nodeText {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.nodeWhiteSpace {
|
||||
border: 1px solid LightGray;
|
||||
white-space: pre; /* otherwise the border will be collapsed around zero pixels */
|
||||
margin-left: 1px;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
|
||||
.nodeWhiteSpace_Space {
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.nodeTextEntity {
|
||||
border: 1px solid gray;
|
||||
white-space: pre; /* otherwise the border will be collapsed around zero pixels */
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
.nodeComment {
|
||||
color: DarkGreen;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeBox.highlightOpen > .nodeLabel {
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
.nodeBox.highlightOpen > .nodeCloseLabel,
|
||||
.nodeBox.highlightOpen > .nodeChildBox,
|
||||
.nodeBox.open > .nodeCloseLabel,
|
||||
.nodeBox.open > .nodeChildBox {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.selected > .nodeLabel {
|
||||
border-color: Highlight;
|
||||
background-color: Highlight;
|
||||
color: HighlightText !important;
|
||||
}
|
||||
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeBox.highlighted > .nodeLabel {
|
||||
border-color: Highlight !important;
|
||||
background-color: cyan !important;
|
||||
color: #000000 !important;
|
||||
}
|
||||
|
||||
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag,
|
||||
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
|
||||
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText {
|
||||
color: #000000 !important;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.nodeHidden .nodeCloseLabel,
|
||||
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText,
|
||||
.nodeBox.nodeHidden .nodeText {
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag,
|
||||
.nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag {
|
||||
color: #5F82D9;
|
||||
}
|
||||
|
||||
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue {
|
||||
color: #D86060;
|
||||
}
|
||||
|
||||
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
|
||||
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
|
||||
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText {
|
||||
color: SkyBlue !important;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeBox.mutated > .nodeLabel,
|
||||
.nodeAttr.mutated,
|
||||
.nodeValue.mutated,
|
||||
.nodeText.mutated,
|
||||
.nodeBox.mutated > .nodeText {
|
||||
background-color: #EFFF79;
|
||||
color: #FF0000 !important;
|
||||
}
|
||||
|
||||
.nodeBox.selected.mutated > .nodeLabel,
|
||||
.nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated,
|
||||
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated {
|
||||
background-color: #EFFF79;
|
||||
border-color: #EFFF79;
|
||||
color: #FF0000 !important;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.logRow-dirxml {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.soloElement > .nodeBox {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.useA11y .nodeLabel.focused {
|
||||
outline: 2px solid #FF9933;
|
||||
-moz-outline-radius: 3px;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.useA11y .nodeLabelBox:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.breakpointCode .twisty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.breakpointCode .nodeBox.containerNodeBox,
|
||||
.breakpointCode .nodeLabel {
|
||||
padding-left: 0px;
|
||||
margin-left: 0px;
|
||||
font-family: Monaco, monospace !important;
|
||||
}
|
||||
|
||||
.breakpointCode .nodeTag,
|
||||
.breakpointCode .nodeAttr,
|
||||
.breakpointCode .nodeText,
|
||||
.breakpointCode .nodeValue,
|
||||
.breakpointCode .nodeLabel {
|
||||
color: DarkGreen !important;
|
||||
}
|
||||
|
||||
.breakpointMutationType {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 20px;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
|
||||
|
||||
|
||||
/************************************************************************************************/
|
||||
/* Twisties */
|
||||
|
||||
.twisty,
|
||||
.logRow-errorMessage > .hasTwisty > .errorTitle,
|
||||
.logRow-log > .objectBox-array.hasTwisty,
|
||||
.logRow-spy .spyHead .spyTitle,
|
||||
.logGroup > .logRow,
|
||||
.memberRow.hasChildren > .memberLabelCell > .memberLabel,
|
||||
.hasHeaders .netHrefLabel,
|
||||
.netPageRow > .netCol > .netPageTitle {
|
||||
background-image: url(twistyClosed.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 2px 2px;
|
||||
min-height: 12px;
|
||||
}
|
||||
|
||||
.logRow-errorMessage > .hasTwisty.opened > .errorTitle,
|
||||
.logRow-log > .objectBox-array.hasTwisty.opened,
|
||||
.logRow-spy.opened .spyHead .spyTitle,
|
||||
.logGroup.opened > .logRow,
|
||||
.memberRow.hasChildren.opened > .memberLabelCell > .memberLabel,
|
||||
.nodeBox.highlightOpen > .nodeLabel > .twisty,
|
||||
.nodeBox.open > .nodeLabel > .twisty,
|
||||
.netRow.opened > .netCol > .netHrefLabel,
|
||||
.netPageRow.opened > .netCol > .netPageTitle {
|
||||
background-image: url(twistyOpen.png);
|
||||
}
|
||||
|
||||
.twisty {
|
||||
background-position: 4px 4px;
|
||||
}
|
||||
0
vendor/firebug-lite/skin/xp/infoIcon.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 359 B |
0
vendor/firebug-lite/skin/xp/infoIcon.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 524 B |
0
vendor/firebug-lite/skin/xp/loading_16.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
0
vendor/firebug-lite/skin/xp/min.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 552 B |
0
vendor/firebug-lite/skin/xp/minHover.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 485 B |
0
vendor/firebug-lite/skin/xp/off.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 742 B After Width: | Height: | Size: 742 B |
0
vendor/firebug-lite/skin/xp/offHover.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 680 B |
0
vendor/firebug-lite/skin/xp/pixel_transparent.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
12
vendor/firebug-lite/skin/xp/roundCorner.svg
vendored
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<rect fill="white" x="0" y="0" width="100%" height="100%" />
|
||||
<rect fill="highlight" x="0" y="0" width="100%" height="100%" rx="2px"/>
|
||||
</svg>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<rect fill="white" x="0" y="0" width="100%" height="100%" />
|
||||
<rect fill="highlight" x="0" y="0" width="100%" height="100%" rx="2px"/>
|
||||
</svg>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 228 B |
0
vendor/firebug-lite/skin/xp/search.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 550 B After Width: | Height: | Size: 550 B |
0
vendor/firebug-lite/skin/xp/search.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 685 B |
0
vendor/firebug-lite/skin/xp/shadow.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
vendor/firebug-lite/skin/xp/shadow2.gif
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |