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__) {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId])
|
20 | return installedModules[moduleId].exports;
|
21 |
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | exports: {},
|
25 | id: moduleId,
|
26 | loaded: false
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.loaded = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.p = "";
|
48 |
|
49 |
|
50 | return __webpack_require__(0);
|
51 | })
|
52 |
|
53 | ([
|
54 |
|
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 |
|
82 |
|
83 |
|
84 |
|
85 |
|
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 |
|
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 |
|
156 |
|
157 | },
|
158 |
|
159 | function(module, exports, __webpack_require__) {
|
160 |
|
161 | var freeGlobal = __webpack_require__(27);
|
162 |
|
163 |
|
164 | var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
165 |
|
166 |
|
167 | var root = freeGlobal || freeSelf || Function('return this')();
|
168 |
|
169 | module.exports = root;
|
170 |
|
171 |
|
172 | },
|
173 |
|
174 | function(module, exports) {
|
175 |
|
176 | |
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 | var isArray = Array.isArray;
|
200 |
|
201 | module.exports = isArray;
|
202 |
|
203 |
|
204 | },
|
205 |
|
206 | function(module, exports, __webpack_require__) {
|
207 |
|
208 | var baseIsNative = __webpack_require__(64),
|
209 | getValue = __webpack_require__(88);
|
210 |
|
211 | |
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
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 |
|
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 |
|
236 | var nullTag = '[object Null]',
|
237 | undefinedTag = '[object Undefined]';
|
238 |
|
239 |
|
240 | var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
241 |
|
242 | |
243 |
|
244 |
|
245 |
|
246 |
|
247 |
|
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 |
|
263 | function(module, exports) {
|
264 |
|
265 | |
266 |
|
267 |
|
268 |
|
269 |
|
270 |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 | function isObjectLike(value) {
|
290 | return value != null && typeof value == 'object';
|
291 | }
|
292 |
|
293 | module.exports = isObjectLike;
|
294 |
|
295 |
|
296 | },
|
297 |
|
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 |
|
308 |
|
309 |
|
310 |
|
311 |
|
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 |
|
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 |
|
336 | function(module, exports, __webpack_require__) {
|
337 |
|
338 | var root = __webpack_require__(1);
|
339 |
|
340 |
|
341 | var Symbol = root.Symbol;
|
342 |
|
343 | module.exports = Symbol;
|
344 |
|
345 |
|
346 | },
|
347 |
|
348 | function(module, exports, __webpack_require__) {
|
349 |
|
350 | var eq = __webpack_require__(34);
|
351 |
|
352 | |
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
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 |
|
375 | function(module, exports, __webpack_require__) {
|
376 |
|
377 | var isKeyable = __webpack_require__(95);
|
378 |
|
379 | |
380 |
|
381 |
|
382 |
|
383 |
|
384 |
|
385 |
|
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 |
|
399 | function(module, exports, __webpack_require__) {
|
400 |
|
401 | var getNative = __webpack_require__(3);
|
402 |
|
403 |
|
404 | var nativeCreate = getNative(Object, 'create');
|
405 |
|
406 | module.exports = nativeCreate;
|
407 |
|
408 |
|
409 | },
|
410 |
|
411 | function(module, exports, __webpack_require__) {
|
412 |
|
413 | var isSymbol = __webpack_require__(21);
|
414 |
|
415 |
|
416 | var INFINITY = 1 / 0;
|
417 |
|
418 | |
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
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 |
|
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 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 |
|
452 |
|
453 |
|
454 |
|
455 |
|
456 |
|
457 |
|
458 |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 |
|
466 |
|
467 |
|
468 |
|
469 |
|
470 |
|
471 |
|
472 | function keys(object) {
|
473 | return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
474 | }
|
475 |
|
476 | module.exports = keys;
|
477 |
|
478 |
|
479 | },
|
480 |
|
481 | function(module, exports, __webpack_require__) {
|
482 |
|
483 | var getNative = __webpack_require__(3),
|
484 | root = __webpack_require__(1);
|
485 |
|
486 |
|
487 | var Map = getNative(root, 'Map');
|
488 |
|
489 | module.exports = Map;
|
490 |
|
491 |
|
492 | },
|
493 |
|
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 |
|
504 |
|
505 |
|
506 |
|
507 |
|
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 |
|
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 |
|
532 | function(module, exports) {
|
533 |
|
534 | |
535 |
|
536 |
|
537 |
|
538 |
|
539 |
|
540 |
|
541 |
|
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 |
|
559 | function(module, exports, __webpack_require__) {
|
560 |
|
561 | var baseIsEqualDeep = __webpack_require__(62),
|
562 | isObjectLike = __webpack_require__(5);
|
563 |
|
564 | |
565 |
|
566 |
|
567 |
|
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 |
|
574 |
|
575 |
|
576 |
|
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 |
|
593 | function(module, exports, __webpack_require__) {
|
594 |
|
595 | var isArray = __webpack_require__(2),
|
596 | isSymbol = __webpack_require__(21);
|
597 |
|
598 |
|
599 | var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
600 | reIsPlainProp = /^\w*$/;
|
601 |
|
602 | |
603 |
|
604 |
|
605 |
|
606 |
|
607 |
|
608 |
|
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 |
|
628 | function(module, exports, __webpack_require__) {
|
629 |
|
630 | var isFunction = __webpack_require__(37),
|
631 | isLength = __webpack_require__(19);
|
632 |
|
633 | |
634 |
|
635 |
|
636 |
|
637 |
|
638 |
|
639 |
|
640 |
|
641 |
|
642 |
|
643 |
|
644 |
|
645 |
|
646 |
|
647 |
|
648 |
|
649 |
|
650 |
|
651 |
|
652 |
|
653 |
|
654 |
|
655 |
|
656 |
|
657 |
|
658 | function isArrayLike(value) {
|
659 | return value != null && isLength(value.length) && !isFunction(value);
|
660 | }
|
661 |
|
662 | module.exports = isArrayLike;
|
663 |
|
664 |
|
665 | },
|
666 |
|
667 | function(module, exports) {
|
668 |
|
669 |
|
670 | var MAX_SAFE_INTEGER = 9007199254740991;
|
671 |
|
672 | |
673 |
|
674 |
|
675 |
|
676 |
|
677 |
|
678 |
|
679 |
|
680 |
|
681 |
|
682 |
|
683 |
|
684 |
|
685 |
|
686 |
|
687 |
|
688 |
|
689 |
|
690 |
|
691 |
|
692 |
|
693 |
|
694 |
|
695 |
|
696 |
|
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 |
|
708 | function(module, exports) {
|
709 |
|
710 | |
711 |
|
712 |
|
713 |
|
714 |
|
715 |
|
716 |
|
717 |
|
718 |
|
719 |
|
720 |
|
721 |
|
722 |
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 |
|
729 |
|
730 |
|
731 |
|
732 |
|
733 |
|
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 |
|
745 | function(module, exports, __webpack_require__) {
|
746 |
|
747 | var baseGetTag = __webpack_require__(4),
|
748 | isObjectLike = __webpack_require__(5);
|
749 |
|
750 |
|
751 | var symbolTag = '[object Symbol]';
|
752 |
|
753 | |
754 |
|
755 |
|
756 |
|
757 |
|
758 |
|
759 |
|
760 |
|
761 |
|
762 |
|
763 |
|
764 |
|
765 |
|
766 |
|
767 |
|
768 |
|
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 |
|
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 |
|
821 |
|
822 | },
|
823 |
|
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 |
|
835 |
|
836 |
|
837 |
|
838 |
|
839 |
|
840 | function Stack(entries) {
|
841 | var data = this.__data__ = new ListCache(entries);
|
842 | this.size = data.size;
|
843 | }
|
844 |
|
845 |
|
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 |
|
857 | function(module, exports, __webpack_require__) {
|
858 |
|
859 | var castPath = __webpack_require__(25),
|
860 | toKey = __webpack_require__(11);
|
861 |
|
862 | |
863 |
|
864 |
|
865 |
|
866 |
|
867 |
|
868 |
|
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 |
|
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 |
|
896 |
|
897 |
|
898 |
|
899 |
|
900 |
|
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 |
|
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 |
|
921 | var COMPARE_PARTIAL_FLAG = 1,
|
922 | COMPARE_UNORDERED_FLAG = 2;
|
923 |
|
924 | |
925 |
|
926 |
|
927 |
|
928 |
|
929 |
|
930 |
|
931 |
|
932 |
|
933 |
|
934 |
|
935 |
|
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 |
|
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 |
|
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 |
|
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 |
|
1003 | function(module, exports) {
|
1004 |
|
1005 | (function(global) {
|
1006 | var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
1007 |
|
1008 | module.exports = freeGlobal;
|
1009 |
|
1010 | }.call(exports, (function() { return this; }())))
|
1011 |
|
1012 | },
|
1013 |
|
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 |
|
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 |
|
1034 | var dataViewCtorString = toSource(DataView),
|
1035 | mapCtorString = toSource(Map),
|
1036 | promiseCtorString = toSource(Promise),
|
1037 | setCtorString = toSource(Set),
|
1038 | weakMapCtorString = toSource(WeakMap);
|
1039 |
|
1040 | |
1041 |
|
1042 |
|
1043 |
|
1044 |
|
1045 |
|
1046 |
|
1047 | var getTag = baseGetTag;
|
1048 |
|
1049 |
|
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 |
|
1078 | function(module, exports) {
|
1079 |
|
1080 |
|
1081 | var MAX_SAFE_INTEGER = 9007199254740991;
|
1082 |
|
1083 |
|
1084 | var reIsUint = /^(?:0|[1-9]\d*)$/;
|
1085 |
|
1086 | |
1087 |
|
1088 |
|
1089 |
|
1090 |
|
1091 |
|
1092 |
|
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 |
|
1106 | function(module, exports, __webpack_require__) {
|
1107 |
|
1108 | var isObject = __webpack_require__(20);
|
1109 |
|
1110 | |
1111 |
|
1112 |
|
1113 |
|
1114 |
|
1115 |
|
1116 |
|
1117 |
|
1118 | function isStrictComparable(value) {
|
1119 | return value === value && !isObject(value);
|
1120 | }
|
1121 |
|
1122 | module.exports = isStrictComparable;
|
1123 |
|
1124 |
|
1125 | },
|
1126 |
|
1127 | function(module, exports) {
|
1128 |
|
1129 | |
1130 |
|
1131 |
|
1132 |
|
1133 |
|
1134 |
|
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 |
|
1151 | function(module, exports) {
|
1152 |
|
1153 | |
1154 |
|
1155 |
|
1156 |
|
1157 |
|
1158 |
|
1159 |
|
1160 |
|
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 |
|
1177 | function(module, exports) {
|
1178 |
|
1179 |
|
1180 | var funcProto = Function.prototype;
|
1181 |
|
1182 |
|
1183 | var funcToString = funcProto.toString;
|
1184 |
|
1185 | |
1186 |
|
1187 |
|
1188 |
|
1189 |
|
1190 |
|
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 |
|
1209 | function(module, exports) {
|
1210 |
|
1211 | |
1212 |
|
1213 |
|
1214 |
|
1215 |
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 |
|
1227 |
|
1228 |
|
1229 |
|
1230 |
|
1231 |
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 | function eq(value, other) {
|
1244 | return value === other || (value !== value && other !== other);
|
1245 | }
|
1246 |
|
1247 | module.exports = eq;
|
1248 |
|
1249 |
|
1250 | },
|
1251 |
|
1252 | function(module, exports, __webpack_require__) {
|
1253 |
|
1254 | var baseIsArguments = __webpack_require__(61),
|
1255 | isObjectLike = __webpack_require__(5);
|
1256 |
|
1257 |
|
1258 | var objectProto = Object.prototype;
|
1259 |
|
1260 |
|
1261 | var hasOwnProperty = objectProto.hasOwnProperty;
|
1262 |
|
1263 |
|
1264 | var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
1265 |
|
1266 | |
1267 |
|
1268 |
|
1269 |
|
1270 |
|
1271 |
|
1272 |
|
1273 |
|
1274 |
|
1275 |
|
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 |
|
1282 |
|
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 |
|
1294 | function(module, exports, __webpack_require__) {
|
1295 |
|
1296 | (function(module) {var root = __webpack_require__(1),
|
1297 | stubFalse = __webpack_require__(131);
|
1298 |
|
1299 |
|
1300 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
1301 |
|
1302 |
|
1303 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
1304 |
|
1305 |
|
1306 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
1307 |
|
1308 |
|
1309 | var Buffer = moduleExports ? root.Buffer : undefined;
|
1310 |
|
1311 |
|
1312 | var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
1313 |
|
1314 | |
1315 |
|
1316 |
|
1317 |
|
1318 |
|
1319 |
|
1320 |
|
1321 |
|
1322 |
|
1323 |
|
1324 |
|
1325 |
|
1326 |
|
1327 |
|
1328 |
|
1329 |
|
1330 |
|
1331 | var isBuffer = nativeIsBuffer || stubFalse;
|
1332 |
|
1333 | module.exports = isBuffer;
|
1334 |
|
1335 | }.call(exports, __webpack_require__(41)(module)))
|
1336 |
|
1337 | },
|
1338 |
|
1339 | function(module, exports, __webpack_require__) {
|
1340 |
|
1341 | var baseGetTag = __webpack_require__(4),
|
1342 | isObject = __webpack_require__(20);
|
1343 |
|
1344 |
|
1345 | var asyncTag = '[object AsyncFunction]',
|
1346 | funcTag = '[object Function]',
|
1347 | genTag = '[object GeneratorFunction]',
|
1348 | proxyTag = '[object Proxy]';
|
1349 |
|
1350 | |
1351 |
|
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 |
|
1359 |
|
1360 |
|
1361 |
|
1362 |
|
1363 |
|
1364 |
|
1365 |
|
1366 |
|
1367 | function isFunction(value) {
|
1368 | if (!isObject(value)) {
|
1369 | return false;
|
1370 | }
|
1371 |
|
1372 |
|
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 |
|
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 |
|
1389 | var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
1390 |
|
1391 | |
1392 |
|
1393 |
|
1394 |
|
1395 |
|
1396 |
|
1397 |
|
1398 |
|
1399 |
|
1400 |
|
1401 |
|
1402 |
|
1403 |
|
1404 |
|
1405 |
|
1406 |
|
1407 |
|
1408 | var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
1409 |
|
1410 | module.exports = isTypedArray;
|
1411 |
|
1412 |
|
1413 | },
|
1414 |
|
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 |
|
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 |
|
1460 | function(module, exports) {
|
1461 |
|
1462 | "use strict";
|
1463 |
|
1464 | var utils = module.exports = {};
|
1465 |
|
1466 | |
1467 |
|
1468 |
|
1469 |
|
1470 |
|
1471 |
|
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 |
|
1485 | function(module, exports) {
|
1486 |
|
1487 | module.exports = function(module) {
|
1488 | if(!module.webpackPolyfill) {
|
1489 | module.deprecate = function() {};
|
1490 | module.paths = [];
|
1491 |
|
1492 | module.children = [];
|
1493 | module.webpackPolyfill = 1;
|
1494 | }
|
1495 | return module;
|
1496 | }
|
1497 |
|
1498 |
|
1499 | },
|
1500 |
|
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 |
|
1531 |
|
1532 | },
|
1533 |
|
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 |
|
1558 |
|
1559 | processBatchAsync();
|
1560 | }
|
1561 |
|
1562 | batch.add(level, fn);
|
1563 | }
|
1564 |
|
1565 | function processBatch() {
|
1566 |
|
1567 |
|
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 |
|
1611 | var cancel = clearTimeout;
|
1612 | return cancel(listener);
|
1613 | }
|
1614 |
|
1615 | function requestFrame(callback) {
|
1616 |
|
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 |
|
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 |
|
1699 | function(module, exports, __webpack_require__) {
|
1700 |
|
1701 | var getNative = __webpack_require__(3),
|
1702 | root = __webpack_require__(1);
|
1703 |
|
1704 |
|
1705 | var DataView = getNative(root, 'DataView');
|
1706 |
|
1707 | module.exports = DataView;
|
1708 |
|
1709 |
|
1710 | },
|
1711 |
|
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 |
|
1722 |
|
1723 |
|
1724 |
|
1725 |
|
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 |
|
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 |
|
1750 | function(module, exports, __webpack_require__) {
|
1751 |
|
1752 | var getNative = __webpack_require__(3),
|
1753 | root = __webpack_require__(1);
|
1754 |
|
1755 |
|
1756 | var Promise = getNative(root, 'Promise');
|
1757 |
|
1758 | module.exports = Promise;
|
1759 |
|
1760 |
|
1761 | },
|
1762 |
|
1763 | function(module, exports, __webpack_require__) {
|
1764 |
|
1765 | var getNative = __webpack_require__(3),
|
1766 | root = __webpack_require__(1);
|
1767 |
|
1768 |
|
1769 | var Set = getNative(root, 'Set');
|
1770 |
|
1771 | module.exports = Set;
|
1772 |
|
1773 |
|
1774 | },
|
1775 |
|
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 |
|
1785 |
|
1786 |
|
1787 |
|
1788 |
|
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 |
|
1801 | SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
1802 | SetCache.prototype.has = setCacheHas;
|
1803 |
|
1804 | module.exports = SetCache;
|
1805 |
|
1806 |
|
1807 | },
|
1808 |
|
1809 | function(module, exports, __webpack_require__) {
|
1810 |
|
1811 | var root = __webpack_require__(1);
|
1812 |
|
1813 |
|
1814 | var Uint8Array = root.Uint8Array;
|
1815 |
|
1816 | module.exports = Uint8Array;
|
1817 |
|
1818 |
|
1819 | },
|
1820 |
|
1821 | function(module, exports, __webpack_require__) {
|
1822 |
|
1823 | var getNative = __webpack_require__(3),
|
1824 | root = __webpack_require__(1);
|
1825 |
|
1826 |
|
1827 | var WeakMap = getNative(root, 'WeakMap');
|
1828 |
|
1829 | module.exports = WeakMap;
|
1830 |
|
1831 |
|
1832 | },
|
1833 |
|
1834 | function(module, exports) {
|
1835 |
|
1836 | |
1837 |
|
1838 |
|
1839 |
|
1840 |
|
1841 |
|
1842 |
|
1843 |
|
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 |
|
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 |
|
1875 | var objectProto = Object.prototype;
|
1876 |
|
1877 |
|
1878 | var hasOwnProperty = objectProto.hasOwnProperty;
|
1879 |
|
1880 | |
1881 |
|
1882 |
|
1883 |
|
1884 |
|
1885 |
|
1886 |
|
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 |
|
1901 | key == 'length' ||
|
1902 |
|
1903 | (isBuff && (key == 'offset' || key == 'parent')) ||
|
1904 |
|
1905 | (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
1906 |
|
1907 | isIndex(key, length)
|
1908 | ))) {
|
1909 | result.push(key);
|
1910 | }
|
1911 | }
|
1912 | return result;
|
1913 | }
|
1914 |
|
1915 | module.exports = arrayLikeKeys;
|
1916 |
|
1917 |
|
1918 | },
|
1919 |
|
1920 | function(module, exports) {
|
1921 |
|
1922 | |
1923 |
|
1924 |
|
1925 |
|
1926 |
|
1927 |
|
1928 |
|
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 |
|
1946 | function(module, exports) {
|
1947 |
|
1948 | |
1949 |
|
1950 |
|
1951 |
|
1952 |
|
1953 |
|
1954 |
|
1955 |
|
1956 |
|
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 |
|
1975 | function(module, exports, __webpack_require__) {
|
1976 |
|
1977 | var baseForOwn = __webpack_require__(58),
|
1978 | createBaseEach = __webpack_require__(79);
|
1979 |
|
1980 | |
1981 |
|
1982 |
|
1983 |
|
1984 |
|
1985 |
|
1986 |
|
1987 |
|
1988 | var baseEach = createBaseEach(baseForOwn);
|
1989 |
|
1990 | module.exports = baseEach;
|
1991 |
|
1992 |
|
1993 | },
|
1994 |
|
1995 | function(module, exports, __webpack_require__) {
|
1996 |
|
1997 | var createBaseFor = __webpack_require__(80);
|
1998 |
|
1999 | |
2000 |
|
2001 |
|
2002 |
|
2003 |
|
2004 |
|
2005 |
|
2006 |
|
2007 |
|
2008 |
|
2009 |
|
2010 | var baseFor = createBaseFor();
|
2011 |
|
2012 | module.exports = baseFor;
|
2013 |
|
2014 |
|
2015 | },
|
2016 |
|
2017 | function(module, exports, __webpack_require__) {
|
2018 |
|
2019 | var baseFor = __webpack_require__(57),
|
2020 | keys = __webpack_require__(12);
|
2021 |
|
2022 | |
2023 |
|
2024 |
|
2025 |
|
2026 |
|
2027 |
|
2028 |
|
2029 |
|
2030 | function baseForOwn(object, iteratee) {
|
2031 | return object && baseFor(object, iteratee, keys);
|
2032 | }
|
2033 |
|
2034 | module.exports = baseForOwn;
|
2035 |
|
2036 |
|
2037 | },
|
2038 |
|
2039 | function(module, exports, __webpack_require__) {
|
2040 |
|
2041 | var arrayPush = __webpack_require__(54),
|
2042 | isArray = __webpack_require__(2);
|
2043 |
|
2044 | |
2045 |
|
2046 |
|
2047 |
|
2048 |
|
2049 |
|
2050 |
|
2051 |
|
2052 |
|
2053 |
|
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 |
|
2065 | function(module, exports) {
|
2066 |
|
2067 | |
2068 |
|
2069 |
|
2070 |
|
2071 |
|
2072 |
|
2073 |
|
2074 |
|
2075 | function baseHasIn(object, key) {
|
2076 | return object != null && key in Object(object);
|
2077 | }
|
2078 |
|
2079 | module.exports = baseHasIn;
|
2080 |
|
2081 |
|
2082 | },
|
2083 |
|
2084 | function(module, exports, __webpack_require__) {
|
2085 |
|
2086 | var baseGetTag = __webpack_require__(4),
|
2087 | isObjectLike = __webpack_require__(5);
|
2088 |
|
2089 |
|
2090 | var argsTag = '[object Arguments]';
|
2091 |
|
2092 | |
2093 |
|
2094 |
|
2095 |
|
2096 |
|
2097 |
|
2098 |
|
2099 | function baseIsArguments(value) {
|
2100 | return isObjectLike(value) && baseGetTag(value) == argsTag;
|
2101 | }
|
2102 |
|
2103 | module.exports = baseIsArguments;
|
2104 |
|
2105 |
|
2106 | },
|
2107 |
|
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 |
|
2120 | var COMPARE_PARTIAL_FLAG = 1;
|
2121 |
|
2122 |
|
2123 | var argsTag = '[object Arguments]',
|
2124 | arrayTag = '[object Array]',
|
2125 | objectTag = '[object Object]';
|
2126 |
|
2127 |
|
2128 | var objectProto = Object.prototype;
|
2129 |
|
2130 |
|
2131 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2132 |
|
2133 | |
2134 |
|
2135 |
|
2136 |
|
2137 |
|
2138 |
|
2139 |
|
2140 |
|
2141 |
|
2142 |
|
2143 |
|
2144 |
|
2145 |
|
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 |
|
2197 | function(module, exports, __webpack_require__) {
|
2198 |
|
2199 | var Stack = __webpack_require__(23),
|
2200 | baseIsEqual = __webpack_require__(16);
|
2201 |
|
2202 |
|
2203 | var COMPARE_PARTIAL_FLAG = 1,
|
2204 | COMPARE_UNORDERED_FLAG = 2;
|
2205 |
|
2206 | |
2207 |
|
2208 |
|
2209 |
|
2210 |
|
2211 |
|
2212 |
|
2213 |
|
2214 |
|
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 |
|
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 |
|
2274 |
|
2275 |
|
2276 | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
2277 |
|
2278 |
|
2279 | var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
2280 |
|
2281 |
|
2282 | var funcProto = Function.prototype,
|
2283 | objectProto = Object.prototype;
|
2284 |
|
2285 |
|
2286 | var funcToString = funcProto.toString;
|
2287 |
|
2288 |
|
2289 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2290 |
|
2291 |
|
2292 | var reIsNative = RegExp('^' +
|
2293 | funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
2294 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
2295 | );
|
2296 |
|
2297 | |
2298 |
|
2299 |
|
2300 |
|
2301 |
|
2302 |
|
2303 |
|
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 |
|
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 |
|
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 |
|
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 |
|
2369 |
|
2370 |
|
2371 |
|
2372 |
|
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 |
|
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 |
|
2394 |
|
2395 |
|
2396 |
|
2397 |
|
2398 |
|
2399 | function baseIteratee(value) {
|
2400 |
|
2401 |
|
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 |
|
2421 | function(module, exports, __webpack_require__) {
|
2422 |
|
2423 | var isPrototype = __webpack_require__(97),
|
2424 | nativeKeys = __webpack_require__(109);
|
2425 |
|
2426 |
|
2427 | var objectProto = Object.prototype;
|
2428 |
|
2429 |
|
2430 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2431 |
|
2432 | |
2433 |
|
2434 |
|
2435 |
|
2436 |
|
2437 |
|
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 |
|
2457 | function(module, exports, __webpack_require__) {
|
2458 |
|
2459 | var baseEach = __webpack_require__(56),
|
2460 | isArrayLike = __webpack_require__(18);
|
2461 |
|
2462 | |
2463 |
|
2464 |
|
2465 |
|
2466 |
|
2467 |
|
2468 |
|
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 |
|
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 |
|
2493 |
|
2494 |
|
2495 |
|
2496 |
|
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 |
|
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 |
|
2556 |
|
2557 |
|
2558 |
|
2559 |
|
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 |
|
2572 | function(module, exports, __webpack_require__) {
|
2573 |
|
2574 | var baseGet = __webpack_require__(24);
|
2575 |
|
2576 | |
2577 |
|
2578 |
|
2579 |
|
2580 |
|
2581 |
|
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 |
|
2594 | function(module, exports) {
|
2595 |
|
2596 | |
2597 |
|
2598 |
|
2599 |
|
2600 |
|
2601 |
|
2602 |
|
2603 |
|
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 |
|
2620 | function(module, exports, __webpack_require__) {
|
2621 |
|
2622 | var arrayMap = __webpack_require__(15);
|
2623 |
|
2624 | |
2625 |
|
2626 |
|
2627 |
|
2628 |
|
2629 |
|
2630 |
|
2631 |
|
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 |
|
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 |
|
2652 | var INFINITY = 1 / 0;
|
2653 |
|
2654 |
|
2655 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
2656 | symbolToString = symbolProto ? symbolProto.toString : undefined;
|
2657 |
|
2658 | |
2659 |
|
2660 |
|
2661 |
|
2662 |
|
2663 |
|
2664 |
|
2665 |
|
2666 | function baseToString(value) {
|
2667 |
|
2668 | if (typeof value == 'string') {
|
2669 | return value;
|
2670 | }
|
2671 | if (isArray(value)) {
|
2672 |
|
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 |
|
2687 | function(module, exports) {
|
2688 |
|
2689 | |
2690 |
|
2691 |
|
2692 |
|
2693 |
|
2694 |
|
2695 |
|
2696 | function baseUnary(func) {
|
2697 | return function(value) {
|
2698 | return func(value);
|
2699 | };
|
2700 | }
|
2701 |
|
2702 | module.exports = baseUnary;
|
2703 |
|
2704 |
|
2705 | },
|
2706 |
|
2707 | function(module, exports) {
|
2708 |
|
2709 | |
2710 |
|
2711 |
|
2712 |
|
2713 |
|
2714 |
|
2715 |
|
2716 |
|
2717 | function cacheHas(cache, key) {
|
2718 | return cache.has(key);
|
2719 | }
|
2720 |
|
2721 | module.exports = cacheHas;
|
2722 |
|
2723 |
|
2724 | },
|
2725 |
|
2726 | function(module, exports, __webpack_require__) {
|
2727 |
|
2728 | var root = __webpack_require__(1);
|
2729 |
|
2730 |
|
2731 | var coreJsData = root['__core-js_shared__'];
|
2732 |
|
2733 | module.exports = coreJsData;
|
2734 |
|
2735 |
|
2736 | },
|
2737 |
|
2738 | function(module, exports, __webpack_require__) {
|
2739 |
|
2740 | var isArrayLike = __webpack_require__(18);
|
2741 |
|
2742 | |
2743 |
|
2744 |
|
2745 |
|
2746 |
|
2747 |
|
2748 |
|
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 |
|
2776 | function(module, exports) {
|
2777 |
|
2778 | |
2779 |
|
2780 |
|
2781 |
|
2782 |
|
2783 |
|
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 |
|
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 |
|
2815 | var mapTag = '[object Map]',
|
2816 | setTag = '[object Set]';
|
2817 |
|
2818 | |
2819 |
|
2820 |
|
2821 |
|
2822 |
|
2823 |
|
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 |
|
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 |
|
2853 | var COMPARE_PARTIAL_FLAG = 1,
|
2854 | COMPARE_UNORDERED_FLAG = 2;
|
2855 |
|
2856 |
|
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 |
|
2871 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
2872 | symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
2873 |
|
2874 | |
2875 |
|
2876 |
|
2877 |
|
2878 |
|
2879 |
|
2880 |
|
2881 |
|
2882 |
|
2883 |
|
2884 |
|
2885 |
|
2886 |
|
2887 |
|
2888 |
|
2889 |
|
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 |
|
2912 |
|
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 |
|
2921 |
|
2922 |
|
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 |
|
2936 | var stacked = stack.get(object);
|
2937 | if (stacked) {
|
2938 | return stacked == other;
|
2939 | }
|
2940 | bitmask |= COMPARE_UNORDERED_FLAG;
|
2941 |
|
2942 |
|
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 |
|
2961 | function(module, exports, __webpack_require__) {
|
2962 |
|
2963 | var getAllKeys = __webpack_require__(84);
|
2964 |
|
2965 |
|
2966 | var COMPARE_PARTIAL_FLAG = 1;
|
2967 |
|
2968 |
|
2969 | var objectProto = Object.prototype;
|
2970 |
|
2971 |
|
2972 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2973 |
|
2974 | |
2975 |
|
2976 |
|
2977 |
|
2978 |
|
2979 |
|
2980 |
|
2981 |
|
2982 |
|
2983 |
|
2984 |
|
2985 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
3064 |
|
3065 |
|
3066 |
|
3067 |
|
3068 |
|
3069 | function getAllKeys(object) {
|
3070 | return baseGetAllKeys(object, keys, getSymbols);
|
3071 | }
|
3072 |
|
3073 | module.exports = getAllKeys;
|
3074 |
|
3075 |
|
3076 | },
|
3077 |
|
3078 | function(module, exports, __webpack_require__) {
|
3079 |
|
3080 | var isStrictComparable = __webpack_require__(30),
|
3081 | keys = __webpack_require__(12);
|
3082 |
|
3083 | |
3084 |
|
3085 |
|
3086 |
|
3087 |
|
3088 |
|
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 |
|
3108 | function(module, exports, __webpack_require__) {
|
3109 |
|
3110 | var Symbol = __webpack_require__(7);
|
3111 |
|
3112 |
|
3113 | var objectProto = Object.prototype;
|
3114 |
|
3115 |
|
3116 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3117 |
|
3118 | |
3119 |
|
3120 |
|
3121 |
|
3122 |
|
3123 | var nativeObjectToString = objectProto.toString;
|
3124 |
|
3125 |
|
3126 | var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
3127 |
|
3128 | |
3129 |
|
3130 |
|
3131 |
|
3132 |
|
3133 |
|
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 |
|
3160 | function(module, exports, __webpack_require__) {
|
3161 |
|
3162 | var arrayFilter = __webpack_require__(52),
|
3163 | stubArray = __webpack_require__(130);
|
3164 |
|
3165 |
|
3166 | var objectProto = Object.prototype;
|
3167 |
|
3168 |
|
3169 | var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
3170 |
|
3171 |
|
3172 | var nativeGetSymbols = Object.getOwnPropertySymbols;
|
3173 |
|
3174 | |
3175 |
|
3176 |
|
3177 |
|
3178 |
|
3179 |
|
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 |
|
3196 | function(module, exports) {
|
3197 |
|
3198 | |
3199 |
|
3200 |
|
3201 |
|
3202 |
|
3203 |
|
3204 |
|
3205 |
|
3206 | function getValue(object, key) {
|
3207 | return object == null ? undefined : object[key];
|
3208 | }
|
3209 |
|
3210 | module.exports = getValue;
|
3211 |
|
3212 |
|
3213 | },
|
3214 |
|
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 |
|
3226 |
|
3227 |
|
3228 |
|
3229 |
|
3230 |
|
3231 |
|
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 |
|
3260 | function(module, exports, __webpack_require__) {
|
3261 |
|
3262 | var nativeCreate = __webpack_require__(10);
|
3263 |
|
3264 | |
3265 |
|
3266 |
|
3267 |
|
3268 |
|
3269 |
|
3270 |
|
3271 | function hashClear() {
|
3272 | this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
3273 | this.size = 0;
|
3274 | }
|
3275 |
|
3276 | module.exports = hashClear;
|
3277 |
|
3278 |
|
3279 | },
|
3280 |
|
3281 | function(module, exports) {
|
3282 |
|
3283 | |
3284 |
|
3285 |
|
3286 |
|
3287 |
|
3288 |
|
3289 |
|
3290 |
|
3291 |
|
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 |
|
3304 | function(module, exports, __webpack_require__) {
|
3305 |
|
3306 | var nativeCreate = __webpack_require__(10);
|
3307 |
|
3308 |
|
3309 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
3310 |
|
3311 |
|
3312 | var objectProto = Object.prototype;
|
3313 |
|
3314 |
|
3315 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3316 |
|
3317 | |
3318 |
|
3319 |
|
3320 |
|
3321 |
|
3322 |
|
3323 |
|
3324 |
|
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 |
|
3340 | function(module, exports, __webpack_require__) {
|
3341 |
|
3342 | var nativeCreate = __webpack_require__(10);
|
3343 |
|
3344 |
|
3345 | var objectProto = Object.prototype;
|
3346 |
|
3347 |
|
3348 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3349 |
|
3350 | |
3351 |
|
3352 |
|
3353 |
|
3354 |
|
3355 |
|
3356 |
|
3357 |
|
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 |
|
3369 | function(module, exports, __webpack_require__) {
|
3370 |
|
3371 | var nativeCreate = __webpack_require__(10);
|
3372 |
|
3373 |
|
3374 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
3375 |
|
3376 | |
3377 |
|
3378 |
|
3379 |
|
3380 |
|
3381 |
|
3382 |
|
3383 |
|
3384 |
|
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 |
|
3398 | function(module, exports) {
|
3399 |
|
3400 | |
3401 |
|
3402 |
|
3403 |
|
3404 |
|
3405 |
|
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 |
|
3419 | function(module, exports, __webpack_require__) {
|
3420 |
|
3421 | var coreJsData = __webpack_require__(78);
|
3422 |
|
3423 |
|
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 |
|
3431 |
|
3432 |
|
3433 |
|
3434 |
|
3435 |
|
3436 | function isMasked(func) {
|
3437 | return !!maskSrcKey && (maskSrcKey in func);
|
3438 | }
|
3439 |
|
3440 | module.exports = isMasked;
|
3441 |
|
3442 |
|
3443 | },
|
3444 |
|
3445 | function(module, exports) {
|
3446 |
|
3447 |
|
3448 | var objectProto = Object.prototype;
|
3449 |
|
3450 | |
3451 |
|
3452 |
|
3453 |
|
3454 |
|
3455 |
|
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 |
|
3469 | function(module, exports) {
|
3470 |
|
3471 | |
3472 |
|
3473 |
|
3474 |
|
3475 |
|
3476 |
|
3477 |
|
3478 | function listCacheClear() {
|
3479 | this.__data__ = [];
|
3480 | this.size = 0;
|
3481 | }
|
3482 |
|
3483 | module.exports = listCacheClear;
|
3484 |
|
3485 |
|
3486 | },
|
3487 |
|
3488 | function(module, exports, __webpack_require__) {
|
3489 |
|
3490 | var assocIndexOf = __webpack_require__(8);
|
3491 |
|
3492 |
|
3493 | var arrayProto = Array.prototype;
|
3494 |
|
3495 |
|
3496 | var splice = arrayProto.splice;
|
3497 |
|
3498 | |
3499 |
|
3500 |
|
3501 |
|
3502 |
|
3503 |
|
3504 |
|
3505 |
|
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 |
|
3529 | function(module, exports, __webpack_require__) {
|
3530 |
|
3531 | var assocIndexOf = __webpack_require__(8);
|
3532 |
|
3533 | |
3534 |
|
3535 |
|
3536 |
|
3537 |
|
3538 |
|
3539 |
|
3540 |
|
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 |
|
3554 | function(module, exports, __webpack_require__) {
|
3555 |
|
3556 | var assocIndexOf = __webpack_require__(8);
|
3557 |
|
3558 | |
3559 |
|
3560 |
|
3561 |
|
3562 |
|
3563 |
|
3564 |
|
3565 |
|
3566 |
|
3567 | function listCacheHas(key) {
|
3568 | return assocIndexOf(this.__data__, key) > -1;
|
3569 | }
|
3570 |
|
3571 | module.exports = listCacheHas;
|
3572 |
|
3573 |
|
3574 | },
|
3575 |
|
3576 | function(module, exports, __webpack_require__) {
|
3577 |
|
3578 | var assocIndexOf = __webpack_require__(8);
|
3579 |
|
3580 | |
3581 |
|
3582 |
|
3583 |
|
3584 |
|
3585 |
|
3586 |
|
3587 |
|
3588 |
|
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 |
|
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 |
|
3616 |
|
3617 |
|
3618 |
|
3619 |
|
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 |
|
3635 | function(module, exports, __webpack_require__) {
|
3636 |
|
3637 | var getMapData = __webpack_require__(9);
|
3638 |
|
3639 | |
3640 |
|
3641 |
|
3642 |
|
3643 |
|
3644 |
|
3645 |
|
3646 |
|
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 |
|
3659 | function(module, exports, __webpack_require__) {
|
3660 |
|
3661 | var getMapData = __webpack_require__(9);
|
3662 |
|
3663 | |
3664 |
|
3665 |
|
3666 |
|
3667 |
|
3668 |
|
3669 |
|
3670 |
|
3671 |
|
3672 | function mapCacheGet(key) {
|
3673 | return getMapData(this, key).get(key);
|
3674 | }
|
3675 |
|
3676 | module.exports = mapCacheGet;
|
3677 |
|
3678 |
|
3679 | },
|
3680 |
|
3681 | function(module, exports, __webpack_require__) {
|
3682 |
|
3683 | var getMapData = __webpack_require__(9);
|
3684 |
|
3685 | |
3686 |
|
3687 |
|
3688 |
|
3689 |
|
3690 |
|
3691 |
|
3692 |
|
3693 |
|
3694 | function mapCacheHas(key) {
|
3695 | return getMapData(this, key).has(key);
|
3696 | }
|
3697 |
|
3698 | module.exports = mapCacheHas;
|
3699 |
|
3700 |
|
3701 | },
|
3702 |
|
3703 | function(module, exports, __webpack_require__) {
|
3704 |
|
3705 | var getMapData = __webpack_require__(9);
|
3706 |
|
3707 | |
3708 |
|
3709 |
|
3710 |
|
3711 |
|
3712 |
|
3713 |
|
3714 |
|
3715 |
|
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 |
|
3731 | function(module, exports, __webpack_require__) {
|
3732 |
|
3733 | var memoize = __webpack_require__(128);
|
3734 |
|
3735 |
|
3736 | var MAX_MEMOIZE_SIZE = 500;
|
3737 |
|
3738 | |
3739 |
|
3740 |
|
3741 |
|
3742 |
|
3743 |
|
3744 |
|
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 |
|
3763 | function(module, exports, __webpack_require__) {
|
3764 |
|
3765 | var overArg = __webpack_require__(112);
|
3766 |
|
3767 |
|
3768 | var nativeKeys = overArg(Object.keys, Object);
|
3769 |
|
3770 | module.exports = nativeKeys;
|
3771 |
|
3772 |
|
3773 | },
|
3774 |
|
3775 | function(module, exports, __webpack_require__) {
|
3776 |
|
3777 | (function(module) {var freeGlobal = __webpack_require__(27);
|
3778 |
|
3779 |
|
3780 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
3781 |
|
3782 |
|
3783 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
3784 |
|
3785 |
|
3786 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
3787 |
|
3788 |
|
3789 | var freeProcess = moduleExports && freeGlobal.process;
|
3790 |
|
3791 |
|
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 | }.call(exports, __webpack_require__(41)(module)))
|
3801 |
|
3802 | },
|
3803 |
|
3804 | function(module, exports) {
|
3805 |
|
3806 |
|
3807 | var objectProto = Object.prototype;
|
3808 |
|
3809 | |
3810 |
|
3811 |
|
3812 |
|
3813 |
|
3814 | var nativeObjectToString = objectProto.toString;
|
3815 |
|
3816 | |
3817 |
|
3818 |
|
3819 |
|
3820 |
|
3821 |
|
3822 |
|
3823 | function objectToString(value) {
|
3824 | return nativeObjectToString.call(value);
|
3825 | }
|
3826 |
|
3827 | module.exports = objectToString;
|
3828 |
|
3829 |
|
3830 | },
|
3831 |
|
3832 | function(module, exports) {
|
3833 |
|
3834 | |
3835 |
|
3836 |
|
3837 |
|
3838 |
|
3839 |
|
3840 |
|
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 |
|
3853 | function(module, exports) {
|
3854 |
|
3855 |
|
3856 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
3857 |
|
3858 | |
3859 |
|
3860 |
|
3861 |
|
3862 |
|
3863 |
|
3864 |
|
3865 |
|
3866 |
|
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 |
|
3878 | function(module, exports) {
|
3879 |
|
3880 | |
3881 |
|
3882 |
|
3883 |
|
3884 |
|
3885 |
|
3886 |
|
3887 |
|
3888 |
|
3889 | function setCacheHas(value) {
|
3890 | return this.__data__.has(value);
|
3891 | }
|
3892 |
|
3893 | module.exports = setCacheHas;
|
3894 |
|
3895 |
|
3896 | },
|
3897 |
|
3898 | function(module, exports) {
|
3899 |
|
3900 | |
3901 |
|
3902 |
|
3903 |
|
3904 |
|
3905 |
|
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 |
|
3922 | function(module, exports) {
|
3923 |
|
3924 | |
3925 |
|
3926 |
|
3927 |
|
3928 |
|
3929 |
|
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 |
|
3946 | function(module, exports, __webpack_require__) {
|
3947 |
|
3948 | var ListCache = __webpack_require__(6);
|
3949 |
|
3950 | |
3951 |
|
3952 |
|
3953 |
|
3954 |
|
3955 |
|
3956 |
|
3957 | function stackClear() {
|
3958 | this.__data__ = new ListCache;
|
3959 | this.size = 0;
|
3960 | }
|
3961 |
|
3962 | module.exports = stackClear;
|
3963 |
|
3964 |
|
3965 | },
|
3966 |
|
3967 | function(module, exports) {
|
3968 |
|
3969 | |
3970 |
|
3971 |
|
3972 |
|
3973 |
|
3974 |
|
3975 |
|
3976 |
|
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 |
|
3991 | function(module, exports) {
|
3992 |
|
3993 | |
3994 |
|
3995 |
|
3996 |
|
3997 |
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 | function stackGet(key) {
|
4003 | return this.__data__.get(key);
|
4004 | }
|
4005 |
|
4006 | module.exports = stackGet;
|
4007 |
|
4008 |
|
4009 | },
|
4010 |
|
4011 | function(module, exports) {
|
4012 |
|
4013 | |
4014 |
|
4015 |
|
4016 |
|
4017 |
|
4018 |
|
4019 |
|
4020 |
|
4021 |
|
4022 | function stackHas(key) {
|
4023 | return this.__data__.has(key);
|
4024 | }
|
4025 |
|
4026 | module.exports = stackHas;
|
4027 |
|
4028 |
|
4029 | },
|
4030 |
|
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 |
|
4038 | var LARGE_ARRAY_SIZE = 200;
|
4039 |
|
4040 | |
4041 |
|
4042 |
|
4043 |
|
4044 |
|
4045 |
|
4046 |
|
4047 |
|
4048 |
|
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 |
|
4071 | function(module, exports, __webpack_require__) {
|
4072 |
|
4073 | var memoizeCapped = __webpack_require__(108);
|
4074 |
|
4075 |
|
4076 | var reLeadingDot = /^\./,
|
4077 | rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
4078 |
|
4079 |
|
4080 | var reEscapeChar = /\\(\\)?/g;
|
4081 |
|
4082 | |
4083 |
|
4084 |
|
4085 |
|
4086 |
|
4087 |
|
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 |
|
4105 | function(module, exports, __webpack_require__) {
|
4106 |
|
4107 | var baseGet = __webpack_require__(24);
|
4108 |
|
4109 | |
4110 |
|
4111 |
|
4112 |
|
4113 |
|
4114 |
|
4115 |
|
4116 |
|
4117 |
|
4118 |
|
4119 |
|
4120 |
|
4121 |
|
4122 |
|
4123 |
|
4124 |
|
4125 |
|
4126 |
|
4127 |
|
4128 |
|
4129 |
|
4130 |
|
4131 |
|
4132 |
|
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 |
|
4151 |
|
4152 |
|
4153 |
|
4154 |
|
4155 |
|
4156 |
|
4157 |
|
4158 |
|
4159 |
|
4160 |
|
4161 |
|
4162 |
|
4163 |
|
4164 |
|
4165 |
|
4166 |
|
4167 |
|
4168 |
|
4169 |
|
4170 |
|
4171 |
|
4172 |
|
4173 |
|
4174 |
|
4175 | function hasIn(object, path) {
|
4176 | return object != null && hasPath(object, path, baseHasIn);
|
4177 | }
|
4178 |
|
4179 | module.exports = hasIn;
|
4180 |
|
4181 |
|
4182 | },
|
4183 |
|
4184 | function(module, exports) {
|
4185 |
|
4186 | |
4187 |
|
4188 |
|
4189 |
|
4190 |
|
4191 |
|
4192 |
|
4193 |
|
4194 |
|
4195 |
|
4196 |
|
4197 |
|
4198 |
|
4199 |
|
4200 |
|
4201 |
|
4202 | function identity(value) {
|
4203 | return value;
|
4204 | }
|
4205 |
|
4206 | module.exports = identity;
|
4207 |
|
4208 |
|
4209 | },
|
4210 |
|
4211 | function(module, exports, __webpack_require__) {
|
4212 |
|
4213 | var baseIsEqual = __webpack_require__(16);
|
4214 |
|
4215 | |
4216 |
|
4217 |
|
4218 |
|
4219 |
|
4220 |
|
4221 |
|
4222 |
|
4223 |
|
4224 |
|
4225 |
|
4226 |
|
4227 |
|
4228 |
|
4229 |
|
4230 |
|
4231 |
|
4232 |
|
4233 |
|
4234 |
|
4235 |
|
4236 |
|
4237 |
|
4238 |
|
4239 |
|
4240 |
|
4241 |
|
4242 |
|
4243 | function isEqual(value, other) {
|
4244 | return baseIsEqual(value, other);
|
4245 | }
|
4246 |
|
4247 | module.exports = isEqual;
|
4248 |
|
4249 |
|
4250 | },
|
4251 |
|
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 |
|
4261 |
|
4262 |
|
4263 |
|
4264 |
|
4265 |
|
4266 |
|
4267 |
|
4268 |
|
4269 |
|
4270 |
|
4271 |
|
4272 |
|
4273 |
|
4274 |
|
4275 |
|
4276 |
|
4277 |
|
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 |
|
4285 |
|
4286 |
|
4287 |
|
4288 |
|
4289 |
|
4290 |
|
4291 |
|
4292 |
|
4293 |
|
4294 |
|
4295 |
|
4296 |
|
4297 |
|
4298 |
|
4299 |
|
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 |
|
4311 | function(module, exports, __webpack_require__) {
|
4312 |
|
4313 | var MapCache = __webpack_require__(14);
|
4314 |
|
4315 |
|
4316 | var FUNC_ERROR_TEXT = 'Expected a function';
|
4317 |
|
4318 | |
4319 |
|
4320 |
|
4321 |
|
4322 |
|
4323 |
|
4324 |
|
4325 |
|
4326 |
|
4327 |
|
4328 |
|
4329 |
|
4330 |
|
4331 |
|
4332 |
|
4333 |
|
4334 |
|
4335 |
|
4336 |
|
4337 |
|
4338 |
|
4339 |
|
4340 |
|
4341 |
|
4342 |
|
4343 |
|
4344 |
|
4345 |
|
4346 |
|
4347 |
|
4348 |
|
4349 |
|
4350 |
|
4351 |
|
4352 |
|
4353 |
|
4354 |
|
4355 |
|
4356 |
|
4357 |
|
4358 |
|
4359 |
|
4360 |
|
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 |
|
4383 | memoize.Cache = MapCache;
|
4384 |
|
4385 | module.exports = memoize;
|
4386 |
|
4387 |
|
4388 | },
|
4389 |
|
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 |
|
4399 |
|
4400 |
|
4401 |
|
4402 |
|
4403 |
|
4404 |
|
4405 |
|
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 |
|
4413 |
|
4414 |
|
4415 |
|
4416 |
|
4417 |
|
4418 |
|
4419 | function property(path) {
|
4420 | return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
4421 | }
|
4422 |
|
4423 | module.exports = property;
|
4424 |
|
4425 |
|
4426 | },
|
4427 |
|
4428 | function(module, exports) {
|
4429 |
|
4430 | |
4431 |
|
4432 |
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 |
|
4439 |
|
4440 |
|
4441 |
|
4442 |
|
4443 |
|
4444 |
|
4445 |
|
4446 |
|
4447 |
|
4448 | function stubArray() {
|
4449 | return [];
|
4450 | }
|
4451 |
|
4452 | module.exports = stubArray;
|
4453 |
|
4454 |
|
4455 | },
|
4456 |
|
4457 | function(module, exports) {
|
4458 |
|
4459 | |
4460 |
|
4461 |
|
4462 |
|
4463 |
|
4464 |
|
4465 |
|
4466 |
|
4467 |
|
4468 |
|
4469 |
|
4470 |
|
4471 |
|
4472 | function stubFalse() {
|
4473 | return false;
|
4474 | }
|
4475 |
|
4476 | module.exports = stubFalse;
|
4477 |
|
4478 |
|
4479 | },
|
4480 |
|
4481 | function(module, exports, __webpack_require__) {
|
4482 |
|
4483 | var createToPairs = __webpack_require__(81),
|
4484 | keys = __webpack_require__(12);
|
4485 |
|
4486 | |
4487 |
|
4488 |
|
4489 |
|
4490 |
|
4491 |
|
4492 |
|
4493 |
|
4494 |
|
4495 |
|
4496 |
|
4497 |
|
4498 |
|
4499 |
|
4500 |
|
4501 |
|
4502 |
|
4503 |
|
4504 |
|
4505 |
|
4506 |
|
4507 |
|
4508 |
|
4509 |
|
4510 | var toPairs = createToPairs(keys);
|
4511 |
|
4512 | module.exports = toPairs;
|
4513 |
|
4514 |
|
4515 | },
|
4516 |
|
4517 | function(module, exports, __webpack_require__) {
|
4518 |
|
4519 | var baseToString = __webpack_require__(75);
|
4520 |
|
4521 | |
4522 |
|
4523 |
|
4524 |
|
4525 |
|
4526 |
|
4527 |
|
4528 |
|
4529 |
|
4530 |
|
4531 |
|
4532 |
|
4533 |
|
4534 |
|
4535 |
|
4536 |
|
4537 |
|
4538 |
|
4539 |
|
4540 |
|
4541 |
|
4542 | function toString(value) {
|
4543 | return value == null ? '' : baseToString(value);
|
4544 | }
|
4545 |
|
4546 | module.exports = toString;
|
4547 |
|
4548 |
|
4549 | },
|
4550 |
|
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 |
|
4615 |
|
4616 | },
|
4617 |
|
4618 | function(module, exports, __webpack_require__) {
|
4619 |
|
4620 | |
4621 |
|
4622 |
|
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 |
|
4641 |
|
4642 |
|
4643 |
|
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 |
|
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 |
|
4668 |
|
4669 |
|
4670 |
|
4671 |
|
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 |
|
4687 |
|
4688 |
|
4689 | var positionCheckPerformed = false;
|
4690 |
|
4691 |
|
4692 |
|
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 |
|
4721 |
|
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 |
|
4731 | if (!positionCheckPerformed) {
|
4732 | alterPositionStyles();
|
4733 | }
|
4734 |
|
4735 |
|
4736 |
|
4737 | function getDocument(element, callback) {
|
4738 |
|
4739 |
|
4740 |
|
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 |
|
4753 |
|
4754 | var objectElement = this;
|
4755 |
|
4756 |
|
4757 | getDocument(objectElement, function onObjectDocumentReady(objectDocument) {
|
4758 |
|
4759 | callback(element);
|
4760 | });
|
4761 | }
|
4762 |
|
4763 |
|
4764 |
|
4765 | if (style.position !== "") {
|
4766 | alterPositionStyles(style);
|
4767 | positionCheckPerformed = true;
|
4768 | }
|
4769 |
|
4770 |
|
4771 | var object = document.createElement("object");
|
4772 | object.style.cssText = OBJECT_STYLE;
|
4773 | object.type = "text/html";
|
4774 | object.onload = onObjectLoad;
|
4775 |
|
4776 |
|
4777 |
|
4778 | if(!browserDetector.isIE()) {
|
4779 | object.data = "about:blank";
|
4780 | }
|
4781 |
|
4782 | element.appendChild(object);
|
4783 | getState(element).object = object;
|
4784 |
|
4785 |
|
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 |
|
4800 |
|
4801 |
|
4802 | callback(element);
|
4803 | } else {
|
4804 | injectObject(element, callback);
|
4805 | }
|
4806 | }
|
4807 |
|
4808 | |
4809 |
|
4810 |
|
4811 |
|
4812 |
|
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 |
|
4837 | function(module, exports, __webpack_require__) {
|
4838 |
|
4839 | |
4840 |
|
4841 |
|
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 |
|
4865 | var scrollbarSizes = getScrollbarSizes();
|
4866 |
|
4867 |
|
4868 |
|
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 |
|
4957 |
|
4958 |
|
4959 |
|
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 |
|
4973 |
|
4974 |
|
4975 |
|
4976 |
|
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 |
|
5010 | var container = getState(element).container.childNodes[0];
|
5011 | return getComputedStyle(container).width.indexOf("px") === -1;
|
5012 | }
|
5013 |
|
5014 | function getStyle() {
|
5015 |
|
5016 |
|
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 |
|
5119 |
|
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 |
|
5147 |
|
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 |
|
5180 |
|
5181 |
|
5182 |
|
5183 |
|
5184 |
|
5185 |
|
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 |
|
5204 |
|
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 |
|
5235 |
|
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 |
|
5256 |
|
5257 | storeCurrentSize(element, width, height);
|
5258 |
|
5259 |
|
5260 |
|
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 |
|
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 |
|
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 |
|
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 |
|
5437 | return;
|
5438 | }
|
5439 |
|
5440 |
|
5441 |
|
5442 |
|
5443 |
|
5444 |
|
5445 |
|
5446 |
|
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 |
|
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 |
|
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 |
|
5504 |
|
5505 |
|
5506 |
|
5507 |
|
5508 |
|
5509 | |
5510 |
|
5511 |
|
5512 |
|
5513 |
|
5514 |
|
5515 |
|
5516 |
|
5517 |
|
5518 |
|
5519 |
|
5520 |
|
5521 |
|
5522 |
|
5523 | |
5524 |
|
5525 |
|
5526 |
|
5527 |
|
5528 | module.exports = function(options) {
|
5529 | options = options || {};
|
5530 |
|
5531 |
|
5532 | var idHandler;
|
5533 |
|
5534 | if (options.idHandler) {
|
5535 |
|
5536 |
|
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 |
|
5551 | var reporter = options.reporter;
|
5552 |
|
5553 | if(!reporter) {
|
5554 |
|
5555 | var quiet = reporter === false;
|
5556 | reporter = reporterMaker(quiet);
|
5557 | }
|
5558 |
|
5559 |
|
5560 | var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter }));
|
5561 |
|
5562 |
|
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 |
|
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 |
|
5601 |
|
5602 |
|
5603 |
|
5604 |
|
5605 | var onReadyCallbacks = {};
|
5606 |
|
5607 | |
5608 |
|
5609 |
|
5610 |
|
5611 |
|
5612 |
|
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 |
|
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 |
|
5647 | elements = [elements];
|
5648 | } else if (isCollection(elements)) {
|
5649 |
|
5650 |
|
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 |
|
5678 |
|
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 |
|
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 |
|
5704 |
|
5705 |
|
5706 |
|
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 |
|
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 |
|
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 |
|
5754 | elements = [elements];
|
5755 | } else if (isCollection(elements)) {
|
5756 |
|
5757 |
|
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 |
|
5791 | function(module, exports) {
|
5792 |
|
5793 | "use strict";
|
5794 |
|
5795 | module.exports = function(options) {
|
5796 | var getState = options.stateHandler.getState;
|
5797 |
|
5798 | |
5799 |
|
5800 |
|
5801 |
|
5802 |
|
5803 |
|
5804 | function isDetectable(element) {
|
5805 | var state = getState(element);
|
5806 | return state && !!state.isDetectable;
|
5807 | }
|
5808 |
|
5809 | |
5810 |
|
5811 |
|
5812 |
|
5813 |
|
5814 | function markAsDetectable(element) {
|
5815 | getState(element).isDetectable = true;
|
5816 | }
|
5817 |
|
5818 | |
5819 |
|
5820 |
|
5821 |
|
5822 |
|
5823 |
|
5824 | function isBusy(element) {
|
5825 | return !!getState(element).busy;
|
5826 | }
|
5827 |
|
5828 | |
5829 |
|
5830 |
|
5831 |
|
5832 |
|
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 |
|
5849 | function(module, exports) {
|
5850 |
|
5851 | "use strict";
|
5852 |
|
5853 | module.exports = function() {
|
5854 | var idCount = 1;
|
5855 |
|
5856 | |
5857 |
|
5858 |
|
5859 |
|
5860 |
|
5861 | function generate() {
|
5862 | return idCount++;
|
5863 | }
|
5864 |
|
5865 | return {
|
5866 | generate: generate
|
5867 | };
|
5868 | };
|
5869 |
|
5870 |
|
5871 | },
|
5872 |
|
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 |
|
5883 |
|
5884 |
|
5885 |
|
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 |
|
5899 |
|
5900 |
|
5901 |
|
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 |
|
5935 |
|
5936 |
|
5937 |
|
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 |
|
5951 |
|
5952 |
|
5953 |
|
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 |
|
5997 |
|
5998 | |
5999 |
|
6000 |
|
6001 |
|
6002 |
|
6003 | module.exports = function(quiet) {
|
6004 | function noop() {
|
6005 |
|
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 |
|
6017 |
|
6018 | reporter[name] = function reporterProxy() {
|
6019 | var f = console[name];
|
6020 | if (f.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 |
|
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 |
|
6068 | function(module, exports) {
|
6069 |
|
6070 | module.exports = __WEBPACK_EXTERNAL_MODULE_144__;
|
6071 |
|
6072 | },
|
6073 |
|
6074 | function(module, exports) {
|
6075 |
|
6076 | module.exports = __WEBPACK_EXTERNAL_MODULE_145__;
|
6077 |
|
6078 | }
|
6079 | ])
|
6080 | });
|
6081 | ;
|
6082 |
|
\ | No newline at end of file |