PageRenderTime 48ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 1ms

/files/react.slick/0.5.0/react-slick.js

https://gitlab.com/Mirros/jsdelivr
JavaScript | 1641 lines | 705 code | 182 blank | 754 comment | 255 complexity | 956c63ab6694cc84cd0fb4e517ccc0d0 MD5 | raw file
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory(require("react"));
  4. else if(typeof define === 'function' && define.amd)
  5. define(["react"], factory);
  6. else if(typeof exports === 'object')
  7. exports["Slider"] = factory(require("react"));
  8. else
  9. root["Slider"] = factory(root["React"]);
  10. })(this, function(__WEBPACK_EXTERNAL_MODULE_15__) {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/ // The module cache
  13. /******/ var installedModules = {};
  14. /******/ // The require function
  15. /******/ function __webpack_require__(moduleId) {
  16. /******/ // Check if module is in cache
  17. /******/ if(installedModules[moduleId])
  18. /******/ return installedModules[moduleId].exports;
  19. /******/ // Create a new module (and put it into the cache)
  20. /******/ var module = installedModules[moduleId] = {
  21. /******/ exports: {},
  22. /******/ id: moduleId,
  23. /******/ loaded: false
  24. /******/ };
  25. /******/ // Execute the module function
  26. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  27. /******/ // Flag the module as loaded
  28. /******/ module.loaded = true;
  29. /******/ // Return the exports of the module
  30. /******/ return module.exports;
  31. /******/ }
  32. /******/ // expose the modules object (__webpack_modules__)
  33. /******/ __webpack_require__.m = modules;
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/ // __webpack_public_path__
  37. /******/ __webpack_require__.p = "";
  38. /******/ // Load entry module and return exports
  39. /******/ return __webpack_require__(0);
  40. /******/ })
  41. /************************************************************************/
  42. /******/ ([
  43. /* 0 */
  44. /***/ function(module, exports, __webpack_require__) {
  45. module.exports = __webpack_require__(1);
  46. /***/ },
  47. /* 1 */
  48. /***/ function(module, exports, __webpack_require__) {
  49. 'use strict';
  50. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  51. var _react = __webpack_require__(15);
  52. var _react2 = _interopRequireDefault(_react);
  53. var _innerSlider = __webpack_require__(16);
  54. var _innerSlider2 = _interopRequireDefault(_innerSlider);
  55. var _lodashSortby = __webpack_require__(47);
  56. var _lodashSortby2 = _interopRequireDefault(_lodashSortby);
  57. var _lodashPluck = __webpack_require__(61);
  58. var _lodashPluck2 = _interopRequireDefault(_lodashPluck);
  59. var _lodashFilter = __webpack_require__(2);
  60. var _lodashFilter2 = _interopRequireDefault(_lodashFilter);
  61. var _lodashAssign = __webpack_require__(36);
  62. var _lodashAssign2 = _interopRequireDefault(_lodashAssign);
  63. var _json2mq = __webpack_require__(76);
  64. var _json2mq2 = _interopRequireDefault(_json2mq);
  65. var _reactResponsiveMixin = __webpack_require__(78);
  66. var _reactResponsiveMixin2 = _interopRequireDefault(_reactResponsiveMixin);
  67. var Slider = _react2['default'].createClass({
  68. displayName: 'Slider',
  69. mixins: [_reactResponsiveMixin2['default']],
  70. getInitialState: function getInitialState() {
  71. return {
  72. breakpoint: null
  73. };
  74. },
  75. componentDidMount: function componentDidMount() {
  76. var breakpoints = (0, _lodashSortby2['default'])((0, _lodashPluck2['default'])(this.props.responsive, 'breakpoint'));
  77. breakpoints.forEach((function (breakpoint, index) {
  78. var query;
  79. if (index === 0) {
  80. query = (0, _json2mq2['default'])({ minWidth: 0, maxWidth: breakpoint });
  81. } else {
  82. query = (0, _json2mq2['default'])({ minWidth: breakpoints[index - 1], maxWidth: breakpoint });
  83. }
  84. this.media(query, (function () {
  85. this.setState({ breakpoint: breakpoint });
  86. }).bind(this));
  87. }).bind(this));
  88. // Register media query for full screen. Need to support resize from small to large
  89. var query = (0, _json2mq2['default'])({ minWidth: breakpoints.slice(-1)[0] });
  90. this.media(query, (function () {
  91. this.setState({ breakpoint: null });
  92. }).bind(this));
  93. },
  94. render: function render() {
  95. var settings;
  96. var newProps;
  97. if (this.state.breakpoint) {
  98. newProps = (0, _lodashFilter2['default'])(this.props.responsive, { breakpoint: this.state.breakpoint });
  99. settings = (0, _lodashAssign2['default'])({}, this.props, newProps[0].settings);
  100. } else {
  101. settings = this.props;
  102. }
  103. return _react2['default'].createElement(_innerSlider2['default'], settings);
  104. }
  105. });
  106. module.exports = Slider;
  107. /***/ },
  108. /* 2 */
  109. /***/ function(module, exports, __webpack_require__) {
  110. /**
  111. * lodash 3.1.1 (Custom Build) <https://lodash.com/>
  112. * Build: `lodash modern modularize exports="npm" -o ./`
  113. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  114. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  115. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  116. * Available under MIT license <https://lodash.com/license>
  117. */
  118. var arrayFilter = __webpack_require__(3),
  119. baseCallback = __webpack_require__(4),
  120. baseFilter = __webpack_require__(13),
  121. isArray = __webpack_require__(6);
  122. /**
  123. * Iterates over elements of `collection`, returning an array of all elements
  124. * `predicate` returns truthy for. The predicate is bound to `thisArg` and
  125. * invoked with three arguments: (value, index|key, collection).
  126. *
  127. * If a property name is provided for `predicate` the created `_.property`
  128. * style callback returns the property value of the given element.
  129. *
  130. * If a value is also provided for `thisArg` the created `_.matchesProperty`
  131. * style callback returns `true` for elements that have a matching property
  132. * value, else `false`.
  133. *
  134. * If an object is provided for `predicate` the created `_.matches` style
  135. * callback returns `true` for elements that have the properties of the given
  136. * object, else `false`.
  137. *
  138. * @static
  139. * @memberOf _
  140. * @alias select
  141. * @category Collection
  142. * @param {Array|Object|string} collection The collection to iterate over.
  143. * @param {Function|Object|string} [predicate=_.identity] The function invoked
  144. * per iteration.
  145. * @param {*} [thisArg] The `this` binding of `predicate`.
  146. * @returns {Array} Returns the new filtered array.
  147. * @example
  148. *
  149. * _.filter([4, 5, 6], function(n) {
  150. * return n % 2 == 0;
  151. * });
  152. * // => [4, 6]
  153. *
  154. * var users = [
  155. * { 'user': 'barney', 'age': 36, 'active': true },
  156. * { 'user': 'fred', 'age': 40, 'active': false }
  157. * ];
  158. *
  159. * // using the `_.matches` callback shorthand
  160. * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user');
  161. * // => ['barney']
  162. *
  163. * // using the `_.matchesProperty` callback shorthand
  164. * _.pluck(_.filter(users, 'active', false), 'user');
  165. * // => ['fred']
  166. *
  167. * // using the `_.property` callback shorthand
  168. * _.pluck(_.filter(users, 'active'), 'user');
  169. * // => ['barney']
  170. */
  171. function filter(collection, predicate, thisArg) {
  172. var func = isArray(collection) ? arrayFilter : baseFilter;
  173. predicate = baseCallback(predicate, thisArg, 3);
  174. return func(collection, predicate);
  175. }
  176. module.exports = filter;
  177. /***/ },
  178. /* 3 */
  179. /***/ function(module, exports, __webpack_require__) {
  180. /**
  181. * lodash 3.0.0 (Custom Build) <https://lodash.com/>
  182. * Build: `lodash modern modularize exports="npm" -o ./`
  183. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  184. * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
  185. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  186. * Available under MIT license <https://lodash.com/license>
  187. */
  188. /**
  189. * A specialized version of `_.filter` for arrays without support for callback
  190. * shorthands or `this` binding.
  191. *
  192. * @private
  193. * @param {Array} array The array to iterate over.
  194. * @param {Function} predicate The function invoked per iteration.
  195. * @returns {Array} Returns the new filtered array.
  196. */
  197. function arrayFilter(array, predicate) {
  198. var index = -1,
  199. length = array.length,
  200. resIndex = -1,
  201. result = [];
  202. while (++index < length) {
  203. var value = array[index];
  204. if (predicate(value, index, array)) {
  205. result[++resIndex] = value;
  206. }
  207. }
  208. return result;
  209. }
  210. module.exports = arrayFilter;
  211. /***/ },
  212. /* 4 */
  213. /***/ function(module, exports, __webpack_require__) {
  214. /**
  215. * lodash 3.3.0 (Custom Build) <https://lodash.com/>
  216. * Build: `lodash modern modularize exports="npm" -o ./`
  217. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  218. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  219. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  220. * Available under MIT license <https://lodash.com/license>
  221. */
  222. var baseIsEqual = __webpack_require__(5),
  223. bindCallback = __webpack_require__(11),
  224. isArray = __webpack_require__(6),
  225. pairs = __webpack_require__(12);
  226. /** Used to match property names within property paths. */
  227. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
  228. reIsPlainProp = /^\w*$/,
  229. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
  230. /** Used to match backslashes in property paths. */
  231. var reEscapeChar = /\\(\\)?/g;
  232. /**
  233. * Converts `value` to a string if it's not one. An empty string is returned
  234. * for `null` or `undefined` values.
  235. *
  236. * @private
  237. * @param {*} value The value to process.
  238. * @returns {string} Returns the string.
  239. */
  240. function baseToString(value) {
  241. if (typeof value == 'string') {
  242. return value;
  243. }
  244. return value == null ? '' : (value + '');
  245. }
  246. /**
  247. * The base implementation of `_.callback` which supports specifying the
  248. * number of arguments to provide to `func`.
  249. *
  250. * @private
  251. * @param {*} [func=_.identity] The value to convert to a callback.
  252. * @param {*} [thisArg] The `this` binding of `func`.
  253. * @param {number} [argCount] The number of arguments to provide to `func`.
  254. * @returns {Function} Returns the callback.
  255. */
  256. function baseCallback(func, thisArg, argCount) {
  257. var type = typeof func;
  258. if (type == 'function') {
  259. return thisArg === undefined
  260. ? func
  261. : bindCallback(func, thisArg, argCount);
  262. }
  263. if (func == null) {
  264. return identity;
  265. }
  266. if (type == 'object') {
  267. return baseMatches(func);
  268. }
  269. return thisArg === undefined
  270. ? property(func)
  271. : baseMatchesProperty(func, thisArg);
  272. }
  273. /**
  274. * The base implementation of `get` without support for string paths
  275. * and default values.
  276. *
  277. * @private
  278. * @param {Object} object The object to query.
  279. * @param {Array} path The path of the property to get.
  280. * @param {string} [pathKey] The key representation of path.
  281. * @returns {*} Returns the resolved value.
  282. */
  283. function baseGet(object, path, pathKey) {
  284. if (object == null) {
  285. return;
  286. }
  287. if (pathKey !== undefined && pathKey in toObject(object)) {
  288. path = [pathKey];
  289. }
  290. var index = 0,
  291. length = path.length;
  292. while (object != null && index < length) {
  293. object = object[path[index++]];
  294. }
  295. return (index && index == length) ? object : undefined;
  296. }
  297. /**
  298. * The base implementation of `_.isMatch` without support for callback
  299. * shorthands and `this` binding.
  300. *
  301. * @private
  302. * @param {Object} object The object to inspect.
  303. * @param {Array} matchData The propery names, values, and compare flags to match.
  304. * @param {Function} [customizer] The function to customize comparing objects.
  305. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  306. */
  307. function baseIsMatch(object, matchData, customizer) {
  308. var index = matchData.length,
  309. length = index,
  310. noCustomizer = !customizer;
  311. if (object == null) {
  312. return !length;
  313. }
  314. object = toObject(object);
  315. while (index--) {
  316. var data = matchData[index];
  317. if ((noCustomizer && data[2])
  318. ? data[1] !== object[data[0]]
  319. : !(data[0] in object)
  320. ) {
  321. return false;
  322. }
  323. }
  324. while (++index < length) {
  325. data = matchData[index];
  326. var key = data[0],
  327. objValue = object[key],
  328. srcValue = data[1];
  329. if (noCustomizer && data[2]) {
  330. if (objValue === undefined && !(key in object)) {
  331. return false;
  332. }
  333. } else {
  334. var result = customizer ? customizer(objValue, srcValue, key) : undefined;
  335. if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
  336. return false;
  337. }
  338. }
  339. }
  340. return true;
  341. }
  342. /**
  343. * The base implementation of `_.matches` which does not clone `source`.
  344. *
  345. * @private
  346. * @param {Object} source The object of property values to match.
  347. * @returns {Function} Returns the new function.
  348. */
  349. function baseMatches(source) {
  350. var matchData = getMatchData(source);
  351. if (matchData.length == 1 && matchData[0][2]) {
  352. var key = matchData[0][0],
  353. value = matchData[0][1];
  354. return function(object) {
  355. if (object == null) {
  356. return false;
  357. }
  358. return object[key] === value && (value !== undefined || (key in toObject(object)));
  359. };
  360. }
  361. return function(object) {
  362. return baseIsMatch(object, matchData);
  363. };
  364. }
  365. /**
  366. * The base implementation of `_.matchesProperty` which does not which does
  367. * not clone `value`.
  368. *
  369. * @private
  370. * @param {string} path The path of the property to get.
  371. * @param {*} srcValue The value to compare.
  372. * @returns {Function} Returns the new function.
  373. */
  374. function baseMatchesProperty(path, srcValue) {
  375. var isArr = isArray(path),
  376. isCommon = isKey(path) && isStrictComparable(srcValue),
  377. pathKey = (path + '');
  378. path = toPath(path);
  379. return function(object) {
  380. if (object == null) {
  381. return false;
  382. }
  383. var key = pathKey;
  384. object = toObject(object);
  385. if ((isArr || !isCommon) && !(key in object)) {
  386. object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
  387. if (object == null) {
  388. return false;
  389. }
  390. key = last(path);
  391. object = toObject(object);
  392. }
  393. return object[key] === srcValue
  394. ? (srcValue !== undefined || (key in object))
  395. : baseIsEqual(srcValue, object[key], undefined, true);
  396. };
  397. }
  398. /**
  399. * The base implementation of `_.property` without support for deep paths.
  400. *
  401. * @private
  402. * @param {string} key The key of the property to get.
  403. * @returns {Function} Returns the new function.
  404. */
  405. function baseProperty(key) {
  406. return function(object) {
  407. return object == null ? undefined : object[key];
  408. };
  409. }
  410. /**
  411. * A specialized version of `baseProperty` which supports deep paths.
  412. *
  413. * @private
  414. * @param {Array|string} path The path of the property to get.
  415. * @returns {Function} Returns the new function.
  416. */
  417. function basePropertyDeep(path) {
  418. var pathKey = (path + '');
  419. path = toPath(path);
  420. return function(object) {
  421. return baseGet(object, path, pathKey);
  422. };
  423. }
  424. /**
  425. * The base implementation of `_.slice` without an iteratee call guard.
  426. *
  427. * @private
  428. * @param {Array} array The array to slice.
  429. * @param {number} [start=0] The start position.
  430. * @param {number} [end=array.length] The end position.
  431. * @returns {Array} Returns the slice of `array`.
  432. */
  433. function baseSlice(array, start, end) {
  434. var index = -1,
  435. length = array.length;
  436. start = start == null ? 0 : (+start || 0);
  437. if (start < 0) {
  438. start = -start > length ? 0 : (length + start);
  439. }
  440. end = (end === undefined || end > length) ? length : (+end || 0);
  441. if (end < 0) {
  442. end += length;
  443. }
  444. length = start > end ? 0 : ((end - start) >>> 0);
  445. start >>>= 0;
  446. var result = Array(length);
  447. while (++index < length) {
  448. result[index] = array[index + start];
  449. }
  450. return result;
  451. }
  452. /**
  453. * Gets the propery names, values, and compare flags of `object`.
  454. *
  455. * @private
  456. * @param {Object} object The object to query.
  457. * @returns {Array} Returns the match data of `object`.
  458. */
  459. function getMatchData(object) {
  460. var result = pairs(object),
  461. length = result.length;
  462. while (length--) {
  463. result[length][2] = isStrictComparable(result[length][1]);
  464. }
  465. return result;
  466. }
  467. /**
  468. * Checks if `value` is a property name and not a property path.
  469. *
  470. * @private
  471. * @param {*} value The value to check.
  472. * @param {Object} [object] The object to query keys on.
  473. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  474. */
  475. function isKey(value, object) {
  476. var type = typeof value;
  477. if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
  478. return true;
  479. }
  480. if (isArray(value)) {
  481. return false;
  482. }
  483. var result = !reIsDeepProp.test(value);
  484. return result || (object != null && value in toObject(object));
  485. }
  486. /**
  487. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  488. *
  489. * @private
  490. * @param {*} value The value to check.
  491. * @returns {boolean} Returns `true` if `value` if suitable for strict
  492. * equality comparisons, else `false`.
  493. */
  494. function isStrictComparable(value) {
  495. return value === value && !isObject(value);
  496. }
  497. /**
  498. * Converts `value` to an object if it's not one.
  499. *
  500. * @private
  501. * @param {*} value The value to process.
  502. * @returns {Object} Returns the object.
  503. */
  504. function toObject(value) {
  505. return isObject(value) ? value : Object(value);
  506. }
  507. /**
  508. * Converts `value` to property path array if it's not one.
  509. *
  510. * @private
  511. * @param {*} value The value to process.
  512. * @returns {Array} Returns the property path array.
  513. */
  514. function toPath(value) {
  515. if (isArray(value)) {
  516. return value;
  517. }
  518. var result = [];
  519. baseToString(value).replace(rePropName, function(match, number, quote, string) {
  520. result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
  521. });
  522. return result;
  523. }
  524. /**
  525. * Gets the last element of `array`.
  526. *
  527. * @static
  528. * @memberOf _
  529. * @category Array
  530. * @param {Array} array The array to query.
  531. * @returns {*} Returns the last element of `array`.
  532. * @example
  533. *
  534. * _.last([1, 2, 3]);
  535. * // => 3
  536. */
  537. function last(array) {
  538. var length = array ? array.length : 0;
  539. return length ? array[length - 1] : undefined;
  540. }
  541. /**
  542. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  543. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  544. *
  545. * @static
  546. * @memberOf _
  547. * @category Lang
  548. * @param {*} value The value to check.
  549. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  550. * @example
  551. *
  552. * _.isObject({});
  553. * // => true
  554. *
  555. * _.isObject([1, 2, 3]);
  556. * // => true
  557. *
  558. * _.isObject(1);
  559. * // => false
  560. */
  561. function isObject(value) {
  562. // Avoid a V8 JIT bug in Chrome 19-20.
  563. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  564. var type = typeof value;
  565. return !!value && (type == 'object' || type == 'function');
  566. }
  567. /**
  568. * This method returns the first argument provided to it.
  569. *
  570. * @static
  571. * @memberOf _
  572. * @category Utility
  573. * @param {*} value Any value.
  574. * @returns {*} Returns `value`.
  575. * @example
  576. *
  577. * var object = { 'user': 'fred' };
  578. *
  579. * _.identity(object) === object;
  580. * // => true
  581. */
  582. function identity(value) {
  583. return value;
  584. }
  585. /**
  586. * Creates a function which returns the property value at `path` on a
  587. * given object.
  588. *
  589. * @static
  590. * @memberOf _
  591. * @category Utility
  592. * @param {Array|string} path The path of the property to get.
  593. * @returns {Function} Returns the new function.
  594. * @example
  595. *
  596. * var objects = [
  597. * { 'a': { 'b': { 'c': 2 } } },
  598. * { 'a': { 'b': { 'c': 1 } } }
  599. * ];
  600. *
  601. * _.map(objects, _.property('a.b.c'));
  602. * // => [2, 1]
  603. *
  604. * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
  605. * // => [1, 2]
  606. */
  607. function property(path) {
  608. return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
  609. }
  610. module.exports = baseCallback;
  611. /***/ },
  612. /* 5 */
  613. /***/ function(module, exports, __webpack_require__) {
  614. /**
  615. * lodash 3.0.7 (Custom Build) <https://lodash.com/>
  616. * Build: `lodash modern modularize exports="npm" -o ./`
  617. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  618. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  619. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  620. * Available under MIT license <https://lodash.com/license>
  621. */
  622. var isArray = __webpack_require__(6),
  623. isTypedArray = __webpack_require__(7),
  624. keys = __webpack_require__(8);
  625. /** `Object#toString` result references. */
  626. var argsTag = '[object Arguments]',
  627. arrayTag = '[object Array]',
  628. boolTag = '[object Boolean]',
  629. dateTag = '[object Date]',
  630. errorTag = '[object Error]',
  631. numberTag = '[object Number]',
  632. objectTag = '[object Object]',
  633. regexpTag = '[object RegExp]',
  634. stringTag = '[object String]';
  635. /**
  636. * Checks if `value` is object-like.
  637. *
  638. * @private
  639. * @param {*} value The value to check.
  640. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  641. */
  642. function isObjectLike(value) {
  643. return !!value && typeof value == 'object';
  644. }
  645. /** Used for native method references. */
  646. var objectProto = Object.prototype;
  647. /** Used to check objects for own properties. */
  648. var hasOwnProperty = objectProto.hasOwnProperty;
  649. /**
  650. * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
  651. * of values.
  652. */
  653. var objToString = objectProto.toString;
  654. /**
  655. * A specialized version of `_.some` for arrays without support for callback
  656. * shorthands and `this` binding.
  657. *
  658. * @private
  659. * @param {Array} array The array to iterate over.
  660. * @param {Function} predicate The function invoked per iteration.
  661. * @returns {boolean} Returns `true` if any element passes the predicate check,
  662. * else `false`.
  663. */
  664. function arraySome(array, predicate) {
  665. var index = -1,
  666. length = array.length;
  667. while (++index < length) {
  668. if (predicate(array[index], index, array)) {
  669. return true;
  670. }
  671. }
  672. return false;
  673. }
  674. /**
  675. * The base implementation of `_.isEqual` without support for `this` binding
  676. * `customizer` functions.
  677. *
  678. * @private
  679. * @param {*} value The value to compare.
  680. * @param {*} other The other value to compare.
  681. * @param {Function} [customizer] The function to customize comparing values.
  682. * @param {boolean} [isLoose] Specify performing partial comparisons.
  683. * @param {Array} [stackA] Tracks traversed `value` objects.
  684. * @param {Array} [stackB] Tracks traversed `other` objects.
  685. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  686. */
  687. function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
  688. if (value === other) {
  689. return true;
  690. }
  691. if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
  692. return value !== value && other !== other;
  693. }
  694. return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
  695. }
  696. /**
  697. * A specialized version of `baseIsEqual` for arrays and objects which performs
  698. * deep comparisons and tracks traversed objects enabling objects with circular
  699. * references to be compared.
  700. *
  701. * @private
  702. * @param {Object} object The object to compare.
  703. * @param {Object} other The other object to compare.
  704. * @param {Function} equalFunc The function to determine equivalents of values.
  705. * @param {Function} [customizer] The function to customize comparing objects.
  706. * @param {boolean} [isLoose] Specify performing partial comparisons.
  707. * @param {Array} [stackA=[]] Tracks traversed `value` objects.
  708. * @param {Array} [stackB=[]] Tracks traversed `other` objects.
  709. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  710. */
  711. function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
  712. var objIsArr = isArray(object),
  713. othIsArr = isArray(other),
  714. objTag = arrayTag,
  715. othTag = arrayTag;
  716. if (!objIsArr) {
  717. objTag = objToString.call(object);
  718. if (objTag == argsTag) {
  719. objTag = objectTag;
  720. } else if (objTag != objectTag) {
  721. objIsArr = isTypedArray(object);
  722. }
  723. }
  724. if (!othIsArr) {
  725. othTag = objToString.call(other);
  726. if (othTag == argsTag) {
  727. othTag = objectTag;
  728. } else if (othTag != objectTag) {
  729. othIsArr = isTypedArray(other);
  730. }
  731. }
  732. var objIsObj = objTag == objectTag,
  733. othIsObj = othTag == objectTag,
  734. isSameTag = objTag == othTag;
  735. if (isSameTag && !(objIsArr || objIsObj)) {
  736. return equalByTag(object, other, objTag);
  737. }
  738. if (!isLoose) {
  739. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  740. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  741. if (objIsWrapped || othIsWrapped) {
  742. return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
  743. }
  744. }
  745. if (!isSameTag) {
  746. return false;
  747. }
  748. // Assume cyclic values are equal.
  749. // For more information on detecting circular references see https://es5.github.io/#JO.
  750. stackA || (stackA = []);
  751. stackB || (stackB = []);
  752. var length = stackA.length;
  753. while (length--) {
  754. if (stackA[length] == object) {
  755. return stackB[length] == other;
  756. }
  757. }
  758. // Add `object` and `other` to the stack of traversed objects.
  759. stackA.push(object);
  760. stackB.push(other);
  761. var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
  762. stackA.pop();
  763. stackB.pop();
  764. return result;
  765. }
  766. /**
  767. * A specialized version of `baseIsEqualDeep` for arrays with support for
  768. * partial deep comparisons.
  769. *
  770. * @private
  771. * @param {Array} array The array to compare.
  772. * @param {Array} other The other array to compare.
  773. * @param {Function} equalFunc The function to determine equivalents of values.
  774. * @param {Function} [customizer] The function to customize comparing arrays.
  775. * @param {boolean} [isLoose] Specify performing partial comparisons.
  776. * @param {Array} [stackA] Tracks traversed `value` objects.
  777. * @param {Array} [stackB] Tracks traversed `other` objects.
  778. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  779. */
  780. function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
  781. var index = -1,
  782. arrLength = array.length,
  783. othLength = other.length;
  784. if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
  785. return false;
  786. }
  787. // Ignore non-index properties.
  788. while (++index < arrLength) {
  789. var arrValue = array[index],
  790. othValue = other[index],
  791. result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
  792. if (result !== undefined) {
  793. if (result) {
  794. continue;
  795. }
  796. return false;
  797. }
  798. // Recursively compare arrays (susceptible to call stack limits).
  799. if (isLoose) {
  800. if (!arraySome(other, function(othValue) {
  801. return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
  802. })) {
  803. return false;
  804. }
  805. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
  806. return false;
  807. }
  808. }
  809. return true;
  810. }
  811. /**
  812. * A specialized version of `baseIsEqualDeep` for comparing objects of
  813. * the same `toStringTag`.
  814. *
  815. * **Note:** This function only supports comparing values with tags of
  816. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  817. *
  818. * @private
  819. * @param {Object} value The object to compare.
  820. * @param {Object} other The other object to compare.
  821. * @param {string} tag The `toStringTag` of the objects to compare.
  822. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  823. */
  824. function equalByTag(object, other, tag) {
  825. switch (tag) {
  826. case boolTag:
  827. case dateTag:
  828. // Coerce dates and booleans to numbers, dates to milliseconds and booleans
  829. // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
  830. return +object == +other;
  831. case errorTag:
  832. return object.name == other.name && object.message == other.message;
  833. case numberTag:
  834. // Treat `NaN` vs. `NaN` as equal.
  835. return (object != +object)
  836. ? other != +other
  837. : object == +other;
  838. case regexpTag:
  839. case stringTag:
  840. // Coerce regexes to strings and treat strings primitives and string
  841. // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
  842. return object == (other + '');
  843. }
  844. return false;
  845. }
  846. /**
  847. * A specialized version of `baseIsEqualDeep` for objects with support for
  848. * partial deep comparisons.
  849. *
  850. * @private
  851. * @param {Object} object The object to compare.
  852. * @param {Object} other The other object to compare.
  853. * @param {Function} equalFunc The function to determine equivalents of values.
  854. * @param {Function} [customizer] The function to customize comparing values.
  855. * @param {boolean} [isLoose] Specify performing partial comparisons.
  856. * @param {Array} [stackA] Tracks traversed `value` objects.
  857. * @param {Array} [stackB] Tracks traversed `other` objects.
  858. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  859. */
  860. function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
  861. var objProps = keys(object),
  862. objLength = objProps.length,
  863. othProps = keys(other),
  864. othLength = othProps.length;
  865. if (objLength != othLength && !isLoose) {
  866. return false;
  867. }
  868. var index = objLength;
  869. while (index--) {
  870. var key = objProps[index];
  871. if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
  872. return false;
  873. }
  874. }
  875. var skipCtor = isLoose;
  876. while (++index < objLength) {
  877. key = objProps[index];
  878. var objValue = object[key],
  879. othValue = other[key],
  880. result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
  881. // Recursively compare objects (susceptible to call stack limits).
  882. if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
  883. return false;
  884. }
  885. skipCtor || (skipCtor = key == 'constructor');
  886. }
  887. if (!skipCtor) {
  888. var objCtor = object.constructor,
  889. othCtor = other.constructor;
  890. // Non `Object` object instances with different constructors are not equal.
  891. if (objCtor != othCtor &&
  892. ('constructor' in object && 'constructor' in other) &&
  893. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  894. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  895. return false;
  896. }
  897. }
  898. return true;
  899. }
  900. /**
  901. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  902. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  903. *
  904. * @static
  905. * @memberOf _
  906. * @category Lang
  907. * @param {*} value The value to check.
  908. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  909. * @example
  910. *
  911. * _.isObject({});
  912. * // => true
  913. *
  914. * _.isObject([1, 2, 3]);
  915. * // => true
  916. *
  917. * _.isObject(1);
  918. * // => false
  919. */
  920. function isObject(value) {
  921. // Avoid a V8 JIT bug in Chrome 19-20.
  922. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  923. var type = typeof value;
  924. return !!value && (type == 'object' || type == 'function');
  925. }
  926. module.exports = baseIsEqual;
  927. /***/ },
  928. /* 6 */
  929. /***/ function(module, exports, __webpack_require__) {
  930. /**
  931. * lodash 3.0.3 (Custom Build) <https://lodash.com/>
  932. * Build: `lodash modern modularize exports="npm" -o ./`
  933. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  934. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  935. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  936. * Available under MIT license <https://lodash.com/license>
  937. */
  938. /** `Object#toString` result references. */
  939. var arrayTag = '[object Array]',
  940. funcTag = '[object Function]';
  941. /**
  942. * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
  943. * In addition to special characters the forward slash is escaped to allow for
  944. * easier `eval` use and `Function` compilation.
  945. */
  946. var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
  947. reHasRegExpChars = RegExp(reRegExpChars.source);
  948. /** Used to detect host constructors (Safari > 5). */
  949. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  950. /**
  951. * Converts `value` to a string if it's not one. An empty string is returned
  952. * for `null` or `undefined` values.
  953. *
  954. * @private
  955. * @param {*} value The value to process.
  956. * @returns {string} Returns the string.
  957. */
  958. function baseToString(value) {
  959. if (typeof value == 'string') {
  960. return value;
  961. }
  962. return value == null ? '' : (value + '');
  963. }
  964. /**
  965. * Checks if `value` is object-like.
  966. *
  967. * @private
  968. * @param {*} value The value to check.
  969. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  970. */
  971. function isObjectLike(value) {
  972. return !!value && typeof value == 'object';
  973. }
  974. /** Used for native method references. */
  975. var objectProto = Object.prototype;
  976. /** Used to resolve the decompiled source of functions. */
  977. var fnToString = Function.prototype.toString;
  978. /** Used to check objects for own properties. */
  979. var hasOwnProperty = objectProto.hasOwnProperty;
  980. /**
  981. * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
  982. * of values.
  983. */
  984. var objToString = objectProto.toString;
  985. /** Used to detect if a method is native. */
  986. var reIsNative = RegExp('^' +
  987. escapeRegExp(fnToString.call(hasOwnProperty))
  988. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  989. );
  990. /* Native method references for those with the same name as other `lodash` methods. */
  991. var nativeIsArray = getNative(Array, 'isArray');
  992. /**
  993. * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
  994. * of an array-like value.
  995. */
  996. var MAX_SAFE_INTEGER = 9007199254740991;
  997. /**
  998. * Gets the native function at `key` of `object`.
  999. *
  1000. * @private
  1001. * @param {Object} object The object to query.
  1002. * @param {string} key The key of the method to get.
  1003. * @returns {*} Returns the function if it's native, else `undefined`.
  1004. */
  1005. function getNative(object, key) {
  1006. var value = object == null ? undefined : object[key];
  1007. return isNative(value) ? value : undefined;
  1008. }
  1009. /**
  1010. * Checks if `value` is a valid array-like length.
  1011. *
  1012. * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
  1013. *
  1014. * @private
  1015. * @param {*} value The value to check.
  1016. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  1017. */
  1018. function isLength(value) {
  1019. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  1020. }
  1021. /**
  1022. * Checks if `value` is classified as an `Array` object.
  1023. *
  1024. * @static
  1025. * @memberOf _
  1026. * @category Lang
  1027. * @param {*} value The value to check.
  1028. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  1029. * @example
  1030. *
  1031. * _.isArray([1, 2, 3]);
  1032. * // => true
  1033. *
  1034. * _.isArray(function() { return arguments; }());
  1035. * // => false
  1036. */
  1037. var isArray = nativeIsArray || function(value) {
  1038. return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
  1039. };
  1040. /**
  1041. * Checks if `value` is a native function.
  1042. *
  1043. * @static
  1044. * @memberOf _
  1045. * @category Lang
  1046. * @param {*} value The value to check.
  1047. * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
  1048. * @example
  1049. *
  1050. * _.isNative(Array.prototype.push);
  1051. * // => true
  1052. *
  1053. * _.isNative(_);
  1054. * // => false
  1055. */
  1056. function isNative(value) {
  1057. if (value == null) {
  1058. return false;
  1059. }
  1060. if (objToString.call(value) == funcTag) {
  1061. return reIsNative.test(fnToString.call(value));
  1062. }
  1063. return isObjectLike(value) && reIsHostCtor.test(value);
  1064. }
  1065. /**
  1066. * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
  1067. * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
  1068. *
  1069. * @static
  1070. * @memberOf _
  1071. * @category String
  1072. * @param {string} [string=''] The string to escape.
  1073. * @returns {string} Returns the escaped string.
  1074. * @example
  1075. *
  1076. * _.escapeRegExp('[lodash](https://lodash.com/)');
  1077. * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
  1078. */
  1079. function escapeRegExp(string) {
  1080. string = baseToString(string);
  1081. return (string && reHasRegExpChars.test(string))
  1082. ? string.replace(reRegExpChars, '\\$&')
  1083. : string;
  1084. }
  1085. module.exports = isArray;
  1086. /***/ },
  1087. /* 7 */
  1088. /***/ function(module, exports, __webpack_require__) {
  1089. /**
  1090. * lodash 3.0.2 (Custom Build) <https://lodash.com/>
  1091. * Build: `lodash modern modularize exports="npm" -o ./`
  1092. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1093. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1094. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1095. * Available under MIT license <https://lodash.com/license>
  1096. */
  1097. /** `Object#toString` result references. */
  1098. var argsTag = '[object Arguments]',
  1099. arrayTag = '[object Array]',
  1100. boolTag = '[object Boolean]',
  1101. dateTag = '[object Date]',
  1102. errorTag = '[object Error]',
  1103. funcTag = '[object Function]',
  1104. mapTag = '[object Map]',
  1105. numberTag = '[object Number]',
  1106. objectTag = '[object Object]',
  1107. regexpTag = '[object RegExp]',
  1108. setTag = '[object Set]',
  1109. stringTag = '[object String]',
  1110. weakMapTag = '[object WeakMap]';
  1111. var arrayBufferTag = '[object ArrayBuffer]',
  1112. float32Tag = '[object Float32Array]',
  1113. float64Tag = '[object Float64Array]',
  1114. int8Tag = '[object Int8Array]',
  1115. int16Tag = '[object Int16Array]',
  1116. int32Tag = '[object Int32Array]',
  1117. uint8Tag = '[object Uint8Array]',
  1118. uint8ClampedTag = '[object Uint8ClampedArray]',
  1119. uint16Tag = '[object Uint16Array]',
  1120. uint32Tag = '[object Uint32Array]';
  1121. /** Used to identify `toStringTag` values of typed arrays. */
  1122. var typedArrayTags = {};
  1123. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  1124. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  1125. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  1126. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  1127. typedArrayTags[uint32Tag] = true;
  1128. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  1129. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  1130. typedArrayTags[dateTag] = typedArrayTags[errorTag] =
  1131. typedArrayTags[funcTag] = typedArrayTags[mapTag] =
  1132. typedArrayTags[numberTag] = typedArrayTags[objectTag] =
  1133. typedArrayTags[regexpTag] = typedArrayTags[setTag] =
  1134. typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  1135. /**
  1136. * Checks if `value` is object-like.
  1137. *
  1138. * @private
  1139. * @param {*} value The value to check.
  1140. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  1141. */
  1142. function isObjectLike(value) {
  1143. return !!value && typeof value == 'object';
  1144. }
  1145. /** Used for native method references. */
  1146. var objectProto = Object.prototype;
  1147. /**
  1148. * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
  1149. * of values.
  1150. */
  1151. var objToString = objectProto.toString;
  1152. /**
  1153. * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
  1154. * of an array-like value.
  1155. */
  1156. var MAX_SAFE_INTEGER = 9007199254740991;
  1157. /**
  1158. * Checks if `value` is a valid array-like length.
  1159. *
  1160. * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
  1161. *
  1162. * @private
  1163. * @param {*} value The value to check.
  1164. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  1165. */
  1166. function isLength(value) {
  1167. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  1168. }
  1169. /**
  1170. * Checks if `value` is classified as a typed array.
  1171. *
  1172. * @static
  1173. * @memberOf _
  1174. * @category Lang
  1175. * @param {*} value The value to check.
  1176. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  1177. * @example
  1178. *
  1179. * _.isTypedArray(new Uint8Array);
  1180. * // => true
  1181. *
  1182. * _.isTypedArray([]);
  1183. * // => false
  1184. */
  1185. function isTypedArray(value) {
  1186. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
  1187. }
  1188. module.exports = isTypedArray;
  1189. /***/ },
  1190. /* 8 */
  1191. /***/ function(module, exports, __webpack_require__) {
  1192. /**
  1193. * lodash 3.1.1 (Custom Build) <https://lodash.com/>
  1194. * Build: `lodash modern modularize exports="npm" -o ./`
  1195. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1196. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1197. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1198. * Available under MIT license <https://lodash.com/license>
  1199. */
  1200. var getNative = __webpack_require__(9),
  1201. isArguments = __webpack_require__(10),
  1202. isArray = __webpack_require__(6);
  1203. /** Used to detect unsigned integer values. */
  1204. var reIsUint = /^\d+$/;
  1205. /** Used for native method references. */
  1206. var objectProto = Object.prototype;
  1207. /** Used to check objects for own properties. */
  1208. var hasOwnProperty = objectProto.hasOwnProperty;
  1209. /* Native method references for those with the same name as other `lodash` methods. */
  1210. var nativeKeys = getNative(Object, 'keys');
  1211. /**
  1212. * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
  1213. * of an array-like value.
  1214. */
  1215. var MAX_SAFE_INTEGER = 9007199254740991;
  1216. /**
  1217. * The base implementation of `_.property` without support for deep paths.
  1218. *
  1219. * @private
  1220. * @param {string} key The key of the property to get.
  1221. * @returns {Function} Returns the new function.
  1222. */
  1223. function baseProperty(key) {
  1224. return function(object) {
  1225. return object == null ? undefined : object[key];
  1226. };
  1227. }
  1228. /**
  1229. * Gets the "length" property value of `object`.
  1230. *
  1231. * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
  1232. * that affects Safari on at least iOS 8.1-8.3 ARM64.
  1233. *
  1234. * @private
  1235. * @param {Object} object The object to query.
  1236. * @returns {*} Returns the "length" value.
  1237. */
  1238. var getLength = baseProperty('length');
  1239. /**
  1240. * Checks if `value` is array-like.
  1241. *
  1242. * @private
  1243. * @param {*} value The value to check.
  1244. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  1245. */
  1246. function isArrayLike(value) {
  1247. return value != null && isLength(getLength(value));
  1248. }
  1249. /**
  1250. * Checks if `value` is a valid array-like index.
  1251. *
  1252. * @private
  1253. * @param {*} value The value to check.
  1254. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  1255. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  1256. */
  1257. function isIndex(value, length) {
  1258. value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
  1259. length = length == null ? MAX_SAFE_INTEGER : length;
  1260. return value > -1 && value % 1 == 0 && value < length;
  1261. }
  1262. /**
  1263. * Checks if `value` is a valid array-like length.
  1264. *
  1265. * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
  1266. *
  1267. * @private
  1268. * @param {*} value The value to check.
  1269. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  1270. */
  1271. function isLength(value) {
  1272. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  1273. }
  1274. /**
  1275. * A fallback implementation of `Object.keys` which creates an array of the
  1276. * own enumerable property names of `object`.
  1277. *
  1278. * @private
  1279. * @param {Object} object The object to query.
  1280. * @returns {Array} Returns the array of property names.
  1281. */
  1282. function shimKeys(object) {
  1283. var props = keysIn(object),
  1284. propsLength = props.length,
  1285. length = propsLength && object.length;
  1286. var allowIndexes = !!length && isLength(length) &&
  1287. (isArray(object) || isArguments(object));
  1288. var index = -1,
  1289. result = [];
  1290. while (++index < propsLength) {
  1291. var key = props[index];
  1292. if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
  1293. result.push(key);
  1294. }
  1295. }
  1296. return result;
  1297. }
  1298. /**
  1299. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  1300. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  1301. *
  1302. * @static
  1303. * @memberOf _
  1304. * @category Lang
  1305. * @param {*} value The value to check.
  1306. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  1307. * @example
  1308. *
  1309. * _.isObject({});
  1310. * // => true
  1311. *
  1312. * _.isObject([1, 2, 3]);
  1313. * // => true
  1314. *
  1315. * _.isObject(1);
  1316. * // => false
  1317. */
  1318. function isObject(value) {
  1319. // Avoid a V8 JIT bug in Chrome 19-20.
  1320. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  1321. var type = typeof value;
  1322. return !!value && (type == 'object' || type == 'function');
  1323. }
  1324. /**
  1325. * Creates an array of the own enumerable property names of `object`.
  1326. *
  1327. * **Note:** Non-object values are coerced to objects. See the
  1328. * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys)
  1329. * for more details.
  1330. *
  1331. * @static
  1332. * @memberOf _
  1333. * @category Object
  1334. * @param {Object} object The object to query.
  1335. * @returns {Array} Returns the array of property names.
  1336. * @example
  1337. *
  1338. * function Foo() {
  1339. * this.a = 1;
  1340. * this.b = 2;
  1341. * }
  1342. *
  1343. * Foo.prototype.c = 3;
  1344. *
  1345. * _.keys(new Foo);
  1346. * // => ['a', 'b'] (iteration order is not guaranteed)
  1347. *
  1348. * _.keys('hi');
  1349. * // => ['0', '1']
  1350. */
  1351. var keys = !nativeKeys ? shimKeys : function(object) {
  1352. var Ctor = object == null ? null : object.constructor;
  1353. if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
  1354. (typeof object != 'function' && isArrayLike(object))) {
  1355. return shimKeys(object);
  1356. }
  1357. return isObject(object) ? nativeKeys(object) : [];
  1358. };
  1359. /**
  1360. * Creates an array of the own and inherited enumerable property names of `object`.
  1361. *
  1362. * **Note:** Non-object values are coerced to objects.
  1363. *
  1364. * @static
  1365. * @memberOf _
  1366. * @category Object
  1367. * @param {Object} object The object to query.
  1368. * @returns {Array} Returns the array of property names.
  1369. * @example
  1370. *
  1371. * function Foo() {
  1372. * this.a = 1;
  1373. * this.b = 2;
  1374. * }
  1375. *
  1376. * Foo.prototype.c = 3;
  1377. *
  1378. * _.keysIn(new Foo);
  1379. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  1380. */
  1381. function keysIn(object) {
  1382. if (object == null) {
  1383. return [];
  1384. }
  1385. if (!isObject(object)) {
  1386. object = Object(object);
  1387. }
  1388. var length = object.length;
  1389. length = (length && isLength(length) &&
  1390. (isArray(object) || isArguments(object)) && length) || 0;
  1391. var Ctor = object.constructor,
  1392. index = -1,
  1393. isProto = typeof Ctor == 'function' && Ctor.prototype === object,
  1394. result = Array(length),
  1395. skipIndexes = length > 0;
  1396. while (++index < length) {
  1397. result[index] = (index + '');
  1398. }
  1399. for (var key in object) {
  1400. if (!(skipIndexes && isIndex(key, length)) &&
  1401. !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  1402. result.push(key);
  1403. }
  1404. }
  1405. return result;
  1406. }
  1407. module.exports = keys;
  1408. /***/ },
  1409. /* 9 */
  1410. /***/ function(module, exports, __webpack_require__) {
  1411. /**
  1412. * lodash 3.9.0 (Custom Build) <https://lodash.com/>
  1413. * Build: `lodash modern modularize exports="npm" -o ./`
  1414. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1415. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1416. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1417. * Available under MIT license <https://lodash.com/license>
  1418. */
  1419. /** `Object#toString` result references. */
  1420. var funcTag = '[object Function]';
  1421. /**
  1422. * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
  1423. * In addition to special characters the forward slash is escaped to allow for
  1424. * easier `eval` use and `Function` compilation.
  1425. */
  1426. var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
  1427. reHasRegExpChars = RegExp(reRegExpChars.source);
  1428. /** Used to detect host constructors (Safari > 5). */
  1429. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  1430. /**
  1431. * Converts `value` to a string if it's not one. An empty string is returned
  1432. * for `null` or `undefined` values.
  1433. *
  1434. * @private
  1435. * @param {*} value The value to process.
  1436. * @returns {string} Returns the string.
  1437. */
  1438. function baseToString(value) {
  1439. if (typeof value == 'string') {
  1440. return value;
  1441. }
  1442. return value == null ? '' : (value + '');
  1443. }
  1444. /**
  1445. * Checks if `value` is object-like.
  1446. *
  1447. * @private
  1448. * @param {*} value The value to check.
  1449. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  1450. */
  1451. function isObjectLike(value) {
  1452. return !!value && typeof value == 'object';
  1453. }
  1454. /** Used for native method references. */
  1455. var objectProto = Object.prototype;
  1456. /** Used to resolve the decompiled source of functions. */
  1457. var fnToString = Function.prototype.toString;
  1458. /** Used to check objects for own properties. */
  1459. var hasOwnProperty = objectProto.hasOwnProperty;