stampitjs-rails 1.1.0.3 → 2.1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c622cb6e006cac6d84a18b604ac0a7fce2c3b9bc
4
- data.tar.gz: fdd8d761627bebeb64860c736db970b00ff7ea9b
3
+ metadata.gz: 144b3d47fe99eacdcac747d73dc60569f9a77fa0
4
+ data.tar.gz: 4e38ebaf0af89ffdaa3fb3d8d1084f5a53b26d4f
5
5
  SHA512:
6
- metadata.gz: b15d443b63f22121096ddba7be3e8e72f51299622d80dda673e27e248b17596142db22cb643696f2f0caaaf7ed2f25b10466308c20fb9a8c0b4024c391ba2304
7
- data.tar.gz: 63bd0c292aa36c4009eed575eb1b3935ff780c5af69d00a4e41f6965f53e10898d3f1f984f439bdb578ffd7dfc8ca128e2bc363ef5432c3c4391d8bee3f3940a
6
+ metadata.gz: d9bc8e7ba44f5cb0f219d0d07953d7874677aef0cc3b16b3395a49f7a7cbff39f69d42a0adcf92435ef347ce4d142823ee8d408767fa1bfe7a6d0042d1c2d4b7
7
+ data.tar.gz: ec3cf8cf33e92526ee47c87fa7ceafe508c8d9ecd4188c5986739372d255cb647d37912a1143040c29bb811846c7bd1e74b2406a984b89eaef9a1e9c494cbb27
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Stampitjs::Rails
1
+ # stampitjs-rails
2
2
 
