PageRenderTime 57ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/files/videojs/5.0.0-17/video.js

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