UNPKG

179 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory(require("react"), require("react-dom"));
4 else if(typeof define === 'function' && define.amd)
5 define(["react", "react-dom"], factory);
6 else if(typeof exports === 'object')
7 exports["ReactContainerQuery"] = factory(require("react"), require("react-dom"));
8 else
9 root["ReactContainerQuery"] = factory(root["React"], root["ReactDOM"]);
10})(this, function(__WEBPACK_EXTERNAL_MODULE_144__, __WEBPACK_EXTERNAL_MODULE_145__) {
11return /******/ (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 "use strict";
58
59 var __extends = undefined && undefined.__extends || function (d, b) {
60 for (var p in b) {
61 if (b.hasOwnProperty(p)) d[p] = b[p];
62 }function __() {
63 this.constructor = d;
64 }
65 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
66 };
67 var __assign = undefined && undefined.__assign || Object.assign || function (t) {
68 for (var s, i = 1, n = arguments.length; i < n; i++) {
69 s = arguments[i];
70 for (var p in s) {
71 if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
72 }
73 }
74 return t;
75 };
76 var React = __webpack_require__(144);
77 var ReactDOM = __webpack_require__(145);
78 var matchQueries_1 = __webpack_require__(22);
79 var ContainerQueryCore_1 = __webpack_require__(42);
80 /**
81 * <ContainerQuery query={query} initialSize={{width: 123, height: 456}}>
82 * {(params) => {
83 * <div className={classname(params)}></div>
84 * }}
85 * </ContainerQuery>
86 */
87 var ContainerQuery = function (_super) {
88 __extends(ContainerQuery, _super);
89 function ContainerQuery(props) {
90 var _this = _super.call(this, props) || this;
91 _this.cqCore = null;
92 _this.state = {
93 params: props.initialSize ? matchQueries_1.default(props.query)(props.initialSize) : {}
94 };
95 return _this;
96 }
97 ContainerQuery.prototype.componentDidMount = function () {
98 var _this = this;
99 this.cqCore = new ContainerQueryCore_1.default(this.props.query, function (params) {
100 _this.setState({ params: params });
101 });
102 this.cqCore.observe(ReactDOM.findDOMNode(this));
103 };
104 ContainerQuery.prototype.componentDidUpdate = function () {
105 this.cqCore.observe(ReactDOM.findDOMNode(this));
106 };
107 ContainerQuery.prototype.componentWillUnmount = function () {
108 this.cqCore.disconnect();
109 this.cqCore = null;
110 };
111 ContainerQuery.prototype.render = function () {
112 return this.props.children(this.state.params);
113 };
114 return ContainerQuery;
115 }(React.Component);
116 exports.ContainerQuery = ContainerQuery;
117 /**
118 * applyContainerQuery(BoxComponent, query, initialSize);
119 */
120 function applyContainerQuery(Component, query, initialSize) {
121 var ContainerQuery = function (_super) {
122 __extends(ContainerQuery, _super);
123 function ContainerQuery(props) {
124 var _this = _super.call(this, props) || this;
125 _this.cqCore = null;
126 _this.state = {
127 params: initialSize ? matchQueries_1.default(query)(initialSize) : {}
128 };
129 return _this;
130 }
131 ContainerQuery.prototype.componentDidMount = function () {
132 var _this = this;
133 this.cqCore = new ContainerQueryCore_1.default(query, function (params) {
134 _this.setState({ params: params });
135 });
136 this.cqCore.observe(ReactDOM.findDOMNode(this));
137 };
138 ContainerQuery.prototype.componentDidUpdate = function () {
139 this.cqCore.observe(ReactDOM.findDOMNode(this));
140 };
141 ContainerQuery.prototype.componentWillUnmount = function () {
142 this.cqCore.disconnect();
143 this.cqCore = null;
144 };
145 ContainerQuery.prototype.render = function () {
146 return React.createElement(Component, __assign({}, this.props, { containerQuery: this.state.params }));
147 };
148 return ContainerQuery;
149 }(React.Component);
150 ContainerQuery.displayName = Component.displayName ? "ContainerQuery(" + Component.displayName + ")" : 'ContainerQuery';
151 ;
152 return ContainerQuery;
153 }
154 exports.applyContainerQuery = applyContainerQuery;
155 //# sourceMappingURL=index.js.map
156
157/***/ },
158/* 1 */
159/***/ function(module, exports, __webpack_require__) {
160
161 var freeGlobal = __webpack_require__(27);
162
163 /** Detect free variable `self`. */
164 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
165
166 /** Used as a reference to the global object. */
167 var root = freeGlobal || freeSelf || Function('return this')();
168
169 module.exports = root;
170
171
172/***/ },
173/* 2 */
174/***/ function(module, exports) {
175
176 /**
177 * Checks if `value` is classified as an `Array` object.
178 *
179 * @static
180 * @memberOf _
181 * @since 0.1.0
182 * @category Lang
183 * @param {*} value The value to check.
184 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
185 * @example
186 *
187 * _.isArray([1, 2, 3]);
188 * // => true
189 *
190 * _.isArray(document.body.children);
191 * // => false
192 *
193 * _.isArray('abc');
194 * // => false
195 *
196 * _.isArray(_.noop);
197 * // => false
198 */
199 var isArray = Array.isArray;
200
201 module.exports = isArray;
202
203
204/***/ },
205/* 3 */
206/***/ function(module, exports, __webpack_require__) {
207
208 var baseIsNative = __webpack_require__(64),
209 getValue = __webpack_require__(88);
210
211 /**
212 * Gets the native function at `key` of `object`.
213 *
214 * @private
215 * @param {Object} object The object to query.
216 * @param {string} key The key of the method to get.
217 * @returns {*} Returns the function if it's native, else `undefined`.
218 */
219 function getNative(object, key) {
220 var value = getValue(object, key);
221 return baseIsNative(value) ? value : undefined;
222 }
223
224 module.exports = getNative;
225
226
227/***/ },
228/* 4 */
229/***/ function(module, exports, __webpack_require__) {
230
231 var Symbol = __webpack_require__(7),
232 getRawTag = __webpack_require__(86),
233 objectToString = __webpack_require__(111);
234
235 /** `Object#toString` result references. */
236 var nullTag = '[object Null]',
237 undefinedTag = '[object Undefined]';
238
239 /** Built-in value references. */
240 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
241
242 /**
243 * The base implementation of `getTag` without fallbacks for buggy environments.
244 *
245 * @private
246 * @param {*} value The value to query.
247 * @returns {string} Returns the `toStringTag`.
248 */
249 function baseGetTag(value) {
250 if (value == null) {
251 return value === undefined ? undefinedTag : nullTag;
252 }
253 return (symToStringTag && symToStringTag in Object(value))
254 ? getRawTag(value)
255 : objectToString(value);
256 }
257
258 module.exports = baseGetTag;
259
260
261/***/ },
262/* 5 */
263/***/ function(module, exports) {
264
265 /**
266 * Checks if `value` is object-like. A value is object-like if it's not `null`
267 * and has a `typeof` result of "object".
268 *
269 * @static
270 * @memberOf _
271 * @since 4.0.0
272 * @category Lang
273 * @param {*} value The value to check.
274 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
275 * @example
276 *
277 * _.isObjectLike({});
278 * // => true
279 *
280 * _.isObjectLike([1, 2, 3]);
281 * // => true
282 *
283 * _.isObjectLike(_.noop);
284 * // => false
285 *
286 * _.isObjectLike(null);
287 * // => false
288 */
289 function isObjectLike(value) {
290 return value != null && typeof value == 'object';
291 }
292
293 module.exports = isObjectLike;
294
295
296/***/ },
297/* 6 */
298/***/ function(module, exports, __webpack_require__) {
299
300 var listCacheClear = __webpack_require__(98),
301 listCacheDelete = __webpack_require__(99),
302 listCacheGet = __webpack_require__(100),
303 listCacheHas = __webpack_require__(101),
304 listCacheSet = __webpack_require__(102);
305
306 /**
307 * Creates an list cache object.
308 *
309 * @private
310 * @constructor
311 * @param {Array} [entries] The key-value pairs to cache.
312 */
313 function ListCache(entries) {
314 var index = -1,
315 length = entries == null ? 0 : entries.length;
316
317 this.clear();
318 while (++index < length) {
319 var entry = entries[index];
320 this.set(entry[0], entry[1]);
321 }
322 }
323
324 // Add methods to `ListCache`.
325 ListCache.prototype.clear = listCacheClear;
326 ListCache.prototype['delete'] = listCacheDelete;
327 ListCache.prototype.get = listCacheGet;
328 ListCache.prototype.has = listCacheHas;
329 ListCache.prototype.set = listCacheSet;
330
331 module.exports = ListCache;
332
333
334/***/ },
335/* 7 */
336/***/ function(module, exports, __webpack_require__) {
337
338 var root = __webpack_require__(1);
339
340 /** Built-in value references. */
341 var Symbol = root.Symbol;
342
343 module.exports = Symbol;
344
345
346/***/ },
347/* 8 */
348/***/ function(module, exports, __webpack_require__) {
349
350 var eq = __webpack_require__(34);
351
352 /**
353 * Gets the index at which the `key` is found in `array` of key-value pairs.
354 *
355 * @private
356 * @param {Array} array The array to inspect.
357 * @param {*} key The key to search for.
358 * @returns {number} Returns the index of the matched value, else `-1`.
359 */
360 function assocIndexOf(array, key) {
361 var length = array.length;
362 while (length--) {
363 if (eq(array[length][0], key)) {
364 return length;
365 }
366 }
367 return -1;
368 }
369
370 module.exports = assocIndexOf;
371
372
373/***/ },
374/* 9 */
375/***/ function(module, exports, __webpack_require__) {
376
377 var isKeyable = __webpack_require__(95);
378
379 /**
380 * Gets the data for `map`.
381 *
382 * @private
383 * @param {Object} map The map to query.
384 * @param {string} key The reference key.
385 * @returns {*} Returns the map data.
386 */
387 function getMapData(map, key) {
388 var data = map.__data__;
389 return isKeyable(key)
390 ? data[typeof key == 'string' ? 'string' : 'hash']
391 : data.map;
392 }
393
394 module.exports = getMapData;
395
396
397/***/ },
398/* 10 */
399/***/ function(module, exports, __webpack_require__) {
400
401 var getNative = __webpack_require__(3);
402
403 /* Built-in method references that are verified to be native. */
404 var nativeCreate = getNative(Object, 'create');
405
406 module.exports = nativeCreate;
407
408
409/***/ },
410/* 11 */
411/***/ function(module, exports, __webpack_require__) {
412
413 var isSymbol = __webpack_require__(21);
414
415 /** Used as references for various `Number` constants. */
416 var INFINITY = 1 / 0;
417
418 /**
419 * Converts `value` to a string key if it's not a string or symbol.
420 *
421 * @private
422 * @param {*} value The value to inspect.
423 * @returns {string|symbol} Returns the key.
424 */
425 function toKey(value) {
426 if (typeof value == 'string' || isSymbol(value)) {
427 return value;
428 }
429 var result = (value + '');
430 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
431 }
432
433 module.exports = toKey;
434
435
436/***/ },
437/* 12 */
438/***/ function(module, exports, __webpack_require__) {
439
440 var arrayLikeKeys = __webpack_require__(53),
441 baseKeys = __webpack_require__(67),
442 isArrayLike = __webpack_require__(18);
443
444 /**
445 * Creates an array of the own enumerable property names of `object`.
446 *
447 * **Note:** Non-object values are coerced to objects. See the
448 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
449 * for more details.
450 *
451 * @static
452 * @since 0.1.0
453 * @memberOf _
454 * @category Object
455 * @param {Object} object The object to query.
456 * @returns {Array} Returns the array of property names.
457 * @example
458 *
459 * function Foo() {
460 * this.a = 1;
461 * this.b = 2;
462 * }
463 *
464 * Foo.prototype.c = 3;
465 *
466 * _.keys(new Foo);
467 * // => ['a', 'b'] (iteration order is not guaranteed)
468 *
469 * _.keys('hi');
470 * // => ['0', '1']
471 */
472 function keys(object) {
473 return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
474 }
475
476 module.exports = keys;
477
478
479/***/ },
480/* 13 */
481/***/ function(module, exports, __webpack_require__) {
482
483 var getNative = __webpack_require__(3),
484 root = __webpack_require__(1);
485
486 /* Built-in method references that are verified to be native. */
487 var Map = getNative(root, 'Map');
488
489 module.exports = Map;
490
491
492/***/ },
493/* 14 */
494/***/ function(module, exports, __webpack_require__) {
495
496 var mapCacheClear = __webpack_require__(103),
497 mapCacheDelete = __webpack_require__(104),
498 mapCacheGet = __webpack_require__(105),
499 mapCacheHas = __webpack_require__(106),
500 mapCacheSet = __webpack_require__(107);
501
502 /**
503 * Creates a map cache object to store key-value pairs.
504 *
505 * @private
506 * @constructor
507 * @param {Array} [entries] The key-value pairs to cache.
508 */
509 function MapCache(entries) {
510 var index = -1,
511 length = entries == null ? 0 : entries.length;
512
513 this.clear();
514 while (++index < length) {
515 var entry = entries[index];
516 this.set(entry[0], entry[1]);
517 }
518 }
519
520 // Add methods to `MapCache`.
521 MapCache.prototype.clear = mapCacheClear;
522 MapCache.prototype['delete'] = mapCacheDelete;
523 MapCache.prototype.get = mapCacheGet;
524 MapCache.prototype.has = mapCacheHas;
525 MapCache.prototype.set = mapCacheSet;
526
527 module.exports = MapCache;
528
529
530/***/ },
531/* 15 */
532/***/ function(module, exports) {
533
534 /**
535 * A specialized version of `_.map` for arrays without support for iteratee
536 * shorthands.
537 *
538 * @private
539 * @param {Array} [array] The array to iterate over.
540 * @param {Function} iteratee The function invoked per iteration.
541 * @returns {Array} Returns the new mapped array.
542 */
543 function arrayMap(array, iteratee) {
544 var index = -1,
545 length = array == null ? 0 : array.length,
546 result = Array(length);
547
548 while (++index < length) {
549 result[index] = iteratee(array[index], index, array);
550 }
551 return result;
552 }
553
554 module.exports = arrayMap;
555
556
557/***/ },
558/* 16 */
559/***/ function(module, exports, __webpack_require__) {
560
561 var baseIsEqualDeep = __webpack_require__(62),
562 isObjectLike = __webpack_require__(5);
563
564 /**
565 * The base implementation of `_.isEqual` which supports partial comparisons
566 * and tracks traversed objects.
567 *
568 * @private
569 * @param {*} value The value to compare.
570 * @param {*} other The other value to compare.
571 * @param {boolean} bitmask The bitmask flags.
572 * 1 - Unordered comparison
573 * 2 - Partial comparison
574 * @param {Function} [customizer] The function to customize comparisons.
575 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
576 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
577 */
578 function baseIsEqual(value, other, bitmask, customizer, stack) {
579 if (value === other) {
580 return true;
581 }
582 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
583 return value !== value && other !== other;
584 }
585 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
586 }
587
588 module.exports = baseIsEqual;
589
590
591/***/ },
592/* 17 */
593/***/ function(module, exports, __webpack_require__) {
594
595 var isArray = __webpack_require__(2),
596 isSymbol = __webpack_require__(21);
597
598 /** Used to match property names within property paths. */
599 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
600 reIsPlainProp = /^\w*$/;
601
602 /**
603 * Checks if `value` is a property name and not a property path.
604 *
605 * @private
606 * @param {*} value The value to check.
607 * @param {Object} [object] The object to query keys on.
608 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
609 */
610 function isKey(value, object) {
611 if (isArray(value)) {
612 return false;
613 }
614 var type = typeof value;
615 if (type == 'number' || type == 'symbol' || type == 'boolean' ||
616 value == null || isSymbol(value)) {
617 return true;
618 }
619 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
620 (object != null && value in Object(object));
621 }
622
623 module.exports = isKey;
624
625
626/***/ },
627/* 18 */
628/***/ function(module, exports, __webpack_require__) {
629
630 var isFunction = __webpack_require__(37),
631 isLength = __webpack_require__(19);
632
633 /**
634 * Checks if `value` is array-like. A value is considered array-like if it's
635 * not a function and has a `value.length` that's an integer greater than or
636 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
637 *
638 * @static
639 * @memberOf _
640 * @since 4.0.0
641 * @category Lang
642 * @param {*} value The value to check.
643 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
644 * @example
645 *
646 * _.isArrayLike([1, 2, 3]);
647 * // => true
648 *
649 * _.isArrayLike(document.body.children);
650 * // => true
651 *
652 * _.isArrayLike('abc');
653 * // => true
654 *
655 * _.isArrayLike(_.noop);
656 * // => false
657 */
658 function isArrayLike(value) {
659 return value != null && isLength(value.length) && !isFunction(value);
660 }
661
662 module.exports = isArrayLike;
663
664
665/***/ },
666/* 19 */
667/***/ function(module, exports) {
668
669 /** Used as references for various `Number` constants. */
670 var MAX_SAFE_INTEGER = 9007199254740991;
671
672 /**
673 * Checks if `value` is a valid array-like length.
674 *
675 * **Note:** This method is loosely based on
676 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
677 *
678 * @static
679 * @memberOf _
680 * @since 4.0.0
681 * @category Lang
682 * @param {*} value The value to check.
683 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
684 * @example
685 *
686 * _.isLength(3);
687 * // => true
688 *
689 * _.isLength(Number.MIN_VALUE);
690 * // => false
691 *
692 * _.isLength(Infinity);
693 * // => false
694 *
695 * _.isLength('3');
696 * // => false
697 */
698 function isLength(value) {
699 return typeof value == 'number' &&
700 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
701 }
702
703 module.exports = isLength;
704
705
706/***/ },
707/* 20 */
708/***/ function(module, exports) {
709
710 /**
711 * Checks if `value` is the
712 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
713 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
714 *
715 * @static
716 * @memberOf _
717 * @since 0.1.0
718 * @category Lang
719 * @param {*} value The value to check.
720 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
721 * @example
722 *
723 * _.isObject({});
724 * // => true
725 *
726 * _.isObject([1, 2, 3]);
727 * // => true
728 *
729 * _.isObject(_.noop);
730 * // => true
731 *
732 * _.isObject(null);
733 * // => false
734 */
735 function isObject(value) {
736 var type = typeof value;
737 return value != null && (type == 'object' || type == 'function');
738 }
739
740 module.exports = isObject;
741
742
743/***/ },
744/* 21 */
745/***/ function(module, exports, __webpack_require__) {
746
747 var baseGetTag = __webpack_require__(4),
748 isObjectLike = __webpack_require__(5);
749
750 /** `Object#toString` result references. */
751 var symbolTag = '[object Symbol]';
752
753 /**
754 * Checks if `value` is classified as a `Symbol` primitive or object.
755 *
756 * @static
757 * @memberOf _
758 * @since 4.0.0
759 * @category Lang
760 * @param {*} value The value to check.
761 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
762 * @example
763 *
764 * _.isSymbol(Symbol.iterator);
765 * // => true
766 *
767 * _.isSymbol('abc');
768 * // => false
769 */
770 function isSymbol(value) {
771 return typeof value == 'symbol' ||
772 (isObjectLike(value) && baseGetTag(value) == symbolTag);
773 }
774
775 module.exports = isSymbol;
776
777
778/***/ },
779/* 22 */
780/***/ function(module, exports, __webpack_require__) {
781
782 "use strict";
783 Object.defineProperty(exports, "__esModule", { value: true });
784 var map = __webpack_require__(127);
785 var toPairs = __webpack_require__(132);
786 function matchQueries(rules) {
787 var entries = map(toPairs(rules), function (_a) {
788 var className = _a[0], rule = _a[1];
789 return ({
790 minWidth: rule.minWidth != null ? rule.minWidth : 0,
791 maxWidth: rule.maxWidth != null ? rule.maxWidth : Infinity,
792 minHeight: rule.minHeight != null ? rule.minHeight : 0,
793 maxHeight: rule.maxHeight != null ? rule.maxHeight : Infinity,
794 className: className
795 });
796 });
797 return function (_a) {
798 var height = _a.height, width = _a.width;
799 var classNameMap = {};
800 for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
801 var _b = entries_1[_i], className = _b.className, minWidth = _b.minWidth, maxWidth = _b.maxWidth, minHeight = _b.minHeight, maxHeight = _b.maxHeight;
802 if (height != null && width != null) {
803 classNameMap[className] = (minWidth <= width && width <= maxWidth &&
804 minHeight <= height && height <= maxHeight);
805 }
806 else if (height == null && width != null) {
807 classNameMap[className] = minWidth <= width && width <= maxWidth;
808 }
809 else if (height != null && width == null) {
810 classNameMap[className] = minHeight <= height && height <= maxHeight;
811 }
812 else {
813 classNameMap[className] = true;
814 }
815 }
816 return classNameMap;
817 };
818 }
819 exports.default = matchQueries;
820 //# sourceMappingURL=matchQueries.js.map
821
822/***/ },
823/* 23 */
824/***/ function(module, exports, __webpack_require__) {
825
826 var ListCache = __webpack_require__(6),
827 stackClear = __webpack_require__(117),
828 stackDelete = __webpack_require__(118),
829 stackGet = __webpack_require__(119),
830 stackHas = __webpack_require__(120),
831 stackSet = __webpack_require__(121);
832
833 /**
834 * Creates a stack cache object to store key-value pairs.
835 *
836 * @private
837 * @constructor
838 * @param {Array} [entries] The key-value pairs to cache.
839 */
840 function Stack(entries) {
841 var data = this.__data__ = new ListCache(entries);
842 this.size = data.size;
843 }
844
845 // Add methods to `Stack`.
846 Stack.prototype.clear = stackClear;
847 Stack.prototype['delete'] = stackDelete;
848 Stack.prototype.get = stackGet;
849 Stack.prototype.has = stackHas;
850 Stack.prototype.set = stackSet;
851
852 module.exports = Stack;
853
854
855/***/ },
856/* 24 */
857/***/ function(module, exports, __webpack_require__) {
858
859 var castPath = __webpack_require__(25),
860 toKey = __webpack_require__(11);
861
862 /**
863 * The base implementation of `_.get` without support for default values.
864 *
865 * @private
866 * @param {Object} object The object to query.
867 * @param {Array|string} path The path of the property to get.
868 * @returns {*} Returns the resolved value.
869 */
870 function baseGet(object, path) {
871 path = castPath(path, object);
872
873 var index = 0,
874 length = path.length;
875
876 while (object != null && index < length) {
877 object = object[toKey(path[index++])];
878 }
879 return (index && index == length) ? object : undefined;
880 }
881
882 module.exports = baseGet;
883
884
885/***/ },
886/* 25 */
887/***/ function(module, exports, __webpack_require__) {
888
889 var isArray = __webpack_require__(2),
890 isKey = __webpack_require__(17),
891 stringToPath = __webpack_require__(122),
892 toString = __webpack_require__(133);
893
894 /**
895 * Casts `value` to a path array if it's not one.
896 *
897 * @private
898 * @param {*} value The value to inspect.
899 * @param {Object} [object] The object to query keys on.
900 * @returns {Array} Returns the cast property path array.
901 */
902 function castPath(value, object) {
903 if (isArray(value)) {
904 return value;
905 }
906 return isKey(value, object) ? [value] : stringToPath(toString(value));
907 }
908
909 module.exports = castPath;
910
911
912/***/ },
913/* 26 */
914/***/ function(module, exports, __webpack_require__) {
915
916 var SetCache = __webpack_require__(49),
917 arraySome = __webpack_require__(55),
918 cacheHas = __webpack_require__(77);
919
920 /** Used to compose bitmasks for value comparisons. */
921 var COMPARE_PARTIAL_FLAG = 1,
922 COMPARE_UNORDERED_FLAG = 2;
923
924 /**
925 * A specialized version of `baseIsEqualDeep` for arrays with support for
926 * partial deep comparisons.
927 *
928 * @private
929 * @param {Array} array The array to compare.
930 * @param {Array} other The other array to compare.
931 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
932 * @param {Function} customizer The function to customize comparisons.
933 * @param {Function} equalFunc The function to determine equivalents of values.
934 * @param {Object} stack Tracks traversed `array` and `other` objects.
935 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
936 */
937 function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
938 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
939 arrLength = array.length,
940 othLength = other.length;
941
942 if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
943 return false;
944 }
945 // Assume cyclic values are equal.
946 var stacked = stack.get(array);
947 if (stacked && stack.get(other)) {
948 return stacked == other;
949 }
950 var index = -1,
951 result = true,
952 seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
953
954 stack.set(array, other);
955 stack.set(other, array);
956
957 // Ignore non-index properties.
958 while (++index < arrLength) {
959 var arrValue = array[index],
960 othValue = other[index];
961
962 if (customizer) {
963 var compared = isPartial
964 ? customizer(othValue, arrValue, index, other, array, stack)
965 : customizer(arrValue, othValue, index, array, other, stack);
966 }
967 if (compared !== undefined) {
968 if (compared) {
969 continue;
970 }
971 result = false;
972 break;
973 }
974 // Recursively compare arrays (susceptible to call stack limits).
975 if (seen) {
976 if (!arraySome(other, function(othValue, othIndex) {
977 if (!cacheHas(seen, othIndex) &&
978 (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
979 return seen.push(othIndex);
980 }
981 })) {
982 result = false;
983 break;
984 }
985 } else if (!(
986 arrValue === othValue ||
987 equalFunc(arrValue, othValue, bitmask, customizer, stack)
988 )) {
989 result = false;
990 break;
991 }
992 }
993 stack['delete'](array);
994 stack['delete'](other);
995 return result;
996 }
997
998 module.exports = equalArrays;
999
1000
1001/***/ },
1002/* 27 */
1003/***/ function(module, exports) {
1004
1005 /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
1006 var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
1007
1008 module.exports = freeGlobal;
1009
1010 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
1011
1012/***/ },
1013/* 28 */
1014/***/ function(module, exports, __webpack_require__) {
1015
1016 var DataView = __webpack_require__(45),
1017 Map = __webpack_require__(13),
1018 Promise = __webpack_require__(47),
1019 Set = __webpack_require__(48),
1020 WeakMap = __webpack_require__(51),
1021 baseGetTag = __webpack_require__(4),
1022 toSource = __webpack_require__(33);
1023
1024 /** `Object#toString` result references. */
1025 var mapTag = '[object Map]',
1026 objectTag = '[object Object]',
1027 promiseTag = '[object Promise]',
1028 setTag = '[object Set]',
1029 weakMapTag = '[object WeakMap]';
1030
1031 var dataViewTag = '[object DataView]';
1032
1033 /** Used to detect maps, sets, and weakmaps. */
1034 var dataViewCtorString = toSource(DataView),
1035 mapCtorString = toSource(Map),
1036 promiseCtorString = toSource(Promise),
1037 setCtorString = toSource(Set),
1038 weakMapCtorString = toSource(WeakMap);
1039
1040 /**
1041 * Gets the `toStringTag` of `value`.
1042 *
1043 * @private
1044 * @param {*} value The value to query.
1045 * @returns {string} Returns the `toStringTag`.
1046 */
1047 var getTag = baseGetTag;
1048
1049 // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
1050 if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
1051 (Map && getTag(new Map) != mapTag) ||
1052 (Promise && getTag(Promise.resolve()) != promiseTag) ||
1053 (Set && getTag(new Set) != setTag) ||
1054 (WeakMap && getTag(new WeakMap) != weakMapTag)) {
1055 getTag = function(value) {
1056 var result = baseGetTag(value),
1057 Ctor = result == objectTag ? value.constructor : undefined,
1058 ctorString = Ctor ? toSource(Ctor) : '';
1059
1060 if (ctorString) {
1061 switch (ctorString) {
1062 case dataViewCtorString: return dataViewTag;
1063 case mapCtorString: return mapTag;
1064 case promiseCtorString: return promiseTag;
1065 case setCtorString: return setTag;
1066 case weakMapCtorString: return weakMapTag;
1067 }
1068 }
1069 return result;
1070 };
1071 }
1072
1073 module.exports = getTag;
1074
1075
1076/***/ },
1077/* 29 */
1078/***/ function(module, exports) {
1079
1080 /** Used as references for various `Number` constants. */
1081 var MAX_SAFE_INTEGER = 9007199254740991;
1082
1083 /** Used to detect unsigned integer values. */
1084 var reIsUint = /^(?:0|[1-9]\d*)$/;
1085
1086 /**
1087 * Checks if `value` is a valid array-like index.
1088 *
1089 * @private
1090 * @param {*} value The value to check.
1091 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1092 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1093 */
1094 function isIndex(value, length) {
1095 length = length == null ? MAX_SAFE_INTEGER : length;
1096 return !!length &&
1097 (typeof value == 'number' || reIsUint.test(value)) &&
1098 (value > -1 && value % 1 == 0 && value < length);
1099 }
1100
1101 module.exports = isIndex;
1102
1103
1104/***/ },
1105/* 30 */
1106/***/ function(module, exports, __webpack_require__) {
1107
1108 var isObject = __webpack_require__(20);
1109
1110 /**
1111 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
1112 *
1113 * @private
1114 * @param {*} value The value to check.
1115 * @returns {boolean} Returns `true` if `value` if suitable for strict
1116 * equality comparisons, else `false`.
1117 */
1118 function isStrictComparable(value) {
1119 return value === value && !isObject(value);
1120 }
1121
1122 module.exports = isStrictComparable;
1123
1124
1125/***/ },
1126/* 31 */
1127/***/ function(module, exports) {
1128
1129 /**
1130 * Converts `map` to its key-value pairs.
1131 *
1132 * @private
1133 * @param {Object} map The map to convert.
1134 * @returns {Array} Returns the key-value pairs.
1135 */
1136 function mapToArray(map) {
1137 var index = -1,
1138 result = Array(map.size);
1139
1140 map.forEach(function(value, key) {
1141 result[++index] = [key, value];
1142 });
1143 return result;
1144 }
1145
1146 module.exports = mapToArray;
1147
1148
1149/***/ },
1150/* 32 */
1151/***/ function(module, exports) {
1152
1153 /**
1154 * A specialized version of `matchesProperty` for source values suitable
1155 * for strict equality comparisons, i.e. `===`.
1156 *
1157 * @private
1158 * @param {string} key The key of the property to get.
1159 * @param {*} srcValue The value to match.
1160 * @returns {Function} Returns the new spec function.
1161 */
1162 function matchesStrictComparable(key, srcValue) {
1163 return function(object) {
1164 if (object == null) {
1165 return false;
1166 }
1167 return object[key] === srcValue &&
1168 (srcValue !== undefined || (key in Object(object)));
1169 };
1170 }
1171
1172 module.exports = matchesStrictComparable;
1173
1174
1175/***/ },
1176/* 33 */
1177/***/ function(module, exports) {
1178
1179 /** Used for built-in method references. */
1180 var funcProto = Function.prototype;
1181
1182 /** Used to resolve the decompiled source of functions. */
1183 var funcToString = funcProto.toString;
1184
1185 /**
1186 * Converts `func` to its source code.
1187 *
1188 * @private
1189 * @param {Function} func The function to convert.
1190 * @returns {string} Returns the source code.
1191 */
1192 function toSource(func) {
1193 if (func != null) {
1194 try {
1195 return funcToString.call(func);
1196 } catch (e) {}
1197 try {
1198 return (func + '');
1199 } catch (e) {}
1200 }
1201 return '';
1202 }
1203
1204 module.exports = toSource;
1205
1206
1207/***/ },
1208/* 34 */
1209/***/ function(module, exports) {
1210
1211 /**
1212 * Performs a
1213 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1214 * comparison between two values to determine if they are equivalent.
1215 *
1216 * @static
1217 * @memberOf _
1218 * @since 4.0.0
1219 * @category Lang
1220 * @param {*} value The value to compare.
1221 * @param {*} other The other value to compare.
1222 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1223 * @example
1224 *
1225 * var object = { 'a': 1 };
1226 * var other = { 'a': 1 };
1227 *
1228 * _.eq(object, object);
1229 * // => true
1230 *
1231 * _.eq(object, other);
1232 * // => false
1233 *
1234 * _.eq('a', 'a');
1235 * // => true
1236 *
1237 * _.eq('a', Object('a'));
1238 * // => false
1239 *
1240 * _.eq(NaN, NaN);
1241 * // => true
1242 */
1243 function eq(value, other) {
1244 return value === other || (value !== value && other !== other);
1245 }
1246
1247 module.exports = eq;
1248
1249
1250/***/ },
1251/* 35 */
1252/***/ function(module, exports, __webpack_require__) {
1253
1254 var baseIsArguments = __webpack_require__(61),
1255 isObjectLike = __webpack_require__(5);
1256
1257 /** Used for built-in method references. */
1258 var objectProto = Object.prototype;
1259
1260 /** Used to check objects for own properties. */
1261 var hasOwnProperty = objectProto.hasOwnProperty;
1262
1263 /** Built-in value references. */
1264 var propertyIsEnumerable = objectProto.propertyIsEnumerable;
1265
1266 /**
1267 * Checks if `value` is likely an `arguments` object.
1268 *
1269 * @static
1270 * @memberOf _
1271 * @since 0.1.0
1272 * @category Lang
1273 * @param {*} value The value to check.
1274 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1275 * else `false`.
1276 * @example
1277 *
1278 * _.isArguments(function() { return arguments; }());
1279 * // => true
1280 *
1281 * _.isArguments([1, 2, 3]);
1282 * // => false
1283 */
1284 var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
1285 return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
1286 !propertyIsEnumerable.call(value, 'callee');
1287 };
1288
1289 module.exports = isArguments;
1290
1291
1292/***/ },
1293/* 36 */
1294/***/ function(module, exports, __webpack_require__) {
1295
1296 /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(1),
1297 stubFalse = __webpack_require__(131);
1298
1299 /** Detect free variable `exports`. */
1300 var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1301
1302 /** Detect free variable `module`. */
1303 var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1304
1305 /** Detect the popular CommonJS extension `module.exports`. */
1306 var moduleExports = freeModule && freeModule.exports === freeExports;
1307
1308 /** Built-in value references. */
1309 var Buffer = moduleExports ? root.Buffer : undefined;
1310
1311 /* Built-in method references for those with the same name as other `lodash` methods. */
1312 var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
1313
1314 /**
1315 * Checks if `value` is a buffer.
1316 *
1317 * @static
1318 * @memberOf _
1319 * @since 4.3.0
1320 * @category Lang
1321 * @param {*} value The value to check.
1322 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1323 * @example
1324 *
1325 * _.isBuffer(new Buffer(2));
1326 * // => true
1327 *
1328 * _.isBuffer(new Uint8Array(2));
1329 * // => false
1330 */
1331 var isBuffer = nativeIsBuffer || stubFalse;
1332
1333 module.exports = isBuffer;
1334
1335 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(41)(module)))
1336
1337/***/ },
1338/* 37 */
1339/***/ function(module, exports, __webpack_require__) {
1340
1341 var baseGetTag = __webpack_require__(4),
1342 isObject = __webpack_require__(20);
1343
1344 /** `Object#toString` result references. */
1345 var asyncTag = '[object AsyncFunction]',
1346 funcTag = '[object Function]',
1347 genTag = '[object GeneratorFunction]',
1348 proxyTag = '[object Proxy]';
1349
1350 /**
1351 * Checks if `value` is classified as a `Function` object.
1352 *
1353 * @static
1354 * @memberOf _
1355 * @since 0.1.0
1356 * @category Lang
1357 * @param {*} value The value to check.
1358 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1359 * @example
1360 *
1361 * _.isFunction(_);
1362 * // => true
1363 *
1364 * _.isFunction(/abc/);
1365 * // => false
1366 */
1367 function isFunction(value) {
1368 if (!isObject(value)) {
1369 return false;
1370 }
1371 // The use of `Object#toString` avoids issues with the `typeof` operator
1372 // in Safari 9 which returns 'object' for typed arrays and other constructors.
1373 var tag = baseGetTag(value);
1374 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
1375 }
1376
1377 module.exports = isFunction;
1378
1379
1380/***/ },
1381/* 38 */
1382/***/ function(module, exports, __webpack_require__) {
1383
1384 var baseIsTypedArray = __webpack_require__(65),
1385 baseUnary = __webpack_require__(76),
1386 nodeUtil = __webpack_require__(110);
1387
1388 /* Node.js helper references. */
1389 var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
1390
1391 /**
1392 * Checks if `value` is classified as a typed array.
1393 *
1394 * @static
1395 * @memberOf _
1396 * @since 3.0.0
1397 * @category Lang
1398 * @param {*} value The value to check.
1399 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1400 * @example
1401 *
1402 * _.isTypedArray(new Uint8Array);
1403 * // => true
1404 *
1405 * _.isTypedArray([]);
1406 * // => false
1407 */
1408 var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
1409
1410 module.exports = isTypedArray;
1411
1412
1413/***/ },
1414/* 39 */
1415/***/ function(module, exports) {
1416
1417 "use strict";
1418
1419 var detector = module.exports = {};
1420
1421 detector.isIE = function(version) {
1422 function isAnyIeVersion() {
1423 var agent = navigator.userAgent.toLowerCase();
1424 return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1;
1425 }
1426
1427 if(!isAnyIeVersion()) {
1428 return false;
1429 }
1430
1431 if(!version) {
1432 return true;
1433 }
1434
1435 //Shamelessly stolen from https://gist.github.com/padolsey/527683
1436 var ieVersion = (function(){
1437 var undef,
1438 v = 3,
1439 div = document.createElement("div"),
1440 all = div.getElementsByTagName("i");
1441
1442 do {
1443 div.innerHTML = "<!--[if gt IE " + (++v) + "]><i></i><![endif]-->";
1444 }
1445 while (all[0]);
1446
1447 return v > 4 ? v : undef;
1448 }());
1449
1450 return version === ieVersion;
1451 };
1452
1453 detector.isLegacyOpera = function() {
1454 return !!window.opera;
1455 };
1456
1457
1458/***/ },
1459/* 40 */
1460/***/ function(module, exports) {
1461
1462 "use strict";
1463
1464 var utils = module.exports = {};
1465
1466 /**
1467 * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.
1468 * @public
1469 * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.
1470 * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.
1471 * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.
1472 */
1473 utils.forEach = function(collection, callback) {
1474 for(var i = 0; i < collection.length; i++) {
1475 var result = callback(collection[i]);
1476 if(result) {
1477 return result;
1478 }
1479 }
1480 };
1481
1482
1483/***/ },
1484/* 41 */
1485/***/ function(module, exports) {
1486
1487 module.exports = function(module) {
1488 if(!module.webpackPolyfill) {
1489 module.deprecate = function() {};
1490 module.paths = [];
1491 // module.parent = undefined by default
1492 module.children = [];
1493 module.webpackPolyfill = 1;
1494 }
1495 return module;
1496 }
1497
1498
1499/***/ },
1500/* 42 */
1501/***/ function(module, exports, __webpack_require__) {
1502
1503 "use strict";
1504
1505 var isEqual = __webpack_require__(126);
1506 var resize_observer_lite_1 = __webpack_require__(134);
1507 var matchQueries_1 = __webpack_require__(22);
1508 var ContainerQueryCore = function () {
1509 function ContainerQueryCore(query, callback) {
1510 var _this = this;
1511 this.result = {};
1512 this.rol = new resize_observer_lite_1.default(function (size) {
1513 var result = matchQueries_1.default(query)(size);
1514 if (!isEqual(_this.result, result)) {
1515 callback(result);
1516 _this.result = result;
1517 }
1518 });
1519 }
1520 ContainerQueryCore.prototype.observe = function (element) {
1521 this.rol.observe(element);
1522 };
1523 ContainerQueryCore.prototype.disconnect = function () {
1524 this.rol.disconnect();
1525 };
1526 return ContainerQueryCore;
1527 }();
1528 Object.defineProperty(exports, "__esModule", { value: true });
1529 exports.default = ContainerQueryCore;
1530 //# sourceMappingURL=ContainerQueryCore.js.map
1531
1532/***/ },
1533/* 43 */
1534/***/ function(module, exports, __webpack_require__) {
1535
1536 "use strict";
1537
1538 var utils = __webpack_require__(44);
1539
1540 module.exports = function batchProcessorMaker(options) {
1541 options = options || {};
1542 var reporter = options.reporter;
1543 var asyncProcess = utils.getOption(options, "async", true);
1544 var autoProcess = utils.getOption(options, "auto", true);
1545
1546 if(autoProcess && !asyncProcess) {
1547 reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true.");
1548 asyncProcess = true;
1549 }
1550
1551 var batch = Batch();
1552 var asyncFrameHandler;
1553 var isProcessing = false;
1554
1555 function addFunction(level, fn) {
1556 if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {
1557 // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.
1558 // This needs to be done before, since we're checking the size of the batch to be 0.
1559 processBatchAsync();
1560 }
1561
1562 batch.add(level, fn);
1563 }
1564
1565 function processBatch() {
1566 // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.
1567 // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).
1568 isProcessing = true;
1569 while (batch.size()) {
1570 var processingBatch = batch;
1571 batch = Batch();
1572 processingBatch.process();
1573 }
1574 isProcessing = false;
1575 }
1576
1577 function forceProcessBatch(localAsyncProcess) {
1578 if (isProcessing) {
1579 return;
1580 }
1581
1582 if(localAsyncProcess === undefined) {
1583 localAsyncProcess = asyncProcess;
1584 }
1585
1586 if(asyncFrameHandler) {
1587 cancelFrame(asyncFrameHandler);
1588 asyncFrameHandler = null;
1589 }
1590
1591 if(localAsyncProcess) {
1592 processBatchAsync();
1593 } else {
1594 processBatch();
1595 }
1596 }
1597
1598 function processBatchAsync() {
1599 asyncFrameHandler = requestFrame(processBatch);
1600 }
1601
1602 function clearBatch() {
1603 batch = {};
1604 batchSize = 0;
1605 topLevel = 0;
1606 bottomLevel = 0;
1607 }
1608
1609 function cancelFrame(listener) {
1610 // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
1611 var cancel = clearTimeout;
1612 return cancel(listener);
1613 }
1614
1615 function requestFrame(callback) {
1616 // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };
1617 var raf = function(fn) { return setTimeout(fn, 0); };
1618 return raf(callback);
1619 }
1620
1621 return {
1622 add: addFunction,
1623 force: forceProcessBatch
1624 };
1625 };
1626
1627 function Batch() {
1628 var batch = {};
1629 var size = 0;
1630 var topLevel = 0;
1631 var bottomLevel = 0;
1632
1633 function add(level, fn) {
1634 if(!fn) {
1635 fn = level;
1636 level = 0;
1637 }
1638
1639 if(level > topLevel) {
1640 topLevel = level;
1641 } else if(level < bottomLevel) {
1642 bottomLevel = level;
1643 }
1644
1645 if(!batch[level]) {
1646 batch[level] = [];
1647 }
1648
1649 batch[level].push(fn);
1650 size++;
1651 }
1652
1653 function process() {
1654 for(var level = bottomLevel; level <= topLevel; level++) {
1655 var fns = batch[level];
1656
1657 for(var i = 0; i < fns.length; i++) {
1658 var fn = fns[i];
1659 fn();
1660 }
1661 }
1662 }
1663
1664 function getSize() {
1665 return size;
1666 }
1667
1668 return {
1669 add: add,
1670 process: process,
1671 size: getSize
1672 };
1673 }
1674
1675
1676/***/ },
1677/* 44 */
1678/***/ function(module, exports) {
1679
1680 "use strict";
1681
1682 var utils = module.exports = {};
1683
1684 utils.getOption = getOption;
1685
1686 function getOption(options, name, defaultValue) {
1687 var value = options[name];
1688
1689 if((value === undefined || value === null) && defaultValue !== undefined) {
1690 return defaultValue;
1691 }
1692
1693 return value;
1694 }
1695
1696
1697/***/ },
1698/* 45 */
1699/***/ function(module, exports, __webpack_require__) {
1700
1701 var getNative = __webpack_require__(3),
1702 root = __webpack_require__(1);
1703
1704 /* Built-in method references that are verified to be native. */
1705 var DataView = getNative(root, 'DataView');
1706
1707 module.exports = DataView;
1708
1709
1710/***/ },
1711/* 46 */
1712/***/ function(module, exports, __webpack_require__) {
1713
1714 var hashClear = __webpack_require__(90),
1715 hashDelete = __webpack_require__(91),
1716 hashGet = __webpack_require__(92),
1717 hashHas = __webpack_require__(93),
1718 hashSet = __webpack_require__(94);
1719
1720 /**
1721 * Creates a hash object.
1722 *
1723 * @private
1724 * @constructor
1725 * @param {Array} [entries] The key-value pairs to cache.
1726 */
1727 function Hash(entries) {
1728 var index = -1,
1729 length = entries == null ? 0 : entries.length;
1730
1731 this.clear();
1732 while (++index < length) {
1733 var entry = entries[index];
1734 this.set(entry[0], entry[1]);
1735 }
1736 }
1737
1738 // Add methods to `Hash`.
1739 Hash.prototype.clear = hashClear;
1740 Hash.prototype['delete'] = hashDelete;
1741 Hash.prototype.get = hashGet;
1742 Hash.prototype.has = hashHas;
1743 Hash.prototype.set = hashSet;
1744
1745 module.exports = Hash;
1746
1747
1748/***/ },
1749/* 47 */
1750/***/ function(module, exports, __webpack_require__) {
1751
1752 var getNative = __webpack_require__(3),
1753 root = __webpack_require__(1);
1754
1755 /* Built-in method references that are verified to be native. */
1756 var Promise = getNative(root, 'Promise');
1757
1758 module.exports = Promise;
1759
1760
1761/***/ },
1762/* 48 */
1763/***/ function(module, exports, __webpack_require__) {
1764
1765 var getNative = __webpack_require__(3),
1766 root = __webpack_require__(1);
1767
1768 /* Built-in method references that are verified to be native. */
1769 var Set = getNative(root, 'Set');
1770
1771 module.exports = Set;
1772
1773
1774/***/ },
1775/* 49 */
1776/***/ function(module, exports, __webpack_require__) {
1777
1778 var MapCache = __webpack_require__(14),
1779 setCacheAdd = __webpack_require__(113),
1780 setCacheHas = __webpack_require__(114);
1781
1782 /**
1783 *
1784 * Creates an array cache object to store unique values.
1785 *
1786 * @private
1787 * @constructor
1788 * @param {Array} [values] The values to cache.
1789 */
1790 function SetCache(values) {
1791 var index = -1,
1792 length = values == null ? 0 : values.length;
1793
1794 this.__data__ = new MapCache;
1795 while (++index < length) {
1796 this.add(values[index]);
1797 }
1798 }
1799
1800 // Add methods to `SetCache`.
1801 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
1802 SetCache.prototype.has = setCacheHas;
1803
1804 module.exports = SetCache;
1805
1806
1807/***/ },
1808/* 50 */
1809/***/ function(module, exports, __webpack_require__) {
1810
1811 var root = __webpack_require__(1);
1812
1813 /** Built-in value references. */
1814 var Uint8Array = root.Uint8Array;
1815
1816 module.exports = Uint8Array;
1817
1818
1819/***/ },
1820/* 51 */
1821/***/ function(module, exports, __webpack_require__) {
1822
1823 var getNative = __webpack_require__(3),
1824 root = __webpack_require__(1);
1825
1826 /* Built-in method references that are verified to be native. */
1827 var WeakMap = getNative(root, 'WeakMap');
1828
1829 module.exports = WeakMap;
1830
1831
1832/***/ },
1833/* 52 */
1834/***/ function(module, exports) {
1835
1836 /**
1837 * A specialized version of `_.filter` for arrays without support for
1838 * iteratee shorthands.
1839 *
1840 * @private
1841 * @param {Array} [array] The array to iterate over.
1842 * @param {Function} predicate The function invoked per iteration.
1843 * @returns {Array} Returns the new filtered array.
1844 */
1845 function arrayFilter(array, predicate) {
1846 var index = -1,
1847 length = array == null ? 0 : array.length,
1848 resIndex = 0,
1849 result = [];
1850
1851 while (++index < length) {
1852 var value = array[index];
1853 if (predicate(value, index, array)) {
1854 result[resIndex++] = value;
1855 }
1856 }
1857 return result;
1858 }
1859
1860 module.exports = arrayFilter;
1861
1862
1863/***/ },
1864/* 53 */
1865/***/ function(module, exports, __webpack_require__) {
1866
1867 var baseTimes = __webpack_require__(73),
1868 isArguments = __webpack_require__(35),
1869 isArray = __webpack_require__(2),
1870 isBuffer = __webpack_require__(36),
1871 isIndex = __webpack_require__(29),
1872 isTypedArray = __webpack_require__(38);
1873
1874 /** Used for built-in method references. */
1875 var objectProto = Object.prototype;
1876
1877 /** Used to check objects for own properties. */
1878 var hasOwnProperty = objectProto.hasOwnProperty;
1879
1880 /**
1881 * Creates an array of the enumerable property names of the array-like `value`.
1882 *
1883 * @private
1884 * @param {*} value The value to query.
1885 * @param {boolean} inherited Specify returning inherited property names.
1886 * @returns {Array} Returns the array of property names.
1887 */
1888 function arrayLikeKeys(value, inherited) {
1889 var isArr = isArray(value),
1890 isArg = !isArr && isArguments(value),
1891 isBuff = !isArr && !isArg && isBuffer(value),
1892 isType = !isArr && !isArg && !isBuff && isTypedArray(value),
1893 skipIndexes = isArr || isArg || isBuff || isType,
1894 result = skipIndexes ? baseTimes(value.length, String) : [],
1895 length = result.length;
1896
1897 for (var key in value) {
1898 if ((inherited || hasOwnProperty.call(value, key)) &&
1899 !(skipIndexes && (
1900 // Safari 9 has enumerable `arguments.length` in strict mode.
1901 key == 'length' ||
1902 // Node.js 0.10 has enumerable non-index properties on buffers.
1903 (isBuff && (key == 'offset' || key == 'parent')) ||
1904 // PhantomJS 2 has enumerable non-index properties on typed arrays.
1905 (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1906 // Skip index properties.
1907 isIndex(key, length)
1908 ))) {
1909 result.push(key);
1910 }
1911 }
1912 return result;
1913 }
1914
1915 module.exports = arrayLikeKeys;
1916
1917
1918/***/ },
1919/* 54 */
1920/***/ function(module, exports) {
1921
1922 /**
1923 * Appends the elements of `values` to `array`.
1924 *
1925 * @private
1926 * @param {Array} array The array to modify.
1927 * @param {Array} values The values to append.
1928 * @returns {Array} Returns `array`.
1929 */
1930 function arrayPush(array, values) {
1931 var index = -1,
1932 length = values.length,
1933 offset = array.length;
1934
1935 while (++index < length) {
1936 array[offset + index] = values[index];
1937 }
1938 return array;
1939 }
1940
1941 module.exports = arrayPush;
1942
1943
1944/***/ },
1945/* 55 */
1946/***/ function(module, exports) {
1947
1948 /**
1949 * A specialized version of `_.some` for arrays without support for iteratee
1950 * shorthands.
1951 *
1952 * @private
1953 * @param {Array} [array] The array to iterate over.
1954 * @param {Function} predicate The function invoked per iteration.
1955 * @returns {boolean} Returns `true` if any element passes the predicate check,
1956 * else `false`.
1957 */
1958 function arraySome(array, predicate) {
1959 var index = -1,
1960 length = array == null ? 0 : array.length;
1961
1962 while (++index < length) {
1963 if (predicate(array[index], index, array)) {
1964 return true;
1965 }
1966 }
1967 return false;
1968 }
1969
1970 module.exports = arraySome;
1971
1972
1973/***/ },
1974/* 56 */
1975/***/ function(module, exports, __webpack_require__) {
1976
1977 var baseForOwn = __webpack_require__(58),
1978 createBaseEach = __webpack_require__(79);
1979
1980 /**
1981 * The base implementation of `_.forEach` without support for iteratee shorthands.
1982 *
1983 * @private
1984 * @param {Array|Object} collection The collection to iterate over.
1985 * @param {Function} iteratee The function invoked per iteration.
1986 * @returns {Array|Object} Returns `collection`.
1987 */
1988 var baseEach = createBaseEach(baseForOwn);
1989
1990 module.exports = baseEach;
1991
1992
1993/***/ },
1994/* 57 */
1995/***/ function(module, exports, __webpack_require__) {
1996
1997 var createBaseFor = __webpack_require__(80);
1998
1999 /**
2000 * The base implementation of `baseForOwn` which iterates over `object`
2001 * properties returned by `keysFunc` and invokes `iteratee` for each property.
2002 * Iteratee functions may exit iteration early by explicitly returning `false`.
2003 *
2004 * @private
2005 * @param {Object} object The object to iterate over.
2006 * @param {Function} iteratee The function invoked per iteration.
2007 * @param {Function} keysFunc The function to get the keys of `object`.
2008 * @returns {Object} Returns `object`.
2009 */
2010 var baseFor = createBaseFor();
2011
2012 module.exports = baseFor;
2013
2014
2015/***/ },
2016/* 58 */
2017/***/ function(module, exports, __webpack_require__) {
2018
2019 var baseFor = __webpack_require__(57),
2020 keys = __webpack_require__(12);
2021
2022 /**
2023 * The base implementation of `_.forOwn` without support for iteratee shorthands.
2024 *
2025 * @private
2026 * @param {Object} object The object to iterate over.
2027 * @param {Function} iteratee The function invoked per iteration.
2028 * @returns {Object} Returns `object`.
2029 */
2030 function baseForOwn(object, iteratee) {
2031 return object && baseFor(object, iteratee, keys);
2032 }
2033
2034 module.exports = baseForOwn;
2035
2036
2037/***/ },
2038/* 59 */
2039/***/ function(module, exports, __webpack_require__) {
2040
2041 var arrayPush = __webpack_require__(54),
2042 isArray = __webpack_require__(2);
2043
2044 /**
2045 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2046 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2047 * symbols of `object`.
2048 *
2049 * @private
2050 * @param {Object} object The object to query.
2051 * @param {Function} keysFunc The function to get the keys of `object`.
2052 * @param {Function} symbolsFunc The function to get the symbols of `object`.
2053 * @returns {Array} Returns the array of property names and symbols.
2054 */
2055 function baseGetAllKeys(object, keysFunc, symbolsFunc) {
2056 var result = keysFunc(object);
2057 return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
2058 }
2059
2060 module.exports = baseGetAllKeys;
2061
2062
2063/***/ },
2064/* 60 */
2065/***/ function(module, exports) {
2066
2067 /**
2068 * The base implementation of `_.hasIn` without support for deep paths.
2069 *
2070 * @private
2071 * @param {Object} [object] The object to query.
2072 * @param {Array|string} key The key to check.
2073 * @returns {boolean} Returns `true` if `key` exists, else `false`.
2074 */
2075 function baseHasIn(object, key) {
2076 return object != null && key in Object(object);
2077 }
2078
2079 module.exports = baseHasIn;
2080
2081
2082/***/ },
2083/* 61 */
2084/***/ function(module, exports, __webpack_require__) {
2085
2086 var baseGetTag = __webpack_require__(4),
2087 isObjectLike = __webpack_require__(5);
2088
2089 /** `Object#toString` result references. */
2090 var argsTag = '[object Arguments]';
2091
2092 /**
2093 * The base implementation of `_.isArguments`.
2094 *
2095 * @private
2096 * @param {*} value The value to check.
2097 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
2098 */
2099 function baseIsArguments(value) {
2100 return isObjectLike(value) && baseGetTag(value) == argsTag;
2101 }
2102
2103 module.exports = baseIsArguments;
2104
2105
2106/***/ },
2107/* 62 */
2108/***/ function(module, exports, __webpack_require__) {
2109
2110 var Stack = __webpack_require__(23),
2111 equalArrays = __webpack_require__(26),
2112 equalByTag = __webpack_require__(82),
2113 equalObjects = __webpack_require__(83),
2114 getTag = __webpack_require__(28),
2115 isArray = __webpack_require__(2),
2116 isBuffer = __webpack_require__(36),
2117 isTypedArray = __webpack_require__(38);
2118
2119 /** Used to compose bitmasks for value comparisons. */
2120 var COMPARE_PARTIAL_FLAG = 1;
2121
2122 /** `Object#toString` result references. */
2123 var argsTag = '[object Arguments]',
2124 arrayTag = '[object Array]',
2125 objectTag = '[object Object]';
2126
2127 /** Used for built-in method references. */
2128 var objectProto = Object.prototype;
2129
2130 /** Used to check objects for own properties. */
2131 var hasOwnProperty = objectProto.hasOwnProperty;
2132
2133 /**
2134 * A specialized version of `baseIsEqual` for arrays and objects which performs
2135 * deep comparisons and tracks traversed objects enabling objects with circular
2136 * references to be compared.
2137 *
2138 * @private
2139 * @param {Object} object The object to compare.
2140 * @param {Object} other The other object to compare.
2141 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2142 * @param {Function} customizer The function to customize comparisons.
2143 * @param {Function} equalFunc The function to determine equivalents of values.
2144 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
2145 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2146 */
2147 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
2148 var objIsArr = isArray(object),
2149 othIsArr = isArray(other),
2150 objTag = objIsArr ? arrayTag : getTag(object),
2151 othTag = othIsArr ? arrayTag : getTag(other);
2152
2153 objTag = objTag == argsTag ? objectTag : objTag;
2154 othTag = othTag == argsTag ? objectTag : othTag;
2155
2156 var objIsObj = objTag == objectTag,
2157 othIsObj = othTag == objectTag,
2158 isSameTag = objTag == othTag;
2159
2160 if (isSameTag && isBuffer(object)) {
2161 if (!isBuffer(other)) {
2162 return false;
2163 }
2164 objIsArr = true;
2165 objIsObj = false;
2166 }
2167 if (isSameTag && !objIsObj) {
2168 stack || (stack = new Stack);
2169 return (objIsArr || isTypedArray(object))
2170 ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
2171 : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
2172 }
2173 if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
2174 var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
2175 othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
2176
2177 if (objIsWrapped || othIsWrapped) {
2178 var objUnwrapped = objIsWrapped ? object.value() : object,
2179 othUnwrapped = othIsWrapped ? other.value() : other;
2180
2181 stack || (stack = new Stack);
2182 return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
2183 }
2184 }
2185 if (!isSameTag) {
2186 return false;
2187 }
2188 stack || (stack = new Stack);
2189 return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
2190 }
2191
2192 module.exports = baseIsEqualDeep;
2193
2194
2195/***/ },
2196/* 63 */
2197/***/ function(module, exports, __webpack_require__) {
2198
2199 var Stack = __webpack_require__(23),
2200 baseIsEqual = __webpack_require__(16);
2201
2202 /** Used to compose bitmasks for value comparisons. */
2203 var COMPARE_PARTIAL_FLAG = 1,
2204 COMPARE_UNORDERED_FLAG = 2;
2205
2206 /**
2207 * The base implementation of `_.isMatch` without support for iteratee shorthands.
2208 *
2209 * @private
2210 * @param {Object} object The object to inspect.
2211 * @param {Object} source The object of property values to match.
2212 * @param {Array} matchData The property names, values, and compare flags to match.
2213 * @param {Function} [customizer] The function to customize comparisons.
2214 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
2215 */
2216 function baseIsMatch(object, source, matchData, customizer) {
2217 var index = matchData.length,
2218 length = index,
2219 noCustomizer = !customizer;
2220
2221 if (object == null) {
2222 return !length;
2223 }
2224 object = Object(object);
2225 while (index--) {
2226 var data = matchData[index];
2227 if ((noCustomizer && data[2])
2228 ? data[1] !== object[data[0]]
2229 : !(data[0] in object)
2230 ) {
2231 return false;
2232 }
2233 }
2234 while (++index < length) {
2235 data = matchData[index];
2236 var key = data[0],
2237 objValue = object[key],
2238 srcValue = data[1];
2239
2240 if (noCustomizer && data[2]) {
2241 if (objValue === undefined && !(key in object)) {
2242 return false;
2243 }
2244 } else {
2245 var stack = new Stack;
2246 if (customizer) {
2247 var result = customizer(objValue, srcValue, key, object, source, stack);
2248 }
2249 if (!(result === undefined
2250 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
2251 : result
2252 )) {
2253 return false;
2254 }
2255 }
2256 }
2257 return true;
2258 }
2259
2260 module.exports = baseIsMatch;
2261
2262
2263/***/ },
2264/* 64 */
2265/***/ function(module, exports, __webpack_require__) {
2266
2267 var isFunction = __webpack_require__(37),
2268 isMasked = __webpack_require__(96),
2269 isObject = __webpack_require__(20),
2270 toSource = __webpack_require__(33);
2271
2272 /**
2273 * Used to match `RegExp`
2274 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
2275 */
2276 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
2277
2278 /** Used to detect host constructors (Safari). */
2279 var reIsHostCtor = /^\[object .+?Constructor\]$/;
2280
2281 /** Used for built-in method references. */
2282 var funcProto = Function.prototype,
2283 objectProto = Object.prototype;
2284
2285 /** Used to resolve the decompiled source of functions. */
2286 var funcToString = funcProto.toString;
2287
2288 /** Used to check objects for own properties. */
2289 var hasOwnProperty = objectProto.hasOwnProperty;
2290
2291 /** Used to detect if a method is native. */
2292 var reIsNative = RegExp('^' +
2293 funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
2294 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
2295 );
2296
2297 /**
2298 * The base implementation of `_.isNative` without bad shim checks.
2299 *
2300 * @private
2301 * @param {*} value The value to check.
2302 * @returns {boolean} Returns `true` if `value` is a native function,
2303 * else `false`.
2304 */
2305 function baseIsNative(value) {
2306 if (!isObject(value) || isMasked(value)) {
2307 return false;
2308 }
2309 var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
2310 return pattern.test(toSource(value));
2311 }
2312
2313 module.exports = baseIsNative;
2314
2315
2316/***/ },
2317/* 65 */
2318/***/ function(module, exports, __webpack_require__) {
2319
2320 var baseGetTag = __webpack_require__(4),
2321 isLength = __webpack_require__(19),
2322 isObjectLike = __webpack_require__(5);
2323
2324 /** `Object#toString` result references. */
2325 var argsTag = '[object Arguments]',
2326 arrayTag = '[object Array]',
2327 boolTag = '[object Boolean]',
2328 dateTag = '[object Date]',
2329 errorTag = '[object Error]',
2330 funcTag = '[object Function]',
2331 mapTag = '[object Map]',
2332 numberTag = '[object Number]',
2333 objectTag = '[object Object]',
2334 regexpTag = '[object RegExp]',
2335 setTag = '[object Set]',
2336 stringTag = '[object String]',
2337 weakMapTag = '[object WeakMap]';
2338
2339 var arrayBufferTag = '[object ArrayBuffer]',
2340 dataViewTag = '[object DataView]',
2341 float32Tag = '[object Float32Array]',
2342 float64Tag = '[object Float64Array]',
2343 int8Tag = '[object Int8Array]',
2344 int16Tag = '[object Int16Array]',
2345 int32Tag = '[object Int32Array]',
2346 uint8Tag = '[object Uint8Array]',
2347 uint8ClampedTag = '[object Uint8ClampedArray]',
2348 uint16Tag = '[object Uint16Array]',
2349 uint32Tag = '[object Uint32Array]';
2350
2351 /** Used to identify `toStringTag` values of typed arrays. */
2352 var typedArrayTags = {};
2353 typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
2354 typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
2355 typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
2356 typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
2357 typedArrayTags[uint32Tag] = true;
2358 typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
2359 typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
2360 typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
2361 typedArrayTags[errorTag] = typedArrayTags[funcTag] =
2362 typedArrayTags[mapTag] = typedArrayTags[numberTag] =
2363 typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
2364 typedArrayTags[setTag] = typedArrayTags[stringTag] =
2365 typedArrayTags[weakMapTag] = false;
2366
2367 /**
2368 * The base implementation of `_.isTypedArray` without Node.js optimizations.
2369 *
2370 * @private
2371 * @param {*} value The value to check.
2372 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2373 */
2374 function baseIsTypedArray(value) {
2375 return isObjectLike(value) &&
2376 isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
2377 }
2378
2379 module.exports = baseIsTypedArray;
2380
2381
2382/***/ },
2383/* 66 */
2384/***/ function(module, exports, __webpack_require__) {
2385
2386 var baseMatches = __webpack_require__(69),
2387 baseMatchesProperty = __webpack_require__(70),
2388 identity = __webpack_require__(125),
2389 isArray = __webpack_require__(2),
2390 property = __webpack_require__(129);
2391
2392 /**
2393 * The base implementation of `_.iteratee`.
2394 *
2395 * @private
2396 * @param {*} [value=_.identity] The value to convert to an iteratee.
2397 * @returns {Function} Returns the iteratee.
2398 */
2399 function baseIteratee(value) {
2400 // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
2401 // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
2402 if (typeof value == 'function') {
2403 return value;
2404 }
2405 if (value == null) {
2406 return identity;
2407 }
2408 if (typeof value == 'object') {
2409 return isArray(value)
2410 ? baseMatchesProperty(value[0], value[1])
2411 : baseMatches(value);
2412 }
2413 return property(value);
2414 }
2415
2416 module.exports = baseIteratee;
2417
2418
2419/***/ },
2420/* 67 */
2421/***/ function(module, exports, __webpack_require__) {
2422
2423 var isPrototype = __webpack_require__(97),
2424 nativeKeys = __webpack_require__(109);
2425
2426 /** Used for built-in method references. */
2427 var objectProto = Object.prototype;
2428
2429 /** Used to check objects for own properties. */
2430 var hasOwnProperty = objectProto.hasOwnProperty;
2431
2432 /**
2433 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
2434 *
2435 * @private
2436 * @param {Object} object The object to query.
2437 * @returns {Array} Returns the array of property names.
2438 */
2439 function baseKeys(object) {
2440 if (!isPrototype(object)) {
2441 return nativeKeys(object);
2442 }
2443 var result = [];
2444 for (var key in Object(object)) {
2445 if (hasOwnProperty.call(object, key) && key != 'constructor') {
2446 result.push(key);
2447 }
2448 }
2449 return result;
2450 }
2451
2452 module.exports = baseKeys;
2453
2454
2455/***/ },
2456/* 68 */
2457/***/ function(module, exports, __webpack_require__) {
2458
2459 var baseEach = __webpack_require__(56),
2460 isArrayLike = __webpack_require__(18);
2461
2462 /**
2463 * The base implementation of `_.map` without support for iteratee shorthands.
2464 *
2465 * @private
2466 * @param {Array|Object} collection The collection to iterate over.
2467 * @param {Function} iteratee The function invoked per iteration.
2468 * @returns {Array} Returns the new mapped array.
2469 */
2470 function baseMap(collection, iteratee) {
2471 var index = -1,
2472 result = isArrayLike(collection) ? Array(collection.length) : [];
2473
2474 baseEach(collection, function(value, key, collection) {
2475 result[++index] = iteratee(value, key, collection);
2476 });
2477 return result;
2478 }
2479
2480 module.exports = baseMap;
2481
2482
2483/***/ },
2484/* 69 */
2485/***/ function(module, exports, __webpack_require__) {
2486
2487 var baseIsMatch = __webpack_require__(63),
2488 getMatchData = __webpack_require__(85),
2489 matchesStrictComparable = __webpack_require__(32);
2490
2491 /**
2492 * The base implementation of `_.matches` which doesn't clone `source`.
2493 *
2494 * @private
2495 * @param {Object} source The object of property values to match.
2496 * @returns {Function} Returns the new spec function.
2497 */
2498 function baseMatches(source) {
2499 var matchData = getMatchData(source);
2500 if (matchData.length == 1 && matchData[0][2]) {
2501 return matchesStrictComparable(matchData[0][0], matchData[0][1]);
2502 }
2503 return function(object) {
2504 return object === source || baseIsMatch(object, source, matchData);
2505 };
2506 }
2507
2508 module.exports = baseMatches;
2509
2510
2511/***/ },
2512/* 70 */
2513/***/ function(module, exports, __webpack_require__) {
2514
2515 var baseIsEqual = __webpack_require__(16),
2516 get = __webpack_require__(123),
2517 hasIn = __webpack_require__(124),
2518 isKey = __webpack_require__(17),
2519 isStrictComparable = __webpack_require__(30),
2520 matchesStrictComparable = __webpack_require__(32),
2521 toKey = __webpack_require__(11);
2522
2523 /** Used to compose bitmasks for value comparisons. */
2524 var COMPARE_PARTIAL_FLAG = 1,
2525 COMPARE_UNORDERED_FLAG = 2;
2526
2527 /**
2528 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
2529 *
2530 * @private
2531 * @param {string} path The path of the property to get.
2532 * @param {*} srcValue The value to match.
2533 * @returns {Function} Returns the new spec function.
2534 */
2535 function baseMatchesProperty(path, srcValue) {
2536 if (isKey(path) && isStrictComparable(srcValue)) {
2537 return matchesStrictComparable(toKey(path), srcValue);
2538 }
2539 return function(object) {
2540 var objValue = get(object, path);
2541 return (objValue === undefined && objValue === srcValue)
2542 ? hasIn(object, path)
2543 : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
2544 };
2545 }
2546
2547 module.exports = baseMatchesProperty;
2548
2549
2550/***/ },
2551/* 71 */
2552/***/ function(module, exports) {
2553
2554 /**
2555 * The base implementation of `_.property` without support for deep paths.
2556 *
2557 * @private
2558 * @param {string} key The key of the property to get.
2559 * @returns {Function} Returns the new accessor function.
2560 */
2561 function baseProperty(key) {
2562 return function(object) {
2563 return object == null ? undefined : object[key];
2564 };
2565 }
2566
2567 module.exports = baseProperty;
2568
2569
2570/***/ },
2571/* 72 */
2572/***/ function(module, exports, __webpack_require__) {
2573
2574 var baseGet = __webpack_require__(24);
2575
2576 /**
2577 * A specialized version of `baseProperty` which supports deep paths.
2578 *
2579 * @private
2580 * @param {Array|string} path The path of the property to get.
2581 * @returns {Function} Returns the new accessor function.
2582 */
2583 function basePropertyDeep(path) {
2584 return function(object) {
2585 return baseGet(object, path);
2586 };
2587 }
2588
2589 module.exports = basePropertyDeep;
2590
2591
2592/***/ },
2593/* 73 */
2594/***/ function(module, exports) {
2595
2596 /**
2597 * The base implementation of `_.times` without support for iteratee shorthands
2598 * or max array length checks.
2599 *
2600 * @private
2601 * @param {number} n The number of times to invoke `iteratee`.
2602 * @param {Function} iteratee The function invoked per iteration.
2603 * @returns {Array} Returns the array of results.
2604 */
2605 function baseTimes(n, iteratee) {
2606 var index = -1,
2607 result = Array(n);
2608
2609 while (++index < n) {
2610 result[index] = iteratee(index);
2611 }
2612 return result;
2613 }
2614
2615 module.exports = baseTimes;
2616
2617
2618/***/ },
2619/* 74 */
2620/***/ function(module, exports, __webpack_require__) {
2621
2622 var arrayMap = __webpack_require__(15);
2623
2624 /**
2625 * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
2626 * of key-value pairs for `object` corresponding to the property names of `props`.
2627 *
2628 * @private
2629 * @param {Object} object The object to query.
2630 * @param {Array} props The property names to get values for.
2631 * @returns {Object} Returns the key-value pairs.
2632 */
2633 function baseToPairs(object, props) {
2634 return arrayMap(props, function(key) {
2635 return [key, object[key]];
2636 });
2637 }
2638
2639 module.exports = baseToPairs;
2640
2641
2642/***/ },
2643/* 75 */
2644/***/ function(module, exports, __webpack_require__) {
2645
2646 var Symbol = __webpack_require__(7),
2647 arrayMap = __webpack_require__(15),
2648 isArray = __webpack_require__(2),
2649 isSymbol = __webpack_require__(21);
2650
2651 /** Used as references for various `Number` constants. */
2652 var INFINITY = 1 / 0;
2653
2654 /** Used to convert symbols to primitives and strings. */
2655 var symbolProto = Symbol ? Symbol.prototype : undefined,
2656 symbolToString = symbolProto ? symbolProto.toString : undefined;
2657
2658 /**
2659 * The base implementation of `_.toString` which doesn't convert nullish
2660 * values to empty strings.
2661 *
2662 * @private
2663 * @param {*} value The value to process.
2664 * @returns {string} Returns the string.
2665 */
2666 function baseToString(value) {
2667 // Exit early for strings to avoid a performance hit in some environments.
2668 if (typeof value == 'string') {
2669 return value;
2670 }
2671 if (isArray(value)) {
2672 // Recursively convert values (susceptible to call stack limits).
2673 return arrayMap(value, baseToString) + '';
2674 }
2675 if (isSymbol(value)) {
2676 return symbolToString ? symbolToString.call(value) : '';
2677 }
2678 var result = (value + '');
2679 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2680 }
2681
2682 module.exports = baseToString;
2683
2684
2685/***/ },
2686/* 76 */
2687/***/ function(module, exports) {
2688
2689 /**
2690 * The base implementation of `_.unary` without support for storing metadata.
2691 *
2692 * @private
2693 * @param {Function} func The function to cap arguments for.
2694 * @returns {Function} Returns the new capped function.
2695 */
2696 function baseUnary(func) {
2697 return function(value) {
2698 return func(value);
2699 };
2700 }
2701
2702 module.exports = baseUnary;
2703
2704
2705/***/ },
2706/* 77 */
2707/***/ function(module, exports) {
2708
2709 /**
2710 * Checks if a `cache` value for `key` exists.
2711 *
2712 * @private
2713 * @param {Object} cache The cache to query.
2714 * @param {string} key The key of the entry to check.
2715 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2716 */
2717 function cacheHas(cache, key) {
2718 return cache.has(key);
2719 }
2720
2721 module.exports = cacheHas;
2722
2723
2724/***/ },
2725/* 78 */
2726/***/ function(module, exports, __webpack_require__) {
2727
2728 var root = __webpack_require__(1);
2729
2730 /** Used to detect overreaching core-js shims. */
2731 var coreJsData = root['__core-js_shared__'];
2732
2733 module.exports = coreJsData;
2734
2735
2736/***/ },
2737/* 79 */
2738/***/ function(module, exports, __webpack_require__) {
2739
2740 var isArrayLike = __webpack_require__(18);
2741
2742 /**
2743 * Creates a `baseEach` or `baseEachRight` function.
2744 *
2745 * @private
2746 * @param {Function} eachFunc The function to iterate over a collection.
2747 * @param {boolean} [fromRight] Specify iterating from right to left.
2748 * @returns {Function} Returns the new base function.
2749 */
2750 function createBaseEach(eachFunc, fromRight) {
2751 return function(collection, iteratee) {
2752 if (collection == null) {
2753 return collection;
2754 }
2755 if (!isArrayLike(collection)) {
2756 return eachFunc(collection, iteratee);
2757 }
2758 var length = collection.length,
2759 index = fromRight ? length : -1,
2760 iterable = Object(collection);
2761
2762 while ((fromRight ? index-- : ++index < length)) {
2763 if (iteratee(iterable[index], index, iterable) === false) {
2764 break;
2765 }
2766 }
2767 return collection;
2768 };
2769 }
2770
2771 module.exports = createBaseEach;
2772
2773
2774/***/ },
2775/* 80 */
2776/***/ function(module, exports) {
2777
2778 /**
2779 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
2780 *
2781 * @private
2782 * @param {boolean} [fromRight] Specify iterating from right to left.
2783 * @returns {Function} Returns the new base function.
2784 */
2785 function createBaseFor(fromRight) {
2786 return function(object, iteratee, keysFunc) {
2787 var index = -1,
2788 iterable = Object(object),
2789 props = keysFunc(object),
2790 length = props.length;
2791
2792 while (length--) {
2793 var key = props[fromRight ? length : ++index];
2794 if (iteratee(iterable[key], key, iterable) === false) {
2795 break;
2796 }
2797 }
2798 return object;
2799 };
2800 }
2801
2802 module.exports = createBaseFor;
2803
2804
2805/***/ },
2806/* 81 */
2807/***/ function(module, exports, __webpack_require__) {
2808
2809 var baseToPairs = __webpack_require__(74),
2810 getTag = __webpack_require__(28),
2811 mapToArray = __webpack_require__(31),
2812 setToPairs = __webpack_require__(116);
2813
2814 /** `Object#toString` result references. */
2815 var mapTag = '[object Map]',
2816 setTag = '[object Set]';
2817
2818 /**
2819 * Creates a `_.toPairs` or `_.toPairsIn` function.
2820 *
2821 * @private
2822 * @param {Function} keysFunc The function to get the keys of a given object.
2823 * @returns {Function} Returns the new pairs function.
2824 */
2825 function createToPairs(keysFunc) {
2826 return function(object) {
2827 var tag = getTag(object);
2828 if (tag == mapTag) {
2829 return mapToArray(object);
2830 }
2831 if (tag == setTag) {
2832 return setToPairs(object);
2833 }
2834 return baseToPairs(object, keysFunc(object));
2835 };
2836 }
2837
2838 module.exports = createToPairs;
2839
2840
2841/***/ },
2842/* 82 */
2843/***/ function(module, exports, __webpack_require__) {
2844
2845 var Symbol = __webpack_require__(7),
2846 Uint8Array = __webpack_require__(50),
2847 eq = __webpack_require__(34),
2848 equalArrays = __webpack_require__(26),
2849 mapToArray = __webpack_require__(31),
2850 setToArray = __webpack_require__(115);
2851
2852 /** Used to compose bitmasks for value comparisons. */
2853 var COMPARE_PARTIAL_FLAG = 1,
2854 COMPARE_UNORDERED_FLAG = 2;
2855
2856 /** `Object#toString` result references. */
2857 var boolTag = '[object Boolean]',
2858 dateTag = '[object Date]',
2859 errorTag = '[object Error]',
2860 mapTag = '[object Map]',
2861 numberTag = '[object Number]',
2862 regexpTag = '[object RegExp]',
2863 setTag = '[object Set]',
2864 stringTag = '[object String]',
2865 symbolTag = '[object Symbol]';
2866
2867 var arrayBufferTag = '[object ArrayBuffer]',
2868 dataViewTag = '[object DataView]';
2869
2870 /** Used to convert symbols to primitives and strings. */
2871 var symbolProto = Symbol ? Symbol.prototype : undefined,
2872 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
2873
2874 /**
2875 * A specialized version of `baseIsEqualDeep` for comparing objects of
2876 * the same `toStringTag`.
2877 *
2878 * **Note:** This function only supports comparing values with tags of
2879 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
2880 *
2881 * @private
2882 * @param {Object} object The object to compare.
2883 * @param {Object} other The other object to compare.
2884 * @param {string} tag The `toStringTag` of the objects to compare.
2885 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2886 * @param {Function} customizer The function to customize comparisons.
2887 * @param {Function} equalFunc The function to determine equivalents of values.
2888 * @param {Object} stack Tracks traversed `object` and `other` objects.
2889 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2890 */
2891 function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
2892 switch (tag) {
2893 case dataViewTag:
2894 if ((object.byteLength != other.byteLength) ||
2895 (object.byteOffset != other.byteOffset)) {
2896 return false;
2897 }
2898 object = object.buffer;
2899 other = other.buffer;
2900
2901 case arrayBufferTag:
2902 if ((object.byteLength != other.byteLength) ||
2903 !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
2904 return false;
2905 }
2906 return true;
2907
2908 case boolTag:
2909 case dateTag:
2910 case numberTag:
2911 // Coerce booleans to `1` or `0` and dates to milliseconds.
2912 // Invalid dates are coerced to `NaN`.
2913 return eq(+object, +other);
2914
2915 case errorTag:
2916 return object.name == other.name && object.message == other.message;
2917
2918 case regexpTag:
2919 case stringTag:
2920 // Coerce regexes to strings and treat strings, primitives and objects,
2921 // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
2922 // for more details.
2923 return object == (other + '');
2924
2925 case mapTag:
2926 var convert = mapToArray;
2927
2928 case setTag:
2929 var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
2930 convert || (convert = setToArray);
2931
2932 if (object.size != other.size && !isPartial) {
2933 return false;
2934 }
2935 // Assume cyclic values are equal.
2936 var stacked = stack.get(object);
2937 if (stacked) {
2938 return stacked == other;
2939 }
2940 bitmask |= COMPARE_UNORDERED_FLAG;
2941
2942 // Recursively compare objects (susceptible to call stack limits).
2943 stack.set(object, other);
2944 var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
2945 stack['delete'](object);
2946 return result;
2947
2948 case symbolTag:
2949 if (symbolValueOf) {
2950 return symbolValueOf.call(object) == symbolValueOf.call(other);
2951 }
2952 }
2953 return false;
2954 }
2955
2956 module.exports = equalByTag;
2957
2958
2959/***/ },
2960/* 83 */
2961/***/ function(module, exports, __webpack_require__) {
2962
2963 var getAllKeys = __webpack_require__(84);
2964
2965 /** Used to compose bitmasks for value comparisons. */
2966 var COMPARE_PARTIAL_FLAG = 1;
2967
2968 /** Used for built-in method references. */
2969 var objectProto = Object.prototype;
2970
2971 /** Used to check objects for own properties. */
2972 var hasOwnProperty = objectProto.hasOwnProperty;
2973
2974 /**
2975 * A specialized version of `baseIsEqualDeep` for objects with support for
2976 * partial deep comparisons.
2977 *
2978 * @private
2979 * @param {Object} object The object to compare.
2980 * @param {Object} other The other object to compare.
2981 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2982 * @param {Function} customizer The function to customize comparisons.
2983 * @param {Function} equalFunc The function to determine equivalents of values.
2984 * @param {Object} stack Tracks traversed `object` and `other` objects.
2985 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2986 */
2987 function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
2988 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
2989 objProps = getAllKeys(object),
2990 objLength = objProps.length,
2991 othProps = getAllKeys(other),
2992 othLength = othProps.length;
2993
2994 if (objLength != othLength && !isPartial) {
2995 return false;
2996 }
2997 var index = objLength;
2998 while (index--) {
2999 var key = objProps[index];
3000 if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
3001 return false;
3002 }
3003 }
3004 // Assume cyclic values are equal.
3005 var stacked = stack.get(object);
3006 if (stacked && stack.get(other)) {
3007 return stacked == other;
3008 }
3009 var result = true;
3010 stack.set(object, other);
3011 stack.set(other, object);
3012
3013 var skipCtor = isPartial;
3014 while (++index < objLength) {
3015 key = objProps[index];
3016 var objValue = object[key],
3017 othValue = other[key];
3018
3019 if (customizer) {
3020 var compared = isPartial
3021 ? customizer(othValue, objValue, key, other, object, stack)
3022 : customizer(objValue, othValue, key, object, other, stack);
3023 }
3024 // Recursively compare objects (susceptible to call stack limits).
3025 if (!(compared === undefined
3026 ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
3027 : compared
3028 )) {
3029 result = false;
3030 break;
3031 }
3032 skipCtor || (skipCtor = key == 'constructor');
3033 }
3034 if (result && !skipCtor) {
3035 var objCtor = object.constructor,
3036 othCtor = other.constructor;
3037
3038 // Non `Object` object instances with different constructors are not equal.
3039 if (objCtor != othCtor &&
3040 ('constructor' in object && 'constructor' in other) &&
3041 !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
3042 typeof othCtor == 'function' && othCtor instanceof othCtor)) {
3043 result = false;
3044 }
3045 }
3046 stack['delete'](object);
3047 stack['delete'](other);
3048 return result;
3049 }
3050
3051 module.exports = equalObjects;
3052
3053
3054/***/ },
3055/* 84 */
3056/***/ function(module, exports, __webpack_require__) {
3057
3058 var baseGetAllKeys = __webpack_require__(59),
3059 getSymbols = __webpack_require__(87),
3060 keys = __webpack_require__(12);
3061
3062 /**
3063 * Creates an array of own enumerable property names and symbols of `object`.
3064 *
3065 * @private
3066 * @param {Object} object The object to query.
3067 * @returns {Array} Returns the array of property names and symbols.
3068 */
3069 function getAllKeys(object) {
3070 return baseGetAllKeys(object, keys, getSymbols);
3071 }
3072
3073 module.exports = getAllKeys;
3074
3075
3076/***/ },
3077/* 85 */
3078/***/ function(module, exports, __webpack_require__) {
3079
3080 var isStrictComparable = __webpack_require__(30),
3081 keys = __webpack_require__(12);
3082
3083 /**
3084 * Gets the property names, values, and compare flags of `object`.
3085 *
3086 * @private
3087 * @param {Object} object The object to query.
3088 * @returns {Array} Returns the match data of `object`.
3089 */
3090 function getMatchData(object) {
3091 var result = keys(object),
3092 length = result.length;
3093
3094 while (length--) {
3095 var key = result[length],
3096 value = object[key];
3097
3098 result[length] = [key, value, isStrictComparable(value)];
3099 }
3100 return result;
3101 }
3102
3103 module.exports = getMatchData;
3104
3105
3106/***/ },
3107/* 86 */
3108/***/ function(module, exports, __webpack_require__) {
3109
3110 var Symbol = __webpack_require__(7);
3111
3112 /** Used for built-in method references. */
3113 var objectProto = Object.prototype;
3114
3115 /** Used to check objects for own properties. */
3116 var hasOwnProperty = objectProto.hasOwnProperty;
3117
3118 /**
3119 * Used to resolve the
3120 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3121 * of values.
3122 */
3123 var nativeObjectToString = objectProto.toString;
3124
3125 /** Built-in value references. */
3126 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3127
3128 /**
3129 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3130 *
3131 * @private
3132 * @param {*} value The value to query.
3133 * @returns {string} Returns the raw `toStringTag`.
3134 */
3135 function getRawTag(value) {
3136 var isOwn = hasOwnProperty.call(value, symToStringTag),
3137 tag = value[symToStringTag];
3138
3139 try {
3140 value[symToStringTag] = undefined;
3141 var unmasked = true;
3142 } catch (e) {}
3143
3144 var result = nativeObjectToString.call(value);
3145 if (unmasked) {
3146 if (isOwn) {
3147 value[symToStringTag] = tag;
3148 } else {
3149 delete value[symToStringTag];
3150 }
3151 }
3152 return result;
3153 }
3154
3155 module.exports = getRawTag;
3156
3157
3158/***/ },
3159/* 87 */
3160/***/ function(module, exports, __webpack_require__) {
3161
3162 var arrayFilter = __webpack_require__(52),
3163 stubArray = __webpack_require__(130);
3164
3165 /** Used for built-in method references. */
3166 var objectProto = Object.prototype;
3167
3168 /** Built-in value references. */
3169 var propertyIsEnumerable = objectProto.propertyIsEnumerable;
3170
3171 /* Built-in method references for those with the same name as other `lodash` methods. */
3172 var nativeGetSymbols = Object.getOwnPropertySymbols;
3173
3174 /**
3175 * Creates an array of the own enumerable symbols of `object`.
3176 *
3177 * @private
3178 * @param {Object} object The object to query.
3179 * @returns {Array} Returns the array of symbols.
3180 */
3181 var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
3182 if (object == null) {
3183 return [];
3184 }
3185 object = Object(object);
3186 return arrayFilter(nativeGetSymbols(object), function(symbol) {
3187 return propertyIsEnumerable.call(object, symbol);
3188 });
3189 };
3190
3191 module.exports = getSymbols;
3192
3193
3194/***/ },
3195/* 88 */
3196/***/ function(module, exports) {
3197
3198 /**
3199 * Gets the value at `key` of `object`.
3200 *
3201 * @private
3202 * @param {Object} [object] The object to query.
3203 * @param {string} key The key of the property to get.
3204 * @returns {*} Returns the property value.
3205 */
3206 function getValue(object, key) {
3207 return object == null ? undefined : object[key];
3208 }
3209
3210 module.exports = getValue;
3211
3212
3213/***/ },
3214/* 89 */
3215/***/ function(module, exports, __webpack_require__) {
3216
3217 var castPath = __webpack_require__(25),
3218 isArguments = __webpack_require__(35),
3219 isArray = __webpack_require__(2),
3220 isIndex = __webpack_require__(29),
3221 isLength = __webpack_require__(19),
3222 toKey = __webpack_require__(11);
3223
3224 /**
3225 * Checks if `path` exists on `object`.
3226 *
3227 * @private
3228 * @param {Object} object The object to query.
3229 * @param {Array|string} path The path to check.
3230 * @param {Function} hasFunc The function to check properties.
3231 * @returns {boolean} Returns `true` if `path` exists, else `false`.
3232 */
3233 function hasPath(object, path, hasFunc) {
3234 path = castPath(path, object);
3235
3236 var index = -1,
3237 length = path.length,
3238 result = false;
3239
3240 while (++index < length) {
3241 var key = toKey(path[index]);
3242 if (!(result = object != null && hasFunc(object, key))) {
3243 break;
3244 }
3245 object = object[key];
3246 }
3247 if (result || ++index != length) {
3248 return result;
3249 }
3250 length = object == null ? 0 : object.length;
3251 return !!length && isLength(length) && isIndex(key, length) &&
3252 (isArray(object) || isArguments(object));
3253 }
3254
3255 module.exports = hasPath;
3256
3257
3258/***/ },
3259/* 90 */
3260/***/ function(module, exports, __webpack_require__) {
3261
3262 var nativeCreate = __webpack_require__(10);
3263
3264 /**
3265 * Removes all key-value entries from the hash.
3266 *
3267 * @private
3268 * @name clear
3269 * @memberOf Hash
3270 */
3271 function hashClear() {
3272 this.__data__ = nativeCreate ? nativeCreate(null) : {};
3273 this.size = 0;
3274 }
3275
3276 module.exports = hashClear;
3277
3278
3279/***/ },
3280/* 91 */
3281/***/ function(module, exports) {
3282
3283 /**
3284 * Removes `key` and its value from the hash.
3285 *
3286 * @private
3287 * @name delete
3288 * @memberOf Hash
3289 * @param {Object} hash The hash to modify.
3290 * @param {string} key The key of the value to remove.
3291 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3292 */
3293 function hashDelete(key) {
3294 var result = this.has(key) && delete this.__data__[key];
3295 this.size -= result ? 1 : 0;
3296 return result;
3297 }
3298
3299 module.exports = hashDelete;
3300
3301
3302/***/ },
3303/* 92 */
3304/***/ function(module, exports, __webpack_require__) {
3305
3306 var nativeCreate = __webpack_require__(10);
3307
3308 /** Used to stand-in for `undefined` hash values. */
3309 var HASH_UNDEFINED = '__lodash_hash_undefined__';
3310
3311 /** Used for built-in method references. */
3312 var objectProto = Object.prototype;
3313
3314 /** Used to check objects for own properties. */
3315 var hasOwnProperty = objectProto.hasOwnProperty;
3316
3317 /**
3318 * Gets the hash value for `key`.
3319 *
3320 * @private
3321 * @name get
3322 * @memberOf Hash
3323 * @param {string} key The key of the value to get.
3324 * @returns {*} Returns the entry value.
3325 */
3326 function hashGet(key) {
3327 var data = this.__data__;
3328 if (nativeCreate) {
3329 var result = data[key];
3330 return result === HASH_UNDEFINED ? undefined : result;
3331 }
3332 return hasOwnProperty.call(data, key) ? data[key] : undefined;
3333 }
3334
3335 module.exports = hashGet;
3336
3337
3338/***/ },
3339/* 93 */
3340/***/ function(module, exports, __webpack_require__) {
3341
3342 var nativeCreate = __webpack_require__(10);
3343
3344 /** Used for built-in method references. */
3345 var objectProto = Object.prototype;
3346
3347 /** Used to check objects for own properties. */
3348 var hasOwnProperty = objectProto.hasOwnProperty;
3349
3350 /**
3351 * Checks if a hash value for `key` exists.
3352 *
3353 * @private
3354 * @name has
3355 * @memberOf Hash
3356 * @param {string} key The key of the entry to check.
3357 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3358 */
3359 function hashHas(key) {
3360 var data = this.__data__;
3361 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
3362 }
3363
3364 module.exports = hashHas;
3365
3366
3367/***/ },
3368/* 94 */
3369/***/ function(module, exports, __webpack_require__) {
3370
3371 var nativeCreate = __webpack_require__(10);
3372
3373 /** Used to stand-in for `undefined` hash values. */
3374 var HASH_UNDEFINED = '__lodash_hash_undefined__';
3375
3376 /**
3377 * Sets the hash `key` to `value`.
3378 *
3379 * @private
3380 * @name set
3381 * @memberOf Hash
3382 * @param {string} key The key of the value to set.
3383 * @param {*} value The value to set.
3384 * @returns {Object} Returns the hash instance.
3385 */
3386 function hashSet(key, value) {
3387 var data = this.__data__;
3388 this.size += this.has(key) ? 0 : 1;
3389 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
3390 return this;
3391 }
3392
3393 module.exports = hashSet;
3394
3395
3396/***/ },
3397/* 95 */
3398/***/ function(module, exports) {
3399
3400 /**
3401 * Checks if `value` is suitable for use as unique object key.
3402 *
3403 * @private
3404 * @param {*} value The value to check.
3405 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
3406 */
3407 function isKeyable(value) {
3408 var type = typeof value;
3409 return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
3410 ? (value !== '__proto__')
3411 : (value === null);
3412 }
3413
3414 module.exports = isKeyable;
3415
3416
3417/***/ },
3418/* 96 */
3419/***/ function(module, exports, __webpack_require__) {
3420
3421 var coreJsData = __webpack_require__(78);
3422
3423 /** Used to detect methods masquerading as native. */
3424 var maskSrcKey = (function() {
3425 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
3426 return uid ? ('Symbol(src)_1.' + uid) : '';
3427 }());
3428
3429 /**
3430 * Checks if `func` has its source masked.
3431 *
3432 * @private
3433 * @param {Function} func The function to check.
3434 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
3435 */
3436 function isMasked(func) {
3437 return !!maskSrcKey && (maskSrcKey in func);
3438 }
3439
3440 module.exports = isMasked;
3441
3442
3443/***/ },
3444/* 97 */
3445/***/ function(module, exports) {
3446
3447 /** Used for built-in method references. */
3448 var objectProto = Object.prototype;
3449
3450 /**
3451 * Checks if `value` is likely a prototype object.
3452 *
3453 * @private
3454 * @param {*} value The value to check.
3455 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
3456 */
3457 function isPrototype(value) {
3458 var Ctor = value && value.constructor,
3459 proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
3460
3461 return value === proto;
3462 }
3463
3464 module.exports = isPrototype;
3465
3466
3467/***/ },
3468/* 98 */
3469/***/ function(module, exports) {
3470
3471 /**
3472 * Removes all key-value entries from the list cache.
3473 *
3474 * @private
3475 * @name clear
3476 * @memberOf ListCache
3477 */
3478 function listCacheClear() {
3479 this.__data__ = [];
3480 this.size = 0;
3481 }
3482
3483 module.exports = listCacheClear;
3484
3485
3486/***/ },
3487/* 99 */
3488/***/ function(module, exports, __webpack_require__) {
3489
3490 var assocIndexOf = __webpack_require__(8);
3491
3492 /** Used for built-in method references. */
3493 var arrayProto = Array.prototype;
3494
3495 /** Built-in value references. */
3496 var splice = arrayProto.splice;
3497
3498 /**
3499 * Removes `key` and its value from the list cache.
3500 *
3501 * @private
3502 * @name delete
3503 * @memberOf ListCache
3504 * @param {string} key The key of the value to remove.
3505 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3506 */
3507 function listCacheDelete(key) {
3508 var data = this.__data__,
3509 index = assocIndexOf(data, key);
3510
3511 if (index < 0) {
3512 return false;
3513 }
3514 var lastIndex = data.length - 1;
3515 if (index == lastIndex) {
3516 data.pop();
3517 } else {
3518 splice.call(data, index, 1);
3519 }
3520 --this.size;
3521 return true;
3522 }
3523
3524 module.exports = listCacheDelete;
3525
3526
3527/***/ },
3528/* 100 */
3529/***/ function(module, exports, __webpack_require__) {
3530
3531 var assocIndexOf = __webpack_require__(8);
3532
3533 /**
3534 * Gets the list cache value for `key`.
3535 *
3536 * @private
3537 * @name get
3538 * @memberOf ListCache
3539 * @param {string} key The key of the value to get.
3540 * @returns {*} Returns the entry value.
3541 */
3542 function listCacheGet(key) {
3543 var data = this.__data__,
3544 index = assocIndexOf(data, key);
3545
3546 return index < 0 ? undefined : data[index][1];
3547 }
3548
3549 module.exports = listCacheGet;
3550
3551
3552/***/ },
3553/* 101 */
3554/***/ function(module, exports, __webpack_require__) {
3555
3556 var assocIndexOf = __webpack_require__(8);
3557
3558 /**
3559 * Checks if a list cache value for `key` exists.
3560 *
3561 * @private
3562 * @name has
3563 * @memberOf ListCache
3564 * @param {string} key The key of the entry to check.
3565 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3566 */
3567 function listCacheHas(key) {
3568 return assocIndexOf(this.__data__, key) > -1;
3569 }
3570
3571 module.exports = listCacheHas;
3572
3573
3574/***/ },
3575/* 102 */
3576/***/ function(module, exports, __webpack_require__) {
3577
3578 var assocIndexOf = __webpack_require__(8);
3579
3580 /**
3581 * Sets the list cache `key` to `value`.
3582 *
3583 * @private
3584 * @name set
3585 * @memberOf ListCache
3586 * @param {string} key The key of the value to set.
3587 * @param {*} value The value to set.
3588 * @returns {Object} Returns the list cache instance.
3589 */
3590 function listCacheSet(key, value) {
3591 var data = this.__data__,
3592 index = assocIndexOf(data, key);
3593
3594 if (index < 0) {
3595 ++this.size;
3596 data.push([key, value]);
3597 } else {
3598 data[index][1] = value;
3599 }
3600 return this;
3601 }
3602
3603 module.exports = listCacheSet;
3604
3605
3606/***/ },
3607/* 103 */
3608/***/ function(module, exports, __webpack_require__) {
3609
3610 var Hash = __webpack_require__(46),
3611 ListCache = __webpack_require__(6),
3612 Map = __webpack_require__(13);
3613
3614 /**
3615 * Removes all key-value entries from the map.
3616 *
3617 * @private
3618 * @name clear
3619 * @memberOf MapCache
3620 */
3621 function mapCacheClear() {
3622 this.size = 0;
3623 this.__data__ = {
3624 'hash': new Hash,
3625 'map': new (Map || ListCache),
3626 'string': new Hash
3627 };
3628 }
3629
3630 module.exports = mapCacheClear;
3631
3632
3633/***/ },
3634/* 104 */
3635/***/ function(module, exports, __webpack_require__) {
3636
3637 var getMapData = __webpack_require__(9);
3638
3639 /**
3640 * Removes `key` and its value from the map.
3641 *
3642 * @private
3643 * @name delete
3644 * @memberOf MapCache
3645 * @param {string} key The key of the value to remove.
3646 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3647 */
3648 function mapCacheDelete(key) {
3649 var result = getMapData(this, key)['delete'](key);
3650 this.size -= result ? 1 : 0;
3651 return result;
3652 }
3653
3654 module.exports = mapCacheDelete;
3655
3656
3657/***/ },
3658/* 105 */
3659/***/ function(module, exports, __webpack_require__) {
3660
3661 var getMapData = __webpack_require__(9);
3662
3663 /**
3664 * Gets the map value for `key`.
3665 *
3666 * @private
3667 * @name get
3668 * @memberOf MapCache
3669 * @param {string} key The key of the value to get.
3670 * @returns {*} Returns the entry value.
3671 */
3672 function mapCacheGet(key) {
3673 return getMapData(this, key).get(key);
3674 }
3675
3676 module.exports = mapCacheGet;
3677
3678
3679/***/ },
3680/* 106 */
3681/***/ function(module, exports, __webpack_require__) {
3682
3683 var getMapData = __webpack_require__(9);
3684
3685 /**
3686 * Checks if a map value for `key` exists.
3687 *
3688 * @private
3689 * @name has
3690 * @memberOf MapCache
3691 * @param {string} key The key of the entry to check.
3692 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3693 */
3694 function mapCacheHas(key) {
3695 return getMapData(this, key).has(key);
3696 }
3697
3698 module.exports = mapCacheHas;
3699
3700
3701/***/ },
3702/* 107 */
3703/***/ function(module, exports, __webpack_require__) {
3704
3705 var getMapData = __webpack_require__(9);
3706
3707 /**
3708 * Sets the map `key` to `value`.
3709 *
3710 * @private
3711 * @name set
3712 * @memberOf MapCache
3713 * @param {string} key The key of the value to set.
3714 * @param {*} value The value to set.
3715 * @returns {Object} Returns the map cache instance.
3716 */
3717 function mapCacheSet(key, value) {
3718 var data = getMapData(this, key),
3719 size = data.size;
3720
3721 data.set(key, value);
3722 this.size += data.size == size ? 0 : 1;
3723 return this;
3724 }
3725
3726 module.exports = mapCacheSet;
3727
3728
3729/***/ },
3730/* 108 */
3731/***/ function(module, exports, __webpack_require__) {
3732
3733 var memoize = __webpack_require__(128);
3734
3735 /** Used as the maximum memoize cache size. */
3736 var MAX_MEMOIZE_SIZE = 500;
3737
3738 /**
3739 * A specialized version of `_.memoize` which clears the memoized function's
3740 * cache when it exceeds `MAX_MEMOIZE_SIZE`.
3741 *
3742 * @private
3743 * @param {Function} func The function to have its output memoized.
3744 * @returns {Function} Returns the new memoized function.
3745 */
3746 function memoizeCapped(func) {
3747 var result = memoize(func, function(key) {
3748 if (cache.size === MAX_MEMOIZE_SIZE) {
3749 cache.clear();
3750 }
3751 return key;
3752 });
3753
3754 var cache = result.cache;
3755 return result;
3756 }
3757
3758 module.exports = memoizeCapped;
3759
3760
3761/***/ },
3762/* 109 */
3763/***/ function(module, exports, __webpack_require__) {
3764
3765 var overArg = __webpack_require__(112);
3766
3767 /* Built-in method references for those with the same name as other `lodash` methods. */
3768 var nativeKeys = overArg(Object.keys, Object);
3769
3770 module.exports = nativeKeys;
3771
3772
3773/***/ },
3774/* 110 */
3775/***/ function(module, exports, __webpack_require__) {
3776
3777 /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(27);
3778
3779 /** Detect free variable `exports`. */
3780 var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
3781
3782 /** Detect free variable `module`. */
3783 var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
3784
3785 /** Detect the popular CommonJS extension `module.exports`. */
3786 var moduleExports = freeModule && freeModule.exports === freeExports;
3787
3788 /** Detect free variable `process` from Node.js. */
3789 var freeProcess = moduleExports && freeGlobal.process;
3790
3791 /** Used to access faster Node.js helpers. */
3792 var nodeUtil = (function() {
3793 try {
3794 return freeProcess && freeProcess.binding && freeProcess.binding('util');
3795 } catch (e) {}
3796 }());
3797
3798 module.exports = nodeUtil;
3799
3800 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(41)(module)))
3801
3802/***/ },
3803/* 111 */
3804/***/ function(module, exports) {
3805
3806 /** Used for built-in method references. */
3807 var objectProto = Object.prototype;
3808
3809 /**
3810 * Used to resolve the
3811 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3812 * of values.
3813 */
3814 var nativeObjectToString = objectProto.toString;
3815
3816 /**
3817 * Converts `value` to a string using `Object.prototype.toString`.
3818 *
3819 * @private
3820 * @param {*} value The value to convert.
3821 * @returns {string} Returns the converted string.
3822 */
3823 function objectToString(value) {
3824 return nativeObjectToString.call(value);
3825 }
3826
3827 module.exports = objectToString;
3828
3829
3830/***/ },
3831/* 112 */
3832/***/ function(module, exports) {
3833
3834 /**
3835 * Creates a unary function that invokes `func` with its argument transformed.
3836 *
3837 * @private
3838 * @param {Function} func The function to wrap.
3839 * @param {Function} transform The argument transform.
3840 * @returns {Function} Returns the new function.
3841 */
3842 function overArg(func, transform) {
3843 return function(arg) {
3844 return func(transform(arg));
3845 };
3846 }
3847
3848 module.exports = overArg;
3849
3850
3851/***/ },
3852/* 113 */
3853/***/ function(module, exports) {
3854
3855 /** Used to stand-in for `undefined` hash values. */
3856 var HASH_UNDEFINED = '__lodash_hash_undefined__';
3857
3858 /**
3859 * Adds `value` to the array cache.
3860 *
3861 * @private
3862 * @name add
3863 * @memberOf SetCache
3864 * @alias push
3865 * @param {*} value The value to cache.
3866 * @returns {Object} Returns the cache instance.
3867 */
3868 function setCacheAdd(value) {
3869 this.__data__.set(value, HASH_UNDEFINED);
3870 return this;
3871 }
3872
3873 module.exports = setCacheAdd;
3874
3875
3876/***/ },
3877/* 114 */
3878/***/ function(module, exports) {
3879
3880 /**
3881 * Checks if `value` is in the array cache.
3882 *
3883 * @private
3884 * @name has
3885 * @memberOf SetCache
3886 * @param {*} value The value to search for.
3887 * @returns {number} Returns `true` if `value` is found, else `false`.
3888 */
3889 function setCacheHas(value) {
3890 return this.__data__.has(value);
3891 }
3892
3893 module.exports = setCacheHas;
3894
3895
3896/***/ },
3897/* 115 */
3898/***/ function(module, exports) {
3899
3900 /**
3901 * Converts `set` to an array of its values.
3902 *
3903 * @private
3904 * @param {Object} set The set to convert.
3905 * @returns {Array} Returns the values.
3906 */
3907 function setToArray(set) {
3908 var index = -1,
3909 result = Array(set.size);
3910
3911 set.forEach(function(value) {
3912 result[++index] = value;
3913 });
3914 return result;
3915 }
3916
3917 module.exports = setToArray;
3918
3919
3920/***/ },
3921/* 116 */
3922/***/ function(module, exports) {
3923
3924 /**
3925 * Converts `set` to its value-value pairs.
3926 *
3927 * @private
3928 * @param {Object} set The set to convert.
3929 * @returns {Array} Returns the value-value pairs.
3930 */
3931 function setToPairs(set) {
3932 var index = -1,
3933 result = Array(set.size);
3934
3935 set.forEach(function(value) {
3936 result[++index] = [value, value];
3937 });
3938 return result;
3939 }
3940
3941 module.exports = setToPairs;
3942
3943
3944/***/ },
3945/* 117 */
3946/***/ function(module, exports, __webpack_require__) {
3947
3948 var ListCache = __webpack_require__(6);
3949
3950 /**
3951 * Removes all key-value entries from the stack.
3952 *
3953 * @private
3954 * @name clear
3955 * @memberOf Stack
3956 */
3957 function stackClear() {
3958 this.__data__ = new ListCache;
3959 this.size = 0;
3960 }
3961
3962 module.exports = stackClear;
3963
3964
3965/***/ },
3966/* 118 */
3967/***/ function(module, exports) {
3968
3969 /**
3970 * Removes `key` and its value from the stack.
3971 *
3972 * @private
3973 * @name delete
3974 * @memberOf Stack
3975 * @param {string} key The key of the value to remove.
3976 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3977 */
3978 function stackDelete(key) {
3979 var data = this.__data__,
3980 result = data['delete'](key);
3981
3982 this.size = data.size;
3983 return result;
3984 }
3985
3986 module.exports = stackDelete;
3987
3988
3989/***/ },
3990/* 119 */
3991/***/ function(module, exports) {
3992
3993 /**
3994 * Gets the stack value for `key`.
3995 *
3996 * @private
3997 * @name get
3998 * @memberOf Stack
3999 * @param {string} key The key of the value to get.
4000 * @returns {*} Returns the entry value.
4001 */
4002 function stackGet(key) {
4003 return this.__data__.get(key);
4004 }
4005
4006 module.exports = stackGet;
4007
4008
4009/***/ },
4010/* 120 */
4011/***/ function(module, exports) {
4012
4013 /**
4014 * Checks if a stack value for `key` exists.
4015 *
4016 * @private
4017 * @name has
4018 * @memberOf Stack
4019 * @param {string} key The key of the entry to check.
4020 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4021 */
4022 function stackHas(key) {
4023 return this.__data__.has(key);
4024 }
4025
4026 module.exports = stackHas;
4027
4028
4029/***/ },
4030/* 121 */
4031/***/ function(module, exports, __webpack_require__) {
4032
4033 var ListCache = __webpack_require__(6),
4034 Map = __webpack_require__(13),
4035 MapCache = __webpack_require__(14);
4036
4037 /** Used as the size to enable large array optimizations. */
4038 var LARGE_ARRAY_SIZE = 200;
4039
4040 /**
4041 * Sets the stack `key` to `value`.
4042 *
4043 * @private
4044 * @name set
4045 * @memberOf Stack
4046 * @param {string} key The key of the value to set.
4047 * @param {*} value The value to set.
4048 * @returns {Object} Returns the stack cache instance.
4049 */
4050 function stackSet(key, value) {
4051 var data = this.__data__;
4052 if (data instanceof ListCache) {
4053 var pairs = data.__data__;
4054 if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
4055 pairs.push([key, value]);
4056 this.size = ++data.size;
4057 return this;
4058 }
4059 data = this.__data__ = new MapCache(pairs);
4060 }
4061 data.set(key, value);
4062 this.size = data.size;
4063 return this;
4064 }
4065
4066 module.exports = stackSet;
4067
4068
4069/***/ },
4070/* 122 */
4071/***/ function(module, exports, __webpack_require__) {
4072
4073 var memoizeCapped = __webpack_require__(108);
4074
4075 /** Used to match property names within property paths. */
4076 var reLeadingDot = /^\./,
4077 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
4078
4079 /** Used to match backslashes in property paths. */
4080 var reEscapeChar = /\\(\\)?/g;
4081
4082 /**
4083 * Converts `string` to a property path array.
4084 *
4085 * @private
4086 * @param {string} string The string to convert.
4087 * @returns {Array} Returns the property path array.
4088 */
4089 var stringToPath = memoizeCapped(function(string) {
4090 var result = [];
4091 if (reLeadingDot.test(string)) {
4092 result.push('');
4093 }
4094 string.replace(rePropName, function(match, number, quote, string) {
4095 result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
4096 });
4097 return result;
4098 });
4099
4100 module.exports = stringToPath;
4101
4102
4103/***/ },
4104/* 123 */
4105/***/ function(module, exports, __webpack_require__) {
4106
4107 var baseGet = __webpack_require__(24);
4108
4109 /**
4110 * Gets the value at `path` of `object`. If the resolved value is
4111 * `undefined`, the `defaultValue` is returned in its place.
4112 *
4113 * @static
4114 * @memberOf _
4115 * @since 3.7.0
4116 * @category Object
4117 * @param {Object} object The object to query.
4118 * @param {Array|string} path The path of the property to get.
4119 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
4120 * @returns {*} Returns the resolved value.
4121 * @example
4122 *
4123 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
4124 *
4125 * _.get(object, 'a[0].b.c');
4126 * // => 3
4127 *
4128 * _.get(object, ['a', '0', 'b', 'c']);
4129 * // => 3
4130 *
4131 * _.get(object, 'a.b.c', 'default');
4132 * // => 'default'
4133 */
4134 function get(object, path, defaultValue) {
4135 var result = object == null ? undefined : baseGet(object, path);
4136 return result === undefined ? defaultValue : result;
4137 }
4138
4139 module.exports = get;
4140
4141
4142/***/ },
4143/* 124 */
4144/***/ function(module, exports, __webpack_require__) {
4145
4146 var baseHasIn = __webpack_require__(60),
4147 hasPath = __webpack_require__(89);
4148
4149 /**
4150 * Checks if `path` is a direct or inherited property of `object`.
4151 *
4152 * @static
4153 * @memberOf _
4154 * @since 4.0.0
4155 * @category Object
4156 * @param {Object} object The object to query.
4157 * @param {Array|string} path The path to check.
4158 * @returns {boolean} Returns `true` if `path` exists, else `false`.
4159 * @example
4160 *
4161 * var object = _.create({ 'a': _.create({ 'b': 2 }) });
4162 *
4163 * _.hasIn(object, 'a');
4164 * // => true
4165 *
4166 * _.hasIn(object, 'a.b');
4167 * // => true
4168 *
4169 * _.hasIn(object, ['a', 'b']);
4170 * // => true
4171 *
4172 * _.hasIn(object, 'b');
4173 * // => false
4174 */
4175 function hasIn(object, path) {
4176 return object != null && hasPath(object, path, baseHasIn);
4177 }
4178
4179 module.exports = hasIn;
4180
4181
4182/***/ },
4183/* 125 */
4184/***/ function(module, exports) {
4185
4186 /**
4187 * This method returns the first argument it receives.
4188 *
4189 * @static
4190 * @since 0.1.0
4191 * @memberOf _
4192 * @category Util
4193 * @param {*} value Any value.
4194 * @returns {*} Returns `value`.
4195 * @example
4196 *
4197 * var object = { 'a': 1 };
4198 *
4199 * console.log(_.identity(object) === object);
4200 * // => true
4201 */
4202 function identity(value) {
4203 return value;
4204 }
4205
4206 module.exports = identity;
4207
4208
4209/***/ },
4210/* 126 */
4211/***/ function(module, exports, __webpack_require__) {
4212
4213 var baseIsEqual = __webpack_require__(16);
4214
4215 /**
4216 * Performs a deep comparison between two values to determine if they are
4217 * equivalent.
4218 *
4219 * **Note:** This method supports comparing arrays, array buffers, booleans,
4220 * date objects, error objects, maps, numbers, `Object` objects, regexes,
4221 * sets, strings, symbols, and typed arrays. `Object` objects are compared
4222 * by their own, not inherited, enumerable properties. Functions and DOM
4223 * nodes are compared by strict equality, i.e. `===`.
4224 *
4225 * @static
4226 * @memberOf _
4227 * @since 0.1.0
4228 * @category Lang
4229 * @param {*} value The value to compare.
4230 * @param {*} other The other value to compare.
4231 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4232 * @example
4233 *
4234 * var object = { 'a': 1 };
4235 * var other = { 'a': 1 };
4236 *
4237 * _.isEqual(object, other);
4238 * // => true
4239 *
4240 * object === other;
4241 * // => false
4242 */
4243 function isEqual(value, other) {
4244 return baseIsEqual(value, other);
4245 }
4246
4247 module.exports = isEqual;
4248
4249
4250/***/ },
4251/* 127 */
4252/***/ function(module, exports, __webpack_require__) {
4253
4254 var arrayMap = __webpack_require__(15),
4255 baseIteratee = __webpack_require__(66),
4256 baseMap = __webpack_require__(68),
4257 isArray = __webpack_require__(2);
4258
4259 /**
4260 * Creates an array of values by running each element in `collection` thru
4261 * `iteratee`. The iteratee is invoked with three arguments:
4262 * (value, index|key, collection).
4263 *
4264 * Many lodash methods are guarded to work as iteratees for methods like
4265 * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
4266 *
4267 * The guarded methods are:
4268 * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
4269 * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
4270 * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
4271 * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
4272 *
4273 * @static
4274 * @memberOf _
4275 * @since 0.1.0
4276 * @category Collection
4277 * @param {Array|Object} collection The collection to iterate over.
4278 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
4279 * @returns {Array} Returns the new mapped array.
4280 * @example
4281 *
4282 * function square(n) {
4283 * return n * n;
4284 * }
4285 *
4286 * _.map([4, 8], square);
4287 * // => [16, 64]
4288 *
4289 * _.map({ 'a': 4, 'b': 8 }, square);
4290 * // => [16, 64] (iteration order is not guaranteed)
4291 *
4292 * var users = [
4293 * { 'user': 'barney' },
4294 * { 'user': 'fred' }
4295 * ];
4296 *
4297 * // The `_.property` iteratee shorthand.
4298 * _.map(users, 'user');
4299 * // => ['barney', 'fred']
4300 */
4301 function map(collection, iteratee) {
4302 var func = isArray(collection) ? arrayMap : baseMap;
4303 return func(collection, baseIteratee(iteratee, 3));
4304 }
4305
4306 module.exports = map;
4307
4308
4309/***/ },
4310/* 128 */
4311/***/ function(module, exports, __webpack_require__) {
4312
4313 var MapCache = __webpack_require__(14);
4314
4315 /** Error message constants. */
4316 var FUNC_ERROR_TEXT = 'Expected a function';
4317
4318 /**
4319 * Creates a function that memoizes the result of `func`. If `resolver` is
4320 * provided, it determines the cache key for storing the result based on the
4321 * arguments provided to the memoized function. By default, the first argument
4322 * provided to the memoized function is used as the map cache key. The `func`
4323 * is invoked with the `this` binding of the memoized function.
4324 *
4325 * **Note:** The cache is exposed as the `cache` property on the memoized
4326 * function. Its creation may be customized by replacing the `_.memoize.Cache`
4327 * constructor with one whose instances implement the
4328 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
4329 * method interface of `clear`, `delete`, `get`, `has`, and `set`.
4330 *
4331 * @static
4332 * @memberOf _
4333 * @since 0.1.0
4334 * @category Function
4335 * @param {Function} func The function to have its output memoized.
4336 * @param {Function} [resolver] The function to resolve the cache key.
4337 * @returns {Function} Returns the new memoized function.
4338 * @example
4339 *
4340 * var object = { 'a': 1, 'b': 2 };
4341 * var other = { 'c': 3, 'd': 4 };
4342 *
4343 * var values = _.memoize(_.values);
4344 * values(object);
4345 * // => [1, 2]
4346 *
4347 * values(other);
4348 * // => [3, 4]
4349 *
4350 * object.a = 2;
4351 * values(object);
4352 * // => [1, 2]
4353 *
4354 * // Modify the result cache.
4355 * values.cache.set(object, ['a', 'b']);
4356 * values(object);
4357 * // => ['a', 'b']
4358 *
4359 * // Replace `_.memoize.Cache`.
4360 * _.memoize.Cache = WeakMap;
4361 */
4362 function memoize(func, resolver) {
4363 if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
4364 throw new TypeError(FUNC_ERROR_TEXT);
4365 }
4366 var memoized = function() {
4367 var args = arguments,
4368 key = resolver ? resolver.apply(this, args) : args[0],
4369 cache = memoized.cache;
4370
4371 if (cache.has(key)) {
4372 return cache.get(key);
4373 }
4374 var result = func.apply(this, args);
4375 memoized.cache = cache.set(key, result) || cache;
4376 return result;
4377 };
4378 memoized.cache = new (memoize.Cache || MapCache);
4379 return memoized;
4380 }
4381
4382 // Expose `MapCache`.
4383 memoize.Cache = MapCache;
4384
4385 module.exports = memoize;
4386
4387
4388/***/ },
4389/* 129 */
4390/***/ function(module, exports, __webpack_require__) {
4391
4392 var baseProperty = __webpack_require__(71),
4393 basePropertyDeep = __webpack_require__(72),
4394 isKey = __webpack_require__(17),
4395 toKey = __webpack_require__(11);
4396
4397 /**
4398 * Creates a function that returns the value at `path` of a given object.
4399 *
4400 * @static
4401 * @memberOf _
4402 * @since 2.4.0
4403 * @category Util
4404 * @param {Array|string} path The path of the property to get.
4405 * @returns {Function} Returns the new accessor function.
4406 * @example
4407 *
4408 * var objects = [
4409 * { 'a': { 'b': 2 } },
4410 * { 'a': { 'b': 1 } }
4411 * ];
4412 *
4413 * _.map(objects, _.property('a.b'));
4414 * // => [2, 1]
4415 *
4416 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
4417 * // => [1, 2]
4418 */
4419 function property(path) {
4420 return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
4421 }
4422
4423 module.exports = property;
4424
4425
4426/***/ },
4427/* 130 */
4428/***/ function(module, exports) {
4429
4430 /**
4431 * This method returns a new empty array.
4432 *
4433 * @static
4434 * @memberOf _
4435 * @since 4.13.0
4436 * @category Util
4437 * @returns {Array} Returns the new empty array.
4438 * @example
4439 *
4440 * var arrays = _.times(2, _.stubArray);
4441 *
4442 * console.log(arrays);
4443 * // => [[], []]
4444 *
4445 * console.log(arrays[0] === arrays[1]);
4446 * // => false
4447 */
4448 function stubArray() {
4449 return [];
4450 }
4451
4452 module.exports = stubArray;
4453
4454
4455/***/ },
4456/* 131 */
4457/***/ function(module, exports) {
4458
4459 /**
4460 * This method returns `false`.
4461 *
4462 * @static
4463 * @memberOf _
4464 * @since 4.13.0
4465 * @category Util
4466 * @returns {boolean} Returns `false`.
4467 * @example
4468 *
4469 * _.times(2, _.stubFalse);
4470 * // => [false, false]
4471 */
4472 function stubFalse() {
4473 return false;
4474 }
4475
4476 module.exports = stubFalse;
4477
4478
4479/***/ },
4480/* 132 */
4481/***/ function(module, exports, __webpack_require__) {
4482
4483 var createToPairs = __webpack_require__(81),
4484 keys = __webpack_require__(12);
4485
4486 /**
4487 * Creates an array of own enumerable string keyed-value pairs for `object`
4488 * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
4489 * entries are returned.
4490 *
4491 * @static
4492 * @memberOf _
4493 * @since 4.0.0
4494 * @alias entries
4495 * @category Object
4496 * @param {Object} object The object to query.
4497 * @returns {Array} Returns the key-value pairs.
4498 * @example
4499 *
4500 * function Foo() {
4501 * this.a = 1;
4502 * this.b = 2;
4503 * }
4504 *
4505 * Foo.prototype.c = 3;
4506 *
4507 * _.toPairs(new Foo);
4508 * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
4509 */
4510 var toPairs = createToPairs(keys);
4511
4512 module.exports = toPairs;
4513
4514
4515/***/ },
4516/* 133 */
4517/***/ function(module, exports, __webpack_require__) {
4518
4519 var baseToString = __webpack_require__(75);
4520
4521 /**
4522 * Converts `value` to a string. An empty string is returned for `null`
4523 * and `undefined` values. The sign of `-0` is preserved.
4524 *
4525 * @static
4526 * @memberOf _
4527 * @since 4.0.0
4528 * @category Lang
4529 * @param {*} value The value to convert.
4530 * @returns {string} Returns the converted string.
4531 * @example
4532 *
4533 * _.toString(null);
4534 * // => ''
4535 *
4536 * _.toString(-0);
4537 * // => '-0'
4538 *
4539 * _.toString([1, 2, 3]);
4540 * // => '1,2,3'
4541 */
4542 function toString(value) {
4543 return value == null ? '' : baseToString(value);
4544 }
4545
4546 module.exports = toString;
4547
4548
4549/***/ },
4550/* 134 */
4551/***/ function(module, exports, __webpack_require__) {
4552
4553 "use strict";
4554 var elementResizeDetectorMaker = __webpack_require__(137);
4555 var ResizeObserverLite = (function () {
4556 function ResizeObserverLite(handler) {
4557 var _this = this;
4558 this.handler = handler;
4559 this.listenedElement = null;
4560 this.hasResizeObserver = typeof window.ResizeObserver !== 'undefined';
4561 if (this.hasResizeObserver) {
4562 this.rz = new ResizeObserver(function (entries) {
4563 _this.handler(getSize(entries[0].target));
4564 });
4565 }
4566 else {
4567 this.erd = elementResizeDetectorMaker({ strategy: 'scroll' });
4568 }
4569 }
4570 ResizeObserverLite.prototype.observe = function (element) {
4571 var _this = this;
4572 if (this.listenedElement !== element) {
4573 if (this.listenedElement) {
4574 this.disconnect();
4575 }
4576 if (element) {
4577 if (this.hasResizeObserver) {
4578 this.rz.observe(element);
4579 }
4580 else {
4581 this.erd.listenTo(element, function (element) {
4582 _this.handler(getSize(element));
4583 });
4584 }
4585 }
4586 this.listenedElement = element;
4587 }
4588 };
4589 ResizeObserverLite.prototype.disconnect = function () {
4590 if (this.listenedElement) {
4591 if (this.hasResizeObserver) {
4592 this.rz.disconnect();
4593 }
4594 else {
4595 this.erd.uninstall(this.listenedElement);
4596 }
4597 this.listenedElement = null;
4598 }
4599 };
4600 return ResizeObserverLite;
4601 }());
4602 Object.defineProperty(exports, "__esModule", { value: true });
4603 exports.default = ResizeObserverLite;
4604 function getSize(element) {
4605 return {
4606 width: getNumber(window.getComputedStyle(element)['width']),
4607 height: getNumber(window.getComputedStyle(element)['height'])
4608 };
4609 }
4610 function getNumber(str) {
4611 var m = /^([0-9\.]+)px$/.exec(str);
4612 return m ? parseFloat(m[1]) : 0;
4613 }
4614 //# sourceMappingURL=index.js.map
4615
4616/***/ },
4617/* 135 */
4618/***/ function(module, exports, __webpack_require__) {
4619
4620 /**
4621 * Resize detection strategy that injects objects to elements in order to detect resize events.
4622 * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
4623 */
4624
4625 "use strict";
4626
4627 var browserDetector = __webpack_require__(39);
4628
4629 module.exports = function(options) {
4630 options = options || {};
4631 var reporter = options.reporter;
4632 var batchProcessor = options.batchProcessor;
4633 var getState = options.stateHandler.getState;
4634
4635 if(!reporter) {
4636 throw new Error("Missing required dependency: reporter.");
4637 }
4638
4639 /**
4640 * Adds a resize event listener to the element.
4641 * @public
4642 * @param {element} element The element that should have the listener added.
4643 * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
4644 */
4645 function addListener(element, listener) {
4646 if(!getObject(element)) {
4647 throw new Error("Element is not detectable by this strategy.");
4648 }
4649
4650 function listenerProxy() {
4651 listener(element);
4652 }
4653
4654 if(browserDetector.isIE(8)) {
4655 //IE 8 does not support object, but supports the resize event directly on elements.
4656 getState(element).object = {
4657 proxy: listenerProxy
4658 };
4659 element.attachEvent("onresize", listenerProxy);
4660 } else {
4661 var object = getObject(element);
4662 object.contentDocument.defaultView.addEventListener("resize", listenerProxy);
4663 }
4664 }
4665
4666 /**
4667 * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
4668 * @private
4669 * @param {object} options Optional options object.
4670 * @param {element} element The element to make detectable
4671 * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
4672 */
4673 function makeDetectable(options, element, callback) {
4674 if (!callback) {
4675 callback = element;
4676 element = options;
4677 options = null;
4678 }
4679
4680 options = options || {};
4681 var debug = options.debug;
4682
4683 function injectObject(element, callback) {
4684 var OBJECT_STYLE = "display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;";
4685
4686 //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.
4687
4688 // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.
4689 var positionCheckPerformed = false;
4690
4691 // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.
4692 // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.
4693 var style = window.getComputedStyle(element);
4694 var width = element.offsetWidth;
4695 var height = element.offsetHeight;
4696
4697 getState(element).startSize = {
4698 width: width,
4699 height: height
4700 };
4701
4702 function mutateDom() {
4703 function alterPositionStyles() {
4704 if(style.position === "static") {
4705 element.style.position = "relative";
4706
4707 var removeRelativeStyles = function(reporter, element, style, property) {
4708 function getNumericalValue(value) {
4709 return value.replace(/[^-\d\.]/g, "");
4710 }
4711
4712 var value = style[property];
4713
4714 if(value !== "auto" && getNumericalValue(value) !== "0") {
4715 reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
4716 element.style[property] = 0;
4717 }
4718 };
4719
4720 //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
4721 //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
4722 removeRelativeStyles(reporter, element, style, "top");
4723 removeRelativeStyles(reporter, element, style, "right");
4724 removeRelativeStyles(reporter, element, style, "bottom");
4725 removeRelativeStyles(reporter, element, style, "left");
4726 }
4727 }
4728
4729 function onObjectLoad() {
4730 // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.
4731 if (!positionCheckPerformed) {
4732 alterPositionStyles();
4733 }
4734
4735 /*jshint validthis: true */
4736
4737 function getDocument(element, callback) {
4738 //Opera 12 seem to call the object.onload before the actual document has been created.
4739 //So if it is not present, poll it with an timeout until it is present.
4740 //TODO: Could maybe be handled better with object.onreadystatechange or similar.
4741 if(!element.contentDocument) {
4742 setTimeout(function checkForObjectDocument() {
4743 getDocument(element, callback);
4744 }, 100);
4745
4746 return;
4747 }
4748
4749 callback(element.contentDocument);
4750 }
4751
4752 //Mutating the object element here seems to fire another load event.
4753 //Mutating the inner document of the object element is fine though.
4754 var objectElement = this;
4755
4756 //Create the style element to be added to the object.
4757 getDocument(objectElement, function onObjectDocumentReady(objectDocument) {
4758 //Notify that the element is ready to be listened to.
4759 callback(element);
4760 });
4761 }
4762
4763 // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.
4764 // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.
4765 if (style.position !== "") {
4766 alterPositionStyles(style);
4767 positionCheckPerformed = true;
4768 }
4769
4770 //Add an object element as a child to the target element that will be listened to for resize events.
4771 var object = document.createElement("object");
4772 object.style.cssText = OBJECT_STYLE;
4773 object.type = "text/html";
4774 object.onload = onObjectLoad;
4775
4776 //Safari: This must occur before adding the object to the DOM.
4777 //IE: Does not like that this happens before, even if it is also added after.
4778 if(!browserDetector.isIE()) {
4779 object.data = "about:blank";
4780 }
4781
4782 element.appendChild(object);
4783 getState(element).object = object;
4784
4785 //IE: This must occur after adding the object to the DOM.
4786 if(browserDetector.isIE()) {
4787 object.data = "about:blank";
4788 }
4789 }
4790
4791 if(batchProcessor) {
4792 batchProcessor.add(mutateDom);
4793 } else {
4794 mutateDom();
4795 }
4796 }
4797
4798 if(browserDetector.isIE(8)) {
4799 //IE 8 does not support objects properly. Luckily they do support the resize event.
4800 //So do not inject the object and notify that the element is already ready to be listened to.
4801 //The event handler for the resize event is attached in the utils.addListener instead.
4802 callback(element);
4803 } else {
4804 injectObject(element, callback);
4805 }
4806 }
4807
4808 /**
4809 * Returns the child object of the target element.
4810 * @private
4811 * @param {element} element The target element.
4812 * @returns The object element of the target.
4813 */
4814 function getObject(element) {
4815 return getState(element).object;
4816 }
4817
4818 function uninstall(element) {
4819 if(browserDetector.isIE(8)) {
4820 element.detachEvent("onresize", getState(element).object.proxy);
4821 } else {
4822 element.removeChild(getObject(element));
4823 }
4824 delete getState(element).object;
4825 }
4826
4827 return {
4828 makeDetectable: makeDetectable,
4829 addListener: addListener,
4830 uninstall: uninstall
4831 };
4832 };
4833
4834
4835/***/ },
4836/* 136 */
4837/***/ function(module, exports, __webpack_require__) {
4838
4839 /**
4840 * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.
4841 * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js
4842 */
4843
4844 "use strict";
4845
4846 var forEach = __webpack_require__(40).forEach;
4847
4848 module.exports = function(options) {
4849 options = options || {};
4850 var reporter = options.reporter;
4851 var batchProcessor = options.batchProcessor;
4852 var getState = options.stateHandler.getState;
4853 var hasState = options.stateHandler.hasState;
4854 var idHandler = options.idHandler;
4855
4856 if (!batchProcessor) {
4857 throw new Error("Missing required dependency: batchProcessor");
4858 }
4859
4860 if (!reporter) {
4861 throw new Error("Missing required dependency: reporter.");
4862 }
4863
4864 //TODO: Could this perhaps be done at installation time?
4865 var scrollbarSizes = getScrollbarSizes();
4866
4867 // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.
4868 // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).
4869 var styleId = "erd_scroll_detection_scrollbar_style";
4870 var detectionContainerClass = "erd_scroll_detection_container";
4871 injectScrollStyle(styleId, detectionContainerClass);
4872
4873 function getScrollbarSizes() {
4874 var width = 500;
4875 var height = 500;
4876
4877 var child = document.createElement("div");
4878 child.style.cssText = "position: absolute; width: " + width*2 + "px; height: " + height*2 + "px; visibility: hidden; margin: 0; padding: 0;";
4879
4880 var container = document.createElement("div");
4881 container.style.cssText = "position: absolute; width: " + width + "px; height: " + height + "px; overflow: scroll; visibility: none; top: " + -width*3 + "px; left: " + -height*3 + "px; visibility: hidden; margin: 0; padding: 0;";
4882
4883 container.appendChild(child);
4884
4885 document.body.insertBefore(container, document.body.firstChild);
4886
4887 var widthSize = width - container.clientWidth;
4888 var heightSize = height - container.clientHeight;
4889
4890 document.body.removeChild(container);
4891
4892 return {
4893 width: widthSize,
4894 height: heightSize
4895 };
4896 }
4897
4898 function injectScrollStyle(styleId, containerClass) {
4899 function injectStyle(style, method) {
4900 method = method || function (element) {
4901 document.head.appendChild(element);
4902 };
4903
4904 var styleElement = document.createElement("style");
4905 styleElement.innerHTML = style;
4906 styleElement.id = styleId;
4907 method(styleElement);
4908 return styleElement;
4909 }
4910
4911 if (!document.getElementById(styleId)) {
4912 var containerAnimationClass = containerClass + "_animation";
4913 var containerAnimationActiveClass = containerClass + "_animation_active";
4914 var style = "/* Created by the element-resize-detector library. */\n";
4915 style += "." + containerClass + " > div::-webkit-scrollbar { display: none; }\n\n";
4916 style += "." + containerAnimationActiveClass + " { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: " + containerAnimationClass + "; animation-name: " + containerAnimationClass + "; }\n";
4917 style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n";
4918 style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }";
4919 injectStyle(style);
4920 }
4921 }
4922
4923 function addAnimationClass(element) {
4924 element.className += " " + detectionContainerClass + "_animation_active";
4925 }
4926
4927 function addEvent(el, name, cb) {
4928 if (el.addEventListener) {
4929 el.addEventListener(name, cb);
4930 } else if(el.attachEvent) {
4931 el.attachEvent("on" + name, cb);
4932 } else {
4933 return reporter.error("[scroll] Don't know how to add event listeners.");
4934 }
4935 }
4936
4937 function removeEvent(el, name, cb) {
4938 if (el.removeEventListener) {
4939 el.removeEventListener(name, cb);
4940 } else if(el.detachEvent) {
4941 el.detachEvent("on" + name, cb);
4942 } else {
4943 return reporter.error("[scroll] Don't know how to remove event listeners.");
4944 }
4945 }
4946
4947 function getExpandElement(element) {
4948 return getState(element).container.childNodes[0].childNodes[0].childNodes[0];
4949 }
4950
4951 function getShrinkElement(element) {
4952 return getState(element).container.childNodes[0].childNodes[0].childNodes[1];
4953 }
4954
4955 /**
4956 * Adds a resize event listener to the element.
4957 * @public
4958 * @param {element} element The element that should have the listener added.
4959 * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
4960 */
4961 function addListener(element, listener) {
4962 var listeners = getState(element).listeners;
4963
4964 if (!listeners.push) {
4965 throw new Error("Cannot add listener to an element that is not detectable.");
4966 }
4967
4968 getState(element).listeners.push(listener);
4969 }
4970
4971 /**
4972 * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
4973 * @private
4974 * @param {object} options Optional options object.
4975 * @param {element} element The element to make detectable
4976 * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
4977 */
4978 function makeDetectable(options, element, callback) {
4979 if (!callback) {
4980 callback = element;
4981 element = options;
4982 options = null;
4983 }
4984
4985 options = options || {};
4986
4987 function debug() {
4988 if (options.debug) {
4989 var args = Array.prototype.slice.call(arguments);
4990 args.unshift(idHandler.get(element), "Scroll: ");
4991 if (reporter.log.apply) {
4992 reporter.log.apply(null, args);
4993 } else {
4994 for (var i = 0; i < args.length; i++) {
4995 reporter.log(args[i]);
4996 }
4997 }
4998 }
4999 }
5000
5001 function isDetached(element) {
5002 function isInDocument(element) {
5003 return element === element.ownerDocument.body || element.ownerDocument.body.contains(element);
5004 }
5005 return !isInDocument(element);
5006 }
5007
5008 function isUnrendered(element) {
5009 // Check the absolute positioned container since the top level container is display: inline.
5010 var container = getState(element).container.childNodes[0];
5011 return getComputedStyle(container).width.indexOf("px") === -1; //Can only compute pixel value when rendered.
5012 }
5013
5014 function getStyle() {
5015 // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,
5016 // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).
5017 var elementStyle = getComputedStyle(element);
5018 var style = {};
5019 style.position = elementStyle.position;
5020 style.width = element.offsetWidth;
5021 style.height = element.offsetHeight;
5022 style.top = elementStyle.top;
5023 style.right = elementStyle.right;
5024 style.bottom = elementStyle.bottom;
5025 style.left = elementStyle.left;
5026 style.widthCSS = elementStyle.width;
5027 style.heightCSS = elementStyle.height;
5028 return style;
5029 }
5030
5031 function storeStartSize() {
5032 var style = getStyle();
5033 getState(element).startSize = {
5034 width: style.width,
5035 height: style.height
5036 };
5037 debug("Element start size", getState(element).startSize);
5038 }
5039
5040 function initListeners() {
5041 getState(element).listeners = [];
5042 }
5043
5044 function storeStyle() {
5045 debug("storeStyle invoked.");
5046 if (!getState(element)) {
5047 debug("Aborting because element has been uninstalled");
5048 return;
5049 }
5050
5051 var style = getStyle();
5052 getState(element).style = style;
5053 }
5054
5055 function storeCurrentSize(element, width, height) {
5056 getState(element).lastWidth = width;
5057 getState(element).lastHeight = height;
5058 }
5059
5060 function getExpandChildElement(element) {
5061 return getExpandElement(element).childNodes[0];
5062 }
5063
5064 function getWidthOffset() {
5065 return 2 * scrollbarSizes.width + 1;
5066 }
5067
5068 function getHeightOffset() {
5069 return 2 * scrollbarSizes.height + 1;
5070 }
5071
5072 function getExpandWidth(width) {
5073 return width + 10 + getWidthOffset();
5074 }
5075
5076 function getExpandHeight(height) {
5077 return height + 10 + getHeightOffset();
5078 }
5079
5080 function getShrinkWidth(width) {
5081 return width * 2 + getWidthOffset();
5082 }
5083
5084 function getShrinkHeight(height) {
5085 return height * 2 + getHeightOffset();
5086 }
5087
5088 function positionScrollbars(element, width, height) {
5089 var expand = getExpandElement(element);
5090 var shrink = getShrinkElement(element);
5091 var expandWidth = getExpandWidth(width);
5092 var expandHeight = getExpandHeight(height);
5093 var shrinkWidth = getShrinkWidth(width);
5094 var shrinkHeight = getShrinkHeight(height);
5095 expand.scrollLeft = expandWidth;
5096 expand.scrollTop = expandHeight;
5097 shrink.scrollLeft = shrinkWidth;
5098 shrink.scrollTop = shrinkHeight;
5099 }
5100
5101 function injectContainerElement() {
5102 var container = getState(element).container;
5103
5104 if (!container) {
5105 container = document.createElement("div");
5106 container.className = detectionContainerClass;
5107 container.style.cssText = "visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;";
5108 getState(element).container = container;
5109 addAnimationClass(container);
5110 element.appendChild(container);
5111
5112 var onAnimationStart = function () {
5113 getState(element).onRendered && getState(element).onRendered();
5114 };
5115
5116 addEvent(container, "animationstart", onAnimationStart);
5117
5118 // Store the event handler here so that they may be removed when uninstall is called.
5119 // See uninstall function for an explanation why it is needed.
5120 getState(element).onAnimationStart = onAnimationStart;
5121 }
5122
5123 return container;
5124 }
5125
5126 function injectScrollElements() {
5127 function alterPositionStyles() {
5128 var style = getState(element).style;
5129
5130 if(style.position === "static") {
5131 element.style.position = "relative";
5132
5133 var removeRelativeStyles = function(reporter, element, style, property) {
5134 function getNumericalValue(value) {
5135 return value.replace(/[^-\d\.]/g, "");
5136 }
5137
5138 var value = style[property];
5139
5140 if(value !== "auto" && getNumericalValue(value) !== "0") {
5141 reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
5142 element.style[property] = 0;
5143 }
5144 };
5145
5146 //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
5147 //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
5148 removeRelativeStyles(reporter, element, style, "top");
5149 removeRelativeStyles(reporter, element, style, "right");
5150 removeRelativeStyles(reporter, element, style, "bottom");
5151 removeRelativeStyles(reporter, element, style, "left");
5152 }
5153 }
5154
5155 function getLeftTopBottomRightCssText(left, top, bottom, right) {
5156 left = (!left ? "0" : (left + "px"));
5157 top = (!top ? "0" : (top + "px"));
5158 bottom = (!bottom ? "0" : (bottom + "px"));
5159 right = (!right ? "0" : (right + "px"));
5160
5161 return "left: " + left + "; top: " + top + "; right: " + right + "; bottom: " + bottom + ";";
5162 }
5163
5164 debug("Injecting elements");
5165
5166 if (!getState(element)) {
5167 debug("Aborting because element has been uninstalled");
5168 return;
5169 }
5170
5171 alterPositionStyles();
5172
5173 var rootContainer = getState(element).container;
5174
5175 if (!rootContainer) {
5176 rootContainer = injectContainerElement();
5177 }
5178
5179 // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),
5180 // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than
5181 // the targeted element.
5182 // When the bug is resolved, "containerContainer" may be removed.
5183
5184 // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).
5185 // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.
5186
5187 var scrollbarWidth = scrollbarSizes.width;
5188 var scrollbarHeight = scrollbarSizes.height;
5189 var containerContainerStyle = "position: absolute; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;";
5190 var containerStyle = "position: absolute; overflow: hidden; z-index: -1; visibility: hidden; " + getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth);
5191 var expandStyle = "position: absolute; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;";
5192 var shrinkStyle = "position: absolute; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;";
5193 var expandChildStyle = "position: absolute; left: 0; top: 0;";
5194 var shrinkChildStyle = "position: absolute; width: 200%; height: 200%;";
5195
5196 var containerContainer = document.createElement("div");
5197 var container = document.createElement("div");
5198 var expand = document.createElement("div");
5199 var expandChild = document.createElement("div");
5200 var shrink = document.createElement("div");
5201 var shrinkChild = document.createElement("div");
5202
5203 // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56
5204 // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.
5205 containerContainer.dir = "ltr";
5206
5207 containerContainer.style.cssText = containerContainerStyle;
5208 containerContainer.className = detectionContainerClass;
5209 container.className = detectionContainerClass;
5210 container.style.cssText = containerStyle;
5211 expand.style.cssText = expandStyle;
5212 expandChild.style.cssText = expandChildStyle;
5213 shrink.style.cssText = shrinkStyle;
5214 shrinkChild.style.cssText = shrinkChildStyle;
5215
5216 expand.appendChild(expandChild);
5217 shrink.appendChild(shrinkChild);
5218 container.appendChild(expand);
5219 container.appendChild(shrink);
5220 containerContainer.appendChild(container);
5221 rootContainer.appendChild(containerContainer);
5222
5223 function onExpandScroll() {
5224 getState(element).onExpand && getState(element).onExpand();
5225 }
5226
5227 function onShrinkScroll() {
5228 getState(element).onShrink && getState(element).onShrink();
5229 }
5230
5231 addEvent(expand, "scroll", onExpandScroll);
5232 addEvent(shrink, "scroll", onShrinkScroll);
5233
5234 // Store the event handlers here so that they may be removed when uninstall is called.
5235 // See uninstall function for an explanation why it is needed.
5236 getState(element).onExpandScroll = onExpandScroll;
5237 getState(element).onShrinkScroll = onShrinkScroll;
5238 }
5239
5240 function registerListenersAndPositionElements() {
5241 function updateChildSizes(element, width, height) {
5242 var expandChild = getExpandChildElement(element);
5243 var expandWidth = getExpandWidth(width);
5244 var expandHeight = getExpandHeight(height);
5245 expandChild.style.width = expandWidth + "px";
5246 expandChild.style.height = expandHeight + "px";
5247 }
5248
5249 function updateDetectorElements(done) {
5250 var width = element.offsetWidth;
5251 var height = element.offsetHeight;
5252
5253 debug("Storing current size", width, height);
5254
5255 // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.
5256 // Otherwise the if-check in handleScroll is useless.
5257 storeCurrentSize(element, width, height);
5258
5259 // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.
5260 // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.
5261
5262 batchProcessor.add(0, function performUpdateChildSizes() {
5263 if (!getState(element)) {
5264 debug("Aborting because element has been uninstalled");
5265 return;
5266 }
5267
5268 if (options.debug) {
5269 var w = element.offsetWidth;
5270 var h = element.offsetHeight;
5271
5272 if (w !== width || h !== height) {
5273 reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements.");
5274 }
5275 }
5276
5277 updateChildSizes(element, width, height);
5278 });
5279
5280 batchProcessor.add(1, function updateScrollbars() {
5281 if (!getState(element)) {
5282 debug("Aborting because element has been uninstalled");
5283 return;
5284 }
5285
5286 positionScrollbars(element, width, height);
5287 });
5288
5289 if (done) {
5290 batchProcessor.add(2, function () {
5291 if (!getState(element)) {
5292 debug("Aborting because element has been uninstalled");
5293 return;
5294 }
5295
5296 done();
5297 });
5298 }
5299 }
5300
5301 function areElementsInjected() {
5302 return !!getState(element).container;
5303 }
5304
5305 function notifyListenersIfNeeded() {
5306 function isFirstNotify() {
5307 return getState(element).lastNotifiedWidth === undefined;
5308 }
5309
5310 debug("notifyListenersIfNeeded invoked");
5311
5312 var state = getState(element);
5313
5314 // Don't notify the if the current size is the start size, and this is the first notification.
5315 if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {
5316 return debug("Not notifying: Size is the same as the start size, and there has been no notification yet.");
5317 }
5318
5319 // Don't notify if the size already has been notified.
5320 if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {
5321 return debug("Not notifying: Size already notified");
5322 }
5323
5324
5325 debug("Current size not notified, notifying...");
5326 state.lastNotifiedWidth = state.lastWidth;
5327 state.lastNotifiedHeight = state.lastHeight;
5328 forEach(getState(element).listeners, function (listener) {
5329 listener(element);
5330 });
5331 }
5332
5333 function handleRender() {
5334 debug("startanimation triggered.");
5335
5336 if (isUnrendered(element)) {
5337 debug("Ignoring since element is still unrendered...");
5338 return;
5339 }
5340
5341 debug("Element rendered.");
5342 var expand = getExpandElement(element);
5343 var shrink = getShrinkElement(element);
5344 if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {
5345 debug("Scrollbars out of sync. Updating detector elements...");
5346 updateDetectorElements(notifyListenersIfNeeded);
5347 }
5348 }
5349
5350 function handleScroll() {
5351 debug("Scroll detected.");
5352
5353 if (isUnrendered(element)) {
5354 // Element is still unrendered. Skip this scroll event.
5355 debug("Scroll event fired while unrendered. Ignoring...");
5356 return;
5357 }
5358
5359 var width = element.offsetWidth;
5360 var height = element.offsetHeight;
5361
5362 if (width !== element.lastWidth || height !== element.lastHeight) {
5363 debug("Element size changed.");
5364 updateDetectorElements(notifyListenersIfNeeded);
5365 } else {
5366 debug("Element size has not changed (" + width + "x" + height + ").");
5367 }
5368 }
5369
5370 debug("registerListenersAndPositionElements invoked.");
5371
5372 if (!getState(element)) {
5373 debug("Aborting because element has been uninstalled");
5374 return;
5375 }
5376
5377 getState(element).onRendered = handleRender;
5378 getState(element).onExpand = handleScroll;
5379 getState(element).onShrink = handleScroll;
5380
5381 var style = getState(element).style;
5382 updateChildSizes(element, style.width, style.height);
5383 }
5384
5385 function finalizeDomMutation() {
5386 debug("finalizeDomMutation invoked.");
5387
5388 if (!getState(element)) {
5389 debug("Aborting because element has been uninstalled");
5390 return;
5391 }
5392
5393 var style = getState(element).style;
5394 storeCurrentSize(element, style.width, style.height);
5395 positionScrollbars(element, style.width, style.height);
5396 }
5397
5398 function ready() {
5399 callback(element);
5400 }
5401
5402 function install() {
5403 debug("Installing...");
5404 initListeners();
5405 storeStartSize();
5406
5407 batchProcessor.add(0, storeStyle);
5408 batchProcessor.add(1, injectScrollElements);
5409 batchProcessor.add(2, registerListenersAndPositionElements);
5410 batchProcessor.add(3, finalizeDomMutation);
5411 batchProcessor.add(4, ready);
5412 }
5413
5414 debug("Making detectable...");
5415
5416 if (isDetached(element)) {
5417 debug("Element is detached");
5418
5419 injectContainerElement();
5420
5421 debug("Waiting until element is attached...");
5422
5423 getState(element).onRendered = function () {
5424 debug("Element is now attached");
5425 install();
5426 };
5427 } else {
5428 install();
5429 }
5430 }
5431
5432 function uninstall(element) {
5433 var state = getState(element);
5434
5435 if (!state) {
5436 // Uninstall has been called on a non-erd element.
5437 return;
5438 }
5439
5440 // Uninstall may have been called in the following scenarios:
5441 // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).
5442 // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected).
5443 // (3) After the installation process (here, state.busy = false and all the stuff has been injected).
5444 // So to be on the safe side, let's check for each thing before removing.
5445
5446 // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element.
5447 state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll);
5448 state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll);
5449 state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart);
5450
5451 state.container && element.removeChild(state.container);
5452 }
5453
5454 return {
5455 makeDetectable: makeDetectable,
5456 addListener: addListener,
5457 uninstall: uninstall
5458 };
5459 };
5460
5461
5462/***/ },
5463/* 137 */
5464/***/ function(module, exports, __webpack_require__) {
5465
5466 "use strict";
5467
5468 var forEach = __webpack_require__(40).forEach;
5469 var elementUtilsMaker = __webpack_require__(138);
5470 var listenerHandlerMaker = __webpack_require__(141);
5471 var idGeneratorMaker = __webpack_require__(139);
5472 var idHandlerMaker = __webpack_require__(140);
5473 var reporterMaker = __webpack_require__(142);
5474 var browserDetector = __webpack_require__(39);
5475 var batchProcessorMaker = __webpack_require__(43);
5476 var stateHandler = __webpack_require__(143);
5477
5478 //Detection strategies.
5479 var objectStrategyMaker = __webpack_require__(135);
5480 var scrollStrategyMaker = __webpack_require__(136);
5481
5482 function isCollection(obj) {
5483 return Array.isArray(obj) || obj.length !== undefined;
5484 }
5485
5486 function toArray(collection) {
5487 if (!Array.isArray(collection)) {
5488 var array = [];
5489 forEach(collection, function (obj) {
5490 array.push(obj);
5491 });
5492 return array;
5493 } else {
5494 return collection;
5495 }
5496 }
5497
5498 function isElement(obj) {
5499 return obj && obj.nodeType === 1;
5500 }
5501
5502 /**
5503 * @typedef idHandler
5504 * @type {object}
5505 * @property {function} get Gets the resize detector id of the element.
5506 * @property {function} set Generate and sets the resize detector id of the element.
5507 */
5508
5509 /**
5510 * @typedef Options
5511 * @type {object}
5512 * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.
5513 Default is true. If true, the listener is guaranteed to be called when it has been added.
5514 If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).
5515 * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.
5516 If not provided, a default id handler will be used.
5517 * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.
5518 If not provided, a default id handler will be used.
5519 If set to false, then nothing will be reported.
5520 * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.
5521 */
5522
5523 /**
5524 * Creates an element resize detector instance.
5525 * @public
5526 * @param {Options?} options Optional global options object that will decide how this instance will work.
5527 */
5528 module.exports = function(options) {
5529 options = options || {};
5530
5531 //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.
5532 var idHandler;
5533
5534 if (options.idHandler) {
5535 // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler
5536 // so that readonly flag always is true when it's used here. This may be removed next major version bump.
5537 idHandler = {
5538 get: function (element) { return options.idHandler.get(element, true); },
5539 set: options.idHandler.set
5540 };
5541 } else {
5542 var idGenerator = idGeneratorMaker();
5543 var defaultIdHandler = idHandlerMaker({
5544 idGenerator: idGenerator,
5545 stateHandler: stateHandler
5546 });
5547 idHandler = defaultIdHandler;
5548 }
5549
5550 //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.
5551 var reporter = options.reporter;
5552
5553 if(!reporter) {
5554 //If options.reporter is false, then the reporter should be quiet.
5555 var quiet = reporter === false;
5556 reporter = reporterMaker(quiet);
5557 }
5558
5559 //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.
5560 var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter }));
5561
5562 //Options to be used as default for the listenTo function.
5563 var globalOptions = {};
5564 globalOptions.callOnAdd = !!getOption(options, "callOnAdd", true);
5565 globalOptions.debug = !!getOption(options, "debug", false);
5566
5567 var eventListenerHandler = listenerHandlerMaker(idHandler);
5568 var elementUtils = elementUtilsMaker({
5569 stateHandler: stateHandler
5570 });
5571
5572 //The detection strategy to be used.
5573 var detectionStrategy;
5574 var desiredStrategy = getOption(options, "strategy", "object");
5575 var strategyOptions = {
5576 reporter: reporter,
5577 batchProcessor: batchProcessor,
5578 stateHandler: stateHandler,
5579 idHandler: idHandler
5580 };
5581
5582 if(desiredStrategy === "scroll") {
5583 if (browserDetector.isLegacyOpera()) {
5584 reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy.");
5585 desiredStrategy = "object";
5586 } else if (browserDetector.isIE(9)) {
5587 reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy.");
5588 desiredStrategy = "object";
5589 }
5590 }
5591
5592 if(desiredStrategy === "scroll") {
5593 detectionStrategy = scrollStrategyMaker(strategyOptions);
5594 } else if(desiredStrategy === "object") {
5595 detectionStrategy = objectStrategyMaker(strategyOptions);
5596 } else {
5597 throw new Error("Invalid strategy name: " + desiredStrategy);
5598 }
5599
5600 //Calls can be made to listenTo with elements that are still being installed.
5601 //Also, same elements can occur in the elements list in the listenTo function.
5602 //With this map, the ready callbacks can be synchronized between the calls
5603 //so that the ready callback can always be called when an element is ready - even if
5604 //it wasn't installed from the function itself.
5605 var onReadyCallbacks = {};
5606
5607 /**
5608 * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.
5609 * @public
5610 * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.
5611 * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.
5612 * @param {function} listener The callback to be executed for each resize event for each element.
5613 */
5614 function listenTo(options, elements, listener) {
5615 function onResizeCallback(element) {
5616 var listeners = eventListenerHandler.get(element);
5617 forEach(listeners, function callListenerProxy(listener) {
5618 listener(element);
5619 });
5620 }
5621
5622 function addListener(callOnAdd, element, listener) {
5623 eventListenerHandler.add(element, listener);
5624
5625 if(callOnAdd) {
5626 listener(element);
5627 }
5628 }
5629
5630 //Options object may be omitted.
5631 if(!listener) {
5632 listener = elements;
5633 elements = options;
5634 options = {};
5635 }
5636
5637 if(!elements) {
5638 throw new Error("At least one element required.");
5639 }
5640
5641 if(!listener) {
5642 throw new Error("Listener required.");
5643 }
5644
5645 if (isElement(elements)) {
5646 // A single element has been passed in.
5647 elements = [elements];
5648 } else if (isCollection(elements)) {
5649 // Convert collection to array for plugins.
5650 // TODO: May want to check so that all the elements in the collection are valid elements.
5651 elements = toArray(elements);
5652 } else {
5653 return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
5654 }
5655
5656 var elementsReady = 0;
5657
5658 var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd);
5659 var onReadyCallback = getOption(options, "onReady", function noop() {});
5660 var debug = getOption(options, "debug", globalOptions.debug);
5661
5662 forEach(elements, function attachListenerToElement(element) {
5663 if (!stateHandler.getState(element)) {
5664 stateHandler.initState(element);
5665 idHandler.set(element);
5666 }
5667
5668 var id = idHandler.get(element);
5669
5670 debug && reporter.log("Attaching listener to element", id, element);
5671
5672 if(!elementUtils.isDetectable(element)) {
5673 debug && reporter.log(id, "Not detectable.");
5674 if(elementUtils.isBusy(element)) {
5675 debug && reporter.log(id, "System busy making it detectable");
5676
5677 //The element is being prepared to be detectable. Do not make it detectable.
5678 //Just add the listener, because the element will soon be detectable.
5679 addListener(callOnAdd, element, listener);
5680 onReadyCallbacks[id] = onReadyCallbacks[id] || [];
5681 onReadyCallbacks[id].push(function onReady() {
5682 elementsReady++;
5683
5684 if(elementsReady === elements.length) {
5685 onReadyCallback();
5686 }
5687 });
5688 return;
5689 }
5690
5691 debug && reporter.log(id, "Making detectable...");
5692 //The element is not prepared to be detectable, so do prepare it and add a listener to it.
5693 elementUtils.markBusy(element, true);
5694 return detectionStrategy.makeDetectable({ debug: debug }, element, function onElementDetectable(element) {
5695 debug && reporter.log(id, "onElementDetectable");
5696
5697 if (stateHandler.getState(element)) {
5698 elementUtils.markAsDetectable(element);
5699 elementUtils.markBusy(element, false);
5700 detectionStrategy.addListener(element, onResizeCallback);
5701 addListener(callOnAdd, element, listener);
5702
5703 // Since the element size might have changed since the call to "listenTo", we need to check for this change,
5704 // so that a resize event may be emitted.
5705 // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.
5706 // Also, check the state existance before since the element may have been uninstalled in the installation process.
5707 var state = stateHandler.getState(element);
5708 if (state && state.startSize) {
5709 var width = element.offsetWidth;
5710 var height = element.offsetHeight;
5711 if (state.startSize.width !== width || state.startSize.height !== height) {
5712 onResizeCallback(element);
5713 }
5714 }
5715
5716 if(onReadyCallbacks[id]) {
5717 forEach(onReadyCallbacks[id], function(callback) {
5718 callback();
5719 });
5720 }
5721 } else {
5722 // The element has been unisntalled before being detectable.
5723 debug && reporter.log(id, "Element uninstalled before being detectable.");
5724 }
5725
5726 delete onReadyCallbacks[id];
5727
5728 elementsReady++;
5729 if(elementsReady === elements.length) {
5730 onReadyCallback();
5731 }
5732 });
5733 }
5734
5735 debug && reporter.log(id, "Already detecable, adding listener.");
5736
5737 //The element has been prepared to be detectable and is ready to be listened to.
5738 addListener(callOnAdd, element, listener);
5739 elementsReady++;
5740 });
5741
5742 if(elementsReady === elements.length) {
5743 onReadyCallback();
5744 }
5745 }
5746
5747 function uninstall(elements) {
5748 if(!elements) {
5749 return reporter.error("At least one element is required.");
5750 }
5751
5752 if (isElement(elements)) {
5753 // A single element has been passed in.
5754 elements = [elements];
5755 } else if (isCollection(elements)) {
5756 // Convert collection to array for plugins.
5757 // TODO: May want to check so that all the elements in the collection are valid elements.
5758 elements = toArray(elements);
5759 } else {
5760 return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
5761 }
5762
5763 forEach(elements, function (element) {
5764 eventListenerHandler.removeAllListeners(element);
5765 detectionStrategy.uninstall(element);
5766 stateHandler.cleanState(element);
5767 });
5768 }
5769
5770 return {
5771 listenTo: listenTo,
5772 removeListener: eventListenerHandler.removeListener,
5773 removeAllListeners: eventListenerHandler.removeAllListeners,
5774 uninstall: uninstall
5775 };
5776 };
5777
5778 function getOption(options, name, defaultValue) {
5779 var value = options[name];
5780
5781 if((value === undefined || value === null) && defaultValue !== undefined) {
5782 return defaultValue;
5783 }
5784
5785 return value;
5786 }
5787
5788
5789/***/ },
5790/* 138 */
5791/***/ function(module, exports) {
5792
5793 "use strict";
5794
5795 module.exports = function(options) {
5796 var getState = options.stateHandler.getState;
5797
5798 /**
5799 * Tells if the element has been made detectable and ready to be listened for resize events.
5800 * @public
5801 * @param {element} The element to check.
5802 * @returns {boolean} True or false depending on if the element is detectable or not.
5803 */
5804 function isDetectable(element) {
5805 var state = getState(element);
5806 return state && !!state.isDetectable;
5807 }
5808
5809 /**
5810 * Marks the element that it has been made detectable and ready to be listened for resize events.
5811 * @public
5812 * @param {element} The element to mark.
5813 */
5814 function markAsDetectable(element) {
5815 getState(element).isDetectable = true;
5816 }
5817
5818 /**
5819 * Tells if the element is busy or not.
5820 * @public
5821 * @param {element} The element to check.
5822 * @returns {boolean} True or false depending on if the element is busy or not.
5823 */
5824 function isBusy(element) {
5825 return !!getState(element).busy;
5826 }
5827
5828 /**
5829 * Marks the object is busy and should not be made detectable.
5830 * @public
5831 * @param {element} element The element to mark.
5832 * @param {boolean} busy If the element is busy or not.
5833 */
5834 function markBusy(element, busy) {
5835 getState(element).busy = !!busy;
5836 }
5837
5838 return {
5839 isDetectable: isDetectable,
5840 markAsDetectable: markAsDetectable,
5841 isBusy: isBusy,
5842 markBusy: markBusy
5843 };
5844 };
5845
5846
5847/***/ },
5848/* 139 */
5849/***/ function(module, exports) {
5850
5851 "use strict";
5852
5853 module.exports = function() {
5854 var idCount = 1;
5855
5856 /**
5857 * Generates a new unique id in the context.
5858 * @public
5859 * @returns {number} A unique id in the context.
5860 */
5861 function generate() {
5862 return idCount++;
5863 }
5864
5865 return {
5866 generate: generate
5867 };
5868 };
5869
5870
5871/***/ },
5872/* 140 */
5873/***/ function(module, exports) {
5874
5875 "use strict";
5876
5877 module.exports = function(options) {
5878 var idGenerator = options.idGenerator;
5879 var getState = options.stateHandler.getState;
5880
5881 /**
5882 * Gets the resize detector id of the element.
5883 * @public
5884 * @param {element} element The target element to get the id of.
5885 * @returns {string|number|null} The id of the element. Null if it has no id.
5886 */
5887 function getId(element) {
5888 var state = getState(element);
5889
5890 if (state && state.id !== undefined) {
5891 return state.id;
5892 }
5893
5894 return null;
5895 }
5896
5897 /**
5898 * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.
5899 * @public
5900 * @param {element} element The target element to set the id of.
5901 * @returns {string|number|null} The id of the element.
5902 */
5903 function setId(element) {
5904 var state = getState(element);
5905
5906 if (!state) {
5907 throw new Error("setId required the element to have a resize detection state.");
5908 }
5909
5910 var id = idGenerator.generate();
5911
5912 state.id = id;
5913
5914 return id;
5915 }
5916
5917 return {
5918 get: getId,
5919 set: setId
5920 };
5921 };
5922
5923
5924/***/ },
5925/* 141 */
5926/***/ function(module, exports) {
5927
5928 "use strict";
5929
5930 module.exports = function(idHandler) {
5931 var eventListeners = {};
5932
5933 /**
5934 * Gets all listeners for the given element.
5935 * @public
5936 * @param {element} element The element to get all listeners for.
5937 * @returns All listeners for the given element.
5938 */
5939 function getListeners(element) {
5940 var id = idHandler.get(element);
5941
5942 if (id === undefined) {
5943 return [];
5944 }
5945
5946 return eventListeners[id] || [];
5947 }
5948
5949 /**
5950 * Stores the given listener for the given element. Will not actually add the listener to the element.
5951 * @public
5952 * @param {element} element The element that should have the listener added.
5953 * @param {function} listener The callback that the element has added.
5954 */
5955 function addListener(element, listener) {
5956 var id = idHandler.get(element);
5957
5958 if(!eventListeners[id]) {
5959 eventListeners[id] = [];
5960 }
5961
5962 eventListeners[id].push(listener);
5963 }
5964
5965 function removeListener(element, listener) {
5966 var listeners = getListeners(element);
5967 for (var i = 0, len = listeners.length; i < len; ++i) {
5968 if (listeners[i] === listener) {
5969 listeners.splice(i, 1);
5970 break;
5971 }
5972 }
5973 }
5974
5975 function removeAllListeners(element) {
5976 var listeners = getListeners(element);
5977 if (!listeners) { return; }
5978 listeners.length = 0;
5979 }
5980
5981 return {
5982 get: getListeners,
5983 add: addListener,
5984 removeListener: removeListener,
5985 removeAllListeners: removeAllListeners
5986 };
5987 };
5988
5989
5990/***/ },
5991/* 142 */
5992/***/ function(module, exports) {
5993
5994 "use strict";
5995
5996 /* global console: false */
5997
5998 /**
5999 * Reporter that handles the reporting of logs, warnings and errors.
6000 * @public
6001 * @param {boolean} quiet Tells if the reporter should be quiet or not.
6002 */
6003 module.exports = function(quiet) {
6004 function noop() {
6005 //Does nothing.
6006 }
6007
6008 var reporter = {
6009 log: noop,
6010 warn: noop,
6011 error: noop
6012 };
6013
6014 if(!quiet && window.console) {
6015 var attachFunction = function(reporter, name) {
6016 //The proxy is needed to be able to call the method with the console context,
6017 //since we cannot use bind.
6018 reporter[name] = function reporterProxy() {
6019 var f = console[name];
6020 if (f.apply) { //IE9 does not support console.log.apply :)
6021 f.apply(console, arguments);
6022 } else {
6023 for (var i = 0; i < arguments.length; i++) {
6024 f(arguments[i]);
6025 }
6026 }
6027 };
6028 };
6029
6030 attachFunction(reporter, "log");
6031 attachFunction(reporter, "warn");
6032 attachFunction(reporter, "error");
6033 }
6034
6035 return reporter;
6036 };
6037
6038/***/ },
6039/* 143 */
6040/***/ function(module, exports) {
6041
6042 "use strict";
6043
6044 var prop = "_erd";
6045
6046 function initState(element) {
6047 element[prop] = {};
6048 return getState(element);
6049 }
6050
6051 function getState(element) {
6052 return element[prop];
6053 }
6054
6055 function cleanState(element) {
6056 delete element[prop];
6057 }
6058
6059 module.exports = {
6060 initState: initState,
6061 getState: getState,
6062 cleanState: cleanState
6063 };
6064
6065
6066/***/ },
6067/* 144 */
6068/***/ function(module, exports) {
6069
6070 module.exports = __WEBPACK_EXTERNAL_MODULE_144__;
6071
6072/***/ },
6073/* 145 */
6074/***/ function(module, exports) {
6075
6076 module.exports = __WEBPACK_EXTERNAL_MODULE_145__;
6077
6078/***/ }
6079/******/ ])
6080});
6081;
6082//# sourceMappingURL=react-container-query.js.map
\No newline at end of file