1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | (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.td = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
9 |
|
10 | },{}],2:[function(require,module,exports){
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | 'use strict';
|
33 |
|
34 | var R = typeof Reflect === 'object' ? Reflect : null
|
35 | var ReflectApply = R && typeof R.apply === 'function'
|
36 | ? R.apply
|
37 | : function ReflectApply(target, receiver, args) {
|
38 | return Function.prototype.apply.call(target, receiver, args);
|
39 | }
|
40 |
|
41 | var ReflectOwnKeys
|
42 | if (R && typeof R.ownKeys === 'function') {
|
43 | ReflectOwnKeys = R.ownKeys
|
44 | } else if (Object.getOwnPropertySymbols) {
|
45 | ReflectOwnKeys = function ReflectOwnKeys(target) {
|
46 | return Object.getOwnPropertyNames(target)
|
47 | .concat(Object.getOwnPropertySymbols(target));
|
48 | };
|
49 | } else {
|
50 | ReflectOwnKeys = function ReflectOwnKeys(target) {
|
51 | return Object.getOwnPropertyNames(target);
|
52 | };
|
53 | }
|
54 |
|
55 | function ProcessEmitWarning(warning) {
|
56 | if (console && console.warn) console.warn(warning);
|
57 | }
|
58 |
|
59 | var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
|
60 | return value !== value;
|
61 | }
|
62 |
|
63 | function EventEmitter() {
|
64 | EventEmitter.init.call(this);
|
65 | }
|
66 | module.exports = EventEmitter;
|
67 | module.exports.once = once;
|
68 |
|
69 |
|
70 | EventEmitter.EventEmitter = EventEmitter;
|
71 |
|
72 | EventEmitter.prototype._events = undefined;
|
73 | EventEmitter.prototype._eventsCount = 0;
|
74 | EventEmitter.prototype._maxListeners = undefined;
|
75 |
|
76 |
|
77 |
|
78 | var defaultMaxListeners = 10;
|
79 |
|
80 | function checkListener(listener) {
|
81 | if (typeof listener !== 'function') {
|
82 | throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
83 | }
|
84 | }
|
85 |
|
86 | Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
|
87 | enumerable: true,
|
88 | get: function() {
|
89 | return defaultMaxListeners;
|
90 | },
|
91 | set: function(arg) {
|
92 | if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
|
93 | throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
|
94 | }
|
95 | defaultMaxListeners = arg;
|
96 | }
|
97 | });
|
98 |
|
99 | EventEmitter.init = function() {
|
100 |
|
101 | if (this._events === undefined ||
|
102 | this._events === Object.getPrototypeOf(this)._events) {
|
103 | this._events = Object.create(null);
|
104 | this._eventsCount = 0;
|
105 | }
|
106 |
|
107 | this._maxListeners = this._maxListeners || undefined;
|
108 | };
|
109 |
|
110 |
|
111 |
|
112 | EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
113 | if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
|
114 | throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
|
115 | }
|
116 | this._maxListeners = n;
|
117 | return this;
|
118 | };
|
119 |
|
120 | function _getMaxListeners(that) {
|
121 | if (that._maxListeners === undefined)
|
122 | return EventEmitter.defaultMaxListeners;
|
123 | return that._maxListeners;
|
124 | }
|
125 |
|
126 | EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
127 | return _getMaxListeners(this);
|
128 | };
|
129 |
|
130 | EventEmitter.prototype.emit = function emit(type) {
|
131 | var args = [];
|
132 | for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
|
133 | var doError = (type === 'error');
|
134 |
|
135 | var events = this._events;
|
136 | if (events !== undefined)
|
137 | doError = (doError && events.error === undefined);
|
138 | else if (!doError)
|
139 | return false;
|
140 |
|
141 |
|
142 | if (doError) {
|
143 | var er;
|
144 | if (args.length > 0)
|
145 | er = args[0];
|
146 | if (er instanceof Error) {
|
147 |
|
148 |
|
149 | throw er;
|
150 | }
|
151 |
|
152 | var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
|
153 | err.context = er;
|
154 | throw err;
|
155 | }
|
156 |
|
157 | var handler = events[type];
|
158 |
|
159 | if (handler === undefined)
|
160 | return false;
|
161 |
|
162 | if (typeof handler === 'function') {
|
163 | ReflectApply(handler, this, args);
|
164 | } else {
|
165 | var len = handler.length;
|
166 | var listeners = arrayClone(handler, len);
|
167 | for (var i = 0; i < len; ++i)
|
168 | ReflectApply(listeners[i], this, args);
|
169 | }
|
170 |
|
171 | return true;
|
172 | };
|
173 |
|
174 | function _addListener(target, type, listener, prepend) {
|
175 | var m;
|
176 | var events;
|
177 | var existing;
|
178 |
|
179 | checkListener(listener);
|
180 |
|
181 | events = target._events;
|
182 | if (events === undefined) {
|
183 | events = target._events = Object.create(null);
|
184 | target._eventsCount = 0;
|
185 | } else {
|
186 |
|
187 |
|
188 | if (events.newListener !== undefined) {
|
189 | target.emit('newListener', type,
|
190 | listener.listener ? listener.listener : listener);
|
191 |
|
192 |
|
193 |
|
194 | events = target._events;
|
195 | }
|
196 | existing = events[type];
|
197 | }
|
198 |
|
199 | if (existing === undefined) {
|
200 |
|
201 | existing = events[type] = listener;
|
202 | ++target._eventsCount;
|
203 | } else {
|
204 | if (typeof existing === 'function') {
|
205 |
|
206 | existing = events[type] =
|
207 | prepend ? [listener, existing] : [existing, listener];
|
208 |
|
209 | } else if (prepend) {
|
210 | existing.unshift(listener);
|
211 | } else {
|
212 | existing.push(listener);
|
213 | }
|
214 |
|
215 |
|
216 | m = _getMaxListeners(target);
|
217 | if (m > 0 && existing.length > m && !existing.warned) {
|
218 | existing.warned = true;
|
219 |
|
220 |
|
221 | var w = new Error('Possible EventEmitter memory leak detected. ' +
|
222 | existing.length + ' ' + String(type) + ' listeners ' +
|
223 | 'added. Use emitter.setMaxListeners() to ' +
|
224 | 'increase limit');
|
225 | w.name = 'MaxListenersExceededWarning';
|
226 | w.emitter = target;
|
227 | w.type = type;
|
228 | w.count = existing.length;
|
229 | ProcessEmitWarning(w);
|
230 | }
|
231 | }
|
232 |
|
233 | return target;
|
234 | }
|
235 |
|
236 | EventEmitter.prototype.addListener = function addListener(type, listener) {
|
237 | return _addListener(this, type, listener, false);
|
238 | };
|
239 |
|
240 | EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
241 |
|
242 | EventEmitter.prototype.prependListener =
|
243 | function prependListener(type, listener) {
|
244 | return _addListener(this, type, listener, true);
|
245 | };
|
246 |
|
247 | function onceWrapper() {
|
248 | if (!this.fired) {
|
249 | this.target.removeListener(this.type, this.wrapFn);
|
250 | this.fired = true;
|
251 | if (arguments.length === 0)
|
252 | return this.listener.call(this.target);
|
253 | return this.listener.apply(this.target, arguments);
|
254 | }
|
255 | }
|
256 |
|
257 | function _onceWrap(target, type, listener) {
|
258 | var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
|
259 | var wrapped = onceWrapper.bind(state);
|
260 | wrapped.listener = listener;
|
261 | state.wrapFn = wrapped;
|
262 | return wrapped;
|
263 | }
|
264 |
|
265 | EventEmitter.prototype.once = function once(type, listener) {
|
266 | checkListener(listener);
|
267 | this.on(type, _onceWrap(this, type, listener));
|
268 | return this;
|
269 | };
|
270 |
|
271 | EventEmitter.prototype.prependOnceListener =
|
272 | function prependOnceListener(type, listener) {
|
273 | checkListener(listener);
|
274 | this.prependListener(type, _onceWrap(this, type, listener));
|
275 | return this;
|
276 | };
|
277 |
|
278 |
|
279 | EventEmitter.prototype.removeListener =
|
280 | function removeListener(type, listener) {
|
281 | var list, events, position, i, originalListener;
|
282 |
|
283 | checkListener(listener);
|
284 |
|
285 | events = this._events;
|
286 | if (events === undefined)
|
287 | return this;
|
288 |
|
289 | list = events[type];
|
290 | if (list === undefined)
|
291 | return this;
|
292 |
|
293 | if (list === listener || list.listener === listener) {
|
294 | if (--this._eventsCount === 0)
|
295 | this._events = Object.create(null);
|
296 | else {
|
297 | delete events[type];
|
298 | if (events.removeListener)
|
299 | this.emit('removeListener', type, list.listener || listener);
|
300 | }
|
301 | } else if (typeof list !== 'function') {
|
302 | position = -1;
|
303 |
|
304 | for (i = list.length - 1; i >= 0; i--) {
|
305 | if (list[i] === listener || list[i].listener === listener) {
|
306 | originalListener = list[i].listener;
|
307 | position = i;
|
308 | break;
|
309 | }
|
310 | }
|
311 |
|
312 | if (position < 0)
|
313 | return this;
|
314 |
|
315 | if (position === 0)
|
316 | list.shift();
|
317 | else {
|
318 | spliceOne(list, position);
|
319 | }
|
320 |
|
321 | if (list.length === 1)
|
322 | events[type] = list[0];
|
323 |
|
324 | if (events.removeListener !== undefined)
|
325 | this.emit('removeListener', type, originalListener || listener);
|
326 | }
|
327 |
|
328 | return this;
|
329 | };
|
330 |
|
331 | EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
332 |
|
333 | EventEmitter.prototype.removeAllListeners =
|
334 | function removeAllListeners(type) {
|
335 | var listeners, events, i;
|
336 |
|
337 | events = this._events;
|
338 | if (events === undefined)
|
339 | return this;
|
340 |
|
341 |
|
342 | if (events.removeListener === undefined) {
|
343 | if (arguments.length === 0) {
|
344 | this._events = Object.create(null);
|
345 | this._eventsCount = 0;
|
346 | } else if (events[type] !== undefined) {
|
347 | if (--this._eventsCount === 0)
|
348 | this._events = Object.create(null);
|
349 | else
|
350 | delete events[type];
|
351 | }
|
352 | return this;
|
353 | }
|
354 |
|
355 |
|
356 | if (arguments.length === 0) {
|
357 | var keys = Object.keys(events);
|
358 | var key;
|
359 | for (i = 0; i < keys.length; ++i) {
|
360 | key = keys[i];
|
361 | if (key === 'removeListener') continue;
|
362 | this.removeAllListeners(key);
|
363 | }
|
364 | this.removeAllListeners('removeListener');
|
365 | this._events = Object.create(null);
|
366 | this._eventsCount = 0;
|
367 | return this;
|
368 | }
|
369 |
|
370 | listeners = events[type];
|
371 |
|
372 | if (typeof listeners === 'function') {
|
373 | this.removeListener(type, listeners);
|
374 | } else if (listeners !== undefined) {
|
375 |
|
376 | for (i = listeners.length - 1; i >= 0; i--) {
|
377 | this.removeListener(type, listeners[i]);
|
378 | }
|
379 | }
|
380 |
|
381 | return this;
|
382 | };
|
383 |
|
384 | function _listeners(target, type, unwrap) {
|
385 | var events = target._events;
|
386 |
|
387 | if (events === undefined)
|
388 | return [];
|
389 |
|
390 | var evlistener = events[type];
|
391 | if (evlistener === undefined)
|
392 | return [];
|
393 |
|
394 | if (typeof evlistener === 'function')
|
395 | return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
396 |
|
397 | return unwrap ?
|
398 | unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
399 | }
|
400 |
|
401 | EventEmitter.prototype.listeners = function listeners(type) {
|
402 | return _listeners(this, type, true);
|
403 | };
|
404 |
|
405 | EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
406 | return _listeners(this, type, false);
|
407 | };
|
408 |
|
409 | EventEmitter.listenerCount = function(emitter, type) {
|
410 | if (typeof emitter.listenerCount === 'function') {
|
411 | return emitter.listenerCount(type);
|
412 | } else {
|
413 | return listenerCount.call(emitter, type);
|
414 | }
|
415 | };
|
416 |
|
417 | EventEmitter.prototype.listenerCount = listenerCount;
|
418 | function listenerCount(type) {
|
419 | var events = this._events;
|
420 |
|
421 | if (events !== undefined) {
|
422 | var evlistener = events[type];
|
423 |
|
424 | if (typeof evlistener === 'function') {
|
425 | return 1;
|
426 | } else if (evlistener !== undefined) {
|
427 | return evlistener.length;
|
428 | }
|
429 | }
|
430 |
|
431 | return 0;
|
432 | }
|
433 |
|
434 | EventEmitter.prototype.eventNames = function eventNames() {
|
435 | return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
436 | };
|
437 |
|
438 | function arrayClone(arr, n) {
|
439 | var copy = new Array(n);
|
440 | for (var i = 0; i < n; ++i)
|
441 | copy[i] = arr[i];
|
442 | return copy;
|
443 | }
|
444 |
|
445 | function spliceOne(list, index) {
|
446 | for (; index + 1 < list.length; index++)
|
447 | list[index] = list[index + 1];
|
448 | list.pop();
|
449 | }
|
450 |
|
451 | function unwrapListeners(arr) {
|
452 | var ret = new Array(arr.length);
|
453 | for (var i = 0; i < ret.length; ++i) {
|
454 | ret[i] = arr[i].listener || arr[i];
|
455 | }
|
456 | return ret;
|
457 | }
|
458 |
|
459 | function once(emitter, name) {
|
460 | return new Promise(function (resolve, reject) {
|
461 | function errorListener(err) {
|
462 | emitter.removeListener(name, resolver);
|
463 | reject(err);
|
464 | }
|
465 |
|
466 | function resolver() {
|
467 | if (typeof emitter.removeListener === 'function') {
|
468 | emitter.removeListener('error', errorListener);
|
469 | }
|
470 | resolve([].slice.call(arguments));
|
471 | };
|
472 |
|
473 | eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
474 | if (name !== 'error') {
|
475 | addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
476 | }
|
477 | });
|
478 | }
|
479 |
|
480 | function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
481 | if (typeof emitter.on === 'function') {
|
482 | eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
|
483 | }
|
484 | }
|
485 |
|
486 | function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
487 | if (typeof emitter.on === 'function') {
|
488 | if (flags.once) {
|
489 | emitter.once(name, listener);
|
490 | } else {
|
491 | emitter.on(name, listener);
|
492 | }
|
493 | } else if (typeof emitter.addEventListener === 'function') {
|
494 |
|
495 |
|
496 | emitter.addEventListener(name, function wrapListener(arg) {
|
497 |
|
498 |
|
499 | if (flags.once) {
|
500 | emitter.removeEventListener(name, wrapListener);
|
501 | }
|
502 | listener(arg);
|
503 | });
|
504 | } else {
|
505 | throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
506 | }
|
507 | }
|
508 |
|
509 | },{}],3:[function(require,module,exports){
|
510 | 'use strict';
|
511 | var toString = Object.prototype.toString;
|
512 |
|
513 | module.exports = function (x) {
|
514 | var prototype;
|
515 | return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));
|
516 | };
|
517 |
|
518 | },{}],4:[function(require,module,exports){
|
519 | 'use strict';
|
520 | module.exports = function (re) {
|
521 | return Object.prototype.toString.call(re) === '[object RegExp]';
|
522 | };
|
523 |
|
524 | },{}],5:[function(require,module,exports){
|
525 | var getNative = require('./_getNative'),
|
526 | root = require('./_root');
|
527 |
|
528 |
|
529 | var DataView = getNative(root, 'DataView');
|
530 |
|
531 | module.exports = DataView;
|
532 |
|
533 | },{"./_getNative":107,"./_root":153}],6:[function(require,module,exports){
|
534 | var hashClear = require('./_hashClear'),
|
535 | hashDelete = require('./_hashDelete'),
|
536 | hashGet = require('./_hashGet'),
|
537 | hashHas = require('./_hashHas'),
|
538 | hashSet = require('./_hashSet');
|
539 |
|
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 |
|
546 |
|
547 | function Hash(entries) {
|
548 | var index = -1,
|
549 | length = entries == null ? 0 : entries.length;
|
550 |
|
551 | this.clear();
|
552 | while (++index < length) {
|
553 | var entry = entries[index];
|
554 | this.set(entry[0], entry[1]);
|
555 | }
|
556 | }
|
557 |
|
558 |
|
559 | Hash.prototype.clear = hashClear;
|
560 | Hash.prototype['delete'] = hashDelete;
|
561 | Hash.prototype.get = hashGet;
|
562 | Hash.prototype.has = hashHas;
|
563 | Hash.prototype.set = hashSet;
|
564 |
|
565 | module.exports = Hash;
|
566 |
|
567 | },{"./_hashClear":116,"./_hashDelete":117,"./_hashGet":118,"./_hashHas":119,"./_hashSet":120}],7:[function(require,module,exports){
|
568 | var listCacheClear = require('./_listCacheClear'),
|
569 | listCacheDelete = require('./_listCacheDelete'),
|
570 | listCacheGet = require('./_listCacheGet'),
|
571 | listCacheHas = require('./_listCacheHas'),
|
572 | listCacheSet = require('./_listCacheSet');
|
573 |
|
574 |
|
575 |
|
576 |
|
577 |
|
578 |
|
579 |
|
580 |
|
581 | function ListCache(entries) {
|
582 | var index = -1,
|
583 | length = entries == null ? 0 : entries.length;
|
584 |
|
585 | this.clear();
|
586 | while (++index < length) {
|
587 | var entry = entries[index];
|
588 | this.set(entry[0], entry[1]);
|
589 | }
|
590 | }
|
591 |
|
592 |
|
593 | ListCache.prototype.clear = listCacheClear;
|
594 | ListCache.prototype['delete'] = listCacheDelete;
|
595 | ListCache.prototype.get = listCacheGet;
|
596 | ListCache.prototype.has = listCacheHas;
|
597 | ListCache.prototype.set = listCacheSet;
|
598 |
|
599 | module.exports = ListCache;
|
600 |
|
601 | },{"./_listCacheClear":132,"./_listCacheDelete":133,"./_listCacheGet":134,"./_listCacheHas":135,"./_listCacheSet":136}],8:[function(require,module,exports){
|
602 | var getNative = require('./_getNative'),
|
603 | root = require('./_root');
|
604 |
|
605 |
|
606 | var Map = getNative(root, 'Map');
|
607 |
|
608 | module.exports = Map;
|
609 |
|
610 | },{"./_getNative":107,"./_root":153}],9:[function(require,module,exports){
|
611 | var mapCacheClear = require('./_mapCacheClear'),
|
612 | mapCacheDelete = require('./_mapCacheDelete'),
|
613 | mapCacheGet = require('./_mapCacheGet'),
|
614 | mapCacheHas = require('./_mapCacheHas'),
|
615 | mapCacheSet = require('./_mapCacheSet');
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 |
|
622 |
|
623 |
|
624 | function MapCache(entries) {
|
625 | var index = -1,
|
626 | length = entries == null ? 0 : entries.length;
|
627 |
|
628 | this.clear();
|
629 | while (++index < length) {
|
630 | var entry = entries[index];
|
631 | this.set(entry[0], entry[1]);
|
632 | }
|
633 | }
|
634 |
|
635 |
|
636 | MapCache.prototype.clear = mapCacheClear;
|
637 | MapCache.prototype['delete'] = mapCacheDelete;
|
638 | MapCache.prototype.get = mapCacheGet;
|
639 | MapCache.prototype.has = mapCacheHas;
|
640 | MapCache.prototype.set = mapCacheSet;
|
641 |
|
642 | module.exports = MapCache;
|
643 |
|
644 | },{"./_mapCacheClear":137,"./_mapCacheDelete":138,"./_mapCacheGet":139,"./_mapCacheHas":140,"./_mapCacheSet":141}],10:[function(require,module,exports){
|
645 | var getNative = require('./_getNative'),
|
646 | root = require('./_root');
|
647 |
|
648 |
|
649 | var Promise = getNative(root, 'Promise');
|
650 |
|
651 | module.exports = Promise;
|
652 |
|
653 | },{"./_getNative":107,"./_root":153}],11:[function(require,module,exports){
|
654 | var getNative = require('./_getNative'),
|
655 | root = require('./_root');
|
656 |
|
657 |
|
658 | var Set = getNative(root, 'Set');
|
659 |
|
660 | module.exports = Set;
|
661 |
|
662 | },{"./_getNative":107,"./_root":153}],12:[function(require,module,exports){
|
663 | var MapCache = require('./_MapCache'),
|
664 | setCacheAdd = require('./_setCacheAdd'),
|
665 | setCacheHas = require('./_setCacheHas');
|
666 |
|
667 |
|
668 |
|
669 |
|
670 |
|
671 |
|
672 |
|
673 |
|
674 |
|
675 | function SetCache(values) {
|
676 | var index = -1,
|
677 | length = values == null ? 0 : values.length;
|
678 |
|
679 | this.__data__ = new MapCache;
|
680 | while (++index < length) {
|
681 | this.add(values[index]);
|
682 | }
|
683 | }
|
684 |
|
685 |
|
686 | SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
687 | SetCache.prototype.has = setCacheHas;
|
688 |
|
689 | module.exports = SetCache;
|
690 |
|
691 | },{"./_MapCache":9,"./_setCacheAdd":154,"./_setCacheHas":155}],13:[function(require,module,exports){
|
692 | var ListCache = require('./_ListCache'),
|
693 | stackClear = require('./_stackClear'),
|
694 | stackDelete = require('./_stackDelete'),
|
695 | stackGet = require('./_stackGet'),
|
696 | stackHas = require('./_stackHas'),
|
697 | stackSet = require('./_stackSet');
|
698 |
|
699 |
|
700 |
|
701 |
|
702 |
|
703 |
|
704 |
|
705 |
|
706 | function Stack(entries) {
|
707 | var data = this.__data__ = new ListCache(entries);
|
708 | this.size = data.size;
|
709 | }
|
710 |
|
711 |
|
712 | Stack.prototype.clear = stackClear;
|
713 | Stack.prototype['delete'] = stackDelete;
|
714 | Stack.prototype.get = stackGet;
|
715 | Stack.prototype.has = stackHas;
|
716 | Stack.prototype.set = stackSet;
|
717 |
|
718 | module.exports = Stack;
|
719 |
|
720 | },{"./_ListCache":7,"./_stackClear":159,"./_stackDelete":160,"./_stackGet":161,"./_stackHas":162,"./_stackSet":163}],14:[function(require,module,exports){
|
721 | var root = require('./_root');
|
722 |
|
723 |
|
724 | var Symbol = root.Symbol;
|
725 |
|
726 | module.exports = Symbol;
|
727 |
|
728 | },{"./_root":153}],15:[function(require,module,exports){
|
729 | var root = require('./_root');
|
730 |
|
731 |
|
732 | var Uint8Array = root.Uint8Array;
|
733 |
|
734 | module.exports = Uint8Array;
|
735 |
|
736 | },{"./_root":153}],16:[function(require,module,exports){
|
737 | var getNative = require('./_getNative'),
|
738 | root = require('./_root');
|
739 |
|
740 |
|
741 | var WeakMap = getNative(root, 'WeakMap');
|
742 |
|
743 | module.exports = WeakMap;
|
744 |
|
745 | },{"./_getNative":107,"./_root":153}],17:[function(require,module,exports){
|
746 |
|
747 |
|
748 |
|
749 |
|
750 |
|
751 |
|
752 |
|
753 |
|
754 |
|
755 |
|
756 | function apply(func, thisArg, args) {
|
757 | switch (args.length) {
|
758 | case 0: return func.call(thisArg);
|
759 | case 1: return func.call(thisArg, args[0]);
|
760 | case 2: return func.call(thisArg, args[0], args[1]);
|
761 | case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
762 | }
|
763 | return func.apply(thisArg, args);
|
764 | }
|
765 |
|
766 | module.exports = apply;
|
767 |
|
768 | },{}],18:[function(require,module,exports){
|
769 |
|
770 |
|
771 |
|
772 |
|
773 |
|
774 |
|
775 |
|
776 |
|
777 |
|
778 |
|
779 | function arrayAggregator(array, setter, iteratee, accumulator) {
|
780 | var index = -1,
|
781 | length = array == null ? 0 : array.length;
|
782 |
|
783 | while (++index < length) {
|
784 | var value = array[index];
|
785 | setter(accumulator, value, iteratee(value), array);
|
786 | }
|
787 | return accumulator;
|
788 | }
|
789 |
|
790 | module.exports = arrayAggregator;
|
791 |
|
792 | },{}],19:[function(require,module,exports){
|
793 |
|
794 |
|
795 |
|
796 |
|
797 |
|
798 |
|
799 |
|
800 |
|
801 |
|
802 | function arrayEach(array, iteratee) {
|
803 | var index = -1,
|
804 | length = array == null ? 0 : array.length;
|
805 |
|
806 | while (++index < length) {
|
807 | if (iteratee(array[index], index, array) === false) {
|
808 | break;
|
809 | }
|
810 | }
|
811 | return array;
|
812 | }
|
813 |
|
814 | module.exports = arrayEach;
|
815 |
|
816 | },{}],20:[function(require,module,exports){
|
817 |
|
818 |
|
819 |
|
820 |
|
821 |
|
822 |
|
823 |
|
824 |
|
825 |
|
826 |
|
827 | function arrayEvery(array, predicate) {
|
828 | var index = -1,
|
829 | length = array == null ? 0 : array.length;
|
830 |
|
831 | while (++index < length) {
|
832 | if (!predicate(array[index], index, array)) {
|
833 | return false;
|
834 | }
|
835 | }
|
836 | return true;
|
837 | }
|
838 |
|
839 | module.exports = arrayEvery;
|
840 |
|
841 | },{}],21:[function(require,module,exports){
|
842 |
|
843 |
|
844 |
|
845 |
|
846 |
|
847 |
|
848 |
|
849 |
|
850 |
|
851 | function arrayFilter(array, predicate) {
|
852 | var index = -1,
|
853 | length = array == null ? 0 : array.length,
|
854 | resIndex = 0,
|
855 | result = [];
|
856 |
|
857 | while (++index < length) {
|
858 | var value = array[index];
|
859 | if (predicate(value, index, array)) {
|
860 | result[resIndex++] = value;
|
861 | }
|
862 | }
|
863 | return result;
|
864 | }
|
865 |
|
866 | module.exports = arrayFilter;
|
867 |
|
868 | },{}],22:[function(require,module,exports){
|
869 | var baseTimes = require('./_baseTimes'),
|
870 | isArguments = require('./isArguments'),
|
871 | isArray = require('./isArray'),
|
872 | isBuffer = require('./isBuffer'),
|
873 | isIndex = require('./_isIndex'),
|
874 | isTypedArray = require('./isTypedArray');
|
875 |
|
876 |
|
877 | var objectProto = Object.prototype;
|
878 |
|
879 |
|
880 | var hasOwnProperty = objectProto.hasOwnProperty;
|
881 |
|
882 |
|
883 |
|
884 |
|
885 |
|
886 |
|
887 |
|
888 |
|
889 |
|
890 | function arrayLikeKeys(value, inherited) {
|
891 | var isArr = isArray(value),
|
892 | isArg = !isArr && isArguments(value),
|
893 | isBuff = !isArr && !isArg && isBuffer(value),
|
894 | isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
895 | skipIndexes = isArr || isArg || isBuff || isType,
|
896 | result = skipIndexes ? baseTimes(value.length, String) : [],
|
897 | length = result.length;
|
898 |
|
899 | for (var key in value) {
|
900 | if ((inherited || hasOwnProperty.call(value, key)) &&
|
901 | !(skipIndexes && (
|
902 |
|
903 | key == 'length' ||
|
904 |
|
905 | (isBuff && (key == 'offset' || key == 'parent')) ||
|
906 |
|
907 | (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
908 |
|
909 | isIndex(key, length)
|
910 | ))) {
|
911 | result.push(key);
|
912 | }
|
913 | }
|
914 | return result;
|
915 | }
|
916 |
|
917 | module.exports = arrayLikeKeys;
|
918 |
|
919 | },{"./_baseTimes":72,"./_isIndex":124,"./isArguments":197,"./isArray":198,"./isBuffer":201,"./isTypedArray":215}],23:[function(require,module,exports){
|
920 |
|
921 |
|
922 |
|
923 |
|
924 |
|
925 |
|
926 |
|
927 |
|
928 |
|
929 | function arrayMap(array, iteratee) {
|
930 | var index = -1,
|
931 | length = array == null ? 0 : array.length,
|
932 | result = Array(length);
|
933 |
|
934 | while (++index < length) {
|
935 | result[index] = iteratee(array[index], index, array);
|
936 | }
|
937 | return result;
|
938 | }
|
939 |
|
940 | module.exports = arrayMap;
|
941 |
|
942 | },{}],24:[function(require,module,exports){
|
943 |
|
944 |
|
945 |
|
946 |
|
947 |
|
948 |
|
949 |
|
950 |
|
951 | function arrayPush(array, values) {
|
952 | var index = -1,
|
953 | length = values.length,
|
954 | offset = array.length;
|
955 |
|
956 | while (++index < length) {
|
957 | array[offset + index] = values[index];
|
958 | }
|
959 | return array;
|
960 | }
|
961 |
|
962 | module.exports = arrayPush;
|
963 |
|
964 | },{}],25:[function(require,module,exports){
|
965 |
|
966 |
|
967 |
|
968 |
|
969 |
|
970 |
|
971 |
|
972 |
|
973 |
|
974 |
|
975 |
|
976 |
|
977 | function arrayReduce(array, iteratee, accumulator, initAccum) {
|
978 | var index = -1,
|
979 | length = array == null ? 0 : array.length;
|
980 |
|
981 | if (initAccum && length) {
|
982 | accumulator = array[++index];
|
983 | }
|
984 | while (++index < length) {
|
985 | accumulator = iteratee(accumulator, array[index], index, array);
|
986 | }
|
987 | return accumulator;
|
988 | }
|
989 |
|
990 | module.exports = arrayReduce;
|
991 |
|
992 | },{}],26:[function(require,module,exports){
|
993 |
|
994 |
|
995 |
|
996 |
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 | function arraySome(array, predicate) {
|
1004 | var index = -1,
|
1005 | length = array == null ? 0 : array.length;
|
1006 |
|
1007 | while (++index < length) {
|
1008 | if (predicate(array[index], index, array)) {
|
1009 | return true;
|
1010 | }
|
1011 | }
|
1012 | return false;
|
1013 | }
|
1014 |
|
1015 | module.exports = arraySome;
|
1016 |
|
1017 | },{}],27:[function(require,module,exports){
|
1018 |
|
1019 |
|
1020 |
|
1021 |
|
1022 |
|
1023 |
|
1024 |
|
1025 | function asciiToArray(string) {
|
1026 | return string.split('');
|
1027 | }
|
1028 |
|
1029 | module.exports = asciiToArray;
|
1030 |
|
1031 | },{}],28:[function(require,module,exports){
|
1032 | var baseAssignValue = require('./_baseAssignValue'),
|
1033 | eq = require('./eq');
|
1034 |
|
1035 |
|
1036 | var objectProto = Object.prototype;
|
1037 |
|
1038 |
|
1039 | var hasOwnProperty = objectProto.hasOwnProperty;
|
1040 |
|
1041 |
|
1042 |
|
1043 |
|
1044 |
|
1045 |
|
1046 |
|
1047 |
|
1048 |
|
1049 |
|
1050 |
|
1051 | function assignValue(object, key, value) {
|
1052 | var objValue = object[key];
|
1053 | if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
1054 | (value === undefined && !(key in object))) {
|
1055 | baseAssignValue(object, key, value);
|
1056 | }
|
1057 | }
|
1058 |
|
1059 | module.exports = assignValue;
|
1060 |
|
1061 | },{"./_baseAssignValue":33,"./eq":182}],29:[function(require,module,exports){
|
1062 | var eq = require('./eq');
|
1063 |
|
1064 |
|
1065 |
|
1066 |
|
1067 |
|
1068 |
|
1069 |
|
1070 |
|
1071 |
|
1072 | function assocIndexOf(array, key) {
|
1073 | var length = array.length;
|
1074 | while (length--) {
|
1075 | if (eq(array[length][0], key)) {
|
1076 | return length;
|
1077 | }
|
1078 | }
|
1079 | return -1;
|
1080 | }
|
1081 |
|
1082 | module.exports = assocIndexOf;
|
1083 |
|
1084 | },{"./eq":182}],30:[function(require,module,exports){
|
1085 | var baseEach = require('./_baseEach');
|
1086 |
|
1087 |
|
1088 |
|
1089 |
|
1090 |
|
1091 |
|
1092 |
|
1093 |
|
1094 |
|
1095 |
|
1096 |
|
1097 |
|
1098 | function baseAggregator(collection, setter, iteratee, accumulator) {
|
1099 | baseEach(collection, function(value, key, collection) {
|
1100 | setter(accumulator, value, iteratee(value), collection);
|
1101 | });
|
1102 | return accumulator;
|
1103 | }
|
1104 |
|
1105 | module.exports = baseAggregator;
|
1106 |
|
1107 | },{"./_baseEach":37}],31:[function(require,module,exports){
|
1108 | var copyObject = require('./_copyObject'),
|
1109 | keys = require('./keys');
|
1110 |
|
1111 |
|
1112 |
|
1113 |
|
1114 |
|
1115 |
|
1116 |
|
1117 |
|
1118 |
|
1119 |
|
1120 | function baseAssign(object, source) {
|
1121 | return object && copyObject(source, keys(source), object);
|
1122 | }
|
1123 |
|
1124 | module.exports = baseAssign;
|
1125 |
|
1126 | },{"./_copyObject":88,"./keys":216}],32:[function(require,module,exports){
|
1127 | var copyObject = require('./_copyObject'),
|
1128 | keysIn = require('./keysIn');
|
1129 |
|
1130 |
|
1131 |
|
1132 |
|
1133 |
|
1134 |
|
1135 |
|
1136 |
|
1137 |
|
1138 |
|
1139 | function baseAssignIn(object, source) {
|
1140 | return object && copyObject(source, keysIn(source), object);
|
1141 | }
|
1142 |
|
1143 | module.exports = baseAssignIn;
|
1144 |
|
1145 | },{"./_copyObject":88,"./keysIn":217}],33:[function(require,module,exports){
|
1146 | var defineProperty = require('./_defineProperty');
|
1147 |
|
1148 |
|
1149 |
|
1150 |
|
1151 |
|
1152 |
|
1153 |
|
1154 |
|
1155 |
|
1156 |
|
1157 | function baseAssignValue(object, key, value) {
|
1158 | if (key == '__proto__' && defineProperty) {
|
1159 | defineProperty(object, key, {
|
1160 | 'configurable': true,
|
1161 | 'enumerable': true,
|
1162 | 'value': value,
|
1163 | 'writable': true
|
1164 | });
|
1165 | } else {
|
1166 | object[key] = value;
|
1167 | }
|
1168 | }
|
1169 |
|
1170 | module.exports = baseAssignValue;
|
1171 |
|
1172 | },{"./_defineProperty":98}],34:[function(require,module,exports){
|
1173 | var Stack = require('./_Stack'),
|
1174 | arrayEach = require('./_arrayEach'),
|
1175 | assignValue = require('./_assignValue'),
|
1176 | baseAssign = require('./_baseAssign'),
|
1177 | baseAssignIn = require('./_baseAssignIn'),
|
1178 | cloneBuffer = require('./_cloneBuffer'),
|
1179 | copyArray = require('./_copyArray'),
|
1180 | copySymbols = require('./_copySymbols'),
|
1181 | copySymbolsIn = require('./_copySymbolsIn'),
|
1182 | getAllKeys = require('./_getAllKeys'),
|
1183 | getAllKeysIn = require('./_getAllKeysIn'),
|
1184 | getTag = require('./_getTag'),
|
1185 | initCloneArray = require('./_initCloneArray'),
|
1186 | initCloneByTag = require('./_initCloneByTag'),
|
1187 | initCloneObject = require('./_initCloneObject'),
|
1188 | isArray = require('./isArray'),
|
1189 | isBuffer = require('./isBuffer'),
|
1190 | isMap = require('./isMap'),
|
1191 | isObject = require('./isObject'),
|
1192 | isSet = require('./isSet'),
|
1193 | keys = require('./keys'),
|
1194 | keysIn = require('./keysIn');
|
1195 |
|
1196 |
|
1197 | var CLONE_DEEP_FLAG = 1,
|
1198 | CLONE_FLAT_FLAG = 2,
|
1199 | CLONE_SYMBOLS_FLAG = 4;
|
1200 |
|
1201 |
|
1202 | var argsTag = '[object Arguments]',
|
1203 | arrayTag = '[object Array]',
|
1204 | boolTag = '[object Boolean]',
|
1205 | dateTag = '[object Date]',
|
1206 | errorTag = '[object Error]',
|
1207 | funcTag = '[object Function]',
|
1208 | genTag = '[object GeneratorFunction]',
|
1209 | mapTag = '[object Map]',
|
1210 | numberTag = '[object Number]',
|
1211 | objectTag = '[object Object]',
|
1212 | regexpTag = '[object RegExp]',
|
1213 | setTag = '[object Set]',
|
1214 | stringTag = '[object String]',
|
1215 | symbolTag = '[object Symbol]',
|
1216 | weakMapTag = '[object WeakMap]';
|
1217 |
|
1218 | var arrayBufferTag = '[object ArrayBuffer]',
|
1219 | dataViewTag = '[object DataView]',
|
1220 | float32Tag = '[object Float32Array]',
|
1221 | float64Tag = '[object Float64Array]',
|
1222 | int8Tag = '[object Int8Array]',
|
1223 | int16Tag = '[object Int16Array]',
|
1224 | int32Tag = '[object Int32Array]',
|
1225 | uint8Tag = '[object Uint8Array]',
|
1226 | uint8ClampedTag = '[object Uint8ClampedArray]',
|
1227 | uint16Tag = '[object Uint16Array]',
|
1228 | uint32Tag = '[object Uint32Array]';
|
1229 |
|
1230 |
|
1231 | var cloneableTags = {};
|
1232 | cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
1233 | cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
1234 | cloneableTags[boolTag] = cloneableTags[dateTag] =
|
1235 | cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
1236 | cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
1237 | cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
1238 | cloneableTags[numberTag] = cloneableTags[objectTag] =
|
1239 | cloneableTags[regexpTag] = cloneableTags[setTag] =
|
1240 | cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
1241 | cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
1242 | cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
1243 | cloneableTags[errorTag] = cloneableTags[funcTag] =
|
1244 | cloneableTags[weakMapTag] = false;
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 |
|
1252 |
|
1253 |
|
1254 |
|
1255 |
|
1256 |
|
1257 |
|
1258 |
|
1259 |
|
1260 |
|
1261 |
|
1262 | function baseClone(value, bitmask, customizer, key, object, stack) {
|
1263 | var result,
|
1264 | isDeep = bitmask & CLONE_DEEP_FLAG,
|
1265 | isFlat = bitmask & CLONE_FLAT_FLAG,
|
1266 | isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
1267 |
|
1268 | if (customizer) {
|
1269 | result = object ? customizer(value, key, object, stack) : customizer(value);
|
1270 | }
|
1271 | if (result !== undefined) {
|
1272 | return result;
|
1273 | }
|
1274 | if (!isObject(value)) {
|
1275 | return value;
|
1276 | }
|
1277 | var isArr = isArray(value);
|
1278 | if (isArr) {
|
1279 | result = initCloneArray(value);
|
1280 | if (!isDeep) {
|
1281 | return copyArray(value, result);
|
1282 | }
|
1283 | } else {
|
1284 | var tag = getTag(value),
|
1285 | isFunc = tag == funcTag || tag == genTag;
|
1286 |
|
1287 | if (isBuffer(value)) {
|
1288 | return cloneBuffer(value, isDeep);
|
1289 | }
|
1290 | if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
1291 | result = (isFlat || isFunc) ? {} : initCloneObject(value);
|
1292 | if (!isDeep) {
|
1293 | return isFlat
|
1294 | ? copySymbolsIn(value, baseAssignIn(result, value))
|
1295 | : copySymbols(value, baseAssign(result, value));
|
1296 | }
|
1297 | } else {
|
1298 | if (!cloneableTags[tag]) {
|
1299 | return object ? value : {};
|
1300 | }
|
1301 | result = initCloneByTag(value, tag, isDeep);
|
1302 | }
|
1303 | }
|
1304 |
|
1305 | stack || (stack = new Stack);
|
1306 | var stacked = stack.get(value);
|
1307 | if (stacked) {
|
1308 | return stacked;
|
1309 | }
|
1310 | stack.set(value, result);
|
1311 |
|
1312 | if (isSet(value)) {
|
1313 | value.forEach(function(subValue) {
|
1314 | result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
1315 | });
|
1316 | } else if (isMap(value)) {
|
1317 | value.forEach(function(subValue, key) {
|
1318 | result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
1319 | });
|
1320 | }
|
1321 |
|
1322 | var keysFunc = isFull
|
1323 | ? (isFlat ? getAllKeysIn : getAllKeys)
|
1324 | : (isFlat ? keysIn : keys);
|
1325 |
|
1326 | var props = isArr ? undefined : keysFunc(value);
|
1327 | arrayEach(props || value, function(subValue, key) {
|
1328 | if (props) {
|
1329 | key = subValue;
|
1330 | subValue = value[key];
|
1331 | }
|
1332 |
|
1333 | assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
1334 | });
|
1335 | return result;
|
1336 | }
|
1337 |
|
1338 | module.exports = baseClone;
|
1339 |
|
1340 | },{"./_Stack":13,"./_arrayEach":19,"./_assignValue":28,"./_baseAssign":31,"./_baseAssignIn":32,"./_cloneBuffer":82,"./_copyArray":87,"./_copySymbols":89,"./_copySymbolsIn":90,"./_getAllKeys":103,"./_getAllKeysIn":104,"./_getTag":112,"./_initCloneArray":121,"./_initCloneByTag":122,"./_initCloneObject":123,"./isArray":198,"./isBuffer":201,"./isMap":207,"./isObject":209,"./isSet":212,"./keys":216,"./keysIn":217}],35:[function(require,module,exports){
|
1341 | var isObject = require('./isObject');
|
1342 |
|
1343 |
|
1344 | var objectCreate = Object.create;
|
1345 |
|
1346 |
|
1347 |
|
1348 |
|
1349 |
|
1350 |
|
1351 |
|
1352 |
|
1353 |
|
1354 | var baseCreate = (function() {
|
1355 | function object() {}
|
1356 | return function(proto) {
|
1357 | if (!isObject(proto)) {
|
1358 | return {};
|
1359 | }
|
1360 | if (objectCreate) {
|
1361 | return objectCreate(proto);
|
1362 | }
|
1363 | object.prototype = proto;
|
1364 | var result = new object;
|
1365 | object.prototype = undefined;
|
1366 | return result;
|
1367 | };
|
1368 | }());
|
1369 |
|
1370 | module.exports = baseCreate;
|
1371 |
|
1372 | },{"./isObject":209}],36:[function(require,module,exports){
|
1373 |
|
1374 | var FUNC_ERROR_TEXT = 'Expected a function';
|
1375 |
|
1376 |
|
1377 |
|
1378 |
|
1379 |
|
1380 |
|
1381 |
|
1382 |
|
1383 |
|
1384 |
|
1385 |
|
1386 | function baseDelay(func, wait, args) {
|
1387 | if (typeof func != 'function') {
|
1388 | throw new TypeError(FUNC_ERROR_TEXT);
|
1389 | }
|
1390 | return setTimeout(function() { func.apply(undefined, args); }, wait);
|
1391 | }
|
1392 |
|
1393 | module.exports = baseDelay;
|
1394 |
|
1395 | },{}],37:[function(require,module,exports){
|
1396 | var baseForOwn = require('./_baseForOwn'),
|
1397 | createBaseEach = require('./_createBaseEach');
|
1398 |
|
1399 |
|
1400 |
|
1401 |
|
1402 |
|
1403 |
|
1404 |
|
1405 |
|
1406 |
|
1407 | var baseEach = createBaseEach(baseForOwn);
|
1408 |
|
1409 | module.exports = baseEach;
|
1410 |
|
1411 | },{"./_baseForOwn":42,"./_createBaseEach":94}],38:[function(require,module,exports){
|
1412 | var baseEach = require('./_baseEach');
|
1413 |
|
1414 |
|
1415 |
|
1416 |
|
1417 |
|
1418 |
|
1419 |
|
1420 |
|
1421 |
|
1422 |
|
1423 | function baseEvery(collection, predicate) {
|
1424 | var result = true;
|
1425 | baseEach(collection, function(value, index, collection) {
|
1426 | result = !!predicate(value, index, collection);
|
1427 | return result;
|
1428 | });
|
1429 | return result;
|
1430 | }
|
1431 |
|
1432 | module.exports = baseEvery;
|
1433 |
|
1434 | },{"./_baseEach":37}],39:[function(require,module,exports){
|
1435 | var baseEach = require('./_baseEach');
|
1436 |
|
1437 |
|
1438 |
|
1439 |
|
1440 |
|
1441 |
|
1442 |
|
1443 |
|
1444 |
|
1445 | function baseFilter(collection, predicate) {
|
1446 | var result = [];
|
1447 | baseEach(collection, function(value, index, collection) {
|
1448 | if (predicate(value, index, collection)) {
|
1449 | result.push(value);
|
1450 | }
|
1451 | });
|
1452 | return result;
|
1453 | }
|
1454 |
|
1455 | module.exports = baseFilter;
|
1456 |
|
1457 | },{"./_baseEach":37}],40:[function(require,module,exports){
|
1458 |
|
1459 |
|
1460 |
|
1461 |
|
1462 |
|
1463 |
|
1464 |
|
1465 |
|
1466 |
|
1467 |
|
1468 |
|
1469 | function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
1470 | var length = array.length,
|
1471 | index = fromIndex + (fromRight ? 1 : -1);
|
1472 |
|
1473 | while ((fromRight ? index-- : ++index < length)) {
|
1474 | if (predicate(array[index], index, array)) {
|
1475 | return index;
|
1476 | }
|
1477 | }
|
1478 | return -1;
|
1479 | }
|
1480 |
|
1481 | module.exports = baseFindIndex;
|
1482 |
|
1483 | },{}],41:[function(require,module,exports){
|
1484 | var createBaseFor = require('./_createBaseFor');
|
1485 |
|
1486 |
|
1487 |
|
1488 |
|
1489 |
|
1490 |
|
1491 |
|
1492 |
|
1493 |
|
1494 |
|
1495 |
|
1496 |
|
1497 | var baseFor = createBaseFor();
|
1498 |
|
1499 | module.exports = baseFor;
|
1500 |
|
1501 | },{"./_createBaseFor":95}],42:[function(require,module,exports){
|
1502 | var baseFor = require('./_baseFor'),
|
1503 | keys = require('./keys');
|
1504 |
|
1505 |
|
1506 |
|
1507 |
|
1508 |
|
1509 |
|
1510 |
|
1511 |
|
1512 |
|
1513 | function baseForOwn(object, iteratee) {
|
1514 | return object && baseFor(object, iteratee, keys);
|
1515 | }
|
1516 |
|
1517 | module.exports = baseForOwn;
|
1518 |
|
1519 | },{"./_baseFor":41,"./keys":216}],43:[function(require,module,exports){
|
1520 | var castPath = require('./_castPath'),
|
1521 | toKey = require('./_toKey');
|
1522 |
|
1523 |
|
1524 |
|
1525 |
|
1526 |
|
1527 |
|
1528 |
|
1529 |
|
1530 |
|
1531 | function baseGet(object, path) {
|
1532 | path = castPath(path, object);
|
1533 |
|
1534 | var index = 0,
|
1535 | length = path.length;
|
1536 |
|
1537 | while (object != null && index < length) {
|
1538 | object = object[toKey(path[index++])];
|
1539 | }
|
1540 | return (index && index == length) ? object : undefined;
|
1541 | }
|
1542 |
|
1543 | module.exports = baseGet;
|
1544 |
|
1545 | },{"./_castPath":79,"./_toKey":167}],44:[function(require,module,exports){
|
1546 | var arrayPush = require('./_arrayPush'),
|
1547 | isArray = require('./isArray');
|
1548 |
|
1549 |
|
1550 |
|
1551 |
|
1552 |
|
1553 |
|
1554 |
|
1555 |
|
1556 |
|
1557 |
|
1558 |
|
1559 |
|
1560 | function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
1561 | var result = keysFunc(object);
|
1562 | return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
1563 | }
|
1564 |
|
1565 | module.exports = baseGetAllKeys;
|
1566 |
|
1567 | },{"./_arrayPush":24,"./isArray":198}],45:[function(require,module,exports){
|
1568 | var Symbol = require('./_Symbol'),
|
1569 | getRawTag = require('./_getRawTag'),
|
1570 | objectToString = require('./_objectToString');
|
1571 |
|
1572 |
|
1573 | var nullTag = '[object Null]',
|
1574 | undefinedTag = '[object Undefined]';
|
1575 |
|
1576 |
|
1577 | var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
1578 |
|
1579 |
|
1580 |
|
1581 |
|
1582 |
|
1583 |
|
1584 |
|
1585 |
|
1586 | function baseGetTag(value) {
|
1587 | if (value == null) {
|
1588 | return value === undefined ? undefinedTag : nullTag;
|
1589 | }
|
1590 | return (symToStringTag && symToStringTag in Object(value))
|
1591 | ? getRawTag(value)
|
1592 | : objectToString(value);
|
1593 | }
|
1594 |
|
1595 | module.exports = baseGetTag;
|
1596 |
|
1597 | },{"./_Symbol":14,"./_getRawTag":109,"./_objectToString":149}],46:[function(require,module,exports){
|
1598 |
|
1599 |
|
1600 |
|
1601 |
|
1602 |
|
1603 |
|
1604 |
|
1605 |
|
1606 | function baseHasIn(object, key) {
|
1607 | return object != null && key in Object(object);
|
1608 | }
|
1609 |
|
1610 | module.exports = baseHasIn;
|
1611 |
|
1612 | },{}],47:[function(require,module,exports){
|
1613 | var baseFindIndex = require('./_baseFindIndex'),
|
1614 | baseIsNaN = require('./_baseIsNaN'),
|
1615 | strictIndexOf = require('./_strictIndexOf');
|
1616 |
|
1617 |
|
1618 |
|
1619 |
|
1620 |
|
1621 |
|
1622 |
|
1623 |
|
1624 |
|
1625 |
|
1626 | function baseIndexOf(array, value, fromIndex) {
|
1627 | return value === value
|
1628 | ? strictIndexOf(array, value, fromIndex)
|
1629 | : baseFindIndex(array, baseIsNaN, fromIndex);
|
1630 | }
|
1631 |
|
1632 | module.exports = baseIndexOf;
|
1633 |
|
1634 | },{"./_baseFindIndex":40,"./_baseIsNaN":54,"./_strictIndexOf":164}],48:[function(require,module,exports){
|
1635 | var apply = require('./_apply'),
|
1636 | castPath = require('./_castPath'),
|
1637 | last = require('./last'),
|
1638 | parent = require('./_parent'),
|
1639 | toKey = require('./_toKey');
|
1640 |
|
1641 |
|
1642 |
|
1643 |
|
1644 |
|
1645 |
|
1646 |
|
1647 |
|
1648 |
|
1649 |
|
1650 |
|
1651 | function baseInvoke(object, path, args) {
|
1652 | path = castPath(path, object);
|
1653 | object = parent(object, path);
|
1654 | var func = object == null ? object : object[toKey(last(path))];
|
1655 | return func == null ? undefined : apply(func, object, args);
|
1656 | }
|
1657 |
|
1658 | module.exports = baseInvoke;
|
1659 |
|
1660 | },{"./_apply":17,"./_castPath":79,"./_parent":152,"./_toKey":167,"./last":218}],49:[function(require,module,exports){
|
1661 | var baseGetTag = require('./_baseGetTag'),
|
1662 | isObjectLike = require('./isObjectLike');
|
1663 |
|
1664 |
|
1665 | var argsTag = '[object Arguments]';
|
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 |
|
1671 |
|
1672 |
|
1673 |
|
1674 | function baseIsArguments(value) {
|
1675 | return isObjectLike(value) && baseGetTag(value) == argsTag;
|
1676 | }
|
1677 |
|
1678 | module.exports = baseIsArguments;
|
1679 |
|
1680 | },{"./_baseGetTag":45,"./isObjectLike":210}],50:[function(require,module,exports){
|
1681 | var baseIsEqualDeep = require('./_baseIsEqualDeep'),
|
1682 | isObjectLike = require('./isObjectLike');
|
1683 |
|
1684 |
|
1685 |
|
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 |
|
1691 |
|
1692 |
|
1693 |
|
1694 |
|
1695 |
|
1696 |
|
1697 |
|
1698 | function baseIsEqual(value, other, bitmask, customizer, stack) {
|
1699 | if (value === other) {
|
1700 | return true;
|
1701 | }
|
1702 | if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
|
1703 | return value !== value && other !== other;
|
1704 | }
|
1705 | return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
1706 | }
|
1707 |
|
1708 | module.exports = baseIsEqual;
|
1709 |
|
1710 | },{"./_baseIsEqualDeep":51,"./isObjectLike":210}],51:[function(require,module,exports){
|
1711 | var Stack = require('./_Stack'),
|
1712 | equalArrays = require('./_equalArrays'),
|
1713 | equalByTag = require('./_equalByTag'),
|
1714 | equalObjects = require('./_equalObjects'),
|
1715 | getTag = require('./_getTag'),
|
1716 | isArray = require('./isArray'),
|
1717 | isBuffer = require('./isBuffer'),
|
1718 | isTypedArray = require('./isTypedArray');
|
1719 |
|
1720 |
|
1721 | var COMPARE_PARTIAL_FLAG = 1;
|
1722 |
|
1723 |
|
1724 | var argsTag = '[object Arguments]',
|
1725 | arrayTag = '[object Array]',
|
1726 | objectTag = '[object Object]';
|
1727 |
|
1728 |
|
1729 | var objectProto = Object.prototype;
|
1730 |
|
1731 |
|
1732 | var hasOwnProperty = objectProto.hasOwnProperty;
|
1733 |
|
1734 |
|
1735 |
|
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 |
|
1744 |
|
1745 |
|
1746 |
|
1747 |
|
1748 | function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
1749 | var objIsArr = isArray(object),
|
1750 | othIsArr = isArray(other),
|
1751 | objTag = objIsArr ? arrayTag : getTag(object),
|
1752 | othTag = othIsArr ? arrayTag : getTag(other);
|
1753 |
|
1754 | objTag = objTag == argsTag ? objectTag : objTag;
|
1755 | othTag = othTag == argsTag ? objectTag : othTag;
|
1756 |
|
1757 | var objIsObj = objTag == objectTag,
|
1758 | othIsObj = othTag == objectTag,
|
1759 | isSameTag = objTag == othTag;
|
1760 |
|
1761 | if (isSameTag && isBuffer(object)) {
|
1762 | if (!isBuffer(other)) {
|
1763 | return false;
|
1764 | }
|
1765 | objIsArr = true;
|
1766 | objIsObj = false;
|
1767 | }
|
1768 | if (isSameTag && !objIsObj) {
|
1769 | stack || (stack = new Stack);
|
1770 | return (objIsArr || isTypedArray(object))
|
1771 | ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
1772 | : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
1773 | }
|
1774 | if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
1775 | var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
1776 | othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
1777 |
|
1778 | if (objIsWrapped || othIsWrapped) {
|
1779 | var objUnwrapped = objIsWrapped ? object.value() : object,
|
1780 | othUnwrapped = othIsWrapped ? other.value() : other;
|
1781 |
|
1782 | stack || (stack = new Stack);
|
1783 | return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
1784 | }
|
1785 | }
|
1786 | if (!isSameTag) {
|
1787 | return false;
|
1788 | }
|
1789 | stack || (stack = new Stack);
|
1790 | return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
1791 | }
|
1792 |
|
1793 | module.exports = baseIsEqualDeep;
|
1794 |
|
1795 | },{"./_Stack":13,"./_equalArrays":99,"./_equalByTag":100,"./_equalObjects":101,"./_getTag":112,"./isArray":198,"./isBuffer":201,"./isTypedArray":215}],52:[function(require,module,exports){
|
1796 | var getTag = require('./_getTag'),
|
1797 | isObjectLike = require('./isObjectLike');
|
1798 |
|
1799 |
|
1800 | var mapTag = '[object Map]';
|
1801 |
|
1802 |
|
1803 |
|
1804 |
|
1805 |
|
1806 |
|
1807 |
|
1808 |
|
1809 | function baseIsMap(value) {
|
1810 | return isObjectLike(value) && getTag(value) == mapTag;
|
1811 | }
|
1812 |
|
1813 | module.exports = baseIsMap;
|
1814 |
|
1815 | },{"./_getTag":112,"./isObjectLike":210}],53:[function(require,module,exports){
|
1816 | var Stack = require('./_Stack'),
|
1817 | baseIsEqual = require('./_baseIsEqual');
|
1818 |
|
1819 |
|
1820 | var COMPARE_PARTIAL_FLAG = 1,
|
1821 | COMPARE_UNORDERED_FLAG = 2;
|
1822 |
|
1823 |
|
1824 |
|
1825 |
|
1826 |
|
1827 |
|
1828 |
|
1829 |
|
1830 |
|
1831 |
|
1832 |
|
1833 | function baseIsMatch(object, source, matchData, customizer) {
|
1834 | var index = matchData.length,
|
1835 | length = index,
|
1836 | noCustomizer = !customizer;
|
1837 |
|
1838 | if (object == null) {
|
1839 | return !length;
|
1840 | }
|
1841 | object = Object(object);
|
1842 | while (index--) {
|
1843 | var data = matchData[index];
|
1844 | if ((noCustomizer && data[2])
|
1845 | ? data[1] !== object[data[0]]
|
1846 | : !(data[0] in object)
|
1847 | ) {
|
1848 | return false;
|
1849 | }
|
1850 | }
|
1851 | while (++index < length) {
|
1852 | data = matchData[index];
|
1853 | var key = data[0],
|
1854 | objValue = object[key],
|
1855 | srcValue = data[1];
|
1856 |
|
1857 | if (noCustomizer && data[2]) {
|
1858 | if (objValue === undefined && !(key in object)) {
|
1859 | return false;
|
1860 | }
|
1861 | } else {
|
1862 | var stack = new Stack;
|
1863 | if (customizer) {
|
1864 | var result = customizer(objValue, srcValue, key, object, source, stack);
|
1865 | }
|
1866 | if (!(result === undefined
|
1867 | ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
1868 | : result
|
1869 | )) {
|
1870 | return false;
|
1871 | }
|
1872 | }
|
1873 | }
|
1874 | return true;
|
1875 | }
|
1876 |
|
1877 | module.exports = baseIsMatch;
|
1878 |
|
1879 | },{"./_Stack":13,"./_baseIsEqual":50}],54:[function(require,module,exports){
|
1880 |
|
1881 |
|
1882 |
|
1883 |
|
1884 |
|
1885 |
|
1886 |
|
1887 | function baseIsNaN(value) {
|
1888 | return value !== value;
|
1889 | }
|
1890 |
|
1891 | module.exports = baseIsNaN;
|
1892 |
|
1893 | },{}],55:[function(require,module,exports){
|
1894 | var isFunction = require('./isFunction'),
|
1895 | isMasked = require('./_isMasked'),
|
1896 | isObject = require('./isObject'),
|
1897 | toSource = require('./_toSource');
|
1898 |
|
1899 |
|
1900 |
|
1901 |
|
1902 |
|
1903 | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
1904 |
|
1905 |
|
1906 | var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
1907 |
|
1908 |
|
1909 | var funcProto = Function.prototype,
|
1910 | objectProto = Object.prototype;
|
1911 |
|
1912 |
|
1913 | var funcToString = funcProto.toString;
|
1914 |
|
1915 |
|
1916 | var hasOwnProperty = objectProto.hasOwnProperty;
|
1917 |
|
1918 |
|
1919 | var reIsNative = RegExp('^' +
|
1920 | funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
1921 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
1922 | );
|
1923 |
|
1924 |
|
1925 |
|
1926 |
|
1927 |
|
1928 |
|
1929 |
|
1930 |
|
1931 |
|
1932 | function baseIsNative(value) {
|
1933 | if (!isObject(value) || isMasked(value)) {
|
1934 | return false;
|
1935 | }
|
1936 | var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
1937 | return pattern.test(toSource(value));
|
1938 | }
|
1939 |
|
1940 | module.exports = baseIsNative;
|
1941 |
|
1942 | },{"./_isMasked":128,"./_toSource":168,"./isFunction":205,"./isObject":209}],56:[function(require,module,exports){
|
1943 | var baseGetTag = require('./_baseGetTag'),
|
1944 | isObjectLike = require('./isObjectLike');
|
1945 |
|
1946 |
|
1947 | var regexpTag = '[object RegExp]';
|
1948 |
|
1949 |
|
1950 |
|
1951 |
|
1952 |
|
1953 |
|
1954 |
|
1955 |
|
1956 | function baseIsRegExp(value) {
|
1957 | return isObjectLike(value) && baseGetTag(value) == regexpTag;
|
1958 | }
|
1959 |
|
1960 | module.exports = baseIsRegExp;
|
1961 |
|
1962 | },{"./_baseGetTag":45,"./isObjectLike":210}],57:[function(require,module,exports){
|
1963 | var getTag = require('./_getTag'),
|
1964 | isObjectLike = require('./isObjectLike');
|
1965 |
|
1966 |
|
1967 | var setTag = '[object Set]';
|
1968 |
|
1969 |
|
1970 |
|
1971 |
|
1972 |
|
1973 |
|
1974 |
|
1975 |
|
1976 | function baseIsSet(value) {
|
1977 | return isObjectLike(value) && getTag(value) == setTag;
|
1978 | }
|
1979 |
|
1980 | module.exports = baseIsSet;
|
1981 |
|
1982 | },{"./_getTag":112,"./isObjectLike":210}],58:[function(require,module,exports){
|
1983 | var baseGetTag = require('./_baseGetTag'),
|
1984 | isLength = require('./isLength'),
|
1985 | isObjectLike = require('./isObjectLike');
|
1986 |
|
1987 |
|
1988 | var argsTag = '[object Arguments]',
|
1989 | arrayTag = '[object Array]',
|
1990 | boolTag = '[object Boolean]',
|
1991 | dateTag = '[object Date]',
|
1992 | errorTag = '[object Error]',
|
1993 | funcTag = '[object Function]',
|
1994 | mapTag = '[object Map]',
|
1995 | numberTag = '[object Number]',
|
1996 | objectTag = '[object Object]',
|
1997 | regexpTag = '[object RegExp]',
|
1998 | setTag = '[object Set]',
|
1999 | stringTag = '[object String]',
|
2000 | weakMapTag = '[object WeakMap]';
|
2001 |
|
2002 | var arrayBufferTag = '[object ArrayBuffer]',
|
2003 | dataViewTag = '[object DataView]',
|
2004 | float32Tag = '[object Float32Array]',
|
2005 | float64Tag = '[object Float64Array]',
|
2006 | int8Tag = '[object Int8Array]',
|
2007 | int16Tag = '[object Int16Array]',
|
2008 | int32Tag = '[object Int32Array]',
|
2009 | uint8Tag = '[object Uint8Array]',
|
2010 | uint8ClampedTag = '[object Uint8ClampedArray]',
|
2011 | uint16Tag = '[object Uint16Array]',
|
2012 | uint32Tag = '[object Uint32Array]';
|
2013 |
|
2014 |
|
2015 | var typedArrayTags = {};
|
2016 | typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
2017 | typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
2018 | typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
2019 | typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
2020 | typedArrayTags[uint32Tag] = true;
|
2021 | typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
2022 | typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
2023 | typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
2024 | typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
2025 | typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
2026 | typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
2027 | typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
2028 | typedArrayTags[weakMapTag] = false;
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 |
|
2035 |
|
2036 |
|
2037 | function baseIsTypedArray(value) {
|
2038 | return isObjectLike(value) &&
|
2039 | isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
2040 | }
|
2041 |
|
2042 | module.exports = baseIsTypedArray;
|
2043 |
|
2044 | },{"./_baseGetTag":45,"./isLength":206,"./isObjectLike":210}],59:[function(require,module,exports){
|
2045 | var baseMatches = require('./_baseMatches'),
|
2046 | baseMatchesProperty = require('./_baseMatchesProperty'),
|
2047 | identity = require('./identity'),
|
2048 | isArray = require('./isArray'),
|
2049 | property = require('./property');
|
2050 |
|
2051 |
|
2052 |
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 |
|
2058 | function baseIteratee(value) {
|
2059 |
|
2060 |
|
2061 | if (typeof value == 'function') {
|
2062 | return value;
|
2063 | }
|
2064 | if (value == null) {
|
2065 | return identity;
|
2066 | }
|
2067 | if (typeof value == 'object') {
|
2068 | return isArray(value)
|
2069 | ? baseMatchesProperty(value[0], value[1])
|
2070 | : baseMatches(value);
|
2071 | }
|
2072 | return property(value);
|
2073 | }
|
2074 |
|
2075 | module.exports = baseIteratee;
|
2076 |
|
2077 | },{"./_baseMatches":63,"./_baseMatchesProperty":64,"./identity":194,"./isArray":198,"./property":222}],60:[function(require,module,exports){
|
2078 | var isPrototype = require('./_isPrototype'),
|
2079 | nativeKeys = require('./_nativeKeys');
|
2080 |
|
2081 |
|
2082 | var objectProto = Object.prototype;
|
2083 |
|
2084 |
|
2085 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2086 |
|
2087 |
|
2088 |
|
2089 |
|
2090 |
|
2091 |
|
2092 |
|
2093 |
|
2094 | function baseKeys(object) {
|
2095 | if (!isPrototype(object)) {
|
2096 | return nativeKeys(object);
|
2097 | }
|
2098 | var result = [];
|
2099 | for (var key in Object(object)) {
|
2100 | if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
2101 | result.push(key);
|
2102 | }
|
2103 | }
|
2104 | return result;
|
2105 | }
|
2106 |
|
2107 | module.exports = baseKeys;
|
2108 |
|
2109 | },{"./_isPrototype":129,"./_nativeKeys":146}],61:[function(require,module,exports){
|
2110 | var isObject = require('./isObject'),
|
2111 | isPrototype = require('./_isPrototype'),
|
2112 | nativeKeysIn = require('./_nativeKeysIn');
|
2113 |
|
2114 |
|
2115 | var objectProto = Object.prototype;
|
2116 |
|
2117 |
|
2118 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2119 |
|
2120 |
|
2121 |
|
2122 |
|
2123 |
|
2124 |
|
2125 |
|
2126 |
|
2127 | function baseKeysIn(object) {
|
2128 | if (!isObject(object)) {
|
2129 | return nativeKeysIn(object);
|
2130 | }
|
2131 | var isProto = isPrototype(object),
|
2132 | result = [];
|
2133 |
|
2134 | for (var key in object) {
|
2135 | if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
2136 | result.push(key);
|
2137 | }
|
2138 | }
|
2139 | return result;
|
2140 | }
|
2141 |
|
2142 | module.exports = baseKeysIn;
|
2143 |
|
2144 | },{"./_isPrototype":129,"./_nativeKeysIn":147,"./isObject":209}],62:[function(require,module,exports){
|
2145 | var baseEach = require('./_baseEach'),
|
2146 | isArrayLike = require('./isArrayLike');
|
2147 |
|
2148 |
|
2149 |
|
2150 |
|
2151 |
|
2152 |
|
2153 |
|
2154 |
|
2155 |
|
2156 | function baseMap(collection, iteratee) {
|
2157 | var index = -1,
|
2158 | result = isArrayLike(collection) ? Array(collection.length) : [];
|
2159 |
|
2160 | baseEach(collection, function(value, key, collection) {
|
2161 | result[++index] = iteratee(value, key, collection);
|
2162 | });
|
2163 | return result;
|
2164 | }
|
2165 |
|
2166 | module.exports = baseMap;
|
2167 |
|
2168 | },{"./_baseEach":37,"./isArrayLike":199}],63:[function(require,module,exports){
|
2169 | var baseIsMatch = require('./_baseIsMatch'),
|
2170 | getMatchData = require('./_getMatchData'),
|
2171 | matchesStrictComparable = require('./_matchesStrictComparable');
|
2172 |
|
2173 |
|
2174 |
|
2175 |
|
2176 |
|
2177 |
|
2178 |
|
2179 |
|
2180 | function baseMatches(source) {
|
2181 | var matchData = getMatchData(source);
|
2182 | if (matchData.length == 1 && matchData[0][2]) {
|
2183 | return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
2184 | }
|
2185 | return function(object) {
|
2186 | return object === source || baseIsMatch(object, source, matchData);
|
2187 | };
|
2188 | }
|
2189 |
|
2190 | module.exports = baseMatches;
|
2191 |
|
2192 | },{"./_baseIsMatch":53,"./_getMatchData":106,"./_matchesStrictComparable":143}],64:[function(require,module,exports){
|
2193 | var baseIsEqual = require('./_baseIsEqual'),
|
2194 | get = require('./get'),
|
2195 | hasIn = require('./hasIn'),
|
2196 | isKey = require('./_isKey'),
|
2197 | isStrictComparable = require('./_isStrictComparable'),
|
2198 | matchesStrictComparable = require('./_matchesStrictComparable'),
|
2199 | toKey = require('./_toKey');
|
2200 |
|
2201 | /** Used to compose bitmasks for value comparisons. */
|
2202 | var COMPARE_PARTIAL_FLAG = 1,
|
2203 | COMPARE_UNORDERED_FLAG = 2;
|
2204 |
|
2205 | /**
|
2206 | * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
2207 | *
|
2208 | * @private
|
2209 | * @param {string} path The path of the property to get.
|
2210 | * @param {*} srcValue The value to match.
|
2211 | * @returns {Function} Returns the new spec function.
|
2212 | */
|
2213 | function baseMatchesProperty(path, srcValue) {
|
2214 | if (isKey(path) && isStrictComparable(srcValue)) {
|
2215 | return matchesStrictComparable(toKey(path), srcValue);
|
2216 | }
|
2217 | return function(object) {
|
2218 | var objValue = get(object, path);
|
2219 | return (objValue === undefined && objValue === srcValue)
|
2220 | ? hasIn(object, path)
|
2221 | : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
2222 | };
|
2223 | }
|
2224 |
|
2225 | module.exports = baseMatchesProperty;
|
2226 |
|
2227 | },{"./_baseIsEqual":50,"./_isKey":126,"./_isStrictComparable":130,"./_matchesStrictComparable":143,"./_toKey":167,"./get":191,"./hasIn":193}],65:[function(require,module,exports){
|
2228 |
|
2229 |
|
2230 |
|
2231 |
|
2232 |
|
2233 |
|
2234 |
|
2235 | function baseProperty(key) {
|
2236 | return function(object) {
|
2237 | return object == null ? undefined : object[key];
|
2238 | };
|
2239 | }
|
2240 |
|
2241 | module.exports = baseProperty;
|
2242 |
|
2243 | },{}],66:[function(require,module,exports){
|
2244 | var baseGet = require('./_baseGet');
|
2245 |
|
2246 |
|
2247 |
|
2248 |
|
2249 |
|
2250 |
|
2251 |
|
2252 |
|
2253 | function basePropertyDeep(path) {
|
2254 | return function(object) {
|
2255 | return baseGet(object, path);
|
2256 | };
|
2257 | }
|
2258 |
|
2259 | module.exports = basePropertyDeep;
|
2260 |
|
2261 | },{"./_baseGet":43}],67:[function(require,module,exports){
|
2262 |
|
2263 |
|
2264 |
|
2265 |
|
2266 |
|
2267 |
|
2268 |
|
2269 |
|
2270 |
|
2271 |
|
2272 |
|
2273 |
|
2274 |
|
2275 | function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
2276 | eachFunc(collection, function(value, index, collection) {
|
2277 | accumulator = initAccum
|
2278 | ? (initAccum = false, value)
|
2279 | : iteratee(accumulator, value, index, collection);
|
2280 | });
|
2281 | return accumulator;
|
2282 | }
|
2283 |
|
2284 | module.exports = baseReduce;
|
2285 |
|
2286 | },{}],68:[function(require,module,exports){
|
2287 | var identity = require('./identity'),
|
2288 | overRest = require('./_overRest'),
|
2289 | setToString = require('./_setToString');
|
2290 |
|
2291 |
|
2292 |
|
2293 |
|
2294 |
|
2295 |
|
2296 |
|
2297 |
|
2298 |
|
2299 | function baseRest(func, start) {
|
2300 | return setToString(overRest(func, start, identity), func + '');
|
2301 | }
|
2302 |
|
2303 | module.exports = baseRest;
|
2304 |
|
2305 | },{"./_overRest":151,"./_setToString":157,"./identity":194}],69:[function(require,module,exports){
|
2306 | var constant = require('./constant'),
|
2307 | defineProperty = require('./_defineProperty'),
|
2308 | identity = require('./identity');
|
2309 |
|
2310 |
|
2311 |
|
2312 |
|
2313 |
|
2314 |
|
2315 |
|
2316 |
|
2317 |
|
2318 | var baseSetToString = !defineProperty ? identity : function(func, string) {
|
2319 | return defineProperty(func, 'toString', {
|
2320 | 'configurable': true,
|
2321 | 'enumerable': false,
|
2322 | 'value': constant(string),
|
2323 | 'writable': true
|
2324 | });
|
2325 | };
|
2326 |
|
2327 | module.exports = baseSetToString;
|
2328 |
|
2329 | },{"./_defineProperty":98,"./constant":178,"./identity":194}],70:[function(require,module,exports){
|
2330 |
|
2331 |
|
2332 |
|
2333 |
|
2334 |
|
2335 |
|
2336 |
|
2337 |
|
2338 |
|
2339 | function baseSlice(array, start, end) {
|
2340 | var index = -1,
|
2341 | length = array.length;
|
2342 |
|
2343 | if (start < 0) {
|
2344 | start = -start > length ? 0 : (length + start);
|
2345 | }
|
2346 | end = end > length ? length : end;
|
2347 | if (end < 0) {
|
2348 | end += length;
|
2349 | }
|
2350 | length = start > end ? 0 : ((end - start) >>> 0);
|
2351 | start >>>= 0;
|
2352 |
|
2353 | var result = Array(length);
|
2354 | while (++index < length) {
|
2355 | result[index] = array[index + start];
|
2356 | }
|
2357 | return result;
|
2358 | }
|
2359 |
|
2360 | module.exports = baseSlice;
|
2361 |
|
2362 | },{}],71:[function(require,module,exports){
|
2363 | var baseEach = require('./_baseEach');
|
2364 |
|
2365 |
|
2366 |
|
2367 |
|
2368 |
|
2369 |
|
2370 |
|
2371 |
|
2372 |
|
2373 |
|
2374 | function baseSome(collection, predicate) {
|
2375 | var result;
|
2376 |
|
2377 | baseEach(collection, function(value, index, collection) {
|
2378 | result = predicate(value, index, collection);
|
2379 | return !result;
|
2380 | });
|
2381 | return !!result;
|
2382 | }
|
2383 |
|
2384 | module.exports = baseSome;
|
2385 |
|
2386 | },{"./_baseEach":37}],72:[function(require,module,exports){
|
2387 |
|
2388 |
|
2389 |
|
2390 |
|
2391 |
|
2392 |
|
2393 |
|
2394 |
|
2395 |
|
2396 | function baseTimes(n, iteratee) {
|
2397 | var index = -1,
|
2398 | result = Array(n);
|
2399 |
|
2400 | while (++index < n) {
|
2401 | result[index] = iteratee(index);
|
2402 | }
|
2403 | return result;
|
2404 | }
|
2405 |
|
2406 | module.exports = baseTimes;
|
2407 |
|
2408 | },{}],73:[function(require,module,exports){
|
2409 | var Symbol = require('./_Symbol'),
|
2410 | arrayMap = require('./_arrayMap'),
|
2411 | isArray = require('./isArray'),
|
2412 | isSymbol = require('./isSymbol');
|
2413 |
|
2414 |
|
2415 | var INFINITY = 1 / 0;
|
2416 |
|
2417 |
|
2418 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
2419 | symbolToString = symbolProto ? symbolProto.toString : undefined;
|
2420 |
|
2421 |
|
2422 |
|
2423 |
|
2424 |
|
2425 |
|
2426 |
|
2427 |
|
2428 |
|
2429 | function baseToString(value) {
|
2430 |
|
2431 | if (typeof value == 'string') {
|
2432 | return value;
|
2433 | }
|
2434 | if (isArray(value)) {
|
2435 |
|
2436 | return arrayMap(value, baseToString) + '';
|
2437 | }
|
2438 | if (isSymbol(value)) {
|
2439 | return symbolToString ? symbolToString.call(value) : '';
|
2440 | }
|
2441 | var result = (value + '');
|
2442 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
2443 | }
|
2444 |
|
2445 | module.exports = baseToString;
|
2446 |
|
2447 | },{"./_Symbol":14,"./_arrayMap":23,"./isArray":198,"./isSymbol":214}],74:[function(require,module,exports){
|
2448 | var trimmedEndIndex = require('./_trimmedEndIndex');
|
2449 |
|
2450 |
|
2451 | var reTrimStart = /^\s+/;
|
2452 |
|
2453 |
|
2454 |
|
2455 |
|
2456 |
|
2457 |
|
2458 |
|
2459 |
|
2460 | function baseTrim(string) {
|
2461 | return string
|
2462 | ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
2463 | : string;
|
2464 | }
|
2465 |
|
2466 | module.exports = baseTrim;
|
2467 |
|
2468 | },{"./_trimmedEndIndex":169}],75:[function(require,module,exports){
|
2469 |
|
2470 |
|
2471 |
|
2472 |
|
2473 |
|
2474 |
|
2475 |
|
2476 | function baseUnary(func) {
|
2477 | return function(value) {
|
2478 | return func(value);
|
2479 | };
|
2480 | }
|
2481 |
|
2482 | module.exports = baseUnary;
|
2483 |
|
2484 | },{}],76:[function(require,module,exports){
|
2485 | var arrayMap = require('./_arrayMap');
|
2486 |
|
2487 |
|
2488 |
|
2489 |
|
2490 |
|
2491 |
|
2492 |
|
2493 |
|
2494 |
|
2495 |
|
2496 |
|
2497 | function baseValues(object, props) {
|
2498 | return arrayMap(props, function(key) {
|
2499 | return object[key];
|
2500 | });
|
2501 | }
|
2502 |
|
2503 | module.exports = baseValues;
|
2504 |
|
2505 | },{"./_arrayMap":23}],77:[function(require,module,exports){
|
2506 |
|
2507 |
|
2508 |
|
2509 |
|
2510 |
|
2511 |
|
2512 |
|
2513 |
|
2514 | function cacheHas(cache, key) {
|
2515 | return cache.has(key);
|
2516 | }
|
2517 |
|
2518 | module.exports = cacheHas;
|
2519 |
|
2520 | },{}],78:[function(require,module,exports){
|
2521 | var identity = require('./identity');
|
2522 |
|
2523 |
|
2524 |
|
2525 |
|
2526 |
|
2527 |
|
2528 |
|
2529 |
|
2530 | function castFunction(value) {
|
2531 | return typeof value == 'function' ? value : identity;
|
2532 | }
|
2533 |
|
2534 | module.exports = castFunction;
|
2535 |
|
2536 | },{"./identity":194}],79:[function(require,module,exports){
|
2537 | var isArray = require('./isArray'),
|
2538 | isKey = require('./_isKey'),
|
2539 | stringToPath = require('./_stringToPath'),
|
2540 | toString = require('./toString');
|
2541 |
|
2542 |
|
2543 |
|
2544 |
|
2545 |
|
2546 |
|
2547 |
|
2548 |
|
2549 |
|
2550 | function castPath(value, object) {
|
2551 | if (isArray(value)) {
|
2552 | return value;
|
2553 | }
|
2554 | return isKey(value, object) ? [value] : stringToPath(toString(value));
|
2555 | }
|
2556 |
|
2557 | module.exports = castPath;
|
2558 |
|
2559 | },{"./_isKey":126,"./_stringToPath":166,"./isArray":198,"./toString":233}],80:[function(require,module,exports){
|
2560 | var baseSlice = require('./_baseSlice');
|
2561 |
|
2562 |
|
2563 |
|
2564 |
|
2565 |
|
2566 |
|
2567 |
|
2568 |
|
2569 |
|
2570 |
|
2571 | function castSlice(array, start, end) {
|
2572 | var length = array.length;
|
2573 | end = end === undefined ? length : end;
|
2574 | return (!start && end >= length) ? array : baseSlice(array, start, end);
|
2575 | }
|
2576 |
|
2577 | module.exports = castSlice;
|
2578 |
|
2579 | },{"./_baseSlice":70}],81:[function(require,module,exports){
|
2580 | var Uint8Array = require('./_Uint8Array');
|
2581 |
|
2582 |
|
2583 |
|
2584 |
|
2585 |
|
2586 |
|
2587 |
|
2588 |
|
2589 | function cloneArrayBuffer(arrayBuffer) {
|
2590 | var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
2591 | new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
2592 | return result;
|
2593 | }
|
2594 |
|
2595 | module.exports = cloneArrayBuffer;
|
2596 |
|
2597 | },{"./_Uint8Array":15}],82:[function(require,module,exports){
|
2598 | var root = require('./_root');
|
2599 |
|
2600 |
|
2601 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
2602 |
|
2603 |
|
2604 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
2605 |
|
2606 |
|
2607 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
2608 |
|
2609 |
|
2610 | var Buffer = moduleExports ? root.Buffer : undefined,
|
2611 | allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
2612 |
|
2613 |
|
2614 |
|
2615 |
|
2616 |
|
2617 |
|
2618 |
|
2619 |
|
2620 |
|
2621 | function cloneBuffer(buffer, isDeep) {
|
2622 | if (isDeep) {
|
2623 | return buffer.slice();
|
2624 | }
|
2625 | var length = buffer.length,
|
2626 | result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
2627 |
|
2628 | buffer.copy(result);
|
2629 | return result;
|
2630 | }
|
2631 |
|
2632 | module.exports = cloneBuffer;
|
2633 |
|
2634 | },{"./_root":153}],83:[function(require,module,exports){
|
2635 | var cloneArrayBuffer = require('./_cloneArrayBuffer');
|
2636 |
|
2637 |
|
2638 |
|
2639 |
|
2640 |
|
2641 |
|
2642 |
|
2643 |
|
2644 |
|
2645 | function cloneDataView(dataView, isDeep) {
|
2646 | var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
2647 | return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
2648 | }
|
2649 |
|
2650 | module.exports = cloneDataView;
|
2651 |
|
2652 | },{"./_cloneArrayBuffer":81}],84:[function(require,module,exports){
|
2653 |
|
2654 | var reFlags = /\w*$/;
|
2655 |
|
2656 |
|
2657 |
|
2658 |
|
2659 |
|
2660 |
|
2661 |
|
2662 |
|
2663 | function cloneRegExp(regexp) {
|
2664 | var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
2665 | result.lastIndex = regexp.lastIndex;
|
2666 | return result;
|
2667 | }
|
2668 |
|
2669 | module.exports = cloneRegExp;
|
2670 |
|
2671 | },{}],85:[function(require,module,exports){
|
2672 | var Symbol = require('./_Symbol');
|
2673 |
|
2674 |
|
2675 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
2676 | symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
2677 |
|
2678 |
|
2679 |
|
2680 |
|
2681 |
|
2682 |
|
2683 |
|
2684 |
|
2685 | function cloneSymbol(symbol) {
|
2686 | return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
2687 | }
|
2688 |
|
2689 | module.exports = cloneSymbol;
|
2690 |
|
2691 | },{"./_Symbol":14}],86:[function(require,module,exports){
|
2692 | var cloneArrayBuffer = require('./_cloneArrayBuffer');
|
2693 |
|
2694 |
|
2695 |
|
2696 |
|
2697 |
|
2698 |
|
2699 |
|
2700 |
|
2701 |
|
2702 | function cloneTypedArray(typedArray, isDeep) {
|
2703 | var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
2704 | return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
2705 | }
|
2706 |
|
2707 | module.exports = cloneTypedArray;
|
2708 |
|
2709 | },{"./_cloneArrayBuffer":81}],87:[function(require,module,exports){
|
2710 |
|
2711 |
|
2712 |
|
2713 |
|
2714 |
|
2715 |
|
2716 |
|
2717 |
|
2718 | function copyArray(source, array) {
|
2719 | var index = -1,
|
2720 | length = source.length;
|
2721 |
|
2722 | array || (array = Array(length));
|
2723 | while (++index < length) {
|
2724 | array[index] = source[index];
|
2725 | }
|
2726 | return array;
|
2727 | }
|
2728 |
|
2729 | module.exports = copyArray;
|
2730 |
|
2731 | },{}],88:[function(require,module,exports){
|
2732 | var assignValue = require('./_assignValue'),
|
2733 | baseAssignValue = require('./_baseAssignValue');
|
2734 |
|
2735 |
|
2736 |
|
2737 |
|
2738 |
|
2739 |
|
2740 |
|
2741 |
|
2742 |
|
2743 |
|
2744 |
|
2745 | function copyObject(source, props, object, customizer) {
|
2746 | var isNew = !object;
|
2747 | object || (object = {});
|
2748 |
|
2749 | var index = -1,
|
2750 | length = props.length;
|
2751 |
|
2752 | while (++index < length) {
|
2753 | var key = props[index];
|
2754 |
|
2755 | var newValue = customizer
|
2756 | ? customizer(object[key], source[key], key, object, source)
|
2757 | : undefined;
|
2758 |
|
2759 | if (newValue === undefined) {
|
2760 | newValue = source[key];
|
2761 | }
|
2762 | if (isNew) {
|
2763 | baseAssignValue(object, key, newValue);
|
2764 | } else {
|
2765 | assignValue(object, key, newValue);
|
2766 | }
|
2767 | }
|
2768 | return object;
|
2769 | }
|
2770 |
|
2771 | module.exports = copyObject;
|
2772 |
|
2773 | },{"./_assignValue":28,"./_baseAssignValue":33}],89:[function(require,module,exports){
|
2774 | var copyObject = require('./_copyObject'),
|
2775 | getSymbols = require('./_getSymbols');
|
2776 |
|
2777 |
|
2778 |
|
2779 |
|
2780 |
|
2781 |
|
2782 |
|
2783 |
|
2784 |
|
2785 | function copySymbols(source, object) {
|
2786 | return copyObject(source, getSymbols(source), object);
|
2787 | }
|
2788 |
|
2789 | module.exports = copySymbols;
|
2790 |
|
2791 | },{"./_copyObject":88,"./_getSymbols":110}],90:[function(require,module,exports){
|
2792 | var copyObject = require('./_copyObject'),
|
2793 | getSymbolsIn = require('./_getSymbolsIn');
|
2794 |
|
2795 |
|
2796 |
|
2797 |
|
2798 |
|
2799 |
|
2800 |
|
2801 |
|
2802 |
|
2803 | function copySymbolsIn(source, object) {
|
2804 | return copyObject(source, getSymbolsIn(source), object);
|
2805 | }
|
2806 |
|
2807 | module.exports = copySymbolsIn;
|
2808 |
|
2809 | },{"./_copyObject":88,"./_getSymbolsIn":111}],91:[function(require,module,exports){
|
2810 | var root = require('./_root');
|
2811 |
|
2812 |
|
2813 | var coreJsData = root['__core-js_shared__'];
|
2814 |
|
2815 | module.exports = coreJsData;
|
2816 |
|
2817 | },{"./_root":153}],92:[function(require,module,exports){
|
2818 | var arrayAggregator = require('./_arrayAggregator'),
|
2819 | baseAggregator = require('./_baseAggregator'),
|
2820 | baseIteratee = require('./_baseIteratee'),
|
2821 | isArray = require('./isArray');
|
2822 |
|
2823 |
|
2824 |
|
2825 |
|
2826 |
|
2827 |
|
2828 |
|
2829 |
|
2830 |
|
2831 | function createAggregator(setter, initializer) {
|
2832 | return function(collection, iteratee) {
|
2833 | var func = isArray(collection) ? arrayAggregator : baseAggregator,
|
2834 | accumulator = initializer ? initializer() : {};
|
2835 |
|
2836 | return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
|
2837 | };
|
2838 | }
|
2839 |
|
2840 | module.exports = createAggregator;
|
2841 |
|
2842 | },{"./_arrayAggregator":18,"./_baseAggregator":30,"./_baseIteratee":59,"./isArray":198}],93:[function(require,module,exports){
|
2843 | var baseRest = require('./_baseRest'),
|
2844 | isIterateeCall = require('./_isIterateeCall');
|
2845 |
|
2846 |
|
2847 |
|
2848 |
|
2849 |
|
2850 |
|
2851 |
|
2852 |
|
2853 | function createAssigner(assigner) {
|
2854 | return baseRest(function(object, sources) {
|
2855 | var index = -1,
|
2856 | length = sources.length,
|
2857 | customizer = length > 1 ? sources[length - 1] : undefined,
|
2858 | guard = length > 2 ? sources[2] : undefined;
|
2859 |
|
2860 | customizer = (assigner.length > 3 && typeof customizer == 'function')
|
2861 | ? (length--, customizer)
|
2862 | : undefined;
|
2863 |
|
2864 | if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
2865 | customizer = length < 3 ? undefined : customizer;
|
2866 | length = 1;
|
2867 | }
|
2868 | object = Object(object);
|
2869 | while (++index < length) {
|
2870 | var source = sources[index];
|
2871 | if (source) {
|
2872 | assigner(object, source, index, customizer);
|
2873 | }
|
2874 | }
|
2875 | return object;
|
2876 | });
|
2877 | }
|
2878 |
|
2879 | module.exports = createAssigner;
|
2880 |
|
2881 | },{"./_baseRest":68,"./_isIterateeCall":125}],94:[function(require,module,exports){
|
2882 | var isArrayLike = require('./isArrayLike');
|
2883 |
|
2884 |
|
2885 |
|
2886 |
|
2887 |
|
2888 |
|
2889 |
|
2890 |
|
2891 |
|
2892 | function createBaseEach(eachFunc, fromRight) {
|
2893 | return function(collection, iteratee) {
|
2894 | if (collection == null) {
|
2895 | return collection;
|
2896 | }
|
2897 | if (!isArrayLike(collection)) {
|
2898 | return eachFunc(collection, iteratee);
|
2899 | }
|
2900 | var length = collection.length,
|
2901 | index = fromRight ? length : -1,
|
2902 | iterable = Object(collection);
|
2903 |
|
2904 | while ((fromRight ? index-- : ++index < length)) {
|
2905 | if (iteratee(iterable[index], index, iterable) === false) {
|
2906 | break;
|
2907 | }
|
2908 | }
|
2909 | return collection;
|
2910 | };
|
2911 | }
|
2912 |
|
2913 | module.exports = createBaseEach;
|
2914 |
|
2915 | },{"./isArrayLike":199}],95:[function(require,module,exports){
|
2916 |
|
2917 |
|
2918 |
|
2919 |
|
2920 |
|
2921 |
|
2922 |
|
2923 | function createBaseFor(fromRight) {
|
2924 | return function(object, iteratee, keysFunc) {
|
2925 | var index = -1,
|
2926 | iterable = Object(object),
|
2927 | props = keysFunc(object),
|
2928 | length = props.length;
|
2929 |
|
2930 | while (length--) {
|
2931 | var key = props[fromRight ? length : ++index];
|
2932 | if (iteratee(iterable[key], key, iterable) === false) {
|
2933 | break;
|
2934 | }
|
2935 | }
|
2936 | return object;
|
2937 | };
|
2938 | }
|
2939 |
|
2940 | module.exports = createBaseFor;
|
2941 |
|
2942 | },{}],96:[function(require,module,exports){
|
2943 | var castSlice = require('./_castSlice'),
|
2944 | hasUnicode = require('./_hasUnicode'),
|
2945 | stringToArray = require('./_stringToArray'),
|
2946 | toString = require('./toString');
|
2947 |
|
2948 |
|
2949 |
|
2950 |
|
2951 |
|
2952 |
|
2953 |
|
2954 |
|
2955 | function createCaseFirst(methodName) {
|
2956 | return function(string) {
|
2957 | string = toString(string);
|
2958 |
|
2959 | var strSymbols = hasUnicode(string)
|
2960 | ? stringToArray(string)
|
2961 | : undefined;
|
2962 |
|
2963 | var chr = strSymbols
|
2964 | ? strSymbols[0]
|
2965 | : string.charAt(0);
|
2966 |
|
2967 | var trailing = strSymbols
|
2968 | ? castSlice(strSymbols, 1).join('')
|
2969 | : string.slice(1);
|
2970 |
|
2971 | return chr[methodName]() + trailing;
|
2972 | };
|
2973 | }
|
2974 |
|
2975 | module.exports = createCaseFirst;
|
2976 |
|
2977 | },{"./_castSlice":80,"./_hasUnicode":115,"./_stringToArray":165,"./toString":233}],97:[function(require,module,exports){
|
2978 | var baseIteratee = require('./_baseIteratee'),
|
2979 | isArrayLike = require('./isArrayLike'),
|
2980 | keys = require('./keys');
|
2981 |
|
2982 |
|
2983 |
|
2984 |
|
2985 |
|
2986 |
|
2987 |
|
2988 |
|
2989 | function createFind(findIndexFunc) {
|
2990 | return function(collection, predicate, fromIndex) {
|
2991 | var iterable = Object(collection);
|
2992 | if (!isArrayLike(collection)) {
|
2993 | var iteratee = baseIteratee(predicate, 3);
|
2994 | collection = keys(collection);
|
2995 | predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
2996 | }
|
2997 | var index = findIndexFunc(collection, predicate, fromIndex);
|
2998 | return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
|
2999 | };
|
3000 | }
|
3001 |
|
3002 | module.exports = createFind;
|
3003 |
|
3004 | },{"./_baseIteratee":59,"./isArrayLike":199,"./keys":216}],98:[function(require,module,exports){
|
3005 | var getNative = require('./_getNative');
|
3006 |
|
3007 | var defineProperty = (function() {
|
3008 | try {
|
3009 | var func = getNative(Object, 'defineProperty');
|
3010 | func({}, '', {});
|
3011 | return func;
|
3012 | } catch (e) {}
|
3013 | }());
|
3014 |
|
3015 | module.exports = defineProperty;
|
3016 |
|
3017 | },{"./_getNative":107}],99:[function(require,module,exports){
|
3018 | var SetCache = require('./_SetCache'),
|
3019 | arraySome = require('./_arraySome'),
|
3020 | cacheHas = require('./_cacheHas');
|
3021 |
|
3022 |
|
3023 | var COMPARE_PARTIAL_FLAG = 1,
|
3024 | COMPARE_UNORDERED_FLAG = 2;
|
3025 |
|
3026 |
|
3027 |
|
3028 |
|
3029 |
|
3030 |
|
3031 |
|
3032 |
|
3033 |
|
3034 |
|
3035 |
|
3036 |
|
3037 |
|
3038 |
|
3039 | function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
3040 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
3041 | arrLength = array.length,
|
3042 | othLength = other.length;
|
3043 |
|
3044 | if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
3045 | return false;
|
3046 | }
|
3047 |
|
3048 | var arrStacked = stack.get(array);
|
3049 | var othStacked = stack.get(other);
|
3050 | if (arrStacked && othStacked) {
|
3051 | return arrStacked == other && othStacked == array;
|
3052 | }
|
3053 | var index = -1,
|
3054 | result = true,
|
3055 | seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
|
3056 |
|
3057 | stack.set(array, other);
|
3058 | stack.set(other, array);
|
3059 |
|
3060 |
|
3061 | while (++index < arrLength) {
|
3062 | var arrValue = array[index],
|
3063 | othValue = other[index];
|
3064 |
|
3065 | if (customizer) {
|
3066 | var compared = isPartial
|
3067 | ? customizer(othValue, arrValue, index, other, array, stack)
|
3068 | : customizer(arrValue, othValue, index, array, other, stack);
|
3069 | }
|
3070 | if (compared !== undefined) {
|
3071 | if (compared) {
|
3072 | continue;
|
3073 | }
|
3074 | result = false;
|
3075 | break;
|
3076 | }
|
3077 |
|
3078 | if (seen) {
|
3079 | if (!arraySome(other, function(othValue, othIndex) {
|
3080 | if (!cacheHas(seen, othIndex) &&
|
3081 | (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
3082 | return seen.push(othIndex);
|
3083 | }
|
3084 | })) {
|
3085 | result = false;
|
3086 | break;
|
3087 | }
|
3088 | } else if (!(
|
3089 | arrValue === othValue ||
|
3090 | equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
3091 | )) {
|
3092 | result = false;
|
3093 | break;
|
3094 | }
|
3095 | }
|
3096 | stack['delete'](array);
|
3097 | stack['delete'](other);
|
3098 | return result;
|
3099 | }
|
3100 |
|
3101 | module.exports = equalArrays;
|
3102 |
|
3103 | },{"./_SetCache":12,"./_arraySome":26,"./_cacheHas":77}],100:[function(require,module,exports){
|
3104 | var Symbol = require('./_Symbol'),
|
3105 | Uint8Array = require('./_Uint8Array'),
|
3106 | eq = require('./eq'),
|
3107 | equalArrays = require('./_equalArrays'),
|
3108 | mapToArray = require('./_mapToArray'),
|
3109 | setToArray = require('./_setToArray');
|
3110 |
|
3111 |
|
3112 | var COMPARE_PARTIAL_FLAG = 1,
|
3113 | COMPARE_UNORDERED_FLAG = 2;
|
3114 |
|
3115 |
|
3116 | var boolTag = '[object Boolean]',
|
3117 | dateTag = '[object Date]',
|
3118 | errorTag = '[object Error]',
|
3119 | mapTag = '[object Map]',
|
3120 | numberTag = '[object Number]',
|
3121 | regexpTag = '[object RegExp]',
|
3122 | setTag = '[object Set]',
|
3123 | stringTag = '[object String]',
|
3124 | symbolTag = '[object Symbol]';
|
3125 |
|
3126 | var arrayBufferTag = '[object ArrayBuffer]',
|
3127 | dataViewTag = '[object DataView]';
|
3128 |
|
3129 |
|
3130 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
3131 | symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
3132 |
|
3133 |
|
3134 |
|
3135 |
|
3136 |
|
3137 |
|
3138 |
|
3139 |
|
3140 |
|
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 |
|
3146 |
|
3147 |
|
3148 |
|
3149 |
|
3150 | function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
3151 | switch (tag) {
|
3152 | case dataViewTag:
|
3153 | if ((object.byteLength != other.byteLength) ||
|
3154 | (object.byteOffset != other.byteOffset)) {
|
3155 | return false;
|
3156 | }
|
3157 | object = object.buffer;
|
3158 | other = other.buffer;
|
3159 |
|
3160 | case arrayBufferTag:
|
3161 | if ((object.byteLength != other.byteLength) ||
|
3162 | !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
3163 | return false;
|
3164 | }
|
3165 | return true;
|
3166 |
|
3167 | case boolTag:
|
3168 | case dateTag:
|
3169 | case numberTag:
|
3170 |
|
3171 |
|
3172 | return eq(+object, +other);
|
3173 |
|
3174 | case errorTag:
|
3175 | return object.name == other.name && object.message == other.message;
|
3176 |
|
3177 | case regexpTag:
|
3178 | case stringTag:
|
3179 |
|
3180 |
|
3181 |
|
3182 | return object == (other + '');
|
3183 |
|
3184 | case mapTag:
|
3185 | var convert = mapToArray;
|
3186 |
|
3187 | case setTag:
|
3188 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
3189 | convert || (convert = setToArray);
|
3190 |
|
3191 | if (object.size != other.size && !isPartial) {
|
3192 | return false;
|
3193 | }
|
3194 |
|
3195 | var stacked = stack.get(object);
|
3196 | if (stacked) {
|
3197 | return stacked == other;
|
3198 | }
|
3199 | bitmask |= COMPARE_UNORDERED_FLAG;
|
3200 |
|
3201 |
|
3202 | stack.set(object, other);
|
3203 | var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
3204 | stack['delete'](object);
|
3205 | return result;
|
3206 |
|
3207 | case symbolTag:
|
3208 | if (symbolValueOf) {
|
3209 | return symbolValueOf.call(object) == symbolValueOf.call(other);
|
3210 | }
|
3211 | }
|
3212 | return false;
|
3213 | }
|
3214 |
|
3215 | module.exports = equalByTag;
|
3216 |
|
3217 | },{"./_Symbol":14,"./_Uint8Array":15,"./_equalArrays":99,"./_mapToArray":142,"./_setToArray":156,"./eq":182}],101:[function(require,module,exports){
|
3218 | var getAllKeys = require('./_getAllKeys');
|
3219 |
|
3220 |
|
3221 | var COMPARE_PARTIAL_FLAG = 1;
|
3222 |
|
3223 |
|
3224 | var objectProto = Object.prototype;
|
3225 |
|
3226 |
|
3227 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3228 |
|
3229 |
|
3230 |
|
3231 |
|
3232 |
|
3233 |
|
3234 |
|
3235 |
|
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 |
|
3241 |
|
3242 | function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
3243 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
3244 | objProps = getAllKeys(object),
|
3245 | objLength = objProps.length,
|
3246 | othProps = getAllKeys(other),
|
3247 | othLength = othProps.length;
|
3248 |
|
3249 | if (objLength != othLength && !isPartial) {
|
3250 | return false;
|
3251 | }
|
3252 | var index = objLength;
|
3253 | while (index--) {
|
3254 | var key = objProps[index];
|
3255 | if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
3256 | return false;
|
3257 | }
|
3258 | }
|
3259 |
|
3260 | var objStacked = stack.get(object);
|
3261 | var othStacked = stack.get(other);
|
3262 | if (objStacked && othStacked) {
|
3263 | return objStacked == other && othStacked == object;
|
3264 | }
|
3265 | var result = true;
|
3266 | stack.set(object, other);
|
3267 | stack.set(other, object);
|
3268 |
|
3269 | var skipCtor = isPartial;
|
3270 | while (++index < objLength) {
|
3271 | key = objProps[index];
|
3272 | var objValue = object[key],
|
3273 | othValue = other[key];
|
3274 |
|
3275 | if (customizer) {
|
3276 | var compared = isPartial
|
3277 | ? customizer(othValue, objValue, key, other, object, stack)
|
3278 | : customizer(objValue, othValue, key, object, other, stack);
|
3279 | }
|
3280 |
|
3281 | if (!(compared === undefined
|
3282 | ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
3283 | : compared
|
3284 | )) {
|
3285 | result = false;
|
3286 | break;
|
3287 | }
|
3288 | skipCtor || (skipCtor = key == 'constructor');
|
3289 | }
|
3290 | if (result && !skipCtor) {
|
3291 | var objCtor = object.constructor,
|
3292 | othCtor = other.constructor;
|
3293 |
|
3294 |
|
3295 | if (objCtor != othCtor &&
|
3296 | ('constructor' in object && 'constructor' in other) &&
|
3297 | !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
|
3298 | typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
3299 | result = false;
|
3300 | }
|
3301 | }
|
3302 | stack['delete'](object);
|
3303 | stack['delete'](other);
|
3304 | return result;
|
3305 | }
|
3306 |
|
3307 | module.exports = equalObjects;
|
3308 |
|
3309 | },{"./_getAllKeys":103}],102:[function(require,module,exports){
|
3310 | (function (global){(function (){
|
3311 |
|
3312 | var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
3313 |
|
3314 | module.exports = freeGlobal;
|
3315 |
|
3316 | }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
3317 | },{}],103:[function(require,module,exports){
|
3318 | var baseGetAllKeys = require('./_baseGetAllKeys'),
|
3319 | getSymbols = require('./_getSymbols'),
|
3320 | keys = require('./keys');
|
3321 |
|
3322 |
|
3323 |
|
3324 |
|
3325 |
|
3326 |
|
3327 |
|
3328 |
|
3329 | function getAllKeys(object) {
|
3330 | return baseGetAllKeys(object, keys, getSymbols);
|
3331 | }
|
3332 |
|
3333 | module.exports = getAllKeys;
|
3334 |
|
3335 | },{"./_baseGetAllKeys":44,"./_getSymbols":110,"./keys":216}],104:[function(require,module,exports){
|
3336 | var baseGetAllKeys = require('./_baseGetAllKeys'),
|
3337 | getSymbolsIn = require('./_getSymbolsIn'),
|
3338 | keysIn = require('./keysIn');
|
3339 |
|
3340 |
|
3341 |
|
3342 |
|
3343 |
|
3344 |
|
3345 |
|
3346 |
|
3347 |
|
3348 | function getAllKeysIn(object) {
|
3349 | return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
3350 | }
|
3351 |
|
3352 | module.exports = getAllKeysIn;
|
3353 |
|
3354 | },{"./_baseGetAllKeys":44,"./_getSymbolsIn":111,"./keysIn":217}],105:[function(require,module,exports){
|
3355 | var isKeyable = require('./_isKeyable');
|
3356 |
|
3357 |
|
3358 |
|
3359 |
|
3360 |
|
3361 |
|
3362 |
|
3363 |
|
3364 |
|
3365 | function getMapData(map, key) {
|
3366 | var data = map.__data__;
|
3367 | return isKeyable(key)
|
3368 | ? data[typeof key == 'string' ? 'string' : 'hash']
|
3369 | : data.map;
|
3370 | }
|
3371 |
|
3372 | module.exports = getMapData;
|
3373 |
|
3374 | },{"./_isKeyable":127}],106:[function(require,module,exports){
|
3375 | var isStrictComparable = require('./_isStrictComparable'),
|
3376 | keys = require('./keys');
|
3377 |
|
3378 |
|
3379 |
|
3380 |
|
3381 |
|
3382 |
|
3383 |
|
3384 |
|
3385 | function getMatchData(object) {
|
3386 | var result = keys(object),
|
3387 | length = result.length;
|
3388 |
|
3389 | while (length--) {
|
3390 | var key = result[length],
|
3391 | value = object[key];
|
3392 |
|
3393 | result[length] = [key, value, isStrictComparable(value)];
|
3394 | }
|
3395 | return result;
|
3396 | }
|
3397 |
|
3398 | module.exports = getMatchData;
|
3399 |
|
3400 | },{"./_isStrictComparable":130,"./keys":216}],107:[function(require,module,exports){
|
3401 | var baseIsNative = require('./_baseIsNative'),
|
3402 | getValue = require('./_getValue');
|
3403 |
|
3404 |
|
3405 |
|
3406 |
|
3407 |
|
3408 |
|
3409 |
|
3410 |
|
3411 |
|
3412 | function getNative(object, key) {
|
3413 | var value = getValue(object, key);
|
3414 | return baseIsNative(value) ? value : undefined;
|
3415 | }
|
3416 |
|
3417 | module.exports = getNative;
|
3418 |
|
3419 | },{"./_baseIsNative":55,"./_getValue":113}],108:[function(require,module,exports){
|
3420 | var overArg = require('./_overArg');
|
3421 |
|
3422 |
|
3423 | var getPrototype = overArg(Object.getPrototypeOf, Object);
|
3424 |
|
3425 | module.exports = getPrototype;
|
3426 |
|
3427 | },{"./_overArg":150}],109:[function(require,module,exports){
|
3428 | var Symbol = require('./_Symbol');
|
3429 |
|
3430 |
|
3431 | var objectProto = Object.prototype;
|
3432 |
|
3433 |
|
3434 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3435 |
|
3436 |
|
3437 |
|
3438 |
|
3439 |
|
3440 |
|
3441 | var nativeObjectToString = objectProto.toString;
|
3442 |
|
3443 |
|
3444 | var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
3445 |
|
3446 |
|
3447 |
|
3448 |
|
3449 |
|
3450 |
|
3451 |
|
3452 |
|
3453 | function getRawTag(value) {
|
3454 | var isOwn = hasOwnProperty.call(value, symToStringTag),
|
3455 | tag = value[symToStringTag];
|
3456 |
|
3457 | try {
|
3458 | value[symToStringTag] = undefined;
|
3459 | var unmasked = true;
|
3460 | } catch (e) {}
|
3461 |
|
3462 | var result = nativeObjectToString.call(value);
|
3463 | if (unmasked) {
|
3464 | if (isOwn) {
|
3465 | value[symToStringTag] = tag;
|
3466 | } else {
|
3467 | delete value[symToStringTag];
|
3468 | }
|
3469 | }
|
3470 | return result;
|
3471 | }
|
3472 |
|
3473 | module.exports = getRawTag;
|
3474 |
|
3475 | },{"./_Symbol":14}],110:[function(require,module,exports){
|
3476 | var arrayFilter = require('./_arrayFilter'),
|
3477 | stubArray = require('./stubArray');
|
3478 |
|
3479 |
|
3480 | var objectProto = Object.prototype;
|
3481 |
|
3482 |
|
3483 | var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
3484 |
|
3485 |
|
3486 | var nativeGetSymbols = Object.getOwnPropertySymbols;
|
3487 |
|
3488 |
|
3489 |
|
3490 |
|
3491 |
|
3492 |
|
3493 |
|
3494 |
|
3495 | var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
3496 | if (object == null) {
|
3497 | return [];
|
3498 | }
|
3499 | object = Object(object);
|
3500 | return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
3501 | return propertyIsEnumerable.call(object, symbol);
|
3502 | });
|
3503 | };
|
3504 |
|
3505 | module.exports = getSymbols;
|
3506 |
|
3507 | },{"./_arrayFilter":21,"./stubArray":226}],111:[function(require,module,exports){
|
3508 | var arrayPush = require('./_arrayPush'),
|
3509 | getPrototype = require('./_getPrototype'),
|
3510 | getSymbols = require('./_getSymbols'),
|
3511 | stubArray = require('./stubArray');
|
3512 |
|
3513 |
|
3514 | var nativeGetSymbols = Object.getOwnPropertySymbols;
|
3515 |
|
3516 |
|
3517 |
|
3518 |
|
3519 |
|
3520 |
|
3521 |
|
3522 |
|
3523 | var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
3524 | var result = [];
|
3525 | while (object) {
|
3526 | arrayPush(result, getSymbols(object));
|
3527 | object = getPrototype(object);
|
3528 | }
|
3529 | return result;
|
3530 | };
|
3531 |
|
3532 | module.exports = getSymbolsIn;
|
3533 |
|
3534 | },{"./_arrayPush":24,"./_getPrototype":108,"./_getSymbols":110,"./stubArray":226}],112:[function(require,module,exports){
|
3535 | var DataView = require('./_DataView'),
|
3536 | Map = require('./_Map'),
|
3537 | Promise = require('./_Promise'),
|
3538 | Set = require('./_Set'),
|
3539 | WeakMap = require('./_WeakMap'),
|
3540 | baseGetTag = require('./_baseGetTag'),
|
3541 | toSource = require('./_toSource');
|
3542 |
|
3543 |
|
3544 | var mapTag = '[object Map]',
|
3545 | objectTag = '[object Object]',
|
3546 | promiseTag = '[object Promise]',
|
3547 | setTag = '[object Set]',
|
3548 | weakMapTag = '[object WeakMap]';
|
3549 |
|
3550 | var dataViewTag = '[object DataView]';
|
3551 |
|
3552 |
|
3553 | var dataViewCtorString = toSource(DataView),
|
3554 | mapCtorString = toSource(Map),
|
3555 | promiseCtorString = toSource(Promise),
|
3556 | setCtorString = toSource(Set),
|
3557 | weakMapCtorString = toSource(WeakMap);
|
3558 |
|
3559 |
|
3560 |
|
3561 |
|
3562 |
|
3563 |
|
3564 |
|
3565 |
|
3566 | var getTag = baseGetTag;
|
3567 |
|
3568 |
|
3569 | if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
3570 | (Map && getTag(new Map) != mapTag) ||
|
3571 | (Promise && getTag(Promise.resolve()) != promiseTag) ||
|
3572 | (Set && getTag(new Set) != setTag) ||
|
3573 | (WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
3574 | getTag = function(value) {
|
3575 | var result = baseGetTag(value),
|
3576 | Ctor = result == objectTag ? value.constructor : undefined,
|
3577 | ctorString = Ctor ? toSource(Ctor) : '';
|
3578 |
|
3579 | if (ctorString) {
|
3580 | switch (ctorString) {
|
3581 | case dataViewCtorString: return dataViewTag;
|
3582 | case mapCtorString: return mapTag;
|
3583 | case promiseCtorString: return promiseTag;
|
3584 | case setCtorString: return setTag;
|
3585 | case weakMapCtorString: return weakMapTag;
|
3586 | }
|
3587 | }
|
3588 | return result;
|
3589 | };
|
3590 | }
|
3591 |
|
3592 | module.exports = getTag;
|
3593 |
|
3594 | },{"./_DataView":5,"./_Map":8,"./_Promise":10,"./_Set":11,"./_WeakMap":16,"./_baseGetTag":45,"./_toSource":168}],113:[function(require,module,exports){
|
3595 |
|
3596 |
|
3597 |
|
3598 |
|
3599 |
|
3600 |
|
3601 |
|
3602 |
|
3603 | function getValue(object, key) {
|
3604 | return object == null ? undefined : object[key];
|
3605 | }
|
3606 |
|
3607 | module.exports = getValue;
|
3608 |
|
3609 | },{}],114:[function(require,module,exports){
|
3610 | var castPath = require('./_castPath'),
|
3611 | isArguments = require('./isArguments'),
|
3612 | isArray = require('./isArray'),
|
3613 | isIndex = require('./_isIndex'),
|
3614 | isLength = require('./isLength'),
|
3615 | toKey = require('./_toKey');
|
3616 |
|
3617 |
|
3618 |
|
3619 |
|
3620 |
|
3621 |
|
3622 |
|
3623 |
|
3624 |
|
3625 |
|
3626 | function hasPath(object, path, hasFunc) {
|
3627 | path = castPath(path, object);
|
3628 |
|
3629 | var index = -1,
|
3630 | length = path.length,
|
3631 | result = false;
|
3632 |
|
3633 | while (++index < length) {
|
3634 | var key = toKey(path[index]);
|
3635 | if (!(result = object != null && hasFunc(object, key))) {
|
3636 | break;
|
3637 | }
|
3638 | object = object[key];
|
3639 | }
|
3640 | if (result || ++index != length) {
|
3641 | return result;
|
3642 | }
|
3643 | length = object == null ? 0 : object.length;
|
3644 | return !!length && isLength(length) && isIndex(key, length) &&
|
3645 | (isArray(object) || isArguments(object));
|
3646 | }
|
3647 |
|
3648 | module.exports = hasPath;
|
3649 |
|
3650 | },{"./_castPath":79,"./_isIndex":124,"./_toKey":167,"./isArguments":197,"./isArray":198,"./isLength":206}],115:[function(require,module,exports){
|
3651 |
|
3652 | var rsAstralRange = '\\ud800-\\udfff',
|
3653 | rsComboMarksRange = '\\u0300-\\u036f',
|
3654 | reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
3655 | rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
3656 | rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
3657 | rsVarRange = '\\ufe0e\\ufe0f';
|
3658 |
|
3659 |
|
3660 | var rsZWJ = '\\u200d';
|
3661 |
|
3662 |
|
3663 | var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
3664 |
|
3665 |
|
3666 |
|
3667 |
|
3668 |
|
3669 |
|
3670 |
|
3671 |
|
3672 | function hasUnicode(string) {
|
3673 | return reHasUnicode.test(string);
|
3674 | }
|
3675 |
|
3676 | module.exports = hasUnicode;
|
3677 |
|
3678 | },{}],116:[function(require,module,exports){
|
3679 | var nativeCreate = require('./_nativeCreate');
|
3680 |
|
3681 |
|
3682 |
|
3683 |
|
3684 |
|
3685 |
|
3686 |
|
3687 |
|
3688 | function hashClear() {
|
3689 | this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
3690 | this.size = 0;
|
3691 | }
|
3692 |
|
3693 | module.exports = hashClear;
|
3694 |
|
3695 | },{"./_nativeCreate":145}],117:[function(require,module,exports){
|
3696 |
|
3697 |
|
3698 |
|
3699 |
|
3700 |
|
3701 |
|
3702 |
|
3703 |
|
3704 |
|
3705 |
|
3706 | function hashDelete(key) {
|
3707 | var result = this.has(key) && delete this.__data__[key];
|
3708 | this.size -= result ? 1 : 0;
|
3709 | return result;
|
3710 | }
|
3711 |
|
3712 | module.exports = hashDelete;
|
3713 |
|
3714 | },{}],118:[function(require,module,exports){
|
3715 | var nativeCreate = require('./_nativeCreate');
|
3716 |
|
3717 |
|
3718 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
3719 |
|
3720 |
|
3721 | var objectProto = Object.prototype;
|
3722 |
|
3723 |
|
3724 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3725 |
|
3726 |
|
3727 |
|
3728 |
|
3729 |
|
3730 |
|
3731 |
|
3732 |
|
3733 |
|
3734 |
|
3735 | function hashGet(key) {
|
3736 | var data = this.__data__;
|
3737 | if (nativeCreate) {
|
3738 | var result = data[key];
|
3739 | return result === HASH_UNDEFINED ? undefined : result;
|
3740 | }
|
3741 | return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
3742 | }
|
3743 |
|
3744 | module.exports = hashGet;
|
3745 |
|
3746 | },{"./_nativeCreate":145}],119:[function(require,module,exports){
|
3747 | var nativeCreate = require('./_nativeCreate');
|
3748 |
|
3749 |
|
3750 | var objectProto = Object.prototype;
|
3751 |
|
3752 |
|
3753 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3754 |
|
3755 |
|
3756 |
|
3757 |
|
3758 |
|
3759 |
|
3760 |
|
3761 |
|
3762 |
|
3763 |
|
3764 | function hashHas(key) {
|
3765 | var data = this.__data__;
|
3766 | return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
3767 | }
|
3768 |
|
3769 | module.exports = hashHas;
|
3770 |
|
3771 | },{"./_nativeCreate":145}],120:[function(require,module,exports){
|
3772 | var nativeCreate = require('./_nativeCreate');
|
3773 |
|
3774 |
|
3775 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
3776 |
|
3777 |
|
3778 |
|
3779 |
|
3780 |
|
3781 |
|
3782 |
|
3783 |
|
3784 |
|
3785 |
|
3786 |
|
3787 | function hashSet(key, value) {
|
3788 | var data = this.__data__;
|
3789 | this.size += this.has(key) ? 0 : 1;
|
3790 | data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
3791 | return this;
|
3792 | }
|
3793 |
|
3794 | module.exports = hashSet;
|
3795 |
|
3796 | },{"./_nativeCreate":145}],121:[function(require,module,exports){
|
3797 |
|
3798 | var objectProto = Object.prototype;
|
3799 |
|
3800 |
|
3801 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3802 |
|
3803 |
|
3804 |
|
3805 |
|
3806 |
|
3807 |
|
3808 |
|
3809 |
|
3810 | function initCloneArray(array) {
|
3811 | var length = array.length,
|
3812 | result = new array.constructor(length);
|
3813 |
|
3814 |
|
3815 | if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
3816 | result.index = array.index;
|
3817 | result.input = array.input;
|
3818 | }
|
3819 | return result;
|
3820 | }
|
3821 |
|
3822 | module.exports = initCloneArray;
|
3823 |
|
3824 | },{}],122:[function(require,module,exports){
|
3825 | var cloneArrayBuffer = require('./_cloneArrayBuffer'),
|
3826 | cloneDataView = require('./_cloneDataView'),
|
3827 | cloneRegExp = require('./_cloneRegExp'),
|
3828 | cloneSymbol = require('./_cloneSymbol'),
|
3829 | cloneTypedArray = require('./_cloneTypedArray');
|
3830 |
|
3831 |
|
3832 | var boolTag = '[object Boolean]',
|
3833 | dateTag = '[object Date]',
|
3834 | mapTag = '[object Map]',
|
3835 | numberTag = '[object Number]',
|
3836 | regexpTag = '[object RegExp]',
|
3837 | setTag = '[object Set]',
|
3838 | stringTag = '[object String]',
|
3839 | symbolTag = '[object Symbol]';
|
3840 |
|
3841 | var arrayBufferTag = '[object ArrayBuffer]',
|
3842 | dataViewTag = '[object DataView]',
|
3843 | float32Tag = '[object Float32Array]',
|
3844 | float64Tag = '[object Float64Array]',
|
3845 | int8Tag = '[object Int8Array]',
|
3846 | int16Tag = '[object Int16Array]',
|
3847 | int32Tag = '[object Int32Array]',
|
3848 | uint8Tag = '[object Uint8Array]',
|
3849 | uint8ClampedTag = '[object Uint8ClampedArray]',
|
3850 | uint16Tag = '[object Uint16Array]',
|
3851 | uint32Tag = '[object Uint32Array]';
|
3852 |
|
3853 |
|
3854 |
|
3855 |
|
3856 |
|
3857 |
|
3858 |
|
3859 |
|
3860 |
|
3861 |
|
3862 |
|
3863 |
|
3864 |
|
3865 | function initCloneByTag(object, tag, isDeep) {
|
3866 | var Ctor = object.constructor;
|
3867 | switch (tag) {
|
3868 | case arrayBufferTag:
|
3869 | return cloneArrayBuffer(object);
|
3870 |
|
3871 | case boolTag:
|
3872 | case dateTag:
|
3873 | return new Ctor(+object);
|
3874 |
|
3875 | case dataViewTag:
|
3876 | return cloneDataView(object, isDeep);
|
3877 |
|
3878 | case float32Tag: case float64Tag:
|
3879 | case int8Tag: case int16Tag: case int32Tag:
|
3880 | case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
3881 | return cloneTypedArray(object, isDeep);
|
3882 |
|
3883 | case mapTag:
|
3884 | return new Ctor;
|
3885 |
|
3886 | case numberTag:
|
3887 | case stringTag:
|
3888 | return new Ctor(object);
|
3889 |
|
3890 | case regexpTag:
|
3891 | return cloneRegExp(object);
|
3892 |
|
3893 | case setTag:
|
3894 | return new Ctor;
|
3895 |
|
3896 | case symbolTag:
|
3897 | return cloneSymbol(object);
|
3898 | }
|
3899 | }
|
3900 |
|
3901 | module.exports = initCloneByTag;
|
3902 |
|
3903 | },{"./_cloneArrayBuffer":81,"./_cloneDataView":83,"./_cloneRegExp":84,"./_cloneSymbol":85,"./_cloneTypedArray":86}],123:[function(require,module,exports){
|
3904 | var baseCreate = require('./_baseCreate'),
|
3905 | getPrototype = require('./_getPrototype'),
|
3906 | isPrototype = require('./_isPrototype');
|
3907 |
|
3908 |
|
3909 |
|
3910 |
|
3911 |
|
3912 |
|
3913 |
|
3914 |
|
3915 | function initCloneObject(object) {
|
3916 | return (typeof object.constructor == 'function' && !isPrototype(object))
|
3917 | ? baseCreate(getPrototype(object))
|
3918 | : {};
|
3919 | }
|
3920 |
|
3921 | module.exports = initCloneObject;
|
3922 |
|
3923 | },{"./_baseCreate":35,"./_getPrototype":108,"./_isPrototype":129}],124:[function(require,module,exports){
|
3924 |
|
3925 | var MAX_SAFE_INTEGER = 9007199254740991;
|
3926 |
|
3927 |
|
3928 | var reIsUint = /^(?:0|[1-9]\d*)$/;
|
3929 |
|
3930 |
|
3931 |
|
3932 |
|
3933 |
|
3934 |
|
3935 |
|
3936 |
|
3937 |
|
3938 | function isIndex(value, length) {
|
3939 | var type = typeof value;
|
3940 | length = length == null ? MAX_SAFE_INTEGER : length;
|
3941 |
|
3942 | return !!length &&
|
3943 | (type == 'number' ||
|
3944 | (type != 'symbol' && reIsUint.test(value))) &&
|
3945 | (value > -1 && value % 1 == 0 && value < length);
|
3946 | }
|
3947 |
|
3948 | module.exports = isIndex;
|
3949 |
|
3950 | },{}],125:[function(require,module,exports){
|
3951 | var eq = require('./eq'),
|
3952 | isArrayLike = require('./isArrayLike'),
|
3953 | isIndex = require('./_isIndex'),
|
3954 | isObject = require('./isObject');
|
3955 |
|
3956 |
|
3957 |
|
3958 |
|
3959 |
|
3960 |
|
3961 |
|
3962 |
|
3963 |
|
3964 |
|
3965 |
|
3966 | function isIterateeCall(value, index, object) {
|
3967 | if (!isObject(object)) {
|
3968 | return false;
|
3969 | }
|
3970 | var type = typeof index;
|
3971 | if (type == 'number'
|
3972 | ? (isArrayLike(object) && isIndex(index, object.length))
|
3973 | : (type == 'string' && index in object)
|
3974 | ) {
|
3975 | return eq(object[index], value);
|
3976 | }
|
3977 | return false;
|
3978 | }
|
3979 |
|
3980 | module.exports = isIterateeCall;
|
3981 |
|
3982 | },{"./_isIndex":124,"./eq":182,"./isArrayLike":199,"./isObject":209}],126:[function(require,module,exports){
|
3983 | var isArray = require('./isArray'),
|
3984 | isSymbol = require('./isSymbol');
|
3985 |
|
3986 |
|
3987 | var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
3988 | reIsPlainProp = /^\w*$/;
|
3989 |
|
3990 |
|
3991 |
|
3992 |
|
3993 |
|
3994 |
|
3995 |
|
3996 |
|
3997 |
|
3998 | function isKey(value, object) {
|
3999 | if (isArray(value)) {
|
4000 | return false;
|
4001 | }
|
4002 | var type = typeof value;
|
4003 | if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
4004 | value == null || isSymbol(value)) {
|
4005 | return true;
|
4006 | }
|
4007 | return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
4008 | (object != null && value in Object(object));
|
4009 | }
|
4010 |
|
4011 | module.exports = isKey;
|
4012 |
|
4013 | },{"./isArray":198,"./isSymbol":214}],127:[function(require,module,exports){
|
4014 |
|
4015 |
|
4016 |
|
4017 |
|
4018 |
|
4019 |
|
4020 |
|
4021 | function isKeyable(value) {
|
4022 | var type = typeof value;
|
4023 | return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
4024 | ? (value !== '__proto__')
|
4025 | : (value === null);
|
4026 | }
|
4027 |
|
4028 | module.exports = isKeyable;
|
4029 |
|
4030 | },{}],128:[function(require,module,exports){
|
4031 | var coreJsData = require('./_coreJsData');
|
4032 |
|
4033 |
|
4034 | var maskSrcKey = (function() {
|
4035 | var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
4036 | return uid ? ('Symbol(src)_1.' + uid) : '';
|
4037 | }());
|
4038 |
|
4039 |
|
4040 |
|
4041 |
|
4042 |
|
4043 |
|
4044 |
|
4045 |
|
4046 | function isMasked(func) {
|
4047 | return !!maskSrcKey && (maskSrcKey in func);
|
4048 | }
|
4049 |
|
4050 | module.exports = isMasked;
|
4051 |
|
4052 | },{"./_coreJsData":91}],129:[function(require,module,exports){
|
4053 |
|
4054 | var objectProto = Object.prototype;
|
4055 |
|
4056 |
|
4057 |
|
4058 |
|
4059 |
|
4060 |
|
4061 |
|
4062 |
|
4063 | function isPrototype(value) {
|
4064 | var Ctor = value && value.constructor,
|
4065 | proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
4066 |
|
4067 | return value === proto;
|
4068 | }
|
4069 |
|
4070 | module.exports = isPrototype;
|
4071 |
|
4072 | },{}],130:[function(require,module,exports){
|
4073 | var isObject = require('./isObject');
|
4074 |
|
4075 |
|
4076 |
|
4077 |
|
4078 |
|
4079 |
|
4080 |
|
4081 |
|
4082 |
|
4083 | function isStrictComparable(value) {
|
4084 | return value === value && !isObject(value);
|
4085 | }
|
4086 |
|
4087 | module.exports = isStrictComparable;
|
4088 |
|
4089 | },{"./isObject":209}],131:[function(require,module,exports){
|
4090 |
|
4091 |
|
4092 |
|
4093 |
|
4094 |
|
4095 |
|
4096 |
|
4097 | function iteratorToArray(iterator) {
|
4098 | var data,
|
4099 | result = [];
|
4100 |
|
4101 | while (!(data = iterator.next()).done) {
|
4102 | result.push(data.value);
|
4103 | }
|
4104 | return result;
|
4105 | }
|
4106 |
|
4107 | module.exports = iteratorToArray;
|
4108 |
|
4109 | },{}],132:[function(require,module,exports){
|
4110 |
|
4111 |
|
4112 |
|
4113 |
|
4114 |
|
4115 |
|
4116 |
|
4117 | function listCacheClear() {
|
4118 | this.__data__ = [];
|
4119 | this.size = 0;
|
4120 | }
|
4121 |
|
4122 | module.exports = listCacheClear;
|
4123 |
|
4124 | },{}],133:[function(require,module,exports){
|
4125 | var assocIndexOf = require('./_assocIndexOf');
|
4126 |
|
4127 |
|
4128 | var arrayProto = Array.prototype;
|
4129 |
|
4130 |
|
4131 | var splice = arrayProto.splice;
|
4132 |
|
4133 |
|
4134 |
|
4135 |
|
4136 |
|
4137 |
|
4138 |
|
4139 |
|
4140 |
|
4141 |
|
4142 | function listCacheDelete(key) {
|
4143 | var data = this.__data__,
|
4144 | index = assocIndexOf(data, key);
|
4145 |
|
4146 | if (index < 0) {
|
4147 | return false;
|
4148 | }
|
4149 | var lastIndex = data.length - 1;
|
4150 | if (index == lastIndex) {
|
4151 | data.pop();
|
4152 | } else {
|
4153 | splice.call(data, index, 1);
|
4154 | }
|
4155 | --this.size;
|
4156 | return true;
|
4157 | }
|
4158 |
|
4159 | module.exports = listCacheDelete;
|
4160 |
|
4161 | },{"./_assocIndexOf":29}],134:[function(require,module,exports){
|
4162 | var assocIndexOf = require('./_assocIndexOf');
|
4163 |
|
4164 |
|
4165 |
|
4166 |
|
4167 |
|
4168 |
|
4169 |
|
4170 |
|
4171 |
|
4172 |
|
4173 | function listCacheGet(key) {
|
4174 | var data = this.__data__,
|
4175 | index = assocIndexOf(data, key);
|
4176 |
|
4177 | return index < 0 ? undefined : data[index][1];
|
4178 | }
|
4179 |
|
4180 | module.exports = listCacheGet;
|
4181 |
|
4182 | },{"./_assocIndexOf":29}],135:[function(require,module,exports){
|
4183 | var assocIndexOf = require('./_assocIndexOf');
|
4184 |
|
4185 |
|
4186 |
|
4187 |
|
4188 |
|
4189 |
|
4190 |
|
4191 |
|
4192 |
|
4193 |
|
4194 | function listCacheHas(key) {
|
4195 | return assocIndexOf(this.__data__, key) > -1;
|
4196 | }
|
4197 |
|
4198 | module.exports = listCacheHas;
|
4199 |
|
4200 | },{"./_assocIndexOf":29}],136:[function(require,module,exports){
|
4201 | var assocIndexOf = require('./_assocIndexOf');
|
4202 |
|
4203 |
|
4204 |
|
4205 |
|
4206 |
|
4207 |
|
4208 |
|
4209 |
|
4210 |
|
4211 |
|
4212 |
|
4213 | function listCacheSet(key, value) {
|
4214 | var data = this.__data__,
|
4215 | index = assocIndexOf(data, key);
|
4216 |
|
4217 | if (index < 0) {
|
4218 | ++this.size;
|
4219 | data.push([key, value]);
|
4220 | } else {
|
4221 | data[index][1] = value;
|
4222 | }
|
4223 | return this;
|
4224 | }
|
4225 |
|
4226 | module.exports = listCacheSet;
|
4227 |
|
4228 | },{"./_assocIndexOf":29}],137:[function(require,module,exports){
|
4229 | var Hash = require('./_Hash'),
|
4230 | ListCache = require('./_ListCache'),
|
4231 | Map = require('./_Map');
|
4232 |
|
4233 |
|
4234 |
|
4235 |
|
4236 |
|
4237 |
|
4238 |
|
4239 |
|
4240 | function mapCacheClear() {
|
4241 | this.size = 0;
|
4242 | this.__data__ = {
|
4243 | 'hash': new Hash,
|
4244 | 'map': new (Map || ListCache),
|
4245 | 'string': new Hash
|
4246 | };
|
4247 | }
|
4248 |
|
4249 | module.exports = mapCacheClear;
|
4250 |
|
4251 | },{"./_Hash":6,"./_ListCache":7,"./_Map":8}],138:[function(require,module,exports){
|
4252 | var getMapData = require('./_getMapData');
|
4253 |
|
4254 |
|
4255 |
|
4256 |
|
4257 |
|
4258 |
|
4259 |
|
4260 |
|
4261 |
|
4262 |
|
4263 | function mapCacheDelete(key) {
|
4264 | var result = getMapData(this, key)['delete'](key);
|
4265 | this.size -= result ? 1 : 0;
|
4266 | return result;
|
4267 | }
|
4268 |
|
4269 | module.exports = mapCacheDelete;
|
4270 |
|
4271 | },{"./_getMapData":105}],139:[function(require,module,exports){
|
4272 | var getMapData = require('./_getMapData');
|
4273 |
|
4274 |
|
4275 |
|
4276 |
|
4277 |
|
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 | function mapCacheGet(key) {
|
4284 | return getMapData(this, key).get(key);
|
4285 | }
|
4286 |
|
4287 | module.exports = mapCacheGet;
|
4288 |
|
4289 | },{"./_getMapData":105}],140:[function(require,module,exports){
|
4290 | var getMapData = require('./_getMapData');
|
4291 |
|
4292 |
|
4293 |
|
4294 |
|
4295 |
|
4296 |
|
4297 |
|
4298 |
|
4299 |
|
4300 |
|
4301 | function mapCacheHas(key) {
|
4302 | return getMapData(this, key).has(key);
|
4303 | }
|
4304 |
|
4305 | module.exports = mapCacheHas;
|
4306 |
|
4307 | },{"./_getMapData":105}],141:[function(require,module,exports){
|
4308 | var getMapData = require('./_getMapData');
|
4309 |
|
4310 |
|
4311 |
|
4312 |
|
4313 |
|
4314 |
|
4315 |
|
4316 |
|
4317 |
|
4318 |
|
4319 |
|
4320 | function mapCacheSet(key, value) {
|
4321 | var data = getMapData(this, key),
|
4322 | size = data.size;
|
4323 |
|
4324 | data.set(key, value);
|
4325 | this.size += data.size == size ? 0 : 1;
|
4326 | return this;
|
4327 | }
|
4328 |
|
4329 | module.exports = mapCacheSet;
|
4330 |
|
4331 | },{"./_getMapData":105}],142:[function(require,module,exports){
|
4332 |
|
4333 |
|
4334 |
|
4335 |
|
4336 |
|
4337 |
|
4338 |
|
4339 | function mapToArray(map) {
|
4340 | var index = -1,
|
4341 | result = Array(map.size);
|
4342 |
|
4343 | map.forEach(function(value, key) {
|
4344 | result[++index] = [key, value];
|
4345 | });
|
4346 | return result;
|
4347 | }
|
4348 |
|
4349 | module.exports = mapToArray;
|
4350 |
|
4351 | },{}],143:[function(require,module,exports){
|
4352 |
|
4353 |
|
4354 |
|
4355 |
|
4356 |
|
4357 |
|
4358 |
|
4359 |
|
4360 |
|
4361 | function matchesStrictComparable(key, srcValue) {
|
4362 | return function(object) {
|
4363 | if (object == null) {
|
4364 | return false;
|
4365 | }
|
4366 | return object[key] === srcValue &&
|
4367 | (srcValue !== undefined || (key in Object(object)));
|
4368 | };
|
4369 | }
|
4370 |
|
4371 | module.exports = matchesStrictComparable;
|
4372 |
|
4373 | },{}],144:[function(require,module,exports){
|
4374 | var memoize = require('./memoize');
|
4375 |
|
4376 |
|
4377 | var MAX_MEMOIZE_SIZE = 500;
|
4378 |
|
4379 |
|
4380 |
|
4381 |
|
4382 |
|
4383 |
|
4384 |
|
4385 |
|
4386 |
|
4387 | function memoizeCapped(func) {
|
4388 | var result = memoize(func, function(key) {
|
4389 | if (cache.size === MAX_MEMOIZE_SIZE) {
|
4390 | cache.clear();
|
4391 | }
|
4392 | return key;
|
4393 | });
|
4394 |
|
4395 | var cache = result.cache;
|
4396 | return result;
|
4397 | }
|
4398 |
|
4399 | module.exports = memoizeCapped;
|
4400 |
|
4401 | },{"./memoize":220}],145:[function(require,module,exports){
|
4402 | var getNative = require('./_getNative');
|
4403 |
|
4404 |
|
4405 | var nativeCreate = getNative(Object, 'create');
|
4406 |
|
4407 | module.exports = nativeCreate;
|
4408 |
|
4409 | },{"./_getNative":107}],146:[function(require,module,exports){
|
4410 | var overArg = require('./_overArg');
|
4411 |
|
4412 |
|
4413 | var nativeKeys = overArg(Object.keys, Object);
|
4414 |
|
4415 | module.exports = nativeKeys;
|
4416 |
|
4417 | },{"./_overArg":150}],147:[function(require,module,exports){
|
4418 |
|
4419 |
|
4420 |
|
4421 |
|
4422 |
|
4423 |
|
4424 |
|
4425 |
|
4426 |
|
4427 | function nativeKeysIn(object) {
|
4428 | var result = [];
|
4429 | if (object != null) {
|
4430 | for (var key in Object(object)) {
|
4431 | result.push(key);
|
4432 | }
|
4433 | }
|
4434 | return result;
|
4435 | }
|
4436 |
|
4437 | module.exports = nativeKeysIn;
|
4438 |
|
4439 | },{}],148:[function(require,module,exports){
|
4440 | var freeGlobal = require('./_freeGlobal');
|
4441 |
|
4442 |
|
4443 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
4444 |
|
4445 |
|
4446 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
4447 |
|
4448 |
|
4449 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
4450 |
|
4451 |
|
4452 | var freeProcess = moduleExports && freeGlobal.process;
|
4453 |
|
4454 |
|
4455 | var nodeUtil = (function() {
|
4456 | try {
|
4457 |
|
4458 | var types = freeModule && freeModule.require && freeModule.require('util').types;
|
4459 |
|
4460 | if (types) {
|
4461 | return types;
|
4462 | }
|
4463 |
|
4464 |
|
4465 | return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
4466 | } catch (e) {}
|
4467 | }());
|
4468 |
|
4469 | module.exports = nodeUtil;
|
4470 |
|
4471 | },{"./_freeGlobal":102}],149:[function(require,module,exports){
|
4472 |
|
4473 | var objectProto = Object.prototype;
|
4474 |
|
4475 |
|
4476 |
|
4477 |
|
4478 |
|
4479 |
|
4480 | var nativeObjectToString = objectProto.toString;
|
4481 |
|
4482 |
|
4483 |
|
4484 |
|
4485 |
|
4486 |
|
4487 |
|
4488 |
|
4489 | function objectToString(value) {
|
4490 | return nativeObjectToString.call(value);
|
4491 | }
|
4492 |
|
4493 | module.exports = objectToString;
|
4494 |
|
4495 | },{}],150:[function(require,module,exports){
|
4496 |
|
4497 |
|
4498 |
|
4499 |
|
4500 |
|
4501 |
|
4502 |
|
4503 |
|
4504 | function overArg(func, transform) {
|
4505 | return function(arg) {
|
4506 | return func(transform(arg));
|
4507 | };
|
4508 | }
|
4509 |
|
4510 | module.exports = overArg;
|
4511 |
|
4512 | },{}],151:[function(require,module,exports){
|
4513 | var apply = require('./_apply');
|
4514 |
|
4515 |
|
4516 | var nativeMax = Math.max;
|
4517 |
|
4518 |
|
4519 |
|
4520 |
|
4521 |
|
4522 |
|
4523 |
|
4524 |
|
4525 |
|
4526 |
|
4527 | function overRest(func, start, transform) {
|
4528 | start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
4529 | return function() {
|
4530 | var args = arguments,
|
4531 | index = -1,
|
4532 | length = nativeMax(args.length - start, 0),
|
4533 | array = Array(length);
|
4534 |
|
4535 | while (++index < length) {
|
4536 | array[index] = args[start + index];
|
4537 | }
|
4538 | index = -1;
|
4539 | var otherArgs = Array(start + 1);
|
4540 | while (++index < start) {
|
4541 | otherArgs[index] = args[index];
|
4542 | }
|
4543 | otherArgs[start] = transform(array);
|
4544 | return apply(func, this, otherArgs);
|
4545 | };
|
4546 | }
|
4547 |
|
4548 | module.exports = overRest;
|
4549 |
|
4550 | },{"./_apply":17}],152:[function(require,module,exports){
|
4551 | var baseGet = require('./_baseGet'),
|
4552 | baseSlice = require('./_baseSlice');
|
4553 |
|
4554 |
|
4555 |
|
4556 |
|
4557 |
|
4558 |
|
4559 |
|
4560 |
|
4561 |
|
4562 | function parent(object, path) {
|
4563 | return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
4564 | }
|
4565 |
|
4566 | module.exports = parent;
|
4567 |
|
4568 | },{"./_baseGet":43,"./_baseSlice":70}],153:[function(require,module,exports){
|
4569 | var freeGlobal = require('./_freeGlobal');
|
4570 |
|
4571 |
|
4572 | var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
4573 |
|
4574 |
|
4575 | var root = freeGlobal || freeSelf || Function('return this')();
|
4576 |
|
4577 | module.exports = root;
|
4578 |
|
4579 | },{"./_freeGlobal":102}],154:[function(require,module,exports){
|
4580 |
|
4581 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
4582 |
|
4583 |
|
4584 |
|
4585 |
|
4586 |
|
4587 |
|
4588 |
|
4589 |
|
4590 |
|
4591 |
|
4592 |
|
4593 | function setCacheAdd(value) {
|
4594 | this.__data__.set(value, HASH_UNDEFINED);
|
4595 | return this;
|
4596 | }
|
4597 |
|
4598 | module.exports = setCacheAdd;
|
4599 |
|
4600 | },{}],155:[function(require,module,exports){
|
4601 |
|
4602 |
|
4603 |
|
4604 |
|
4605 |
|
4606 |
|
4607 |
|
4608 |
|
4609 |
|
4610 | function setCacheHas(value) {
|
4611 | return this.__data__.has(value);
|
4612 | }
|
4613 |
|
4614 | module.exports = setCacheHas;
|
4615 |
|
4616 | },{}],156:[function(require,module,exports){
|
4617 |
|
4618 |
|
4619 |
|
4620 |
|
4621 |
|
4622 |
|
4623 |
|
4624 | function setToArray(set) {
|
4625 | var index = -1,
|
4626 | result = Array(set.size);
|
4627 |
|
4628 | set.forEach(function(value) {
|
4629 | result[++index] = value;
|
4630 | });
|
4631 | return result;
|
4632 | }
|
4633 |
|
4634 | module.exports = setToArray;
|
4635 |
|
4636 | },{}],157:[function(require,module,exports){
|
4637 | var baseSetToString = require('./_baseSetToString'),
|
4638 | shortOut = require('./_shortOut');
|
4639 |
|
4640 |
|
4641 |
|
4642 |
|
4643 |
|
4644 |
|
4645 |
|
4646 |
|
4647 |
|
4648 | var setToString = shortOut(baseSetToString);
|
4649 |
|
4650 | module.exports = setToString;
|
4651 |
|
4652 | },{"./_baseSetToString":69,"./_shortOut":158}],158:[function(require,module,exports){
|
4653 |
|
4654 | var HOT_COUNT = 800,
|
4655 | HOT_SPAN = 16;
|
4656 |
|
4657 |
|
4658 | var nativeNow = Date.now;
|
4659 |
|
4660 |
|
4661 |
|
4662 |
|
4663 |
|
4664 |
|
4665 |
|
4666 |
|
4667 |
|
4668 |
|
4669 | function shortOut(func) {
|
4670 | var count = 0,
|
4671 | lastCalled = 0;
|
4672 |
|
4673 | return function() {
|
4674 | var stamp = nativeNow(),
|
4675 | remaining = HOT_SPAN - (stamp - lastCalled);
|
4676 |
|
4677 | lastCalled = stamp;
|
4678 | if (remaining > 0) {
|
4679 | if (++count >= HOT_COUNT) {
|
4680 | return arguments[0];
|
4681 | }
|
4682 | } else {
|
4683 | count = 0;
|
4684 | }
|
4685 | return func.apply(undefined, arguments);
|
4686 | };
|
4687 | }
|
4688 |
|
4689 | module.exports = shortOut;
|
4690 |
|
4691 | },{}],159:[function(require,module,exports){
|
4692 | var ListCache = require('./_ListCache');
|
4693 |
|
4694 |
|
4695 |
|
4696 |
|
4697 |
|
4698 |
|
4699 |
|
4700 |
|
4701 | function stackClear() {
|
4702 | this.__data__ = new ListCache;
|
4703 | this.size = 0;
|
4704 | }
|
4705 |
|
4706 | module.exports = stackClear;
|
4707 |
|
4708 | },{"./_ListCache":7}],160:[function(require,module,exports){
|
4709 |
|
4710 |
|
4711 |
|
4712 |
|
4713 |
|
4714 |
|
4715 |
|
4716 |
|
4717 |
|
4718 | function stackDelete(key) {
|
4719 | var data = this.__data__,
|
4720 | result = data['delete'](key);
|
4721 |
|
4722 | this.size = data.size;
|
4723 | return result;
|
4724 | }
|
4725 |
|
4726 | module.exports = stackDelete;
|
4727 |
|
4728 | },{}],161:[function(require,module,exports){
|
4729 |
|
4730 |
|
4731 |
|
4732 |
|
4733 |
|
4734 |
|
4735 |
|
4736 |
|
4737 |
|
4738 | function stackGet(key) {
|
4739 | return this.__data__.get(key);
|
4740 | }
|
4741 |
|
4742 | module.exports = stackGet;
|
4743 |
|
4744 | },{}],162:[function(require,module,exports){
|
4745 |
|
4746 |
|
4747 |
|
4748 |
|
4749 |
|
4750 |
|
4751 |
|
4752 |
|
4753 |
|
4754 | function stackHas(key) {
|
4755 | return this.__data__.has(key);
|
4756 | }
|
4757 |
|
4758 | module.exports = stackHas;
|
4759 |
|
4760 | },{}],163:[function(require,module,exports){
|
4761 | var ListCache = require('./_ListCache'),
|
4762 | Map = require('./_Map'),
|
4763 | MapCache = require('./_MapCache');
|
4764 |
|
4765 |
|
4766 | var LARGE_ARRAY_SIZE = 200;
|
4767 |
|
4768 |
|
4769 |
|
4770 |
|
4771 |
|
4772 |
|
4773 |
|
4774 |
|
4775 |
|
4776 |
|
4777 |
|
4778 | function stackSet(key, value) {
|
4779 | var data = this.__data__;
|
4780 | if (data instanceof ListCache) {
|
4781 | var pairs = data.__data__;
|
4782 | if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
4783 | pairs.push([key, value]);
|
4784 | this.size = ++data.size;
|
4785 | return this;
|
4786 | }
|
4787 | data = this.__data__ = new MapCache(pairs);
|
4788 | }
|
4789 | data.set(key, value);
|
4790 | this.size = data.size;
|
4791 | return this;
|
4792 | }
|
4793 |
|
4794 | module.exports = stackSet;
|
4795 |
|
4796 | },{"./_ListCache":7,"./_Map":8,"./_MapCache":9}],164:[function(require,module,exports){
|
4797 |
|
4798 |
|
4799 |
|
4800 |
|
4801 |
|
4802 |
|
4803 |
|
4804 |
|
4805 |
|
4806 |
|
4807 | function strictIndexOf(array, value, fromIndex) {
|
4808 | var index = fromIndex - 1,
|
4809 | length = array.length;
|
4810 |
|
4811 | while (++index < length) {
|
4812 | if (array[index] === value) {
|
4813 | return index;
|
4814 | }
|
4815 | }
|
4816 | return -1;
|
4817 | }
|
4818 |
|
4819 | module.exports = strictIndexOf;
|
4820 |
|
4821 | },{}],165:[function(require,module,exports){
|
4822 | var asciiToArray = require('./_asciiToArray'),
|
4823 | hasUnicode = require('./_hasUnicode'),
|
4824 | unicodeToArray = require('./_unicodeToArray');
|
4825 |
|
4826 |
|
4827 |
|
4828 |
|
4829 |
|
4830 |
|
4831 |
|
4832 |
|
4833 | function stringToArray(string) {
|
4834 | return hasUnicode(string)
|
4835 | ? unicodeToArray(string)
|
4836 | : asciiToArray(string);
|
4837 | }
|
4838 |
|
4839 | module.exports = stringToArray;
|
4840 |
|
4841 | },{"./_asciiToArray":27,"./_hasUnicode":115,"./_unicodeToArray":170}],166:[function(require,module,exports){
|
4842 | var memoizeCapped = require('./_memoizeCapped');
|
4843 |
|
4844 |
|
4845 | var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
4846 |
|
4847 |
|
4848 | var reEscapeChar = /\\(\\)?/g;
|
4849 |
|
4850 |
|
4851 |
|
4852 |
|
4853 |
|
4854 |
|
4855 |
|
4856 |
|
4857 | var stringToPath = memoizeCapped(function(string) {
|
4858 | var result = [];
|
4859 | if (string.charCodeAt(0) === 46 ) {
|
4860 | result.push('');
|
4861 | }
|
4862 | string.replace(rePropName, function(match, number, quote, subString) {
|
4863 | result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
4864 | });
|
4865 | return result;
|
4866 | });
|
4867 |
|
4868 | module.exports = stringToPath;
|
4869 |
|
4870 | },{"./_memoizeCapped":144}],167:[function(require,module,exports){
|
4871 | var isSymbol = require('./isSymbol');
|
4872 |
|
4873 |
|
4874 | var INFINITY = 1 / 0;
|
4875 |
|
4876 |
|
4877 |
|
4878 |
|
4879 |
|
4880 |
|
4881 |
|
4882 |
|
4883 | function toKey(value) {
|
4884 | if (typeof value == 'string' || isSymbol(value)) {
|
4885 | return value;
|
4886 | }
|
4887 | var result = (value + '');
|
4888 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
4889 | }
|
4890 |
|
4891 | module.exports = toKey;
|
4892 |
|
4893 | },{"./isSymbol":214}],168:[function(require,module,exports){
|
4894 |
|
4895 | var funcProto = Function.prototype;
|
4896 |
|
4897 |
|
4898 | var funcToString = funcProto.toString;
|
4899 |
|
4900 |
|
4901 |
|
4902 |
|
4903 |
|
4904 |
|
4905 |
|
4906 |
|
4907 | function toSource(func) {
|
4908 | if (func != null) {
|
4909 | try {
|
4910 | return funcToString.call(func);
|
4911 | } catch (e) {}
|
4912 | try {
|
4913 | return (func + '');
|
4914 | } catch (e) {}
|
4915 | }
|
4916 | return '';
|
4917 | }
|
4918 |
|
4919 | module.exports = toSource;
|
4920 |
|
4921 | },{}],169:[function(require,module,exports){
|
4922 |
|
4923 | var reWhitespace = /\s/;
|
4924 |
|
4925 |
|
4926 |
|
4927 |
|
4928 |
|
4929 |
|
4930 |
|
4931 |
|
4932 |
|
4933 | function trimmedEndIndex(string) {
|
4934 | var index = string.length;
|
4935 |
|
4936 | while (index-- && reWhitespace.test(string.charAt(index))) {}
|
4937 | return index;
|
4938 | }
|
4939 |
|
4940 | module.exports = trimmedEndIndex;
|
4941 |
|
4942 | },{}],170:[function(require,module,exports){
|
4943 |
|
4944 | var rsAstralRange = '\\ud800-\\udfff',
|
4945 | rsComboMarksRange = '\\u0300-\\u036f',
|
4946 | reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
4947 | rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
4948 | rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
4949 | rsVarRange = '\\ufe0e\\ufe0f';
|
4950 |
|
4951 |
|
4952 | var rsAstral = '[' + rsAstralRange + ']',
|
4953 | rsCombo = '[' + rsComboRange + ']',
|
4954 | rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
4955 | rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
4956 | rsNonAstral = '[^' + rsAstralRange + ']',
|
4957 | rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
4958 | rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
4959 | rsZWJ = '\\u200d';
|
4960 |
|
4961 |
|
4962 | var reOptMod = rsModifier + '?',
|
4963 | rsOptVar = '[' + rsVarRange + ']?',
|
4964 | rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
4965 | rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
4966 | rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
4967 |
|
4968 |
|
4969 | var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
4970 |
|
4971 |
|
4972 |
|
4973 |
|
4974 |
|
4975 |
|
4976 |
|
4977 |
|
4978 | function unicodeToArray(string) {
|
4979 | return string.match(reUnicode) || [];
|
4980 | }
|
4981 |
|
4982 | module.exports = unicodeToArray;
|
4983 |
|
4984 | },{}],171:[function(require,module,exports){
|
4985 | var assignValue = require('./_assignValue'),
|
4986 | copyObject = require('./_copyObject'),
|
4987 | createAssigner = require('./_createAssigner'),
|
4988 | isArrayLike = require('./isArrayLike'),
|
4989 | isPrototype = require('./_isPrototype'),
|
4990 | keys = require('./keys');
|
4991 |
|
4992 |
|
4993 | var objectProto = Object.prototype;
|
4994 |
|
4995 |
|
4996 | var hasOwnProperty = objectProto.hasOwnProperty;
|
4997 |
|
4998 |
|
4999 |
|
5000 |
|
5001 |
|
5002 |
|
5003 |
|
5004 |
|
5005 |
|
5006 |
|
5007 |
|
5008 |
|
5009 |
|
5010 |
|
5011 |
|
5012 |
|
5013 |
|
5014 |
|
5015 |
|
5016 |
|
5017 |
|
5018 |
|
5019 |
|
5020 |
|
5021 |
|
5022 |
|
5023 |
|
5024 |
|
5025 |
|
5026 |
|
5027 |
|
5028 |
|
5029 |
|
5030 | var assign = createAssigner(function(object, source) {
|
5031 | if (isPrototype(source) || isArrayLike(source)) {
|
5032 | copyObject(source, keys(source), object);
|
5033 | return;
|
5034 | }
|
5035 | for (var key in source) {
|
5036 | if (hasOwnProperty.call(source, key)) {
|
5037 | assignValue(object, key, source[key]);
|
5038 | }
|
5039 | }
|
5040 | });
|
5041 |
|
5042 | module.exports = assign;
|
5043 |
|
5044 | },{"./_assignValue":28,"./_copyObject":88,"./_createAssigner":93,"./_isPrototype":129,"./isArrayLike":199,"./keys":216}],172:[function(require,module,exports){
|
5045 | var copyObject = require('./_copyObject'),
|
5046 | createAssigner = require('./_createAssigner'),
|
5047 | keysIn = require('./keysIn');
|
5048 |
|
5049 |
|
5050 |
|
5051 |
|
5052 |
|
5053 |
|
5054 |
|
5055 |
|
5056 |
|
5057 |
|
5058 |
|
5059 |
|
5060 |
|
5061 |
|
5062 |
|
5063 |
|
5064 |
|
5065 |
|
5066 |
|
5067 |
|
5068 |
|
5069 |
|
5070 |
|
5071 |
|
5072 |
|
5073 |
|
5074 |
|
5075 |
|
5076 |
|
5077 |
|
5078 |
|
5079 |
|
5080 | var assignIn = createAssigner(function(object, source) {
|
5081 | copyObject(source, keysIn(source), object);
|
5082 | });
|
5083 |
|
5084 | module.exports = assignIn;
|
5085 |
|
5086 | },{"./_copyObject":88,"./_createAssigner":93,"./keysIn":217}],173:[function(require,module,exports){
|
5087 | var toString = require('./toString'),
|
5088 | upperFirst = require('./upperFirst');
|
5089 |
|
5090 |
|
5091 |
|
5092 |
|
5093 |
|
5094 |
|
5095 |
|
5096 |
|
5097 |
|
5098 |
|
5099 |
|
5100 |
|
5101 |
|
5102 |
|
5103 |
|
5104 |
|
5105 | function capitalize(string) {
|
5106 | return upperFirst(toString(string).toLowerCase());
|
5107 | }
|
5108 |
|
5109 | module.exports = capitalize;
|
5110 |
|
5111 | },{"./toString":233,"./upperFirst":235}],174:[function(require,module,exports){
|
5112 | var baseClone = require('./_baseClone');
|
5113 |
|
5114 |
|
5115 | var CLONE_SYMBOLS_FLAG = 4;
|
5116 |
|
5117 |
|
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 |
|
5123 |
|
5124 |
|
5125 |
|
5126 |
|
5127 |
|
5128 |
|
5129 |
|
5130 |
|
5131 |
|
5132 |
|
5133 |
|
5134 |
|
5135 |
|
5136 |
|
5137 |
|
5138 |
|
5139 |
|
5140 |
|
5141 |
|
5142 |
|
5143 | function clone(value) {
|
5144 | return baseClone(value, CLONE_SYMBOLS_FLAG);
|
5145 | }
|
5146 |
|
5147 | module.exports = clone;
|
5148 |
|
5149 | },{"./_baseClone":34}],175:[function(require,module,exports){
|
5150 | var baseClone = require('./_baseClone');
|
5151 |
|
5152 |
|
5153 | var CLONE_DEEP_FLAG = 1,
|
5154 | CLONE_SYMBOLS_FLAG = 4;
|
5155 |
|
5156 |
|
5157 |
|
5158 |
|
5159 |
|
5160 |
|
5161 |
|
5162 |
|
5163 |
|
5164 |
|
5165 |
|
5166 |
|
5167 |
|
5168 |
|
5169 |
|
5170 |
|
5171 |
|
5172 |
|
5173 |
|
5174 | function cloneDeep(value) {
|
5175 | return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
5176 | }
|
5177 |
|
5178 | module.exports = cloneDeep;
|
5179 |
|
5180 | },{"./_baseClone":34}],176:[function(require,module,exports){
|
5181 | var baseClone = require('./_baseClone');
|
5182 |
|
5183 |
|
5184 | var CLONE_DEEP_FLAG = 1,
|
5185 | CLONE_SYMBOLS_FLAG = 4;
|
5186 |
|
5187 |
|
5188 |
|
5189 |
|
5190 |
|
5191 |
|
5192 |
|
5193 |
|
5194 |
|
5195 |
|
5196 |
|
5197 |
|
5198 |
|
5199 |
|
5200 |
|
5201 |
|
5202 |
|
5203 |
|
5204 |
|
5205 |
|
5206 |
|
5207 |
|
5208 |
|
5209 |
|
5210 |
|
5211 |
|
5212 |
|
5213 |
|
5214 |
|
5215 | function cloneDeepWith(value, customizer) {
|
5216 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
5217 | return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
|
5218 | }
|
5219 |
|
5220 | module.exports = cloneDeepWith;
|
5221 |
|
5222 | },{"./_baseClone":34}],177:[function(require,module,exports){
|
5223 |
|
5224 |
|
5225 |
|
5226 |
|
5227 |
|
5228 |
|
5229 |
|
5230 |
|
5231 |
|
5232 |
|
5233 |
|
5234 |
|
5235 |
|
5236 |
|
5237 |
|
5238 | function compact(array) {
|
5239 | var index = -1,
|
5240 | length = array == null ? 0 : array.length,
|
5241 | resIndex = 0,
|
5242 | result = [];
|
5243 |
|
5244 | while (++index < length) {
|
5245 | var value = array[index];
|
5246 | if (value) {
|
5247 | result[resIndex++] = value;
|
5248 | }
|
5249 | }
|
5250 | return result;
|
5251 | }
|
5252 |
|
5253 | module.exports = compact;
|
5254 |
|
5255 | },{}],178:[function(require,module,exports){
|
5256 |
|
5257 |
|
5258 |
|
5259 |
|
5260 |
|
5261 |
|
5262 |
|
5263 |
|
5264 |
|
5265 |
|
5266 |
|
5267 |
|
5268 |
|
5269 |
|
5270 |
|
5271 |
|
5272 |
|
5273 |
|
5274 |
|
5275 | function constant(value) {
|
5276 | return function() {
|
5277 | return value;
|
5278 | };
|
5279 | }
|
5280 |
|
5281 | module.exports = constant;
|
5282 |
|
5283 | },{}],179:[function(require,module,exports){
|
5284 | var baseDelay = require('./_baseDelay'),
|
5285 | baseRest = require('./_baseRest');
|
5286 |
|
5287 |
|
5288 |
|
5289 |
|
5290 |
|
5291 |
|
5292 |
|
5293 |
|
5294 |
|
5295 |
|
5296 |
|
5297 |
|
5298 |
|
5299 |
|
5300 |
|
5301 |
|
5302 |
|
5303 |
|
5304 |
|
5305 | var defer = baseRest(function(func, args) {
|
5306 | return baseDelay(func, 1, args);
|
5307 | });
|
5308 |
|
5309 | module.exports = defer;
|
5310 |
|
5311 | },{"./_baseDelay":36,"./_baseRest":68}],180:[function(require,module,exports){
|
5312 | var baseDelay = require('./_baseDelay'),
|
5313 | baseRest = require('./_baseRest'),
|
5314 | toNumber = require('./toNumber');
|
5315 |
|
5316 |
|
5317 |
|
5318 |
|
5319 |
|
5320 |
|
5321 |
|
5322 |
|
5323 |
|
5324 |
|
5325 |
|
5326 |
|
5327 |
|
5328 |
|
5329 |
|
5330 |
|
5331 |
|
5332 |
|
5333 |
|
5334 |
|
5335 | var delay = baseRest(function(func, wait, args) {
|
5336 | return baseDelay(func, toNumber(wait) || 0, args);
|
5337 | });
|
5338 |
|
5339 | module.exports = delay;
|
5340 |
|
5341 | },{"./_baseDelay":36,"./_baseRest":68,"./toNumber":232}],181:[function(require,module,exports){
|
5342 | module.exports = require('./forEach');
|
5343 |
|
5344 | },{"./forEach":190}],182:[function(require,module,exports){
|
5345 |
|
5346 |
|
5347 |
|
5348 |
|
5349 |
|
5350 |
|
5351 |
|
5352 |
|
5353 |
|
5354 |
|
5355 |
|
5356 |
|
5357 |
|
5358 |
|
5359 |
|
5360 |
|
5361 |
|
5362 |
|
5363 |
|
5364 |
|
5365 |
|
5366 |
|
5367 |
|
5368 |
|
5369 |
|
5370 |
|
5371 |
|
5372 |
|
5373 |
|
5374 |
|
5375 |
|
5376 |
|
5377 | function eq(value, other) {
|
5378 | return value === other || (value !== value && other !== other);
|
5379 | }
|
5380 |
|
5381 | module.exports = eq;
|
5382 |
|
5383 | },{}],183:[function(require,module,exports){
|
5384 | var arrayEvery = require('./_arrayEvery'),
|
5385 | baseEvery = require('./_baseEvery'),
|
5386 | baseIteratee = require('./_baseIteratee'),
|
5387 | isArray = require('./isArray'),
|
5388 | isIterateeCall = require('./_isIterateeCall');
|
5389 |
|
5390 |
|
5391 |
|
5392 |
|
5393 |
|
5394 |
|
5395 |
|
5396 |
|
5397 |
|
5398 |
|
5399 |
|
5400 |
|
5401 |
|
5402 |
|
5403 |
|
5404 |
|
5405 |
|
5406 |
|
5407 |
|
5408 |
|
5409 |
|
5410 |
|
5411 |
|
5412 |
|
5413 |
|
5414 |
|
5415 |
|
5416 |
|
5417 |
|
5418 |
|
5419 |
|
5420 |
|
5421 |
|
5422 |
|
5423 |
|
5424 |
|
5425 |
|
5426 |
|
5427 |
|
5428 |
|
5429 |
|
5430 |
|
5431 | function every(collection, predicate, guard) {
|
5432 | var func = isArray(collection) ? arrayEvery : baseEvery;
|
5433 | if (guard && isIterateeCall(collection, predicate, guard)) {
|
5434 | predicate = undefined;
|
5435 | }
|
5436 | return func(collection, baseIteratee(predicate, 3));
|
5437 | }
|
5438 |
|
5439 | module.exports = every;
|
5440 |
|
5441 | },{"./_arrayEvery":20,"./_baseEvery":38,"./_baseIteratee":59,"./_isIterateeCall":125,"./isArray":198}],184:[function(require,module,exports){
|
5442 | module.exports = require('./assignIn');
|
5443 |
|
5444 | },{"./assignIn":172}],185:[function(require,module,exports){
|
5445 | var arrayFilter = require('./_arrayFilter'),
|
5446 | baseFilter = require('./_baseFilter'),
|
5447 | baseIteratee = require('./_baseIteratee'),
|
5448 | isArray = require('./isArray');
|
5449 |
|
5450 |
|
5451 |
|
5452 |
|
5453 |
|
5454 |
|
5455 |
|
5456 |
|
5457 |
|
5458 |
|
5459 |
|
5460 |
|
5461 |
|
5462 |
|
5463 |
|
5464 |
|
5465 |
|
5466 |
|
5467 |
|
5468 |
|
5469 |
|
5470 |
|
5471 |
|
5472 |
|
5473 |
|
5474 |
|
5475 |
|
5476 |
|
5477 |
|
5478 |
|
5479 |
|
5480 |
|
5481 |
|
5482 |
|
5483 |
|
5484 |
|
5485 |
|
5486 |
|
5487 |
|
5488 |
|
5489 |
|
5490 |
|
5491 | function filter(collection, predicate) {
|
5492 | var func = isArray(collection) ? arrayFilter : baseFilter;
|
5493 | return func(collection, baseIteratee(predicate, 3));
|
5494 | }
|
5495 |
|
5496 | module.exports = filter;
|
5497 |
|
5498 | },{"./_arrayFilter":21,"./_baseFilter":39,"./_baseIteratee":59,"./isArray":198}],186:[function(require,module,exports){
|
5499 | var createFind = require('./_createFind'),
|
5500 | findIndex = require('./findIndex');
|
5501 |
|
5502 |
|
5503 |
|
5504 |
|
5505 |
|
5506 |
|
5507 |
|
5508 |
|
5509 |
|
5510 |
|
5511 |
|
5512 |
|
5513 |
|
5514 |
|
5515 |
|
5516 |
|
5517 |
|
5518 |
|
5519 |
|
5520 |
|
5521 |
|
5522 |
|
5523 |
|
5524 |
|
5525 |
|
5526 |
|
5527 |
|
5528 |
|
5529 |
|
5530 |
|
5531 |
|
5532 |
|
5533 |
|
5534 |
|
5535 |
|
5536 |
|
5537 |
|
5538 | var find = createFind(findIndex);
|
5539 |
|
5540 | module.exports = find;
|
5541 |
|
5542 | },{"./_createFind":97,"./findIndex":187}],187:[function(require,module,exports){
|
5543 | var baseFindIndex = require('./_baseFindIndex'),
|
5544 | baseIteratee = require('./_baseIteratee'),
|
5545 | toInteger = require('./toInteger');
|
5546 |
|
5547 |
|
5548 | var nativeMax = Math.max;
|
5549 |
|
5550 |
|
5551 |
|
5552 |
|
5553 |
|
5554 |
|
5555 |
|
5556 |
|
5557 |
|
5558 |
|
5559 |
|
5560 |
|
5561 |
|
5562 |
|
5563 |
|
5564 |
|
5565 |
|
5566 |
|
5567 |
|
5568 |
|
5569 |
|
5570 |
|
5571 |
|
5572 |
|
5573 |
|
5574 |
|
5575 |
|
5576 |
|
5577 |
|
5578 |
|
5579 |
|
5580 |
|
5581 |
|
5582 |
|
5583 |
|
5584 |
|
5585 | function findIndex(array, predicate, fromIndex) {
|
5586 | var length = array == null ? 0 : array.length;
|
5587 | if (!length) {
|
5588 | return -1;
|
5589 | }
|
5590 | var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
5591 | if (index < 0) {
|
5592 | index = nativeMax(length + index, 0);
|
5593 | }
|
5594 | return baseFindIndex(array, baseIteratee(predicate, 3), index);
|
5595 | }
|
5596 |
|
5597 | module.exports = findIndex;
|
5598 |
|
5599 | },{"./_baseFindIndex":40,"./_baseIteratee":59,"./toInteger":231}],188:[function(require,module,exports){
|
5600 | var createFind = require('./_createFind'),
|
5601 | findLastIndex = require('./findLastIndex');
|
5602 |
|
5603 |
|
5604 |
|
5605 |
|
5606 |
|
5607 |
|
5608 |
|
5609 |
|
5610 |
|
5611 |
|
5612 |
|
5613 |
|
5614 |
|
5615 |
|
5616 |
|
5617 |
|
5618 |
|
5619 |
|
5620 |
|
5621 |
|
5622 | var findLast = createFind(findLastIndex);
|
5623 |
|
5624 | module.exports = findLast;
|
5625 |
|
5626 | },{"./_createFind":97,"./findLastIndex":189}],189:[function(require,module,exports){
|
5627 | var baseFindIndex = require('./_baseFindIndex'),
|
5628 | baseIteratee = require('./_baseIteratee'),
|
5629 | toInteger = require('./toInteger');
|
5630 |
|
5631 |
|
5632 | var nativeMax = Math.max,
|
5633 | nativeMin = Math.min;
|
5634 |
|
5635 |
|
5636 |
|
5637 |
|
5638 |
|
5639 |
|
5640 |
|
5641 |
|
5642 |
|
5643 |
|
5644 |
|
5645 |
|
5646 |
|
5647 |
|
5648 |
|
5649 |
|
5650 |
|
5651 |
|
5652 |
|
5653 |
|
5654 |
|
5655 |
|
5656 |
|
5657 |
|
5658 |
|
5659 |
|
5660 |
|
5661 |
|
5662 |
|
5663 |
|
5664 |
|
5665 |
|
5666 |
|
5667 |
|
5668 |
|
5669 |
|
5670 | function findLastIndex(array, predicate, fromIndex) {
|
5671 | var length = array == null ? 0 : array.length;
|
5672 | if (!length) {
|
5673 | return -1;
|
5674 | }
|
5675 | var index = length - 1;
|
5676 | if (fromIndex !== undefined) {
|
5677 | index = toInteger(fromIndex);
|
5678 | index = fromIndex < 0
|
5679 | ? nativeMax(length + index, 0)
|
5680 | : nativeMin(index, length - 1);
|
5681 | }
|
5682 | return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
|
5683 | }
|
5684 |
|
5685 | module.exports = findLastIndex;
|
5686 |
|
5687 | },{"./_baseFindIndex":40,"./_baseIteratee":59,"./toInteger":231}],190:[function(require,module,exports){
|
5688 | var arrayEach = require('./_arrayEach'),
|
5689 | baseEach = require('./_baseEach'),
|
5690 | castFunction = require('./_castFunction'),
|
5691 | isArray = require('./isArray');
|
5692 |
|
5693 |
|
5694 |
|
5695 |
|
5696 |
|
5697 |
|
5698 |
|
5699 |
|
5700 |
|
5701 |
|
5702 |
|
5703 |
|
5704 |
|
5705 |
|
5706 |
|
5707 |
|
5708 |
|
5709 |
|
5710 |
|
5711 |
|
5712 |
|
5713 |
|
5714 |
|
5715 |
|
5716 |
|
5717 |
|
5718 |
|
5719 |
|
5720 |
|
5721 |
|
5722 |
|
5723 | function forEach(collection, iteratee) {
|
5724 | var func = isArray(collection) ? arrayEach : baseEach;
|
5725 | return func(collection, castFunction(iteratee));
|
5726 | }
|
5727 |
|
5728 | module.exports = forEach;
|
5729 |
|
5730 | },{"./_arrayEach":19,"./_baseEach":37,"./_castFunction":78,"./isArray":198}],191:[function(require,module,exports){
|
5731 | var baseGet = require('./_baseGet');
|
5732 |
|
5733 |
|
5734 |
|
5735 |
|
5736 |
|
5737 |
|
5738 |
|
5739 |
|
5740 |
|
5741 |
|
5742 |
|
5743 |
|
5744 |
|
5745 |
|
5746 |
|
5747 |
|
5748 |
|
5749 |
|
5750 |
|
5751 |
|
5752 |
|
5753 |
|
5754 |
|
5755 |
|
5756 |
|
5757 |
|
5758 | function get(object, path, defaultValue) {
|
5759 | var result = object == null ? undefined : baseGet(object, path);
|
5760 | return result === undefined ? defaultValue : result;
|
5761 | }
|
5762 |
|
5763 | module.exports = get;
|
5764 |
|
5765 | },{"./_baseGet":43}],192:[function(require,module,exports){
|
5766 | var baseAssignValue = require('./_baseAssignValue'),
|
5767 | createAggregator = require('./_createAggregator');
|
5768 |
|
5769 |
|
5770 | var objectProto = Object.prototype;
|
5771 |
|
5772 |
|
5773 | var hasOwnProperty = objectProto.hasOwnProperty;
|
5774 |
|
5775 |
|
5776 |
|
5777 |
|
5778 |
|
5779 |
|
5780 |
|
5781 |
|
5782 |
|
5783 |
|
5784 |
|
5785 |
|
5786 |
|
5787 |
|
5788 |
|
5789 |
|
5790 |
|
5791 |
|
5792 |
|
5793 |
|
5794 |
|
5795 |
|
5796 |
|
5797 |
|
5798 | var groupBy = createAggregator(function(result, value, key) {
|
5799 | if (hasOwnProperty.call(result, key)) {
|
5800 | result[key].push(value);
|
5801 | } else {
|
5802 | baseAssignValue(result, key, [value]);
|
5803 | }
|
5804 | });
|
5805 |
|
5806 | module.exports = groupBy;
|
5807 |
|
5808 | },{"./_baseAssignValue":33,"./_createAggregator":92}],193:[function(require,module,exports){
|
5809 | var baseHasIn = require('./_baseHasIn'),
|
5810 | hasPath = require('./_hasPath');
|
5811 |
|
5812 |
|
5813 |
|
5814 |
|
5815 |
|
5816 |
|
5817 |
|
5818 |
|
5819 |
|
5820 |
|
5821 |
|
5822 |
|
5823 |
|
5824 |
|
5825 |
|
5826 |
|
5827 |
|
5828 |
|
5829 |
|
5830 |
|
5831 |
|
5832 |
|
5833 |
|
5834 |
|
5835 |
|
5836 |
|
5837 |
|
5838 | function hasIn(object, path) {
|
5839 | return object != null && hasPath(object, path, baseHasIn);
|
5840 | }
|
5841 |
|
5842 | module.exports = hasIn;
|
5843 |
|
5844 | },{"./_baseHasIn":46,"./_hasPath":114}],194:[function(require,module,exports){
|
5845 |
|
5846 |
|
5847 |
|
5848 |
|
5849 |
|
5850 |
|
5851 |
|
5852 |
|
5853 |
|
5854 |
|
5855 |
|
5856 |
|
5857 |
|
5858 |
|
5859 |
|
5860 |
|
5861 | function identity(value) {
|
5862 | return value;
|
5863 | }
|
5864 |
|
5865 | module.exports = identity;
|
5866 |
|
5867 | },{}],195:[function(require,module,exports){
|
5868 | var baseIndexOf = require('./_baseIndexOf'),
|
5869 | isArrayLike = require('./isArrayLike'),
|
5870 | isString = require('./isString'),
|
5871 | toInteger = require('./toInteger'),
|
5872 | values = require('./values');
|
5873 |
|
5874 |
|
5875 | var nativeMax = Math.max;
|
5876 |
|
5877 |
|
5878 |
|
5879 |
|
5880 |
|
5881 |
|
5882 |
|
5883 |
|
5884 |
|
5885 |
|
5886 |
|
5887 |
|
5888 |
|
5889 |
|
5890 |
|
5891 |
|
5892 |
|
5893 |
|
5894 |
|
5895 |
|
5896 |
|
5897 |
|
5898 |
|
5899 |
|
5900 |
|
5901 |
|
5902 |
|
5903 |
|
5904 |
|
5905 |
|
5906 |
|
5907 | function includes(collection, value, fromIndex, guard) {
|
5908 | collection = isArrayLike(collection) ? collection : values(collection);
|
5909 | fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
|
5910 |
|
5911 | var length = collection.length;
|
5912 | if (fromIndex < 0) {
|
5913 | fromIndex = nativeMax(length + fromIndex, 0);
|
5914 | }
|
5915 | return isString(collection)
|
5916 | ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
|
5917 | : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
|
5918 | }
|
5919 |
|
5920 | module.exports = includes;
|
5921 |
|
5922 | },{"./_baseIndexOf":47,"./isArrayLike":199,"./isString":213,"./toInteger":231,"./values":236}],196:[function(require,module,exports){
|
5923 | var baseInvoke = require('./_baseInvoke'),
|
5924 | baseRest = require('./_baseRest');
|
5925 |
|
5926 |
|
5927 |
|
5928 |
|
5929 |
|
5930 |
|
5931 |
|
5932 |
|
5933 |
|
5934 |
|
5935 |
|
5936 |
|
5937 |
|
5938 |
|
5939 |
|
5940 |
|
5941 |
|
5942 |
|
5943 |
|
5944 | var invoke = baseRest(baseInvoke);
|
5945 |
|
5946 | module.exports = invoke;
|
5947 |
|
5948 | },{"./_baseInvoke":48,"./_baseRest":68}],197:[function(require,module,exports){
|
5949 | var baseIsArguments = require('./_baseIsArguments'),
|
5950 | isObjectLike = require('./isObjectLike');
|
5951 |
|
5952 |
|
5953 | var objectProto = Object.prototype;
|
5954 |
|
5955 |
|
5956 | var hasOwnProperty = objectProto.hasOwnProperty;
|
5957 |
|
5958 |
|
5959 | var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
5960 |
|
5961 |
|
5962 |
|
5963 |
|
5964 |
|
5965 |
|
5966 |
|
5967 |
|
5968 |
|
5969 |
|
5970 |
|
5971 |
|
5972 |
|
5973 |
|
5974 |
|
5975 |
|
5976 |
|
5977 |
|
5978 |
|
5979 | var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
5980 | return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
5981 | !propertyIsEnumerable.call(value, 'callee');
|
5982 | };
|
5983 |
|
5984 | module.exports = isArguments;
|
5985 |
|
5986 | },{"./_baseIsArguments":49,"./isObjectLike":210}],198:[function(require,module,exports){
|
5987 |
|
5988 |
|
5989 |
|
5990 |
|
5991 |
|
5992 |
|
5993 |
|
5994 |
|
5995 |
|
5996 |
|
5997 |
|
5998 |
|
5999 |
|
6000 |
|
6001 |
|
6002 |
|
6003 |
|
6004 |
|
6005 |
|
6006 |
|
6007 |
|
6008 |
|
6009 |
|
6010 | var isArray = Array.isArray;
|
6011 |
|
6012 | module.exports = isArray;
|
6013 |
|
6014 | },{}],199:[function(require,module,exports){
|
6015 | var isFunction = require('./isFunction'),
|
6016 | isLength = require('./isLength');
|
6017 |
|
6018 |
|
6019 |
|
6020 |
|
6021 |
|
6022 |
|
6023 |
|
6024 |
|
6025 |
|
6026 |
|
6027 |
|
6028 |
|
6029 |
|
6030 |
|
6031 |
|
6032 |
|
6033 |
|
6034 |
|
6035 |
|
6036 |
|
6037 |
|
6038 |
|
6039 |
|
6040 |
|
6041 |
|
6042 |
|
6043 | function isArrayLike(value) {
|
6044 | return value != null && isLength(value.length) && !isFunction(value);
|
6045 | }
|
6046 |
|
6047 | module.exports = isArrayLike;
|
6048 |
|
6049 | },{"./isFunction":205,"./isLength":206}],200:[function(require,module,exports){
|
6050 | var baseGetTag = require('./_baseGetTag'),
|
6051 | isObjectLike = require('./isObjectLike');
|
6052 |
|
6053 |
|
6054 | var boolTag = '[object Boolean]';
|
6055 |
|
6056 |
|
6057 |
|
6058 |
|
6059 |
|
6060 |
|
6061 |
|
6062 |
|
6063 |
|
6064 |
|
6065 |
|
6066 |
|
6067 |
|
6068 |
|
6069 |
|
6070 |
|
6071 |
|
6072 |
|
6073 | function isBoolean(value) {
|
6074 | return value === true || value === false ||
|
6075 | (isObjectLike(value) && baseGetTag(value) == boolTag);
|
6076 | }
|
6077 |
|
6078 | module.exports = isBoolean;
|
6079 |
|
6080 | },{"./_baseGetTag":45,"./isObjectLike":210}],201:[function(require,module,exports){
|
6081 | var root = require('./_root'),
|
6082 | stubFalse = require('./stubFalse');
|
6083 |
|
6084 |
|
6085 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
6086 |
|
6087 |
|
6088 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
6089 |
|
6090 |
|
6091 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
6092 |
|
6093 |
|
6094 | var Buffer = moduleExports ? root.Buffer : undefined;
|
6095 |
|
6096 |
|
6097 | var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
6098 |
|
6099 |
|
6100 |
|
6101 |
|
6102 |
|
6103 |
|
6104 |
|
6105 |
|
6106 |
|
6107 |
|
6108 |
|
6109 |
|
6110 |
|
6111 |
|
6112 |
|
6113 |
|
6114 |
|
6115 |
|
6116 | var isBuffer = nativeIsBuffer || stubFalse;
|
6117 |
|
6118 | module.exports = isBuffer;
|
6119 |
|
6120 | },{"./_root":153,"./stubFalse":227}],202:[function(require,module,exports){
|
6121 | var baseKeys = require('./_baseKeys'),
|
6122 | getTag = require('./_getTag'),
|
6123 | isArguments = require('./isArguments'),
|
6124 | isArray = require('./isArray'),
|
6125 | isArrayLike = require('./isArrayLike'),
|
6126 | isBuffer = require('./isBuffer'),
|
6127 | isPrototype = require('./_isPrototype'),
|
6128 | isTypedArray = require('./isTypedArray');
|
6129 |
|
6130 |
|
6131 | var mapTag = '[object Map]',
|
6132 | setTag = '[object Set]';
|
6133 |
|
6134 |
|
6135 | var objectProto = Object.prototype;
|
6136 |
|
6137 |
|
6138 | var hasOwnProperty = objectProto.hasOwnProperty;
|
6139 |
|
6140 |
|
6141 |
|
6142 |
|
6143 |
|
6144 |
|
6145 |
|
6146 |
|
6147 |
|
6148 |
|
6149 |
|
6150 |
|
6151 |
|
6152 |
|
6153 |
|
6154 |
|
6155 |
|
6156 |
|
6157 |
|
6158 |
|
6159 |
|
6160 |
|
6161 |
|
6162 |
|
6163 |
|
6164 |
|
6165 |
|
6166 |
|
6167 |
|
6168 |
|
6169 |
|
6170 |
|
6171 |
|
6172 |
|
6173 | function isEmpty(value) {
|
6174 | if (value == null) {
|
6175 | return true;
|
6176 | }
|
6177 | if (isArrayLike(value) &&
|
6178 | (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
6179 | isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
6180 | return !value.length;
|
6181 | }
|
6182 | var tag = getTag(value);
|
6183 | if (tag == mapTag || tag == setTag) {
|
6184 | return !value.size;
|
6185 | }
|
6186 | if (isPrototype(value)) {
|
6187 | return !baseKeys(value).length;
|
6188 | }
|
6189 | for (var key in value) {
|
6190 | if (hasOwnProperty.call(value, key)) {
|
6191 | return false;
|
6192 | }
|
6193 | }
|
6194 | return true;
|
6195 | }
|
6196 |
|
6197 | module.exports = isEmpty;
|
6198 |
|
6199 | },{"./_baseKeys":60,"./_getTag":112,"./_isPrototype":129,"./isArguments":197,"./isArray":198,"./isArrayLike":199,"./isBuffer":201,"./isTypedArray":215}],203:[function(require,module,exports){
|
6200 | var baseIsEqual = require('./_baseIsEqual');
|
6201 |
|
6202 |
|
6203 |
|
6204 |
|
6205 |
|
6206 |
|
6207 |
|
6208 |
|
6209 |
|
6210 |
|
6211 |
|
6212 |
|
6213 |
|
6214 |
|
6215 |
|
6216 |
|
6217 |
|
6218 |
|
6219 |
|
6220 |
|
6221 |
|
6222 |
|
6223 |
|
6224 |
|
6225 |
|
6226 |
|
6227 |
|
6228 |
|
6229 |
|
6230 | function isEqual(value, other) {
|
6231 | return baseIsEqual(value, other);
|
6232 | }
|
6233 |
|
6234 | module.exports = isEqual;
|
6235 |
|
6236 | },{"./_baseIsEqual":50}],204:[function(require,module,exports){
|
6237 | var baseIsEqual = require('./_baseIsEqual');
|
6238 |
|
6239 |
|
6240 |
|
6241 |
|
6242 |
|
6243 |
|
6244 |
|
6245 |
|
6246 |
|
6247 |
|
6248 |
|
6249 |
|
6250 |
|
6251 |
|
6252 |
|
6253 |
|
6254 |
|
6255 |
|
6256 |
|
6257 |
|
6258 |
|
6259 |
|
6260 |
|
6261 |
|
6262 |
|
6263 |
|
6264 |
|
6265 |
|
6266 |
|
6267 |
|
6268 |
|
6269 |
|
6270 |
|
6271 | function isEqualWith(value, other, customizer) {
|
6272 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
6273 | var result = customizer ? customizer(value, other) : undefined;
|
6274 | return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
|
6275 | }
|
6276 |
|
6277 | module.exports = isEqualWith;
|
6278 |
|
6279 | },{"./_baseIsEqual":50}],205:[function(require,module,exports){
|
6280 | var baseGetTag = require('./_baseGetTag'),
|
6281 | isObject = require('./isObject');
|
6282 |
|
6283 |
|
6284 | var asyncTag = '[object AsyncFunction]',
|
6285 | funcTag = '[object Function]',
|
6286 | genTag = '[object GeneratorFunction]',
|
6287 | proxyTag = '[object Proxy]';
|
6288 |
|
6289 |
|
6290 |
|
6291 |
|
6292 |
|
6293 |
|
6294 |
|
6295 |
|
6296 |
|
6297 |
|
6298 |
|
6299 |
|
6300 |
|
6301 |
|
6302 |
|
6303 |
|
6304 |
|
6305 |
|
6306 | function isFunction(value) {
|
6307 | if (!isObject(value)) {
|
6308 | return false;
|
6309 | }
|
6310 |
|
6311 |
|
6312 | var tag = baseGetTag(value);
|
6313 | return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
6314 | }
|
6315 |
|
6316 | module.exports = isFunction;
|
6317 |
|
6318 | },{"./_baseGetTag":45,"./isObject":209}],206:[function(require,module,exports){
|
6319 |
|
6320 | var MAX_SAFE_INTEGER = 9007199254740991;
|
6321 |
|
6322 |
|
6323 |
|
6324 |
|
6325 |
|
6326 |
|
6327 |
|
6328 |
|
6329 |
|
6330 |
|
6331 |
|
6332 |
|
6333 |
|
6334 |
|
6335 |
|
6336 |
|
6337 |
|
6338 |
|
6339 |
|
6340 |
|
6341 |
|
6342 |
|
6343 |
|
6344 |
|
6345 |
|
6346 |
|
6347 |
|
6348 | function isLength(value) {
|
6349 | return typeof value == 'number' &&
|
6350 | value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
6351 | }
|
6352 |
|
6353 | module.exports = isLength;
|
6354 |
|
6355 | },{}],207:[function(require,module,exports){
|
6356 | var baseIsMap = require('./_baseIsMap'),
|
6357 | baseUnary = require('./_baseUnary'),
|
6358 | nodeUtil = require('./_nodeUtil');
|
6359 |
|
6360 |
|
6361 | var nodeIsMap = nodeUtil && nodeUtil.isMap;
|
6362 |
|
6363 |
|
6364 |
|
6365 |
|
6366 |
|
6367 |
|
6368 |
|
6369 |
|
6370 |
|
6371 |
|
6372 |
|
6373 |
|
6374 |
|
6375 |
|
6376 |
|
6377 |
|
6378 |
|
6379 |
|
6380 | var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
6381 |
|
6382 | module.exports = isMap;
|
6383 |
|
6384 | },{"./_baseIsMap":52,"./_baseUnary":75,"./_nodeUtil":148}],208:[function(require,module,exports){
|
6385 | var baseGetTag = require('./_baseGetTag'),
|
6386 | isObjectLike = require('./isObjectLike');
|
6387 |
|
6388 |
|
6389 | var numberTag = '[object Number]';
|
6390 |
|
6391 |
|
6392 |
|
6393 |
|
6394 |
|
6395 |
|
6396 |
|
6397 |
|
6398 |
|
6399 |
|
6400 |
|
6401 |
|
6402 |
|
6403 |
|
6404 |
|
6405 |
|
6406 |
|
6407 |
|
6408 |
|
6409 |
|
6410 |
|
6411 |
|
6412 |
|
6413 |
|
6414 |
|
6415 |
|
6416 |
|
6417 | function isNumber(value) {
|
6418 | return typeof value == 'number' ||
|
6419 | (isObjectLike(value) && baseGetTag(value) == numberTag);
|
6420 | }
|
6421 |
|
6422 | module.exports = isNumber;
|
6423 |
|
6424 | },{"./_baseGetTag":45,"./isObjectLike":210}],209:[function(require,module,exports){
|
6425 |
|
6426 |
|
6427 |
|
6428 |
|
6429 |
|
6430 |
|
6431 |
|
6432 |
|
6433 |
|
6434 |
|
6435 |
|
6436 |
|
6437 |
|
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 |
|
6443 |
|
6444 |
|
6445 |
|
6446 |
|
6447 |
|
6448 |
|
6449 |
|
6450 | function isObject(value) {
|
6451 | var type = typeof value;
|
6452 | return value != null && (type == 'object' || type == 'function');
|
6453 | }
|
6454 |
|
6455 | module.exports = isObject;
|
6456 |
|
6457 | },{}],210:[function(require,module,exports){
|
6458 |
|
6459 |
|
6460 |
|
6461 |
|
6462 |
|
6463 |
|
6464 |
|
6465 |
|
6466 |
|
6467 |
|
6468 |
|
6469 |
|
6470 |
|
6471 |
|
6472 |
|
6473 |
|
6474 |
|
6475 |
|
6476 |
|
6477 |
|
6478 |
|
6479 |
|
6480 |
|
6481 |
|
6482 | function isObjectLike(value) {
|
6483 | return value != null && typeof value == 'object';
|
6484 | }
|
6485 |
|
6486 | module.exports = isObjectLike;
|
6487 |
|
6488 | },{}],211:[function(require,module,exports){
|
6489 | var baseIsRegExp = require('./_baseIsRegExp'),
|
6490 | baseUnary = require('./_baseUnary'),
|
6491 | nodeUtil = require('./_nodeUtil');
|
6492 |
|
6493 |
|
6494 | var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
|
6495 |
|
6496 |
|
6497 |
|
6498 |
|
6499 |
|
6500 |
|
6501 |
|
6502 |
|
6503 |
|
6504 |
|
6505 |
|
6506 |
|
6507 |
|
6508 |
|
6509 |
|
6510 |
|
6511 |
|
6512 |
|
6513 | var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
6514 |
|
6515 | module.exports = isRegExp;
|
6516 |
|
6517 | },{"./_baseIsRegExp":56,"./_baseUnary":75,"./_nodeUtil":148}],212:[function(require,module,exports){
|
6518 | var baseIsSet = require('./_baseIsSet'),
|
6519 | baseUnary = require('./_baseUnary'),
|
6520 | nodeUtil = require('./_nodeUtil');
|
6521 |
|
6522 |
|
6523 | var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
6524 |
|
6525 |
|
6526 |
|
6527 |
|
6528 |
|
6529 |
|
6530 |
|
6531 |
|
6532 |
|
6533 |
|
6534 |
|
6535 |
|
6536 |
|
6537 |
|
6538 |
|
6539 |
|
6540 |
|
6541 |
|
6542 | var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
6543 |
|
6544 | module.exports = isSet;
|
6545 |
|
6546 | },{"./_baseIsSet":57,"./_baseUnary":75,"./_nodeUtil":148}],213:[function(require,module,exports){
|
6547 | var baseGetTag = require('./_baseGetTag'),
|
6548 | isArray = require('./isArray'),
|
6549 | isObjectLike = require('./isObjectLike');
|
6550 |
|
6551 |
|
6552 | var stringTag = '[object String]';
|
6553 |
|
6554 |
|
6555 |
|
6556 |
|
6557 |
|
6558 |
|
6559 |
|
6560 |
|
6561 |
|
6562 |
|
6563 |
|
6564 |
|
6565 |
|
6566 |
|
6567 |
|
6568 |
|
6569 |
|
6570 |
|
6571 | function isString(value) {
|
6572 | return typeof value == 'string' ||
|
6573 | (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
|
6574 | }
|
6575 |
|
6576 | module.exports = isString;
|
6577 |
|
6578 | },{"./_baseGetTag":45,"./isArray":198,"./isObjectLike":210}],214:[function(require,module,exports){
|
6579 | var baseGetTag = require('./_baseGetTag'),
|
6580 | isObjectLike = require('./isObjectLike');
|
6581 |
|
6582 |
|
6583 | var symbolTag = '[object Symbol]';
|
6584 |
|
6585 |
|
6586 |
|
6587 |
|
6588 |
|
6589 |
|
6590 |
|
6591 |
|
6592 |
|
6593 |
|
6594 |
|
6595 |
|
6596 |
|
6597 |
|
6598 |
|
6599 |
|
6600 |
|
6601 |
|
6602 | function isSymbol(value) {
|
6603 | return typeof value == 'symbol' ||
|
6604 | (isObjectLike(value) && baseGetTag(value) == symbolTag);
|
6605 | }
|
6606 |
|
6607 | module.exports = isSymbol;
|
6608 |
|
6609 | },{"./_baseGetTag":45,"./isObjectLike":210}],215:[function(require,module,exports){
|
6610 | var baseIsTypedArray = require('./_baseIsTypedArray'),
|
6611 | baseUnary = require('./_baseUnary'),
|
6612 | nodeUtil = require('./_nodeUtil');
|
6613 |
|
6614 |
|
6615 | var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
6616 |
|
6617 |
|
6618 |
|
6619 |
|
6620 |
|
6621 |
|
6622 |
|
6623 |
|
6624 |
|
6625 |
|
6626 |
|
6627 |
|
6628 |
|
6629 |
|
6630 |
|
6631 |
|
6632 |
|
6633 |
|
6634 | var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
6635 |
|
6636 | module.exports = isTypedArray;
|
6637 |
|
6638 | },{"./_baseIsTypedArray":58,"./_baseUnary":75,"./_nodeUtil":148}],216:[function(require,module,exports){
|
6639 | var arrayLikeKeys = require('./_arrayLikeKeys'),
|
6640 | baseKeys = require('./_baseKeys'),
|
6641 | isArrayLike = require('./isArrayLike');
|
6642 |
|
6643 |
|
6644 |
|
6645 |
|
6646 |
|
6647 |
|
6648 |
|
6649 |
|
6650 |
|
6651 |
|
6652 |
|
6653 |
|
6654 |
|
6655 |
|
6656 |
|
6657 |
|
6658 |
|
6659 |
|
6660 |
|
6661 |
|
6662 |
|
6663 |
|
6664 |
|
6665 |
|
6666 |
|
6667 |
|
6668 |
|
6669 |
|
6670 |
|
6671 | function keys(object) {
|
6672 | return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
6673 | }
|
6674 |
|
6675 | module.exports = keys;
|
6676 |
|
6677 | },{"./_arrayLikeKeys":22,"./_baseKeys":60,"./isArrayLike":199}],217:[function(require,module,exports){
|
6678 | var arrayLikeKeys = require('./_arrayLikeKeys'),
|
6679 | baseKeysIn = require('./_baseKeysIn'),
|
6680 | isArrayLike = require('./isArrayLike');
|
6681 |
|
6682 |
|
6683 |
|
6684 |
|
6685 |
|
6686 |
|
6687 |
|
6688 |
|
6689 |
|
6690 |
|
6691 |
|
6692 |
|
6693 |
|
6694 |
|
6695 |
|
6696 |
|
6697 |
|
6698 |
|
6699 |
|
6700 |
|
6701 |
|
6702 |
|
6703 |
|
6704 |
|
6705 | function keysIn(object) {
|
6706 | return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
6707 | }
|
6708 |
|
6709 | module.exports = keysIn;
|
6710 |
|
6711 | },{"./_arrayLikeKeys":22,"./_baseKeysIn":61,"./isArrayLike":199}],218:[function(require,module,exports){
|
6712 |
|
6713 |
|
6714 |
|
6715 |
|
6716 |
|
6717 |
|
6718 |
|
6719 |
|
6720 |
|
6721 |
|
6722 |
|
6723 |
|
6724 |
|
6725 |
|
6726 | function last(array) {
|
6727 | var length = array == null ? 0 : array.length;
|
6728 | return length ? array[length - 1] : undefined;
|
6729 | }
|
6730 |
|
6731 | module.exports = last;
|
6732 |
|
6733 | },{}],219:[function(require,module,exports){
|
6734 | var arrayMap = require('./_arrayMap'),
|
6735 | baseIteratee = require('./_baseIteratee'),
|
6736 | baseMap = require('./_baseMap'),
|
6737 | isArray = require('./isArray');
|
6738 |
|
6739 |
|
6740 |
|
6741 |
|
6742 |
|
6743 |
|
6744 |
|
6745 |
|
6746 |
|
6747 |
|
6748 |
|
6749 |
|
6750 |
|
6751 |
|
6752 |
|
6753 |
|
6754 |
|
6755 |
|
6756 |
|
6757 |
|
6758 |
|
6759 |
|
6760 |
|
6761 |
|
6762 |
|
6763 |
|
6764 |
|
6765 |
|
6766 |
|
6767 |
|
6768 |
|
6769 |
|
6770 |
|
6771 |
|
6772 |
|
6773 |
|
6774 |
|
6775 |
|
6776 |
|
6777 |
|
6778 |
|
6779 |
|
6780 |
|
6781 | function map(collection, iteratee) {
|
6782 | var func = isArray(collection) ? arrayMap : baseMap;
|
6783 | return func(collection, baseIteratee(iteratee, 3));
|
6784 | }
|
6785 |
|
6786 | module.exports = map;
|
6787 |
|
6788 | },{"./_arrayMap":23,"./_baseIteratee":59,"./_baseMap":62,"./isArray":198}],220:[function(require,module,exports){
|
6789 | var MapCache = require('./_MapCache');
|
6790 |
|
6791 |
|
6792 | var FUNC_ERROR_TEXT = 'Expected a function';
|
6793 |
|
6794 |
|
6795 |
|
6796 |
|
6797 |
|
6798 |
|
6799 |
|
6800 |
|
6801 |
|
6802 |
|
6803 |
|
6804 |
|
6805 |
|
6806 |
|
6807 |
|
6808 |
|
6809 |
|
6810 |
|
6811 |
|
6812 |
|
6813 |
|
6814 |
|
6815 |
|
6816 |
|
6817 |
|
6818 |
|
6819 |
|
6820 |
|
6821 |
|
6822 |
|
6823 |
|
6824 |
|
6825 |
|
6826 |
|
6827 |
|
6828 |
|
6829 |
|
6830 |
|
6831 |
|
6832 |
|
6833 |
|
6834 |
|
6835 |
|
6836 |
|
6837 |
|
6838 | function memoize(func, resolver) {
|
6839 | if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
6840 | throw new TypeError(FUNC_ERROR_TEXT);
|
6841 | }
|
6842 | var memoized = function() {
|
6843 | var args = arguments,
|
6844 | key = resolver ? resolver.apply(this, args) : args[0],
|
6845 | cache = memoized.cache;
|
6846 |
|
6847 | if (cache.has(key)) {
|
6848 | return cache.get(key);
|
6849 | }
|
6850 | var result = func.apply(this, args);
|
6851 | memoized.cache = cache.set(key, result) || cache;
|
6852 | return result;
|
6853 | };
|
6854 | memoized.cache = new (memoize.Cache || MapCache);
|
6855 | return memoized;
|
6856 | }
|
6857 |
|
6858 |
|
6859 | memoize.Cache = MapCache;
|
6860 |
|
6861 | module.exports = memoize;
|
6862 |
|
6863 | },{"./_MapCache":9}],221:[function(require,module,exports){
|
6864 |
|
6865 | var FUNC_ERROR_TEXT = 'Expected a function';
|
6866 |
|
6867 |
|
6868 |
|
6869 |
|
6870 |
|
6871 |
|
6872 |
|
6873 |
|
6874 |
|
6875 |
|
6876 |
|
6877 |
|
6878 |
|
6879 |
|
6880 |
|
6881 |
|
6882 |
|
6883 |
|
6884 |
|
6885 |
|
6886 |
|
6887 | function negate(predicate) {
|
6888 | if (typeof predicate != 'function') {
|
6889 | throw new TypeError(FUNC_ERROR_TEXT);
|
6890 | }
|
6891 | return function() {
|
6892 | var args = arguments;
|
6893 | switch (args.length) {
|
6894 | case 0: return !predicate.call(this);
|
6895 | case 1: return !predicate.call(this, args[0]);
|
6896 | case 2: return !predicate.call(this, args[0], args[1]);
|
6897 | case 3: return !predicate.call(this, args[0], args[1], args[2]);
|
6898 | }
|
6899 | return !predicate.apply(this, args);
|
6900 | };
|
6901 | }
|
6902 |
|
6903 | module.exports = negate;
|
6904 |
|
6905 | },{}],222:[function(require,module,exports){
|
6906 | var baseProperty = require('./_baseProperty'),
|
6907 | basePropertyDeep = require('./_basePropertyDeep'),
|
6908 | isKey = require('./_isKey'),
|
6909 | toKey = require('./_toKey');
|
6910 |
|
6911 |
|
6912 |
|
6913 |
|
6914 |
|
6915 |
|
6916 |
|
6917 |
|
6918 |
|
6919 |
|
6920 |
|
6921 |
|
6922 |
|
6923 |
|
6924 |
|
6925 |
|
6926 |
|
6927 |
|
6928 |
|
6929 |
|
6930 |
|
6931 |
|
6932 |
|
6933 | function property(path) {
|
6934 | return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
6935 | }
|
6936 |
|
6937 | module.exports = property;
|
6938 |
|
6939 | },{"./_baseProperty":65,"./_basePropertyDeep":66,"./_isKey":126,"./_toKey":167}],223:[function(require,module,exports){
|
6940 | var arrayReduce = require('./_arrayReduce'),
|
6941 | baseEach = require('./_baseEach'),
|
6942 | baseIteratee = require('./_baseIteratee'),
|
6943 | baseReduce = require('./_baseReduce'),
|
6944 | isArray = require('./isArray');
|
6945 |
|
6946 |
|
6947 |
|
6948 |
|
6949 |
|
6950 |
|
6951 |
|
6952 |
|
6953 |
|
6954 |
|
6955 |
|
6956 |
|
6957 |
|
6958 |
|
6959 |
|
6960 |
|
6961 |
|
6962 |
|
6963 |
|
6964 |
|
6965 |
|
6966 |
|
6967 |
|
6968 |
|
6969 |
|
6970 |
|
6971 |
|
6972 |
|
6973 |
|
6974 |
|
6975 |
|
6976 |
|
6977 |
|
6978 |
|
6979 |
|
6980 |
|
6981 |
|
6982 |
|
6983 | function reduce(collection, iteratee, accumulator) {
|
6984 | var func = isArray(collection) ? arrayReduce : baseReduce,
|
6985 | initAccum = arguments.length < 3;
|
6986 |
|
6987 | return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
|
6988 | }
|
6989 |
|
6990 | module.exports = reduce;
|
6991 |
|
6992 | },{"./_arrayReduce":25,"./_baseEach":37,"./_baseIteratee":59,"./_baseReduce":67,"./isArray":198}],224:[function(require,module,exports){
|
6993 | var arrayFilter = require('./_arrayFilter'),
|
6994 | baseFilter = require('./_baseFilter'),
|
6995 | baseIteratee = require('./_baseIteratee'),
|
6996 | isArray = require('./isArray'),
|
6997 | negate = require('./negate');
|
6998 |
|
6999 |
|
7000 |
|
7001 |
|
7002 |
|
7003 |
|
7004 |
|
7005 |
|
7006 |
|
7007 |
|
7008 |
|
7009 |
|
7010 |
|
7011 |
|
7012 |
|
7013 |
|
7014 |
|
7015 |
|
7016 |
|
7017 |
|
7018 |
|
7019 |
|
7020 |
|
7021 |
|
7022 |
|
7023 |
|
7024 |
|
7025 |
|
7026 |
|
7027 |
|
7028 |
|
7029 |
|
7030 |
|
7031 |
|
7032 |
|
7033 | function reject(collection, predicate) {
|
7034 | var func = isArray(collection) ? arrayFilter : baseFilter;
|
7035 | return func(collection, negate(baseIteratee(predicate, 3)));
|
7036 | }
|
7037 |
|
7038 | module.exports = reject;
|
7039 |
|
7040 | },{"./_arrayFilter":21,"./_baseFilter":39,"./_baseIteratee":59,"./isArray":198,"./negate":221}],225:[function(require,module,exports){
|
7041 | var arraySome = require('./_arraySome'),
|
7042 | baseIteratee = require('./_baseIteratee'),
|
7043 | baseSome = require('./_baseSome'),
|
7044 | isArray = require('./isArray'),
|
7045 | isIterateeCall = require('./_isIterateeCall');
|
7046 |
|
7047 |
|
7048 |
|
7049 |
|
7050 |
|
7051 |
|
7052 |
|
7053 |
|
7054 |
|
7055 |
|
7056 |
|
7057 |
|
7058 |
|
7059 |
|
7060 |
|
7061 |
|
7062 |
|
7063 |
|
7064 |
|
7065 |
|
7066 |
|
7067 |
|
7068 |
|
7069 |
|
7070 |
|
7071 |
|
7072 |
|
7073 |
|
7074 |
|
7075 |
|
7076 |
|
7077 |
|
7078 |
|
7079 |
|
7080 |
|
7081 |
|
7082 |
|
7083 | function some(collection, predicate, guard) {
|
7084 | var func = isArray(collection) ? arraySome : baseSome;
|
7085 | if (guard && isIterateeCall(collection, predicate, guard)) {
|
7086 | predicate = undefined;
|
7087 | }
|
7088 | return func(collection, baseIteratee(predicate, 3));
|
7089 | }
|
7090 |
|
7091 | module.exports = some;
|
7092 |
|
7093 | },{"./_arraySome":26,"./_baseIteratee":59,"./_baseSome":71,"./_isIterateeCall":125,"./isArray":198}],226:[function(require,module,exports){
|
7094 |
|
7095 |
|
7096 |
|
7097 |
|
7098 |
|
7099 |
|
7100 |
|
7101 |
|
7102 |
|
7103 |
|
7104 |
|
7105 |
|
7106 |
|
7107 |
|
7108 |
|
7109 |
|
7110 |
|
7111 |
|
7112 | function stubArray() {
|
7113 | return [];
|
7114 | }
|
7115 |
|
7116 | module.exports = stubArray;
|
7117 |
|
7118 | },{}],227:[function(require,module,exports){
|
7119 |
|
7120 |
|
7121 |
|
7122 |
|
7123 |
|
7124 |
|
7125 |
|
7126 |
|
7127 |
|
7128 |
|
7129 |
|
7130 |
|
7131 |
|
7132 | function stubFalse() {
|
7133 | return false;
|
7134 | }
|
7135 |
|
7136 | module.exports = stubFalse;
|
7137 |
|
7138 | },{}],228:[function(require,module,exports){
|
7139 |
|
7140 |
|
7141 |
|
7142 |
|
7143 |
|
7144 |
|
7145 |
|
7146 |
|
7147 |
|
7148 |
|
7149 |
|
7150 |
|
7151 |
|
7152 |
|
7153 |
|
7154 |
|
7155 |
|
7156 |
|
7157 |
|
7158 |
|
7159 |
|
7160 |
|
7161 |
|
7162 | function tap(value, interceptor) {
|
7163 | interceptor(value);
|
7164 | return value;
|
7165 | }
|
7166 |
|
7167 | module.exports = tap;
|
7168 |
|
7169 | },{}],229:[function(require,module,exports){
|
7170 | var Symbol = require('./_Symbol'),
|
7171 | copyArray = require('./_copyArray'),
|
7172 | getTag = require('./_getTag'),
|
7173 | isArrayLike = require('./isArrayLike'),
|
7174 | isString = require('./isString'),
|
7175 | iteratorToArray = require('./_iteratorToArray'),
|
7176 | mapToArray = require('./_mapToArray'),
|
7177 | setToArray = require('./_setToArray'),
|
7178 | stringToArray = require('./_stringToArray'),
|
7179 | values = require('./values');
|
7180 |
|
7181 |
|
7182 | var mapTag = '[object Map]',
|
7183 | setTag = '[object Set]';
|
7184 |
|
7185 |
|
7186 | var symIterator = Symbol ? Symbol.iterator : undefined;
|
7187 |
|
7188 |
|
7189 |
|
7190 |
|
7191 |
|
7192 |
|
7193 |
|
7194 |
|
7195 |
|
7196 |
|
7197 |
|
7198 |
|
7199 |
|
7200 |
|
7201 |
|
7202 |
|
7203 |
|
7204 |
|
7205 |
|
7206 |
|
7207 |
|
7208 |
|
7209 |
|
7210 |
|
7211 | function toArray(value) {
|
7212 | if (!value) {
|
7213 | return [];
|
7214 | }
|
7215 | if (isArrayLike(value)) {
|
7216 | return isString(value) ? stringToArray(value) : copyArray(value);
|
7217 | }
|
7218 | if (symIterator && value[symIterator]) {
|
7219 | return iteratorToArray(value[symIterator]());
|
7220 | }
|
7221 | var tag = getTag(value),
|
7222 | func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
|
7223 |
|
7224 | return func(value);
|
7225 | }
|
7226 |
|
7227 | module.exports = toArray;
|
7228 |
|
7229 | },{"./_Symbol":14,"./_copyArray":87,"./_getTag":112,"./_iteratorToArray":131,"./_mapToArray":142,"./_setToArray":156,"./_stringToArray":165,"./isArrayLike":199,"./isString":213,"./values":236}],230:[function(require,module,exports){
|
7230 | var toNumber = require('./toNumber');
|
7231 |
|
7232 |
|
7233 | var INFINITY = 1 / 0,
|
7234 | MAX_INTEGER = 1.7976931348623157e+308;
|
7235 |
|
7236 |
|
7237 |
|
7238 |
|
7239 |
|
7240 |
|
7241 |
|
7242 |
|
7243 |
|
7244 |
|
7245 |
|
7246 |
|
7247 |
|
7248 |
|
7249 |
|
7250 |
|
7251 |
|
7252 |
|
7253 |
|
7254 |
|
7255 |
|
7256 |
|
7257 |
|
7258 |
|
7259 | function toFinite(value) {
|
7260 | if (!value) {
|
7261 | return value === 0 ? value : 0;
|
7262 | }
|
7263 | value = toNumber(value);
|
7264 | if (value === INFINITY || value === -INFINITY) {
|
7265 | var sign = (value < 0 ? -1 : 1);
|
7266 | return sign * MAX_INTEGER;
|
7267 | }
|
7268 | return value === value ? value : 0;
|
7269 | }
|
7270 |
|
7271 | module.exports = toFinite;
|
7272 |
|
7273 | },{"./toNumber":232}],231:[function(require,module,exports){
|
7274 | var toFinite = require('./toFinite');
|
7275 |
|
7276 |
|
7277 |
|
7278 |
|
7279 |
|
7280 |
|
7281 |
|
7282 |
|
7283 |
|
7284 |
|
7285 |
|
7286 |
|
7287 |
|
7288 |
|
7289 |
|
7290 |
|
7291 |
|
7292 |
|
7293 |
|
7294 |
|
7295 |
|
7296 |
|
7297 |
|
7298 |
|
7299 |
|
7300 |
|
7301 |
|
7302 | function toInteger(value) {
|
7303 | var result = toFinite(value),
|
7304 | remainder = result % 1;
|
7305 |
|
7306 | return result === result ? (remainder ? result - remainder : result) : 0;
|
7307 | }
|
7308 |
|
7309 | module.exports = toInteger;
|
7310 |
|
7311 | },{"./toFinite":230}],232:[function(require,module,exports){
|
7312 | var baseTrim = require('./_baseTrim'),
|
7313 | isObject = require('./isObject'),
|
7314 | isSymbol = require('./isSymbol');
|
7315 |
|
7316 |
|
7317 | var NAN = 0 / 0;
|
7318 |
|
7319 |
|
7320 | var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
7321 |
|
7322 |
|
7323 | var reIsBinary = /^0b[01]+$/i;
|
7324 |
|
7325 |
|
7326 | var reIsOctal = /^0o[0-7]+$/i;
|
7327 |
|
7328 |
|
7329 | var freeParseInt = parseInt;
|
7330 |
|
7331 |
|
7332 |
|
7333 |
|
7334 |
|
7335 |
|
7336 |
|
7337 |
|
7338 |
|
7339 |
|
7340 |
|
7341 |
|
7342 |
|
7343 |
|
7344 |
|
7345 |
|
7346 |
|
7347 |
|
7348 |
|
7349 |
|
7350 |
|
7351 |
|
7352 |
|
7353 |
|
7354 | function toNumber(value) {
|
7355 | if (typeof value == 'number') {
|
7356 | return value;
|
7357 | }
|
7358 | if (isSymbol(value)) {
|
7359 | return NAN;
|
7360 | }
|
7361 | if (isObject(value)) {
|
7362 | var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
7363 | value = isObject(other) ? (other + '') : other;
|
7364 | }
|
7365 | if (typeof value != 'string') {
|
7366 | return value === 0 ? value : +value;
|
7367 | }
|
7368 | value = baseTrim(value);
|
7369 | var isBinary = reIsBinary.test(value);
|
7370 | return (isBinary || reIsOctal.test(value))
|
7371 | ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
7372 | : (reIsBadHex.test(value) ? NAN : +value);
|
7373 | }
|
7374 |
|
7375 | module.exports = toNumber;
|
7376 |
|
7377 | },{"./_baseTrim":74,"./isObject":209,"./isSymbol":214}],233:[function(require,module,exports){
|
7378 | var baseToString = require('./_baseToString');
|
7379 |
|
7380 |
|
7381 |
|
7382 |
|
7383 |
|
7384 |
|
7385 |
|
7386 |
|
7387 |
|
7388 |
|
7389 |
|
7390 |
|
7391 |
|
7392 |
|
7393 |
|
7394 |
|
7395 |
|
7396 |
|
7397 |
|
7398 |
|
7399 |
|
7400 |
|
7401 | function toString(value) {
|
7402 | return value == null ? '' : baseToString(value);
|
7403 | }
|
7404 |
|
7405 | module.exports = toString;
|
7406 |
|
7407 | },{"./_baseToString":73}],234:[function(require,module,exports){
|
7408 | var arrayEach = require('./_arrayEach'),
|
7409 | baseCreate = require('./_baseCreate'),
|
7410 | baseForOwn = require('./_baseForOwn'),
|
7411 | baseIteratee = require('./_baseIteratee'),
|
7412 | getPrototype = require('./_getPrototype'),
|
7413 | isArray = require('./isArray'),
|
7414 | isBuffer = require('./isBuffer'),
|
7415 | isFunction = require('./isFunction'),
|
7416 | isObject = require('./isObject'),
|
7417 | isTypedArray = require('./isTypedArray');
|
7418 |
|
7419 |
|
7420 |
|
7421 |
|
7422 |
|
7423 |
|
7424 |
|
7425 |
|
7426 |
|
7427 |
|
7428 |
|
7429 |
|
7430 |
|
7431 |
|
7432 |
|
7433 |
|
7434 |
|
7435 |
|
7436 |
|
7437 |
|
7438 |
|
7439 |
|
7440 |
|
7441 |
|
7442 |
|
7443 |
|
7444 |
|
7445 |
|
7446 |
|
7447 |
|
7448 |
|
7449 | function transform(object, iteratee, accumulator) {
|
7450 | var isArr = isArray(object),
|
7451 | isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
7452 |
|
7453 | iteratee = baseIteratee(iteratee, 4);
|
7454 | if (accumulator == null) {
|
7455 | var Ctor = object && object.constructor;
|
7456 | if (isArrLike) {
|
7457 | accumulator = isArr ? new Ctor : [];
|
7458 | }
|
7459 | else if (isObject(object)) {
|
7460 | accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
7461 | }
|
7462 | else {
|
7463 | accumulator = {};
|
7464 | }
|
7465 | }
|
7466 | (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
|
7467 | return iteratee(accumulator, value, index, object);
|
7468 | });
|
7469 | return accumulator;
|
7470 | }
|
7471 |
|
7472 | module.exports = transform;
|
7473 |
|
7474 | },{"./_arrayEach":19,"./_baseCreate":35,"./_baseForOwn":42,"./_baseIteratee":59,"./_getPrototype":108,"./isArray":198,"./isBuffer":201,"./isFunction":205,"./isObject":209,"./isTypedArray":215}],235:[function(require,module,exports){
|
7475 | var createCaseFirst = require('./_createCaseFirst');
|
7476 |
|
7477 |
|
7478 |
|
7479 |
|
7480 |
|
7481 |
|
7482 |
|
7483 |
|
7484 |
|
7485 |
|
7486 |
|
7487 |
|
7488 |
|
7489 |
|
7490 |
|
7491 |
|
7492 |
|
7493 |
|
7494 | var upperFirst = createCaseFirst('toUpperCase');
|
7495 |
|
7496 | module.exports = upperFirst;
|
7497 |
|
7498 | },{"./_createCaseFirst":96}],236:[function(require,module,exports){
|
7499 | var baseValues = require('./_baseValues'),
|
7500 | keys = require('./keys');
|
7501 |
|
7502 |
|
7503 |
|
7504 |
|
7505 |
|
7506 |
|
7507 |
|
7508 |
|
7509 |
|
7510 |
|
7511 |
|
7512 |
|
7513 |
|
7514 |
|
7515 |
|
7516 |
|
7517 |
|
7518 |
|
7519 |
|
7520 |
|
7521 |
|
7522 |
|
7523 |
|
7524 |
|
7525 |
|
7526 |
|
7527 |
|
7528 | function values(object) {
|
7529 | return object == null ? [] : baseValues(object, keys(object));
|
7530 | }
|
7531 |
|
7532 | module.exports = values;
|
7533 |
|
7534 | },{"./_baseValues":76,"./keys":216}],237:[function(require,module,exports){
|
7535 | 'use strict';
|
7536 | var isRegexp = require('is-regexp');
|
7537 | var isPlainObj = require('is-plain-obj');
|
7538 |
|
7539 | module.exports = function (val, opts, pad) {
|
7540 | var seen = [];
|
7541 |
|
7542 | return (function stringify(val, opts, pad) {
|
7543 | opts = opts || {};
|
7544 | opts.indent = opts.indent || '\t';
|
7545 | pad = pad || '';
|
7546 | var tokens;
|
7547 | if(opts.inlineCharacterLimit == void 0) {
|
7548 | tokens = {
|
7549 | newLine: '\n',
|
7550 | newLineOrSpace: '\n',
|
7551 | pad: pad,
|
7552 | indent: pad + opts.indent
|
7553 | };
|
7554 | } else {
|
7555 | tokens = {
|
7556 | newLine: '@@__STRINGIFY_OBJECT_NEW_LINE__@@',
|
7557 | newLineOrSpace: '@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@',
|
7558 | pad: '@@__STRINGIFY_OBJECT_PAD__@@',
|
7559 | indent: '@@__STRINGIFY_OBJECT_INDENT__@@'
|
7560 | }
|
7561 | }
|
7562 | var expandWhiteSpace = function(string) {
|
7563 | if (opts.inlineCharacterLimit == void 0) { return string; }
|
7564 | var oneLined = string.
|
7565 | replace(new RegExp(tokens.newLine, 'g'), '').
|
7566 | replace(new RegExp(tokens.newLineOrSpace, 'g'), ' ').
|
7567 | replace(new RegExp(tokens.pad + '|' + tokens.indent, 'g'), '');
|
7568 |
|
7569 | if(oneLined.length <= opts.inlineCharacterLimit) {
|
7570 | return oneLined;
|
7571 | } else {
|
7572 | return string.
|
7573 | replace(new RegExp(tokens.newLine + '|' + tokens.newLineOrSpace, 'g'), '\n').
|
7574 | replace(new RegExp(tokens.pad, 'g'), pad).
|
7575 | replace(new RegExp(tokens.indent, 'g'), pad + opts.indent);
|
7576 | }
|
7577 | };
|
7578 |
|
7579 | if (seen.indexOf(val) !== -1) {
|
7580 | return '"[Circular]"';
|
7581 | }
|
7582 |
|
7583 | if (val === null ||
|
7584 | val === undefined ||
|
7585 | typeof val === 'number' ||
|
7586 | typeof val === 'boolean' ||
|
7587 | typeof val === 'function' ||
|
7588 | isRegexp(val)) {
|
7589 | return String(val);
|
7590 | }
|
7591 |
|
7592 | if (val instanceof Date) {
|
7593 | return 'new Date(\'' + val.toISOString() + '\')';
|
7594 | }
|
7595 |
|
7596 | if (Array.isArray(val)) {
|
7597 | if (val.length === 0) {
|
7598 | return '[]';
|
7599 | }
|
7600 |
|
7601 | seen.push(val);
|
7602 |
|
7603 | var ret = '[' + tokens.newLine + val.map(function (el, i) {
|
7604 | var eol = val.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace;
|
7605 | var value = stringify(el, opts, pad + opts.indent);
|
7606 | if (opts.transform) {
|
7607 | value = opts.transform(val, i, value);
|
7608 | }
|
7609 | return tokens.indent + value + eol;
|
7610 | }).join('') + tokens.pad + ']';
|
7611 |
|
7612 | seen.pop(val);
|
7613 |
|
7614 | return expandWhiteSpace(ret);
|
7615 | }
|
7616 |
|
7617 | if (isPlainObj(val)) {
|
7618 | var objKeys = Object.keys(val);
|
7619 |
|
7620 | if (objKeys.length === 0) {
|
7621 | return '{}';
|
7622 | }
|
7623 |
|
7624 | seen.push(val);
|
7625 |
|
7626 | var ret = '{' + tokens.newLine + objKeys.map(function (el, i) {
|
7627 | if (opts.filter && !opts.filter(val, el)) {
|
7628 | return '';
|
7629 | }
|
7630 |
|
7631 | var eol = objKeys.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace;
|
7632 | var key = /^[a-z$_][a-z$_0-9]*$/i.test(el) ? el : stringify(el, opts);
|
7633 | var value = stringify(val[el], opts, pad + opts.indent);
|
7634 | if (opts.transform) {
|
7635 | value = opts.transform(val, el, value);
|
7636 | }
|
7637 | return tokens.indent + String(key) + ': ' + value + eol;
|
7638 | }).join('') + tokens.pad + '}';
|
7639 |
|
7640 | seen.pop(val);
|
7641 |
|
7642 | return expandWhiteSpace(ret);
|
7643 | }
|
7644 |
|
7645 | val = String(val).replace(/[\r\n]/g, function (x) {
|
7646 | return x === '\n' ? '\\n' : '\\r';
|
7647 | });
|
7648 |
|
7649 | if (opts.singleQuotes === false) {
|
7650 | return '"' + val.replace(/"/g, '\\\"') + '"';
|
7651 | }
|
7652 |
|
7653 | return '\'' + val.replace(/'/g, '\\\'') + '\'';
|
7654 | })(val, opts, pad);
|
7655 | };
|
7656 |
|
7657 | },{"is-plain-obj":3,"is-regexp":4}],238:[function(require,module,exports){
|
7658 | module.exports = function theredoc (strings, ...values) {
|
7659 | const lines = withoutLeadingAndTrailingBlankLines(
|
7660 | zipString(strings, values).split('\n')
|
7661 | )
|
7662 | return stripIndent(lines, smallestIndent(lines)).join('\n')
|
7663 | }
|
7664 |
|
7665 | function zipString (strings, values) {
|
7666 | let s = ''
|
7667 | strings.forEach((string, i) => {
|
7668 | s += string + (values[i] || '')
|
7669 | })
|
7670 | return s
|
7671 | }
|
7672 |
|
7673 | function smallestIndent (lines) {
|
7674 | let smallest = null
|
7675 | lines.forEach(line => {
|
7676 | const indent = line.search(/[^ ]/)
|
7677 | if (indent !== -1 && (smallest === null || indent < smallest)) {
|
7678 | smallest = indent
|
7679 | }
|
7680 | })
|
7681 | return smallest
|
7682 | }
|
7683 |
|
7684 | function stripIndent (lines, spacesToStrip) {
|
7685 | const findIndent = new RegExp(`^ {${spacesToStrip}}`)
|
7686 | return lines.map(line => {
|
7687 | if (findIndent.test(line)) {
|
7688 | return line.replace(findIndent, '')
|
7689 | } else {
|
7690 | return line
|
7691 | }
|
7692 | })
|
7693 | }
|
7694 |
|
7695 |
|
7696 | function withoutLeadingAndTrailingBlankLines (lines) {
|
7697 | const leadingBlankLine = isWhitespace(lines[0])
|
7698 | const trailingBlankLine = isWhitespace(lines[lines.length - 1])
|
7699 | if (leadingBlankLine || trailingBlankLine) {
|
7700 | return lines.slice(
|
7701 | leadingBlankLine ? 1 : 0,
|
7702 | trailingBlankLine ? lines.length - 1 : lines.length
|
7703 | )
|
7704 | } else {
|
7705 | return lines
|
7706 | }
|
7707 | }
|
7708 |
|
7709 | function isWhitespace (s) {
|
7710 | return /^\s*$/.test(s)
|
7711 | }
|
7712 |
|
7713 | },{}],239:[function(require,module,exports){
|
7714 | "use strict";
|
7715 | Object.defineProperty(exports, "__esModule", { value: true });
|
7716 | var lodash_1 = require("./wrap/lodash");
|
7717 | var is_matcher_1 = require("./matchers/is-matcher");
|
7718 | exports.default = (function (expectedArgs, actualArgs, config) {
|
7719 | if (config === void 0) { config = {}; }
|
7720 | if (arityMismatch(expectedArgs, actualArgs, config)) {
|
7721 | return false;
|
7722 | }
|
7723 | else if (config.allowMatchers !== false) {
|
7724 | return equalsWithMatchers(expectedArgs, actualArgs);
|
7725 | }
|
7726 | else {
|
7727 | return lodash_1.default.isEqual(expectedArgs, actualArgs);
|
7728 | }
|
7729 | });
|
7730 | var arityMismatch = function (expectedArgs, actualArgs, config) {
|
7731 | return expectedArgs.length !== actualArgs.length && !config.ignoreExtraArgs;
|
7732 | };
|
7733 | var equalsWithMatchers = function (expectedArgs, actualArgs) {
|
7734 | return lodash_1.default.every(expectedArgs, function (expectedArg, key) {
|
7735 | return argumentMatchesExpectation(expectedArg, actualArgs[key]);
|
7736 | });
|
7737 | };
|
7738 | var argumentMatchesExpectation = function (expectedArg, actualArg) {
|
7739 | if ((0, is_matcher_1.default)(expectedArg)) {
|
7740 | return matcherTestFor(expectedArg)(actualArg);
|
7741 | }
|
7742 | else {
|
7743 | return lodash_1.default.isEqualWith(expectedArg, actualArg, function (expectedEl, actualEl) {
|
7744 | if ((0, is_matcher_1.default)(expectedEl)) {
|
7745 | return matcherTestFor(expectedEl)(actualEl);
|
7746 | }
|
7747 | });
|
7748 | }
|
7749 | };
|
7750 | var matcherTestFor = function (matcher) {
|
7751 | return matcher.__matches;
|
7752 | };
|
7753 |
|
7754 | },{"./matchers/is-matcher":270,"./wrap/lodash":288}],240:[function(require,module,exports){
|
7755 | "use strict";
|
7756 | Object.defineProperty(exports, "__esModule", { value: true });
|
7757 | var lodash_1 = require("./wrap/lodash");
|
7758 | var create_1 = require("./matchers/create");
|
7759 | var callback = (0, create_1.default)({
|
7760 | name: 'callback',
|
7761 | matches: function (matcherArgs, actual) {
|
7762 | return lodash_1.default.isFunction(actual);
|
7763 | },
|
7764 | onCreate: function (matcherInstance, matcherArgs) {
|
7765 | matcherInstance.args = matcherArgs;
|
7766 | matcherInstance.__testdouble_callback = true;
|
7767 | }
|
7768 | });
|
7769 |
|
7770 | callback.__name = 'callback';
|
7771 | callback.__matches = lodash_1.default.isFunction;
|
7772 | exports.default = callback;
|
7773 |
|
7774 | },{"./matchers/create":267,"./wrap/lodash":288}],241:[function(require,module,exports){
|
7775 | var Module = require('module');
|
7776 | function canRegisterLoader() {
|
7777 | return !!Module.register;
|
7778 | }
|
7779 | exports.canRegisterLoader = canRegisterLoader;
|
7780 |
|
7781 | },{"module":1}],242:[function(require,module,exports){
|
7782 | "use strict";
|
7783 | Object.defineProperty(exports, "__esModule", { value: true });
|
7784 | var lodash_1 = require("./wrap/lodash");
|
7785 | var symbols_1 = require("./symbols");
|
7786 | function cloneDeepIfPossible(args) {
|
7787 | try {
|
7788 | return lodash_1.default.cloneDeep(args);
|
7789 | }
|
7790 | catch (e) {
|
7791 | return symbols_1.default.uncloneable;
|
7792 | }
|
7793 | }
|
7794 | exports.default = cloneDeepIfPossible;
|
7795 |
|
7796 | },{"./symbols":284,"./wrap/lodash":288}],243:[function(require,module,exports){
|
7797 | "use strict";
|
7798 | Object.defineProperty(exports, "__esModule", { value: true });
|
7799 | var lodash_1 = require("./wrap/lodash");
|
7800 | var log_1 = require("./log");
|
7801 | var anything_1 = require("./stringify/anything");
|
7802 | var DEFAULTS = {
|
7803 | ignoreWarnings: false,
|
7804 | promiseConstructor: Promise,
|
7805 | suppressErrors: false
|
7806 | };
|
7807 | var DELETED_OPTIONS = ['extendWhenReplacingConstructors'];
|
7808 | var configData = lodash_1.default.extend({}, DEFAULTS);
|
7809 | exports.default = lodash_1.default.tap(function (overrides) {
|
7810 | deleteDeletedOptions(overrides);
|
7811 | ensureOverridesExist(overrides);
|
7812 | return lodash_1.default.extend(configData, overrides);
|
7813 | }, function (config) {
|
7814 | config.reset = function () {
|
7815 | configData = lodash_1.default.extend({}, DEFAULTS);
|
7816 | };
|
7817 | });
|
7818 | var deleteDeletedOptions = function (overrides) {
|
7819 | lodash_1.default.each(overrides, function (val, key) {
|
7820 | if (lodash_1.default.includes(DELETED_OPTIONS, key)) {
|
7821 | log_1.default.warn('td.config', "\"".concat(key, "\" is no longer a valid configuration key. Remove it from your calls to td.config() or it may throw an error in the future. For more information, try hunting around our GitHub repo for it:\n\n https://github.com/testdouble/testdouble.js/search?q=").concat(key));
|
7822 | delete overrides[key];
|
7823 | }
|
7824 | });
|
7825 | };
|
7826 | var ensureOverridesExist = function (overrides) {
|
7827 | lodash_1.default.each(overrides, function (val, key) {
|
7828 | if (!Object.prototype.hasOwnProperty.call(configData, key)) {
|
7829 | log_1.default.error('td.config', "\"".concat(key, "\" is not a valid configuration key (valid keys are: ").concat((0, anything_1.default)(lodash_1.default.keys(configData)), ")"));
|
7830 | }
|
7831 | });
|
7832 | };
|
7833 |
|
7834 | },{"./log":260,"./stringify/anything":282,"./wrap/lodash":288}],244:[function(require,module,exports){
|
7835 | "use strict";
|
7836 | Object.defineProperty(exports, "__esModule", { value: true });
|
7837 | var lodash_1 = require("./wrap/lodash");
|
7838 | var function_1 = require("./function");
|
7839 | var imitate_1 = require("./imitate");
|
7840 | exports.default = (function (typeOrNames) {
|
7841 | return lodash_1.default.isFunction(typeOrNames)
|
7842 | ? (0, imitate_1.default)(typeOrNames)
|
7843 | : fakeConstructorFromNames(typeOrNames);
|
7844 | });
|
7845 | var fakeConstructorFromNames = function (funcNames) {
|
7846 | return lodash_1.default.tap((0, function_1.default)('(unnamed constructor)'), function (fakeConstructor) {
|
7847 | fakeConstructor.prototype.toString = function () {
|
7848 | return '[test double instance of constructor]';
|
7849 | };
|
7850 | lodash_1.default.each(funcNames, function (funcName) {
|
7851 | fakeConstructor.prototype[funcName] = (0, function_1.default)("#".concat(String(funcName)));
|
7852 | });
|
7853 | });
|
7854 | };
|
7855 |
|
7856 | },{"./function":246,"./imitate":248,"./wrap/lodash":288}],245:[function(require,module,exports){
|
7857 | "use strict";
|
7858 | Object.defineProperty(exports, "__esModule", { value: true });
|
7859 | var lodash_1 = require("./wrap/lodash");
|
7860 | var proxy_safe_clone_deep_with_1 = require("./wrap/proxy-safe-clone-deep-with");
|
7861 | var calls_1 = require("./store/calls");
|
7862 | var store_1 = require("./store");
|
7863 | var arguments_1 = require("./stringify/arguments");
|
7864 | var stubbings_1 = require("./store/stubbings");
|
7865 | var symbols_1 = require("./symbols");
|
7866 | function explain(testDouble) {
|
7867 | if (lodash_1.default.isFunction(testDouble)) {
|
7868 | return explainFunction(testDouble);
|
7869 | }
|
7870 | else if (lodash_1.default.isObject(testDouble)) {
|
7871 | return explainObject(testDouble);
|
7872 | }
|
7873 | else {
|
7874 | return explainNonTestDouble(testDouble);
|
7875 | }
|
7876 | }
|
7877 | exports.default = explain;
|
7878 | function explainObject(obj) {
|
7879 | var _a = explainChildren(obj), explanations = _a.explanations, children = _a.children;
|
7880 | return {
|
7881 | name: null,
|
7882 | callCount: 0,
|
7883 | calls: [],
|
7884 | description: describeObject(explanations),
|
7885 | children: children,
|
7886 | isTestDouble: explanations.length > 0
|
7887 | };
|
7888 | }
|
7889 | function explainChildren(thing) {
|
7890 | var explanations = [];
|
7891 | var children = (0, proxy_safe_clone_deep_with_1.default)(thing, function (val, key, obj, stack) {
|
7892 | if (lodash_1.default.isFunction(val) && stack) {
|
7893 | return lodash_1.default.tap(explainFunction(val), function (explanation) {
|
7894 | if (explanation.isTestDouble)
|
7895 | explanations.push(explanation);
|
7896 | });
|
7897 | }
|
7898 | });
|
7899 | return { explanations: explanations, children: children };
|
7900 | }
|
7901 | function describeObject(explanations) {
|
7902 | var count = explanations.length;
|
7903 | if (count === 0)
|
7904 | return 'This object contains no test doubles';
|
7905 | return "This object contains ".concat(count, " test double function").concat(count > 1 ? 's' : '', ": [").concat(lodash_1.default.map(explanations, function (e) {
|
7906 | return "\"".concat(e.name, "\"");
|
7907 | }).join(', '), "]");
|
7908 | }
|
7909 | function explainFunction(testDouble) {
|
7910 | if (store_1.default.for(testDouble, false) == null) {
|
7911 | return explainNonTestDouble(testDouble);
|
7912 | }
|
7913 | var calls = calls_1.default.for(testDouble);
|
7914 | var stubs = stubbings_1.default.for(testDouble);
|
7915 | var children = explainChildren(testDouble).children;
|
7916 | return {
|
7917 | name: store_1.default.for(testDouble).name,
|
7918 | callCount: calls.length,
|
7919 | calls: calls,
|
7920 | description: testdoubleDescription(testDouble, stubs, calls) +
|
7921 | stubbingDescription(stubs) +
|
7922 | callDescription(calls),
|
7923 | children: children,
|
7924 | isTestDouble: true
|
7925 | };
|
7926 | }
|
7927 | function explainNonTestDouble(thing) {
|
7928 | return ({
|
7929 | name: undefined,
|
7930 | callCount: 0,
|
7931 | calls: [],
|
7932 | description: "This is not a test double".concat(lodash_1.default.isFunction(thing) ? ' function' : '', "."),
|
7933 | isTestDouble: false
|
7934 | });
|
7935 | }
|
7936 | function testdoubleDescription(testDouble, stubs, calls) {
|
7937 | return "This test double ".concat(stringifyName(testDouble), "has ").concat(stubs.length, " stubbings and ").concat(calls.length, " invocations.");
|
7938 | }
|
7939 | function stubbingDescription(stubs) {
|
7940 | return stubs.length > 0
|
7941 | ? lodash_1.default.reduce(stubs, function (desc, stub) {
|
7942 | return desc + "\n - when called with `(".concat((0, arguments_1.default)(stub.args), ")`, then ").concat(planFor(stub), " ").concat(argsFor(stub), ".");
|
7943 | }, '\n\nStubbings:')
|
7944 | : '';
|
7945 | }
|
7946 | function planFor(stub) {
|
7947 | switch (stub.config.plan) {
|
7948 | case 'thenCallback': return 'callback';
|
7949 | case 'thenResolve': return 'resolve';
|
7950 | case 'thenReject': return 'reject';
|
7951 | default: return 'return';
|
7952 | }
|
7953 | }
|
7954 | function argsFor(stub) {
|
7955 | switch (stub.config.plan) {
|
7956 | case 'thenCallback': return "`(".concat((0, arguments_1.default)(stub.stubbedValues, ', '), ")`");
|
7957 | default: return (0, arguments_1.default)(stub.stubbedValues, ', then ', '`');
|
7958 | }
|
7959 | }
|
7960 | function callDescription(calls) {
|
7961 | return calls.length > 0
|
7962 | ? lodash_1.default.reduce(calls, function (desc, call) {
|
7963 | var argDescription;
|
7964 | if (call.cloneArgs !== symbols_1.default.uncloneable) {
|
7965 | argDescription = "`(".concat((0, arguments_1.default)(call.cloneArgs), ")`.");
|
7966 | }
|
7967 | else {
|
7968 | argDescription = "`(".concat((0, arguments_1.default)(call.args), ")` [Cloning argument values failed; displaying current references]");
|
7969 | }
|
7970 | return desc + "\n - called with ".concat(argDescription);
|
7971 | }, '\n\nInvocations:')
|
7972 | : '';
|
7973 | }
|
7974 | function stringifyName(testDouble) {
|
7975 | var name = store_1.default.for(testDouble).name;
|
7976 | return name ? "`".concat(name, "` ") : '';
|
7977 | }
|
7978 |
|
7979 | },{"./store":280,"./store/calls":279,"./store/stubbings":281,"./stringify/arguments":283,"./symbols":284,"./wrap/lodash":288,"./wrap/proxy-safe-clone-deep-with":289}],246:[function(require,module,exports){
|
7980 | "use strict";
|
7981 | Object.defineProperty(exports, "__esModule", { value: true });
|
7982 | var lodash_1 = require("./wrap/lodash");
|
7983 | var calls_1 = require("./store/calls");
|
7984 | var store_1 = require("./store");
|
7985 | var stubbings_1 = require("./store/stubbings");
|
7986 | var imitate_1 = require("./imitate");
|
7987 | function func(nameOrFunc, __optionalName) {
|
7988 | return lodash_1.default.isFunction(nameOrFunc)
|
7989 | ? (0, imitate_1.default)(nameOrFunc)
|
7990 | : createTestDoubleNamed(nameOrFunc || __optionalName);
|
7991 | }
|
7992 | exports.default = func;
|
7993 | var createTestDoubleNamed = function (name) {
|
7994 | return lodash_1.default.tap(createTestDoubleFunction(), function (testDouble) {
|
7995 | var entry = store_1.default.for(testDouble, true);
|
7996 | if (name != null) {
|
7997 | entry.name = name;
|
7998 | testDouble.toString = function () { return "[test double for \"".concat(name, "\"]"); };
|
7999 | }
|
8000 | else {
|
8001 | testDouble.toString = function () { return '[test double (unnamed)]'; };
|
8002 | }
|
8003 | });
|
8004 | };
|
8005 | var createTestDoubleFunction = function () {
|
8006 | return function testDouble() {
|
8007 | var args = [];
|
8008 | for (var _i = 0; _i < arguments.length; _i++) {
|
8009 | args[_i] = arguments[_i];
|
8010 | }
|
8011 | calls_1.default.log(testDouble, args, this);
|
8012 | return stubbings_1.default.invoke(testDouble, args, this);
|
8013 | };
|
8014 | };
|
8015 |
|
8016 | },{"./imitate":248,"./store":280,"./store/calls":279,"./store/stubbings":281,"./wrap/lodash":288}],247:[function(require,module,exports){
|
8017 | "use strict";
|
8018 | Object.defineProperty(exports, "__esModule", { value: true });
|
8019 | var lodash_1 = require("../wrap/lodash");
|
8020 | var function_1 = require("../function");
|
8021 | var is_generator_1 = require("./is-generator");
|
8022 | exports.default = (function (original, names) {
|
8023 | if (lodash_1.default.isArray(original) || lodash_1.default.isArguments(original)) {
|
8024 | return [];
|
8025 | }
|
8026 | else if (lodash_1.default.isFunction(original)) {
|
8027 | if ((0, is_generator_1.default)(original)) {
|
8028 | return original;
|
8029 | }
|
8030 | else {
|
8031 |
|
8032 | return (0, function_1.default)(lodash_1.default.map(names, String).join('') || '(anonymous function)');
|
8033 | }
|
8034 | }
|
8035 | else {
|
8036 | return lodash_1.default.clone(original);
|
8037 | }
|
8038 | });
|
8039 |
|
8040 | },{"../function":246,"../wrap/lodash":288,"./is-generator":250}],248:[function(require,module,exports){
|
8041 | "use strict";
|
8042 | Object.defineProperty(exports, "__esModule", { value: true });
|
8043 | var initialize_names_1 = require("./initialize-names");
|
8044 | var create_imitation_1 = require("./create-imitation");
|
8045 | var overwrite_children_1 = require("./overwrite-children");
|
8046 | function imitate(original, names, encounteredObjects) {
|
8047 | if (encounteredObjects === void 0) { encounteredObjects = new Map(); }
|
8048 | if (encounteredObjects.has(original))
|
8049 | return encounteredObjects.get(original);
|
8050 | names = (0, initialize_names_1.default)(original, names);
|
8051 | var target = (0, create_imitation_1.default)(original, names);
|
8052 | encounteredObjects.set(original, target);
|
8053 | (0, overwrite_children_1.default)(original, target, function (originalValue, name) {
|
8054 | return imitate(originalValue, names.concat(name), encounteredObjects);
|
8055 | });
|
8056 | return target;
|
8057 | }
|
8058 | exports.default = imitate;
|
8059 |
|
8060 | },{"./create-imitation":247,"./initialize-names":249,"./overwrite-children":254}],249:[function(require,module,exports){
|
8061 | "use strict";
|
8062 | Object.defineProperty(exports, "__esModule", { value: true });
|
8063 | var lodash_1 = require("../wrap/lodash");
|
8064 | exports.default = (function (original, names) {
|
8065 | if (lodash_1.default.isString(names))
|
8066 | return [names];
|
8067 | if (names != null)
|
8068 | return names;
|
8069 | if (lodash_1.default.isFunction(original) && original.name) {
|
8070 | return [original.name];
|
8071 | }
|
8072 | else {
|
8073 | return [];
|
8074 | }
|
8075 | });
|
8076 |
|
8077 | },{"../wrap/lodash":288}],250:[function(require,module,exports){
|
8078 | "use strict";
|
8079 | Object.defineProperty(exports, "__esModule", { value: true });
|
8080 | var generatorsAreSupported = (function () {
|
8081 | try {
|
8082 | eval('(function* () {})');
|
8083 | return true;
|
8084 | }
|
8085 | catch (e) {
|
8086 | return false;
|
8087 | }
|
8088 | })();
|
8089 | var GeneratorFunction = (function () {
|
8090 | if (!generatorsAreSupported)
|
8091 | return;
|
8092 | var func = eval('(function* () {})');
|
8093 | return Object.getPrototypeOf(func).constructor;
|
8094 | })();
|
8095 | exports.default = (function (func) {
|
8096 | return generatorsAreSupported && func.constructor === GeneratorFunction;
|
8097 | });
|
8098 |
|
8099 | },{}],251:[function(require,module,exports){
|
8100 | "use strict";
|
8101 | Object.defineProperty(exports, "__esModule", { value: true });
|
8102 | var lodash_1 = require("../../wrap/lodash");
|
8103 | exports.default = (function (original, target, name, originalValue, targetValue) {
|
8104 | if (name !== 'prototype' || !lodash_1.default.isFunction(original))
|
8105 | return targetValue;
|
8106 | targetValue.__proto__ = originalValue;
|
8107 | targetValue.constructor = target;
|
8108 | return targetValue;
|
8109 | });
|
8110 |
|
8111 | },{"../../wrap/lodash":288}],252:[function(require,module,exports){
|
8112 | "use strict";
|
8113 | Object.defineProperty(exports, "__esModule", { value: true });
|
8114 | var lodash_1 = require("../../wrap/lodash");
|
8115 | exports.default = (function (target, props, visitor) {
|
8116 | Object.defineProperties(target, lodash_1.default.transform(props, function (acc, descriptor, name) {
|
8117 | if (propOnTargetAndNotWritable(target, name, descriptor)) {
|
8118 | if (name === 'prototype') {
|
8119 |
|
8120 | target.prototype = newValue(name, descriptor.value, visitor);
|
8121 | }
|
8122 | }
|
8123 | else {
|
8124 | acc[name] = {
|
8125 | configurable: true,
|
8126 | writable: true,
|
8127 | value: newValue(name, descriptor.value, visitor),
|
8128 | enumerable: descriptor.enumerable
|
8129 | };
|
8130 | }
|
8131 | }));
|
8132 | });
|
8133 | var propOnTargetAndNotWritable = function (target, name, originalDescriptor) {
|
8134 | var targetDescriptor = Object.getOwnPropertyDescriptor(target, name);
|
8135 | if (targetDescriptor &&
|
8136 | (!targetDescriptor.writable || !targetDescriptor.configurable)) {
|
8137 | return true;
|
8138 | }
|
8139 | };
|
8140 | var newValue = function (name, value, visitor) {
|
8141 | return visitor ? visitor(name, value) : value;
|
8142 | };
|
8143 |
|
8144 | },{"../../wrap/lodash":288}],253:[function(require,module,exports){
|
8145 | "use strict";
|
8146 | Object.defineProperty(exports, "__esModule", { value: true });
|
8147 | var is_fakeable_1 = require("./is-fakeable");
|
8148 | var is_native_prototype_1 = require("./is-native-prototype");
|
8149 | function gatherProps(thing) {
|
8150 | var props = {};
|
8151 | while ((0, is_fakeable_1.default)(thing) && !(0, is_native_prototype_1.default)(thing)) {
|
8152 | Object.getOwnPropertyNames(thing).forEach(function (propName) {
|
8153 | if (!props[propName] && propName !== 'constructor') {
|
8154 | props[propName] = Object.getOwnPropertyDescriptor(thing, propName);
|
8155 | }
|
8156 | });
|
8157 | thing = Object.getPrototypeOf(thing);
|
8158 | }
|
8159 | return props;
|
8160 | }
|
8161 | exports.default = gatherProps;
|
8162 |
|
8163 | },{"./is-fakeable":255,"./is-native-prototype":256}],254:[function(require,module,exports){
|
8164 | "use strict";
|
8165 | Object.defineProperty(exports, "__esModule", { value: true });
|
8166 | var lodash_1 = require("../../wrap/lodash");
|
8167 | var is_fakeable_1 = require("./is-fakeable");
|
8168 | var gather_props_1 = require("./gather-props");
|
8169 | var copy_props_1 = require("./copy-props");
|
8170 | var chain_prototype_1 = require("./chain-prototype");
|
8171 | exports.default = (function (original, target, overwriteChild) {
|
8172 | if (!(0, is_fakeable_1.default)(target))
|
8173 | return;
|
8174 | if (lodash_1.default.isArray(target)) {
|
8175 | lodash_1.default.each(original, function (item, index) {
|
8176 | return target.push(overwriteChild(item, "[".concat(index, "]")));
|
8177 | });
|
8178 | }
|
8179 | else {
|
8180 | (0, copy_props_1.default)(target, (0, gather_props_1.default)(original), function (name, originalValue) {
|
8181 | return (0, chain_prototype_1.default)(original, target, name, originalValue, overwriteChild(originalValue, ".".concat(name)));
|
8182 | });
|
8183 | }
|
8184 | });
|
8185 |
|
8186 | },{"../../wrap/lodash":288,"./chain-prototype":251,"./copy-props":252,"./gather-props":253,"./is-fakeable":255}],255:[function(require,module,exports){
|
8187 | "use strict";
|
8188 | Object.defineProperty(exports, "__esModule", { value: true });
|
8189 | var lodash_1 = require("../../wrap/lodash");
|
8190 | var is_generator_1 = require("../is-generator");
|
8191 | exports.default = (function (thing) {
|
8192 | return !(!lodash_1.default.isObject(thing) || isBoxedType(thing) || (0, is_generator_1.default)(thing));
|
8193 | });
|
8194 | var isBoxedType = function (thing) {
|
8195 | return lodash_1.default.compact([
|
8196 | Boolean,
|
8197 | Date,
|
8198 | Number,
|
8199 | RegExp,
|
8200 | String,
|
8201 | Symbol
|
8202 | ]).some(function (type) { return thing instanceof type; });
|
8203 | };
|
8204 |
|
8205 | },{"../../wrap/lodash":288,"../is-generator":250}],256:[function(require,module,exports){
|
8206 | "use strict";
|
8207 | Object.defineProperty(exports, "__esModule", { value: true });
|
8208 | var lodash_1 = require("../../wrap/lodash");
|
8209 | function isNativePrototype(thing) {
|
8210 | if (thing == null || !lodash_1.default.isFunction(thing.isPrototypeOf))
|
8211 | return false;
|
8212 | return lodash_1.default.some([Object, Function], function (nativeType) {
|
8213 | return Object.prototype.isPrototypeOf.call(thing, nativeType);
|
8214 | });
|
8215 | }
|
8216 | exports.default = isNativePrototype;
|
8217 |
|
8218 | },{"../../wrap/lodash":288}],257:[function(require,module,exports){
|
8219 | "use strict";
|
8220 | Object.defineProperty(exports, "__esModule", { value: true });
|
8221 | var function_1 = require("./function");
|
8222 | var object_1 = require("./object");
|
8223 | var constructor_1 = require("./constructor");
|
8224 | var instance_1 = require("./instance");
|
8225 | var imitate_1 = require("./imitate");
|
8226 | var when_1 = require("./when");
|
8227 | var verify_1 = require("./verify");
|
8228 | var matchers_1 = require("./matchers");
|
8229 | var replace_1 = require("./replace");
|
8230 | var list_1 = require("./list");
|
8231 | var explain_1 = require("./explain");
|
8232 | var reset_1 = require("./reset");
|
8233 | var config_1 = require("./config");
|
8234 | var callback_1 = require("./callback");
|
8235 | var version_1 = require("./version");
|
8236 | var quibble = require("quibble");
|
8237 | module.exports = {
|
8238 | function: function_1.default,
|
8239 | func: function_1.default,
|
8240 | object: object_1.default,
|
8241 | constructor: constructor_1.default,
|
8242 | instance: instance_1.default,
|
8243 | imitate: imitate_1.default,
|
8244 | when: when_1.default,
|
8245 | verify: verify_1.default,
|
8246 | matchers: matchers_1.default,
|
8247 | replace: replace_1.default,
|
8248 | replaceEsm: replace_1.replaceEsm,
|
8249 | listReplacedModules: list_1.default,
|
8250 | explain: explain_1.default,
|
8251 | reset: reset_1.default,
|
8252 | config: config_1.default,
|
8253 | callback: callback_1.default,
|
8254 | version: version_1.default,
|
8255 | quibble: quibble
|
8256 | };
|
8257 |
|
8258 | },{"./callback":240,"./config":243,"./constructor":244,"./explain":245,"./function":246,"./imitate":248,"./instance":258,"./list":259,"./matchers":268,"./object":272,"./replace":275,"./reset":278,"./verify":285,"./version":286,"./when":287,"quibble":274}],258:[function(require,module,exports){
|
8259 | "use strict";
|
8260 | Object.defineProperty(exports, "__esModule", { value: true });
|
8261 | var constructor_js_1 = require("./constructor.js");
|
8262 | function instance(typeOrNames) {
|
8263 | return new ((0, constructor_js_1.default)(typeOrNames))();
|
8264 | }
|
8265 | exports.default = instance;
|
8266 |
|
8267 | },{"./constructor.js":244}],259:[function(require,module,exports){
|
8268 | "use strict";
|
8269 | Object.defineProperty(exports, "__esModule", { value: true });
|
8270 | var quibble_1 = require("quibble");
|
8271 | function listReplacedModules() {
|
8272 | return (0, quibble_1.listMockedModules)();
|
8273 | }
|
8274 | exports.default = listReplacedModules;
|
8275 |
|
8276 | },{"quibble":274}],260:[function(require,module,exports){
|
8277 | "use strict";
|
8278 | Object.defineProperty(exports, "__esModule", { value: true });
|
8279 | var config_1 = require("./config");
|
8280 | exports.default = {
|
8281 | warn: function (func, msg, url) {
|
8282 | if (!(0, config_1.default)().ignoreWarnings && typeof console === 'object' && console.warn) {
|
8283 | console.warn("Warning: testdouble.js - ".concat(func, " - ").concat(msg).concat(withUrl(url)));
|
8284 | }
|
8285 | },
|
8286 | error: function (func, msg, url) {
|
8287 | if (!(0, config_1.default)().suppressErrors) {
|
8288 | throw new Error("Error: testdouble.js - ".concat(func, " - ").concat(msg).concat(withUrl(url)));
|
8289 | }
|
8290 | },
|
8291 | fail: function (msg) {
|
8292 | throw new Error(msg);
|
8293 | }
|
8294 | };
|
8295 | var withUrl = function (url) {
|
8296 | return url != null
|
8297 | ? " (see: ".concat(url, " )")
|
8298 | : '';
|
8299 | };
|
8300 |
|
8301 | },{"./config":243}],261:[function(require,module,exports){
|
8302 | "use strict";
|
8303 | Object.defineProperty(exports, "__esModule", { value: true });
|
8304 | var create_1 = require("../create");
|
8305 | exports.default = (0, create_1.default)({
|
8306 | name: 'anything',
|
8307 | matches: function () { return true; }
|
8308 | });
|
8309 |
|
8310 | },{"../create":267}],262:[function(require,module,exports){
|
8311 | "use strict";
|
8312 | Object.defineProperty(exports, "__esModule", { value: true });
|
8313 | var create_1 = require("../create");
|
8314 | exports.default = (0, create_1.default)({
|
8315 | name: 'argThat',
|
8316 | matches: function (matcherArgs, actual) {
|
8317 | var predicate = matcherArgs[0];
|
8318 | return predicate(actual);
|
8319 | }
|
8320 | });
|
8321 |
|
8322 | },{"../create":267}],263:[function(require,module,exports){
|
8323 | "use strict";
|
8324 | Object.defineProperty(exports, "__esModule", { value: true });
|
8325 | var create_1 = require("../create");
|
8326 | exports.default = (function () {
|
8327 | var captor = {
|
8328 | capture: (0, create_1.default)({
|
8329 | name: 'captor.capture',
|
8330 | matches: function (matcherArgs, actual) {
|
8331 | return true;
|
8332 | },
|
8333 | afterSatisfaction: function (matcherArgs, actual) {
|
8334 | captor.values = captor.values || [];
|
8335 | captor.values.push(actual);
|
8336 | captor.value = actual;
|
8337 | }
|
8338 | })
|
8339 | };
|
8340 | return captor;
|
8341 | });
|
8342 |
|
8343 | },{"../create":267}],264:[function(require,module,exports){
|
8344 | "use strict";
|
8345 | Object.defineProperty(exports, "__esModule", { value: true });
|
8346 | var lodash_1 = require("../../wrap/lodash");
|
8347 | var create_1 = require("../create");
|
8348 | var is_matcher_1 = require("../is-matcher");
|
8349 | exports.default = (0, create_1.default)({
|
8350 | name: 'contains',
|
8351 | matches: function (containings, actualArg) {
|
8352 | if (containings.length === 0)
|
8353 | return false;
|
8354 | return lodash_1.default.every(containings, function (containing) {
|
8355 | return argumentContains(containing, actualArg);
|
8356 | });
|
8357 | }
|
8358 | });
|
8359 | var argumentContains = function (containing, actualArg) {
|
8360 | if (lodash_1.default.isArray(containing)) {
|
8361 | return lodash_1.default.some(actualArg, function (actualElement) {
|
8362 | return lodash_1.default.isEqualWith(containing, actualElement, equalish);
|
8363 | });
|
8364 | }
|
8365 | else {
|
8366 | return lodash_1.default.isEqualWith(containing, actualArg, equalish);
|
8367 | }
|
8368 | };
|
8369 | var equalish = function (containing, actualArg) {
|
8370 | if (lodash_1.default.isRegExp(containing)) {
|
8371 | if (lodash_1.default.isString(actualArg)) {
|
8372 | return containing.test(actualArg);
|
8373 | }
|
8374 | else if (lodash_1.default.isRegExp(actualArg)) {
|
8375 | return containing.toString() === actualArg.toString();
|
8376 | }
|
8377 | else {
|
8378 | return false;
|
8379 | }
|
8380 | }
|
8381 | else if ((0, is_matcher_1.default)(containing)) {
|
8382 | return containing.__matches(actualArg) ||
|
8383 | lodash_1.default.some(actualArg, containing.__matches);
|
8384 | }
|
8385 | else if (containing instanceof Date) {
|
8386 | return actualArg instanceof Date &&
|
8387 | containing.getTime() === actualArg.getTime();
|
8388 | }
|
8389 | else if (containing instanceof Error) {
|
8390 | return actualArg instanceof Error &&
|
8391 | lodash_1.default.includes(actualArg.message, containing.message);
|
8392 | }
|
8393 | else if (lodash_1.default.isObjectLike(containing) && lodash_1.default.isObjectLike(actualArg)) {
|
8394 | return containsPartialObject(containing, actualArg);
|
8395 | }
|
8396 | else if (lodash_1.default.isString(actualArg) || lodash_1.default.isArray(actualArg)) {
|
8397 | return lodash_1.default.includes(actualArg, containing);
|
8398 | }
|
8399 | else {
|
8400 | lodash_1.default.isEqual(actualArg, containing);
|
8401 | }
|
8402 | };
|
8403 | var containsPartialObject = function (containing, actual) {
|
8404 | return lodash_1.default.every(containing, function (val, key) {
|
8405 | return lodash_1.default.isEqualWith(val, actual[key], equalish);
|
8406 | });
|
8407 | };
|
8408 |
|
8409 | },{"../../wrap/lodash":288,"../create":267,"../is-matcher":270}],265:[function(require,module,exports){
|
8410 | "use strict";
|
8411 | Object.defineProperty(exports, "__esModule", { value: true });
|
8412 | var lodash_1 = require("../../wrap/lodash");
|
8413 | var create_1 = require("../create");
|
8414 | var arguments_1 = require("../../stringify/arguments");
|
8415 | exports.default = (0, create_1.default)({
|
8416 | name: function (matcherArgs) {
|
8417 | var desc = lodash_1.default.get(matcherArgs[0], 'name') || (0, arguments_1.default)(matcherArgs);
|
8418 | return "isA(".concat(desc, ")");
|
8419 | },
|
8420 | matches: function (matcherArgs, actual) {
|
8421 | var type = matcherArgs[0];
|
8422 | if (type === Number) {
|
8423 | return lodash_1.default.isNumber(actual);
|
8424 | }
|
8425 | else if (type === String) {
|
8426 | return lodash_1.default.isString(actual);
|
8427 | }
|
8428 | else if (type === Boolean) {
|
8429 | return lodash_1.default.isBoolean(actual);
|
8430 | }
|
8431 | else {
|
8432 | return actual instanceof type;
|
8433 | }
|
8434 | }
|
8435 | });
|
8436 |
|
8437 | },{"../../stringify/arguments":283,"../../wrap/lodash":288,"../create":267}],266:[function(require,module,exports){
|
8438 | "use strict";
|
8439 | Object.defineProperty(exports, "__esModule", { value: true });
|
8440 | var lodash_1 = require("../../wrap/lodash");
|
8441 | var create_1 = require("../create");
|
8442 | exports.default = (0, create_1.default)({
|
8443 | name: 'not',
|
8444 | matches: function (matcherArgs, actual) {
|
8445 | var expected = matcherArgs[0];
|
8446 | return !lodash_1.default.isEqual(expected, actual);
|
8447 | }
|
8448 | });
|
8449 |
|
8450 | },{"../../wrap/lodash":288,"../create":267}],267:[function(require,module,exports){
|
8451 | "use strict";
|
8452 | Object.defineProperty(exports, "__esModule", { value: true });
|
8453 | var lodash_1 = require("../wrap/lodash");
|
8454 | var arguments_1 = require("../stringify/arguments");
|
8455 | exports.default = (function (config) {
|
8456 | return function () {
|
8457 | var matcherArgs = [];
|
8458 | for (var _i = 0; _i < arguments.length; _i++) {
|
8459 | matcherArgs[_i] = arguments[_i];
|
8460 | }
|
8461 | return lodash_1.default.tap({
|
8462 | __name: nameFor(config, matcherArgs),
|
8463 | __matches: function (actualArg) {
|
8464 | return config.matches(matcherArgs, actualArg);
|
8465 | }
|
8466 | }, function (matcherInstance) {
|
8467 | matcherInstance.__matches.afterSatisfaction = function (actualArg) {
|
8468 | lodash_1.default.invoke(config, 'afterSatisfaction', matcherArgs, actualArg);
|
8469 | };
|
8470 | lodash_1.default.invoke(config, 'onCreate', matcherInstance, matcherArgs);
|
8471 | });
|
8472 | };
|
8473 | });
|
8474 | var nameFor = function (config, matcherArgs) {
|
8475 | if (lodash_1.default.isFunction(config.name)) {
|
8476 | return config.name(matcherArgs);
|
8477 | }
|
8478 | else if (config.name != null) {
|
8479 | return "".concat(config.name, "(").concat((0, arguments_1.default)(matcherArgs), ")");
|
8480 | }
|
8481 | else {
|
8482 | return "[Matcher for (".concat((0, arguments_1.default)(matcherArgs), ")]");
|
8483 | }
|
8484 | };
|
8485 |
|
8486 | },{"../stringify/arguments":283,"../wrap/lodash":288}],268:[function(require,module,exports){
|
8487 | "use strict";
|
8488 | Object.defineProperty(exports, "__esModule", { value: true });
|
8489 | var create_1 = require("./create");
|
8490 | var captor_1 = require("./builtin/captor");
|
8491 | var is_a_1 = require("./builtin/is-a");
|
8492 | var contains_1 = require("./builtin/contains");
|
8493 | var anything_1 = require("./builtin/anything");
|
8494 | var arg_that_1 = require("./builtin/arg-that");
|
8495 | var not_1 = require("./builtin/not");
|
8496 | exports.default = {
|
8497 | create: create_1.default,
|
8498 | captor: captor_1.default,
|
8499 | isA: is_a_1.default,
|
8500 | anything: anything_1.default,
|
8501 | contains: contains_1.default,
|
8502 | argThat: arg_that_1.default,
|
8503 | not: not_1.default
|
8504 | };
|
8505 |
|
8506 | },{"./builtin/anything":261,"./builtin/arg-that":262,"./builtin/captor":263,"./builtin/contains":264,"./builtin/is-a":265,"./builtin/not":266,"./create":267}],269:[function(require,module,exports){
|
8507 | "use strict";
|
8508 | Object.defineProperty(exports, "__esModule", { value: true });
|
8509 | var callback_1 = require("../callback");
|
8510 | function isCallback(obj) {
|
8511 | return obj && (obj === callback_1.default || obj.__testdouble_callback === true);
|
8512 | }
|
8513 | exports.default = isCallback;
|
8514 |
|
8515 | },{"../callback":240}],270:[function(require,module,exports){
|
8516 | "use strict";
|
8517 | Object.defineProperty(exports, "__esModule", { value: true });
|
8518 | exports.default = (function (thing) {
|
8519 | return thing && !thing[Symbol('__is_proxy')] && thing.__matches;
|
8520 | });
|
8521 |
|
8522 | },{}],271:[function(require,module,exports){
|
8523 | "use strict";
|
8524 | Object.defineProperty(exports, "__esModule", { value: true });
|
8525 | var lodash_1 = require("../wrap/lodash");
|
8526 | var is_matcher_1 = require("./is-matcher");
|
8527 |
|
8528 | function notifyAfterSatisfaction(expectedArgs, actualArgs) {
|
8529 | lodash_1.default.each(expectedArgs, function (expectedArg, i) {
|
8530 | if ((0, is_matcher_1.default)(expectedArg)) {
|
8531 | lodash_1.default.invoke(expectedArg, '__matches.afterSatisfaction', actualArgs[i]);
|
8532 | }
|
8533 | });
|
8534 | }
|
8535 | exports.default = notifyAfterSatisfaction;
|
8536 |
|
8537 | },{"../wrap/lodash":288,"./is-matcher":270}],272:[function(require,module,exports){
|
8538 | "use strict";
|
8539 | Object.defineProperty(exports, "__esModule", { value: true });
|
8540 | var lodash_1 = require("./wrap/lodash");
|
8541 | var log_1 = require("./log");
|
8542 | var function_1 = require("./function");
|
8543 | var imitate_1 = require("./imitate");
|
8544 | var proxy_1 = require("./object/proxy");
|
8545 | var DEFAULT_OPTIONS = { excludeMethods: ['then'] };
|
8546 | function object(nameOrType, config) {
|
8547 | return lodash_1.default.tap(fakeObject(nameOrType, config, arguments.length), function (obj) {
|
8548 | addToStringToDouble(obj, nameOrType);
|
8549 | });
|
8550 | }
|
8551 | exports.default = object;
|
8552 | var fakeObject = function (nameOrType, config, argCount) {
|
8553 | if (lodash_1.default.isArray(nameOrType)) {
|
8554 | return createTestDoublesForFunctionNames(nameOrType);
|
8555 | }
|
8556 | else if (lodash_1.default.isObjectLike(nameOrType)) {
|
8557 | return (0, imitate_1.default)(nameOrType);
|
8558 | }
|
8559 | else if (lodash_1.default.isString(nameOrType) || argCount === 0) {
|
8560 | return (0, proxy_1.default)(nameOrType, withDefaults(config));
|
8561 | }
|
8562 | else if (lodash_1.default.isFunction(nameOrType)) {
|
8563 | ensureFunctionIsNotPassed();
|
8564 | }
|
8565 | else {
|
8566 | ensureOtherGarbageIsNotPassed();
|
8567 | }
|
8568 | };
|
8569 | var createTestDoublesForFunctionNames = function (names) {
|
8570 | return lodash_1.default.transform(names, function (acc, funcName) {
|
8571 | acc[funcName] = (0, function_1.default)(".".concat(String(funcName)));
|
8572 | }, {});
|
8573 | };
|
8574 | var ensureFunctionIsNotPassed = function () {
|
8575 | return log_1.default.error('td.object', 'Functions are not valid arguments to `td.object` (as of testdouble@2.0.0). Please use `td.function()`, `td.constructor()` or `td.instance()` instead for creating fake functions.');
|
8576 | };
|
8577 | var ensureOtherGarbageIsNotPassed = function () {
|
8578 | return log_1.default.error('td.object', "To create a fake object with td.object(), pass it a plain object that contains\nfunctions, an array of function names, or (if your runtime supports ES Proxy\nobjects) a string name.\n\nIf you passed td.object an instance of a custom type, consider passing the\ntype's constructor to `td.constructor()` instead.\n");
|
8579 | };
|
8580 | var withDefaults = function (config) {
|
8581 | return lodash_1.default.extend({}, DEFAULT_OPTIONS, config);
|
8582 | };
|
8583 | var addToStringToDouble = function (fakeObject, nameOrType) {
|
8584 | var name = nameOf(nameOrType);
|
8585 | fakeObject.toString = function () { return "[test double object".concat(name ? " for \"".concat(name, "\"") : '', "]"); };
|
8586 | };
|
8587 | var nameOf = function (nameOrType) {
|
8588 | return lodash_1.default.isString(nameOrType)
|
8589 | ? nameOrType
|
8590 | : '';
|
8591 | };
|
8592 |
|
8593 | },{"./function":246,"./imitate":248,"./log":260,"./object/proxy":273,"./wrap/lodash":288}],273:[function(require,module,exports){
|
8594 | "use strict";
|
8595 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
8596 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
8597 | return cooked;
|
8598 | };
|
8599 | Object.defineProperty(exports, "__esModule", { value: true });
|
8600 | var theredoc = require("theredoc");
|
8601 | var lodash_1 = require("../wrap/lodash");
|
8602 | var log_1 = require("../log");
|
8603 | var function_1 = require("../function");
|
8604 | var store_1 = require("../store");
|
8605 | function proxy(name, _a) {
|
8606 | var _b = _a === void 0 ? {} : _a, excludeMethods = _b.excludeMethods;
|
8607 | ensureProxySupport(name);
|
8608 | return new Proxy({}, generateHandler(name, excludeMethods));
|
8609 | }
|
8610 | exports.default = proxy;
|
8611 | var ensureProxySupport = function (name) {
|
8612 | if (typeof Proxy === 'undefined') {
|
8613 | log_1.default.error('td.object', theredoc(templateObject_1 || (templateObject_1 = __makeTemplateObject([" The current runtime does not have Proxy support, which is what\n testdouble.js depends on when a string name is passed to `td.object()`.\n\n More details here:\n https://github.com/testdouble/testdouble.js/blob/main/docs/4-creating-test-doubles.md#objectobjectname\n\n Did you mean `td.object(['", "'])`?\n "], ["\\\n The current runtime does not have Proxy support, which is what\n testdouble.js depends on when a string name is passed to \\`td.object()\\`.\n\n More details here:\n https://github.com/testdouble/testdouble.js/blob/main/docs/4-creating-test-doubles.md#objectobjectname\n\n Did you mean \\`td.object(['", "'])\\`?\n "])), name));
|
8614 | }
|
8615 | };
|
8616 | var generateHandler = function (internalName, excludeMethods) { return ({
|
8617 | get: function (target, propKey) {
|
8618 | return generateGet(target, propKey, internalName, excludeMethods);
|
8619 | }
|
8620 | }); };
|
8621 | var generateGet = function (target, propKey, internalName, excludeMethods) {
|
8622 | if (propKey === Symbol('__is_proxy')) {
|
8623 | return true;
|
8624 | }
|
8625 | if (!Object.prototype.hasOwnProperty.call(target, propKey) &&
|
8626 | !lodash_1.default.includes(excludeMethods, propKey)) {
|
8627 | var nameWithProp = "".concat(internalName || '', ".").concat(String(propKey));
|
8628 | var tdFunc = (0, function_1.default)(nameWithProp);
|
8629 | var tdFuncProxy = new Proxy(tdFunc, generateHandler(nameWithProp, excludeMethods));
|
8630 | store_1.default.registerAlias(tdFunc, tdFuncProxy);
|
8631 | target[propKey] = tdFuncProxy;
|
8632 | }
|
8633 | return target[propKey];
|
8634 | };
|
8635 | var templateObject_1;
|
8636 |
|
8637 | },{"../function":246,"../log":260,"../store":280,"../wrap/lodash":288,"theredoc":238}],274:[function(require,module,exports){
|
8638 | module.exports = {
|
8639 | absolutify: function absolutify() { },
|
8640 | ignoreCallsFromThisFile: function ignoreCallsFromThisFile() { },
|
8641 | reset: function reset() { }
|
8642 | };
|
8643 |
|
8644 | },{}],275:[function(require,module,exports){
|
8645 | "use strict";
|
8646 | Object.defineProperty(exports, "__esModule", { value: true });
|
8647 | exports.replaceEsm = void 0;
|
8648 | var lodash_1 = require("../wrap/lodash");
|
8649 | var quibble = require("quibble");
|
8650 | var module_1 = require("./module");
|
8651 | var property_1 = require("./property");
|
8652 | var can_register_loader_1 = require("../can-register-loader");
|
8653 | quibble.ignoreCallsFromThisFile();
|
8654 | function default_1(target) {
|
8655 | if (lodash_1.default.isString(target)) {
|
8656 | return module_1.default.apply(void 0, arguments);
|
8657 | }
|
8658 | else {
|
8659 | return property_1.default.apply(void 0, arguments);
|
8660 | }
|
8661 | }
|
8662 | exports.default = default_1;
|
8663 | function replaceEsm(_modulePath, _namedExportReplacement, _defaultExportReplacement) {
|
8664 | if (!(0, can_register_loader_1.canRegisterLoader)() && !quibble.isLoaderLoaded()) {
|
8665 | throw new Error('testdouble ESM loader not loaded. You cannot replace ES modules without a loader. Run node with `--loader=testdouble`.');
|
8666 | }
|
8667 |
|
8668 |
|
8669 | return module_1.replaceEsModule.apply(void 0, arguments);
|
8670 | }
|
8671 | exports.replaceEsm = replaceEsm;
|
8672 |
|
8673 | },{"../can-register-loader":241,"../wrap/lodash":288,"./module":276,"./property":277,"quibble":274}],276:[function(require,module,exports){
|
8674 | "use strict";
|
8675 | Object.defineProperty(exports, "__esModule", { value: true });
|
8676 | exports.default = (function () {
|
8677 | throw Error('Sorry, but CommonJS module replacement with td.replace() is only supported under Node.js runtimes.');
|
8678 | });
|
8679 |
|
8680 | },{}],277:[function(require,module,exports){
|
8681 | "use strict";
|
8682 | Object.defineProperty(exports, "__esModule", { value: true });
|
8683 | var lodash_1 = require("../wrap/lodash");
|
8684 | var imitate_1 = require("../imitate");
|
8685 | var log_1 = require("../log");
|
8686 | var reset_1 = require("../reset");
|
8687 | var anything_1 = require("../stringify/anything");
|
8688 | function default_1(object, property, manualReplacement) {
|
8689 | var isManual = arguments.length > 2;
|
8690 | var realThingExists = object[property] ||
|
8691 | Object.prototype.hasOwnProperty.call(object, property);
|
8692 | if (isManual || realThingExists) {
|
8693 | var realThing_1 = object[property];
|
8694 | return lodash_1.default.tap(getFake(isManual, property, manualReplacement, realThing_1), function (fakeThing) {
|
8695 | object[property] = fakeThing;
|
8696 | reset_1.default.onNextReset(function () {
|
8697 | if (realThingExists) {
|
8698 | object[property] = realThing_1;
|
8699 | }
|
8700 | else {
|
8701 | delete object[property];
|
8702 | }
|
8703 | });
|
8704 | });
|
8705 | }
|
8706 | else {
|
8707 | log_1.default.error('td.replace', "No \"".concat(property, "\" property was found."));
|
8708 | }
|
8709 | }
|
8710 | exports.default = default_1;
|
8711 | var getFake = function (isManual, property, manualReplacement, realThing) {
|
8712 | if (isManual) {
|
8713 | warnIfTypeMismatch(property, manualReplacement, realThing);
|
8714 | return manualReplacement;
|
8715 | }
|
8716 | else {
|
8717 | return (0, imitate_1.default)(realThing, [property]);
|
8718 | }
|
8719 | };
|
8720 | var warnIfTypeMismatch = function (property, fakeThing, realThing) {
|
8721 | var fakeType = typeof fakeThing;
|
8722 | var realType = typeof realThing;
|
8723 | if (realThing !== undefined && fakeType !== realType) {
|
8724 | log_1.default.warn('td.replace', "property \"".concat(property, "\" ").concat((0, anything_1.default)(realThing), " (").concat(lodash_1.default.capitalize(realType), ") was replaced with ").concat((0, anything_1.default)(fakeThing), ", which has a different type (").concat(lodash_1.default.capitalize(fakeType), ")."));
|
8725 | }
|
8726 | };
|
8727 |
|
8728 | },{"../imitate":248,"../log":260,"../reset":278,"../stringify/anything":282,"../wrap/lodash":288}],278:[function(require,module,exports){
|
8729 | "use strict";
|
8730 | Object.defineProperty(exports, "__esModule", { value: true });
|
8731 | var lodash_1 = require("./wrap/lodash");
|
8732 | var quibble = require("quibble");
|
8733 | var store_1 = require("./store");
|
8734 | var onResetHandlers = [];
|
8735 | var onNextResetHandlers = [];
|
8736 | exports.default = lodash_1.default.tap(function () {
|
8737 | store_1.default.reset();
|
8738 | quibble.reset();
|
8739 | lodash_1.default.each(onResetHandlers, function (resetHandler) {
|
8740 | return resetHandler();
|
8741 | });
|
8742 | lodash_1.default.each(onNextResetHandlers, function (resetHandler) {
|
8743 | return resetHandler();
|
8744 | });
|
8745 | onNextResetHandlers = [];
|
8746 | }, function (reset) {
|
8747 | reset.onReset = function (func) {
|
8748 | return onResetHandlers.push(func);
|
8749 | };
|
8750 | reset.onNextReset = function (func) {
|
8751 | return onNextResetHandlers.push(func);
|
8752 | };
|
8753 | });
|
8754 |
|
8755 | },{"./store":280,"./wrap/lodash":288,"quibble":274}],279:[function(require,module,exports){
|
8756 | "use strict";
|
8757 | Object.defineProperty(exports, "__esModule", { value: true });
|
8758 | var lodash_1 = require("../wrap/lodash");
|
8759 | var args_match_1 = require("../args-match");
|
8760 | var clone_deep_if_possible_1 = require("../clone-deep-if-possible");
|
8761 | var index_1 = require("./index");
|
8762 | var callHistory = [];
|
8763 | index_1.default.onReset(function () { callHistory = []; });
|
8764 | exports.default = {
|
8765 | log: function (testDouble, args, context) {
|
8766 | index_1.default.for(testDouble).calls.push({ args: args, context: context, cloneArgs: (0, clone_deep_if_possible_1.default)(args) });
|
8767 | return callHistory.push({ testDouble: testDouble, args: args, context: context });
|
8768 | },
|
8769 | pop: function () {
|
8770 | return lodash_1.default.tap(callHistory.pop(), function (call) {
|
8771 | if (call != null) {
|
8772 | index_1.default.for(call.testDouble).calls.pop();
|
8773 | }
|
8774 | });
|
8775 | },
|
8776 | wasInvoked: function (testDouble, args, config) {
|
8777 | var matchingInvocationCount = this.where(testDouble, args, config).length;
|
8778 | if (config.times != null) {
|
8779 | return matchingInvocationCount === config.times;
|
8780 | }
|
8781 | else {
|
8782 | return matchingInvocationCount > 0;
|
8783 | }
|
8784 | },
|
8785 | where: function (testDouble, args, config) {
|
8786 | return lodash_1.default.filter(index_1.default.for(testDouble).calls, function (call) {
|
8787 | var pastArgs = config.cloneArgs ? call.cloneArgs : call.args;
|
8788 | return (0, args_match_1.default)(args, pastArgs, config);
|
8789 | });
|
8790 | },
|
8791 | for: function (testDouble) {
|
8792 | return index_1.default.for(testDouble).calls;
|
8793 | }
|
8794 | };
|
8795 |
|
8796 | },{"../args-match":239,"../clone-deep-if-possible":242,"../wrap/lodash":288,"./index":280}],280:[function(require,module,exports){
|
8797 | "use strict";
|
8798 | Object.defineProperty(exports, "__esModule", { value: true });
|
8799 | var lodash_1 = require("../wrap/lodash");
|
8800 | var events_1 = require("events");
|
8801 | var storeEmitter = new events_1.EventEmitter();
|
8802 | var globalStore = [];
|
8803 | var store = {
|
8804 | onReset: function (func) {
|
8805 | storeEmitter.on('reset', func);
|
8806 | },
|
8807 | reset: function () {
|
8808 | globalStore = [];
|
8809 | storeEmitter.emit('reset');
|
8810 | },
|
8811 | for: function (testDouble, createIfNew) {
|
8812 | if (createIfNew === void 0) { createIfNew = true; }
|
8813 | var entry = lodash_1.default.find(globalStore, function (e) { return testDouble === e.testDouble || testDouble === e.alias; });
|
8814 | if (entry) {
|
8815 | return entry;
|
8816 | }
|
8817 | else if (createIfNew) {
|
8818 | return lodash_1.default.tap({
|
8819 | testDouble: testDouble,
|
8820 | stubbings: [],
|
8821 | calls: [],
|
8822 | verifications: []
|
8823 | }, function (newEntry) {
|
8824 | return globalStore.push(newEntry);
|
8825 | });
|
8826 | }
|
8827 | },
|
8828 | registerAlias: function (testDouble, alias) {
|
8829 | store.for(testDouble).alias = alias;
|
8830 | }
|
8831 | };
|
8832 | exports.default = store;
|
8833 |
|
8834 | },{"../wrap/lodash":288,"events":2}],281:[function(require,module,exports){
|
8835 | "use strict";
|
8836 | var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
8837 | if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
8838 | if (ar || !(i in from)) {
|
8839 | if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
8840 | ar[i] = from[i];
|
8841 | }
|
8842 | }
|
8843 | return to.concat(ar || Array.prototype.slice.call(from));
|
8844 | };
|
8845 | Object.defineProperty(exports, "__esModule", { value: true });
|
8846 | var lodash_1 = require("../wrap/lodash");
|
8847 | var args_match_1 = require("../args-match");
|
8848 | var is_callback_1 = require("../matchers/is-callback");
|
8849 | var notify_after_satisfaction_1 = require("../matchers/notify-after-satisfaction");
|
8850 | var config_1 = require("../config");
|
8851 | var log_1 = require("../log");
|
8852 | var index_1 = require("./index");
|
8853 | exports.default = {
|
8854 | add: function (testDouble, args, stubbedValues, config) {
|
8855 | return index_1.default.for(testDouble).stubbings.push({
|
8856 | callCount: 0,
|
8857 | stubbedValues: stubbedValues,
|
8858 | args: config.cloneArgs ? lodash_1.default.cloneDeep(args) : args,
|
8859 | config: config
|
8860 | });
|
8861 | },
|
8862 | invoke: function (testDouble, actualArgs, actualContext) {
|
8863 | var stubbing = stubbingFor(testDouble, actualArgs);
|
8864 | if (stubbing) {
|
8865 | (0, notify_after_satisfaction_1.default)(stubbing.args, actualArgs);
|
8866 | return executePlan(stubbing, actualArgs, actualContext);
|
8867 | }
|
8868 | },
|
8869 | for: function (testDouble) {
|
8870 | return index_1.default.for(testDouble).stubbings;
|
8871 | }
|
8872 | };
|
8873 | var stubbingFor = function (testDouble, actualArgs) {
|
8874 | return lodash_1.default.findLast(index_1.default.for(testDouble).stubbings, function (stubbing) {
|
8875 | return isSatisfied(stubbing, actualArgs);
|
8876 | });
|
8877 | };
|
8878 | var executePlan = function (stubbing, actualArgs, actualContext) {
|
8879 | var value = stubbedValueFor(stubbing);
|
8880 | stubbing.callCount += 1;
|
8881 | invokeCallbackFor(stubbing, actualArgs);
|
8882 | switch (stubbing.config.plan) {
|
8883 | case 'thenReturn': return value;
|
8884 | case 'thenDo': return value.apply(actualContext, actualArgs);
|
8885 | case 'thenThrow': throw value;
|
8886 | case 'thenResolve': return createPromise(stubbing, value, true);
|
8887 | case 'thenReject': return createPromise(stubbing, value, false);
|
8888 | }
|
8889 | };
|
8890 | var invokeCallbackFor = function (stubbing, actualArgs) {
|
8891 | if (lodash_1.default.some(stubbing.args, is_callback_1.default)) {
|
8892 | lodash_1.default.each(stubbing.args, function (expectedArg, i) {
|
8893 | if ((0, is_callback_1.default)(expectedArg)) {
|
8894 | callCallback(stubbing, actualArgs[i], callbackArgs(stubbing, expectedArg));
|
8895 | }
|
8896 | });
|
8897 | }
|
8898 | };
|
8899 | var callbackArgs = function (stubbing, expectedArg) {
|
8900 | if (expectedArg.args != null) {
|
8901 | return expectedArg.args;
|
8902 | }
|
8903 | else if (stubbing.config.plan === 'thenCallback') {
|
8904 | return stubbing.stubbedValues;
|
8905 | }
|
8906 | else {
|
8907 | return [];
|
8908 | }
|
8909 | };
|
8910 | var callCallback = function (stubbing, callback, args) {
|
8911 | if (stubbing.config.delay) {
|
8912 | lodash_1.default.delay.apply(lodash_1.default, __spreadArray([callback, stubbing.config.delay], args, false));
|
8913 | }
|
8914 | else if (stubbing.config.defer) {
|
8915 | lodash_1.default.defer.apply(lodash_1.default, __spreadArray([callback], args, false));
|
8916 | }
|
8917 | else {
|
8918 | callback.apply(void 0, args);
|
8919 | }
|
8920 | };
|
8921 | var createPromise = function (stubbing, value, willResolve) {
|
8922 | var Promise = (0, config_1.default)().promiseConstructor;
|
8923 | ensurePromise(Promise);
|
8924 | return new Promise(function (resolve, reject) {
|
8925 | callCallback(stubbing, function () {
|
8926 | return willResolve ? resolve(value) : reject(value);
|
8927 | }, [value]);
|
8928 | });
|
8929 | };
|
8930 | var stubbedValueFor = function (stubbing) {
|
8931 | return stubbing.callCount < stubbing.stubbedValues.length
|
8932 | ? stubbing.stubbedValues[stubbing.callCount]
|
8933 | : lodash_1.default.last(stubbing.stubbedValues);
|
8934 | };
|
8935 | var isSatisfied = function (stubbing, actualArgs) {
|
8936 | return (0, args_match_1.default)(stubbing.args, actualArgs, stubbing.config) &&
|
8937 | hasTimesRemaining(stubbing);
|
8938 | };
|
8939 | var hasTimesRemaining = function (stubbing) {
|
8940 | return stubbing.config.times == null
|
8941 | ? true
|
8942 | : stubbing.callCount < stubbing.config.times;
|
8943 | };
|
8944 | var ensurePromise = function (Promise) {
|
8945 | if (Promise == null) {
|
8946 | return log_1.default.error('td.when', "no promise constructor is set (perhaps this runtime lacks a native Promise\nfunction?), which means this stubbing can't return a promise to your\nsubject under test, resulting in this error. To resolve the issue, set\na promise constructor with `td.config`, like this:\n\n td.config({\n promiseConstructor: require('bluebird')\n })");
|
8947 | }
|
8948 | };
|
8949 |
|
8950 | },{"../args-match":239,"../config":243,"../log":260,"../matchers/is-callback":269,"../matchers/notify-after-satisfaction":271,"../wrap/lodash":288,"./index":280}],282:[function(require,module,exports){
|
8951 | "use strict";
|
8952 | Object.defineProperty(exports, "__esModule", { value: true });
|
8953 | var lodash_1 = require("../wrap/lodash");
|
8954 | var is_matcher_1 = require("../matchers/is-matcher");
|
8955 | var stringifyObject = require("stringify-object-es5");
|
8956 | exports.default = (function (anything) {
|
8957 | if (lodash_1.default.isString(anything)) {
|
8958 | return stringifyString(anything);
|
8959 | }
|
8960 | else if ((0, is_matcher_1.default)(anything)) {
|
8961 | return anything.__name;
|
8962 | }
|
8963 | else if (anything && anything[Symbol('__is_proxy')]) {
|
8964 | return anything.toString();
|
8965 | }
|
8966 | else {
|
8967 | return stringifyObject(anything, {
|
8968 | indent: ' ',
|
8969 | singleQuotes: false,
|
8970 | inlineCharacterLimit: 65,
|
8971 | transform: function (obj, prop, originalResult) {
|
8972 | if ((0, is_matcher_1.default)(obj[prop])) {
|
8973 | return obj[prop].__name;
|
8974 | }
|
8975 | else {
|
8976 | return originalResult;
|
8977 | }
|
8978 | }
|
8979 | });
|
8980 | }
|
8981 | });
|
8982 | var stringifyString = function (string) {
|
8983 | return lodash_1.default.includes(string, '\n')
|
8984 | ? "\"\"\"\n".concat(string, "\n\"\"\"")
|
8985 | : "\"".concat(string.replace(/"/g, '\\"'), "\"");
|
8986 | };
|
8987 |
|
8988 | },{"../matchers/is-matcher":270,"../wrap/lodash":288,"stringify-object-es5":237}],283:[function(require,module,exports){
|
8989 | "use strict";
|
8990 | Object.defineProperty(exports, "__esModule", { value: true });
|
8991 | var lodash_1 = require("../wrap/lodash");
|
8992 | var anything_1 = require("./anything");
|
8993 | exports.default = (function (args, joiner, wrapper) {
|
8994 | if (joiner === void 0) { joiner = ', '; }
|
8995 | if (wrapper === void 0) { wrapper = ''; }
|
8996 | return lodash_1.default.map(args, function (arg) {
|
8997 | return "".concat(wrapper).concat((0, anything_1.default)(arg)).concat(wrapper);
|
8998 | }).join(joiner);
|
8999 | });
|
9000 |
|
9001 | },{"../wrap/lodash":288,"./anything":282}],284:[function(require,module,exports){
|
9002 | "use strict";
|
9003 | Object.defineProperty(exports, "__esModule", { value: true });
|
9004 | exports.default = {
|
9005 | uncloneable: Symbol('Deep-clone failed for arguments')
|
9006 | };
|
9007 |
|
9008 | },{}],285:[function(require,module,exports){
|
9009 | "use strict";
|
9010 | Object.defineProperty(exports, "__esModule", { value: true });
|
9011 | var lodash_1 = require("./wrap/lodash");
|
9012 | var args_match_1 = require("./args-match");
|
9013 | var calls_1 = require("./store/calls");
|
9014 | var log_1 = require("./log");
|
9015 | var store_1 = require("./store");
|
9016 | var arguments_1 = require("./stringify/arguments");
|
9017 | var stubbings_1 = require("./store/stubbings");
|
9018 | var notify_after_satisfaction_1 = require("./matchers/notify-after-satisfaction");
|
9019 | var clone_deep_if_possible_1 = require("./clone-deep-if-possible");
|
9020 | var symbols_1 = require("./symbols");
|
9021 | exports.default = (function (__userDoesRehearsalInvocationHere__, config) {
|
9022 | if (config === void 0) { config = {}; }
|
9023 | var last = calls_1.default.pop();
|
9024 | ensureRehearsalOccurred(last);
|
9025 | ensureCloneableIfCloneArgs(last, config);
|
9026 | if (calls_1.default.wasInvoked(last.testDouble, last.args, config)) {
|
9027 | notifyMatchers(last.testDouble, last.args, config);
|
9028 | warnIfStubbed(last.testDouble, last.args);
|
9029 | }
|
9030 | else {
|
9031 | log_1.default.fail(unsatisfiedErrorMessage(last.testDouble, last.args, config));
|
9032 | }
|
9033 | });
|
9034 | var ensureRehearsalOccurred = function (last) {
|
9035 | if (!last) {
|
9036 | log_1.default.error('td.verify', "No test double invocation detected for `verify()`.\n\n Usage:\n verify(myTestDouble('foo'))");
|
9037 | }
|
9038 | };
|
9039 | function ensureCloneableIfCloneArgs(last, config) {
|
9040 | if (config.cloneArgs && (0, clone_deep_if_possible_1.default)(last.args) === symbols_1.default.uncloneable) {
|
9041 | return log_1.default.error('td.verify', "Failed to deep-clone arguments. Ensure lodash _.cloneDeep works on them\n");
|
9042 | }
|
9043 | }
|
9044 | var notifyMatchers = function (testDouble, expectedArgs, config) {
|
9045 | lodash_1.default.each(calls_1.default.where(testDouble, expectedArgs, config), function (invocation) {
|
9046 | (0, notify_after_satisfaction_1.default)(expectedArgs, invocation.args);
|
9047 | });
|
9048 | };
|
9049 | var warnIfStubbed = function (testDouble, actualArgs) {
|
9050 | if (lodash_1.default.some(stubbings_1.default.for(testDouble), function (stubbing) {
|
9051 | return (0, args_match_1.default)(stubbing.args, actualArgs, stubbing.config);
|
9052 | })) {
|
9053 | log_1.default.warn('td.verify', "test double".concat(stringifyName(testDouble), " was both stubbed and verified with arguments (").concat((0, arguments_1.default)(actualArgs), "), which is redundant and probably unnecessary."), 'https://github.com/testdouble/testdouble.js/blob/main/docs/B-frequently-asked-questions.md#why-shouldnt-i-call-both-tdwhen-and-tdverify-for-a-single-interaction-with-a-test-double');
|
9054 | }
|
9055 | };
|
9056 | var unsatisfiedErrorMessage = function (testDouble, args, config) {
|
9057 | return baseSummary(testDouble, args, config) +
|
9058 | matchedInvocationSummary(testDouble, args, config) +
|
9059 | invocationSummary(testDouble, args, config);
|
9060 | };
|
9061 | var stringifyName = function (testDouble) {
|
9062 | var name = store_1.default.for(testDouble).name;
|
9063 | return name ? " `".concat(name, "`") : '';
|
9064 | };
|
9065 | var baseSummary = function (testDouble, args, config) {
|
9066 | return "Unsatisfied verification on test double".concat(stringifyName(testDouble), ".\n\n Wanted:\n - called with `(").concat((0, arguments_1.default)(args), ")`").concat(timesMessage(config)).concat(ignoreMessage(config), ".");
|
9067 | };
|
9068 | var invocationSummary = function (testDouble, args, config) {
|
9069 | var calls = calls_1.default.for(testDouble);
|
9070 | if (calls.length === 0) {
|
9071 | return '\n\n But there were no invocations of the test double.';
|
9072 | }
|
9073 | else {
|
9074 | return lodash_1.default.reduce(calls, function (desc, call) {
|
9075 | return desc + "\n - called with `(".concat((0, arguments_1.default)(call.args), ")`.");
|
9076 | }, '\n\n All calls of the test double, in order were:');
|
9077 | }
|
9078 | };
|
9079 | var matchedInvocationSummary = function (testDouble, args, config) {
|
9080 | var calls = calls_1.default.where(testDouble, args, config);
|
9081 | var expectedCalls = config.times || 0;
|
9082 | if (calls.length === 0 || calls.length > expectedCalls) {
|
9083 | return '';
|
9084 | }
|
9085 | else {
|
9086 | return lodash_1.default.reduce(lodash_1.default.groupBy(calls, 'args'), function (desc, callsMatchingArgs, args) {
|
9087 | return desc + "\n - called ".concat(pluralize(callsMatchingArgs.length, 'time'), " with `(").concat((0, arguments_1.default)(callsMatchingArgs[0].args), ")`.");
|
9088 | }, "\n\n ".concat(pluralize(calls.length, 'call'), " that satisfied this verification:"));
|
9089 | }
|
9090 | };
|
9091 | var pluralize = function (x, msg) {
|
9092 | return "".concat(x, " ").concat(msg).concat(x === 1 ? '' : 's');
|
9093 | };
|
9094 | var timesMessage = function (config) {
|
9095 | return config.times != null
|
9096 | ? " ".concat(pluralize(config.times, 'time'))
|
9097 | : '';
|
9098 | };
|
9099 | var ignoreMessage = function (config) {
|
9100 | return config.ignoreExtraArgs != null
|
9101 | ? ', ignoring any additional arguments'
|
9102 | : '';
|
9103 | };
|
9104 |
|
9105 | },{"./args-match":239,"./clone-deep-if-possible":242,"./log":260,"./matchers/notify-after-satisfaction":271,"./store":280,"./store/calls":279,"./store/stubbings":281,"./stringify/arguments":283,"./symbols":284,"./wrap/lodash":288}],286:[function(require,module,exports){
|
9106 | "use strict";
|
9107 | Object.defineProperty(exports, "__esModule", { value: true });
|
9108 | exports.default = '3.20.2';
|
9109 |
|
9110 | },{}],287:[function(require,module,exports){
|
9111 | "use strict";
|
9112 | Object.defineProperty(exports, "__esModule", { value: true });
|
9113 | var lodash_1 = require("./wrap/lodash");
|
9114 | var callback_1 = require("./callback");
|
9115 | var is_callback_1 = require("./matchers/is-callback");
|
9116 | var calls_1 = require("./store/calls");
|
9117 | var log_1 = require("./log");
|
9118 | var stubbings_1 = require("./store/stubbings");
|
9119 | var config_1 = require("./config");
|
9120 | var clone_deep_if_possible_1 = require("./clone-deep-if-possible");
|
9121 | var symbols_1 = require("./symbols");
|
9122 | function when(__userDoesRehearsalInvocationHere__, config) {
|
9123 | if (config === void 0) { config = {}; }
|
9124 | return ({
|
9125 | thenReturn: function () {
|
9126 | var stubbedValues = [];
|
9127 | for (var _i = 0; _i < arguments.length; _i++) {
|
9128 | stubbedValues[_i] = arguments[_i];
|
9129 | }
|
9130 | return addStubbing(stubbedValues, config, 'thenReturn');
|
9131 | },
|
9132 | thenCallback: function () {
|
9133 | var stubbedValues = [];
|
9134 | for (var _i = 0; _i < arguments.length; _i++) {
|
9135 | stubbedValues[_i] = arguments[_i];
|
9136 | }
|
9137 | return addStubbing(stubbedValues, config, 'thenCallback');
|
9138 | },
|
9139 | thenDo: function () {
|
9140 | var stubbedValues = [];
|
9141 | for (var _i = 0; _i < arguments.length; _i++) {
|
9142 | stubbedValues[_i] = arguments[_i];
|
9143 | }
|
9144 | return addStubbing(stubbedValues, config, 'thenDo');
|
9145 | },
|
9146 | thenThrow: function () {
|
9147 | var stubbedValues = [];
|
9148 | for (var _i = 0; _i < arguments.length; _i++) {
|
9149 | stubbedValues[_i] = arguments[_i];
|
9150 | }
|
9151 | return addStubbing(stubbedValues, config, 'thenThrow');
|
9152 | },
|
9153 | thenResolve: function () {
|
9154 | var stubbedValues = [];
|
9155 | for (var _i = 0; _i < arguments.length; _i++) {
|
9156 | stubbedValues[_i] = arguments[_i];
|
9157 | }
|
9158 | warnIfPromiseless();
|
9159 | return addStubbing(stubbedValues, config, 'thenResolve');
|
9160 | },
|
9161 | thenReject: function () {
|
9162 | var stubbedValues = [];
|
9163 | for (var _i = 0; _i < arguments.length; _i++) {
|
9164 | stubbedValues[_i] = arguments[_i];
|
9165 | }
|
9166 | warnIfPromiseless();
|
9167 | return addStubbing(stubbedValues, config, 'thenReject');
|
9168 | }
|
9169 | });
|
9170 | }
|
9171 | exports.default = when;
|
9172 | function addStubbing(stubbedValues, config, plan) {
|
9173 | var last = calls_1.default.pop();
|
9174 | ensureRehearsalOccurred(last);
|
9175 | ensureCloneableIfCloneArgs(last, config);
|
9176 | lodash_1.default.assign(config, { plan: plan });
|
9177 | stubbings_1.default.add(last.testDouble, concatImpliedCallback(last.args, config), stubbedValues, config);
|
9178 | return last.testDouble;
|
9179 | }
|
9180 | function ensureRehearsalOccurred(last) {
|
9181 | if (!last) {
|
9182 | return log_1.default.error('td.when', "No test double invocation call detected for `when()`.\n\n Usage:\n when(myTestDouble('foo')).thenReturn('bar')");
|
9183 | }
|
9184 | }
|
9185 | function ensureCloneableIfCloneArgs(last, config) {
|
9186 | if (config.cloneArgs && (0, clone_deep_if_possible_1.default)(last.args) === symbols_1.default.uncloneable) {
|
9187 | return log_1.default.error('td.when', "Failed to deep-clone arguments. Ensure lodash _.cloneDeep works on them\n");
|
9188 | }
|
9189 | }
|
9190 | function concatImpliedCallback(args, config) {
|
9191 | if (config.plan !== 'thenCallback') {
|
9192 | return args;
|
9193 | }
|
9194 | else if (!lodash_1.default.some(args, is_callback_1.default)) {
|
9195 | return args.concat(callback_1.default);
|
9196 | }
|
9197 | else {
|
9198 | return args;
|
9199 | }
|
9200 | }
|
9201 | function warnIfPromiseless() {
|
9202 | if ((0, config_1.default)().promiseConstructor == null) {
|
9203 | log_1.default.warn('td.when', "no promise constructor is set, so this `thenResolve` or `thenReject` stubbing\nwill fail if it's satisfied by an invocation on the test double. You can tell\ntestdouble.js which promise constructor to use with `td.config`, like so:\n\n td.config({\n promiseConstructor: require('bluebird')\n })");
|
9204 | }
|
9205 | }
|
9206 |
|
9207 | },{"./callback":240,"./clone-deep-if-possible":242,"./config":243,"./log":260,"./matchers/is-callback":269,"./store/calls":279,"./store/stubbings":281,"./symbols":284,"./wrap/lodash":288}],288:[function(require,module,exports){
|
9208 | "use strict";
|
9209 | Object.defineProperty(exports, "__esModule", { value: true });
|
9210 | var assign = require("lodash/assign");
|
9211 | var capitalize = require("lodash/capitalize");
|
9212 | var clone = require("lodash/clone");
|
9213 | var cloneDeep = require("lodash/cloneDeep");
|
9214 | var cloneDeepWith = require("lodash/cloneDeepWith");
|
9215 | var compact = require("lodash/compact");
|
9216 | var defer = require("lodash/defer");
|
9217 | var delay = require("lodash/delay");
|
9218 | var each = require("lodash/each");
|
9219 | var every = require("lodash/every");
|
9220 | var extend = require("lodash/extend");
|
9221 | var filter = require("lodash/filter");
|
9222 | var find = require("lodash/find");
|
9223 | var findLast = require("lodash/findLast");
|
9224 | var get = require("lodash/get");
|
9225 | var groupBy = require("lodash/groupBy");
|
9226 | var includes = require("lodash/includes");
|
9227 | var invoke = require("lodash/invoke");
|
9228 | var isArguments = require("lodash/isArguments");
|
9229 | var isArray = require("lodash/isArray");
|
9230 | var isBoolean = require("lodash/isBoolean");
|
9231 | var isEmpty = require("lodash/isEmpty");
|
9232 | var isEqual = require("lodash/isEqual");
|
9233 | var isEqualWith = require("lodash/isEqualWith");
|
9234 | var isFunction = require("lodash/isFunction");
|
9235 | var isNumber = require("lodash/isNumber");
|
9236 | var isObject = require("lodash/isObject");
|
9237 | var isObjectLike = require("lodash/isObjectLike");
|
9238 | var isRegExp = require("lodash/isRegExp");
|
9239 | var isString = require("lodash/isString");
|
9240 | var keys = require("lodash/keys");
|
9241 | var last = require("lodash/last");
|
9242 | var map = require("lodash/map");
|
9243 | var reduce = require("lodash/reduce");
|
9244 | var reject = require("lodash/reject");
|
9245 | var some = require("lodash/some");
|
9246 | var tap = require("lodash/tap");
|
9247 | var toArray = require("lodash/toArray");
|
9248 | var transform = require("lodash/transform");
|
9249 | exports.default = {
|
9250 | assign: assign,
|
9251 | capitalize: capitalize,
|
9252 | clone: clone,
|
9253 | cloneDeep: cloneDeep,
|
9254 | cloneDeepWith: cloneDeepWith,
|
9255 | compact: compact,
|
9256 | defer: defer,
|
9257 | delay: delay,
|
9258 | each: each,
|
9259 | every: every,
|
9260 | extend: extend,
|
9261 | filter: filter,
|
9262 | find: find,
|
9263 | findLast: findLast,
|
9264 | get: get,
|
9265 | groupBy: groupBy,
|
9266 | includes: includes,
|
9267 | invoke: invoke,
|
9268 | isArguments: isArguments,
|
9269 | isArray: isArray,
|
9270 | isBoolean: isBoolean,
|
9271 | isEmpty: isEmpty,
|
9272 | isEqual: isEqual,
|
9273 | isEqualWith: isEqualWith,
|
9274 | isFunction: isFunction,
|
9275 | isNumber: isNumber,
|
9276 | isObject: isObject,
|
9277 | isObjectLike: isObjectLike,
|
9278 | isRegExp: isRegExp,
|
9279 | isString: isString,
|
9280 | keys: keys,
|
9281 | last: last,
|
9282 | map: map,
|
9283 | reduce: reduce,
|
9284 | reject: reject,
|
9285 | some: some,
|
9286 | tap: tap,
|
9287 | toArray: toArray,
|
9288 | transform: transform
|
9289 | };
|
9290 |
|
9291 | },{"lodash/assign":171,"lodash/capitalize":173,"lodash/clone":174,"lodash/cloneDeep":175,"lodash/cloneDeepWith":176,"lodash/compact":177,"lodash/defer":179,"lodash/delay":180,"lodash/each":181,"lodash/every":183,"lodash/extend":184,"lodash/filter":185,"lodash/find":186,"lodash/findLast":188,"lodash/get":191,"lodash/groupBy":192,"lodash/includes":195,"lodash/invoke":196,"lodash/isArguments":197,"lodash/isArray":198,"lodash/isBoolean":200,"lodash/isEmpty":202,"lodash/isEqual":203,"lodash/isEqualWith":204,"lodash/isFunction":205,"lodash/isNumber":208,"lodash/isObject":209,"lodash/isObjectLike":210,"lodash/isRegExp":211,"lodash/isString":213,"lodash/keys":216,"lodash/last":218,"lodash/map":219,"lodash/reduce":223,"lodash/reject":224,"lodash/some":225,"lodash/tap":228,"lodash/toArray":229,"lodash/transform":234}],289:[function(require,module,exports){
|
9292 | "use strict";
|
9293 | Object.defineProperty(exports, "__esModule", { value: true });
|
9294 | var lodash_1 = require("./lodash");
|
9295 | function proxySafeCloneDeepWith(thing, callback) {
|
9296 | return lodash_1.default.cloneDeepWith(thing, function (val, key, obj, stack) {
|
9297 | if (isSafeWithProxy(key)) {
|
9298 | return callback(val, key, obj, stack);
|
9299 | }
|
9300 | });
|
9301 | }
|
9302 | exports.default = proxySafeCloneDeepWith;
|
9303 | function isSafeWithProxy(key) {
|
9304 | return key &&
|
9305 | key !== 'constructor' &&
|
9306 | (!key.toString || key.toString() !== 'Symbol(Symbol.toStringTag)');
|
9307 | }
|
9308 |
|
9309 | },{"./lodash":288}]},{},[257])(257)
|
9310 | });
|