Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

underscore.js 66KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  3. typeof define === 'function' && define.amd ? define('underscore', factory) :
  4. (global = global || self, (function () {
  5. var current = global._;
  6. var exports = global._ = factory();
  7. exports.noConflict = function () { global._ = current; return exports; };
  8. }()));
  9. }(this, (function () {
  10. // Underscore.js 1.12.0
  11. // https://underscorejs.org
  12. // (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  13. // Underscore may be freely distributed under the MIT license.
  14. // Current version.
  15. var VERSION = '1.12.0';
  16. // Establish the root object, `window` (`self`) in the browser, `global`
  17. // on the server, or `this` in some virtual machines. We use `self`
  18. // instead of `window` for `WebWorker` support.
  19. var root = typeof self == 'object' && self.self === self && self ||
  20. typeof global == 'object' && global.global === global && global ||
  21. Function('return this')() ||
  22. {};
  23. // Save bytes in the minified (but not gzipped) version:
  24. var ArrayProto = Array.prototype, ObjProto = Object.prototype;
  25. var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
  26. // Create quick reference variables for speed access to core prototypes.
  27. var push = ArrayProto.push,
  28. slice = ArrayProto.slice,
  29. toString = ObjProto.toString,
  30. hasOwnProperty = ObjProto.hasOwnProperty;
  31. // Modern feature detection.
  32. var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
  33. supportsDataView = typeof DataView !== 'undefined';
  34. // All **ECMAScript 5+** native function implementations that we hope to use
  35. // are declared here.
  36. var nativeIsArray = Array.isArray,
  37. nativeKeys = Object.keys,
  38. nativeCreate = Object.create,
  39. nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
  40. // Create references to these builtin functions because we override them.
  41. var _isNaN = isNaN,
  42. _isFinite = isFinite;
  43. // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
  44. var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
  45. var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
  46. 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
  47. // The largest integer that can be represented exactly.
  48. var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
  49. // Some functions take a variable number of arguments, or a few expected
  50. // arguments at the beginning and then a variable number of values to operate
  51. // on. This helper accumulates all remaining arguments past the function’s
  52. // argument length (or an explicit `startIndex`), into an array that becomes
  53. // the last argument. Similar to ES6’s "rest parameter".
  54. function restArguments(func, startIndex) {
  55. startIndex = startIndex == null ? func.length - 1 : +startIndex;
  56. return function() {
  57. var length = Math.max(arguments.length - startIndex, 0),
  58. rest = Array(length),
  59. index = 0;
  60. for (; index < length; index++) {
  61. rest[index] = arguments[index + startIndex];
  62. }
  63. switch (startIndex) {
  64. case 0: return func.call(this, rest);
  65. case 1: return func.call(this, arguments[0], rest);
  66. case 2: return func.call(this, arguments[0], arguments[1], rest);
  67. }
  68. var args = Array(startIndex + 1);
  69. for (index = 0; index < startIndex; index++) {
  70. args[index] = arguments[index];
  71. }
  72. args[startIndex] = rest;
  73. return func.apply(this, args);
  74. };
  75. }
  76. // Is a given variable an object?
  77. function isObject(obj) {
  78. var type = typeof obj;
  79. return type === 'function' || type === 'object' && !!obj;
  80. }
  81. // Is a given value equal to null?
  82. function isNull(obj) {
  83. return obj === null;
  84. }
  85. // Is a given variable undefined?
  86. function isUndefined(obj) {
  87. return obj === void 0;
  88. }
  89. // Is a given value a boolean?
  90. function isBoolean(obj) {
  91. return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
  92. }
  93. // Is a given value a DOM element?
  94. function isElement(obj) {
  95. return !!(obj && obj.nodeType === 1);
  96. }
  97. // Internal function for creating a `toString`-based type tester.
  98. function tagTester(name) {
  99. var tag = '[object ' + name + ']';
  100. return function(obj) {
  101. return toString.call(obj) === tag;
  102. };
  103. }
  104. var isString = tagTester('String');
  105. var isNumber = tagTester('Number');
  106. var isDate = tagTester('Date');
  107. var isRegExp = tagTester('RegExp');
  108. var isError = tagTester('Error');
  109. var isSymbol = tagTester('Symbol');
  110. var isArrayBuffer = tagTester('ArrayBuffer');
  111. var isFunction = tagTester('Function');
  112. // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
  113. // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
  114. var nodelist = root.document && root.document.childNodes;
  115. if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
  116. isFunction = function(obj) {
  117. return typeof obj == 'function' || false;
  118. };
  119. }
  120. var isFunction$1 = isFunction;
  121. var hasObjectTag = tagTester('Object');
  122. // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.
  123. // In IE 11, the most common among them, this problem also applies to
  124. // `Map`, `WeakMap` and `Set`.
  125. var hasStringTagBug = (
  126. supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))
  127. ),
  128. isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));
  129. var isDataView = tagTester('DataView');
  130. // In IE 10 - Edge 13, we need a different heuristic
  131. // to determine whether an object is a `DataView`.
  132. function ie10IsDataView(obj) {
  133. return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);
  134. }
  135. var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView);
  136. // Is a given value an array?
  137. // Delegates to ECMA5's native `Array.isArray`.
  138. var isArray = nativeIsArray || tagTester('Array');
  139. // Internal function to check whether `key` is an own property name of `obj`.
  140. function has(obj, key) {
  141. return obj != null && hasOwnProperty.call(obj, key);
  142. }
  143. var isArguments = tagTester('Arguments');
  144. // Define a fallback version of the method in browsers (ahem, IE < 9), where
  145. // there isn't any inspectable "Arguments" type.
  146. (function() {
  147. if (!isArguments(arguments)) {
  148. isArguments = function(obj) {
  149. return has(obj, 'callee');
  150. };
  151. }
  152. }());
  153. var isArguments$1 = isArguments;
  154. // Is a given object a finite number?
  155. function isFinite$1(obj) {
  156. return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
  157. }
  158. // Is the given value `NaN`?
  159. function isNaN$1(obj) {
  160. return isNumber(obj) && _isNaN(obj);
  161. }
  162. // Predicate-generating function. Often useful outside of Underscore.
  163. function constant(value) {
  164. return function() {
  165. return value;
  166. };
  167. }
  168. // Common internal logic for `isArrayLike` and `isBufferLike`.
  169. function createSizePropertyCheck(getSizeProperty) {
  170. return function(collection) {
  171. var sizeProperty = getSizeProperty(collection);
  172. return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
  173. }
  174. }
  175. // Internal helper to generate a function to obtain property `key` from `obj`.
  176. function shallowProperty(key) {
  177. return function(obj) {
  178. return obj == null ? void 0 : obj[key];
  179. };
  180. }
  181. // Internal helper to obtain the `byteLength` property of an object.
  182. var getByteLength = shallowProperty('byteLength');
  183. // Internal helper to determine whether we should spend extensive checks against
  184. // `ArrayBuffer` et al.
  185. var isBufferLike = createSizePropertyCheck(getByteLength);
  186. // Is a given value a typed array?
  187. var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
  188. function isTypedArray(obj) {
  189. // `ArrayBuffer.isView` is the most future-proof, so use it when available.
  190. // Otherwise, fall back on the above regular expression.
  191. return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :
  192. isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
  193. }
  194. var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);
  195. // Internal helper to obtain the `length` property of an object.
  196. var getLength = shallowProperty('length');
  197. // Internal helper to create a simple lookup structure.
  198. // `collectNonEnumProps` used to depend on `_.contains`, but this led to
  199. // circular imports. `emulatedSet` is a one-off solution that only works for
  200. // arrays of strings.
  201. function emulatedSet(keys) {
  202. var hash = {};
  203. for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
  204. return {
  205. contains: function(key) { return hash[key]; },
  206. push: function(key) {
  207. hash[key] = true;
  208. return keys.push(key);
  209. }
  210. };
  211. }
  212. // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
  213. // be iterated by `for key in ...` and thus missed. Extends `keys` in place if
  214. // needed.
  215. function collectNonEnumProps(obj, keys) {
  216. keys = emulatedSet(keys);
  217. var nonEnumIdx = nonEnumerableProps.length;
  218. var constructor = obj.constructor;
  219. var proto = isFunction$1(constructor) && constructor.prototype || ObjProto;
  220. // Constructor is a special case.
  221. var prop = 'constructor';
  222. if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);
  223. while (nonEnumIdx--) {
  224. prop = nonEnumerableProps[nonEnumIdx];
  225. if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
  226. keys.push(prop);
  227. }
  228. }
  229. }
  230. // Retrieve the names of an object's own properties.
  231. // Delegates to **ECMAScript 5**'s native `Object.keys`.
  232. function keys(obj) {
  233. if (!isObject(obj)) return [];
  234. if (nativeKeys) return nativeKeys(obj);
  235. var keys = [];
  236. for (var key in obj) if (has(obj, key)) keys.push(key);
  237. // Ahem, IE < 9.
  238. if (hasEnumBug) collectNonEnumProps(obj, keys);
  239. return keys;
  240. }
  241. // Is a given array, string, or object empty?
  242. // An "empty" object has no enumerable own-properties.
  243. function isEmpty(obj) {
  244. if (obj == null) return true;
  245. // Skip the more expensive `toString`-based type checks if `obj` has no
  246. // `.length`.
  247. var length = getLength(obj);
  248. if (typeof length == 'number' && (
  249. isArray(obj) || isString(obj) || isArguments$1(obj)
  250. )) return length === 0;
  251. return getLength(keys(obj)) === 0;
  252. }
  253. // Returns whether an object has a given set of `key:value` pairs.
  254. function isMatch(object, attrs) {
  255. var _keys = keys(attrs), length = _keys.length;
  256. if (object == null) return !length;
  257. var obj = Object(object);
  258. for (var i = 0; i < length; i++) {
  259. var key = _keys[i];
  260. if (attrs[key] !== obj[key] || !(key in obj)) return false;
  261. }
  262. return true;
  263. }
  264. // If Underscore is called as a function, it returns a wrapped object that can
  265. // be used OO-style. This wrapper holds altered versions of all functions added
  266. // through `_.mixin`. Wrapped objects may be chained.
  267. function _(obj) {
  268. if (obj instanceof _) return obj;
  269. if (!(this instanceof _)) return new _(obj);
  270. this._wrapped = obj;
  271. }
  272. _.VERSION = VERSION;
  273. // Extracts the result from a wrapped and chained object.
  274. _.prototype.value = function() {
  275. return this._wrapped;
  276. };
  277. // Provide unwrapping proxies for some methods used in engine operations
  278. // such as arithmetic and JSON stringification.
  279. _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
  280. _.prototype.toString = function() {
  281. return String(this._wrapped);
  282. };
  283. // Internal function to wrap or shallow-copy an ArrayBuffer,
  284. // typed array or DataView to a new view, reusing the buffer.
  285. function toBufferView(bufferSource) {
  286. return new Uint8Array(
  287. bufferSource.buffer || bufferSource,
  288. bufferSource.byteOffset || 0,
  289. getByteLength(bufferSource)
  290. );
  291. }
  292. // We use this string twice, so give it a name for minification.
  293. var tagDataView = '[object DataView]';
  294. // Internal recursive comparison function for `_.isEqual`.
  295. function eq(a, b, aStack, bStack) {
  296. // Identical objects are equal. `0 === -0`, but they aren't identical.
  297. // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
  298. if (a === b) return a !== 0 || 1 / a === 1 / b;
  299. // `null` or `undefined` only equal to itself (strict comparison).
  300. if (a == null || b == null) return false;
  301. // `NaN`s are equivalent, but non-reflexive.
  302. if (a !== a) return b !== b;
  303. // Exhaust primitive checks
  304. var type = typeof a;
  305. if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
  306. return deepEq(a, b, aStack, bStack);
  307. }
  308. // Internal recursive comparison function for `_.isEqual`.
  309. function deepEq(a, b, aStack, bStack) {
  310. // Unwrap any wrapped objects.
  311. if (a instanceof _) a = a._wrapped;
  312. if (b instanceof _) b = b._wrapped;
  313. // Compare `[[Class]]` names.
  314. var className = toString.call(a);
  315. if (className !== toString.call(b)) return false;
  316. // Work around a bug in IE 10 - Edge 13.
  317. if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
  318. if (!isDataView$1(b)) return false;
  319. className = tagDataView;
  320. }
  321. switch (className) {
  322. // These types are compared by value.
  323. case '[object RegExp]':
  324. // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
  325. case '[object String]':
  326. // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
  327. // equivalent to `new String("5")`.
  328. return '' + a === '' + b;
  329. case '[object Number]':
  330. // `NaN`s are equivalent, but non-reflexive.
  331. // Object(NaN) is equivalent to NaN.
  332. if (+a !== +a) return +b !== +b;
  333. // An `egal` comparison is performed for other numeric values.
  334. return +a === 0 ? 1 / +a === 1 / b : +a === +b;
  335. case '[object Date]':
  336. case '[object Boolean]':
  337. // Coerce dates and booleans to numeric primitive values. Dates are compared by their
  338. // millisecond representations. Note that invalid dates with millisecond representations
  339. // of `NaN` are not equivalent.
  340. return +a === +b;
  341. case '[object Symbol]':
  342. return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
  343. case '[object ArrayBuffer]':
  344. case tagDataView:
  345. // Coerce to typed array so we can fall through.
  346. return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
  347. }
  348. var areArrays = className === '[object Array]';
  349. if (!areArrays && isTypedArray$1(a)) {
  350. var byteLength = getByteLength(a);
  351. if (byteLength !== getByteLength(b)) return false;
  352. if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
  353. areArrays = true;
  354. }
  355. if (!areArrays) {
  356. if (typeof a != 'object' || typeof b != 'object') return false;
  357. // Objects with different constructors are not equivalent, but `Object`s or `Array`s
  358. // from different frames are.
  359. var aCtor = a.constructor, bCtor = b.constructor;
  360. if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
  361. isFunction$1(bCtor) && bCtor instanceof bCtor)
  362. && ('constructor' in a && 'constructor' in b)) {
  363. return false;
  364. }
  365. }
  366. // Assume equality for cyclic structures. The algorithm for detecting cyclic
  367. // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
  368. // Initializing stack of traversed objects.
  369. // It's done here since we only need them for objects and arrays comparison.
  370. aStack = aStack || [];
  371. bStack = bStack || [];
  372. var length = aStack.length;
  373. while (length--) {
  374. // Linear search. Performance is inversely proportional to the number of
  375. // unique nested structures.
  376. if (aStack[length] === a) return bStack[length] === b;
  377. }
  378. // Add the first object to the stack of traversed objects.
  379. aStack.push(a);
  380. bStack.push(b);
  381. // Recursively compare objects and arrays.
  382. if (areArrays) {
  383. // Compare array lengths to determine if a deep comparison is necessary.
  384. length = a.length;
  385. if (length !== b.length) return false;
  386. // Deep compare the contents, ignoring non-numeric properties.
  387. while (length--) {
  388. if (!eq(a[length], b[length], aStack, bStack)) return false;
  389. }
  390. } else {
  391. // Deep compare objects.
  392. var _keys = keys(a), key;
  393. length = _keys.length;
  394. // Ensure that both objects contain the same number of properties before comparing deep equality.
  395. if (keys(b).length !== length) return false;
  396. while (length--) {
  397. // Deep compare each member
  398. key = _keys[length];
  399. if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
  400. }
  401. }
  402. // Remove the first object from the stack of traversed objects.
  403. aStack.pop();
  404. bStack.pop();
  405. return true;
  406. }
  407. // Perform a deep comparison to check if two objects are equal.
  408. function isEqual(a, b) {
  409. return eq(a, b);
  410. }
  411. // Retrieve all the enumerable property names of an object.
  412. function allKeys(obj) {
  413. if (!isObject(obj)) return [];
  414. var keys = [];
  415. for (var key in obj) keys.push(key);
  416. // Ahem, IE < 9.
  417. if (hasEnumBug) collectNonEnumProps(obj, keys);
  418. return keys;
  419. }
  420. // Since the regular `Object.prototype.toString` type tests don't work for
  421. // some types in IE 11, we use a fingerprinting heuristic instead, based
  422. // on the methods. It's not great, but it's the best we got.
  423. // The fingerprint method lists are defined below.
  424. function ie11fingerprint(methods) {
  425. var length = getLength(methods);
  426. return function(obj) {
  427. if (obj == null) return false;
  428. // `Map`, `WeakMap` and `Set` have no enumerable keys.
  429. var keys = allKeys(obj);
  430. if (getLength(keys)) return false;
  431. for (var i = 0; i < length; i++) {
  432. if (!isFunction$1(obj[methods[i]])) return false;
  433. }
  434. // If we are testing against `WeakMap`, we need to ensure that
  435. // `obj` doesn't have a `forEach` method in order to distinguish
  436. // it from a regular `Map`.
  437. return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);
  438. };
  439. }
  440. // In the interest of compact minification, we write
  441. // each string in the fingerprints only once.
  442. var forEachName = 'forEach',
  443. hasName = 'has',
  444. commonInit = ['clear', 'delete'],
  445. mapTail = ['get', hasName, 'set'];
  446. // `Map`, `WeakMap` and `Set` each have slightly different
  447. // combinations of the above sublists.
  448. var mapMethods = commonInit.concat(forEachName, mapTail),
  449. weakMapMethods = commonInit.concat(mapTail),
  450. setMethods = ['add'].concat(commonInit, forEachName, hasName);
  451. var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');
  452. var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');
  453. var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');
  454. var isWeakSet = tagTester('WeakSet');
  455. // Retrieve the values of an object's properties.
  456. function values(obj) {
  457. var _keys = keys(obj);
  458. var length = _keys.length;
  459. var values = Array(length);
  460. for (var i = 0; i < length; i++) {
  461. values[i] = obj[_keys[i]];
  462. }
  463. return values;
  464. }
  465. // Convert an object into a list of `[key, value]` pairs.
  466. // The opposite of `_.object` with one argument.
  467. function pairs(obj) {
  468. var _keys = keys(obj);
  469. var length = _keys.length;
  470. var pairs = Array(length);
  471. for (var i = 0; i < length; i++) {
  472. pairs[i] = [_keys[i], obj[_keys[i]]];
  473. }
  474. return pairs;
  475. }
  476. // Invert the keys and values of an object. The values must be serializable.
  477. function invert(obj) {
  478. var result = {};
  479. var _keys = keys(obj);
  480. for (var i = 0, length = _keys.length; i < length; i++) {
  481. result[obj[_keys[i]]] = _keys[i];
  482. }
  483. return result;
  484. }
  485. // Return a sorted list of the function names available on the object.
  486. function functions(obj) {
  487. var names = [];
  488. for (var key in obj) {
  489. if (isFunction$1(obj[key])) names.push(key);
  490. }
  491. return names.sort();
  492. }
  493. // An internal function for creating assigner functions.
  494. function createAssigner(keysFunc, defaults) {
  495. return function(obj) {
  496. var length = arguments.length;
  497. if (defaults) obj = Object(obj);
  498. if (length < 2 || obj == null) return obj;
  499. for (var index = 1; index < length; index++) {
  500. var source = arguments[index],
  501. keys = keysFunc(source),
  502. l = keys.length;
  503. for (var i = 0; i < l; i++) {
  504. var key = keys[i];
  505. if (!defaults || obj[key] === void 0) obj[key] = source[key];
  506. }
  507. }
  508. return obj;
  509. };
  510. }
  511. // Extend a given object with all the properties in passed-in object(s).
  512. var extend = createAssigner(allKeys);
  513. // Assigns a given object with all the own properties in the passed-in
  514. // object(s).
  515. // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
  516. var extendOwn = createAssigner(keys);
  517. // Fill in a given object with default properties.
  518. var defaults = createAssigner(allKeys, true);
  519. // Create a naked function reference for surrogate-prototype-swapping.
  520. function ctor() {
  521. return function(){};
  522. }
  523. // An internal function for creating a new object that inherits from another.
  524. function baseCreate(prototype) {
  525. if (!isObject(prototype)) return {};
  526. if (nativeCreate) return nativeCreate(prototype);
  527. var Ctor = ctor();
  528. Ctor.prototype = prototype;
  529. var result = new Ctor;
  530. Ctor.prototype = null;
  531. return result;
  532. }
  533. // Creates an object that inherits from the given prototype object.
  534. // If additional properties are provided then they will be added to the
  535. // created object.
  536. function create(prototype, props) {
  537. var result = baseCreate(prototype);
  538. if (props) extendOwn(result, props);
  539. return result;
  540. }
  541. // Create a (shallow-cloned) duplicate of an object.
  542. function clone(obj) {
  543. if (!isObject(obj)) return obj;
  544. return isArray(obj) ? obj.slice() : extend({}, obj);
  545. }
  546. // Invokes `interceptor` with the `obj` and then returns `obj`.
  547. // The primary purpose of this method is to "tap into" a method chain, in
  548. // order to perform operations on intermediate results within the chain.
  549. function tap(obj, interceptor) {
  550. interceptor(obj);
  551. return obj;
  552. }
  553. // Normalize a (deep) property `path` to array.
  554. // Like `_.iteratee`, this function can be customized.
  555. function toPath(path) {
  556. return isArray(path) ? path : [path];
  557. }
  558. _.toPath = toPath;
  559. // Internal wrapper for `_.toPath` to enable minification.
  560. // Similar to `cb` for `_.iteratee`.
  561. function toPath$1(path) {
  562. return _.toPath(path);
  563. }
  564. // Internal function to obtain a nested property in `obj` along `path`.
  565. function deepGet(obj, path) {
  566. var length = path.length;
  567. for (var i = 0; i < length; i++) {
  568. if (obj == null) return void 0;
  569. obj = obj[path[i]];
  570. }
  571. return length ? obj : void 0;
  572. }
  573. // Get the value of the (deep) property on `path` from `object`.
  574. // If any property in `path` does not exist or if the value is
  575. // `undefined`, return `defaultValue` instead.
  576. // The `path` is normalized through `_.toPath`.
  577. function get(object, path, defaultValue) {
  578. var value = deepGet(object, toPath$1(path));
  579. return isUndefined(value) ? defaultValue : value;
  580. }
  581. // Shortcut function for checking if an object has a given property directly on
  582. // itself (in other words, not on a prototype). Unlike the internal `has`
  583. // function, this public version can also traverse nested properties.
  584. function has$1(obj, path) {
  585. path = toPath$1(path);
  586. var length = path.length;
  587. for (var i = 0; i < length; i++) {
  588. var key = path[i];
  589. if (!has(obj, key)) return false;
  590. obj = obj[key];
  591. }
  592. return !!length;
  593. }
  594. // Keep the identity function around for default iteratees.
  595. function identity(value) {
  596. return value;
  597. }
  598. // Returns a predicate for checking whether an object has a given set of
  599. // `key:value` pairs.
  600. function matcher(attrs) {
  601. attrs = extendOwn({}, attrs);
  602. return function(obj) {
  603. return isMatch(obj, attrs);
  604. };
  605. }
  606. // Creates a function that, when passed an object, will traverse that object’s
  607. // properties down the given `path`, specified as an array of keys or indices.
  608. function property(path) {
  609. path = toPath$1(path);
  610. return function(obj) {
  611. return deepGet(obj, path);
  612. };
  613. }
  614. // Internal function that returns an efficient (for current engines) version
  615. // of the passed-in callback, to be repeatedly applied in other Underscore
  616. // functions.
  617. function optimizeCb(func, context, argCount) {
  618. if (context === void 0) return func;
  619. switch (argCount == null ? 3 : argCount) {
  620. case 1: return function(value) {
  621. return func.call(context, value);
  622. };
  623. // The 2-argument case is omitted because we’re not using it.
  624. case 3: return function(value, index, collection) {
  625. return func.call(context, value, index, collection);
  626. };
  627. case 4: return function(accumulator, value, index, collection) {
  628. return func.call(context, accumulator, value, index, collection);
  629. };
  630. }
  631. return function() {
  632. return func.apply(context, arguments);
  633. };
  634. }
  635. // An internal function to generate callbacks that can be applied to each
  636. // element in a collection, returning the desired result — either `_.identity`,
  637. // an arbitrary callback, a property matcher, or a property accessor.
  638. function baseIteratee(value, context, argCount) {
  639. if (value == null) return identity;
  640. if (isFunction$1(value)) return optimizeCb(value, context, argCount);
  641. if (isObject(value) && !isArray(value)) return matcher(value);
  642. return property(value);
  643. }
  644. // External wrapper for our callback generator. Users may customize
  645. // `_.iteratee` if they want additional predicate/iteratee shorthand styles.
  646. // This abstraction hides the internal-only `argCount` argument.
  647. function iteratee(value, context) {
  648. return baseIteratee(value, context, Infinity);
  649. }
  650. _.iteratee = iteratee;
  651. // The function we call internally to generate a callback. It invokes
  652. // `_.iteratee` if overridden, otherwise `baseIteratee`.
  653. function cb(value, context, argCount) {
  654. if (_.iteratee !== iteratee) return _.iteratee(value, context);
  655. return baseIteratee(value, context, argCount);
  656. }
  657. // Returns the results of applying the `iteratee` to each element of `obj`.
  658. // In contrast to `_.map` it returns an object.
  659. function mapObject(obj, iteratee, context) {
  660. iteratee = cb(iteratee, context);
  661. var _keys = keys(obj),
  662. length = _keys.length,
  663. results = {};
  664. for (var index = 0; index < length; index++) {
  665. var currentKey = _keys[index];
  666. results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
  667. }
  668. return results;
  669. }
  670. // Predicate-generating function. Often useful outside of Underscore.
  671. function noop(){}
  672. // Generates a function for a given object that returns a given property.
  673. function propertyOf(obj) {
  674. if (obj == null) return noop;
  675. return function(path) {
  676. return get(obj, path);
  677. };
  678. }
  679. // Run a function **n** times.
  680. function times(n, iteratee, context) {
  681. var accum = Array(Math.max(0, n));
  682. iteratee = optimizeCb(iteratee, context, 1);
  683. for (var i = 0; i < n; i++) accum[i] = iteratee(i);
  684. return accum;
  685. }
  686. // Return a random integer between `min` and `max` (inclusive).
  687. function random(min, max) {
  688. if (max == null) {
  689. max = min;
  690. min = 0;
  691. }
  692. return min + Math.floor(Math.random() * (max - min + 1));
  693. }
  694. // A (possibly faster) way to get the current timestamp as an integer.
  695. var now = Date.now || function() {
  696. return new Date().getTime();
  697. };
  698. // Internal helper to generate functions for escaping and unescaping strings
  699. // to/from HTML interpolation.
  700. function createEscaper(map) {
  701. var escaper = function(match) {
  702. return map[match];
  703. };
  704. // Regexes for identifying a key that needs to be escaped.
  705. var source = '(?:' + keys(map).join('|') + ')';
  706. var testRegexp = RegExp(source);
  707. var replaceRegexp = RegExp(source, 'g');
  708. return function(string) {
  709. string = string == null ? '' : '' + string;
  710. return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
  711. };
  712. }
  713. // Internal list of HTML entities for escaping.
  714. var escapeMap = {
  715. '&': '&amp;',
  716. '<': '&lt;',
  717. '>': '&gt;',
  718. '"': '&quot;',
  719. "'": '&#x27;',
  720. '`': '&#x60;'
  721. };
  722. // Function for escaping strings to HTML interpolation.
  723. var _escape = createEscaper(escapeMap);
  724. // Internal list of HTML entities for unescaping.
  725. var unescapeMap = invert(escapeMap);
  726. // Function for unescaping strings from HTML interpolation.
  727. var _unescape = createEscaper(unescapeMap);
  728. // By default, Underscore uses ERB-style template delimiters. Change the
  729. // following template settings to use alternative delimiters.
  730. var templateSettings = _.templateSettings = {
  731. evaluate: /<%([\s\S]+?)%>/g,
  732. interpolate: /<%=([\s\S]+?)%>/g,
  733. escape: /<%-([\s\S]+?)%>/g
  734. };
  735. // When customizing `_.templateSettings`, if you don't want to define an
  736. // interpolation, evaluation or escaping regex, we need one that is
  737. // guaranteed not to match.
  738. var noMatch = /(.)^/;
  739. // Certain characters need to be escaped so that they can be put into a
  740. // string literal.
  741. var escapes = {
  742. "'": "'",
  743. '\\': '\\',
  744. '\r': 'r',
  745. '\n': 'n',
  746. '\u2028': 'u2028',
  747. '\u2029': 'u2029'
  748. };
  749. var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
  750. function escapeChar(match) {
  751. return '\\' + escapes[match];
  752. }
  753. // JavaScript micro-templating, similar to John Resig's implementation.
  754. // Underscore templating handles arbitrary delimiters, preserves whitespace,
  755. // and correctly escapes quotes within interpolated code.
  756. // NB: `oldSettings` only exists for backwards compatibility.
  757. function template(text, settings, oldSettings) {
  758. if (!settings && oldSettings) settings = oldSettings;
  759. settings = defaults({}, settings, _.templateSettings);
  760. // Combine delimiters into one regular expression via alternation.
  761. var matcher = RegExp([
  762. (settings.escape || noMatch).source,
  763. (settings.interpolate || noMatch).source,
  764. (settings.evaluate || noMatch).source
  765. ].join('|') + '|$', 'g');
  766. // Compile the template source, escaping string literals appropriately.
  767. var index = 0;
  768. var source = "__p+='";
  769. text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
  770. source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
  771. index = offset + match.length;
  772. if (escape) {
  773. source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
  774. } else if (interpolate) {
  775. source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
  776. } else if (evaluate) {
  777. source += "';\n" + evaluate + "\n__p+='";
  778. }
  779. // Adobe VMs need the match returned to produce the correct offset.
  780. return match;
  781. });
  782. source += "';\n";
  783. // If a variable is not specified, place data values in local scope.
  784. if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
  785. source = "var __t,__p='',__j=Array.prototype.join," +
  786. "print=function(){__p+=__j.call(arguments,'');};\n" +
  787. source + 'return __p;\n';
  788. var render;
  789. try {
  790. render = new Function(settings.variable || 'obj', '_', source);
  791. } catch (e) {
  792. e.source = source;
  793. throw e;
  794. }
  795. var template = function(data) {
  796. return render.call(this, data, _);
  797. };
  798. // Provide the compiled source as a convenience for precompilation.
  799. var argument = settings.variable || 'obj';
  800. template.source = 'function(' + argument + '){\n' + source + '}';
  801. return template;
  802. }
  803. // Traverses the children of `obj` along `path`. If a child is a function, it
  804. // is invoked with its parent as context. Returns the value of the final
  805. // child, or `fallback` if any child is undefined.
  806. function result(obj, path, fallback) {
  807. path = toPath$1(path);
  808. var length = path.length;
  809. if (!length) {
  810. return isFunction$1(fallback) ? fallback.call(obj) : fallback;
  811. }
  812. for (var i = 0; i < length; i++) {
  813. var prop = obj == null ? void 0 : obj[path[i]];
  814. if (prop === void 0) {
  815. prop = fallback;
  816. i = length; // Ensure we don't continue iterating.
  817. }
  818. obj = isFunction$1(prop) ? prop.call(obj) : prop;
  819. }
  820. return obj;
  821. }
  822. // Generate a unique integer id (unique within the entire client session).
  823. // Useful for temporary DOM ids.
  824. var idCounter = 0;
  825. function uniqueId(prefix) {
  826. var id = ++idCounter + '';
  827. return prefix ? prefix + id : id;
  828. }
  829. // Start chaining a wrapped Underscore object.
  830. function chain(obj) {
  831. var instance = _(obj);
  832. instance._chain = true;
  833. return instance;
  834. }
  835. // Internal function to execute `sourceFunc` bound to `context` with optional
  836. // `args`. Determines whether to execute a function as a constructor or as a
  837. // normal function.
  838. function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
  839. if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
  840. var self = baseCreate(sourceFunc.prototype);
  841. var result = sourceFunc.apply(self, args);
  842. if (isObject(result)) return result;
  843. return self;
  844. }
  845. // Partially apply a function by creating a version that has had some of its
  846. // arguments pre-filled, without changing its dynamic `this` context. `_` acts
  847. // as a placeholder by default, allowing any combination of arguments to be
  848. // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
  849. var partial = restArguments(function(func, boundArgs) {
  850. var placeholder = partial.placeholder;
  851. var bound = function() {
  852. var position = 0, length = boundArgs.length;
  853. var args = Array(length);
  854. for (var i = 0; i < length; i++) {
  855. args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
  856. }
  857. while (position < arguments.length) args.push(arguments[position++]);
  858. return executeBound(func, bound, this, this, args);
  859. };
  860. return bound;
  861. });
  862. partial.placeholder = _;
  863. // Create a function bound to a given object (assigning `this`, and arguments,
  864. // optionally).
  865. var bind = restArguments(function(func, context, args) {
  866. if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
  867. var bound = restArguments(function(callArgs) {
  868. return executeBound(func, bound, context, this, args.concat(callArgs));
  869. });
  870. return bound;
  871. });
  872. // Internal helper for collection methods to determine whether a collection
  873. // should be iterated as an array or as an object.
  874. // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
  875. // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
  876. var isArrayLike = createSizePropertyCheck(getLength);
  877. // Internal implementation of a recursive `flatten` function.
  878. function flatten(input, depth, strict, output) {
  879. output = output || [];
  880. if (!depth && depth !== 0) {
  881. depth = Infinity;
  882. } else if (depth <= 0) {
  883. return output.concat(input);
  884. }
  885. var idx = output.length;
  886. for (var i = 0, length = getLength(input); i < length; i++) {
  887. var value = input[i];
  888. if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
  889. // Flatten current level of array or arguments object.
  890. if (depth > 1) {
  891. flatten(value, depth - 1, strict, output);
  892. idx = output.length;
  893. } else {
  894. var j = 0, len = value.length;
  895. while (j < len) output[idx++] = value[j++];
  896. }
  897. } else if (!strict) {
  898. output[idx++] = value;
  899. }
  900. }
  901. return output;
  902. }
  903. // Bind a number of an object's methods to that object. Remaining arguments
  904. // are the method names to be bound. Useful for ensuring that all callbacks
  905. // defined on an object belong to it.
  906. var bindAll = restArguments(function(obj, keys) {
  907. keys = flatten(keys, false, false);
  908. var index = keys.length;
  909. if (index < 1) throw new Error('bindAll must be passed function names');
  910. while (index--) {
  911. var key = keys[index];
  912. obj[key] = bind(obj[key], obj);
  913. }
  914. return obj;
  915. });
  916. // Memoize an expensive function by storing its results.
  917. function memoize(func, hasher) {
  918. var memoize = function(key) {
  919. var cache = memoize.cache;
  920. var address = '' + (hasher ? hasher.apply(this, arguments) : key);
  921. if (!has(cache, address)) cache[address] = func.apply(this, arguments);
  922. return cache[address];
  923. };
  924. memoize.cache = {};
  925. return memoize;
  926. }
  927. // Delays a function for the given number of milliseconds, and then calls
  928. // it with the arguments supplied.
  929. var delay = restArguments(function(func, wait, args) {
  930. return setTimeout(function() {
  931. return func.apply(null, args);
  932. }, wait);
  933. });
  934. // Defers a function, scheduling it to run after the current call stack has
  935. // cleared.
  936. var defer = partial(delay, _, 1);
  937. // Returns a function, that, when invoked, will only be triggered at most once
  938. // during a given window of time. Normally, the throttled function will run
  939. // as much as it can, without ever going more than once per `wait` duration;
  940. // but if you'd like to disable the execution on the leading edge, pass
  941. // `{leading: false}`. To disable execution on the trailing edge, ditto.
  942. function throttle(func, wait, options) {
  943. var timeout, context, args, result;
  944. var previous = 0;
  945. if (!options) options = {};
  946. var later = function() {
  947. previous = options.leading === false ? 0 : now();
  948. timeout = null;
  949. result = func.apply(context, args);
  950. if (!timeout) context = args = null;
  951. };
  952. var throttled = function() {
  953. var _now = now();
  954. if (!previous && options.leading === false) previous = _now;
  955. var remaining = wait - (_now - previous);
  956. context = this;
  957. args = arguments;
  958. if (remaining <= 0 || remaining > wait) {
  959. if (timeout) {
  960. clearTimeout(timeout);
  961. timeout = null;
  962. }
  963. previous = _now;
  964. result = func.apply(context, args);
  965. if (!timeout) context = args = null;
  966. } else if (!timeout && options.trailing !== false) {
  967. timeout = setTimeout(later, remaining);
  968. }
  969. return result;
  970. };
  971. throttled.cancel = function() {
  972. clearTimeout(timeout);
  973. previous = 0;
  974. timeout = context = args = null;
  975. };
  976. return throttled;
  977. }
  978. // When a sequence of calls of the returned function ends, the argument
  979. // function is triggered. The end of a sequence is defined by the `wait`
  980. // parameter. If `immediate` is passed, the argument function will be
  981. // triggered at the beginning of the sequence instead of at the end.
  982. function debounce(func, wait, immediate) {
  983. var timeout, result;
  984. var later = function(context, args) {
  985. timeout = null;
  986. if (args) result = func.apply(context, args);
  987. };
  988. var debounced = restArguments(function(args) {
  989. if (timeout) clearTimeout(timeout);
  990. if (immediate) {
  991. var callNow = !timeout;
  992. timeout = setTimeout(later, wait);
  993. if (callNow) result = func.apply(this, args);
  994. } else {
  995. timeout = delay(later, wait, this, args);
  996. }
  997. return result;
  998. });
  999. debounced.cancel = function() {
  1000. clearTimeout(timeout);
  1001. timeout = null;
  1002. };
  1003. return debounced;
  1004. }
  1005. // Returns the first function passed as an argument to the second,
  1006. // allowing you to adjust arguments, run code before and after, and
  1007. // conditionally execute the original function.
  1008. function wrap(func, wrapper) {
  1009. return partial(wrapper, func);
  1010. }
  1011. // Returns a negated version of the passed-in predicate.
  1012. function negate(predicate) {
  1013. return function() {
  1014. return !predicate.apply(this, arguments);
  1015. };
  1016. }
  1017. // Returns a function that is the composition of a list of functions, each
  1018. // consuming the return value of the function that follows.
  1019. function compose() {
  1020. var args = arguments;
  1021. var start = args.length - 1;
  1022. return function() {
  1023. var i = start;
  1024. var result = args[start].apply(this, arguments);
  1025. while (i--) result = args[i].call(this, result);
  1026. return result;
  1027. };
  1028. }
  1029. // Returns a function that will only be executed on and after the Nth call.
  1030. function after(times, func) {
  1031. return function() {
  1032. if (--times < 1) {
  1033. return func.apply(this, arguments);
  1034. }
  1035. };
  1036. }
  1037. // Returns a function that will only be executed up to (but not including) the
  1038. // Nth call.
  1039. function before(times, func) {
  1040. var memo;
  1041. return function() {
  1042. if (--times > 0) {
  1043. memo = func.apply(this, arguments);
  1044. }
  1045. if (times <= 1) func = null;
  1046. return memo;
  1047. };
  1048. }
  1049. // Returns a function that will be executed at most one time, no matter how
  1050. // often you call it. Useful for lazy initialization.
  1051. var once = partial(before, 2);
  1052. // Returns the first key on an object that passes a truth test.
  1053. function findKey(obj, predicate, context) {
  1054. predicate = cb(predicate, context);
  1055. var _keys = keys(obj), key;
  1056. for (var i = 0, length = _keys.length; i < length; i++) {
  1057. key = _keys[i];
  1058. if (predicate(obj[key], key, obj)) return key;
  1059. }
  1060. }
  1061. // Internal function to generate `_.findIndex` and `_.findLastIndex`.
  1062. function createPredicateIndexFinder(dir) {
  1063. return function(array, predicate, context) {
  1064. predicate = cb(predicate, context);
  1065. var length = getLength(array);
  1066. var index = dir > 0 ? 0 : length - 1;
  1067. for (; index >= 0 && index < length; index += dir) {
  1068. if (predicate(array[index], index, array)) return index;
  1069. }
  1070. return -1;
  1071. };
  1072. }
  1073. // Returns the first index on an array-like that passes a truth test.
  1074. var findIndex = createPredicateIndexFinder(1);
  1075. // Returns the last index on an array-like that passes a truth test.
  1076. var findLastIndex = createPredicateIndexFinder(-1);
  1077. // Use a comparator function to figure out the smallest index at which
  1078. // an object should be inserted so as to maintain order. Uses binary search.
  1079. function sortedIndex(array, obj, iteratee, context) {
  1080. iteratee = cb(iteratee, context, 1);
  1081. var value = iteratee(obj);
  1082. var low = 0, high = getLength(array);
  1083. while (low < high) {
  1084. var mid = Math.floor((low + high) / 2);
  1085. if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
  1086. }
  1087. return low;
  1088. }
  1089. // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
  1090. function createIndexFinder(dir, predicateFind, sortedIndex) {
  1091. return function(array, item, idx) {
  1092. var i = 0, length = getLength(array);
  1093. if (typeof idx == 'number') {
  1094. if (dir > 0) {
  1095. i = idx >= 0 ? idx : Math.max(idx + length, i);
  1096. } else {
  1097. length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
  1098. }
  1099. } else if (sortedIndex && idx && length) {
  1100. idx = sortedIndex(array, item);
  1101. return array[idx] === item ? idx : -1;
  1102. }
  1103. if (item !== item) {
  1104. idx = predicateFind(slice.call(array, i, length), isNaN$1);
  1105. return idx >= 0 ? idx + i : -1;
  1106. }
  1107. for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
  1108. if (array[idx] === item) return idx;
  1109. }
  1110. return -1;
  1111. };
  1112. }
  1113. // Return the position of the first occurrence of an item in an array,
  1114. // or -1 if the item is not included in the array.
  1115. // If the array is large and already in sort order, pass `true`
  1116. // for **isSorted** to use binary search.
  1117. var indexOf = createIndexFinder(1, findIndex, sortedIndex);
  1118. // Return the position of the last occurrence of an item in an array,
  1119. // or -1 if the item is not included in the array.
  1120. var lastIndexOf = createIndexFinder(-1, findLastIndex);
  1121. // Return the first value which passes a truth test.
  1122. function find(obj, predicate, context) {
  1123. var keyFinder = isArrayLike(obj) ? findIndex : findKey;
  1124. var key = keyFinder(obj, predicate, context);
  1125. if (key !== void 0 && key !== -1) return obj[key];
  1126. }
  1127. // Convenience version of a common use case of `_.find`: getting the first
  1128. // object containing specific `key:value` pairs.
  1129. function findWhere(obj, attrs) {
  1130. return find(obj, matcher(attrs));
  1131. }
  1132. // The cornerstone for collection functions, an `each`
  1133. // implementation, aka `forEach`.
  1134. // Handles raw objects in addition to array-likes. Treats all
  1135. // sparse array-likes as if they were dense.
  1136. function each(obj, iteratee, context) {
  1137. iteratee = optimizeCb(iteratee, context);
  1138. var i, length;
  1139. if (isArrayLike(obj)) {
  1140. for (i = 0, length = obj.length; i < length; i++) {
  1141. iteratee(obj[i], i, obj);
  1142. }
  1143. } else {
  1144. var _keys = keys(obj);
  1145. for (i = 0, length = _keys.length; i < length; i++) {
  1146. iteratee(obj[_keys[i]], _keys[i], obj);
  1147. }
  1148. }
  1149. return obj;
  1150. }
  1151. // Return the results of applying the iteratee to each element.
  1152. function map(obj, iteratee, context) {
  1153. iteratee = cb(iteratee, context);
  1154. var _keys = !isArrayLike(obj) && keys(obj),
  1155. length = (_keys || obj).length,
  1156. results = Array(length);
  1157. for (var index = 0; index < length; index++) {
  1158. var currentKey = _keys ? _keys[index] : index;
  1159. results[index] = iteratee(obj[currentKey], currentKey, obj);
  1160. }
  1161. return results;
  1162. }
  1163. // Internal helper to create a reducing function, iterating left or right.
  1164. function createReduce(dir) {
  1165. // Wrap code that reassigns argument variables in a separate function than
  1166. // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
  1167. var reducer = function(obj, iteratee, memo, initial) {
  1168. var _keys = !isArrayLike(obj) && keys(obj),
  1169. length = (_keys || obj).length,
  1170. index = dir > 0 ? 0 : length - 1;
  1171. if (!initial) {
  1172. memo = obj[_keys ? _keys[index] : index];
  1173. index += dir;
  1174. }
  1175. for (; index >= 0 && index < length; index += dir) {
  1176. var currentKey = _keys ? _keys[index] : index;
  1177. memo = iteratee(memo, obj[currentKey], currentKey, obj);
  1178. }
  1179. return memo;
  1180. };
  1181. return function(obj, iteratee, memo, context) {
  1182. var initial = arguments.length >= 3;
  1183. return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
  1184. };
  1185. }
  1186. // **Reduce** builds up a single result from a list of values, aka `inject`,
  1187. // or `foldl`.
  1188. var reduce = createReduce(1);
  1189. // The right-associative version of reduce, also known as `foldr`.
  1190. var reduceRight = createReduce(-1);
  1191. // Return all the elements that pass a truth test.
  1192. function filter(obj, predicate, context) {
  1193. var results = [];
  1194. predicate = cb(predicate, context);
  1195. each(obj, function(value, index, list) {
  1196. if (predicate(value, index, list)) results.push(value);
  1197. });
  1198. return results;
  1199. }
  1200. // Return all the elements for which a truth test fails.
  1201. function reject(obj, predicate, context) {
  1202. return filter(obj, negate(cb(predicate)), context);
  1203. }
  1204. // Determine whether all of the elements pass a truth test.
  1205. function every(obj, predicate, context) {
  1206. predicate = cb(predicate, context);
  1207. var _keys = !isArrayLike(obj) && keys(obj),
  1208. length = (_keys || obj).length;
  1209. for (var index = 0; index < length; index++) {
  1210. var currentKey = _keys ? _keys[index] : index;
  1211. if (!predicate(obj[currentKey], currentKey, obj)) return false;
  1212. }
  1213. return true;
  1214. }
  1215. // Determine if at least one element in the object passes a truth test.
  1216. function some(obj, predicate, context) {
  1217. predicate = cb(predicate, context);
  1218. var _keys = !isArrayLike(obj) && keys(obj),
  1219. length = (_keys || obj).length;
  1220. for (var index = 0; index < length; index++) {
  1221. var currentKey = _keys ? _keys[index] : index;
  1222. if (predicate(obj[currentKey], currentKey, obj)) return true;
  1223. }
  1224. return false;
  1225. }
  1226. // Determine if the array or object contains a given item (using `===`).
  1227. function contains(obj, item, fromIndex, guard) {
  1228. if (!isArrayLike(obj)) obj = values(obj);
  1229. if (typeof fromIndex != 'number' || guard) fromIndex = 0;
  1230. return indexOf(obj, item, fromIndex) >= 0;
  1231. }
  1232. // Invoke a method (with arguments) on every item in a collection.
  1233. var invoke = restArguments(function(obj, path, args) {
  1234. var contextPath, func;
  1235. if (isFunction$1(path)) {
  1236. func = path;
  1237. } else {
  1238. path = toPath$1(path);
  1239. contextPath = path.slice(0, -1);
  1240. path = path[path.length - 1];
  1241. }
  1242. return map(obj, function(context) {
  1243. var method = func;
  1244. if (!method) {
  1245. if (contextPath && contextPath.length) {
  1246. context = deepGet(context, contextPath);
  1247. }
  1248. if (context == null) return void 0;
  1249. method = context[path];
  1250. }
  1251. return method == null ? method : method.apply(context, args);
  1252. });
  1253. });
  1254. // Convenience version of a common use case of `_.map`: fetching a property.
  1255. function pluck(obj, key) {
  1256. return map(obj, property(key));
  1257. }
  1258. // Convenience version of a common use case of `_.filter`: selecting only
  1259. // objects containing specific `key:value` pairs.
  1260. function where(obj, attrs) {
  1261. return filter(obj, matcher(attrs));
  1262. }
  1263. // Return the maximum element (or element-based computation).
  1264. function max(obj, iteratee, context) {
  1265. var result = -Infinity, lastComputed = -Infinity,
  1266. value, computed;
  1267. if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
  1268. obj = isArrayLike(obj) ? obj : values(obj);
  1269. for (var i = 0, length = obj.length; i < length; i++) {
  1270. value = obj[i];
  1271. if (value != null && value > result) {
  1272. result = value;
  1273. }
  1274. }
  1275. } else {
  1276. iteratee = cb(iteratee, context);
  1277. each(obj, function(v, index, list) {
  1278. computed = iteratee(v, index, list);
  1279. if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
  1280. result = v;
  1281. lastComputed = computed;
  1282. }
  1283. });
  1284. }
  1285. return result;
  1286. }
  1287. // Return the minimum element (or element-based computation).
  1288. function min(obj, iteratee, context) {
  1289. var result = Infinity, lastComputed = Infinity,
  1290. value, computed;
  1291. if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
  1292. obj = isArrayLike(obj) ? obj : values(obj);
  1293. for (var i = 0, length = obj.length; i < length; i++) {
  1294. value = obj[i];
  1295. if (value != null && value < result) {
  1296. result = value;
  1297. }
  1298. }
  1299. } else {
  1300. iteratee = cb(iteratee, context);
  1301. each(obj, function(v, index, list) {
  1302. computed = iteratee(v, index, list);
  1303. if (computed < lastComputed || computed === Infinity && result === Infinity) {
  1304. result = v;
  1305. lastComputed = computed;
  1306. }
  1307. });
  1308. }
  1309. return result;
  1310. }
  1311. // Sample **n** random values from a collection using the modern version of the
  1312. // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
  1313. // If **n** is not specified, returns a single random element.
  1314. // The internal `guard` argument allows it to work with `_.map`.
  1315. function sample(obj, n, guard) {
  1316. if (n == null || guard) {
  1317. if (!isArrayLike(obj)) obj = values(obj);
  1318. return obj[random(obj.length - 1)];
  1319. }
  1320. var sample = isArrayLike(obj) ? clone(obj) : values(obj);
  1321. var length = getLength(sample);
  1322. n = Math.max(Math.min(n, length), 0);
  1323. var last = length - 1;
  1324. for (var index = 0; index < n; index++) {
  1325. var rand = random(index, last);
  1326. var temp = sample[index];
  1327. sample[index] = sample[rand];
  1328. sample[rand] = temp;
  1329. }
  1330. return sample.slice(0, n);
  1331. }
  1332. // Shuffle a collection.
  1333. function shuffle(obj) {
  1334. return sample(obj, Infinity);
  1335. }
  1336. // Sort the object's values by a criterion produced by an iteratee.
  1337. function sortBy(obj, iteratee, context) {
  1338. var index = 0;
  1339. iteratee = cb(iteratee, context);
  1340. return pluck(map(obj, function(value, key, list) {
  1341. return {
  1342. value: value,
  1343. index: index++,
  1344. criteria: iteratee(value, key, list)
  1345. };
  1346. }).sort(function(left, right) {
  1347. var a = left.criteria;
  1348. var b = right.criteria;
  1349. if (a !== b) {
  1350. if (a > b || a === void 0) return 1;
  1351. if (a < b || b === void 0) return -1;
  1352. }
  1353. return left.index - right.index;
  1354. }), 'value');
  1355. }
  1356. // An internal function used for aggregate "group by" operations.
  1357. function group(behavior, partition) {
  1358. return function(obj, iteratee, context) {
  1359. var result = partition ? [[], []] : {};
  1360. iteratee = cb(iteratee, context);
  1361. each(obj, function(value, index) {
  1362. var key = iteratee(value, index, obj);
  1363. behavior(result, value, key);
  1364. });
  1365. return result;
  1366. };
  1367. }
  1368. // Groups the object's values by a criterion. Pass either a string attribute
  1369. // to group by, or a function that returns the criterion.
  1370. var groupBy = group(function(result, value, key) {
  1371. if (has(result, key)) result[key].push(value); else result[key] = [value];
  1372. });
  1373. // Indexes the object's values by a criterion, similar to `_.groupBy`, but for
  1374. // when you know that your index values will be unique.
  1375. var indexBy = group(function(result, value, key) {
  1376. result[key] = value;
  1377. });
  1378. // Counts instances of an object that group by a certain criterion. Pass
  1379. // either a string attribute to count by, or a function that returns the
  1380. // criterion.
  1381. var countBy = group(function(result, value, key) {
  1382. if (has(result, key)) result[key]++; else result[key] = 1;
  1383. });
  1384. // Split a collection into two arrays: one whose elements all pass the given
  1385. // truth test, and one whose elements all do not pass the truth test.
  1386. var partition = group(function(result, value, pass) {
  1387. result[pass ? 0 : 1].push(value);
  1388. }, true);
  1389. // Safely create a real, live array from anything iterable.
  1390. var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
  1391. function toArray(obj) {
  1392. if (!obj) return [];
  1393. if (isArray(obj)) return slice.call(obj);
  1394. if (isString(obj)) {
  1395. // Keep surrogate pair characters together.
  1396. return obj.match(reStrSymbol);
  1397. }
  1398. if (isArrayLike(obj)) return map(obj, identity);
  1399. return values(obj);
  1400. }
  1401. // Return the number of elements in a collection.
  1402. function size(obj) {
  1403. if (obj == null) return 0;
  1404. return isArrayLike(obj) ? obj.length : keys(obj).length;
  1405. }
  1406. // Internal `_.pick` helper function to determine whether `key` is an enumerable
  1407. // property name of `obj`.
  1408. function keyInObj(value, key, obj) {
  1409. return key in obj;
  1410. }
  1411. // Return a copy of the object only containing the allowed properties.
  1412. var pick = restArguments(function(obj, keys) {
  1413. var result = {}, iteratee = keys[0];
  1414. if (obj == null) return result;
  1415. if (isFunction$1(iteratee)) {
  1416. if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
  1417. keys = allKeys(obj);
  1418. } else {
  1419. iteratee = keyInObj;
  1420. keys = flatten(keys, false, false);
  1421. obj = Object(obj);
  1422. }
  1423. for (var i = 0, length = keys.length; i < length; i++) {
  1424. var key = keys[i];
  1425. var value = obj[key];
  1426. if (iteratee(value, key, obj)) result[key] = value;
  1427. }
  1428. return result;
  1429. });
  1430. // Return a copy of the object without the disallowed properties.
  1431. var omit = restArguments(function(obj, keys) {
  1432. var iteratee = keys[0], context;
  1433. if (isFunction$1(iteratee)) {
  1434. iteratee = negate(iteratee);
  1435. if (keys.length > 1) context = keys[1];
  1436. } else {
  1437. keys = map(flatten(keys, false, false), String);
  1438. iteratee = function(value, key) {
  1439. return !contains(keys, key);
  1440. };
  1441. }
  1442. return pick(obj, iteratee, context);
  1443. });
  1444. // Returns everything but the last entry of the array. Especially useful on
  1445. // the arguments object. Passing **n** will return all the values in
  1446. // the array, excluding the last N.
  1447. function initial(array, n, guard) {
  1448. return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
  1449. }
  1450. // Get the first element of an array. Passing **n** will return the first N
  1451. // values in the array. The **guard** check allows it to work with `_.map`.
  1452. function first(array, n, guard) {
  1453. if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
  1454. if (n == null || guard) return array[0];
  1455. return initial(array, array.length - n);
  1456. }
  1457. // Returns everything but the first entry of the `array`. Especially useful on
  1458. // the `arguments` object. Passing an **n** will return the rest N values in the
  1459. // `array`.
  1460. function rest(array, n, guard) {
  1461. return slice.call(array, n == null || guard ? 1 : n);
  1462. }
  1463. // Get the last element of an array. Passing **n** will return the last N
  1464. // values in the array.
  1465. function last(array, n, guard) {
  1466. if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
  1467. if (n == null || guard) return array[array.length - 1];
  1468. return rest(array, Math.max(0, array.length - n));
  1469. }
  1470. // Trim out all falsy values from an array.
  1471. function compact(array) {
  1472. return filter(array, Boolean);
  1473. }
  1474. // Flatten out an array, either recursively (by default), or up to `depth`.
  1475. // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
  1476. function flatten$1(array, depth) {
  1477. return flatten(array, depth, false);
  1478. }
  1479. // Take the difference between one array and a number of other arrays.
  1480. // Only the elements present in just the first array will remain.
  1481. var difference = restArguments(function(array, rest) {
  1482. rest = flatten(rest, true, true);
  1483. return filter(array, function(value){
  1484. return !contains(rest, value);
  1485. });
  1486. });
  1487. // Return a version of the array that does not contain the specified value(s).
  1488. var without = restArguments(function(array, otherArrays) {
  1489. return difference(array, otherArrays);
  1490. });
  1491. // Produce a duplicate-free version of the array. If the array has already
  1492. // been sorted, you have the option of using a faster algorithm.
  1493. // The faster algorithm will not work with an iteratee if the iteratee
  1494. // is not a one-to-one function, so providing an iteratee will disable
  1495. // the faster algorithm.
  1496. function uniq(array, isSorted, iteratee, context) {
  1497. if (!isBoolean(isSorted)) {
  1498. context = iteratee;
  1499. iteratee = isSorted;
  1500. isSorted = false;
  1501. }
  1502. if (iteratee != null) iteratee = cb(iteratee, context);
  1503. var result = [];
  1504. var seen = [];
  1505. for (var i = 0, length = getLength(array); i < length; i++) {
  1506. var value = array[i],
  1507. computed = iteratee ? iteratee(value, i, array) : value;
  1508. if (isSorted && !iteratee) {
  1509. if (!i || seen !== computed) result.push(value);
  1510. seen = computed;
  1511. } else if (iteratee) {
  1512. if (!contains(seen, computed)) {
  1513. seen.push(computed);
  1514. result.push(value);
  1515. }
  1516. } else if (!contains(result, value)) {
  1517. result.push(value);
  1518. }
  1519. }
  1520. return result;
  1521. }
  1522. // Produce an array that contains the union: each distinct element from all of
  1523. // the passed-in arrays.
  1524. var union = restArguments(function(arrays) {
  1525. return uniq(flatten(arrays, true, true));
  1526. });
  1527. // Produce an array that contains every item shared between all the
  1528. // passed-in arrays.
  1529. function intersection(array) {
  1530. var result = [];
  1531. var argsLength = arguments.length;
  1532. for (var i = 0, length = getLength(array); i < length; i++) {
  1533. var item = array[i];
  1534. if (contains(result, item)) continue;
  1535. var j;
  1536. for (j = 1; j < argsLength; j++) {
  1537. if (!contains(arguments[j], item)) break;
  1538. }
  1539. if (j === argsLength) result.push(item);
  1540. }
  1541. return result;
  1542. }
  1543. // Complement of zip. Unzip accepts an array of arrays and groups
  1544. // each array's elements on shared indices.
  1545. function unzip(array) {
  1546. var length = array && max(array, getLength).length || 0;
  1547. var result = Array(length);
  1548. for (var index = 0; index < length; index++) {
  1549. result[index] = pluck(array, index);
  1550. }
  1551. return result;
  1552. }
  1553. // Zip together multiple lists into a single array -- elements that share
  1554. // an index go together.
  1555. var zip = restArguments(unzip);
  1556. // Converts lists into objects. Pass either a single array of `[key, value]`
  1557. // pairs, or two parallel arrays of the same length -- one of keys, and one of
  1558. // the corresponding values. Passing by pairs is the reverse of `_.pairs`.
  1559. function object(list, values) {
  1560. var result = {};
  1561. for (var i = 0, length = getLength(list); i < length; i++) {
  1562. if (values) {
  1563. result[list[i]] = values[i];
  1564. } else {
  1565. result[list[i][0]] = list[i][1];
  1566. }
  1567. }
  1568. return result;
  1569. }
  1570. // Generate an integer Array containing an arithmetic progression. A port of
  1571. // the native Python `range()` function. See
  1572. // [the Python documentation](https://docs.python.org/library/functions.html#range).
  1573. function range(start, stop, step) {
  1574. if (stop == null) {
  1575. stop = start || 0;
  1576. start = 0;
  1577. }
  1578. if (!step) {
  1579. step = stop < start ? -1 : 1;
  1580. }
  1581. var length = Math.max(Math.ceil((stop - start) / step), 0);
  1582. var range = Array(length);
  1583. for (var idx = 0; idx < length; idx++, start += step) {
  1584. range[idx] = start;
  1585. }
  1586. return range;
  1587. }
  1588. // Chunk a single array into multiple arrays, each containing `count` or fewer
  1589. // items.
  1590. function chunk(array, count) {
  1591. if (count == null || count < 1) return [];
  1592. var result = [];
  1593. var i = 0, length = array.length;
  1594. while (i < length) {
  1595. result.push(slice.call(array, i, i += count));
  1596. }
  1597. return result;
  1598. }
  1599. // Helper function to continue chaining intermediate results.
  1600. function chainResult(instance, obj) {
  1601. return instance._chain ? _(obj).chain() : obj;
  1602. }
  1603. // Add your own custom functions to the Underscore object.
  1604. function mixin(obj) {
  1605. each(functions(obj), function(name) {
  1606. var func = _[name] = obj[name];
  1607. _.prototype[name] = function() {
  1608. var args = [this._wrapped];
  1609. push.apply(args, arguments);
  1610. return chainResult(this, func.apply(_, args));
  1611. };
  1612. });
  1613. return _;
  1614. }
  1615. // Add all mutator `Array` functions to the wrapper.
  1616. each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
  1617. var method = ArrayProto[name];
  1618. _.prototype[name] = function() {
  1619. var obj = this._wrapped;
  1620. if (obj != null) {
  1621. method.apply(obj, arguments);
  1622. if ((name === 'shift' || name === 'splice') && obj.length === 0) {
  1623. delete obj[0];
  1624. }
  1625. }
  1626. return chainResult(this, obj);
  1627. };
  1628. });
  1629. // Add all accessor `Array` functions to the wrapper.
  1630. each(['concat', 'join', 'slice'], function(name) {
  1631. var method = ArrayProto[name];
  1632. _.prototype[name] = function() {
  1633. var obj = this._wrapped;
  1634. if (obj != null) obj = method.apply(obj, arguments);
  1635. return chainResult(this, obj);
  1636. };
  1637. });
  1638. // Named Exports
  1639. var allExports = {
  1640. __proto__: null,
  1641. VERSION: VERSION,
  1642. restArguments: restArguments,
  1643. isObject: isObject,
  1644. isNull: isNull,
  1645. isUndefined: isUndefined,
  1646. isBoolean: isBoolean,
  1647. isElement: isElement,
  1648. isString: isString,
  1649. isNumber: isNumber,
  1650. isDate: isDate,
  1651. isRegExp: isRegExp,
  1652. isError: isError,
  1653. isSymbol: isSymbol,
  1654. isArrayBuffer: isArrayBuffer,
  1655. isDataView: isDataView$1,
  1656. isArray: isArray,
  1657. isFunction: isFunction$1,
  1658. isArguments: isArguments$1,
  1659. isFinite: isFinite$1,
  1660. isNaN: isNaN$1,
  1661. isTypedArray: isTypedArray$1,
  1662. isEmpty: isEmpty,
  1663. isMatch: isMatch,
  1664. isEqual: isEqual,
  1665. isMap: isMap,
  1666. isWeakMap: isWeakMap,
  1667. isSet: isSet,
  1668. isWeakSet: isWeakSet,
  1669. keys: keys,
  1670. allKeys: allKeys,
  1671. values: values,
  1672. pairs: pairs,
  1673. invert: invert,
  1674. functions: functions,
  1675. methods: functions,
  1676. extend: extend,
  1677. extendOwn: extendOwn,
  1678. assign: extendOwn,
  1679. defaults: defaults,
  1680. create: create,
  1681. clone: clone,
  1682. tap: tap,
  1683. get: get,
  1684. has: has$1,
  1685. mapObject: mapObject,
  1686. identity: identity,
  1687. constant: constant,
  1688. noop: noop,
  1689. toPath: toPath,
  1690. property: property,
  1691. propertyOf: propertyOf,
  1692. matcher: matcher,
  1693. matches: matcher,
  1694. times: times,
  1695. random: random,
  1696. now: now,
  1697. escape: _escape,
  1698. unescape: _unescape,
  1699. templateSettings: templateSettings,
  1700. template: template,
  1701. result: result,
  1702. uniqueId: uniqueId,
  1703. chain: chain,
  1704. iteratee: iteratee,
  1705. partial: partial,
  1706. bind: bind,
  1707. bindAll: bindAll,
  1708. memoize: memoize,
  1709. delay: delay,
  1710. defer: defer,
  1711. throttle: throttle,
  1712. debounce: debounce,
  1713. wrap: wrap,
  1714. negate: negate,
  1715. compose: compose,
  1716. after: after,
  1717. before: before,
  1718. once: once,
  1719. findKey: findKey,
  1720. findIndex: findIndex,
  1721. findLastIndex: findLastIndex,
  1722. sortedIndex: sortedIndex,
  1723. indexOf: indexOf,
  1724. lastIndexOf: lastIndexOf,
  1725. find: find,
  1726. detect: find,
  1727. findWhere: findWhere,
  1728. each: each,
  1729. forEach: each,
  1730. map: map,
  1731. collect: map,
  1732. reduce: reduce,
  1733. foldl: reduce,
  1734. inject: reduce,
  1735. reduceRight: reduceRight,
  1736. foldr: reduceRight,
  1737. filter: filter,
  1738. select: filter,
  1739. reject: reject,
  1740. every: every,
  1741. all: every,
  1742. some: some,
  1743. any: some,
  1744. contains: contains,
  1745. includes: contains,
  1746. include: contains,
  1747. invoke: invoke,
  1748. pluck: pluck,
  1749. where: where,
  1750. max: max,
  1751. min: min,
  1752. shuffle: shuffle,
  1753. sample: sample,
  1754. sortBy: sortBy,
  1755. groupBy: groupBy,
  1756. indexBy: indexBy,
  1757. countBy: countBy,
  1758. partition: partition,
  1759. toArray: toArray,
  1760. size: size,
  1761. pick: pick,
  1762. omit: omit,
  1763. first: first,
  1764. head: first,
  1765. take: first,
  1766. initial: initial,
  1767. last: last,
  1768. rest: rest,
  1769. tail: rest,
  1770. drop: rest,
  1771. compact: compact,
  1772. flatten: flatten$1,
  1773. without: without,
  1774. uniq: uniq,
  1775. unique: uniq,
  1776. union: union,
  1777. intersection: intersection,
  1778. difference: difference,
  1779. unzip: unzip,
  1780. transpose: unzip,
  1781. zip: zip,
  1782. object: object,
  1783. range: range,
  1784. chunk: chunk,
  1785. mixin: mixin,
  1786. 'default': _
  1787. };
  1788. // Default Export
  1789. // Add all of the Underscore functions to the wrapper object.
  1790. var _$1 = mixin(allExports);
  1791. // Legacy Node.js API.
  1792. _$1._ = _$1;
  1793. return _$1;
  1794. })));
  1795. //# sourceMappingURL=underscore.js.map