3
- asset gem for [stampit.js](https://github.com/ericelliott/stampit)
3
+ asset gem for [stampit.js](https://github.com/ericelliott/stampit) by Eric Elliott
4
4
 
5
5
  ## Installation
6
6
 
@@ -19,6 +19,9 @@ Or install it yourself as:
19
19
  $ gem install stampitjs-rails
20
20
 
21
21
  ## Usage
22
+ Add the following to your `application.js` file:
23
+
24
+ $ //=require stampit
22
25
 
23
26
  See the original documentation for [stampit.js](https://github.com/ericelliott/stampit).
24
27
 
@@ -1,5 +1,5 @@
1
1
  module Stampitjs
2
2
  module Rails
3
- VERSION = "1.1.0.3"
3
+ VERSION = "2.1.0.0"
4
4
  end
5
5
  end
@@ -1,747 +1,2122 @@
1
- !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.stampit=e():"undefined"!=typeof global?global.stampit=e():"undefined"!=typeof self&&(self.stampit=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2
- var forIn = require('mout/object/forIn');
3
-
4
- function copyProp(val, key){
5
- this[key] = val;
6
- }
7
-
8
- module.exports = function mixInChain(target, objects){
9
- var i = 0,
10
- n = arguments.length,
11
- obj;
12
- while(++i < n){
13
- obj = arguments[i];
14
- if (obj != null) {
15
- forIn(obj, copyProp, target);
16
- }
17
- }
18
- return target;
19
- };
20
-
21
- },{"mout/object/forIn":14}],2:[function(require,module,exports){
22
-
23
-
24
- /**
25
- * Array forEach
26
- */
27
- function forEach(arr, callback, thisObj) {
28
- if (arr == null) {
29
- return;
30
- }
31
- var i = -1,
32
- len = arr.length;
33
- while (++i < len) {
34
- // we iterate over sparse items since there is no way to make it
35
- // work properly on IE 7-8. see #64
36
- if ( callback.call(thisObj, arr[i], i, arr) === false ) {
37
- break;
38
- }
39
- }
40
- }
41
-
42
- module.exports = forEach;
43
-
44
-
45
-
46
- },{}],3:[function(require,module,exports){
47
- var forEach = require('./forEach');
48
- var makeIterator = require('../function/makeIterator_');
49
-
50
- /**
51
- * Array map
52
- */
53
- function map(arr, callback, thisObj) {
54
- callback = makeIterator(callback, thisObj);
55
- var results = [];
56
- if (arr == null){
57
- return results;
58
- }
59
-
60
- var i = -1, len = arr.length;
61
- while (++i < len) {
62
- results[i] = callback(arr[i], i, arr);
63
- }
64
-
65
- return results;
66
- }
67
-
68
- module.exports = map;
69
-
70
-
71
- },{"../function/makeIterator_":4,"./forEach":2}],4:[function(require,module,exports){
72
- var prop = require('./prop');
73
- var deepMatches = require('../object/deepMatches');
74
-
75
- /**
76
- * Converts argument into a valid iterator.
77
- * Used internally on most array/object/collection methods that receives a
78
- * callback/iterator providing a shortcut syntax.
79
- */
80
- function makeIterator(src, thisObj){
81
- switch(typeof src) {
82
- case 'object':
83
- // typeof null == "object"
84
- return (src != null)? function(val, key, target){
85
- return deepMatches(val, src);
86
- } : src;
87
- case 'string':
88
- case 'number':
89
- return prop(src);
90
- case 'function':
91
- if (typeof thisObj === 'undefined') {
92
- return src;
93
- } else {
94
- return function(val, i, arr){
95
- return src.call(thisObj, val, i, arr);
96
- };
97
- }
98
- default:
99
- return src;
100
- }
101
- }
102
-
103
- module.exports = makeIterator;
104
-
105
-
106
-
107
- },{"../object/deepMatches":13,"./prop":5}],5:[function(require,module,exports){
108
-
109
-
110
- /**
111
- * Returns a function that gets a property of the passed object
112
- */
113
- function prop(name){
114
- return function(obj){
115
- return obj[name];
116
- };
117
- }
118
-
119
- module.exports = prop;
120
-
121
-
122
-
123
- },{}],6:[function(require,module,exports){
124
- var kindOf = require('./kindOf');
125
- var isPlainObject = require('./isPlainObject');
126
- var mixIn = require('../object/mixIn');
127
-
128
- /**
129
- * Clone native types.
130
- */
131
- function clone(val){
132
- switch (kindOf(val)) {
133
- case 'Object':
134
- return cloneObject(val);
135
- case 'Array':
136
- return cloneArray(val);
137
- case 'RegExp':
138
- return cloneRegExp(val);
139
- case 'Date':
140
- return cloneDate(val);
141
- default:
142
- return val;
143
- }
144
- }
145
-
146
- function cloneObject(source) {
147
- if (isPlainObject(source)) {
148
- return mixIn({}, source);
149
- } else {
150
- return source;
151
- }
152
- }
153
-
154
- function cloneRegExp(r) {
155
- var flags = '';
156
- flags += r.multiline ? 'm' : '';
157
- flags += r.global ? 'g' : '';
158
- flags += r.ignorecase ? 'i' : '';
159
- return new RegExp(r.source, flags);
160
- }
161
-
162
- function cloneDate(date) {
163
- return new Date(+date);
164
- }
165
-
166
- function cloneArray(arr) {
167
- return arr.slice();
168
- }
169
-
170
- module.exports = clone;
171
-
172
-
173
-
174
- },{"../object/mixIn":18,"./isPlainObject":11,"./kindOf":12}],7:[function(require,module,exports){
175
- var clone = require('./clone');
176
- var forOwn = require('../object/forOwn');
177
- var kindOf = require('./kindOf');
178
- var isPlainObject = require('./isPlainObject');
179
-
180
- /**
181
- * Recursively clone native types.
182
- */
183
- function deepClone(val, instanceClone) {
184
- switch ( kindOf(val) ) {
185
- case 'Object':
186
- return cloneObject(val, instanceClone);
187
- case 'Array':
188
- return cloneArray(val, instanceClone);
189
- default:
190
- return clone(val);
191
- }
192
- }
193
-
194
- function cloneObject(source, instanceClone) {
195
- if (isPlainObject(source)) {
196
- var out = {};
197
- forOwn(source, function(val, key) {
198
- this[key] = deepClone(val, instanceClone);
199
- }, out);
200
- return out;
201
- } else if (instanceClone) {
202
- return instanceClone(source);
203
- } else {
204
- return source;
205
- }
206
- }
207
-
208
- function cloneArray(arr, instanceClone) {
209
- var out = [],
210
- i = -1,
211
- n = arr.length,
212
- val;
213
- while (++i < n) {
214
- out[i] = deepClone(arr[i], instanceClone);
215
- }
216
- return out;
217
- }
218
-
219
- module.exports = deepClone;
220
-
221
-
222
-
223
-
224
- },{"../object/forOwn":15,"./clone":6,"./isPlainObject":11,"./kindOf":12}],8:[function(require,module,exports){
225
- var isKind = require('./isKind');
226
- /**
227
- */
228
- var isArray = Array.isArray || function (val) {
229
- return isKind(val, 'Array');
230
- };
231
- module.exports = isArray;
232
-
233
-
234
- },{"./isKind":9}],9:[function(require,module,exports){
235
- var kindOf = require('./kindOf');
236
- /**
237
- * Check if value is from a specific "kind".
238
- */
239
- function isKind(val, kind){
240
- return kindOf(val) === kind;
241
- }
242
- module.exports = isKind;
243
-
244
-
245
- },{"./kindOf":12}],10:[function(require,module,exports){
246
- var isKind = require('./isKind');
247
- /**
248
- */
249
- function isObject(val) {
250
- return isKind(val, 'Object');
251
- }
252
- module.exports = isObject;
253
-
254
-
255
- },{"./isKind":9}],11:[function(require,module,exports){
256
-
257
-
258
- /**
259
- * Checks if the value is created by the `Object` constructor.
260
- */
261
- function isPlainObject(value) {
262
- return (!!value
263
- && typeof value === 'object'
264
- && value.constructor === Object);
265
- }
266
-
267
- module.exports = isPlainObject;
268
-
269
-
270
-
271
- },{}],12:[function(require,module,exports){
272
-
273
-
274
- var _rKind = /^\[object (.*)\]$/,
275
- _toString = Object.prototype.toString,
276
- UNDEF;
277
-
278
- /**
279
- * Gets the "kind" of value. (e.g. "String", "Number", etc)
280
- */
281
- function kindOf(val) {
282
- if (val === null) {
283
- return 'Null';
284
- } else if (val === UNDEF) {
285
- return 'Undefined';
286
- } else {
287
- return _rKind.exec( _toString.call(val) )[1];
288
- }
289
- }
290
- module.exports = kindOf;
291
-
292
-
293
- },{}],13:[function(require,module,exports){
294
- var forOwn = require('./forOwn');
295
- var isArray = require('../lang/isArray');
296
-
297
- function containsMatch(array, pattern) {
298
- var i = -1, length = array.length;
299
- while (++i < length) {
300
- if (deepMatches(array[i], pattern)) {
301
- return true;
302
- }
303
- }
304
-
305
- return false;
306
- }
307
-
308
- function matchArray(target, pattern) {
309
- var i = -1, patternLength = pattern.length;
310
- while (++i < patternLength) {
311
- if (!containsMatch(target, pattern[i])) {
312
- return false;
313
- }
314
- }
315
-
316
- return true;
317
- }
318
-
319
- function matchObject(target, pattern) {
320
- var result = true;
321
- forOwn(pattern, function(val, key) {
322
- if (!deepMatches(target[key], val)) {
323
- // Return false to break out of forOwn early
324
- return (result = false);
325
- }
326
- });
327
-
328
- return result;
329
- }
330
-
331
- /**
332
- * Recursively check if the objects match.
333
- */
334
- function deepMatches(target, pattern){
335
- if (target && typeof target === 'object') {
336
- if (isArray(target) && isArray(pattern)) {
337
- return matchArray(target, pattern);
338
- } else {
339
- return matchObject(target, pattern);
340
- }
341
- } else {
342
- return target === pattern;
343
- }
344
- }
345
-
346
- module.exports = deepMatches;
347
-
348
-
349
-
350
- },{"../lang/isArray":8,"./forOwn":15}],14:[function(require,module,exports){
351
-
352
-
353
- var _hasDontEnumBug,
354
- _dontEnums;
355
-
356
- function checkDontEnum(){
357
- _dontEnums = [
358
- 'toString',
359
- 'toLocaleString',
360
- 'valueOf',
361
- 'hasOwnProperty',
362
- 'isPrototypeOf',
363
- 'propertyIsEnumerable',
364
- 'constructor'
365
- ];
366
-
367
- _hasDontEnumBug = true;
368
-
369
- for (var key in {'toString': null}) {
370
- _hasDontEnumBug = false;
371
- }
372
- }
373
-
374
- /**
375
- * Similar to Array/forEach but works over object properties and fixes Don't
376
- * Enum bug on IE.
377
- * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
378
- */
379
- function forIn(obj, fn, thisObj){
380
- var key, i = 0;
381
- // no need to check if argument is a real object that way we can use
382
- // it for arrays, functions, date, etc.
383
-
384
- //post-pone check till needed
385
- if (_hasDontEnumBug == null) checkDontEnum();
386
-
387
- for (key in obj) {
388
- if (exec(fn, obj, key, thisObj) === false) {
389
- break;
390
- }
391
- }
392
-
393
- if (_hasDontEnumBug) {
394
- while (key = _dontEnums[i++]) {
395
- // since we aren't using hasOwn check we need to make sure the
396
- // property was overwritten
397
- if (obj[key] !== Object.prototype[key]) {
398
- if (exec(fn, obj, key, thisObj) === false) {
399
- break;
400
- }
401
- }
402
- }
403
- }
404
- }
405
-
406
- function exec(fn, obj, key, thisObj){
407
- return fn.call(thisObj, obj[key], key, obj);
408
- }
409
-
410
- module.exports = forIn;
411
-
412
-
413
-
414
- },{}],15:[function(require,module,exports){
415
- var hasOwn = require('./hasOwn');
416
- var forIn = require('./forIn');
417
-
418
- /**
419
- * Similar to Array/forEach but works over object properties and fixes Don't
420
- * Enum bug on IE.
421
- * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
422
- */
423
- function forOwn(obj, fn, thisObj){
424
- forIn(obj, function(val, key){
425
- if (hasOwn(obj, key)) {
426
- return fn.call(thisObj, obj[key], key, obj);
427
- }
428
- });
429
- }
430
-
431
- module.exports = forOwn;
432
-
433
-
434
-
435
- },{"./forIn":14,"./hasOwn":16}],16:[function(require,module,exports){
436
-
437
-
438
- /**
439
- * Safer Object.hasOwnProperty
440
- */
441
- function hasOwn(obj, prop){
442
- return Object.prototype.hasOwnProperty.call(obj, prop);
443
- }
444
-
445
- module.exports = hasOwn;
446
-
447
-
448
-
449
- },{}],17:[function(require,module,exports){
450
- var hasOwn = require('./hasOwn');
451
- var deepClone = require('../lang/deepClone');
452
- var isObject = require('../lang/isObject');
453
-
454
- /**
455
- * Deep merge objects.
456
- */
457
- function merge() {
458
- var i = 1,
459
- key, val, obj, target;
460
-
461
- // make sure we don't modify source element and it's properties
462
- // objects are passed by reference
463
- target = deepClone( arguments[0] );
464
-
465
- while (obj = arguments[i++]) {
466
- for (key in obj) {
467
- if ( ! hasOwn(obj, key) ) {
468
- continue;
469
- }
470
-
471
- val = obj[key];
472
-
473
- if ( isObject(val) && isObject(target[key]) ){
474
- // inception, deep merge objects
475
- target[key] = merge(target[key], val);
476
- } else {
477
- // make sure arrays, regexp, date, objects are cloned
478
- target[key] = deepClone(val);
479
- }
480
-
481
- }
482
- }
483
-
484
- return target;
485
- }
486
-
487
- module.exports = merge;
488
-
489
-
490
-
491
- },{"../lang/deepClone":7,"../lang/isObject":10,"./hasOwn":16}],18:[function(require,module,exports){
492
- var forOwn = require('./forOwn');
493
-
494
- /**
495
- * Combine properties from all the objects into first one.
496
- * - This method affects target object in place, if you want to create a new Object pass an empty object as first param.
497
- * @param {object} target Target Object
498
- * @param {...object} objects Objects to be combined (0...n objects).
499
- * @return {object} Target Object.
500
- */
501
- function mixIn(target, objects){
502
- var i = 0,
503
- n = arguments.length,
504
- obj;
505
- while(++i < n){
506
- obj = arguments[i];
507
- if (obj != null) {
508
- forOwn(obj, copyProp, target);
509
- }
510
- }
511
- return target;
512
- }
513
-
514
- function copyProp(val, key){
515
- this[key] = val;
516
- }
517
-
518
- module.exports = mixIn;
519
-
520
-
521
- },{"./forOwn":15}],19:[function(require,module,exports){
522
- /**
523
- * Stampit
524
- **
525
- * Create objects from reusable, composable behaviors.
526
- **
527
- * Copyright (c) 2013 Eric Elliott
528
- * http://opensource.org/licenses/MIT
529
- **/
530
- 'use strict';
531
- var forEach = require('mout/array/forEach');
532
- var mixIn = require('mout/object/mixIn');
533
- var merge = require('mout/object/merge');
534
- var map = require('mout/array/map');
535
- var forOwn = require('mout/object/forOwn');
536
- var mixInChain = require('./mixinchain.js');
537
- var slice = [].slice;
538
-
539
- // Avoiding JSHist W003 violations.
540
- var create, extractFunctions, stampit, compose, isStamp, convertConstructor;
541
-
542
- create = function (o) {
543
- if (arguments.length > 1) {
544
- throw new Error('Object.create implementation only accepts the first parameter.');
545
- }
546
- function F() {}
547
-
548
- F.prototype = o;
549
- return new F();
550
- };
551
-
552
- if (!Array.isArray) {
553
- Array.isArray = function (vArg) {
554
- return Object.prototype.toString.call(vArg) === "[object Array]";
555
- };
556
- }
557
-
558
- extractFunctions = function extractFunctions(arg) {
559
- if (typeof arg === 'function') {
560
- return map(slice.call(arguments), function (fn) {
561
- if (typeof fn === 'function') {
562
- return fn;
563
- }
564
- });
565
- } else if (typeof arg === 'object') {
566
- var arr = [];
567
- forEach(slice.call(arguments), function (obj) {
568
- forOwn(obj, function (fn) {
569
- arr.push(fn);
570
- });
571
- });
572
- return arr;
573
- } else if (Array.isArray(arg)) {
574
- return slice.call(arg);
575
- }
576
- return [];
577
- };
578
-
579
- /**
580
- * Return a factory function that will produce new objects using the
581
- * prototypes that are passed in or composed.
582
- *
583
- * @param {Object} [methods] A map of method names and bodies for delegation.
584
- * @param {Object} [state] A map of property names and values to clone for each new object.
585
- * @param {Function} [enclose] A closure (function) used to create private data and privileged methods.
586
- * @return {Function} factory A factory to produce objects using the given prototypes.
587
- * @return {Function} factory.create Just like calling the factory function.
588
- * @return {Object} factory.fixed An object map containing the fixed prototypes.
589
- * @return {Function} factory.methods Add methods to the methods prototype. Chainable.
590
- * @return {Function} factory.state Add properties to the state prototype. Chainable.
591
- * @return {Function} factory.enclose Add or replace the closure prototype. Not chainable.
592
- */
593
- stampit = function stampit(methods, state, enclose) {
594
- var fixed = {
595
- methods: methods || {},
596
- state: state,
597
- enclose: extractFunctions(enclose)
598
- },
599
-
600
- factory = function factory(properties) {
601
- var state = merge({}, fixed.state),
602
- instance = mixIn(create(fixed.methods || {}),
603
- state, properties),
604
- closures = fixed.enclose,
605
- args = slice.call(arguments, 1);
606
-
607
- forEach(closures, function (fn) {
608
- if (typeof fn === 'function') {
609
- instance = fn.apply(instance, args) || instance;
610
- }
611
- });
612
-
613
- return instance;
614
- };
615
-
616
- return mixIn(factory, {
617
- create: factory,
618
- fixed: fixed,
619
- /**
620
- * Take n objects and add them to the methods prototype.
621
- * @return {Object} stamp The factory in question (`this`).
622
- */
623
- methods: function stampMethods() {
624
- var obj = fixed.methods || {},
625
- args = [obj].concat(slice.call(arguments));
626
- fixed.methods = mixInChain.apply(this, args);
627
- return this;
628
- },
629
- /**
630
- * Take n objects and add them to the state prototype.
631
- * @return {Object} stamp The factory in question (`this`).
632
- */
633
- state: function stampState() {
634
- var obj = fixed.state || {},
635
- args = [obj].concat(slice.call(arguments));
636
- fixed.state = mixIn.apply(this, args);
637
- return this;
638
- },
639
- /**
640
- * Take n functions, an array of functions, or n objects and add
641
- * the functions to the enclose prototype.
642
- * @return {Object} The factory in question (`this`).
643
- */
644
- enclose: function stampEnclose() {
645
- fixed.enclose = fixed.enclose
646
- .concat(extractFunctions.apply(null, arguments));
647
- return this;
648
- },
649
- /**
650
- * Take one or more factories produced from stampit() and
651
- * combine them with `this` to produce and return a new factory.
652
- * Combining overrides properties with last-in priority.
653
- * @param {[Function]|...Function} factories Stampit factories.
654
- * @return {Function} A new stampit factory composed from arguments.
655
- */
656
- compose: function (factories) {
657
- var args = Array.isArray(factories) ? factories : slice.call(arguments);
658
- args = [this].concat(args);
659
- return compose(args);
660
- }
661
- });
662
- };
663
-
664
- /**
665
- * Take two or more factories produced from stampit() and
666
- * combine them to produce a new factory.
667
- * Combining overrides properties with last-in priority.
668
- * @param {[Function]|...Function} factories A factory produced by stampit().
669
- * @return {Function} A new stampit factory composed from arguments.
670
- */
671
- compose = function compose(factories) {
672
- factories = Array.isArray(factories) ? factories : slice.call(arguments);
673
- var result = stampit(),
674
- f = result.fixed;
675
- forEach(factories, function (source) {
676
- if (source && source.fixed) {
677
- if (source.fixed.methods) {
678
- f.methods = mixInChain(f.methods, source.fixed.methods);
679
- }
680
-
681
- if (source.fixed.state) {
682
- f.state = mixIn(f.state || {}, source.fixed.state);
683
- }
684
-
685
- if (source.fixed.enclose) {
686
- f.enclose = f.enclose.concat(source.fixed.enclose);
687
- }
688
- }
689
- });
690
- return result;
691
- };
692
-
693
- /**
694
- * Check if an object is a stamp.
695
- * @param {Object} obj An object to check.
696
- * @returns {Boolean}
697
- */
698
- isStamp = function isStamp(obj) {
699
- return (
700
- typeof obj === 'function' &&
701
- typeof obj.fixed === 'object' &&
702
- typeof obj.methods === 'function' &&
703
- typeof obj.state === 'function' &&
704
- typeof obj.enclose === 'function'
705
- );
706
- };
707
-
708
- /**
709
- * Take an old-fashioned JS constructor and return a stampit stamp
710
- * that you can freely compose with other stamps.
711
- * @param {Function} Constructor
712
- * @return {Function} A composable stampit factory
713
- * (aka stamp).
714
- */
715
- convertConstructor = function convertConstructor(Constructor) {
716
- return stampit().methods(Constructor.prototype).enclose(Constructor);
717
- };
718
-
719
- module.exports = mixIn(stampit, {
720
- compose: compose,
721
- /**
722
- * Alias for mixIn
723
- */
724
- extend: mixIn,
725
- /**
726
- * Take a destination object followed by one or more source objects,
727
- * and copy the source object properties to the destination object,
728
- * with last in priority overrides.
729
- * @param {Object} destination An object to copy properties to.
730
- * @param {...Object} source An object to copy properties from.
731
- * @returns {Object}
732
- */
733
- mixIn: mixIn,
734
- /**
735
- * Check if an object is a stamp.
736
- * @param {Object} obj An object to check.
737
- * @returns {Boolean}
738
- */
739
- isStamp: isStamp,
740
-
741
- convertConstructor: convertConstructor
742
- });
743
-
744
- },{"./mixinchain.js":1,"mout/array/forEach":2,"mout/array/map":3,"mout/object/forOwn":15,"mout/object/merge":17,"mout/object/mixIn":18}]},{},[19])
745
- (19)
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(factory);
6
+ else if(typeof exports === 'object')
7
+ exports["stampit"] = factory();
8
+ else
9
+ root["stampit"] = factory();
10
+ })(this, function() {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId])
20
+ /******/ return installedModules[moduleId].exports;
21
+
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ exports: {},
25
+ /******/ id: moduleId,
26
+ /******/ loaded: false
27
+ /******/ };
28
+
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.loaded = true;
34
+
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+
39
+
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+
46
+ /******/ // __webpack_public_path__
47
+ /******/ __webpack_require__.p = "";
48
+
49
+ /******/ // Load entry module and return exports
50
+ /******/ return __webpack_require__(0);
51
+ /******/ })
52
+ /************************************************************************/
53
+ /******/ ([
54
+ /* 0 */
55
+ /***/ function(module, exports, __webpack_require__) {
56
+
57
+ /**
58
+ * Stampit
59
+ **
60
+ * Create objects from reusable, composable behaviors.
61
+ **
62
+ * Copyright (c) 2013 Eric Elliott
63
+ * http://opensource.org/licenses/MIT
64
+ **/
65
+ 'use strict';
66
+
67
+ Object.defineProperty(exports, '__esModule', {
68
+ value: true
69
+ });
70
+
71
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
72
+
73
+ var _lodashCollectionForEach = __webpack_require__(1);
74
+
75
+ var _lodashCollectionForEach2 = _interopRequireDefault(_lodashCollectionForEach);
76
+
77
+ var _lodashLangIsFunction = __webpack_require__(12);
78
+
79
+ var _lodashLangIsFunction2 = _interopRequireDefault(_lodashLangIsFunction);
80
+
81
+ var _lodashLangIsObject = __webpack_require__(8);
82
+
83
+ var _lodashLangIsObject2 = _interopRequireDefault(_lodashLangIsObject);
84
+
85
+ var _supermixer = __webpack_require__(27);
86
+
87
+ var create = Object.create;
88
+ function isThenable(value) {
89
+ return value && (0, _lodashLangIsFunction2['default'])(value.then);
90
+ }
91
+
92
+ function extractFunctions() {
93
+ var result = [];
94
+
95
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
96
+ args[_key] = arguments[_key];
97
+ }
98
+
99
+ if ((0, _lodashLangIsFunction2['default'])(args[0])) {
100
+ (0, _lodashCollectionForEach2['default'])(args, function (fn) {
101
+ // assuming all the arguments are functions
102
+ if ((0, _lodashLangIsFunction2['default'])(fn)) {
103
+ result.push(fn);
104
+ }
105
+ });
106
+ } else if ((0, _lodashLangIsObject2['default'])(args[0])) {
107
+ (0, _lodashCollectionForEach2['default'])(args, function (obj) {
108
+ (0, _lodashCollectionForEach2['default'])(obj, function (fn) {
109
+ if ((0, _lodashLangIsFunction2['default'])(fn)) {
110
+ result.push(fn);
111
+ }
112
+ });
113
+ });
114
+ }
115
+ return result;
116
+ }
117
+
118
+ function addMethods(fixed) {
119
+ for (var _len2 = arguments.length, methods = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
120
+ methods[_key2 - 1] = arguments[_key2];
121
+ }
122
+
123
+ return _supermixer.mixinFunctions.apply(undefined, [fixed.methods].concat(methods));
124
+ }
125
+ function addRefs(fixed) {
126
+ for (var _len3 = arguments.length, refs = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
127
+ refs[_key3 - 1] = arguments[_key3];
128
+ }
129
+
130
+ fixed.refs = fixed.state =
131
+
132
+ /**
133
+ * Take a destination object followed by one or more source objects,
134
+ * and copy the source object properties to the destination object,
135
+ * with last in priority overrides.
136
+ * @param {Object} destination An object to copy properties to.
137
+ * @param {...Object} source An object to copy properties from.
138
+ * @returns {Object}
139
+ */
140
+ _supermixer.mixin.apply(undefined, [fixed.refs].concat(refs));
141
+ return fixed.refs;
142
+ }
143
+ function addInit(fixed) {
144
+ for (var _len4 = arguments.length, inits = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
145
+ inits[_key4 - 1] = arguments[_key4];
146
+ }
147
+
148
+ var extractedInits = extractFunctions.apply(undefined, inits);
149
+ fixed.init = fixed.enclose = fixed.init.concat(extractedInits);
150
+ return fixed.init;
151
+ }
152
+ function addProps(fixed) {
153
+ for (var _len5 = arguments.length, propses = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
154
+ propses[_key5 - 1] = arguments[_key5];
155
+ }
156
+
157
+ return _supermixer.merge.apply(undefined, [fixed.props].concat(propses));
158
+ }
159
+ function addStatic(fixed) {
160
+ for (var _len6 = arguments.length, statics = Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
161
+ statics[_key6 - 1] = arguments[_key6];
162
+ }
163
+
164
+ return _supermixer.mixin.apply(undefined, [fixed['static']].concat(statics));
165
+ }
166
+
167
+ function cloneAndExtend(fixed, extensionFunction) {
168
+ var stamp = stampit(fixed);
169
+
170
+ for (var _len7 = arguments.length, args = Array(_len7 > 2 ? _len7 - 2 : 0), _key7 = 2; _key7 < _len7; _key7++) {
171
+ args[_key7 - 2] = arguments[_key7];
172
+ }
173
+
174
+ extensionFunction.apply(undefined, [stamp.fixed].concat(args));
175
+ return stamp;
176
+ }
177
+
178
+ function _compose() {
179
+ var result = stampit();
180
+
181
+ for (var _len8 = arguments.length, factories = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
182
+ factories[_key8] = arguments[_key8];
183
+ }
184
+
185
+ (0, _lodashCollectionForEach2['default'])(factories, function (source) {
186
+ if (source && source.fixed) {
187
+ addMethods(result.fixed, source.fixed.methods);
188
+ // We might end up having two different stampit modules loaded and used in conjunction.
189
+ // These || operators ensure that old stamps could be combined with the current version stamps.
190
+ // 'state' is the old name for 'refs'
191
+ addRefs(result.fixed, source.fixed.refs || source.fixed.state);
192
+ // 'enclose' is the old name for 'init'
193
+ addInit(result.fixed, source.fixed.init || source.fixed.enclose);
194
+ addProps(result.fixed, source.fixed.props);
195
+ addStatic(result.fixed, source.fixed['static']);
196
+ }
197
+ });
198
+ return (0, _supermixer.mixin)(result, result.fixed['static']);
199
+ }
200
+
201
+ /**
202
+ * Return a factory function that will produce new objects using the
203
+ * components that are passed in or composed.
204
+ *
205
+ * @param {Object} [options] Options to build stamp from: `{ methods, refs, init, props }`
206
+ * @param {Object} [options.methods] A map of method names and bodies for delegation.
207
+ * @param {Object} [options.refs] A map of property names and values to be mixed into each new object.
208
+ * @param {Object} [options.init] A closure (function) used to create private data and privileged methods.
209
+ * @param {Object} [options.props] An object to be deeply cloned into each newly stamped object.
210
+ * @param {Object} [options.static] An object to be mixed into each `this` and derived stamps (not objects!).
211
+ * @return {Function(refs)} factory A factory to produce objects.
212
+ * @return {Function(refs)} factory.create Just like calling the factory function.
213
+ * @return {Object} factory.fixed An object map containing the stamp components.
214
+ * @return {Function(methods)} factory.methods Add methods to the stamp. Chainable.
215
+ * @return {Function(refs)} factory.refs Add references to the stamp. Chainable.
216
+ * @return {Function(Function(context))} factory.init Add a closure which called on object instantiation. Chainable.
217
+ * @return {Function(props)} factory.props Add deeply cloned properties to the produced objects. Chainable.
218
+ * @return {Function(stamps)} factory.compose Combine several stamps into single. Chainable.
219
+ * @return {Function(statics)} factory.static Add properties to the stamp (not objects!). Chainable.
220
+ */
221
+ var stampit = function stampit(options) {
222
+ var fixed = { methods: {}, refs: {}, init: [], props: {}, 'static': {} };
223
+ fixed.state = fixed.refs; // Backward compatibility. 'state' is the old name for 'refs'.
224
+ fixed.enclose = fixed.init; // Backward compatibility. 'enclose' is the old name for 'init'.
225
+ if (options) {
226
+ addMethods(fixed, options.methods);
227
+ addRefs(fixed, options.refs);
228
+ addInit(fixed, options.init);
229
+ addProps(fixed, options.props);
230
+ addStatic(fixed, options['static']);
231
+ }
232
+
233
+ var factory = function Factory(refs) {
234
+ for (var _len9 = arguments.length, args = Array(_len9 > 1 ? _len9 - 1 : 0), _key9 = 1; _key9 < _len9; _key9++) {
235
+ args[_key9 - 1] = arguments[_key9];
236
+ }
237
+
238
+ var instance = (0, _supermixer.mixin)(create(fixed.methods), fixed.refs, refs);
239
+ (0, _supermixer.mergeUnique)(instance, fixed.props); // props are safely merged into refs
240
+
241
+ var nextPromise = null;
242
+ if (fixed.init.length > 0) {
243
+ (0, _lodashCollectionForEach2['default'])(fixed.init, function (fn) {
244
+ if (!(0, _lodashLangIsFunction2['default'])(fn)) {
245
+ return; // not a function, do nothing.
246
+ }
247
+
248
+ // Check if we are in the async mode.
249
+ if (!nextPromise) {
250
+ // Call the init().
251
+ var callResult = fn.call(instance, { args: args, instance: instance, stamp: factory });
252
+ if (!callResult) {
253
+ return; // The init() returned nothing. Proceed to the next init().
254
+ }
255
+
256
+ // Returned value is meaningful.
257
+ // It will replace the stampit-created object.
258
+ if (!isThenable(callResult)) {
259
+ instance = callResult; // stamp is synchronous so far.
260
+ return;
261
+ }
262
+
263
+ // This is the sync->async conversion point.
264
+ // Since now our factory will return a promise, not an object.
265
+ nextPromise = callResult;
266
+ } else {
267
+ // As long as one of the init() functions returned a promise,
268
+ // now our factory will 100% return promise too.
269
+ // Linking the init() functions into the promise chain.
270
+ nextPromise = nextPromise.then(function (newInstance) {
271
+ // The previous promise might want to return a value,
272
+ // which we should take as a new object instance.
273
+ instance = newInstance || instance;
274
+
275
+ // Calling the following init().
276
+ // NOTE, than `fn` is wrapped to a closure within the forEach loop.
277
+ var callResult = fn.call(instance, { args: args, instance: instance, stamp: factory });
278
+ // Check if call result is truthy.
279
+ if (!callResult) {
280
+ // The init() returned nothing. Thus using the previous object instance.
281
+ return instance;
282
+ }
283
+
284
+ if (!isThenable(callResult)) {
285
+ // This init() was synchronous and returned a meaningful value.
286
+ instance = callResult;
287
+ // Resolve the instance for the next `then()`.
288
+ return instance;
289
+ }
290
+
291
+ // The init() returned another promise. It is becoming our nextPromise.
292
+ return callResult;
293
+ });
294
+ }
295
+ });
296
+ }
297
+
298
+ // At the end we should resolve the last promise and
299
+ // return the resolved value (as a promise too).
300
+ return nextPromise ? nextPromise.then(function (newInstance) {
301
+ return newInstance || instance;
302
+ }) : instance;
303
+ };
304
+
305
+ var refsMethod = cloneAndExtend.bind(null, fixed, addRefs);
306
+ var initMethod = cloneAndExtend.bind(null, fixed, addInit);
307
+ return (0, _supermixer.mixin)(factory, {
308
+ /**
309
+ * Creates a new object instance form the stamp.
310
+ */
311
+ create: factory,
312
+
313
+ /**
314
+ * The stamp components.
315
+ */
316
+ fixed: fixed,
317
+
318
+ /**
319
+ * Take n objects and add them to the methods list of a new stamp. Creates new stamp.
320
+ * @return {Function} A new stamp (factory object).
321
+ */
322
+ methods: cloneAndExtend.bind(null, fixed, addMethods),
323
+
324
+ /**
325
+ * Take n objects and add them to the references list of a new stamp. Creates new stamp.
326
+ * @return {Function} A new stamp (factory object).
327
+ */
328
+ refs: refsMethod,
329
+
330
+ /**
331
+ * Alias to refs(). Deprecated.
332
+ * @return {Function} A new stamp (factory object).
333
+ */
334
+ state: refsMethod,
335
+
336
+ /**
337
+ * Take n functions, an array of functions, or n objects and add
338
+ * the functions to the initializers list of a new stamp. Creates new stamp.
339
+ * @return {Function} A new stamp (factory object).
340
+ */
341
+ init: initMethod,
342
+
343
+ /**
344
+ * Alias to init(). Deprecated.
345
+ * @return {Function} A new stamp (factory object).
346
+ */
347
+ enclose: initMethod,
348
+
349
+ /**
350
+ * Take n objects and deep merge them to the properties. Creates new stamp.
351
+ * @return {Function} A new stamp (factory object).
352
+ */
353
+ props: cloneAndExtend.bind(null, fixed, addProps),
354
+
355
+ /**
356
+ * Take n objects and add all props to the factory object. Creates new stamp.
357
+ * @return {Function} A new stamp (factory object).
358
+ */
359
+ 'static': function _static() {
360
+ for (var _len10 = arguments.length, statics = Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
361
+ statics[_key10] = arguments[_key10];
362
+ }
363
+
364
+ var newStamp = cloneAndExtend.apply(undefined, [factory.fixed, addStatic].concat(statics));
365
+ return (0, _supermixer.mixin)(newStamp, newStamp.fixed['static']);
366
+ },
367
+
368
+ /**
369
+ * Take one or more factories produced from stampit() and
370
+ * combine them with `this` to produce and return a new factory.
371
+ * Combining overrides properties with last-in priority.
372
+ * @param {[Function]|...Function} factories Stampit factories.
373
+ * @return {Function} A new stampit factory composed from arguments.
374
+ */
375
+ compose: function compose() {
376
+ for (var _len11 = arguments.length, factories = Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
377
+ factories[_key11] = arguments[_key11];
378
+ }
379
+
380
+ return _compose.apply(undefined, [factory].concat(factories));
381
+ }
382
+ }, fixed['static']);
383
+ };
384
+
385
+ // Static methods
386
+
387
+ function isStamp(obj) {
388
+ return (0, _lodashLangIsFunction2['default'])(obj) && (0, _lodashLangIsFunction2['default'])(obj.methods) && (
389
+ // isStamp can be called for old stampit factory object.
390
+ // We should check old names (state and enclose) too.
391
+ (0, _lodashLangIsFunction2['default'])(obj.refs) || (0, _lodashLangIsFunction2['default'])(obj.state)) && ((0, _lodashLangIsFunction2['default'])(obj.init) || (0, _lodashLangIsFunction2['default'])(obj.enclose)) && (0, _lodashLangIsFunction2['default'])(obj.props) && (0, _lodashLangIsFunction2['default'])(obj['static']) && (0, _lodashLangIsObject2['default'])(obj.fixed);
392
+ }
393
+
394
+ function convertConstructor(Constructor) {
395
+ var stamp = stampit();
396
+ stamp.fixed.refs = stamp.fixed.state = (0, _supermixer.mergeChainNonFunctions)(stamp.fixed.refs, Constructor.prototype);
397
+ (0, _supermixer.mixin)(stamp, (0, _supermixer.mixin)(stamp.fixed['static'], Constructor));
398
+
399
+ (0, _supermixer.mixinChainFunctions)(stamp.fixed.methods, Constructor.prototype);
400
+ addInit(stamp.fixed, function (_ref) {
401
+ var instance = _ref.instance;
402
+ var args = _ref.args;
403
+ return Constructor.apply(instance, args);
404
+ });
405
+
406
+ return stamp;
407
+ }
408
+
409
+ function shortcutMethod(extensionFunction) {
410
+ var stamp = stampit();
411
+
412
+ for (var _len12 = arguments.length, args = Array(_len12 > 1 ? _len12 - 1 : 0), _key12 = 1; _key12 < _len12; _key12++) {
413
+ args[_key12 - 1] = arguments[_key12];
414
+ }
415
+
416
+ extensionFunction.apply(undefined, [stamp.fixed].concat(args));
417
+
418
+ return stamp;
419
+ }
420
+
421
+ exports['default'] = (0, _supermixer.mixin)(stampit, {
422
+
423
+ /**
424
+ * Take n objects and add them to the methods list of a new stamp. Creates new stamp.
425
+ * @return {Function} A new stamp (factory object).
426
+ */
427
+ methods: shortcutMethod.bind(null, addMethods),
428
+
429
+ /**
430
+ * Take n objects and add them to the references list of a new stamp. Creates new stamp.
431
+ * @return {Function} A new stamp (factory object).
432
+ */
433
+ refs: shortcutMethod.bind(null, addRefs),
434
+
435
+ /**
436
+ * Take n functions, an array of functions, or n objects and add
437
+ * the functions to the initializers list of a new stamp. Creates new stamp.
438
+ * @return {Function} A new stamp (factory object).
439
+ */
440
+ init: shortcutMethod.bind(null, addInit),
441
+
442
+ /**
443
+ * Take n objects and deep merge them to the properties. Creates new stamp.
444
+ * @return {Function} A new stamp (factory object).
445
+ */
446
+ props: shortcutMethod.bind(null, addProps),
447
+
448
+ /**
449
+ * Take n objects and add all props to the factory object. Creates new stamp.
450
+ * @return {Function} A new stamp (factory object).
451
+ */
452
+ 'static': function _static() {
453
+ for (var _len13 = arguments.length, statics = Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
454
+ statics[_key13] = arguments[_key13];
455
+ }
456
+
457
+ var newStamp = shortcutMethod.apply(undefined, [addStatic].concat(statics));
458
+ return (0, _supermixer.mixin)(newStamp, newStamp.fixed['static']);
459
+ },
460
+
461
+ /**
462
+ * Take two or more factories produced from stampit() and
463
+ * combine them to produce a new factory.
464
+ * Combining overrides properties with last-in priority.
465
+ * @param {[Function]|...Function} factories Stamps produced by stampit().
466
+ * @return {Function} A new stampit factory composed from arguments.
467
+ */
468
+ compose: _compose, mixin: _supermixer.mixin,
469
+ extend: _supermixer.mixin,
470
+ mixIn: _supermixer.mixin,
471
+ assign: _supermixer.mixin,
472
+
473
+ /**
474
+ * Check if an object is a stamp.
475
+ * @param {Object} obj An object to check.
476
+ * @returns {Boolean}
477
+ */
478
+ isStamp: isStamp,
479
+
480
+ /**
481
+ * Take an old-fashioned JS constructor and return a stampit stamp
482
+ * that you can freely compose with other stamps.
483
+ * @param {Function} Constructor
484
+ * @return {Function} A composable stampit factory (aka stamp).
485
+ */
486
+ convertConstructor: convertConstructor
487
+ });
488
+ module.exports = exports['default'];
489
+
490
+ /***/ },
491
+ /* 1 */
492
+ /***/ function(module, exports, __webpack_require__) {
493
+
494
+ var arrayEach = __webpack_require__(2),
495
+ baseEach = __webpack_require__(3),
496
+ createForEach = __webpack_require__(24);
497
+
498
+ /**
499
+ * Iterates over elements of `collection` invoking `iteratee` for each element.
500
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
501
+ * (value, index|key, collection). Iteratee functions may exit iteration early
502
+ * by explicitly returning `false`.
503
+ *
504
+ * **Note:** As with other "Collections" methods, objects with a "length" property
505
+ * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
506
+ * may be used for object iteration.
507
+ *
508
+ * @static
509
+ * @memberOf _
510
+ * @alias each
511
+ * @category Collection
512
+ * @param {Array|Object|string} collection The collection to iterate over.
513
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
514
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
515
+ * @returns {Array|Object|string} Returns `collection`.
516
+ * @example
517
+ *
518
+ * _([1, 2]).forEach(function(n) {
519
+ * console.log(n);
520
+ * }).value();
521
+ * // => logs each value from left to right and returns the array
522
+ *
523
+ * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {
524
+ * console.log(n, key);
525
+ * });
526
+ * // => logs each value-key pair and returns the object (iteration order is not guaranteed)
527
+ */
528
+ var forEach = createForEach(arrayEach, baseEach);
529
+
530
+ module.exports = forEach;
531
+
532
+
533
+ /***/ },
534
+ /* 2 */
535
+ /***/ function(module, exports) {
536
+
537
+ /**
538
+ * A specialized version of `_.forEach` for arrays without support for callback
539
+ * shorthands and `this` binding.
540
+ *
541
+ * @private
542
+ * @param {Array} array The array to iterate over.
543
+ * @param {Function} iteratee The function invoked per iteration.
544
+ * @returns {Array} Returns `array`.
545
+ */
546
+ function arrayEach(array, iteratee) {
547
+ var index = -1,
548
+ length = array.length;
549
+
550
+ while (++index < length) {
551
+ if (iteratee(array[index], index, array) === false) {
552
+ break;
553
+ }
554
+ }
555
+ return array;
556
+ }
557
+
558
+ module.exports = arrayEach;
559
+
560
+
561
+ /***/ },
562
+ /* 3 */
563
+ /***/ function(module, exports, __webpack_require__) {
564
+
565
+ var baseForOwn = __webpack_require__(4),
566
+ createBaseEach = __webpack_require__(23);
567
+
568
+ /**
569
+ * The base implementation of `_.forEach` without support for callback
570
+ * shorthands and `this` binding.
571
+ *
572
+ * @private
573
+ * @param {Array|Object|string} collection The collection to iterate over.
574
+ * @param {Function} iteratee The function invoked per iteration.
575
+ * @returns {Array|Object|string} Returns `collection`.
576
+ */
577
+ var baseEach = createBaseEach(baseForOwn);
578
+
579
+ module.exports = baseEach;
580
+
581
+
582
+ /***/ },
583
+ /* 4 */
584
+ /***/ function(module, exports, __webpack_require__) {
585
+
586
+ var baseFor = __webpack_require__(5),
587
+ keys = __webpack_require__(9);
588
+
589
+ /**
590
+ * The base implementation of `_.forOwn` without support for callback
591
+ * shorthands and `this` binding.
592
+ *
593
+ * @private
594
+ * @param {Object} object The object to iterate over.
595
+ * @param {Function} iteratee The function invoked per iteration.
596
+ * @returns {Object} Returns `object`.
597
+ */
598
+ function baseForOwn(object, iteratee) {
599
+ return baseFor(object, iteratee, keys);
600
+ }
601
+
602
+ module.exports = baseForOwn;
603
+
604
+
605
+ /***/ },
606
+ /* 5 */
607
+ /***/ function(module, exports, __webpack_require__) {
608
+
609
+ var createBaseFor = __webpack_require__(6);
610
+
611
+ /**
612
+ * The base implementation of `baseForIn` and `baseForOwn` which iterates
613
+ * over `object` properties returned by `keysFunc` invoking `iteratee` for
614
+ * each property. Iteratee functions may exit iteration early by explicitly
615
+ * returning `false`.
616
+ *
617
+ * @private
618
+ * @param {Object} object The object to iterate over.
619
+ * @param {Function} iteratee The function invoked per iteration.
620
+ * @param {Function} keysFunc The function to get the keys of `object`.
621
+ * @returns {Object} Returns `object`.
622
+ */
623
+ var baseFor = createBaseFor();
624
+
625
+ module.exports = baseFor;
626
+
627
+
628
+ /***/ },
629
+ /* 6 */
630
+ /***/ function(module, exports, __webpack_require__) {
631
+
632
+ var toObject = __webpack_require__(7);
633
+
634
+ /**
635
+ * Creates a base function for `_.forIn` or `_.forInRight`.
636
+ *
637
+ * @private
638
+ * @param {boolean} [fromRight] Specify iterating from right to left.
639
+ * @returns {Function} Returns the new base function.
640
+ */
641
+ function createBaseFor(fromRight) {
642
+ return function(object, iteratee, keysFunc) {
643
+ var iterable = toObject(object),
644
+ props = keysFunc(object),
645
+ length = props.length,
646
+ index = fromRight ? length : -1;
647
+
648
+ while ((fromRight ? index-- : ++index < length)) {
649
+ var key = props[index];
650
+ if (iteratee(iterable[key], key, iterable) === false) {
651
+ break;
652
+ }
653
+ }
654
+ return object;
655
+ };
656
+ }
657
+
658
+ module.exports = createBaseFor;
659
+
660
+
661
+ /***/ },
662
+ /* 7 */
663
+ /***/ function(module, exports, __webpack_require__) {
664
+
665
+ var isObject = __webpack_require__(8);
666
+
667
+ /**
668
+ * Converts `value` to an object if it's not one.
669
+ *
670
+ * @private
671
+ * @param {*} value The value to process.
672
+ * @returns {Object} Returns the object.
673
+ */
674
+ function toObject(value) {
675
+ return isObject(value) ? value : Object(value);
676
+ }
677
+
678
+ module.exports = toObject;
679
+
680
+
681
+ /***/ },
682
+ /* 8 */
683
+ /***/ function(module, exports) {
684
+
685
+ /**
686
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
687
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
688
+ *
689
+ * @static
690
+ * @memberOf _
691
+ * @category Lang
692
+ * @param {*} value The value to check.
693
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
694
+ * @example
695
+ *
696
+ * _.isObject({});
697
+ * // => true
698
+ *
699
+ * _.isObject([1, 2, 3]);
700
+ * // => true
701
+ *
702
+ * _.isObject(1);
703
+ * // => false
704
+ */
705
+ function isObject(value) {
706
+ // Avoid a V8 JIT bug in Chrome 19-20.
707
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
708
+ var type = typeof value;
709
+ return !!value && (type == 'object' || type == 'function');
710
+ }
711
+
712
+ module.exports = isObject;
713
+
714
+
715
+ /***/ },
716
+ /* 9 */
717
+ /***/ function(module, exports, __webpack_require__) {
718
+
719
+ var getNative = __webpack_require__(10),
720
+ isArrayLike = __webpack_require__(14),
721
+ isObject = __webpack_require__(8),
722
+ shimKeys = __webpack_require__(18);
723
+
724
+ /* Native method references for those with the same name as other `lodash` methods. */
725
+ var nativeKeys = getNative(Object, 'keys');
726
+
727
+ /**
728
+ * Creates an array of the own enumerable property names of `object`.
729
+ *
730
+ * **Note:** Non-object values are coerced to objects. See the
731
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
732
+ * for more details.
733
+ *
734
+ * @static
735
+ * @memberOf _
736
+ * @category Object
737
+ * @param {Object} object The object to query.
738
+ * @returns {Array} Returns the array of property names.
739
+ * @example
740
+ *
741
+ * function Foo() {
742
+ * this.a = 1;
743
+ * this.b = 2;
744
+ * }
745
+ *
746
+ * Foo.prototype.c = 3;
747
+ *
748
+ * _.keys(new Foo);
749
+ * // => ['a', 'b'] (iteration order is not guaranteed)
750
+ *
751
+ * _.keys('hi');
752
+ * // => ['0', '1']
753
+ */
754
+ var keys = !nativeKeys ? shimKeys : function(object) {
755
+ var Ctor = object == null ? undefined : object.constructor;
756
+ if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
757
+ (typeof object != 'function' && isArrayLike(object))) {
758
+ return shimKeys(object);
759
+ }
760
+ return isObject(object) ? nativeKeys(object) : [];
761
+ };
762
+
763
+ module.exports = keys;
764
+
765
+
766
+ /***/ },
767
+ /* 10 */
768
+ /***/ function(module, exports, __webpack_require__) {
769
+
770
+ var isNative = __webpack_require__(11);
771
+
772
+ /**
773
+ * Gets the native function at `key` of `object`.
774
+ *
775
+ * @private
776
+ * @param {Object} object The object to query.
777
+ * @param {string} key The key of the method to get.
778
+ * @returns {*} Returns the function if it's native, else `undefined`.
779
+ */
780
+ function getNative(object, key) {
781
+ var value = object == null ? undefined : object[key];
782
+ return isNative(value) ? value : undefined;
783
+ }
784
+
785
+ module.exports = getNative;
786
+
787
+
788
+ /***/ },
789
+ /* 11 */
790
+ /***/ function(module, exports, __webpack_require__) {
791
+
792
+ var isFunction = __webpack_require__(12),
793
+ isObjectLike = __webpack_require__(13);
794
+
795
+ /** Used to detect host constructors (Safari > 5). */
796
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
797
+
798
+ /** Used for native method references. */
799
+ var objectProto = Object.prototype;
800
+
801
+ /** Used to resolve the decompiled source of functions. */
802
+ var fnToString = Function.prototype.toString;
803
+
804
+ /** Used to check objects for own properties. */
805
+ var hasOwnProperty = objectProto.hasOwnProperty;
806
+
807
+ /** Used to detect if a method is native. */
808
+ var reIsNative = RegExp('^' +
809
+ fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
810
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
811
+ );
812
+
813
+ /**
814
+ * Checks if `value` is a native function.
815
+ *
816
+ * @static
817
+ * @memberOf _
818
+ * @category Lang
819
+ * @param {*} value The value to check.
820
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
821
+ * @example
822
+ *
823
+ * _.isNative(Array.prototype.push);
824
+ * // => true
825
+ *
826
+ * _.isNative(_);
827
+ * // => false
828
+ */
829
+ function isNative(value) {
830
+ if (value == null) {
831
+ return false;
832
+ }
833
+ if (isFunction(value)) {
834
+ return reIsNative.test(fnToString.call(value));
835
+ }
836
+ return isObjectLike(value) && reIsHostCtor.test(value);
837
+ }
838
+
839
+ module.exports = isNative;
840
+
841
+
842
+ /***/ },
843
+ /* 12 */
844
+ /***/ function(module, exports, __webpack_require__) {
845
+
846
+ var isObject = __webpack_require__(8);
847
+
848
+ /** `Object#toString` result references. */
849
+ var funcTag = '[object Function]';
850
+
851
+ /** Used for native method references. */
852
+ var objectProto = Object.prototype;
853
+
854
+ /**
855
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
856
+ * of values.
857
+ */
858
+ var objToString = objectProto.toString;
859
+
860
+ /**
861
+ * Checks if `value` is classified as a `Function` object.
862
+ *
863
+ * @static
864
+ * @memberOf _
865
+ * @category Lang
866
+ * @param {*} value The value to check.
867
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
868
+ * @example
869
+ *
870
+ * _.isFunction(_);
871
+ * // => true
872
+ *
873
+ * _.isFunction(/abc/);
874
+ * // => false
875
+ */
876
+ function isFunction(value) {
877
+ // The use of `Object#toString` avoids issues with the `typeof` operator
878
+ // in older versions of Chrome and Safari which return 'function' for regexes
879
+ // and Safari 8 equivalents which return 'object' for typed array constructors.
880
+ return isObject(value) && objToString.call(value) == funcTag;
881
+ }
882
+
883
+ module.exports = isFunction;
884
+
885
+
886
+ /***/ },
887
+ /* 13 */
888
+ /***/ function(module, exports) {
889
+
890
+ /**
891
+ * Checks if `value` is object-like.
892
+ *
893
+ * @private
894
+ * @param {*} value The value to check.
895
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
896
+ */
897
+ function isObjectLike(value) {
898
+ return !!value && typeof value == 'object';
899
+ }
900
+
901
+ module.exports = isObjectLike;
902
+
903
+
904
+ /***/ },
905
+ /* 14 */
906
+ /***/ function(module, exports, __webpack_require__) {
907
+
908
+ var getLength = __webpack_require__(15),
909
+ isLength = __webpack_require__(17);
910
+
911
+ /**
912
+ * Checks if `value` is array-like.
913
+ *
914
+ * @private
915
+ * @param {*} value The value to check.
916
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
917
+ */
918
+ function isArrayLike(value) {
919
+ return value != null && isLength(getLength(value));
920
+ }
921
+
922
+ module.exports = isArrayLike;
923
+
924
+
925
+ /***/ },
926
+ /* 15 */
927
+ /***/ function(module, exports, __webpack_require__) {
928
+
929
+ var baseProperty = __webpack_require__(16);
930
+
931
+ /**
932
+ * Gets the "length" property value of `object`.
933
+ *
934
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
935
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
936
+ *
937
+ * @private
938
+ * @param {Object} object The object to query.
939
+ * @returns {*} Returns the "length" value.
940
+ */
941
+ var getLength = baseProperty('length');
942
+
943
+ module.exports = getLength;
944
+
945
+
946
+ /***/ },
947
+ /* 16 */
948
+ /***/ function(module, exports) {
949
+
950
+ /**
951
+ * The base implementation of `_.property` without support for deep paths.
952
+ *
953
+ * @private
954
+ * @param {string} key The key of the property to get.
955
+ * @returns {Function} Returns the new function.
956
+ */
957
+ function baseProperty(key) {
958
+ return function(object) {
959
+ return object == null ? undefined : object[key];
960
+ };
961
+ }
962
+
963
+ module.exports = baseProperty;
964
+
965
+
966
+ /***/ },
967
+ /* 17 */
968
+ /***/ function(module, exports) {
969
+
970
+ /**
971
+ * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
972
+ * of an array-like value.
973
+ */
974
+ var MAX_SAFE_INTEGER = 9007199254740991;
975
+
976
+ /**
977
+ * Checks if `value` is a valid array-like length.
978
+ *
979
+ * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
980
+ *
981
+ * @private
982
+ * @param {*} value The value to check.
983
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
984
+ */
985
+ function isLength(value) {
986
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
987
+ }
988
+
989
+ module.exports = isLength;
990
+
991
+
992
+ /***/ },
993
+ /* 18 */
994
+ /***/ function(module, exports, __webpack_require__) {
995
+
996
+ var isArguments = __webpack_require__(19),
997
+ isArray = __webpack_require__(20),
998
+ isIndex = __webpack_require__(21),
999
+ isLength = __webpack_require__(17),
1000
+ keysIn = __webpack_require__(22);
1001
+
1002
+ /** Used for native method references. */
1003
+ var objectProto = Object.prototype;
1004
+
1005
+ /** Used to check objects for own properties. */
1006
+ var hasOwnProperty = objectProto.hasOwnProperty;
1007
+
1008
+ /**
1009
+ * A fallback implementation of `Object.keys` which creates an array of the
1010
+ * own enumerable property names of `object`.
1011
+ *
1012
+ * @private
1013
+ * @param {Object} object The object to query.
1014
+ * @returns {Array} Returns the array of property names.
1015
+ */
1016
+ function shimKeys(object) {
1017
+ var props = keysIn(object),
1018
+ propsLength = props.length,
1019
+ length = propsLength && object.length;
1020
+
1021
+ var allowIndexes = !!length && isLength(length) &&
1022
+ (isArray(object) || isArguments(object));
1023
+
1024
+ var index = -1,
1025
+ result = [];
1026
+
1027
+ while (++index < propsLength) {
1028
+ var key = props[index];
1029
+ if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
1030
+ result.push(key);
1031
+ }
1032
+ }
1033
+ return result;
1034
+ }
1035
+
1036
+ module.exports = shimKeys;
1037
+
1038
+
1039
+ /***/ },
1040
+ /* 19 */
1041
+ /***/ function(module, exports, __webpack_require__) {
1042
+
1043
+ var isArrayLike = __webpack_require__(14),
1044
+ isObjectLike = __webpack_require__(13);
1045
+
1046
+ /** Used for native method references. */
1047
+ var objectProto = Object.prototype;
1048
+
1049
+ /** Used to check objects for own properties. */
1050
+ var hasOwnProperty = objectProto.hasOwnProperty;
1051
+
1052
+ /** Native method references. */
1053
+ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
1054
+
1055
+ /**
1056
+ * Checks if `value` is classified as an `arguments` object.
1057
+ *
1058
+ * @static
1059
+ * @memberOf _
1060
+ * @category Lang
1061
+ * @param {*} value The value to check.
1062
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
1063
+ * @example
1064
+ *
1065
+ * _.isArguments(function() { return arguments; }());
1066
+ * // => true
1067
+ *
1068
+ * _.isArguments([1, 2, 3]);
1069
+ * // => false
1070
+ */
1071
+ function isArguments(value) {
1072
+ return isObjectLike(value) && isArrayLike(value) &&
1073
+ hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
1074
+ }
1075
+
1076
+ module.exports = isArguments;
1077
+
1078
+
1079
+ /***/ },
1080
+ /* 20 */
1081
+ /***/ function(module, exports, __webpack_require__) {
1082
+
1083
+ var getNative = __webpack_require__(10),
1084
+ isLength = __webpack_require__(17),
1085
+ isObjectLike = __webpack_require__(13);
1086
+
1087
+ /** `Object#toString` result references. */
1088
+ var arrayTag = '[object Array]';
1089
+
1090
+ /** Used for native method references. */
1091
+ var objectProto = Object.prototype;
1092
+
1093
+ /**
1094
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
1095
+ * of values.
1096
+ */
1097
+ var objToString = objectProto.toString;
1098
+
1099
+ /* Native method references for those with the same name as other `lodash` methods. */
1100
+ var nativeIsArray = getNative(Array, 'isArray');
1101
+
1102
+ /**
1103
+ * Checks if `value` is classified as an `Array` object.
1104
+ *
1105
+ * @static
1106
+ * @memberOf _
1107
+ * @category Lang
1108
+ * @param {*} value The value to check.
1109
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
1110
+ * @example
1111
+ *
1112
+ * _.isArray([1, 2, 3]);
1113
+ * // => true
1114
+ *
1115
+ * _.isArray(function() { return arguments; }());
1116
+ * // => false
1117
+ */
1118
+ var isArray = nativeIsArray || function(value) {
1119
+ return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
1120
+ };
1121
+
1122
+ module.exports = isArray;
1123
+
1124
+
1125
+ /***/ },
1126
+ /* 21 */
1127
+ /***/ function(module, exports) {
1128
+
1129
+ /** Used to detect unsigned integer values. */
1130
+ var reIsUint = /^\d+$/;
1131
+
1132
+ /**
1133
+ * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
1134
+ * of an array-like value.
1135
+ */
1136
+ var MAX_SAFE_INTEGER = 9007199254740991;
1137
+
1138
+ /**
1139
+ * Checks if `value` is a valid array-like index.
1140
+ *
1141
+ * @private
1142
+ * @param {*} value The value to check.
1143
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1144
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1145
+ */
1146
+ function isIndex(value, length) {
1147
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
1148
+ length = length == null ? MAX_SAFE_INTEGER : length;
1149
+ return value > -1 && value % 1 == 0 && value < length;
1150
+ }
1151
+
1152
+ module.exports = isIndex;
1153
+
1154
+
1155
+ /***/ },
1156
+ /* 22 */
1157
+ /***/ function(module, exports, __webpack_require__) {
1158
+
1159
+ var isArguments = __webpack_require__(19),
1160
+ isArray = __webpack_require__(20),
1161
+ isIndex = __webpack_require__(21),
1162
+ isLength = __webpack_require__(17),
1163
+ isObject = __webpack_require__(8);
1164
+
1165
+ /** Used for native method references. */
1166
+ var objectProto = Object.prototype;
1167
+
1168
+ /** Used to check objects for own properties. */
1169
+ var hasOwnProperty = objectProto.hasOwnProperty;
1170
+
1171
+ /**
1172
+ * Creates an array of the own and inherited enumerable property names of `object`.
1173
+ *
1174
+ * **Note:** Non-object values are coerced to objects.
1175
+ *
1176
+ * @static
1177
+ * @memberOf _
1178
+ * @category Object
1179
+ * @param {Object} object The object to query.
1180
+ * @returns {Array} Returns the array of property names.
1181
+ * @example
1182
+ *
1183
+ * function Foo() {
1184
+ * this.a = 1;
1185
+ * this.b = 2;
1186
+ * }
1187
+ *
1188
+ * Foo.prototype.c = 3;
1189
+ *
1190
+ * _.keysIn(new Foo);
1191
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
1192
+ */
1193
+ function keysIn(object) {
1194
+ if (object == null) {
1195
+ return [];
1196
+ }
1197
+ if (!isObject(object)) {
1198
+ object = Object(object);
1199
+ }
1200
+ var length = object.length;
1201
+ length = (length && isLength(length) &&
1202
+ (isArray(object) || isArguments(object)) && length) || 0;
1203
+
1204
+ var Ctor = object.constructor,
1205
+ index = -1,
1206
+ isProto = typeof Ctor == 'function' && Ctor.prototype === object,
1207
+ result = Array(length),
1208
+ skipIndexes = length > 0;
1209
+
1210
+ while (++index < length) {
1211
+ result[index] = (index + '');
1212
+ }
1213
+ for (var key in object) {
1214
+ if (!(skipIndexes && isIndex(key, length)) &&
1215
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
1216
+ result.push(key);
1217
+ }
1218
+ }
1219
+ return result;
1220
+ }
1221
+
1222
+ module.exports = keysIn;
1223
+
1224
+
1225
+ /***/ },
1226
+ /* 23 */
1227
+ /***/ function(module, exports, __webpack_require__) {
1228
+
1229
+ var getLength = __webpack_require__(15),
1230
+ isLength = __webpack_require__(17),
1231
+ toObject = __webpack_require__(7);
1232
+
1233
+ /**
1234
+ * Creates a `baseEach` or `baseEachRight` function.
1235
+ *
1236
+ * @private
1237
+ * @param {Function} eachFunc The function to iterate over a collection.
1238
+ * @param {boolean} [fromRight] Specify iterating from right to left.
1239
+ * @returns {Function} Returns the new base function.
1240
+ */
1241
+ function createBaseEach(eachFunc, fromRight) {
1242
+ return function(collection, iteratee) {
1243
+ var length = collection ? getLength(collection) : 0;
1244
+ if (!isLength(length)) {
1245
+ return eachFunc(collection, iteratee);
1246
+ }
1247
+ var index = fromRight ? length : -1,
1248
+ iterable = toObject(collection);
1249
+
1250
+ while ((fromRight ? index-- : ++index < length)) {
1251
+ if (iteratee(iterable[index], index, iterable) === false) {
1252
+ break;
1253
+ }
1254
+ }
1255
+ return collection;
1256
+ };
1257
+ }
1258
+
1259
+ module.exports = createBaseEach;
1260
+
1261
+
1262
+ /***/ },
1263
+ /* 24 */
1264
+ /***/ function(module, exports, __webpack_require__) {
1265
+
1266
+ var bindCallback = __webpack_require__(25),
1267
+ isArray = __webpack_require__(20);
1268
+
1269
+ /**
1270
+ * Creates a function for `_.forEach` or `_.forEachRight`.
1271
+ *
1272
+ * @private
1273
+ * @param {Function} arrayFunc The function to iterate over an array.
1274
+ * @param {Function} eachFunc The function to iterate over a collection.
1275
+ * @returns {Function} Returns the new each function.
1276
+ */
1277
+ function createForEach(arrayFunc, eachFunc) {
1278
+ return function(collection, iteratee, thisArg) {
1279
+ return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
1280
+ ? arrayFunc(collection, iteratee)
1281
+ : eachFunc(collection, bindCallback(iteratee, thisArg, 3));
1282
+ };
1283
+ }
1284
+
1285
+ module.exports = createForEach;
1286
+
1287
+
1288
+ /***/ },
1289
+ /* 25 */
1290
+ /***/ function(module, exports, __webpack_require__) {
1291
+
1292
+ var identity = __webpack_require__(26);
1293
+
1294
+ /**
1295
+ * A specialized version of `baseCallback` which only supports `this` binding
1296
+ * and specifying the number of arguments to provide to `func`.
1297
+ *
1298
+ * @private
1299
+ * @param {Function} func The function to bind.
1300
+ * @param {*} thisArg The `this` binding of `func`.
1301
+ * @param {number} [argCount] The number of arguments to provide to `func`.
1302
+ * @returns {Function} Returns the callback.
1303
+ */
1304
+ function bindCallback(func, thisArg, argCount) {
1305
+ if (typeof func != 'function') {
1306
+ return identity;
1307
+ }
1308
+ if (thisArg === undefined) {
1309
+ return func;
1310
+ }
1311
+ switch (argCount) {
1312
+ case 1: return function(value) {
1313
+ return func.call(thisArg, value);
1314
+ };
1315
+ case 3: return function(value, index, collection) {
1316
+ return func.call(thisArg, value, index, collection);
1317
+ };
1318
+ case 4: return function(accumulator, value, index, collection) {
1319
+ return func.call(thisArg, accumulator, value, index, collection);
1320
+ };
1321
+ case 5: return function(value, other, key, object, source) {
1322
+ return func.call(thisArg, value, other, key, object, source);
1323
+ };
1324
+ }
1325
+ return function() {
1326
+ return func.apply(thisArg, arguments);
1327
+ };
1328
+ }
1329
+
1330
+ module.exports = bindCallback;
1331
+
1332
+
1333
+ /***/ },
1334
+ /* 26 */
1335
+ /***/ function(module, exports) {
1336
+
1337
+ /**
1338
+ * This method returns the first argument provided to it.
1339
+ *
1340
+ * @static
1341
+ * @memberOf _
1342
+ * @category Utility
1343
+ * @param {*} value Any value.
1344
+ * @returns {*} Returns `value`.
1345
+ * @example
1346
+ *
1347
+ * var object = { 'user': 'fred' };
1348
+ *
1349
+ * _.identity(object) === object;
1350
+ * // => true
1351
+ */
1352
+ function identity(value) {
1353
+ return value;
1354
+ }
1355
+
1356
+ module.exports = identity;
1357
+
1358
+
1359
+ /***/ },
1360
+ /* 27 */
1361
+ /***/ function(module, exports, __webpack_require__) {
1362
+
1363
+ 'use strict';
1364
+
1365
+ Object.defineProperty(exports, '__esModule', {
1366
+ value: true
1367
+ });
1368
+
1369
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
1370
+
1371
+ var _mixer = __webpack_require__(28);
1372
+
1373
+ var _mixer2 = _interopRequireDefault(_mixer);
1374
+
1375
+ var _lodashLangIsFunction = __webpack_require__(12);
1376
+
1377
+ var _lodashLangIsFunction2 = _interopRequireDefault(_lodashLangIsFunction);
1378
+
1379
+ var isNotFunction = function isNotFunction(val) {
1380
+ return !(0, _lodashLangIsFunction2['default'])(val);
1381
+ };
1382
+
1383
+ /**
1384
+ * Regular mixin function.
1385
+ */
1386
+ var mixin = (0, _mixer2['default'])();
1387
+
1388
+ /**
1389
+ * Mixin functions only.
1390
+ */
1391
+ var mixinFunctions = (0, _mixer2['default'])({
1392
+ filter: _lodashLangIsFunction2['default']
1393
+ });
1394
+
1395
+ /**
1396
+ * Mixin functions including prototype chain.
1397
+ */
1398
+ var mixinChainFunctions = (0, _mixer2['default'])({
1399
+ filter: _lodashLangIsFunction2['default'],
1400
+ chain: true
1401
+ });
1402
+
1403
+ /**
1404
+ * Regular object merge function. Ignores functions.
1405
+ */
1406
+ var merge = (0, _mixer2['default'])({
1407
+ deep: true
1408
+ });
1409
+
1410
+ /**
1411
+ * Regular object merge function. Ignores functions.
1412
+ */
1413
+ var mergeUnique = (0, _mixer2['default'])({
1414
+ deep: true,
1415
+ noOverwrite: true
1416
+ });
1417
+
1418
+ /**
1419
+ * Merge objects including prototype chain properties.
1420
+ */
1421
+ var mergeChainNonFunctions = (0, _mixer2['default'])({
1422
+ filter: isNotFunction,
1423
+ deep: true,
1424
+ chain: true
1425
+ });
1426
+
1427
+ exports['default'] = _mixer2['default'];
1428
+ exports.mixin = mixin;
1429
+ exports.mixinFunctions = mixinFunctions;
1430
+ exports.mixinChainFunctions = mixinChainFunctions;
1431
+ exports.merge = merge;
1432
+ exports.mergeUnique = mergeUnique;
1433
+ exports.mergeChainNonFunctions = mergeChainNonFunctions;
1434
+
1435
+ /***/ },
1436
+ /* 28 */
1437
+ /***/ function(module, exports, __webpack_require__) {
1438
+
1439
+ 'use strict';
1440
+
1441
+ Object.defineProperty(exports, '__esModule', {
1442
+ value: true
1443
+ });
1444
+ exports['default'] = mixer;
1445
+
1446
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
1447
+
1448
+ var _lodashObjectForOwn = __webpack_require__(29);
1449
+
1450
+ var _lodashObjectForOwn2 = _interopRequireDefault(_lodashObjectForOwn);
1451
+
1452
+ var _lodashObjectForIn = __webpack_require__(31);
1453
+
1454
+ var _lodashObjectForIn2 = _interopRequireDefault(_lodashObjectForIn);
1455
+
1456
+ var _lodashLangCloneDeep = __webpack_require__(33);
1457
+
1458
+ var _lodashLangCloneDeep2 = _interopRequireDefault(_lodashLangCloneDeep);
1459
+
1460
+ var _lodashLangIsObject = __webpack_require__(8);
1461
+
1462
+ var _lodashLangIsObject2 = _interopRequireDefault(_lodashLangIsObject);
1463
+
1464
+ var _lodashLangIsUndefined = __webpack_require__(42);
1465
+
1466
+ var _lodashLangIsUndefined2 = _interopRequireDefault(_lodashLangIsUndefined);
1467
+
1468
+ /**
1469
+ * Factory for creating mixin functions of all kinds.
1470
+ *
1471
+ * @param {Object} opts
1472
+ * @param {Function} opts.filter Function which filters value and key.
1473
+ * @param {Function} opts.transform Function which transforms each value.
1474
+ * @param {Boolean} opts.chain Loop through prototype properties too.
1475
+ * @param {Boolean} opts.deep Deep looping through the nested properties.
1476
+ * @param {Boolean} opts.noOverwrite Do not overwrite any existing data (aka first one wins).
1477
+ * @return {Function} A new mix function.
1478
+ */
1479
+
1480
+ function mixer() {
1481
+ var opts = arguments[0] === undefined ? {} : arguments[0];
1482
+
1483
+ // We will be recursively calling the exact same function when walking deeper.
1484
+ if (opts.deep && !opts._innerMixer) {
1485
+ opts._innerMixer = true; // avoiding infinite recursion.
1486
+ opts._innerMixer = mixer(opts); // create same mixer for recursion purpose.
1487
+ }
1488
+
1489
+ /**
1490
+ * Combine properties from the passed objects into target. This method mutates target,
1491
+ * if you want to create a new Object pass an empty object as first param.
1492
+ *
1493
+ * @param {Object} target Target Object
1494
+ * @param {...Object} objects Objects to be combined (0...n objects).
1495
+ * @return {Object} The mixed object.
1496
+ */
1497
+ return function mix(target) {
1498
+ for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1499
+ sources[_key - 1] = arguments[_key];
1500
+ }
1501
+
1502
+ // Check if it's us who called the function. See recursion calls are below.
1503
+ if ((0, _lodashLangIsUndefined2['default'])(target) || !opts.noOverwrite && !(0, _lodashLangIsObject2['default'])(target)) {
1504
+ if (sources.length > 1) {
1505
+ // Weird, but someone (not us!) called this mixer with an incorrect first argument.
1506
+ return opts._innerMixer.apply(opts, [{}].concat(sources));
1507
+ }
1508
+ return (0, _lodashLangCloneDeep2['default'])(sources[0]);
1509
+ }
1510
+
1511
+ if (opts.noOverwrite) {
1512
+ if (!(0, _lodashLangIsObject2['default'])(target) || !(0, _lodashLangIsObject2['default'])(sources[0])) {
1513
+ return target;
1514
+ }
1515
+ }
1516
+
1517
+ function iteratee(sourceValue, key) {
1518
+ var targetValue = target[key];
1519
+ if (opts.filter && !opts.filter(sourceValue, targetValue, key)) {
1520
+ return;
1521
+ }
1522
+
1523
+ var result = opts.deep ? opts._innerMixer(targetValue, sourceValue) : sourceValue;
1524
+ target[key] = opts.transform ? opts.transform(result, targetValue, key) : result;
1525
+ }
1526
+
1527
+ var loop = opts.chain ? _lodashObjectForIn2['default'] : _lodashObjectForOwn2['default'];
1528
+ sources.forEach(function (obj) {
1529
+ loop(obj, iteratee);
1530
+ });
1531
+
1532
+ return target;
1533
+ };
1534
+ }
1535
+
1536
+ module.exports = exports['default'];
1537
+
1538
+ /***/ },
1539
+ /* 29 */
1540
+ /***/ function(module, exports, __webpack_require__) {
1541
+
1542
+ var baseForOwn = __webpack_require__(4),
1543
+ createForOwn = __webpack_require__(30);
1544
+
1545
+ /**
1546
+ * Iterates over own enumerable properties of an object invoking `iteratee`
1547
+ * for each property. The `iteratee` is bound to `thisArg` and invoked with
1548
+ * three arguments: (value, key, object). Iteratee functions may exit iteration
1549
+ * early by explicitly returning `false`.
1550
+ *
1551
+ * @static
1552
+ * @memberOf _
1553
+ * @category Object
1554
+ * @param {Object} object The object to iterate over.
1555
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
1556
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
1557
+ * @returns {Object} Returns `object`.
1558
+ * @example
1559
+ *
1560
+ * function Foo() {
1561
+ * this.a = 1;
1562
+ * this.b = 2;
1563
+ * }
1564
+ *
1565
+ * Foo.prototype.c = 3;
1566
+ *
1567
+ * _.forOwn(new Foo, function(value, key) {
1568
+ * console.log(key);
1569
+ * });
1570
+ * // => logs 'a' and 'b' (iteration order is not guaranteed)
1571
+ */
1572
+ var forOwn = createForOwn(baseForOwn);
1573
+
1574
+ module.exports = forOwn;
1575
+
1576
+
1577
+ /***/ },
1578
+ /* 30 */
1579
+ /***/ function(module, exports, __webpack_require__) {
1580
+
1581
+ var bindCallback = __webpack_require__(25);
1582
+
1583
+ /**
1584
+ * Creates a function for `_.forOwn` or `_.forOwnRight`.
1585
+ *
1586
+ * @private
1587
+ * @param {Function} objectFunc The function to iterate over an object.
1588
+ * @returns {Function} Returns the new each function.
1589
+ */
1590
+ function createForOwn(objectFunc) {
1591
+ return function(object, iteratee, thisArg) {
1592
+ if (typeof iteratee != 'function' || thisArg !== undefined) {
1593
+ iteratee = bindCallback(iteratee, thisArg, 3);
1594
+ }
1595
+ return objectFunc(object, iteratee);
1596
+ };
1597
+ }
1598
+
1599
+ module.exports = createForOwn;
1600
+
1601
+
1602
+ /***/ },
1603
+ /* 31 */
1604
+ /***/ function(module, exports, __webpack_require__) {
1605
+
1606
+ var baseFor = __webpack_require__(5),
1607
+ createForIn = __webpack_require__(32);
1608
+
1609
+ /**
1610
+ * Iterates over own and inherited enumerable properties of an object invoking
1611
+ * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked
1612
+ * with three arguments: (value, key, object). Iteratee functions may exit
1613
+ * iteration early by explicitly returning `false`.
1614
+ *
1615
+ * @static
1616
+ * @memberOf _
1617
+ * @category Object
1618
+ * @param {Object} object The object to iterate over.
1619
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
1620
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
1621
+ * @returns {Object} Returns `object`.
1622
+ * @example
1623
+ *
1624
+ * function Foo() {
1625
+ * this.a = 1;
1626
+ * this.b = 2;
1627
+ * }
1628
+ *
1629
+ * Foo.prototype.c = 3;
1630
+ *
1631
+ * _.forIn(new Foo, function(value, key) {
1632
+ * console.log(key);
1633
+ * });
1634
+ * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed)
1635
+ */
1636
+ var forIn = createForIn(baseFor);
1637
+
1638
+ module.exports = forIn;
1639
+
1640
+
1641
+ /***/ },
1642
+ /* 32 */
1643
+ /***/ function(module, exports, __webpack_require__) {
1644
+
1645
+ var bindCallback = __webpack_require__(25),
1646
+ keysIn = __webpack_require__(22);
1647
+
1648
+ /**
1649
+ * Creates a function for `_.forIn` or `_.forInRight`.
1650
+ *
1651
+ * @private
1652
+ * @param {Function} objectFunc The function to iterate over an object.
1653
+ * @returns {Function} Returns the new each function.
1654
+ */
1655
+ function createForIn(objectFunc) {
1656
+ return function(object, iteratee, thisArg) {
1657
+ if (typeof iteratee != 'function' || thisArg !== undefined) {
1658
+ iteratee = bindCallback(iteratee, thisArg, 3);
1659
+ }
1660
+ return objectFunc(object, iteratee, keysIn);
1661
+ };
1662
+ }
1663
+
1664
+ module.exports = createForIn;
1665
+
1666
+
1667
+ /***/ },
1668
+ /* 33 */
1669
+ /***/ function(module, exports, __webpack_require__) {
1670
+
1671
+ var baseClone = __webpack_require__(34),
1672
+ bindCallback = __webpack_require__(25);
1673
+
1674
+ /**
1675
+ * Creates a deep clone of `value`. If `customizer` is provided it is invoked
1676
+ * to produce the cloned values. If `customizer` returns `undefined` cloning
1677
+ * is handled by the method instead. The `customizer` is bound to `thisArg`
1678
+ * and invoked with two argument; (value [, index|key, object]).
1679
+ *
1680
+ * **Note:** This method is loosely based on the
1681
+ * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
1682
+ * The enumerable properties of `arguments` objects and objects created by
1683
+ * constructors other than `Object` are cloned to plain `Object` objects. An
1684
+ * empty object is returned for uncloneable values such as functions, DOM nodes,
1685
+ * Maps, Sets, and WeakMaps.
1686
+ *
1687
+ * @static
1688
+ * @memberOf _
1689
+ * @category Lang
1690
+ * @param {*} value The value to deep clone.
1691
+ * @param {Function} [customizer] The function to customize cloning values.
1692
+ * @param {*} [thisArg] The `this` binding of `customizer`.
1693
+ * @returns {*} Returns the deep cloned value.
1694
+ * @example
1695
+ *
1696
+ * var users = [
1697
+ * { 'user': 'barney' },
1698
+ * { 'user': 'fred' }
1699
+ * ];
1700
+ *
1701
+ * var deep = _.cloneDeep(users);
1702
+ * deep[0] === users[0];
1703
+ * // => false
1704
+ *
1705
+ * // using a customizer callback
1706
+ * var el = _.cloneDeep(document.body, function(value) {
1707
+ * if (_.isElement(value)) {
1708
+ * return value.cloneNode(true);
1709
+ * }
1710
+ * });
1711
+ *
1712
+ * el === document.body
1713
+ * // => false
1714
+ * el.nodeName
1715
+ * // => BODY
1716
+ * el.childNodes.length;
1717
+ * // => 20
1718
+ */
1719
+ function cloneDeep(value, customizer, thisArg) {
1720
+ return typeof customizer == 'function'
1721
+ ? baseClone(value, true, bindCallback(customizer, thisArg, 1))
1722
+ : baseClone(value, true);
1723
+ }
1724
+
1725
+ module.exports = cloneDeep;
1726
+
1727
+
1728
+ /***/ },
1729
+ /* 34 */
1730
+ /***/ function(module, exports, __webpack_require__) {
1731
+
1732
+ var arrayCopy = __webpack_require__(35),
1733
+ arrayEach = __webpack_require__(2),
1734
+ baseAssign = __webpack_require__(36),
1735
+ baseForOwn = __webpack_require__(4),
1736
+ initCloneArray = __webpack_require__(38),
1737
+ initCloneByTag = __webpack_require__(39),
1738
+ initCloneObject = __webpack_require__(41),
1739
+ isArray = __webpack_require__(20),
1740
+ isObject = __webpack_require__(8);
1741
+
1742
+ /** `Object#toString` result references. */
1743
+ var argsTag = '[object Arguments]',
1744
+ arrayTag = '[object Array]',
1745
+ boolTag = '[object Boolean]',
1746
+ dateTag = '[object Date]',
1747
+ errorTag = '[object Error]',
1748
+ funcTag = '[object Function]',
1749
+ mapTag = '[object Map]',
1750
+ numberTag = '[object Number]',
1751
+ objectTag = '[object Object]',
1752
+ regexpTag = '[object RegExp]',
1753
+ setTag = '[object Set]',
1754
+ stringTag = '[object String]',
1755
+ weakMapTag = '[object WeakMap]';
1756
+
1757
+ var arrayBufferTag = '[object ArrayBuffer]',
1758
+ float32Tag = '[object Float32Array]',
1759
+ float64Tag = '[object Float64Array]',
1760
+ int8Tag = '[object Int8Array]',
1761
+ int16Tag = '[object Int16Array]',
1762
+ int32Tag = '[object Int32Array]',
1763
+ uint8Tag = '[object Uint8Array]',
1764
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1765
+ uint16Tag = '[object Uint16Array]',
1766
+ uint32Tag = '[object Uint32Array]';
1767
+
1768
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
1769
+ var cloneableTags = {};
1770
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
1771
+ cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
1772
+ cloneableTags[dateTag] = cloneableTags[float32Tag] =
1773
+ cloneableTags[float64Tag] = cloneableTags[int8Tag] =
1774
+ cloneableTags[int16Tag] = cloneableTags[int32Tag] =
1775
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
1776
+ cloneableTags[regexpTag] = cloneableTags[stringTag] =
1777
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
1778
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
1779
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
1780
+ cloneableTags[mapTag] = cloneableTags[setTag] =
1781
+ cloneableTags[weakMapTag] = false;
1782
+
1783
+ /** Used for native method references. */
1784
+ var objectProto = Object.prototype;
1785
+
1786
+ /**
1787
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
1788
+ * of values.
1789
+ */
1790
+ var objToString = objectProto.toString;
1791
+
1792
+ /**
1793
+ * The base implementation of `_.clone` without support for argument juggling
1794
+ * and `this` binding `customizer` functions.
1795
+ *
1796
+ * @private
1797
+ * @param {*} value The value to clone.
1798
+ * @param {boolean} [isDeep] Specify a deep clone.
1799
+ * @param {Function} [customizer] The function to customize cloning values.
1800
+ * @param {string} [key] The key of `value`.
1801
+ * @param {Object} [object] The object `value` belongs to.
1802
+ * @param {Array} [stackA=[]] Tracks traversed source objects.
1803
+ * @param {Array} [stackB=[]] Associates clones with source counterparts.
1804
+ * @returns {*} Returns the cloned value.
1805
+ */
1806
+ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
1807
+ var result;
1808
+ if (customizer) {
1809
+ result = object ? customizer(value, key, object) : customizer(value);
1810
+ }
1811
+ if (result !== undefined) {
1812
+ return result;
1813
+ }
1814
+ if (!isObject(value)) {
1815
+ return value;
1816
+ }
1817
+ var isArr = isArray(value);
1818
+ if (isArr) {
1819
+ result = initCloneArray(value);
1820
+ if (!isDeep) {
1821
+ return arrayCopy(value, result);
1822
+ }
1823
+ } else {
1824
+ var tag = objToString.call(value),
1825
+ isFunc = tag == funcTag;
1826
+
1827
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
1828
+ result = initCloneObject(isFunc ? {} : value);
1829
+ if (!isDeep) {
1830
+ return baseAssign(result, value);
1831
+ }
1832
+ } else {
1833
+ return cloneableTags[tag]
1834
+ ? initCloneByTag(value, tag, isDeep)
1835
+ : (object ? value : {});
1836
+ }
1837
+ }
1838
+ // Check for circular references and return its corresponding clone.
1839
+ stackA || (stackA = []);
1840
+ stackB || (stackB = []);
1841
+
1842
+ var length = stackA.length;
1843
+ while (length--) {
1844
+ if (stackA[length] == value) {
1845
+ return stackB[length];
1846
+ }
1847
+ }
1848
+ // Add the source value to the stack of traversed objects and associate it with its clone.
1849
+ stackA.push(value);
1850
+ stackB.push(result);
1851
+
1852
+ // Recursively populate clone (susceptible to call stack limits).
1853
+ (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
1854
+ result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);
1855
+ });
1856
+ return result;
1857
+ }
1858
+
1859
+ module.exports = baseClone;
1860
+
1861
+
1862
+ /***/ },
1863
+ /* 35 */
1864
+ /***/ function(module, exports) {
1865
+
1866
+ /**
1867
+ * Copies the values of `source` to `array`.
1868
+ *
1869
+ * @private
1870
+ * @param {Array} source The array to copy values from.
1871
+ * @param {Array} [array=[]] The array to copy values to.
1872
+ * @returns {Array} Returns `array`.
1873
+ */
1874
+ function arrayCopy(source, array) {
1875
+ var index = -1,
1876
+ length = source.length;
1877
+
1878
+ array || (array = Array(length));
1879
+ while (++index < length) {
1880
+ array[index] = source[index];
1881
+ }
1882
+ return array;
1883
+ }
1884
+
1885
+ module.exports = arrayCopy;
1886
+
1887
+
1888
+ /***/ },
1889
+ /* 36 */
1890
+ /***/ function(module, exports, __webpack_require__) {
1891
+
1892
+ var baseCopy = __webpack_require__(37),
1893
+ keys = __webpack_require__(9);
1894
+
1895
+ /**
1896
+ * The base implementation of `_.assign` without support for argument juggling,
1897
+ * multiple sources, and `customizer` functions.
1898
+ *
1899
+ * @private
1900
+ * @param {Object} object The destination object.
1901
+ * @param {Object} source The source object.
1902
+ * @returns {Object} Returns `object`.
1903
+ */
1904
+ function baseAssign(object, source) {
1905
+ return source == null
1906
+ ? object
1907
+ : baseCopy(source, keys(source), object);
1908
+ }
1909
+
1910
+ module.exports = baseAssign;
1911
+
1912
+
1913
+ /***/ },
1914
+ /* 37 */
1915
+ /***/ function(module, exports) {
1916
+
1917
+ /**
1918
+ * Copies properties of `source` to `object`.
1919
+ *
1920
+ * @private
1921
+ * @param {Object} source The object to copy properties from.
1922
+ * @param {Array} props The property names to copy.
1923
+ * @param {Object} [object={}] The object to copy properties to.
1924
+ * @returns {Object} Returns `object`.
1925
+ */
1926
+ function baseCopy(source, props, object) {
1927
+ object || (object = {});
1928
+
1929
+ var index = -1,
1930
+ length = props.length;
1931
+
1932
+ while (++index < length) {
1933
+ var key = props[index];
1934
+ object[key] = source[key];
1935
+ }
1936
+ return object;
1937
+ }
1938
+
1939
+ module.exports = baseCopy;
1940
+
1941
+
1942
+ /***/ },
1943
+ /* 38 */
1944
+ /***/ function(module, exports) {
1945
+
1946
+ /** Used for native method references. */
1947
+ var objectProto = Object.prototype;
1948
+
1949
+ /** Used to check objects for own properties. */
1950
+ var hasOwnProperty = objectProto.hasOwnProperty;
1951
+
1952
+ /**
1953
+ * Initializes an array clone.
1954
+ *
1955
+ * @private
1956
+ * @param {Array} array The array to clone.
1957
+ * @returns {Array} Returns the initialized clone.
1958
+ */
1959
+ function initCloneArray(array) {
1960
+ var length = array.length,
1961
+ result = new array.constructor(length);
1962
+
1963
+ // Add array properties assigned by `RegExp#exec`.
1964
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
1965
+ result.index = array.index;
1966
+ result.input = array.input;
1967
+ }
1968
+ return result;
1969
+ }
1970
+
1971
+ module.exports = initCloneArray;
1972
+
1973
+
1974
+ /***/ },
1975
+ /* 39 */
1976
+ /***/ function(module, exports, __webpack_require__) {
1977
+
1978
+ var bufferClone = __webpack_require__(40);
1979
+
1980
+ /** `Object#toString` result references. */
1981
+ var boolTag = '[object Boolean]',
1982
+ dateTag = '[object Date]',
1983
+ numberTag = '[object Number]',
1984
+ regexpTag = '[object RegExp]',
1985
+ stringTag = '[object String]';
1986
+
1987
+ var arrayBufferTag = '[object ArrayBuffer]',
1988
+ float32Tag = '[object Float32Array]',
1989
+ float64Tag = '[object Float64Array]',
1990
+ int8Tag = '[object Int8Array]',
1991
+ int16Tag = '[object Int16Array]',
1992
+ int32Tag = '[object Int32Array]',
1993
+ uint8Tag = '[object Uint8Array]',
1994
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1995
+ uint16Tag = '[object Uint16Array]',
1996
+ uint32Tag = '[object Uint32Array]';
1997
+
1998
+ /** Used to match `RegExp` flags from their coerced string values. */
1999
+ var reFlags = /\w*$/;
2000
+
2001
+ /**
2002
+ * Initializes an object clone based on its `toStringTag`.
2003
+ *
2004
+ * **Note:** This function only supports cloning values with tags of
2005
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
2006
+ *
2007
+ * @private
2008
+ * @param {Object} object The object to clone.
2009
+ * @param {string} tag The `toStringTag` of the object to clone.
2010
+ * @param {boolean} [isDeep] Specify a deep clone.
2011
+ * @returns {Object} Returns the initialized clone.
2012
+ */
2013
+ function initCloneByTag(object, tag, isDeep) {
2014
+ var Ctor = object.constructor;
2015
+ switch (tag) {
2016
+ case arrayBufferTag:
2017
+ return bufferClone(object);
2018
+
2019
+ case boolTag:
2020
+ case dateTag:
2021
+ return new Ctor(+object);
2022
+
2023
+ case float32Tag: case float64Tag:
2024
+ case int8Tag: case int16Tag: case int32Tag:
2025
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
2026
+ var buffer = object.buffer;
2027
+ return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);
2028
+
2029
+ case numberTag:
2030
+ case stringTag:
2031
+ return new Ctor(object);
2032
+
2033
+ case regexpTag:
2034
+ var result = new Ctor(object.source, reFlags.exec(object));
2035
+ result.lastIndex = object.lastIndex;
2036
+ }
2037
+ return result;
2038
+ }
2039
+
2040
+ module.exports = initCloneByTag;
2041
+
2042
+
2043
+ /***/ },
2044
+ /* 40 */
2045
+ /***/ function(module, exports) {
2046
+
2047
+ /* WEBPACK VAR INJECTION */(function(global) {/** Native method references. */
2048
+ var ArrayBuffer = global.ArrayBuffer,
2049
+ Uint8Array = global.Uint8Array;
2050
+
2051
+ /**
2052
+ * Creates a clone of the given array buffer.
2053
+ *
2054
+ * @private
2055
+ * @param {ArrayBuffer} buffer The array buffer to clone.
2056
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
2057
+ */
2058
+ function bufferClone(buffer) {
2059
+ var result = new ArrayBuffer(buffer.byteLength),
2060
+ view = new Uint8Array(result);
2061
+
2062
+ view.set(new Uint8Array(buffer));
2063
+ return result;
2064
+ }
2065
+
2066
+ module.exports = bufferClone;
2067
+
2068
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
2069
+
2070
+ /***/ },
2071
+ /* 41 */
2072
+ /***/ function(module, exports) {
2073
+
2074
+ /**
2075
+ * Initializes an object clone.
2076
+ *
2077
+ * @private
2078
+ * @param {Object} object The object to clone.
2079
+ * @returns {Object} Returns the initialized clone.
2080
+ */
2081
+ function initCloneObject(object) {
2082
+ var Ctor = object.constructor;
2083
+ if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
2084
+ Ctor = Object;
2085
+ }
2086
+ return new Ctor;
2087
+ }
2088
+
2089
+ module.exports = initCloneObject;
2090
+
2091
+
2092
+ /***/ },
2093
+ /* 42 */
2094
+ /***/ function(module, exports) {
2095
+
2096
+ /**
2097
+ * Checks if `value` is `undefined`.
2098
+ *
2099
+ * @static
2100
+ * @memberOf _
2101
+ * @category Lang
2102
+ * @param {*} value The value to check.
2103
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
2104
+ * @example
2105
+ *
2106
+ * _.isUndefined(void 0);
2107
+ * // => true
2108
+ *
2109
+ * _.isUndefined(null);
2110
+ * // => false
2111
+ */
2112
+ function isUndefined(value) {
2113
+ return value === undefined;
2114
+ }
2115
+
2116
+ module.exports = isUndefined;
2117
+
2118
+
2119
+ /***/ }
2120
+ /******/ ])
746
2121
  });
747
2122
  ;