CheckChangelogFromGithubRelease

Check ChangeLog from Github Relase page.

当前为 2014-07-13 提交的版本,查看 最新版本

  1. (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  2. // ==UserScript==
  3. // @name CheckChangelogFromGithubRelease
  4. // @namespace http://efcl.info/
  5. // @description Check ChangeLog from Github Relase page.
  6. // @license MIT
  7. // @include https://github.com/*/*/releases/tag/*
  8. // @version 1.2.1
  9. // @grant GM_xmlhttpRequest
  10. // ==/UserScript==
  11. "use strict";
  12. var githubAPI = require("./lib/github_api");
  13. var githubDOM = require("./lib/github_dom");
  14. var searcher = require("./lib/seacher");
  15. var injector = require("./lib/injector");
  16. var treePromise = new Promise(function (resolve, reject) {
  17. githubAPI.getTree({
  18. "owner": githubDOM.getOwner(),
  19. "name": githubDOM.getRepoName(),
  20. "tagName": githubDOM.getTagName()
  21. }, function (error, res) {
  22. if (error) {
  23. reject(error);
  24. } else {
  25. resolve(res);
  26. }
  27. })
  28. });
  29.  
  30. treePromise.then(JSON.parse)
  31. .then(searcher.findChangeLogInTrees)
  32. .then(function (result) {
  33. if (!result) {
  34. return Promise.reject(new Error("Not found CHANGELOG in Repogitory."));
  35. }
  36. injector.injectChangelogLink(result.path);
  37. })
  38. .catch(function (error) {
  39. console.error(error);
  40. });
  41.  
  42.  
  43. },{"./lib/github_api":2,"./lib/github_dom":3,"./lib/injector":4,"./lib/seacher":5}],2:[function(require,module,exports){
  44. /**
  45. * Created by azu on 2014/06/18.
  46. * LICENSE : MIT
  47. */
  48. "use strict";
  49. // http://developer.github.com/v3/git/trees/
  50. // GET /repos/:owner/:repo/git/trees/:sha
  51. function getTree(repoObject, callback) {
  52. var owner = repoObject.owner,
  53. repoName = repoObject.name,
  54. sha = repoObject.tagName;
  55. var treeAPI = "https://api.github.com/repos/" + owner + "/" + repoName + "/git/trees/" + sha;
  56. GM_xmlhttpRequest({
  57. method: "GET",
  58. url: treeAPI,
  59. onload: function (res) {
  60. if (res.status === 201 || res.status == 200) {
  61. callback(null, res.responseText);
  62. } else {
  63. callback(new Error(res.statusText));
  64. }
  65. },
  66. onerror: function (res) {
  67. callback(res);
  68. }
  69. });
  70. }
  71.  
  72. function getFileRawContent(url, callback) {
  73. // http://swanson.github.com/blog/2011/07/09/digging-around-the-github-v3-api.html
  74. GM_xmlhttpRequest({
  75. method: "GET",
  76. url: url,
  77. headers: {"Accept": "application/vnd.github-blob.raw"},
  78. onload: function (res) {
  79. callback(null, res.responseText);
  80. },
  81. onerror: function (res) {
  82. callback(res);
  83. }
  84. });
  85. }
  86. module.exports = {
  87. getTree: getTree,
  88. getFileRawContent: getFileRawContent
  89. };
  90. },{}],3:[function(require,module,exports){
  91. /**
  92. * Created by azu on 2014/06/18.
  93. * LICENSE : MIT
  94. */
  95. "use strict";
  96. var commandBar = document.getElementById("js-command-bar-field");
  97. function getOwner() {
  98. return commandBar.dataset.repo.split("/").shift()
  99. }
  100. function getTagName() {
  101. return location.pathname.split("/").pop();
  102. }
  103. function getRepoName() {
  104. var repo = commandBar.dataset.repo.split("/").pop()
  105. return repo;
  106. }
  107. function getRepo() {
  108. return commandBar.dataset.repo;
  109. }
  110. function getBranch() {
  111. return commandBar.dataset.branch;
  112. }
  113. module.exports = {
  114. getRepoName: getRepoName,
  115. getTagName: getTagName,
  116. getOwner: getOwner,
  117. getRepo: getRepo,
  118. getBranch: getBranch
  119. };
  120. },{}],4:[function(require,module,exports){
  121. /**
  122. * Created by azu on 2014/06/18.
  123. * LICENSE : MIT
  124. */
  125. "use strict";
  126. var releaseMeta = document.querySelector(".release-meta");
  127. var githubDOM = require("./github_dom");
  128. const GITHUBDOMAIN = "https://github.com/";
  129. function injectChangelogLink(filePath) {
  130. var span = document.createElement("span");
  131. var a = document.createElement("a");
  132. a.href = GITHUBDOMAIN + githubDOM.getRepo() + "/blob/"+ githubDOM.getTagName() + "/" + filePath;
  133. a.textContent = "CHANGELOG FILE";
  134. span.appendChild(a);
  135. releaseMeta.appendChild(span);
  136. }
  137.  
  138. module.exports = {
  139. injectChangelogLink: injectChangelogLink
  140. };
  141. },{"./github_dom":3}],5:[function(require,module,exports){
  142. /**
  143. * Created by azu on 2014/06/18.
  144. * LICENSE : MIT
  145. */
  146. "use strict";
  147. var find = require("lodash.find");
  148. function findChangeLogInTrees(trees) {
  149. if (typeof trees !== "object") {
  150. throw new Error("trees is not object");
  151. }
  152. var tree = trees["tree"];
  153. var result = find(tree, function (object) {
  154. return /(^changes|^changelog|^history)/i.test(object.path);
  155. });
  156. return result;
  157. }
  158. module.exports = {
  159. findChangeLogInTrees: findChangeLogInTrees
  160. };
  161. },{"lodash.find":6}],6:[function(require,module,exports){
  162. /**
  163. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  164. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  165. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  166. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  167. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  168. * Available under MIT license <http://lodash.com/license>
  169. */
  170. var createCallback = require('lodash.createcallback'),
  171. forOwn = require('lodash.forown');
  172.  
  173. /**
  174. * Iterates over elements of a collection, returning the first element that
  175. * the callback returns truey for. The callback is bound to `thisArg` and
  176. * invoked with three arguments; (value, index|key, collection).
  177. *
  178. * If a property name is provided for `callback` the created "_.pluck" style
  179. * callback will return the property value of the given element.
  180. *
  181. * If an object is provided for `callback` the created "_.where" style callback
  182. * will return `true` for elements that have the properties of the given object,
  183. * else `false`.
  184. *
  185. * @static
  186. * @memberOf _
  187. * @alias detect, findWhere
  188. * @category Collections
  189. * @param {Array|Object|string} collection The collection to iterate over.
  190. * @param {Function|Object|string} [callback=identity] The function called
  191. * per iteration. If a property name or object is provided it will be used
  192. * to create a "_.pluck" or "_.where" style callback, respectively.
  193. * @param {*} [thisArg] The `this` binding of `callback`.
  194. * @returns {*} Returns the found element, else `undefined`.
  195. * @example
  196. *
  197. * var characters = [
  198. * { 'name': 'barney', 'age': 36, 'blocked': false },
  199. * { 'name': 'fred', 'age': 40, 'blocked': true },
  200. * { 'name': 'pebbles', 'age': 1, 'blocked': false }
  201. * ];
  202. *
  203. * _.find(characters, function(chr) {
  204. * return chr.age < 40;
  205. * });
  206. * // => { 'name': 'barney', 'age': 36, 'blocked': false }
  207. *
  208. * // using "_.where" callback shorthand
  209. * _.find(characters, { 'age': 1 });
  210. * // => { 'name': 'pebbles', 'age': 1, 'blocked': false }
  211. *
  212. * // using "_.pluck" callback shorthand
  213. * _.find(characters, 'blocked');
  214. * // => { 'name': 'fred', 'age': 40, 'blocked': true }
  215. */
  216. function find(collection, callback, thisArg) {
  217. callback = createCallback(callback, thisArg, 3);
  218.  
  219. var index = -1,
  220. length = collection ? collection.length : 0;
  221.  
  222. if (typeof length == 'number') {
  223. while (++index < length) {
  224. var value = collection[index];
  225. if (callback(value, index, collection)) {
  226. return value;
  227. }
  228. }
  229. } else {
  230. var result;
  231. forOwn(collection, function(value, index, collection) {
  232. if (callback(value, index, collection)) {
  233. result = value;
  234. return false;
  235. }
  236. });
  237. return result;
  238. }
  239. }
  240.  
  241. module.exports = find;
  242.  
  243. },{"lodash.createcallback":7,"lodash.forown":43}],7:[function(require,module,exports){
  244. /**
  245. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  246. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  247. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  248. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  249. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  250. * Available under MIT license <http://lodash.com/license>
  251. */
  252. var baseCreateCallback = require('lodash._basecreatecallback'),
  253. baseIsEqual = require('lodash._baseisequal'),
  254. isObject = require('lodash.isobject'),
  255. keys = require('lodash.keys'),
  256. property = require('lodash.property');
  257.  
  258. /**
  259. * Produces a callback bound to an optional `thisArg`. If `func` is a property
  260. * name the created callback will return the property value for a given element.
  261. * If `func` is an object the created callback will return `true` for elements
  262. * that contain the equivalent object properties, otherwise it will return `false`.
  263. *
  264. * @static
  265. * @memberOf _
  266. * @category Utilities
  267. * @param {*} [func=identity] The value to convert to a callback.
  268. * @param {*} [thisArg] The `this` binding of the created callback.
  269. * @param {number} [argCount] The number of arguments the callback accepts.
  270. * @returns {Function} Returns a callback function.
  271. * @example
  272. *
  273. * var characters = [
  274. * { 'name': 'barney', 'age': 36 },
  275. * { 'name': 'fred', 'age': 40 }
  276. * ];
  277. *
  278. * // wrap to create custom callback shorthands
  279. * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) {
  280. * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback);
  281. * return !match ? func(callback, thisArg) : function(object) {
  282. * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3];
  283. * };
  284. * });
  285. *
  286. * _.filter(characters, 'age__gt38');
  287. * // => [{ 'name': 'fred', 'age': 40 }]
  288. */
  289. function createCallback(func, thisArg, argCount) {
  290. var type = typeof func;
  291. if (func == null || type == 'function') {
  292. return baseCreateCallback(func, thisArg, argCount);
  293. }
  294. // handle "_.pluck" style callback shorthands
  295. if (type != 'object') {
  296. return property(func);
  297. }
  298. var props = keys(func),
  299. key = props[0],
  300. a = func[key];
  301.  
  302. // handle "_.where" style callback shorthands
  303. if (props.length == 1 && a === a && !isObject(a)) {
  304. // fast path the common case of providing an object with a single
  305. // property containing a primitive value
  306. return function(object) {
  307. var b = object[key];
  308. return a === b && (a !== 0 || (1 / a == 1 / b));
  309. };
  310. }
  311. return function(object) {
  312. var length = props.length,
  313. result = false;
  314.  
  315. while (length--) {
  316. if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) {
  317. break;
  318. }
  319. }
  320. return result;
  321. };
  322. }
  323.  
  324. module.exports = createCallback;
  325.  
  326. },{"lodash._basecreatecallback":8,"lodash._baseisequal":27,"lodash.isobject":36,"lodash.keys":38,"lodash.property":42}],8:[function(require,module,exports){
  327. /**
  328. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  329. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  330. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  331. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  332. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  333. * Available under MIT license <http://lodash.com/license>
  334. */
  335. var bind = require('lodash.bind'),
  336. identity = require('lodash.identity'),
  337. setBindData = require('lodash._setbinddata'),
  338. support = require('lodash.support');
  339.  
  340. /** Used to detected named functions */
  341. var reFuncName = /^\s*function[ \n\r\t]+\w/;
  342.  
  343. /** Used to detect functions containing a `this` reference */
  344. var reThis = /\bthis\b/;
  345.  
  346. /** Native method shortcuts */
  347. var fnToString = Function.prototype.toString;
  348.  
  349. /**
  350. * The base implementation of `_.createCallback` without support for creating
  351. * "_.pluck" or "_.where" style callbacks.
  352. *
  353. * @private
  354. * @param {*} [func=identity] The value to convert to a callback.
  355. * @param {*} [thisArg] The `this` binding of the created callback.
  356. * @param {number} [argCount] The number of arguments the callback accepts.
  357. * @returns {Function} Returns a callback function.
  358. */
  359. function baseCreateCallback(func, thisArg, argCount) {
  360. if (typeof func != 'function') {
  361. return identity;
  362. }
  363. // exit early for no `thisArg` or already bound by `Function#bind`
  364. if (typeof thisArg == 'undefined' || !('prototype' in func)) {
  365. return func;
  366. }
  367. var bindData = func.__bindData__;
  368. if (typeof bindData == 'undefined') {
  369. if (support.funcNames) {
  370. bindData = !func.name;
  371. }
  372. bindData = bindData || !support.funcDecomp;
  373. if (!bindData) {
  374. var source = fnToString.call(func);
  375. if (!support.funcNames) {
  376. bindData = !reFuncName.test(source);
  377. }
  378. if (!bindData) {
  379. // checks if `func` references the `this` keyword and stores the result
  380. bindData = reThis.test(source);
  381. setBindData(func, bindData);
  382. }
  383. }
  384. }
  385. // exit early if there are no `this` references or `func` is bound
  386. if (bindData === false || (bindData !== true && bindData[1] & 1)) {
  387. return func;
  388. }
  389. switch (argCount) {
  390. case 1: return function(value) {
  391. return func.call(thisArg, value);
  392. };
  393. case 2: return function(a, b) {
  394. return func.call(thisArg, a, b);
  395. };
  396. case 3: return function(value, index, collection) {
  397. return func.call(thisArg, value, index, collection);
  398. };
  399. case 4: return function(accumulator, value, index, collection) {
  400. return func.call(thisArg, accumulator, value, index, collection);
  401. };
  402. }
  403. return bind(func, thisArg);
  404. }
  405.  
  406. module.exports = baseCreateCallback;
  407.  
  408. },{"lodash._setbinddata":9,"lodash.bind":12,"lodash.identity":24,"lodash.support":25}],9:[function(require,module,exports){
  409. /**
  410. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  411. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  412. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  413. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  414. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  415. * Available under MIT license <http://lodash.com/license>
  416. */
  417. var isNative = require('lodash._isnative'),
  418. noop = require('lodash.noop');
  419.  
  420. /** Used as the property descriptor for `__bindData__` */
  421. var descriptor = {
  422. 'configurable': false,
  423. 'enumerable': false,
  424. 'value': null,
  425. 'writable': false
  426. };
  427.  
  428. /** Used to set meta data on functions */
  429. var defineProperty = (function() {
  430. // IE 8 only accepts DOM elements
  431. try {
  432. var o = {},
  433. func = isNative(func = Object.defineProperty) && func,
  434. result = func(o, o, o) && func;
  435. } catch(e) { }
  436. return result;
  437. }());
  438.  
  439. /**
  440. * Sets `this` binding data on a given function.
  441. *
  442. * @private
  443. * @param {Function} func The function to set data on.
  444. * @param {Array} value The data array to set.
  445. */
  446. var setBindData = !defineProperty ? noop : function(func, value) {
  447. descriptor.value = value;
  448. defineProperty(func, '__bindData__', descriptor);
  449. };
  450.  
  451. module.exports = setBindData;
  452.  
  453. },{"lodash._isnative":10,"lodash.noop":11}],10:[function(require,module,exports){
  454. /**
  455. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  456. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  457. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  458. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  459. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  460. * Available under MIT license <http://lodash.com/license>
  461. */
  462.  
  463. /** Used for native method references */
  464. var objectProto = Object.prototype;
  465.  
  466. /** Used to resolve the internal [[Class]] of values */
  467. var toString = objectProto.toString;
  468.  
  469. /** Used to detect if a method is native */
  470. var reNative = RegExp('^' +
  471. String(toString)
  472. .replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
  473. .replace(/toString| for [^\]]+/g, '.*?') + '$'
  474. );
  475.  
  476. /**
  477. * Checks if `value` is a native function.
  478. *
  479. * @private
  480. * @param {*} value The value to check.
  481. * @returns {boolean} Returns `true` if the `value` is a native function, else `false`.
  482. */
  483. function isNative(value) {
  484. return typeof value == 'function' && reNative.test(value);
  485. }
  486.  
  487. module.exports = isNative;
  488.  
  489. },{}],11:[function(require,module,exports){
  490. /**
  491. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  492. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  493. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  494. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  495. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  496. * Available under MIT license <http://lodash.com/license>
  497. */
  498.  
  499. /**
  500. * A no-operation function.
  501. *
  502. * @static
  503. * @memberOf _
  504. * @category Utilities
  505. * @example
  506. *
  507. * var object = { 'name': 'fred' };
  508. * _.noop(object) === undefined;
  509. * // => true
  510. */
  511. function noop() {
  512. // no operation performed
  513. }
  514.  
  515. module.exports = noop;
  516.  
  517. },{}],12:[function(require,module,exports){
  518. /**
  519. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  520. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  521. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  522. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  523. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  524. * Available under MIT license <http://lodash.com/license>
  525. */
  526. var createWrapper = require('lodash._createwrapper'),
  527. slice = require('lodash._slice');
  528.  
  529. /**
  530. * Creates a function that, when called, invokes `func` with the `this`
  531. * binding of `thisArg` and prepends any additional `bind` arguments to those
  532. * provided to the bound function.
  533. *
  534. * @static
  535. * @memberOf _
  536. * @category Functions
  537. * @param {Function} func The function to bind.
  538. * @param {*} [thisArg] The `this` binding of `func`.
  539. * @param {...*} [arg] Arguments to be partially applied.
  540. * @returns {Function} Returns the new bound function.
  541. * @example
  542. *
  543. * var func = function(greeting) {
  544. * return greeting + ' ' + this.name;
  545. * };
  546. *
  547. * func = _.bind(func, { 'name': 'fred' }, 'hi');
  548. * func();
  549. * // => 'hi fred'
  550. */
  551. function bind(func, thisArg) {
  552. return arguments.length > 2
  553. ? createWrapper(func, 17, slice(arguments, 2), null, thisArg)
  554. : createWrapper(func, 1, null, null, thisArg);
  555. }
  556.  
  557. module.exports = bind;
  558.  
  559. },{"lodash._createwrapper":13,"lodash._slice":23}],13:[function(require,module,exports){
  560. /**
  561. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  562. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  563. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  564. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  565. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  566. * Available under MIT license <http://lodash.com/license>
  567. */
  568. var baseBind = require('lodash._basebind'),
  569. baseCreateWrapper = require('lodash._basecreatewrapper'),
  570. isFunction = require('lodash.isfunction'),
  571. slice = require('lodash._slice');
  572.  
  573. /**
  574. * Used for `Array` method references.
  575. *
  576. * Normally `Array.prototype` would suffice, however, using an array literal
  577. * avoids issues in Narwhal.
  578. */
  579. var arrayRef = [];
  580.  
  581. /** Native method shortcuts */
  582. var push = arrayRef.push,
  583. unshift = arrayRef.unshift;
  584.  
  585. /**
  586. * Creates a function that, when called, either curries or invokes `func`
  587. * with an optional `this` binding and partially applied arguments.
  588. *
  589. * @private
  590. * @param {Function|string} func The function or method name to reference.
  591. * @param {number} bitmask The bitmask of method flags to compose.
  592. * The bitmask may be composed of the following flags:
  593. * 1 - `_.bind`
  594. * 2 - `_.bindKey`
  595. * 4 - `_.curry`
  596. * 8 - `_.curry` (bound)
  597. * 16 - `_.partial`
  598. * 32 - `_.partialRight`
  599. * @param {Array} [partialArgs] An array of arguments to prepend to those
  600. * provided to the new function.
  601. * @param {Array} [partialRightArgs] An array of arguments to append to those
  602. * provided to the new function.
  603. * @param {*} [thisArg] The `this` binding of `func`.
  604. * @param {number} [arity] The arity of `func`.
  605. * @returns {Function} Returns the new function.
  606. */
  607. function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) {
  608. var isBind = bitmask & 1,
  609. isBindKey = bitmask & 2,
  610. isCurry = bitmask & 4,
  611. isCurryBound = bitmask & 8,
  612. isPartial = bitmask & 16,
  613. isPartialRight = bitmask & 32;
  614.  
  615. if (!isBindKey && !isFunction(func)) {
  616. throw new TypeError;
  617. }
  618. if (isPartial && !partialArgs.length) {
  619. bitmask &= ~16;
  620. isPartial = partialArgs = false;
  621. }
  622. if (isPartialRight && !partialRightArgs.length) {
  623. bitmask &= ~32;
  624. isPartialRight = partialRightArgs = false;
  625. }
  626. var bindData = func && func.__bindData__;
  627. if (bindData && bindData !== true) {
  628. // clone `bindData`
  629. bindData = slice(bindData);
  630. if (bindData[2]) {
  631. bindData[2] = slice(bindData[2]);
  632. }
  633. if (bindData[3]) {
  634. bindData[3] = slice(bindData[3]);
  635. }
  636. // set `thisBinding` is not previously bound
  637. if (isBind && !(bindData[1] & 1)) {
  638. bindData[4] = thisArg;
  639. }
  640. // set if previously bound but not currently (subsequent curried functions)
  641. if (!isBind && bindData[1] & 1) {
  642. bitmask |= 8;
  643. }
  644. // set curried arity if not yet set
  645. if (isCurry && !(bindData[1] & 4)) {
  646. bindData[5] = arity;
  647. }
  648. // append partial left arguments
  649. if (isPartial) {
  650. push.apply(bindData[2] || (bindData[2] = []), partialArgs);
  651. }
  652. // append partial right arguments
  653. if (isPartialRight) {
  654. unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
  655. }
  656. // merge flags
  657. bindData[1] |= bitmask;
  658. return createWrapper.apply(null, bindData);
  659. }
  660. // fast path for `_.bind`
  661. var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper;
  662. return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]);
  663. }
  664.  
  665. module.exports = createWrapper;
  666.  
  667. },{"lodash._basebind":14,"lodash._basecreatewrapper":18,"lodash._slice":23,"lodash.isfunction":22}],14:[function(require,module,exports){
  668. /**
  669. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  670. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  671. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  672. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  673. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  674. * Available under MIT license <http://lodash.com/license>
  675. */
  676. var baseCreate = require('lodash._basecreate'),
  677. isObject = require('lodash.isobject'),
  678. setBindData = require('lodash._setbinddata'),
  679. slice = require('lodash._slice');
  680.  
  681. /**
  682. * Used for `Array` method references.
  683. *
  684. * Normally `Array.prototype` would suffice, however, using an array literal
  685. * avoids issues in Narwhal.
  686. */
  687. var arrayRef = [];
  688.  
  689. /** Native method shortcuts */
  690. var push = arrayRef.push;
  691.  
  692. /**
  693. * The base implementation of `_.bind` that creates the bound function and
  694. * sets its meta data.
  695. *
  696. * @private
  697. * @param {Array} bindData The bind data array.
  698. * @returns {Function} Returns the new bound function.
  699. */
  700. function baseBind(bindData) {
  701. var func = bindData[0],
  702. partialArgs = bindData[2],
  703. thisArg = bindData[4];
  704.  
  705. function bound() {
  706. // `Function#bind` spec
  707. // http://es5.github.io/#x15.3.4.5
  708. if (partialArgs) {
  709. // avoid `arguments` object deoptimizations by using `slice` instead
  710. // of `Array.prototype.slice.call` and not assigning `arguments` to a
  711. // variable as a ternary expression
  712. var args = slice(partialArgs);
  713. push.apply(args, arguments);
  714. }
  715. // mimic the constructor's `return` behavior
  716. // http://es5.github.io/#x13.2.2
  717. if (this instanceof bound) {
  718. // ensure `new bound` is an instance of `func`
  719. var thisBinding = baseCreate(func.prototype),
  720. result = func.apply(thisBinding, args || arguments);
  721. return isObject(result) ? result : thisBinding;
  722. }
  723. return func.apply(thisArg, args || arguments);
  724. }
  725. setBindData(bound, bindData);
  726. return bound;
  727. }
  728.  
  729. module.exports = baseBind;
  730.  
  731. },{"lodash._basecreate":15,"lodash._setbinddata":9,"lodash._slice":23,"lodash.isobject":36}],15:[function(require,module,exports){
  732. (function (global){
  733. /**
  734. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  735. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  736. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  737. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  738. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  739. * Available under MIT license <http://lodash.com/license>
  740. */
  741. var isNative = require('lodash._isnative'),
  742. isObject = require('lodash.isobject'),
  743. noop = require('lodash.noop');
  744.  
  745. /* Native method shortcuts for methods with the same name as other `lodash` methods */
  746. var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate;
  747.  
  748. /**
  749. * The base implementation of `_.create` without support for assigning
  750. * properties to the created object.
  751. *
  752. * @private
  753. * @param {Object} prototype The object to inherit from.
  754. * @returns {Object} Returns the new object.
  755. */
  756. function baseCreate(prototype, properties) {
  757. return isObject(prototype) ? nativeCreate(prototype) : {};
  758. }
  759. // fallback for browsers without `Object.create`
  760. if (!nativeCreate) {
  761. baseCreate = (function() {
  762. function Object() {}
  763. return function(prototype) {
  764. if (isObject(prototype)) {
  765. Object.prototype = prototype;
  766. var result = new Object;
  767. Object.prototype = null;
  768. }
  769. return result || global.Object();
  770. };
  771. }());
  772. }
  773.  
  774. module.exports = baseCreate;
  775.  
  776. }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  777. },{"lodash._isnative":16,"lodash.isobject":36,"lodash.noop":17}],16:[function(require,module,exports){
  778. module.exports=require(10)
  779. },{}],17:[function(require,module,exports){
  780. module.exports=require(11)
  781. },{}],18:[function(require,module,exports){
  782. /**
  783. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  784. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  785. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  786. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  787. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  788. * Available under MIT license <http://lodash.com/license>
  789. */
  790. var baseCreate = require('lodash._basecreate'),
  791. isObject = require('lodash.isobject'),
  792. setBindData = require('lodash._setbinddata'),
  793. slice = require('lodash._slice');
  794.  
  795. /**
  796. * Used for `Array` method references.
  797. *
  798. * Normally `Array.prototype` would suffice, however, using an array literal
  799. * avoids issues in Narwhal.
  800. */
  801. var arrayRef = [];
  802.  
  803. /** Native method shortcuts */
  804. var push = arrayRef.push;
  805.  
  806. /**
  807. * The base implementation of `createWrapper` that creates the wrapper and
  808. * sets its meta data.
  809. *
  810. * @private
  811. * @param {Array} bindData The bind data array.
  812. * @returns {Function} Returns the new function.
  813. */
  814. function baseCreateWrapper(bindData) {
  815. var func = bindData[0],
  816. bitmask = bindData[1],
  817. partialArgs = bindData[2],
  818. partialRightArgs = bindData[3],
  819. thisArg = bindData[4],
  820. arity = bindData[5];
  821.  
  822. var isBind = bitmask & 1,
  823. isBindKey = bitmask & 2,
  824. isCurry = bitmask & 4,
  825. isCurryBound = bitmask & 8,
  826. key = func;
  827.  
  828. function bound() {
  829. var thisBinding = isBind ? thisArg : this;
  830. if (partialArgs) {
  831. var args = slice(partialArgs);
  832. push.apply(args, arguments);
  833. }
  834. if (partialRightArgs || isCurry) {
  835. args || (args = slice(arguments));
  836. if (partialRightArgs) {
  837. push.apply(args, partialRightArgs);
  838. }
  839. if (isCurry && args.length < arity) {
  840. bitmask |= 16 & ~32;
  841. return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]);
  842. }
  843. }
  844. args || (args = arguments);
  845. if (isBindKey) {
  846. func = thisBinding[key];
  847. }
  848. if (this instanceof bound) {
  849. thisBinding = baseCreate(func.prototype);
  850. var result = func.apply(thisBinding, args);
  851. return isObject(result) ? result : thisBinding;
  852. }
  853. return func.apply(thisBinding, args);
  854. }
  855. setBindData(bound, bindData);
  856. return bound;
  857. }
  858.  
  859. module.exports = baseCreateWrapper;
  860.  
  861. },{"lodash._basecreate":19,"lodash._setbinddata":9,"lodash._slice":23,"lodash.isobject":36}],19:[function(require,module,exports){
  862. module.exports=require(15)
  863. },{"lodash._isnative":20,"lodash.isobject":36,"lodash.noop":21}],20:[function(require,module,exports){
  864. module.exports=require(10)
  865. },{}],21:[function(require,module,exports){
  866. module.exports=require(11)
  867. },{}],22:[function(require,module,exports){
  868. /**
  869. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  870. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  871. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  872. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  873. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  874. * Available under MIT license <http://lodash.com/license>
  875. */
  876.  
  877. /**
  878. * Checks if `value` is a function.
  879. *
  880. * @static
  881. * @memberOf _
  882. * @category Objects
  883. * @param {*} value The value to check.
  884. * @returns {boolean} Returns `true` if the `value` is a function, else `false`.
  885. * @example
  886. *
  887. * _.isFunction(_);
  888. * // => true
  889. */
  890. function isFunction(value) {
  891. return typeof value == 'function';
  892. }
  893.  
  894. module.exports = isFunction;
  895.  
  896. },{}],23:[function(require,module,exports){
  897. /**
  898. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  899. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  900. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  901. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  902. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  903. * Available under MIT license <http://lodash.com/license>
  904. */
  905.  
  906. /**
  907. * Slices the `collection` from the `start` index up to, but not including,
  908. * the `end` index.
  909. *
  910. * Note: This function is used instead of `Array#slice` to support node lists
  911. * in IE < 9 and to ensure dense arrays are returned.
  912. *
  913. * @private
  914. * @param {Array|Object|string} collection The collection to slice.
  915. * @param {number} start The start index.
  916. * @param {number} end The end index.
  917. * @returns {Array} Returns the new array.
  918. */
  919. function slice(array, start, end) {
  920. start || (start = 0);
  921. if (typeof end == 'undefined') {
  922. end = array ? array.length : 0;
  923. }
  924. var index = -1,
  925. length = end - start || 0,
  926. result = Array(length < 0 ? 0 : length);
  927.  
  928. while (++index < length) {
  929. result[index] = array[start + index];
  930. }
  931. return result;
  932. }
  933.  
  934. module.exports = slice;
  935.  
  936. },{}],24:[function(require,module,exports){
  937. /**
  938. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  939. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  940. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  941. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  942. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  943. * Available under MIT license <http://lodash.com/license>
  944. */
  945.  
  946. /**
  947. * This method returns the first argument provided to it.
  948. *
  949. * @static
  950. * @memberOf _
  951. * @category Utilities
  952. * @param {*} value Any value.
  953. * @returns {*} Returns `value`.
  954. * @example
  955. *
  956. * var object = { 'name': 'fred' };
  957. * _.identity(object) === object;
  958. * // => true
  959. */
  960. function identity(value) {
  961. return value;
  962. }
  963.  
  964. module.exports = identity;
  965.  
  966. },{}],25:[function(require,module,exports){
  967. (function (global){
  968. /**
  969. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  970. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  971. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  972. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  973. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  974. * Available under MIT license <http://lodash.com/license>
  975. */
  976. var isNative = require('lodash._isnative');
  977.  
  978. /** Used to detect functions containing a `this` reference */
  979. var reThis = /\bthis\b/;
  980.  
  981. /**
  982. * An object used to flag environments features.
  983. *
  984. * @static
  985. * @memberOf _
  986. * @type Object
  987. */
  988. var support = {};
  989.  
  990. /**
  991. * Detect if functions can be decompiled by `Function#toString`
  992. * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps).
  993. *
  994. * @memberOf _.support
  995. * @type boolean
  996. */
  997. support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; });
  998.  
  999. /**
  1000. * Detect if `Function#name` is supported (all but IE).
  1001. *
  1002. * @memberOf _.support
  1003. * @type boolean
  1004. */
  1005. support.funcNames = typeof Function.name == 'string';
  1006.  
  1007. module.exports = support;
  1008.  
  1009. }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  1010. },{"lodash._isnative":26}],26:[function(require,module,exports){
  1011. module.exports=require(10)
  1012. },{}],27:[function(require,module,exports){
  1013. /**
  1014. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1015. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1016. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1017. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1018. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1019. * Available under MIT license <http://lodash.com/license>
  1020. */
  1021. var forIn = require('lodash.forin'),
  1022. getArray = require('lodash._getarray'),
  1023. isFunction = require('lodash.isfunction'),
  1024. objectTypes = require('lodash._objecttypes'),
  1025. releaseArray = require('lodash._releasearray');
  1026.  
  1027. /** `Object#toString` result shortcuts */
  1028. var argsClass = '[object Arguments]',
  1029. arrayClass = '[object Array]',
  1030. boolClass = '[object Boolean]',
  1031. dateClass = '[object Date]',
  1032. numberClass = '[object Number]',
  1033. objectClass = '[object Object]',
  1034. regexpClass = '[object RegExp]',
  1035. stringClass = '[object String]';
  1036.  
  1037. /** Used for native method references */
  1038. var objectProto = Object.prototype;
  1039.  
  1040. /** Used to resolve the internal [[Class]] of values */
  1041. var toString = objectProto.toString;
  1042.  
  1043. /** Native method shortcuts */
  1044. var hasOwnProperty = objectProto.hasOwnProperty;
  1045.  
  1046. /**
  1047. * The base implementation of `_.isEqual`, without support for `thisArg` binding,
  1048. * that allows partial "_.where" style comparisons.
  1049. *
  1050. * @private
  1051. * @param {*} a The value to compare.
  1052. * @param {*} b The other value to compare.
  1053. * @param {Function} [callback] The function to customize comparing values.
  1054. * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons.
  1055. * @param {Array} [stackA=[]] Tracks traversed `a` objects.
  1056. * @param {Array} [stackB=[]] Tracks traversed `b` objects.
  1057. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  1058. */
  1059. function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
  1060. // used to indicate that when comparing objects, `a` has at least the properties of `b`
  1061. if (callback) {
  1062. var result = callback(a, b);
  1063. if (typeof result != 'undefined') {
  1064. return !!result;
  1065. }
  1066. }
  1067. // exit early for identical values
  1068. if (a === b) {
  1069. // treat `+0` vs. `-0` as not equal
  1070. return a !== 0 || (1 / a == 1 / b);
  1071. }
  1072. var type = typeof a,
  1073. otherType = typeof b;
  1074.  
  1075. // exit early for unlike primitive values
  1076. if (a === a &&
  1077. !(a && objectTypes[type]) &&
  1078. !(b && objectTypes[otherType])) {
  1079. return false;
  1080. }
  1081. // exit early for `null` and `undefined` avoiding ES3's Function#call behavior
  1082. // http://es5.github.io/#x15.3.4.4
  1083. if (a == null || b == null) {
  1084. return a === b;
  1085. }
  1086. // compare [[Class]] names
  1087. var className = toString.call(a),
  1088. otherClass = toString.call(b);
  1089.  
  1090. if (className == argsClass) {
  1091. className = objectClass;
  1092. }
  1093. if (otherClass == argsClass) {
  1094. otherClass = objectClass;
  1095. }
  1096. if (className != otherClass) {
  1097. return false;
  1098. }
  1099. switch (className) {
  1100. case boolClass:
  1101. case dateClass:
  1102. // coerce dates and booleans to numbers, dates to milliseconds and booleans
  1103. // to `1` or `0` treating invalid dates coerced to `NaN` as not equal
  1104. return +a == +b;
  1105.  
  1106. case numberClass:
  1107. // treat `NaN` vs. `NaN` as equal
  1108. return (a != +a)
  1109. ? b != +b
  1110. // but treat `+0` vs. `-0` as not equal
  1111. : (a == 0 ? (1 / a == 1 / b) : a == +b);
  1112.  
  1113. case regexpClass:
  1114. case stringClass:
  1115. // coerce regexes to strings (http://es5.github.io/#x15.10.6.4)
  1116. // treat string primitives and their corresponding object instances as equal
  1117. return a == String(b);
  1118. }
  1119. var isArr = className == arrayClass;
  1120. if (!isArr) {
  1121. // unwrap any `lodash` wrapped values
  1122. var aWrapped = hasOwnProperty.call(a, '__wrapped__'),
  1123. bWrapped = hasOwnProperty.call(b, '__wrapped__');
  1124.  
  1125. if (aWrapped || bWrapped) {
  1126. return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB);
  1127. }
  1128. // exit for functions and DOM nodes
  1129. if (className != objectClass) {
  1130. return false;
  1131. }
  1132. // in older versions of Opera, `arguments` objects have `Array` constructors
  1133. var ctorA = a.constructor,
  1134. ctorB = b.constructor;
  1135.  
  1136. // non `Object` object instances with different constructors are not equal
  1137. if (ctorA != ctorB &&
  1138. !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) &&
  1139. ('constructor' in a && 'constructor' in b)
  1140. ) {
  1141. return false;
  1142. }
  1143. }
  1144. // assume cyclic structures are equal
  1145. // the algorithm for detecting cyclic structures is adapted from ES 5.1
  1146. // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3)
  1147. var initedStack = !stackA;
  1148. stackA || (stackA = getArray());
  1149. stackB || (stackB = getArray());
  1150.  
  1151. var length = stackA.length;
  1152. while (length--) {
  1153. if (stackA[length] == a) {
  1154. return stackB[length] == b;
  1155. }
  1156. }
  1157. var size = 0;
  1158. result = true;
  1159.  
  1160. // add `a` and `b` to the stack of traversed objects
  1161. stackA.push(a);
  1162. stackB.push(b);
  1163.  
  1164. // recursively compare objects and arrays (susceptible to call stack limits)
  1165. if (isArr) {
  1166. // compare lengths to determine if a deep comparison is necessary
  1167. length = a.length;
  1168. size = b.length;
  1169. result = size == length;
  1170.  
  1171. if (result || isWhere) {
  1172. // deep compare the contents, ignoring non-numeric properties
  1173. while (size--) {
  1174. var index = length,
  1175. value = b[size];
  1176.  
  1177. if (isWhere) {
  1178. while (index--) {
  1179. if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
  1180. break;
  1181. }
  1182. }
  1183. } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
  1184. break;
  1185. }
  1186. }
  1187. }
  1188. }
  1189. else {
  1190. // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
  1191. // which, in this case, is more costly
  1192. forIn(b, function(value, key, b) {
  1193. if (hasOwnProperty.call(b, key)) {
  1194. // count the number of properties.
  1195. size++;
  1196. // deep compare each property value.
  1197. return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
  1198. }
  1199. });
  1200.  
  1201. if (result && !isWhere) {
  1202. // ensure both objects have the same number of properties
  1203. forIn(a, function(value, key, a) {
  1204. if (hasOwnProperty.call(a, key)) {
  1205. // `size` will be `-1` if `a` has more properties than `b`
  1206. return (result = --size > -1);
  1207. }
  1208. });
  1209. }
  1210. }
  1211. stackA.pop();
  1212. stackB.pop();
  1213.  
  1214. if (initedStack) {
  1215. releaseArray(stackA);
  1216. releaseArray(stackB);
  1217. }
  1218. return result;
  1219. }
  1220.  
  1221. module.exports = baseIsEqual;
  1222.  
  1223. },{"lodash._getarray":28,"lodash._objecttypes":30,"lodash._releasearray":31,"lodash.forin":34,"lodash.isfunction":35}],28:[function(require,module,exports){
  1224. /**
  1225. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1226. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1227. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1228. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1229. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1230. * Available under MIT license <http://lodash.com/license>
  1231. */
  1232. var arrayPool = require('lodash._arraypool');
  1233.  
  1234. /**
  1235. * Gets an array from the array pool or creates a new one if the pool is empty.
  1236. *
  1237. * @private
  1238. * @returns {Array} The array from the pool.
  1239. */
  1240. function getArray() {
  1241. return arrayPool.pop() || [];
  1242. }
  1243.  
  1244. module.exports = getArray;
  1245.  
  1246. },{"lodash._arraypool":29}],29:[function(require,module,exports){
  1247. /**
  1248. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1249. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1250. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1251. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1252. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1253. * Available under MIT license <http://lodash.com/license>
  1254. */
  1255.  
  1256. /** Used to pool arrays and objects used internally */
  1257. var arrayPool = [];
  1258.  
  1259. module.exports = arrayPool;
  1260.  
  1261. },{}],30:[function(require,module,exports){
  1262. /**
  1263. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1264. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1265. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1266. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1267. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1268. * Available under MIT license <http://lodash.com/license>
  1269. */
  1270.  
  1271. /** Used to determine if values are of the language type Object */
  1272. var objectTypes = {
  1273. 'boolean': false,
  1274. 'function': true,
  1275. 'object': true,
  1276. 'number': false,
  1277. 'string': false,
  1278. 'undefined': false
  1279. };
  1280.  
  1281. module.exports = objectTypes;
  1282.  
  1283. },{}],31:[function(require,module,exports){
  1284. /**
  1285. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1286. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1287. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1288. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1289. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1290. * Available under MIT license <http://lodash.com/license>
  1291. */
  1292. var arrayPool = require('lodash._arraypool'),
  1293. maxPoolSize = require('lodash._maxpoolsize');
  1294.  
  1295. /**
  1296. * Releases the given array back to the array pool.
  1297. *
  1298. * @private
  1299. * @param {Array} [array] The array to release.
  1300. */
  1301. function releaseArray(array) {
  1302. array.length = 0;
  1303. if (arrayPool.length < maxPoolSize) {
  1304. arrayPool.push(array);
  1305. }
  1306. }
  1307.  
  1308. module.exports = releaseArray;
  1309.  
  1310. },{"lodash._arraypool":32,"lodash._maxpoolsize":33}],32:[function(require,module,exports){
  1311. module.exports=require(29)
  1312. },{}],33:[function(require,module,exports){
  1313. /**
  1314. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1315. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1316. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1317. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1318. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1319. * Available under MIT license <http://lodash.com/license>
  1320. */
  1321.  
  1322. /** Used as the max size of the `arrayPool` and `objectPool` */
  1323. var maxPoolSize = 40;
  1324.  
  1325. module.exports = maxPoolSize;
  1326.  
  1327. },{}],34:[function(require,module,exports){
  1328. /**
  1329. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1330. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1331. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1332. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1333. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1334. * Available under MIT license <http://lodash.com/license>
  1335. */
  1336. var baseCreateCallback = require('lodash._basecreatecallback'),
  1337. objectTypes = require('lodash._objecttypes');
  1338.  
  1339. /**
  1340. * Iterates over own and inherited enumerable properties of an object,
  1341. * executing the callback for each property. The callback is bound to `thisArg`
  1342. * and invoked with three arguments; (value, key, object). Callbacks may exit
  1343. * iteration early by explicitly returning `false`.
  1344. *
  1345. * @static
  1346. * @memberOf _
  1347. * @type Function
  1348. * @category Objects
  1349. * @param {Object} object The object to iterate over.
  1350. * @param {Function} [callback=identity] The function called per iteration.
  1351. * @param {*} [thisArg] The `this` binding of `callback`.
  1352. * @returns {Object} Returns `object`.
  1353. * @example
  1354. *
  1355. * function Shape() {
  1356. * this.x = 0;
  1357. * this.y = 0;
  1358. * }
  1359. *
  1360. * Shape.prototype.move = function(x, y) {
  1361. * this.x += x;
  1362. * this.y += y;
  1363. * };
  1364. *
  1365. * _.forIn(new Shape, function(value, key) {
  1366. * console.log(key);
  1367. * });
  1368. * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments)
  1369. */
  1370. var forIn = function(collection, callback, thisArg) {
  1371. var index, iterable = collection, result = iterable;
  1372. if (!iterable) return result;
  1373. if (!objectTypes[typeof iterable]) return result;
  1374. callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
  1375. for (index in iterable) {
  1376. if (callback(iterable[index], index, collection) === false) return result;
  1377. }
  1378. return result
  1379. };
  1380.  
  1381. module.exports = forIn;
  1382.  
  1383. },{"lodash._basecreatecallback":8,"lodash._objecttypes":30}],35:[function(require,module,exports){
  1384. module.exports=require(22)
  1385. },{}],36:[function(require,module,exports){
  1386. /**
  1387. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1388. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1389. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1390. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1391. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1392. * Available under MIT license <http://lodash.com/license>
  1393. */
  1394. var objectTypes = require('lodash._objecttypes');
  1395.  
  1396. /**
  1397. * Checks if `value` is the language type of Object.
  1398. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  1399. *
  1400. * @static
  1401. * @memberOf _
  1402. * @category Objects
  1403. * @param {*} value The value to check.
  1404. * @returns {boolean} Returns `true` if the `value` is an object, else `false`.
  1405. * @example
  1406. *
  1407. * _.isObject({});
  1408. * // => true
  1409. *
  1410. * _.isObject([1, 2, 3]);
  1411. * // => true
  1412. *
  1413. * _.isObject(1);
  1414. * // => false
  1415. */
  1416. function isObject(value) {
  1417. // check if the value is the ECMAScript language type of Object
  1418. // http://es5.github.io/#x8
  1419. // and avoid a V8 bug
  1420. // http://code.google.com/p/v8/issues/detail?id=2291
  1421. return !!(value && objectTypes[typeof value]);
  1422. }
  1423.  
  1424. module.exports = isObject;
  1425.  
  1426. },{"lodash._objecttypes":37}],37:[function(require,module,exports){
  1427. module.exports=require(30)
  1428. },{}],38:[function(require,module,exports){
  1429. /**
  1430. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1431. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1432. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1433. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1434. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1435. * Available under MIT license <http://lodash.com/license>
  1436. */
  1437. var isNative = require('lodash._isnative'),
  1438. isObject = require('lodash.isobject'),
  1439. shimKeys = require('lodash._shimkeys');
  1440.  
  1441. /* Native method shortcuts for methods with the same name as other `lodash` methods */
  1442. var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
  1443.  
  1444. /**
  1445. * Creates an array composed of the own enumerable property names of an object.
  1446. *
  1447. * @static
  1448. * @memberOf _
  1449. * @category Objects
  1450. * @param {Object} object The object to inspect.
  1451. * @returns {Array} Returns an array of property names.
  1452. * @example
  1453. *
  1454. * _.keys({ 'one': 1, 'two': 2, 'three': 3 });
  1455. * // => ['one', 'two', 'three'] (property order is not guaranteed across environments)
  1456. */
  1457. var keys = !nativeKeys ? shimKeys : function(object) {
  1458. if (!isObject(object)) {
  1459. return [];
  1460. }
  1461. return nativeKeys(object);
  1462. };
  1463.  
  1464. module.exports = keys;
  1465.  
  1466. },{"lodash._isnative":39,"lodash._shimkeys":40,"lodash.isobject":36}],39:[function(require,module,exports){
  1467. module.exports=require(10)
  1468. },{}],40:[function(require,module,exports){
  1469. /**
  1470. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1471. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1472. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1473. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1474. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1475. * Available under MIT license <http://lodash.com/license>
  1476. */
  1477. var objectTypes = require('lodash._objecttypes');
  1478.  
  1479. /** Used for native method references */
  1480. var objectProto = Object.prototype;
  1481.  
  1482. /** Native method shortcuts */
  1483. var hasOwnProperty = objectProto.hasOwnProperty;
  1484.  
  1485. /**
  1486. * A fallback implementation of `Object.keys` which produces an array of the
  1487. * given object's own enumerable property names.
  1488. *
  1489. * @private
  1490. * @type Function
  1491. * @param {Object} object The object to inspect.
  1492. * @returns {Array} Returns an array of property names.
  1493. */
  1494. var shimKeys = function(object) {
  1495. var index, iterable = object, result = [];
  1496. if (!iterable) return result;
  1497. if (!(objectTypes[typeof object])) return result;
  1498. for (index in iterable) {
  1499. if (hasOwnProperty.call(iterable, index)) {
  1500. result.push(index);
  1501. }
  1502. }
  1503. return result
  1504. };
  1505.  
  1506. module.exports = shimKeys;
  1507.  
  1508. },{"lodash._objecttypes":41}],41:[function(require,module,exports){
  1509. module.exports=require(30)
  1510. },{}],42:[function(require,module,exports){
  1511. /**
  1512. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1513. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1514. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1515. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1516. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1517. * Available under MIT license <http://lodash.com/license>
  1518. */
  1519.  
  1520. /**
  1521. * Creates a "_.pluck" style function, which returns the `key` value of a
  1522. * given object.
  1523. *
  1524. * @static
  1525. * @memberOf _
  1526. * @category Utilities
  1527. * @param {string} key The name of the property to retrieve.
  1528. * @returns {Function} Returns the new function.
  1529. * @example
  1530. *
  1531. * var characters = [
  1532. * { 'name': 'fred', 'age': 40 },
  1533. * { 'name': 'barney', 'age': 36 }
  1534. * ];
  1535. *
  1536. * var getName = _.property('name');
  1537. *
  1538. * _.map(characters, getName);
  1539. * // => ['barney', 'fred']
  1540. *
  1541. * _.sortBy(characters, getName);
  1542. * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }]
  1543. */
  1544. function property(key) {
  1545. return function(object) {
  1546. return object[key];
  1547. };
  1548. }
  1549.  
  1550. module.exports = property;
  1551.  
  1552. },{}],43:[function(require,module,exports){
  1553. /**
  1554. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1555. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1556. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1557. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1558. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1559. * Available under MIT license <http://lodash.com/license>
  1560. */
  1561. var baseCreateCallback = require('lodash._basecreatecallback'),
  1562. keys = require('lodash.keys'),
  1563. objectTypes = require('lodash._objecttypes');
  1564.  
  1565. /**
  1566. * Iterates over own enumerable properties of an object, executing the callback
  1567. * for each property. The callback is bound to `thisArg` and invoked with three
  1568. * arguments; (value, key, object). Callbacks may exit iteration early by
  1569. * explicitly returning `false`.
  1570. *
  1571. * @static
  1572. * @memberOf _
  1573. * @type Function
  1574. * @category Objects
  1575. * @param {Object} object The object to iterate over.
  1576. * @param {Function} [callback=identity] The function called per iteration.
  1577. * @param {*} [thisArg] The `this` binding of `callback`.
  1578. * @returns {Object} Returns `object`.
  1579. * @example
  1580. *
  1581. * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
  1582. * console.log(key);
  1583. * });
  1584. * // => logs '0', '1', and 'length' (property order is not guaranteed across environments)
  1585. */
  1586. var forOwn = function(collection, callback, thisArg) {
  1587. var index, iterable = collection, result = iterable;
  1588. if (!iterable) return result;
  1589. if (!objectTypes[typeof iterable]) return result;
  1590. callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
  1591. var ownIndex = -1,
  1592. ownProps = objectTypes[typeof iterable] && keys(iterable),
  1593. length = ownProps ? ownProps.length : 0;
  1594.  
  1595. while (++ownIndex < length) {
  1596. index = ownProps[ownIndex];
  1597. if (callback(iterable[index], index, collection) === false) return result;
  1598. }
  1599. return result
  1600. };
  1601.  
  1602. module.exports = forOwn;
  1603.  
  1604. },{"lodash._basecreatecallback":44,"lodash._objecttypes":65,"lodash.keys":66}],44:[function(require,module,exports){
  1605. module.exports=require(8)
  1606. },{"lodash._setbinddata":45,"lodash.bind":48,"lodash.identity":62,"lodash.support":63}],45:[function(require,module,exports){
  1607. module.exports=require(9)
  1608. },{"lodash._isnative":46,"lodash.noop":47}],46:[function(require,module,exports){
  1609. module.exports=require(10)
  1610. },{}],47:[function(require,module,exports){
  1611. module.exports=require(11)
  1612. },{}],48:[function(require,module,exports){
  1613. module.exports=require(12)
  1614. },{"lodash._createwrapper":49,"lodash._slice":61}],49:[function(require,module,exports){
  1615. module.exports=require(13)
  1616. },{"lodash._basebind":50,"lodash._basecreatewrapper":55,"lodash._slice":61,"lodash.isfunction":60}],50:[function(require,module,exports){
  1617. module.exports=require(14)
  1618. },{"lodash._basecreate":51,"lodash._setbinddata":45,"lodash._slice":61,"lodash.isobject":54}],51:[function(require,module,exports){
  1619. module.exports=require(15)
  1620. },{"lodash._isnative":52,"lodash.isobject":54,"lodash.noop":53}],52:[function(require,module,exports){
  1621. module.exports=require(10)
  1622. },{}],53:[function(require,module,exports){
  1623. module.exports=require(11)
  1624. },{}],54:[function(require,module,exports){
  1625. module.exports=require(36)
  1626. },{"lodash._objecttypes":65}],55:[function(require,module,exports){
  1627. module.exports=require(18)
  1628. },{"lodash._basecreate":56,"lodash._setbinddata":45,"lodash._slice":61,"lodash.isobject":59}],56:[function(require,module,exports){
  1629. module.exports=require(15)
  1630. },{"lodash._isnative":57,"lodash.isobject":59,"lodash.noop":58}],57:[function(require,module,exports){
  1631. module.exports=require(10)
  1632. },{}],58:[function(require,module,exports){
  1633. module.exports=require(11)
  1634. },{}],59:[function(require,module,exports){
  1635. module.exports=require(36)
  1636. },{"lodash._objecttypes":65}],60:[function(require,module,exports){
  1637. module.exports=require(22)
  1638. },{}],61:[function(require,module,exports){
  1639. module.exports=require(23)
  1640. },{}],62:[function(require,module,exports){
  1641. module.exports=require(24)
  1642. },{}],63:[function(require,module,exports){
  1643. module.exports=require(25)
  1644. },{"lodash._isnative":64}],64:[function(require,module,exports){
  1645. module.exports=require(10)
  1646. },{}],65:[function(require,module,exports){
  1647. module.exports=require(30)
  1648. },{}],66:[function(require,module,exports){
  1649. module.exports=require(38)
  1650. },{"lodash._isnative":67,"lodash._shimkeys":68,"lodash.isobject":69}],67:[function(require,module,exports){
  1651. module.exports=require(10)
  1652. },{}],68:[function(require,module,exports){
  1653. module.exports=require(40)
  1654. },{"lodash._objecttypes":65}],69:[function(require,module,exports){
  1655. module.exports=require(36)
  1656. },{"lodash._objecttypes":65}]},{},[1])