From db1a87d10ca2a6a95b976908f2ae233b37e98d17 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 30 Sep 2012 21:49:12 -0700 Subject: [PATCH] Bump to v0.8.0. Former-commit-id: b5bed986eed052cab3f927a928d92d58044a4798 --- README.md | 142 +++++++++++++++++++-------------------- build.js | 4 +- doc/README.md | 2 +- doc/parse.php | 2 +- lodash.js | 5 +- lodash.min.js | 12 ++-- lodash.underscore.min.js | 60 ++++++++--------- package.json | 2 +- test/test-build.js | 1 + 9 files changed, 114 insertions(+), 116 deletions(-) diff --git a/README.md b/README.md index f19ff4b93..1b6a245e3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Lo-Dash v0.7.0 +# Lo-Dash v0.8.0 [![build status](https://secure.travis-ci.org/bestiejs/lodash.png)](http://travis-ci.org/bestiejs/lodash) A drop-in replacement[*](https://github.com/bestiejs/lodash/wiki/Drop-in-Disclaimer) for Underscore.js, from the devs behind [jsPerf.com](http://jsperf.com), delivering [performance](http://lodash.com/benchmarks), [bug fixes](https://github.com/bestiejs/lodash#resolved-underscorejs-issues), and [additional features](http://lodash.com/#features). @@ -7,10 +7,12 @@ Lo-Dash’s performance is gained by avoiding slower native methods, instead opt ## Download - * [Development source](https://raw.github.com/bestiejs/lodash/v0.7.0/lodash.js) - * [Production source](https://raw.github.com/bestiejs/lodash/v0.7.0/lodash.min.js) - * CDN copies of ≤ [v0.7.0](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.7.0/lodash.min.js) are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/) - * For optimal performance, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need + * [Development build](https://raw.github.com/bestiejs/lodash/v0.8.0/lodash.js) + * [Production build](https://raw.github.com/bestiejs/lodash/v0.8.0/lodash.min.js) + * [Underscore build](https://raw.github.com/bestiejs/lodash/v0.8.0/lodash.underscore.min.js) tailored for projects already using Underscore + * CDN copies of ≤ [v0.8.0](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.8.0/lodash.min.js) are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/) + + * For optimal file size, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need ## Dive in @@ -34,30 +36,20 @@ For more information check out these screencasts over Lo-Dash: * AMD loader support ([RequireJS](http://requirejs.org/), [curl.js](https://github.com/cujojs/curl), etc.) * [_.clone](http://lodash.com/docs#clone) supports *“deep”* cloning - * [_.countBy](http://lodash.com/docs#countBy) as a companion function for [_.groupBy](http://lodash.com/docs#groupBy) and [_.sortBy](http://lodash.com/docs#sortBy) - * [_.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 and supports exiting iteration early * [_.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 - * [_.indexOf](http://lodash.com/docs#indexOf) and [_.lastIndexOf](http://lodash.com/docs#lastIndexOf) accept a `fromIndex` argument - * [_.invert](http://lodash.com/docs#invert) to create inverted objects + * [_.lateBind](http://lodash.com/docs#lateBind) for late binding * [_.merge](http://lodash.com/docs#merge) for a *“deep”* [_.extend](http://lodash.com/docs#extend) - * [_.object](http://lodash.com/docs#object) and [_.pairs](http://lodash.com/docs#pairs) for composing objects - * [_.omit](http://lodash.com/docs#omit) for the inverse functionality of [_.pick](http://lodash.com/docs#pick) * [_.partial](http://lodash.com/docs#partial) for partial application without `this` binding * [_.pick](http://lodash.com/docs#pick) and [_.omit](http://lodash.com/docs#omit) accept `callback` and `thisArg` arguments - * [_.random](http://lodash.com/docs#random) for generating random numbers within a given range - * [_.sortBy](http://lodash.com/docs#sortBy) performs a [stable](http://en.wikipedia.org/wiki/Sorting_algorithm#Stability) sort * [_.template](http://lodash.com/docs#template) utilizes [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier debugging - * [_.unescape](http://lodash.com/docs#unescape) to unescape strings escaped by [_.escape](http://lodash.com/docs#escape) - * [_.where](http://lodash.com/docs#where) for filtering collections by contained properties - * [_.countBy](http://lodash.com/docs#countBy), [_.groupBy](http://lodash.com/docs#groupBy), [_.sortedIndex](http://lodash.com/docs#sortedIndex), and [_.uniq](http://lodash.com/docs#uniq) accept a `thisArg` argument * [_.contains](http://lodash.com/docs#contains), [_.size](http://lodash.com/docs#size), [_.toArray](http://lodash.com/docs#toArray), [and more…](http://lodash.com/docs "_.countBy, _.every, _.filter, _.find, _.forEach, _.groupBy, _.invoke, _.map, _.pluck, _.reduce, _.reduceRight, _.reject, _.some, _.sortBy, _.where") accept strings ## Support -Lo-Dash has been tested in at least Chrome 5-21, Firefox 1-15, IE 6-9, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.8.9, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC5. +Lo-Dash has been tested in at least Chrome 5-22, Firefox 1-15, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.8.11, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC5. ## Custom builds @@ -89,7 +81,7 @@ lodash mobile lodash strict ``` - * Underscore builds, with iteration fixes removed and only Underscore’s API, may be created using the `underscore` modifier argument. + * Underscore builds, tailored for projects already using Underscore, may be created using the `underscore` modifier argument. ```bash lodash underscore ``` @@ -97,23 +89,17 @@ lodash underscore Custom builds may be created using the following commands: * Use the `category` argument to pass comma separated categories of methods to include in the build.
- Valid categories are *“arrays”*, *“chaining”*, *“collections”*, *“functions”*, *“objects”*, and *“utilities”*. + Valid categories (case-insensitive) are *“arrays”*, *“chaining”*, *“collections”*, *“functions”*, *“objects”*, and *“utilities”*. ```bash lodash category=collections,functions lodash category="collections, functions" -``` - - * Use the `exclude` argument to pass comma separated names of methods to exclude from the build. -```bash -lodash exclude=union,uniq,zip -lodash exclude="union, uniq, zip" ``` * Use the `exports` argument to pass comma separated names of ways to export the `LoDash` function.
- Valid exports are *“amd”*, *“commonjs”*, *“global”*, *“node”*, and *“none”*. + Valid exports are *“amd”*, *“commonjs”*, *“global”*, *“node”*, and *“none”*. ```bash lodash exports=amd,commonjs,node -lodash include="amd, commonjs, node" +lodash exports="amd, commonjs, node" ``` * Use the `iife` argument to specify code to replace the immediately-invoked function expression that wraps Lo-Dash. @@ -121,31 +107,49 @@ lodash include="amd, commonjs, node" lodash iife="!function(window,undefined){%output%}(this)" ``` - * Use the `include` argument to pass comma separated names of methods to include in the build. + * Use the `include` argument to pass comma separated method/category names to include in the build. ```bash lodash include=each,filter,map lodash include="each, filter, map" ``` -All arguments, except `exclude` with `include` and `legacy` with `csp`/`mobile`, may be combined. - + * Use the `minus` argument to pass comma separated method/category names to remove from those included in the build. ```bash -lodash backbone legacy exports=global category=utilities exclude=first,last -lodash -s underscore mobile strict exports=amd category=functions include=pick,uniq +lodash underscore minus=result,shuffle +lodash underscore minus="result, shuffle" ``` + * Use the `plus` argument to pass comma separated method/category names to add to those included in the build. +```bash +lodash backbone plus=random,template +lodash backbone plus="random, template" +``` + +* Use the `template` argument to pass the file path pattern used to match template files to precompile +```bash +lodash template="./*.jst" +``` + +* Use the `settings` argument to pass the template settings used when precompiling templates +```bash +lodash settings="{interpolate:/\\{\\{(.+?)\\}\\}/g}" +``` + +All arguments, except `legacy` with `csp` or `mobile`, may be combined. +Unless specified by `-o` or `--output`, all files created are saved to the current working directory. + The following options are also supported: - * `-c`, `--stdout` Write output to standard output - * `-h`, `--help` Display help information - * `-o`, `--output` Write output to a given path/filename - * `-s`, `--silent` Skip status updates normally logged to the console - * `-V`, `--version` Output current version of Lo-Dash + * `-c`, `--stdout`   Write output to standard output + * `-d`, `--debug`    Write only the debug output + * `-h`, `--help`     Display help information + * `-m`, `--minify`   Write only the minified output + * `-o`, `--output`   Write output to a given path/filename + * `-s`, `--silent`   Skip status updates normally logged to the console + * `-V`, `--version`  Output current version of Lo-Dash The `lodash` command-line utility is available when Lo-Dash is installed as a global package (i.e. `npm install -g lodash`). -Custom builds are saved to `lodash.custom.js` and `lodash.custom.min.js`. - ## Installation and usage In browsers: @@ -194,31 +198,29 @@ require({ ## Resolved 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), [#659](https://github.com/documentcloud/underscore/issues/659), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L543-549)] - * Ensure *“Collections”* methods allow string `collection` arguments [[#247](https://github.com/documentcloud/underscore/issues/247), [#276](https://github.com/documentcloud/underscore/issues/276), [#561](https://github.com/documentcloud/underscore/pull/561), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L503-520)] - * Fix cross-browser object iteration bugs [[#60](https://github.com/documentcloud/underscore/issues/60), [#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L554-579)] - * Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [#742](https://github.com/documentcloud/underscore/issues/742), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L134-140)] - * Register as an AMD module, but still export to global [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L118-132)] - * `_.clone` should allow `deep` cloning [[#595](https://github.com/documentcloud/underscore/pull/595), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L223-234)] - * `_.contains` should work with strings [[#667](https://github.com/documentcloud/underscore/pull/667), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L289-298)] + * Add AMD loader support [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L118-140)] + * Allow iteration of objects with a `length` property [[#799](https://github.com/documentcloud/underscore/pull/799), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L510-516)] + * Ensure *“Collections”* methods allow string `collection` arguments [[#247](https://github.com/documentcloud/underscore/issues/247), [#276](https://github.com/documentcloud/underscore/issues/276), [#561](https://github.com/documentcloud/underscore/pull/561), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L470-487)] + * Fix cross-browser object iteration bugs [[#60](https://github.com/documentcloud/underscore/issues/60), [#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L526-546)] + * Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [#742](https://github.com/documentcloud/underscore/issues/742), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L142-148)] + * `_.clone` should allow `deep` cloning [[#595](https://github.com/documentcloud/underscore/pull/595), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L215-224)] + * `_.contains` should work with strings [[#667](https://github.com/documentcloud/underscore/pull/667), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L267-276)] * `_.extend` should recursively extend objects [[#379](https://github.com/documentcloud/underscore/pull/379), [#718](https://github.com/documentcloud/underscore/issues/718), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L946-968)] - * `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L486-489)] - * `_.forEach` should allow exiting iteration early [[#211](https://github.com/documentcloud/underscore/issues/211), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L581-600)] - * `_.isEmpty` should support jQuery/MooTools DOM query collections [[#690](https://github.com/documentcloud/underscore/pull/690), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L732-737)] - * `_.isObject` should avoid V8 bug [#2291](http://code.google.com/p/v8/issues/detail?id=2291) [[#605](https://github.com/documentcloud/underscore/issues/605), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L803-815)] - * `_.keys` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L879-881)] + * `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L465-468)] + * `_.forEach` should allow exiting iteration early [[#211](https://github.com/documentcloud/underscore/issues/211), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L556-570)] + * `_.isEmpty` should support jQuery/MooTools DOM query collections [[#690](https://github.com/documentcloud/underscore/pull/690), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L703-708)] + * `_.isObject` should avoid V8 bug [#2291](http://code.google.com/p/v8/issues/detail?id=2291) [[#605](https://github.com/documentcloud/underscore/issues/605), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L763-775)] + * `_.keys` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L856-858)] * `_.range` should coerce arguments to numbers [[#634](https://github.com/documentcloud/underscore/issues/634), [#683](https://github.com/documentcloud/underscore/issues/683), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L1222-1225)] - * `_.throttle` should work when called in a loop [[#502](https://github.com/documentcloud/underscore/issues/502), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L1534-1544)] + * `_.throttle` should work when called in a loop [[#502](https://github.com/documentcloud/underscore/issues/502), [test](https://github.com/bestiejs/lodash/blob/v0.8.0/test/test.js#L1525-1535)] ## Optimized methods (50+) * `_.bind` * `_.bindAll` - * `_.clone` * `_.compact` * `_.contains`, `_.include` * `_.defaults` - * `_.defer` * `_.difference` * `_.each` * `_.every`, `_.all` @@ -235,7 +237,6 @@ require({ * `_.invoke` * `_.isArguments` * `_.isDate` - * `_.isEmpty` * `_.isFinite` * `_.isFunction` * `_.isObject` @@ -274,30 +275,25 @@ require({ ## Release Notes -### v0.7.0 +### v0.8.0 #### Compatibility Warnings #### - * Renamed `_.zipObject` to `_.object` - * Replaced `_.drop` with `_.omit` - * Made `_.drop` alias `_.rest` + * Made `_.random` return `0` or `1` when no arguments are passed + * Moved late bind functionality from `_.bind` to [_.lateBind](http://lodash.com/docs#lateBind) + * Removed first argument falsey checks from methods + * Removed support for custom `clone`, `isEqual`, `toArray` methods from
+ `_.clone`, `_.isEqual`, and `_.toArray` #### Changes #### - * Added [_.invert](http://lodash.com/docs#invert), [_.pairs](http://lodash.com/docs#pairs), and [_.random](http://lodash.com/docs#random) - * Added `_.result` to the `backbone` build - * Added `exports`, `iife`, `-c`/`--stdout`, `-o`/`--output`, and `-s`/`--silent` build options - * Ensured `isPlainObject` works with objects from other documements - * Ensured `_.isEqual` compares values with circular references correctly - * Ensured `_.merge` work with four or more arguments - * Ensured `_.sortBy` performs a stable sort for `undefined` values - * Ensured `_.template` works with "interpolate" delimiters containing ternary operators - * Ensured the production build works in Node.js - * Ensured template delimiters are tokenized correctly - * Made pseudo private properties `_chain` and `_wrapped` double-underscored to avoid conflicts - * Made `minify.js` support `underscore.js` - * Reduced the size of `mobile` and `underscore` builds - * Simplified `_.isEqual` and `_.size` + * Added `-d`/`--debug`, `-m/--minify`, `minus`, `plus`, `settings`, and `template` build options + * Added `_.isPlainObject` and `_.lateBind` + * Allowed `_.sortedIndex` to accept a property name as the `callback` argument + * Ensured methods accept a `thisArg` of `null` + * Fixed the `iife` build option to accept more values + * Made `_.times` return an array of `callback` results + * Simplified `_.max`, `_.min`, and `_.reduceRight` The full changelog is available [here](https://github.com/bestiejs/lodash/wiki/Changelog). diff --git a/build.js b/build.js index 949631ec2..561e9db14 100755 --- a/build.js +++ b/build.js @@ -355,7 +355,7 @@ ' lodash legacy Build tailored for older browsers without ES5 support', ' lodash mobile Build with IE < 9 bug fixes & method compilation removed', ' lodash strict Build with `_.bindAll`, `_.defaults`, & `_.extend` in strict mode', - ' lodash underscore Build with iteration fixes removed and only Underscore’s API', + ' lodash underscore Build tailored for projects already using Underscore', ' lodash include=... Comma separated method/category names to include in the build', ' lodash minus=... Comma separated method/category names to remove from those included in the build', ' lodash plus=... Comma separated method/category names to add to those included in the build', @@ -1051,7 +1051,7 @@ source = removeVar(source, 'cloneableClasses'); // replace `arrayLikeClasses` in `_.isEmpty` - source = source.replace(/'if *\(arrayLikeClasses[\s\S]+?' \|\|\\n/, "'if (isArray(value) ||"); + source = source.replace(/'if *\(arrayLikeClasses[\s\S]+?' \|\|\\n/, "'if (isArray(value) || className == stringClass ||"); // replace `arrayLikeClasses` in `_.isEqual` source = source.replace(/(?: *\/\/.*\n)*( +)var isArr *= *arrayLikeClasses[^}]+}/, '$1var isArr = isArray(a);'); diff --git a/doc/README.md b/doc/README.md index 41a04589a..5bb20ded0 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -# Lo-Dash v0.7.0 +# Lo-Dash v0.8.0 diff --git a/doc/parse.php b/doc/parse.php index bde5d45f5..5818a21e4 100644 --- a/doc/parse.php +++ b/doc/parse.php @@ -21,7 +21,7 @@ // generate Markdown $markdown = docdown(array( 'path' => '../' . $file, - 'title' => 'Lo-Dash v0.7.0', + 'title' => 'Lo-Dash v0.8.0', 'url' => 'https://github.com/bestiejs/lodash/blob/master/lodash.js' )); diff --git a/lodash.js b/lodash.js index 7843feb80..a533d5fce 100644 --- a/lodash.js +++ b/lodash.js @@ -1,5 +1,5 @@ /*! - * Lo-Dash v0.7.0 + * Lo-Dash v0.8.0 * (c) 2012 John-David Dalton * Based on Underscore.js 1.4.0 * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. @@ -981,6 +981,7 @@ var shimKeys = createIterator({ 'args': 'object', 'init': '[]', + 'top': 'if (!(object && objectTypes[typeof object])) throw TypeError()', 'inLoop': 'result.push(index)' }); @@ -3988,7 +3989,7 @@ * @memberOf _ * @type String */ - lodash.VERSION = '0.7.0'; + lodash.VERSION = '0.8.0'; // assign static methods lodash.after = after; diff --git a/lodash.min.js b/lodash.min.js index 8cfa94ae3..8dc29e86f 100644 --- a/lodash.min.js +++ b/lodash.min.js @@ -1,5 +1,5 @@ /*! - Lo-Dash 0.7.0 lodash.com/license + Lo-Dash 0.8.0 lodash.com/license Underscore.js 1.4.0 underscorejs.org/LICENSE */ ;(function(e,t){function s(e){if(e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||H),s=i?{}:e;if(i)for(var o=t-1;++on||e===t)return 1;if(e/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""};var Bt={a:"d,c,y",i:"d",p:"c=f(c,y)",h:"if(c(B,j,d)===false)return u"},jt={i:"{}",p:"c=f(c,y)",h:"var q=c(B,j,d);(h.call(u,q)?u[q]++:u[q]=1)"},Ft={i:"true",h:"if(!c(B,j,d))return!u"},It={q:i,r:i,a:"n",i:"n",p:"for(var a=1,b=arguments.length;a":">",'"':""","'":"'"},Qt=Xt(Kt),Gt=l(It,{h:"if(u[j]==null)"+It.h}),Yt=l(It),Zt=l(Bt,Rt,Ut,{q:i}),en=l(Bt,Rt,Ut),tn=l({q:i,a:"n",i:"[]",h:"if(T(B))u.push(j)",e:"u.sort()"}),nn=l({a:"B",i:"true",p:"if(!B)return u;var I=z.call(B),l=B.length;if(E[I]"+(Tt?"||P(B)":"")+"||(I==Y&&l===+l&&T(B.splice)))return!l" -,h:{k:"return false"}}),rn=ot?function(e){return"function"==typeof e&&Y.call(e,"prototype")?Jt(e):ot(e)}:Jt,sn=l(It,{a:"n,ee,O",p:"var Q,D=arguments,a=0;if(O==J){var b=2,ff=D[3],gg=D[4]}else var b=D.length,ff=[],gg=[];while(++a-1"},h:"if(B===ii)return true"}),cn=l(Bt,jt),hn=l(Bt,Ft),pn=l(Bt,qt),dn=l(Bt,Rt,{i:"",h:"if(c(B,j,d))return B"}),vn=l(Bt,Rt),mn=l(Bt,jt,{h:"var q=c(B,j,d);(h.call(u,q)?u[q]:u[q]=[]).push(B)"}), -gn=l(zt,{a:"d,V",p:"var D=w.call(arguments,2),S=typeof V=='function'",h:{b:"u[j]=(S?V:B[V]).apply(B,D)",k:"u"+(Ot?"[o]=":".push")+"((S?V:B[V]).apply(B,D))"}}),yn=l(Bt,zt),bn=l(zt,{a:"d,cc",h:{b:"u[j]=B[cc]",k:"u"+(Ot?"[o]=":".push")+"(B[cc])"}}),wn=l({a:"d,c,C,y",i:"C",p:"var W=arguments.length<3;c=f(c,y)",d:{b:"if(W)u=k[++j]"},h:{b:"u=c(u,B,j,d)",k:"u=W?(W=false,B):c(u,B,j,d)"}}),En=l(Bt,qt,{h:"!"+qt.h}),Sn=l(Bt,Ft,{i:"false",h:Ft.h.replace("!","")}),xn=l(Bt,jt,zt,{h:{b:"u[j]={a:c(B,j,d),b:j,c:B}" -,k:"u"+(Ot?"[o]=":".push")+"({a:c(B,j,d),b:j,c:B})"},e:"u.sort(J);l=u.length;while(l--)u[l]=u[l].c"}),Tn=l(qt,{a:"d,bb",p:"var t=[];K(bb,function(B,q){t.push(q)});var dd=t.length",h:"for(var q,aa=true,s=0;s1){for(var j=1;je?t():function(){if(1>--e)return t.apply(this +if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=rt(t))&&rt(n);return n?e==n||rt(e)==n&&!v(e):g(e)}:g,Jt=l({a:"n",i:"[]",p:"if(!(n&&Z[typeof n]))throw TypeError()",h:"u.push(j)"}),Kt={"&":"&","<":"<",">":">",'"':""","'":"'"},Qt=Xt(Kt),Gt=l(It,{h:"if(u[j]==null)"+It.h}),Yt=l(It),Zt=l(Bt,Rt,Ut,{q:i}),en=l(Bt,Rt,Ut),tn=l({q:i,a:"n",i:"[]",h:"if(T(B))u.push(j)",e:"u.sort()"}),nn=l({a:"B",i:"true",p:"if(!B)return u;var I=z.call(B),l=B.length;if(E[I]"+(Tt?"||P(B)" +:"")+"||(I==Y&&l===+l&&T(B.splice)))return!l",h:{k:"return false"}}),rn=ot?function(e){return"function"==typeof e&&Y.call(e,"prototype")?Jt(e):ot(e)}:Jt,sn=l(It,{a:"n,ee,O",p:"var Q,D=arguments,a=0;if(O==J){var b=2,ff=D[3],gg=D[4]}else var b=D.length,ff=[],gg=[];while(++a-1"},h:"if(B===ii)return true"}),cn=l(Bt,jt),hn=l(Bt,Ft),pn=l(Bt,qt),dn=l(Bt,Rt,{i:"",h:"if(c(B,j,d))return B"}),vn=l(Bt,Rt),mn=l(Bt,jt,{h:"var q=c(B,j,d);(h.call(u,q)?u[q]:u[q]=[]).push(B)" +}),gn=l(zt,{a:"d,V",p:"var D=w.call(arguments,2),S=typeof V=='function'",h:{b:"u[j]=(S?V:B[V]).apply(B,D)",k:"u"+(Ot?"[o]=":".push")+"((S?V:B[V]).apply(B,D))"}}),yn=l(Bt,zt),bn=l(zt,{a:"d,cc",h:{b:"u[j]=B[cc]",k:"u"+(Ot?"[o]=":".push")+"(B[cc])"}}),wn=l({a:"d,c,C,y",i:"C",p:"var W=arguments.length<3;c=f(c,y)",d:{b:"if(W)u=k[++j]"},h:{b:"u=c(u,B,j,d)",k:"u=W?(W=false,B):c(u,B,j,d)"}}),En=l(Bt,qt,{h:"!"+qt.h}),Sn=l(Bt,Ft,{i:"false",h:Ft.h.replace("!","")}),xn=l(Bt,jt,zt,{h:{b:"u[j]={a:c(B,j,d),b:j,c:B}" +,k:"u"+(Ot?"[o]=":".push")+"({a:c(B,j,d),b:j,c:B})"},e:"u.sort(J);l=u.length;while(l--)u[l]=u[l].c"}),Tn=l(qt,{a:"d,bb",p:"var t=[];K(bb,function(B,q){t.push(q)});var dd=t.length",h:"for(var q,aa=true,s=0;s1){for(var j=1;je?t():function(){if(1>--e)return t.apply(this ,arguments)}},s.bind=L,s.bindAll=Nn,s.chain=function(e){return e=new s(e),e.__chain__=n,e},s.clone=y,s.compact=function(e){for(var t=-1,n=e.length,r=[];++tx(u,t)){for(var a=1;aarguments.length,t=T(t,r),f=e.length;s=-1;if(f===+f)for(a&&(u=e[++s]);++s=(n||$),s=i?{}:e;if(i)for(var o=t-1;++on||e===t)return 1;if(earguments.length;if(s!==+s)var u=Pt(e),s=u.length;return f(e,function(a,f,l){f=u?u[--s]:--s,n= -o?(o=i,e[f]):t.call(r,n,e[f],f,l)}),n}function D(e,t,n){return t==r||n?e[0]:ft.call(e,0,t)}function P(e,t){for(var n,r=-1,i=e.length,s=[];++rn?gt(0,i+n):n)-1}for(;++rr&&(r=n,o=e[i]);return o}function j(e,t,n){return ft -.call(e,t==r||n?1:t)}function F(e,t,n,r){for(var i=0,s=e.length,n=T(n,r),t=n(t);i>>1,n(e[r])H(a,r))a.push(r),u.push(e[s]);return u}function q(e,t){return Lt||ct&&2|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,Q=/&(?:amp|lt|gt|quot|#x27);/g,G=/\b__p\+='';/g,Y=/\b(__p\+=)''\+/g,Z=/(__e\(.*?\)|\b__t\))\+'';/g -,et=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,tt=RegExp("^"+(X.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),nt=/($^)/,rt=/[&<>"']/g,it=/['\n\r\t\u2028\u2029\\]/g,st=W.concat,ot=X.hasOwnProperty,ut=W.push,at=X.propertyIsEnumerable,ft=W.slice,lt=X.toString,ct=tt.test(ct=ft.bind)&&ct,ht=Math.floor,pt=tt.test(pt=Object.getPrototypeOf)&&pt,dt=tt.test(dt=Array.isArray)&&dt,vt=e.isFinite,mt=tt.test(mt=Object.keys)&&mt,gt=Math.max,yt=Math.min,bt=Math.random -,wt="[object Boolean]",Et="[object Date]",St="[object Number]",xt="[object Object]",Tt="[object RegExp]",Nt="[object String]",Ct=e.clearTimeout,kt=e.setTimeout,Lt=ct&&/\n|Opera/.test(ct+lt.call(e.opera)),At={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},Ot={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};w.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},w.isArguments=function( -e){return"[object Arguments]"==lt.call(e)},w.isArguments(arguments)||(w.isArguments=function(e){return!!e&&!!ot.call(e,"callee")});var Mt=dt||function(e){return"[object Array]"==lt.call(e)};A(/x/)&&(A=function(e){return"[object Function]"==lt.call(e)});var X=pt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=pt(t))&&pt(n);return n?e==n||pt(e)==n&&!isArguments(e):O(e)}:O,_t={"&":"&","<":"<",">":">",'"':""","'":"'"},Dt=b(_t),Pt=mt?function( -e){return"function"==typeof e&&at.call(e,"prototype")?y(e):mt(e)}:y;w.VERSION="0.7.0",w.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},w.bind=q,w.bindAll=function(e){var t,n=e,r=e,i=arguments,s=i.length;if(1H(o,t)){for(var u=1;un?gt(0,r+n):yt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},w.map=a,w.max=B,w.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return ot.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},w.min=function(e,t,n){for(var r=Infinity,i=-1,s=e?e.length:0,o=r,t=T(t,n);++iH(a,r))o[r]=i;return o},w.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},w.pairs=function(e){var t,n,r=[];for(t in e)ot.call(e,t)&&(n=e[t],r.push([t,n]));return r},w.pick=function(e,t,n){var r,i,s=e,o={};if("function"!=typeof t){var s=st.apply(W,arguments),u=s.length;for(r=1;r=f?(a=r,s=e.apply(o,i)):u||(u=kt(n,f)),s}},w.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++rH(r,t[e])&&r.push(t[e]);return r},w.uniq=I,w.uniqueId=function(e){var t=V++;return e?e+t:t},w.values=d,w.where=function(e,t){var r,i,s=[],o=[];m(t,function(e,t){o.push(t)});var u=o.length,a=e.length;r=-1;if(a===+a)for(;++r=(n||$),s=i?{}:e;if(i)for(var o=t-1;++on||e===t)return 1;if(earguments.length;if(s!==+s)var u=Pt(e),s=u.length;return f( +e,function(a,f,l){f=u?u[--s]:--s,n=o?(o=i,e[f]):t.call(r,n,e[f],f,l)}),n}function D(e,t,n){return t==r||n?e[0]:ft.call(e,0,t)}function P(e,t){for(var n,r=-1,i=e.length,s=[];++rn?gt(0,i+n):n)-1}for(;++rr&&(r=n,o=e[i] +);return o}function j(e,t,n){return ft.call(e,t==r||n?1:t)}function F(e,t,n,r){for(var i=0,s=e.length,n=T(n,r),t=n(t);i>>1,n(e[r])H(a,r))a.push(r),u.push(e[s]);return u}function q(e,t){return Lt||ct&&2|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,Q=/&(?:amp|lt|gt|quot|#x27);/g,G=/\b__p\+='';/g,Y=/\b(__p\+=)''\+/g +,Z=/(__e\(.*?\)|\b__t\))\+'';/g,et=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,tt=RegExp("^"+(X.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),nt=/($^)/,rt=/[&<>"']/g,it=/['\n\r\t\u2028\u2029\\]/g,st=W.concat,ot=X.hasOwnProperty,ut=W.push,at=X.propertyIsEnumerable,ft=W.slice,lt=X.toString,ct=tt.test(ct=ft.bind)&&ct,ht=Math.floor,pt=tt.test(pt=Object.getPrototypeOf)&&pt,dt=tt.test(dt=Array.isArray)&&dt,vt=e.isFinite,mt=tt.test(mt=Object.keys)&&mt,gt=Math +.max,yt=Math.min,bt=Math.random,wt="[object Boolean]",Et="[object Date]",St="[object Number]",xt="[object Object]",Tt="[object RegExp]",Nt="[object String]",Ct=e.clearTimeout,kt=e.setTimeout,Lt=ct&&/\n|Opera/.test(ct+lt.call(e.opera)),At={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},Ot={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};w.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g +,variable:""},w.isArguments=function(e){return"[object Arguments]"==lt.call(e)},w.isArguments(arguments)||(w.isArguments=function(e){return!!e&&!!ot.call(e,"callee")});var Mt=dt||function(e){return"[object Array]"==lt.call(e)};A(/x/)&&(A=function(e){return"[object Function]"==lt.call(e)});var X=pt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=pt(t))&&pt(n);return n?e==n||pt(e)==n&&!isArguments(e):O(e)}:O,_t={"&":"&","<":"<",">":">",'"':""" +,"'":"'"},Dt=b(_t),Pt=mt?function(e){return"function"==typeof e&&at.call(e,"prototype")?y(e):mt(e)}:y;w.VERSION="0.8.0",w.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},w.bind=q,w.bindAll=function(e){var t,n=e,r=e,i=arguments,s=i.length;if(1H(o,t)){for(var u=1;un?gt(0,r+n):yt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},w.map=a,w.max=B,w.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return ot.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},w.min=function(e,t,n){for(var r=Infinity,i=-1,s=e?e.length:0,o=r,t=T(t,n);++iH(a,r))o[r]=i;return o},w.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},w.pairs=function(e){var t,n,r=[];for(t in e)ot.call(e,t)&&(n=e[t],r.push([t,n]));return r},w.pick=function(e,t,n){var r,i,s=e,o={};if("function"!=typeof t){var s=st.apply(W,arguments +),u=s.length;for(r=1;r=f?(a=r,s=e.apply(o,i)):u||(u=kt(n,f)),s}},w.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++rH(r,t[e])&&r.push(t[e]);return r},w.uniq=I,w.uniqueId=function(e){var t=V++;return e?e+t:t},w.values=d,w.where=function(e,t){var r,i,s=[],o=[];m(t,function(e,t){o.push(t)});var u=o.length,a=e.length;r=-1;if(a===+a)for(;++r